Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
1,476,651 | 1,476,652 | Swapping values using pointers | <p>I have this code fragment</p>
<pre><code>int i = 5;
int k = 7;
int * iPtr;
int * jPtr;
int * kPtr;
iPtr = &i;
kPtr = &k;
</code></pre>
<p>I am required to swap i and k using the pointers. This is how I'm doing it:</p>
<pre><code>*jPtr = *kPtr ;
*kPtr = *iPtr ;
*iPtr = *jPtr ;
</code></pre>
<p>Is this th... | c++ | [6] |
5,049,746 | 5,049,747 | jQuery UI drag and drop input field contents | <p>I working on an application where aircraft loadmasters enter weights into a number of individual pallet positions. It's often necessary to change where a given pallet has been put, so I'm trying to fix it so that they can drag and drop a pallet from one position to another.</p>
<p>Rather than deal with the input fi... | jquery | [5] |
1,481,727 | 1,481,728 | How do you display a message in web forms using .cs code in visual studio 2008? | <p>In visual studio 2005, we can get message.show() to display the message.I required the method in visual studio 2008.</p>
| c# | [0] |
4,364,149 | 4,364,150 | Null terminated array in C++ | <p>I want to create NULL terminated array in the constructor. </p>
<pre><code>class Test
{
char name [30];
char Address[100]
};
Test::Test()
{
memset(name ,0, 30);
memset(Address, 0, 100);
}
</code></pre>
<p>Is this the correct way to initialize an array to NULL?</p>
<p>Is there any good alternat... | c++ | [6] |
2,548,779 | 2,548,780 | Building JavaScript objects representing a tree | <pre><code>function createObjects(element, depth){
element.label = element.getElementsByTagName("label")[0].firstChild.nodeValue;
element.url = element.getElementsByTagName("url")[0].firstChild.nodeValue;
element.depth = depth;
if(treeWidths[depth] == undefined){
treeWidths[depth] = 1;
}... | javascript | [3] |
1,916,790 | 1,916,791 | Using existing header in own header | <p>I am trying to write header file. I can write simple headers like add(int x, y) return x+y; . But when I tried to get more complicated, visual studio gave error. I guess error is related to <code><fstream></code>. It always shows </p>
<blockquote>
<p>"error C2065: 'fstream' : undeclared identifier ".</p>
</... | c++ | [6] |
782,227 | 782,228 | Radio Buttons Or Check box in the Alert Dialogue Box | <p>How to use multiple Radio buttons or checkboxes in the Alert dialogue?</p>
| android | [4] |
3,721,972 | 3,721,973 | This code works but it's too verbose, how do i make it shorter? | <p>This code actually works but it's a little bit too verbose, i would like to shrink it but i can't find a solution... </p>
<p>Edit: further explanation: $keywords is an array with a lot of single words extracted from a text. In $text i would like to put al lemmas i can create using adjacent words. Let's say my orig... | php | [2] |
2,432,994 | 2,432,995 | Captcha refreshing in PHP form | <p>I'm trying to use the Securimage PHP script (cf google) for CAPTCHA's but I have a problem: when I press the link "Different image" (to display another captcha), I lose all the text that was entered in the fields of my PHP form. So a user would have to re-enter everything again, which is problematic.</p>
<p>Here is... | php | [2] |
3,141,081 | 3,141,082 | jQuery replace specific text from href | <p>How do you just change the text "us-test" from the value of the link below, without having to replace the whole link, the current method i use replaces the whole link i guess that has to do with the function of .attr, i'm guessing i could achieve this by using .find or something else i really don't have any clue on ... | jquery | [5] |
2,664,993 | 2,664,994 | is it possible to change the extension of a cookie file using javascript? | <p>is it possible to change the extension of a cookie file using javascript ???</p>
| javascript | [3] |
4,752,106 | 4,752,107 | Android RMI with UI Thread | <p>I am trying to remote invoke method form other apk. Everything is working except fact that invoking method has to do some operations on UI and must be run from UI Thread. Method which was invoked with Method.invoke() are running in separate thread and has no access to UI. Is AsyncTask is a proper way to solve this p... | android | [4] |
2,237,009 | 2,237,010 | Trying to change Android title to look better: requestWindowFeature | <p>Sample code:</p>
<pre><code>// activity contains different controls so inherits from Activity
public class Main extends Activity implements OnClickListener, TextWatcher {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
boolean titleSupported = false; ... | android | [4] |
374,574 | 374,575 | How to make an object that can fly, lay an egg, and do stuff (Inheritance) | <p>Im working on Inheritance right now in Java and this is the cod that I have that describes a bird</p>
<pre><code>public class Bird {
public void fly() {
System.out.println("the Bird flies");
}
public void layEgg() {
System.out.println("The bird layed an egg");
}
public void doStu... | java | [1] |
4,268,434 | 4,268,435 | Java-based library to provide prime numbers of a certain specified length | <p>Does anyone know of a Java-based library that can be used to provide all prime numbers of a certain length (k). For instance, if k = 2 the library would provide: 11, 13, 17.. 87.</p>
| java | [1] |
734,323 | 734,324 | CONVERT MM/DD/YYYY HH:MI:SS AM/PM to DD/MM/YYYY in C# | <p>How can I convert MM/DD/YYYY HH:MI:SS AM/PM into DD/MM/YYYY using C# ?I am using C#2008.</p>
<p>Thanks</p>
| c# | [0] |
4,636,171 | 4,636,172 | Limit screen size for application | <p>I develop the application on tablet and want to test it on smaller size screen. Can I configure it to limit width and height of the screen to emulate smaller screen?</p>
| android | [4] |
4,478,223 | 4,478,224 | how to know user has clicked the call and email send in android | <p>I have an app that allow to send email and phone another user. I would like to know how many people have really called and sent email to another users. However,when user click the button that in my app to call the people, and it will go to the standard android call page and same as the email. When it goes to another... | android | [4] |
61,196 | 61,197 | Android Sliding Menu by Jeremy Feinstein | <p>I cloned repo with Android Sliding Menu example from <a href="https://github.com/jfeinstein10/SlidingMenu" rel="nofollow">https://github.com/jfeinstein10/SlidingMenu</a>. I successfully built library. But while building example project I got four same error: </p>
<pre><code>No resource identifier found for attribut... | android | [4] |
1,255,329 | 1,255,330 | android stopservice after 25minutes | <p>I have an android application that gets user location every 2 minutes using <code>requestLocationUpdates</code> service, so now once it reaches 25 minutes I want the running service to be stopped. Is it possible?</p>
<p>Thank you.</p>
| android | [4] |
5,521,972 | 5,521,973 | show callout on mouse hover of linkbutton | <p>HI Guys, I have a problem that I want to show designer callouts on mouseover of linkbutton in c# asp.net. I have searched it on the web but I only get validator callout example of Ajax but I want only callout on every control. How it can be possible? Please suggest me the right result. Thank you</p>
| asp.net | [9] |
3,469,105 | 3,469,106 | Android 3.2 remove title from action bar | <p>I'm working with eclipse, android 3.2. and a virtual machine running android x86. (v3.2)</p>
<p>I use the Holo theme and I want to remove the action bar title and icon. So I do </p>
<pre><code>@Override
public void onCreate(Bundle savedInstanceState)
{
ActionBar actionBar = getActionBar();
actionBar.setDis... | android | [4] |
18,192 | 18,193 | Runtime.exec() gives Error: Could not find or load main class | <p>'Street.class' in my Eclipse project is under \bin in package trafficcircle. The error below is from stderror of the created process; I thought Runtime.exec would complain first if it wasn't found...what's up with this?</p>
<p>Code that runs 'Street' process:</p>
<pre><code> Process process = runtime.exec("java... | java | [1] |
5,930,240 | 5,930,241 | Isometric Game Engine for Android | <p>Are there any existing open source or commercial solutions for this?</p>
| android | [4] |
1,266,996 | 1,266,997 | python: how to define a structure like in C | <p>I am going to define a structure and pass it into a function:</p>
<p>In C:</p>
<pre><code>struct stru {
int a;
int b;
};
s = new stru()
s->a = 10;
func_a(s);
</code></pre>
<p>How this can be done in Python?</p>
| python | [7] |
1,455,336 | 1,455,337 | adding textviews on the fly | <p>i am currently trying to assign each character that i get from a file in SD card into a different text view</p>
<p>could anyone advise how would i have to do this?</p>
<p>am quite unsure about adding textviews on the fly</p>
<pre><code> try {
BufferedReader br = new BufferedReader(new FileReader(fi... | android | [4] |
660,315 | 660,316 | I'm using two different jQuery functions and one seems to be canceling the other out | <p>I had the following script set up for a lightbox:</p>
<p>and when I added the following code for a smooth scrolling effect (I'm building a single page, scrolling website), the previously working lightbox was rendered ineffective. </p>
<p></p>
<p>They both work just fine on their own, but when I use them both, th... | jquery | [5] |
4,894,473 | 4,894,474 | Alarm Manager Accuracy | <p>How to use alarm manager at accurate time interval?</p>
<p>I used alarm manager but it response inaccurate.
Can anyone help me?
I used this code</p>
<pre><code>PendingIntent sender;
AlarmManager am;
long firstTime;
Intent itnt = new Intent();
itnt.setAction("abts.medismo.medismo.ALARMRECEIVER");
sender = PendingIn... | android | [4] |
1,206,765 | 1,206,766 | Check if checkbox is NOT checked on click - jQuery | <p>I want to check if a checkbox just got unchecked, when a user clicks on it. The reason for this is because i want to do a validation when a user unchecks a checkbox. Because atleast one checkbox needs to be checked. So if he unchecks the last one, then it automatically checks itself again.</p>
<p>With jQuery i can ... | jquery | [5] |
2,111,639 | 2,111,640 | C++ reference collections | <p>So... you can't do an array of references but can you build a collection that will handle references, pointers, and values?</p>
<pre><code>Collection<Integer32*> a;
Collection<Integer32&> b;
Collection<Integer32> c;
</code></pre>
<p>Here's the problem I'm running into:</p>
<pre><code>templat... | c++ | [6] |
3,184,062 | 3,184,063 | Building JavaScript objects representing a tree | <pre><code>function createObjects(element, depth){
element.label = element.getElementsByTagName("label")[0].firstChild.nodeValue;
element.url = element.getElementsByTagName("url")[0].firstChild.nodeValue;
element.depth = depth;
if(treeWidths[depth] == undefined){
treeWidths[depth] = 1;
}... | javascript | [3] |
1,306,007 | 1,306,008 | RegEx - find and replace content between two tag which is at multiple location in same file | <p>I have a java file having @Start, @End tag multiple places. looking for Regex which can replace the code between these two tag (including tag)</p>
<pre><code>public class MyClass{
private String name;
private String age;
@Start
private String address;
private String phoneNumber;
@End
---... | java | [1] |
1,842,175 | 1,842,176 | Can't retrieve variables from url | <p>I can't seem to get the 'required_ids' array in my url to be passed into a php variable. Basically I just want to count the size of the array in php so I can put that number in a DB. The problem I have is getting the url string into a variable to pull the requested_ids out.</p>
<pre><code>http://www.somewebsite.co... | php | [2] |
1,383,935 | 1,383,936 | how do I join two lists using linq or lambda expressions | <p>I have two lists <code>List<WorkOrder></code> and <code>List<PlannedWork></code> I would like join the two lists on the workorder number as detailed below. In other words I have a list of planned work but I need to know the description of the work for the workOrderNumber.</p>
<p>I am new to both linq an... | c# | [0] |
860,681 | 860,682 | How to add title in the is the ListView in android | <p>How to add title in the is the ListView in android.</p>
<p>Means </p>
<h2>Subject From <--------Title</h2>
<p>hiiiii | Raj <--------List Content<br />
hello | srss</p>
<p>Here I have used</p>
<p>EfficientAdapter extends BaseAdapter .</p>
| android | [4] |
877,639 | 877,640 | How to find File Name using javascript | <p>I would like to find out if a filename exists in my Image folder, how can I do this in a function using javascript?</p>
<p>How about call a function from Javascript to a C# File? (ON SERVER)</p>
<p>Thank you</p>
| javascript | [3] |
5,122,796 | 5,122,797 | Javascript: navigating through a list of DIV with the keyboard | <p>i would like to have a DIV list on which the user can navigate by pressing up/down cursor keys and getting event when he changes the current DIV, as it happens in Google Instant results. Do you know if there is a jQuery/JS component to achieve it or any suggestions on the components to use.</p>
<p>Thanks !</p>
| javascript | [3] |
2,441,634 | 2,441,635 | Include C++ standard library | <p>Is it possible to include the C++ standard library in a single statement, or must you do it header by header?</p>
| c++ | [6] |
2,134,171 | 2,134,172 | BindToMoniker Com application | <p>I have a service running (Indesign server) and would like to use C# BindToMoniker method.</p>
<p>InDesignServer.Application app = (InDesignServer.Application)System.Runtime.InteropServices.Marshal.BindToMoniker(monikerName);</p>
<p>How do I get the moniker name from a program/service?</p>
| c# | [0] |
5,073,255 | 5,073,256 | Why is assigning a PHP variable printing a value out on the screen? | <p>This has me completely baffled, I'm doing the following:</p>
<pre><code>if($tasks = someFunction(1))
{
}
</code></pre>
<p>someFunction() returns an array of records from a database. For some reason, assigning this array to $tasks causes a number to be printed out to the screen. The number it prints is the number... | php | [2] |
2,571,552 | 2,571,553 | C++: boost smart pointer | <p>Could you please help me to check this code following, I got some errors?</p>
<pre><code>class VideoInfo {
public:
VideoInfo();
virtual ~VideoInfo();
std::string filename; // name of the video file in the fileSystem
unsigned int frameSequenceID; // frame index of the video file
};
}
}
</code></pre>... | c++ | [6] |
3,196,113 | 3,196,114 | Android: MediaStore.Images.Media.EXTERNAL_CONTENT_URI ... show pictures in full size? | <p>I guess this question has been asked before, but I can't seem to find a proper answer/solution.</p>
<p>Have a note-taking app, which allows to take pictures. For that I start an intent, that starts up the built-in camera-app. So far so good.</p>
<p>But when I show that image in my app, it's in a much smaller forma... | android | [4] |
4,179,645 | 4,179,646 | How do I make include use local directories in php | <p>I have created a function that uses images and such in a different directory but when i call for it using include it looks for the image in the directory where the include is located. What would i use so that the file is ran in the directory it is located and outputs the function in the new php script? </p>
| php | [2] |
3,763,677 | 3,763,678 | Custom Content Provider - openInputStream(), openOutputStream() | <p>The content provider / resolver APIs provide a complicated, but robust way of transferring data between processes using an URI and the openInputStream() and openOutputStream() methods. Custom content providers have the ability to override the openFile() method with custom code to effectively resolve an URI into a St... | android | [4] |
5,108,349 | 5,108,350 | How to save this string correctly? | <p>This is my code:</p>
<p>URL: </p>
<pre><code>http://www.mysite.com/t.php?title=The%20Police%20-%20Don't%20Stand%20So%20Close%20to%20Me%20'86%20-
</code></pre>
<p>PHP:</p>
<pre><code><?php if(!empty($_GET['title'])){ >
<form method="post" action="t.php?done=yes" enctype="multipart/form-data">
<inpu... | php | [2] |
3,615,615 | 3,615,616 | What additional attributes can I put in a <li> tag? | <p>I'm doing some jQuery magic and I need to tag a <code><li></code> to do something special. I can't use class or id due to certain other constraints. What other attributes can I put in there so jQuery can find the element?</p>
| jquery | [5] |
907,627 | 907,628 | Why I can delete property of global object in javascript? | <p>I'am novice in JS. While reading the book, I found that some examples do not work in firebug or maybe I simply don't understand something.</p>
<p>For example:</p>
<pre><code>>>> var a = 1;
undefined
>>> a
1
>>> this.a
1
>>> delete a
true
>>> a;
ReferenceError: a is not ... | javascript | [3] |
5,304,042 | 5,304,043 | What is the difference between a closure and an anonymous function in JS | <p>What is the difference between a closure and an anonymous function in JavaScript</p>
| javascript | [3] |
3,287,281 | 3,287,282 | jQuery "this" issue | <p>I am new to jQuery. I am trying to pass a value to a function.</p>
<pre><code><div class="the_service" id="ecommerce" onClick="javascript: gorightthere(ecommerce);">
function gorightthere(this){
var gothere = $('h2[name="'+this+'"]');
if (gothere.length){
$('html, body').animate({
... | jquery | [5] |
5,704,584 | 5,704,585 | How to get each value from a comma separated string in JavaScript? | <p>Lets consider I have a string called </p>
<pre><code>string s = "jpeg, jpg, gif, png";
</code></pre>
<p>So from this I need to get each one like, I can assign each extension to one var variable
such as </p>
<pre><code>var a = jpeg
var b = jpg
var c = gif
var d = png
</code></pre>
<p>Same way if I will add more e... | javascript | [3] |
4,837,751 | 4,837,752 | How to support multibyte characters in java | <p>I am having a issue in using a multibyte charater '나는내작품을사랑' these are displayed as '??????' ,i am using oracle mybatis procedure,spring .</p>
<p>Please let me know what has to be added to support multibyte ?</p>
| java | [1] |
5,317,323 | 5,317,324 | Porting c++ code from unix to windows | <p>Hi i have to port some stuff written on c++ from unix bases os to windows visual studio 2008.
The following code implements array data type with void ** - pointer to the data.</p>
<pre><code>
struct array
{
int id;
void **array; // store the actual data of the array
// more members
}
</code></pre>
<p>W... | c++ | [6] |
4,159,237 | 4,159,238 | connect with ftps using java | <p>I have problem,if you look at my previous question you understand what I mean
Then I used a transfer protocol of one company but it didn't work
So I want to know : How to connect to a remote server with FTPS using java ?
thanks!</p>
| java | [1] |
2,615,834 | 2,615,835 | is there any way to putting my custom buttons in one XML file in android? | <p>I'm developing an android application that contain many custom buttons. Do I need to make an .xml file for each one or there is a way of putting all of them in one .xml file?</p>
<pre><code><selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_pressed="true" android:d... | android | [4] |
1,541,696 | 1,541,697 | what's the directory of external storage on nexus LG | <p>The following code snippet is trying to store a <code>Gesture</code> object.</p>
<pre><code>private Gesture mGesture;
private GestureLibrary store;
store.addGesture("test", mGesture);
store.save();
</code></pre>
<p>I'm wondering where is <code>mGesture</code> stored?</p>
<p>Just followed by the above code, the au... | android | [4] |
4,769,968 | 4,769,969 | Create Forum Threads by sending SMS | <p>Maybe there is ready solution for any Forum where people can make Theread's in forum by sending sms.
User send sms-get code-make a forum thread.</p>
| php | [2] |
2,124,523 | 2,124,524 | Why do I have to cast 0 to byte when the method argument is byte? | <p>Why do I have to cast 0 to <code>byte</code> when the method argument is <code>byte</code>?</p>
<p><strong>Example:</strong></p>
<pre><code>void foo() {
bar((byte) 0);
}
void bar(byte val) {}
</code></pre>
<p>I know that if the argument is of type long I don't have to cast it, so I'm guessing that Java thinks... | java | [1] |
2,888,766 | 2,888,767 | Py2app compile app for older mac versions | <p>Hi, I'm developing a python program for mac, and I get an error when I try and use the application on an older version of Mac. For example, I'm developing on mac 10.8.2 and the application is not running on 10.7.*</p>
<p>Is there any way to compile the program (using py2app) so that it is compatible with older mac ... | python | [7] |
688,677 | 688,678 | How to i reset or stop my timer? | <p>I have used NSTimer in my app. I have kept a timer for 30seconds. After 30sec when i tell to play again the timer is getting reduced 2seconds interval. even though i invalidate and start... please help me..</p>
| iphone | [8] |
318,700 | 318,701 | PHP Parsing Email Message into Variables | <p>I am currently working on building a system for my client that could be classed as a type of ticket system. However, instead of users inputting tickets like a normal system, the tickets are received from a third party (always the same third party) in email format that will be piped in.</p>
<p>What I need to look at... | php | [2] |
1,265,923 | 1,265,924 | Android notification from web site | <p>On my website I have a form to put posts on <em>wall</em> by logged in users.<br>
I want the users to get notification in the Android app whenever a new post is posted.</p>
<p>Can anyone please suggest an idea for doing this?</p>
| android | [4] |
514,553 | 514,554 | C# Random Numbers | <p>Ok, So Im using <code>int indexSelector = RandomNumber(1, 14);</code> to create a random number and pull the matching index out of an array. But it seems to only be calling 3 or 4 numbers. Like the items being pulled out are very similar. </p>
<p>Whats going on?</p>
| c# | [0] |
3,029,581 | 3,029,582 | Create an iframe on button click with jquery? | <p>i have the following code</p>
<pre><code>var url = "url";
$('<iframe />', {
name: 'frame',
id: 'frame',
src: url
}).appendTo('body');
</code></pre>
<p>but when i click the button, nothing seems to happen</p>
| jquery | [5] |
4,659,064 | 4,659,065 | Python required variable style | <p>What is the best style for a Python method that requires the keyword argument 'required_arg':</p>
<pre><code>def test_method(required_arg, *args, **kwargs):
def test_method(*args, **kwargs):
required_arg = kwargs.pop('required_arg')
if kwargs:
raise ValueError('Unexpected keyword arguments: %s' % ... | python | [7] |
3,191,144 | 3,191,145 | Get detailed Network state i.e. finegrained sate/Detailed state in case of Network info | <p>I want to get access to Detailed state.</p>
<pre><code>ConnectivityManager cm = (ConnectivityManager) arg0.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo mi = cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
NetworkInfo.DetailedState d11 = mi.getDetailedState();
</code></pre>
<p>But i always get o... | android | [4] |
1,564,147 | 1,564,148 | How to change href of <a> tag on button click through javascript | <p>I want to change the href of <code><a></code> tag through javascript on button click.I m not find out any help regard this.Please help me asap.I shall be very thankful to you</p>
<pre><code> <script type="text/javascript">
function f1()
{
do... | javascript | [3] |
1,751,939 | 1,751,940 | How to image upload in Amazon s3 webservice using android? | <p>I need big help from you,I want to upload image using amazon s3 web service.I got bucket name,access key,secret key,I need help with How to implement code for upload images in amazon s3,i need sample code for that..</p>
<p>Thanks Friends </p>
| android | [4] |
1,650,503 | 1,650,504 | Get and validate string with pattern for a multiline string | <p>The string looks like this which is queried from a database:</p>
<p>
fname@site.com<br/>
Added description.<br/>
</p>
<p><hr/>
<p></p>
<p>I use this function to validate the email.</p>
<p>
<pre>
email_validator($email){
$pattern = "/^[a-z]+[a-zA-Z0-9]*[\.|\-|_]?[a-zA-Z0-9]+@([a-zA-Z]+[a-zA-Z0-9]*[\.|\-]?[a-z... | php | [2] |
3,991,617 | 3,991,618 | Adjust iPhone accelerometer sensitivity? | <p>Is it possible to adjust the sensitivity of the iPhone's accelerometer? I'm finding that it is too eager to switch back and forth between portrait and landscape mode, and am hoping that there is some way to adjust this.</p>
| iphone | [8] |
2,703,184 | 2,703,185 | Customize failure Text of Change Password Control | <p>Is there anyway to customize the literal that comes with the change password control?</p>
<p>Thanks</p>
| asp.net | [9] |
3,732,068 | 3,732,069 | javascript regular expressions for password | <p>i have to create a regular expression for password in java script with the following criteria
1. The password should contain atleast one alphabet either upper case or lower case
2. It should contain atleast one number
3. It should contain atlease one special character(`,~,!,@,#,$,%,^,&,*,_,+,=)</p>
| javascript | [3] |
4,115,937 | 4,115,938 | How does javac calculate public static final int NaN = 0 / 0? | <p>I wonder how javac calculates this constant expression? </p>
<pre><code>class Test {
public static final int NaN = 0 / 0;
...
</code></pre>
| java | [1] |
1,873,467 | 1,873,468 | PHP Write to file not writing to file | <p>I want my php file to write some text to a text file that I have created but nothing is being written to it.</p>
<p>Here is the code:</p>
<pre><code><?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
if (isset($_POST['comment'])) {
$comment = $_POST['comment'];
$myFile = "testFile.txt";
$fh = fope... | php | [2] |
3,689,418 | 3,689,419 | Why the following code doesn't compile? | <p>I have the following C++ code:</p>
<pre><code>#include <iostream>
#include <vector>
using namespace std;
class A
{
private:
int i;
public:
void f1(const A& o);
void f2()
{
cout<<i<<endl;
}
};
void A::f1(const A& o)
{
o.f2();
}
</code... | c++ | [6] |
5,362,369 | 5,362,370 | Assign different value if element exists | <p>I'm trying to assign one of two values to a variable, depending on whether an element is present or not. I thought something like this should work...</p>
<pre><code>$optsH = function(){
if ( jQ('#options').length > 0 ) {
return jQ('#options').outerHeight();
} else {
return 0;
}
}
</co... | jquery | [5] |
741,069 | 741,070 | Call a recursive function with different variables | <p>I am new to javascript. I am doing a feedback form where there are 12 radio buttons that need to get validated individually and a textarea will be displayed when I click a particular value.</p>
<p>Here, when I click that button, my textarea, which is in display, should be mandatory entered (eg: when I click fail op... | javascript | [3] |
3,575,443 | 3,575,444 | Lint and old API level warning | <p>I compile against Android 4.2 (API 17), in my Manifest I have:</p>
<pre><code><uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10"/>
</code></pre>
<p>In code I use:</p>
<pre><code>String first = sdf.format(new Date(context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstI... | android | [4] |
5,256,845 | 5,256,846 | How do I change the color in List simple_list_item_multiple_choice | <p>Hi I have a list with simple_list_item_multiple_choice layout. The list is all in white and my background is also white and hence it is not visible. How do I change the color for that?? </p>
<p>Thanks,
Prerna</p>
| android | [4] |
1,798,882 | 1,798,883 | dialog window with edittext closes when edittext is clicked | <p>I have a window that opens in a Dialog theme, which is how I want it to look. it's to update the title of a note (example)... so there is a text box and 2 buttons.</p>
<p>problem is as soon as I click on the edittext for the keyboard to show up the dialog window closes !!!!</p>
<p>this is the declaration I have in... | android | [4] |
3,638,589 | 3,638,590 | Jquery Hover image and Alt text - execution order? | <p>I've a very simple jQuery script to change an image and display the alt text when a thumbnail is hovered over.</p>
<p>Both image and Alt text display in the same div. The code works but the text displays before the image changes and so briefly resizes the div for long alt text:</p>
<pre><code>$("#thumbwrapper li i... | jquery | [5] |
863,888 | 863,889 | asp.net how to store text boxe values(tables) thru postbacks | <p>I have created a dynamic matrix display using asp:table/cell combination. and added a textbox displaying a value in each cell. at this point i am creating a view state, which sto res the complete table.</p>
<p>Now if i update the text boxes and click on save, i get the empty table(because of postback) and also the ... | asp.net | [9] |
2,744,857 | 2,744,858 | load html page in div tag using jquery dynamically | <p>Dynnamically load the html page inside div tag using javascript or Jquery.</p>
<pre><code><html>
<head>
<title>Untitled Document</title>
</head>
<script type="text/javascript">
$(document).ready(funtion(){
$('#btn').click(funtion(){
$('#div_content').html('C:/xampp/... | javascript | [3] |
4,648,656 | 4,648,657 | Best practice for denoting empty string - C# | <blockquote>
<p><strong>Possible Duplicates:</strong><br>
<a href="http://stackoverflow.com/questions/263191/in-c-should-i-use-string-empty-or-string-empty-or">In C#, should I use string.Empty or String.Empty or “” ?</a><br>
<a href="http://stackoverflow.com/questions/151472/what-is-the-difference-bet... | c# | [0] |
2,331,046 | 2,331,047 | which control should I Use for display like this format | <p>I want to display data in aspx page like this format.</p>
<p>Product Name Mobile<br>
Qty Rate: 100<br>
Unit Rate: 125<br>
A1 A2 A3 A4 Total</p>
<p>Red 10 20 30 40 100</p>
<p>Blue 10 20 30 40 100</p>
<p>Green 10 20 30 40 ... | asp.net | [9] |
3,885,377 | 3,885,378 | Problems getting even basic javascript to work [noob here] | <p>So I am trying to learn javascript. I've gone through a few tutorials and guides, however often they don't teach you how to write javascript to work with web pages. </p>
<p>What I want to learn how to do is provide some basic interactivity with websites I've been making recently. While they contain dynamic content,... | javascript | [3] |
603,430 | 603,431 | How can i get Ethernet Header in C#? | <p>I am using the following C# code for getting network packets.</p>
<pre><code>int len_receive_buf = 4096;
int len_send_buf = 4096;
byte[] receive_buf = new byte[len_receive_buf];
byte[] send_buf = new byte[len_send_buf];
int cout_receive_bytes;
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Raw, P... | c# | [0] |
5,995,701 | 5,995,702 | Why renderscript sample code doesn't work on emulator?(Android) | <p>I have tried to run the sample code of renderscript on emulator but it is not working I want to know can we run the renderscript sample on emualtor ? If not then why.</p>
| android | [4] |
585,300 | 585,301 | Keeping track of asynchronous calls | <p>I'm working on a Mozilla extension, and have a problem where I make n calls to an asynchronous function, that function is out of my control and it executes a callback on completion. In this callback, I need to take a special action if it's the n'th & final callback. I can't work out how to determine if a callbac... | javascript | [3] |
5,435,695 | 5,435,696 | Javascript: Accessing parent properties from inside nested function | <p>How to access <code>somevar:'this is Foo'</code> from inside <code>bar.foo()</code> ?</p>
<pre><code>function Foo(){
this.somevar='this is Foo';
}
Foo.prototype={
bar:{
somevar:'this is bar'
,foo:function(){
console.log(this);
}
}
}
var instance = new Foo();
instance... | javascript | [3] |
3,164,929 | 3,164,930 | scjp question ? what is Au exception here | <pre><code>11. public static void test(String str) {
12. if(str == null | str.lellgth() == 0) {
13. System.out.println("String is empty");
14. } else {
15. System.out.println("String is not empty");
16. }
17. }
</code></pre>
<p>And the invocation: </p>
<pre><code>31. test(llull);
</code></pre>
<blockquote>
... | java | [1] |
3,351,393 | 3,351,394 | ListView -Dynamic Controls and DataPager events | <p>I have a listView control which is bound to an object datasource. In the ListView1_ItemDataBound event, I am generating some dynamic controls. I do this because depending on a particular column value, i might need to generate textbox, radio button, check box etc. </p>
<p>Some code here:</p>
<pre><code> ListViewDa... | asp.net | [9] |
1,166,053 | 1,166,054 | jQuery - mouseenter works in chrome but not firefox | <p>I have this bit of jQuery: </p>
<pre><code>$('#list_cont').on('mouseenter', '.show_map', function() {
$(this).next('.map_cont').stop().fadeIn(800);
}).on('mouseleave', '.show_map', function() {
if (!$(this).next('.map_cont').is(':hover')) {
$(this).next('.map_cont').delay(600).stop().fadeOut(800);
... | jquery | [5] |
3,539,346 | 3,539,347 | Voltage and Temperature readout - Order of Magnitude issue | <p>I'm reading out several values using the <code>BatteryManager</code> including voltage</p>
<pre><code>int volt = intent.getIntExtra(BatteryManager.EXTRA_VOLTAGE, -1);
</code></pre>
<p>The problem is, that some devices return mV and others V (e.g. 5122 and 5).</p>
<p><strong>Question:</strong> Is there a way to re... | android | [4] |
2,521,210 | 2,521,211 | iphone programmatically read proxy settings | <p>I'm looking at adding proxy support to my <a href="http://www.benreeves.co.uk" rel="nofollow">iphone svn client</a>. When you set up a system wide vpn in the iphone settings you can add a global proxy. Is it possible for external apps to read this information through the api?</p>
| iphone | [8] |
1,077,618 | 1,077,619 | removefromsuperview problem | <p>when I call removeFromSuperview from my view.m file( <code>[self removeFromSuperview];</code> ), it seems working fine. but when I call that method from the view controller.m file<code>([self.view removeFromSuperview]</code>) it only returns error. I have no idea what is wrong about it.</p>
| iphone | [8] |
5,188,703 | 5,188,704 | Intercept delete button press - cancelling in confirmation does nothing | <p>I asked a similar question recently:</p>
<p><a href="http://stackoverflow.com/questions/9010830/i-want-to-intercept-a-delete-button-press">I want to "intercept" a delete button press</a></p>
<p>Basically I am trying to intercept a delete button press. I can get a confirmation using <code>confirm("Are you... | javascript | [3] |
666,700 | 666,701 | Accessing Hidden Field Value in Jquery | <p>My form looks like the following</p>
<pre><code><form class="search_results_section" method="post" name="MainForm" id="MainForm" action="/searchresults.asp" onsubmit="return OnSubmitSearchForm(event, this);">
<input type="hidden" name="Search" value="">
<input type="hidden" na... | jquery | [5] |
4,121,889 | 4,121,890 | iPhone web App Server connection | <p>I am developing an iPhone app which need connection to server to fetch huge data at regular interval.So need to know which way is better socket connection or using libXML </p>
<p>Thanks</p>
| iphone | [8] |
3,205,321 | 3,205,322 | Create a Count Up Timer in Javascript/Jquery | <p>Hey, I'm just wondering if someone could tell me, or point me in the right direction, on how to make a count up timer.</p>
<p>I'd like to have it constantly, from the second I put it into place count up saying the seconds, minutes, hours, days, and years.</p>
<p>Thanks!</p>
| javascript | [3] |
3,492,096 | 3,492,097 | how to install chinese simplified in keyboard in iphone | <p>I need to install chinese simplified in keyboard by xcode, please someone help me.</p>
| iphone | [8] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.