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,720,875
1,720,876
how to zip a text file
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1666824/net-zip-up-files">.Net Zip Up files</a> </p> </blockquote> <p>Hi,</p> <p>I am having a problem in creating a text file to zip file ,</p> <p>I am creating a project which reads data file and convert it ...
c#
[0]
4,766,228
4,766,229
Getting specific value from an array with PHP
<p>If I have an array in the following format: </p> <pre><code>Array ( [0] =&gt; stdClass Object ( [id] =&gt; 1 [c] =&gt; 1 [q] =&gt; value 1. ) [1] =&gt; stdClass Object ( [id] =&gt; 2 [c] =&gt; 1 [q] =&gt; value 2... </code></pre> <p>and I need to get </p> <blockquote> <p>value 1</p> </blockquote> <p>Shouldn't ...
php
[2]
3,912,615
3,912,616
c# Display the data in the List view
<pre><code>private void displayResultsButton_Click(object sender, EventArgs e) { gameResultsListView.Items.Clear(); //foreach (Game game in footballLeagueDatabase.games) //{ ListViewItem row = new ListViewItem(); row.SubItems.Add(game.HomeTeam.ToString()); ...
c#
[0]
1,075,491
1,075,492
All my code is being overwritten by the last section
<p>We have a map which uses polygons to create overlays on top of countries. When a user hovers over a country the polygons change color.</p> <p>When the mouse leave the country it changes back (or at least we want it to)</p> <p>Us the code below what happens is that that both countries access the settings for JUST t...
javascript
[3]
2,308,268
2,308,269
trying to create a jquery plugin for a custom check-box
<p>I am trying to create my own styled checkbox jQuery plugin. What I want to do is hide the check-box which is working and append a span after the check-box but the span is not adding after the check-box. Why is this?</p> <h2>SETUP</h2> <pre><code>var checkBox1 = $("&lt;input type='checkbox'/&gt;"); $(checkBox1).gen...
jquery
[5]
5,070,542
5,070,543
javascript function - return value chain
<p>I need to access local variable returned by function inside a chained function</p> <p>ex.</p> <pre><code>$("#history_table").bind("sortStart", function() { var a=30; return a; }).bind("sortEnd", function() { alert(a); }); </code></pre> <p>here in this example I need to access variabl...
javascript
[3]
5,516,659
5,516,660
How to encrypt and decrypt folder in android sdcard
<p>is it possible to encrypt the sd card folder r not please help me</p> <p>if it possible , what is the processor of encryption and decryption</p> <p>not possible , let me know what can i do for folder security in android sdcard </p> <p>My file is here :/mnt/sdcard/image1.jpeg.</p> <p>So How to encrypt this file ...
android
[4]
4,338,150
4,338,151
does nulling a System.Threading.Timer stop it?
<p>If I have an active <a href="http://msdn.microsoft.com/en-us/library/system.threading.timer%28VS.90%29.aspx" rel="nofollow">System.Threading.Timer</a> and I set it to null, is it stopped?</p> <p>I realize that it is more proper to call <code>.Dispose()</code> but I would like an answer to the question as written.<...
c#
[0]
1,367,121
1,367,122
isNaN not firing until 2 characters are typed in
<p>My HTML code is:</p> <pre><code>&lt;input onKeyPress="validateA(this.value)" type="text" id="AAA" name="AAA" size="10" placeholder="A"&gt; &lt;span id="aspan" class="validate"&gt; &lt;/span&gt; </code></pre> <p>and my Javascript is:</p> <pre><code>function validateA(valueOfAAA) { if (isNaN(valueOfAAA)) { doc...
javascript
[3]
1,776,958
1,776,959
Error: NetBeans 7.0 Android SDK 14
<p>I am getting the following error on NetBeans 7.0 trying to run a HelloAndroid application. The Android SDK as well as an Android device have already been detected by NetBeans, and I followed all the instructions given.</p> <blockquote> <p>C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:421: Android...
android
[4]
24,345
24,346
jquery gt() get current index
<p>I'm using <code>gt()</code> to add columns to a table.</p> <p>I need to use the row number and the column number to build the cell id.</p> <p>Getting the column number is straightforward:</p> <pre><code>var c = $("#gridLayout tr:first td").length; </code></pre> <p>but how can I get the current index from gt() fo...
jquery
[5]
2,588,849
2,588,850
Not seeing Nexus7 in Eclipse's Android Devices
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/8801829/adb-dosnt-recognize-my-galaxy-nexus-win7">ADB dosn&#39;t recognize my Galaxy Nexus - Win7</a> </p> </blockquote> <p>I'm not seeing my Nexus7 listed in Eclipse's DDMS Devices.</p> <p>DDMS and "adb device...
android
[4]
5,876,133
5,876,134
Why is my script only running every few page loads?
<p>I find that my script can sometimes run only after 2 or 3 page loads, sometimes it runs without issue, but after 2 or 3 successful loads it will go back to only running the script sometimes.</p> <p>For compression, here's my script on pastebin: <a href="http://pastebin.com/hyQ1uN9Y" rel="nofollow">http://pastebin.c...
php
[2]
4,000,262
4,000,263
Why doesn't ScheduledExecutorService spawn threads as needed?
<p>In my application I use ScheduledExecutorService, but only one thread is spawned to handle the scheduled tasks. Is this because ScheduledExecutorService does not spawn threads to handle the pending tasks?</p> <p>Here is a code snippet that will output only "run() 1" instead of the expected "run() 1" followed by "r...
java
[1]
975,742
975,743
What question should be asked to test the interview candidate's knowledge of references in C++?
<p>If a candidate says that his knowledge in C++ is 7/10 and you want to test his knowledge of references in C++, what question will you ask?</p> <p>I thought of the following:</p> <ol> <li>Write a function declaration that takes a pointer as reference with default values and ask him to figure out a mistake and expla...
c++
[6]
4,328,726
4,328,727
how to get enter row values value from JSGrid in a row when ever user updates the exsisting column values
<p>can any one suggest how to get enter row values value from JSGrid in a row when ever user updates the exsisting column values.</p> <hr>
javascript
[3]
562,508
562,509
CGContext - PDF margin
<p>I am showing PDF content on a view using this code using Quartz Sample:</p> <pre><code> // PDF page drawing expects a Lower-Left coordinate system, so we flip the coordinate system // before we start drawing. CGContextTranslateCTM(context, 0.0, self.bounds.size.height); CGContextScaleCTM(context, 1.0, -1.0); /...
iphone
[8]
2,891,115
2,891,116
How to clear Activity Stack on Button Click in Android
<p>I have a question that I have a logout button in my App on which we have called an App login Screen but at this point when user press the Back Button of Android Phone, he entered in the App again without Authentication, which is not desirable. I want when we click on Logout button All previous Activity Stack being c...
android
[4]
5,283,526
5,283,527
using broad cast receiver along with activity
<p>i am working on a project with many activities but when trying to code a broad cast receiver within a class the broadcast receiver is not working though i have given permission to manifest file. with reciver.</p> <pre><code>&lt;receiver android:name=".IncomingCallReciever" android:exported="true" android:enabled="t...
android
[4]
3,254,052
3,254,053
How can i get Client Webpage cookie information through javascript
<p>I want to get the browser cookies information like email or name. </p> <p>pls help me</p>
javascript
[3]
4,778,169
4,778,170
Cannot declare ViewHolder as static inner class
<p>In my application, I am using a listview and have customized the associated array adapter by extending the standard the array adapter.However,inside the extended adapter, I am unable to declare the viewholder as a static inner class. Eclipse keeps giving the error that "static types can only be declared in static or...
android
[4]
4,267,248
4,267,249
how to read a textbox value excluding commas using jquery
<p>My requirement is to read a textbox value with a currency formatted number. eg: 3,500</p> <p>How to read the textbox value excluding comma in the number? Can anyone please help me in doing this using jquery?</p>
jquery
[5]
4,213,362
4,213,363
How to access a static member through a Class object
<p>I'd like to access a static HashMap object on one of my classes. This psuedocode illustrates how I'm attempting to go about it.</p> <pre><code>public Class A { public static HashMap&lt;String,String&gt; myMap; static { myMap.put("my key", "my value"); } } ... public void myfunction(Class clazz) { HashMap&lt;...
java
[1]
826,602
826,603
How can i use Table Cell as UIImageView not using Custum Cell?
<p>In My Application I have to show Image after every 3 Rows.My Image is static and it should come after every 3 rows.I don't want to take UIImageView and add it to cell but if there any way to show my image using directly Cell's property.My Image size is 320X87 pixels. </p>
iphone
[8]
1,867,258
1,867,259
Activate the event handler of an HTML element created with MooTool's extended element
<p>In browsing a JavaScript file, I see the following line:</p> <pre><code>this.close = new Element('a', {id:'close-btn', href: 'javascript:void(0);', 'class': this.typeprefix + '-deletebutton', events: {click: this.remove.bind(this)}}).inject(this.bit); </code></pre> <p>I'm guessing that new Element() is a MooTools ...
javascript
[3]
5,288,328
5,288,329
Detecting key presses in console
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/8898182/how-to-handle-key-press-event-in-console-application">how to handle key press event in console application</a> </p> </blockquote> <p>a simple question.</p> <p>I am writing a simple text based adventure ...
c#
[0]
2,530,926
2,530,927
Android: UI design for calendar
<p>I am planning to develop a calendar UI with time displayed horizontally and date vertically. Please refer the image below:</p> <p><a href="http://i54.tinypic.com/a2uiw8.png" rel="nofollow">http://i54.tinypic.com/a2uiw8.png</a></p> <p>The following is my design requirement for the above attached UI design:</p> <ol...
android
[4]
4,395,334
4,395,335
How to check if a word exists in a text file using Python 3.3
<p>The program is used to find anagrams for a inputted string. The possible anagrams come from a text file 'dict.txt'. However, I am trying to check if the inputted string is not in the dictionary. If the inputted string is not the dictionary, the program should not look for anagrams, and just print a message saying th...
python
[7]
1,768,781
1,768,782
Understanding prototype method calls
<p>In trying to call a method on the <a href="http://marijn.haverbeke.nl/codemirror/manual.html" rel="nofollow">CodeMirror</a> javascript code editor. I'm new to javascript and trying to understand how object oriented stuff works. I'm having problems calling what I believe are methods. For instance,</p> <pre><code>...
javascript
[3]
2,903,641
2,903,642
Name 'variable_name' used both as a parameter and as a global. How to fix?
<p>The code I am working with is</p> <pre><code>build_data = {} # Code that adds data to build_data build_data_filtered = {} if flag: # Code that adds subset of build_data to build_data_filtered global build_data build_data = build_data_filtered </code></pre> <p>The line "global build_data" shows a co...
python
[7]
1,866,573
1,866,574
What does it mean "weakly-referenced object no longer exists"?
<p>I am running a Python code and I get the following error message:</p> <pre><code>Exception exceptions.ReferenceError: 'weakly-referenced object no longer exists' in &lt;bound method crawler.__del__ of &lt;searchengine.crawler instance at 0x2b8c1f99ef80&gt;&gt; ignored </code></pre> <p>Does anybody know what can it...
python
[7]
5,821,179
5,821,180
create object from Form without Ref
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/78536/cloning-objects-in-c-sharp">Cloning objects in C#</a> </p> </blockquote> <p>My code :</p> <pre><code>private void button1_Click(object sender, EventArgs e) { CopyForm(new Form1()); } public void Copy...
c#
[0]
5,510,364
5,510,365
How to round to nearest Thousand?
<p>How Do I round a number to its nearest thousand?<br> <br> function round($var){<br> // Round it <br> }</p>
php
[2]
54,580
54,581
finding the request on a port
<p>how i can write a java program to find the total number of requests which can be found on a particular port with complete specification (request at present,request running &amp; request pending?</p>
java
[1]
1,698,433
1,698,434
adding a uiTableView in landscape mode as a modalView
<p>I am having a UITabBarController set up with many views, In one of the views , i have a UIbUTTON. On clicking this button or on a rotate , I wanted a landscape modal view controller having a tableViewController to popup. </p> <p>Inside the modalviewController , on rotating to portait mode , it shud return back to t...
iphone
[8]
1,773,461
1,773,462
Send mail From Localhost using PHP
<p>how to send Mail from localhost using PHP?</p> <p>sending mail from localhost to remote server</p> <p>i am using wamp server,OS windows Xp.</p> <p>can anyone tell me about this issue</p> <p>thank u in advance</p>
php
[2]
2,643,891
2,643,892
Animation breaking on rapid button click
<p>So i have a slider (which is very buggy a WIP) but if i was to hammer (a british term for spam) one of the two navigational buttons the slider seems to breaks.</p> <p>I think the example should speak for itself.</p> <p><a href="http://jsfiddle.net/xavi3r/aZkPZ/" rel="nofollow">http://jsfiddle.net/xavi3r/aZkPZ/</a>...
jquery
[5]
310,405
310,406
Closest to “Mathematica Graphics[]" drawing environment for Python
<p>Being only familiar with Mathematica and its Graphics, I have now to learn to draw Graphics using Python for a server.</p> <p>Mostly conditional combination of simple shape.</p> <p><strong>What would be a package for Python that make drawing Graphics as close as possible as the Mathematica Graphics environment ?</...
python
[7]
3,921,345
3,921,346
in java how to avoid multiple if else with map for isAssignableFrom
<p>I would like to avoid the if else, in java this:</p> <pre><code> for (Class clazz : method.getParameterTypes()) { if (SomeClass.class.isAssignableFrom(clazz)) { arguments[i] = onearg; } else if (SomeOtherClass.class.isAssignableFrom(clazz)) { arguments[i] = someotherarg; } } </code></pre> <p...
java
[1]
2,821,341
2,821,342
trimming the string
<p>I have java String of say length 10 .Now i want to reduce it to lenthg of 5 .Is there something i can do like we do in C as shown below</p> <pre><code> str[6] = '\0' ; //insert null at 6th place so remaining string is ignored. </code></pre> <p>I dont want to use inbuilt API of java to do this.The main problem th...
java
[1]
3,893,457
3,893,458
Binding more click events on body will affect application the performance?
<p>My web app has many jquery custom components, in which most of them needs outside(body click) click to hide them. So the body have many click events with different namespace. Today my superior told me that application becomes slow (I have recently added some body click events) </p> <p>Binding many click events wil...
jquery
[5]
3,709,859
3,709,860
Replace strings possible with output of PHP file_get_contents?
<p>I'm using PHP to get content from an external website.</p> <p>I want to know if it's possible to find and replace strings from the output so I can make all links absolute.</p> <p>I need to convert "/ and '/ to "$url/</p> <p>If it's possible to do that, I can figure out how to do the rest. I don't know if it's pos...
php
[2]
642,608
642,609
Checkable ImageView
<p>Does anybody know if it possible to make ImageView checkable. I try to use State-list drawable resource in my project where I define pictures for my ImageView check states, but there is no property to make ImageView checkable, only clickable.</p> <p>Maybe anybody knows a way to solve this problem? </p>
android
[4]
2,355,023
2,355,024
Broken ... System Image for Android in SDK Manager
<p>I notice the following in my Android SDK Manager:</p> <pre><code>Broken Intel x86 Atom System Image, API 16 Broken Mips System Image, API 16 Broken ARM EABI v7a System Image, API 16 </code></pre> <p>Where should I store my System Image for the above in which folder inside android-sdk to get rid of the "Broken" err...
android
[4]
5,531,083
5,531,084
Android Gesture Prediction Score Range
<p>I'm working on a game for Android that uses gestures as input. I've got a working demo, but the gesture recognition seems a bit too liberal (e.g. there are many false positives), and as I'm considering a gesture library of 30 or so, this will be more of a problem as I add in new gestures.</p> <p>The official docume...
android
[4]
923,098
923,099
How to handle listView item changes in managed option menu dialogs?
<p>I create a dialog in my activities <code>onCreateDialog</code> method like this</p> <pre><code>ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this, android.R.layout.select_dialog_item, android.R.id.text1, items); dialog = new AlertDialog.Builder(this).setTitle(R.string.dialogTitle).setA...
android
[4]
4,795,845
4,795,846
When I try calling the bubbleSort method within the class I get "itemsPriority can not be resolved to a type."
<p>As a part II to an assignment I must implement a sort method (I've chosen a bubbleSort) to sort an array of priorities from user input. In my previous part I program I accomplished this without a sort, by keeping track of what index the priority was assigned to. </p> <p>I've been trying to implement a bubblesort in...
java
[1]
5,757,992
5,757,993
When does a class unload from heap memory
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/148681/unloading-classes-in-java">Unloading classes in java?</a> </p> </blockquote> <p>When does a class unload from memory?</p> <p>For loading a class we can call <code>Class.forName("NameOfClass");</code> or ...
java
[1]
904,674
904,675
python if file does not exist fails
<p>so I have a loop that checks folder if it contains *.zip file</p> <pre><code>for file in glob.glob( os.path.join(rootdir, '*.zip')): print "zip", file #Check if file does not exist if not os.path.exists(file): print "No files" #return else: some co...
python
[7]
4,278,900
4,278,901
jQuery: How to get only direct text without tags (in HTML)
<p>I've got an HTML:</p> <pre><code>&lt;strong&gt;1)&lt;/strong&gt;TEXT THAT I ONLY NEED&lt;p&gt;some par&lt;/p&gt;&lt;ul&gt;..&lt;/ul&gt; </code></pre> <p>I need only <strong>"TEXT THAT I ONLY NEED"</strong> that is not withing any tags in his HTML, how can I get it with jQuery?</p> <p>Thanks.</p>
jquery
[5]
45,568
45,569
Gallery image display
<p>I am very new to android platform. I am calling this method <code>ga.setSelection(1);</code> in my <code>onCreate()</code> method. After running my application first image is focused but I want focused image and also display the same time. Can anybody please tell me how to display the image in gallery view?</p> <p...
android
[4]
5,091,595
5,091,596
How to select all form elements?
<p>I usually just do this:</p> <pre><code> $("#formid input, #formid select, #formid textarea") </code></pre> <p>But is there any shorthand for this, like..</p> <pre><code> $("#formid All-Form-Elements") </code></pre> <p>?</p>
jquery
[5]
5,695,970
5,695,971
How can I use the camera in Droid X by Android application
<p>In my two to three application I have to used camera activity from application. User taken the picture using camera and set that image on image View.</p> <p>It works for all devices excepting Droid X. When the user takes the picture from Droid X mobile, application is forced close.</p> <p>Here is my code for star...
android
[4]
203,146
203,147
In app billing - handling IN_APP_NOTIFY
<p>I'm implementing in-app billing for android and I had a question about handling the IN_APP_NOTIFY intent. Is there a way to determine what original request triggered this intent? As an example, if I send multiple requests to the Market service, how would my BroadcastReceiver know which request triggered the intent? ...
android
[4]
1,298,628
1,298,629
Receiving Memory Warning Level =1, Level =2 And Then Crashes
<p>I am Trying To Develop An TilesGame And I Am At The Last Stage. But My Project Begin to Show Unexpected Behaviors. At Random Times It Shows Memory Warning Level =1, Level = 2 and Then, Program received signal: “0”. Data Formatters temporarily unavailable, will re-try after a 'continue'. (U...
iphone
[8]
2,550,557
2,550,558
Set all properties of same name recursively
<p>I have an <code>IsDirty</code> property of type <code>bool</code> on most of my objects.</p> <p>My base object is called <code>Client</code>, but contains several inner collections e.g.: <code>Client.Portfolios.Policies.Covers.CoverOptions</code>, each object type has an <code>IsDirty</code> property:</p> <ul> <li...
c#
[0]
1,438,764
1,438,765
Parsing pakage error in android when install 2.3.4 android device
<p>When i install the apk in android 2.3.4 device it shows "Error on package parsing"application developed on android 2.2 version.How can i install this app into 2.3.4 device?</p>
android
[4]
3,663,983
3,663,984
Detect that an option (any) has been selected
<p>I'm wondering how to throw an alert when i select an option of a select. <a href="http://jsfiddle.net/v4ep2/" rel="nofollow">This</a> is my try:</p> <p><strong>HTML</strong></p> <pre><code>&lt;select id="provinces"&gt; &lt;option&gt;aaa&lt;/option&gt; &lt;option&gt;bbb&lt;/option&gt; &lt;option&gt;ccc&...
jquery
[5]
5,942,070
5,942,071
how to lauch an 3rd application automatically when the android phone is switched on
<p><br> can any one tell me "how to lauch an 3rd application automatically when the android phone is switched on?". As I want to launch an application which is written by me when the device is turned on.<br> I will be waiting for any valuable reply . <p>Thanks in Advance,</p>
android
[4]
2,107,096
2,107,097
Why extend Exception class?
<p>I've encountered a class which extends Exception : </p> <pre><code>public class MyException extends Exception { public MyException() { super(); } public MyException(final String argMessage, final Throwable argCause) { super(argMessage, argCause); } public MyException(fi...
java
[1]
3,142,971
3,142,972
Apply class to TD if it has a rowSpan attribute
<p>Looking for a really simple way in jQuery to add a class to a TD when it has the rowspan attribute.</p> <p>Any ideas?</p>
jquery
[5]
3,757,845
3,757,846
Random crash on access to my std::list<string> object
<p>I have been getting random crashes when trying to access my <code>std::list<code>&lt;string&gt;</code></code> object and can't figure out why it happens.</p> <p>I started out with an extern <code>vector<code>&lt;string&gt;</code></code> object but I've created a class for accessing it now, use a list instead (not t...
c++
[6]
4,399,176
4,399,177
Can I un-singleton a singleton
<p>I want to use a library that makes heavy use of singletons, but I actually need some of the manager classes to have multiple instances. The code is open source, but changing the code myself would make updating the lib to a newer version hard.</p> <p>What tricks are there, if any, to force creation of a new instance...
c++
[6]
1,771,928
1,771,929
exe creator software for php
<blockquote> <p>I want to know exe creator software for php. which software is useful for creatibg exe file. my requirement is :</p> </blockquote> <p>1.it create php setup,<br> 2.create shortcut,<br> 3.install apache and mysql and start mysql and apache server,</p> <p>Thanks in advance.</p>
php
[2]
3,494,832
3,494,833
Problem with my method in C++
<p>I have a class like so:</p> <pre><code>class Qtree { public: Qtree(); Qtree(BMP img, int d); private: class QtreeNode { public: QtreeNode* nwChild; // pointer to northwest child QtreeNode* neChild; // pointer to northeast child QtreeNode* swChild; // pointer to southwest child ...
c++
[6]
5,415,674
5,415,675
Swap two elements of map
<p>I have a <code>map&lt;int, Button*&gt;</code> wherein the button class has several attributes, in particular a integer variable named position. </p> <p>If I want to swap two positions in Button class, I have to change the key, to be always key = Button-> position and it has to be a map.</p> <p>I thought of deletin...
c++
[6]
3,088,262
3,088,263
PHP fails silently when function not defined?
<p>I am migrating from PHP4 to PHP5</p> <p>I have this in my .htaccess:</p> <pre><code>php_flag display_errors on php_value error_reporting 2039 </code></pre> <p>Which used to show all errors.</p> <p>I am still getting some errors but I used to get an error when I called a function that was not defined, but now it ...
php
[2]
5,117,386
5,117,387
C++ lvalue required as unary '&' operand
<p>I'm working on a game engine and working on implementing a state design. I have an Engine class which takes care of all the initialization of everything and contains the game loop which calls update, render and handle input functions of the active state.</p> <p>All my different states inherit from State which requi...
c++
[6]
3,464,233
3,464,234
Iterative in order over Counter object
<p>I have a Counter object that looks like this:</p> <pre><code>counts = Counter({'foo': 10, 'baz': 5, 'biff': 3, 'bonk': 1}) for k, v in counts.items(): print k, v bonk 1 foo 10 baz 5 biff 3 </code></pre> <p>What is the best way to iterative over the Counter object by descending frequency of t...
python
[7]
5,313,466
5,313,467
Is there a way i can assign the value shown by the date picker widget to a variable of type "Date"?
<p>I'm creating an app for the android OS that allows the user to pick a Date. I want to be able to store the date the User picks in a mm/dd/yy form . I know there is a variable type called date. How do i assign the value shown by the picker to the date variable ?</p>
android
[4]
824,191
824,192
javascript creating multi-dimensional array syntax
<p>Today I've heard that it's possible to create a multi - dimensional array in js using this syntax:</p> <pre><code>var a = new Array(3,3); a[2][2] = 2; alert(a[2][2]) </code></pre> <p>However this doesn't work in opera. Am I wrong somewhere?</p>
javascript
[3]
1,011,035
1,011,036
How to unit test an helper function that use HTTPConnection
<p>I have written a <strong>helper function</strong> that can retrieve content from a url. This function can also parse a <code>Map</code> of parameters and feed a url or a body on request depending on <code>GET</code> or <code>POST</code> method. Let's say this function also do other things (change headers, cookies et...
java
[1]
3,869,552
3,869,553
Check the dates in JavaScript
<p>I want to check two dates in java script. date format is YYYY-MM-dd.</p> <pre><code>var date1 = 2011-9-2; var date1 = 2011-17-06; </code></pre> <p>Can anybody say how can I write condition?</p>
javascript
[3]
2,652,245
2,652,246
looping through php array
<p>Can someone explain the logic behind this for loop... I just don't get it on how it goes into the next element, that <code>$from[$i]</code>, what is it doing? </p> <pre><code>$start = 2; $path = array(); for (; $i != $start; $i = $from[$i]) $path[] = $i; </code></pre>
php
[2]
1,039,338
1,039,339
how can I read the document using php and store database in mysql with linux?
<p>How can I read a Word document using PHP and store it in a MySQL database on Linux?</p> <p>I'm using Ubuntu and PHP5.</p>
php
[2]
3,799,491
3,799,492
Using the HTTP Accept Header from JavaScript
<ul> <li>I have a web service that performs a database search. It accepts both GET and POST requests, and can return data in either JSON, CSV, or HTML format based on the HTTP <code>Accept</code> header.</li> <li>I have a web page that makes an Ajax request to this web service, and displays the search results.</li> <l...
javascript
[3]
1,104,955
1,104,956
How really 'import' works in Python?
<p>I can't wrap my head around how 'import' statement works in Python. </p> <p>It is said to search for the packages in directories returned by <code>sys.path()</code>. However, even if <code>sys</code> module is <em>available</em> automatically in every Python program it's not <em>imported</em> automatically. So does...
python
[7]
5,606,779
5,606,780
Webservice error 401 returned from webservice called from javascript
<p>I am having a wsdl file in my application server along with swf and javascript. We call a javascript method and from Javascript we call webservice using soap. The http request has been sent with credentials. It works fine and we get data for a while and after sometimes it returns 401 error. When we use different va...
javascript
[3]
4,101,264
4,101,265
Implementation of PUSH Technology in IPhone OS
<p>I had to make use of PUSH TEchnology in my IPhone app. I am very new to this. Can any one suggest me how to start up the things. I would be very thankful if i can get some sample codes for reference. Thanks in advance... </p>
iphone
[8]
3,391,141
3,391,142
Is this an ok use of the comma operator
<p>I've seen other posts in stackoverflow that highly discourage overloading of the comma operator. I was sent a github pull request with comma operator overload, that looked something like the following</p> <pre><code>class Mylogger { public: template &lt;typename T&gt; Mylogger &amp; op...
c++
[6]
4,671,058
4,671,059
android edittext
<p>I have one edittext EditText et1=(EditText)findViewById(R.id.EditText01);</p> <p>when i want to clear edittext i use et1.setText(""); but if i have to clear edittext one by one character from the last for this i have no solution can u pls give me solution</p>
android
[4]
3,397,113
3,397,114
How to avoid "ls: write error: Broken pipe" with php exec
<p>I'm having an error that causes me a very big waste of time. This is the line:</p> <pre><code> exec ("ls -U ".$folder." |head -1000", $ls_u); </code></pre> <p>This command runned on my shell needs less than a second, launched by php (direct from console, not throw apache) needs more than 15 seconds and I get this ...
php
[2]
830,764
830,765
AspxGridView visiblerowcount
<p>I have one nested aspxgridview in aspxpagecontrol. When I click on some button I want to get number of rows in grid. That's ok. But When I use filter and get no rows in grid, click on some button, I'm still getting 1000 rows, but no row is visible.</p> <p>I don't know, where is the problem :/</p> <p>Thanks.</p>
asp.net
[9]
3,439,822
3,439,823
get the value undefine on onkeyup when used setTimeout function
<p>i have call function on onkeyup event of textbox which pass the data using ajax.below is sample code of my function which in .js file.</p> <pre><code>var timeout; function testfont(id,image) { alert('image');//when alert here it shows value clearTimeout(timeout); timeout = setTimeout( function() { ...
javascript
[3]
3,734,224
3,734,225
Error in Thread Resuming after it is put to sleep
<p>Hello i am having a problem with resuming a thread my code is </p> <pre><code> public boolean Wait(String Reply){ if (Reply.equalsIgnoreCase("Y")){ try { t.resume(); } catch (Exception e){ System.out.println("\n" + "The exception in resu...
java
[1]
343,504
343,505
How to get the name of calling activity?
<p>I want to retrive the name of the calling activity for checking some conditions.. What will be the solution?</p>
android
[4]
5,818,903
5,818,904
Getting position number from an array
<p>If I have the following array in session, can I get a item position number in each [cat]:</p> <pre><code>Array ( [0] =&gt; stdClass Object ( [id] =&gt; 1 [cat] =&gt; 1 [que] =&gt; Description here. ) [1] =&gt; stdClass Object ( [id] =&...
php
[2]
4,812,537
4,812,538
Error: "missing } in XML expression"
<p>my date time picker JavaScript giving the following error ...please resolve my problem following is my code</p> <p>// JavaScript File</p> <pre><code>function SetDate(dateValue) { // retrieve from the querystring the value of the Ctl param, // that is the name of the input control on the parent form // tha...
javascript
[3]
3,167,764
3,167,765
Basic auth (like apache's .htaccess) using php, how?
<p>How can I implement basic auth using php? Is it possible?</p> <p>Thank you</p>
php
[2]
2,015,515
2,015,516
Does List and dictionary in python have a limited capacity ? if yes,how much is it?
<p>Does List and dictionary in python have a limited capacity ? if yes,how much is it ?</p>
python
[7]
4,573,582
4,573,583
How can I create a notification which pops up on home screen at a regular time?
<p>I want to create a notification system which popsup on home screen and a text is shown. If we click on the notification the app is shown on the foreground. This notification must be poped at a given time period.Is this possible help plz?</p>
android
[4]
3,331,801
3,331,802
How well is insertAdjacentHTML supported?
<p>I recently discovered the <code>insertAdjacentHTML</code> method and it's a god-send. Being such I wanted to know how well this method is supported. Does IE have it? What about Chrome?</p>
javascript
[3]
2,642,869
2,642,870
How to strip this part of my string?
<pre><code> $string = "Hot_Chicks_call_me_at_123456789"; </code></pre> <p>How can I strip away so that I only have the numberst after the last letter in the string above?</p> <p>Example, I need a way to check a string and remove everything in front of (the last UNDERSCORE FOLLOWED by the NUMBERS)</p> <p>Any smart s...
php
[2]
4,886,051
4,886,052
How to insert page loading code on my aspx page?
<p>I prepared a ASP.NET web site. But it contains lots of flash controls. When you enter the page, some flash controls can't load but page is opening.So flash parts are shown not well.</p> <p>To solve this problem, I want to add a page loading code on the aspx page.An image or a gift is illustreted until the page full...
asp.net
[9]
919,221
919,222
How to remove black border from AlertDialog builder
<p>Actually i have created an custom dialog using AlertDialog.builder.In this dialog i am not displaying the titile.All works fine but there is an black border appear in the dialog.so can anyone tell me how can i remove this black boder.The code and screenshot are below.</p> <p><strong>code in java:</strong></p> <pre...
android
[4]
1,231,458
1,231,459
scandir outside web tree using PHP5
<p>I'm looking for a way to get directory listing for files that are outside the webserver's tree, for example i want to list all files and folders under '/home' directory and put them in an array (just as scandir does).</p> <p>I can 'sudo su' to a user that has rights to check the directory content but i don't know h...
php
[2]
6,033,416
6,033,417
using only one button to play and pause a Mediaplayer in Android
<p>I am new to Android, my requirement is to use only one button for playing and pause using media player class?</p>
android
[4]
2,085,819
2,085,820
looping through fusiontable results
<p>I would like to read some data from a GoogleFusion table and then use the results, being new to javascript, I would like to understand how to expose the results so that I can use it globally, here is what I have so far:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;meta charset="utf-8"&gt; &lt;head&gt; &lt;script sr...
javascript
[3]
679,274
679,275
jquery display floating div
<p>When the user hovers over a specific element, I wish to display a div (up and to the right) that they can click to popup a dialog. The div would appear almost like a tooltip. The div would disappear when they hover away.</p>
jquery
[5]
1,555,820
1,555,821
get height of a div and set the height of another div using it
<p>I have two divs, neither have a height set in css, as I want to take whatever height they end up as and set the other div to be that height.</p> <p>The javascript I have is this</p> <pre><code>function fixHeight() { var divh = document.getElementById('prCol1').height; document.getElementById('prCol1').inne...
javascript
[3]