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
2,723,377
2,723,378
How to hide all tabs on default with jQuery accordion?
<p>I have implement Jquery accordian in my wesbite as shown <a href="http://jqueryui.com/accordion/#collapsible" rel="nofollow">here</a>. I have enabled collapsible which allows me to collapse all tabs. But I'd like all tabs to be closed by default. Currently the first tab is open by default. How do I do that?</p>
jquery
[5]
3,037,140
3,037,141
Download files in queue in Android
<p>How do I download multiple files in a queue one by one! I'm using <a href="https://github.com/umeng/android_download_manager" rel="nofollow">this</a> as a sample code, since. I would be passing the URLs to download in Strings from my local DB dynamically.</p> <p>Please let me know how to do that. I want the downlo...
android
[4]
4,934,251
4,934,252
Access Windows mobile Address book
<p>What is the code for accessing contacts from address book in windows mobile application when the contacts are stored into the windows mobile address book?</p> <p>I tried:</p> <pre><code>(Microsoft.WindowsMobile.PocketOutlook.OutlookSession ss = new OutlookSession()) { ContactCollection mobilePhoneBook = ss.Con...
c#
[0]
3,768,372
3,768,373
Create an if statement with these ifs
<p>I am designing a social network site and am adding the final piece to the puzzle. It is regarding the buttons, Unfriend and Add Friend. And when the Session matches the ID, they shouldn't appear.</p> <p>The Unfriend button appears when it is needed. And so does Add Friend to an extent it works as well for my profil...
php
[2]
287,855
287,856
Javascript: nested loops?
<p>I'd like to achieve an animation/sequence like this:</p> <p>the animation starts with a loop (imagine a <strong>car</strong> moving from x1 to x2) then a pause of 1 second then again the animation (imagine a <strong>car</strong> moving from x2 to x3 etc) </p> <p>the <strong>car</strong> loop is achieved adding 1px...
javascript
[3]
1,394,691
1,394,692
Why does my web site prompt for a username password when custom errors mode is on
<p>While navigating my site with custom errors mode set to off it behaves normal. If I turn I turn custom errors mode to on, then my first visit to the site prompts me with a username password dialog box. </p> <p>The entire site is enforced with SSL if that matters. Where should I start looking? Is this possibly an II...
asp.net
[9]
623,399
623,400
Google Drive API Error "The authenticated user has not installed the app" in android
<p>I'm trying to use Google drive api in android application, I'm using "google-api-java-client", from this library I've imported libs which are specific to android, also registered project to Google api console for Google drive api &amp; I'm able to do user authentication using OAuth2.0. But when executing insert htt...
android
[4]
890,552
890,553
list view instead of filling whole screen
<p>I have trying to create a list with items. I do not want the list will fill the whole screen. I really tries to create a list its width and height will be nearly equal size of the longest list item and number of items on the list respectively. In other words; </p> <p>if I have one item, on android I will see </p> ...
android
[4]
1,902,458
1,902,459
java.lang.NoClassDefFoundError: BoothServer
<p>I'm following this tutorial <a href="http://stilius.net/java/java_ssl.php" rel="nofollow">http://stilius.net/java/java_ssl.php</a> to create simple SSLServer and client sockets. I've created the certificate using keytool but I've a problem executing this line from the above tutorial, </p> <p>"java -Djavax.net.ssl.k...
java
[1]
3,383,156
3,383,157
How do I wait during application startup until WIFI connects?
<p>Like many apps my app depends on WIFI and Http Connection to operate. What I am not clear on is how I can time a wait until WIFI is enabled AND device is attached to WIFI network is. What is the best way to delay on application startup long enough for this to happen? during this time I would for example keep butto...
android
[4]
600,741
600,742
How can I develop mobile application using C# or anything else
<p>I need help, I am newbie in C#, I have developed one game application using C#, now I want to deploy that game in mobile application or any social application...How can I do that?</p>
c#
[0]
2,918,263
2,918,264
Splitting an expression
<p>I have to split a string into a list of substrings according to the criteria that all the parenthesis strings should be split .</p> <p>Lets say I have <code>(9+2-(3*(4+2)))</code> then I should get <code>(4+2)</code>, <code>(3*6)</code> and <code>(9+2-18)</code>.</p> <p>The basic objective is that I learn which of...
python
[7]
3,843,377
3,843,378
How C++ call class method() in context of object1 by calling object.method()
<p>how C++ mech works when we call object.method(), how can it call method of the class in context of the object without mixing with any other object.</p> <p>and that object become "this" object in that method.</p> <p>how this mapping is managed. I understand when it comes to virtual function call, you have vptr poin...
c++
[6]
2,805,409
2,805,410
Import/Export based on conditions
<p>Imagine a <code>settings.py</code>:</p> <pre><code>if condition: A_SETTING = True else: A_SETTING = False </code></pre> <p>how can I have another file just import it and get the setting based on the condition:</p> <pre><code>import settings use_setting_somehow(settings.A_SETTING) </code></pre> <p><strong>UP...
python
[7]
2,396,596
2,396,597
Trying to echo to a new line and isn't working
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2674703/php-trying-to-create-a-new-line-with-n">PHP: trying to create a new line with “\n”</a><br> <a href="http://stackoverflow.com/questions/6879617/line-break-help-in-php">line break help in PHP</a> </p> </blo...
php
[2]
601,368
601,369
Getting the last three elements from a List/ArrayList?
<p>I need to get the last three elements added to a List. Are there any utility methods for this or will I just use a for loop that iterates down from "size(myList) - 1"?</p>
java
[1]
1,281,991
1,281,992
can anybody explain how AudioSessionSetActive(true/false) function work in iphone OS?
<p>Activating audio session interrupt audio sessions belonging to built-in applications running in the background, depending on categories and priorities. Deactivating audio session allows other, interrupted audio sessions to resume. activating audio session ( AudioSessionSetActive(true) ) was working...
iphone
[8]
5,714,330
5,714,331
Count method or property for an IList
<p>Thanks for help with explaining to me about IList and IEnumerable. I have marked that <a href="http://stackoverflow.com/questions/8692742/cannot-convert-from-an-ienumerablet-to-an-icollectiont/" title="question">question</a> as answered. Now I have a request for just a bit more information. </p> <p>I have code like...
c#
[0]
1,124,279
1,124,280
Why don't C++ compilers zero-initialize integer, floating-point, and pointer variables by default?
<p>Sometimes, we can use tools like valgrind to find out if we forgot to initialize a pointer variable. But why don't modern compilers relieve us from this common mistake which is hard to reproduce?</p>
c++
[6]
1,428,262
1,428,263
Undefined offset 0, but still gives me correct result
<pre><code>$options = array('health', 'strength', 'agility', 'stamina', 'defence'); $total = array(); foreach ($options as $value) { foreach ($objects as $object) { $total[$value] += $object-&gt;$value; } } var_dump($total); </code></pre> <p>I have some objects in an array called <code>$objects<...
php
[2]
938,492
938,493
How to get a list with elements that are contained in two other lists?
<p>We have two lists:</p> <pre><code>a=['1','2','3','4'] b=['2','3','4','5'] </code></pre> <p>How to get a list with elements that are contained in both lists:</p> <pre><code>a_and_b=['2','3','4'] </code></pre> <p>and a list with elements that are contained only in one list, but not the other:</p> <pre><code>only_...
python
[7]
1,725,456
1,725,457
jquery call back function
<p>I have a call back function as follows</p> <pre><code>$('#lnkClientData').click(function() { $('#clientdiv').slideToggle(function(){ if($('#lnkClientData').hasClass('open')) { $('#divnext').slideToggle(); $('#lnkClientData').removeClass('open').addC...
jquery
[5]
4,340,610
4,340,611
Get file owner in Windows using PHP
<p>Provide a path to file, and get its owner username on Windows?</p> <p>Of course, <code>fileowner</code> is useless here.</p> <p>Any PECL extensions that can help?</p> <p>Edit: Alternative that will also work:</p> <p>Read the summary data from a .DOC file, to retrieve the Author.</p> <p>Edit 2: Found a solution ...
php
[2]
1,311,446
1,311,447
Functions that return a function - Javascript
<p>I' started learning JavaScript recently and I'm stuck up with this concept of 'Functions that return functions'. I'm referring the book 'Object Oriented Javascript' by Stoyan Stefanov. I have prior programming experience in Java, C and C++ and also 2 years of work experience applying my knowledge on the same.</p> <...
javascript
[3]
2,430,277
2,430,278
No PHP errors on browser. what config is responsible for silent failure?
<p>I was trying to run a simple PHP script on Amazon EC2. As i got blank screen on the browser, started putting some garbage syntax or echo in between steps. Then i figured out that script was failing without any error.</p> <p>How to disable silent failure? </p> <pre><code>&lt;?php putenv('HOME=/root'); echo 'after ...
php
[2]
425,415
425,416
Unique user signature
<p>I need to be able to detect if a used already visited a particular page. </p> <p>I can set a cookies at their initial visit. I can also store some environment, such as IP, browser, OS, perhaps even language and create some string, like MD5 to compare against current visitor's environment. </p> <p>Is there another ...
php
[2]
5,373,168
5,373,169
A Tab Exception Message
<p>06-14 00:21:30.398: ERROR/AndroidRuntime(332): Caused by: java.lang.RuntimeException: Your content must have a TabHost whose id attribute is 'android.R.id.tabhost'</p> <p>what it means? I've already given the id for tabhost.And I can see the id in R.java.</p> <h2>Here is the .xml:</h2> <p>TabHost xmlns:android="h...
android
[4]
4,855,612
4,855,613
How to use media.Metadata class in android to get info from metadata of a video
<p>I have a project in android that requires me to get bitrate of a streaming video that will be played in MediaPlayer. I concluded android.media.Metadata class (not in public API) will help me. But i am clueless about how to use it as a method of MediaPlayer.To get metadata of a file i can use MediaMetadataRetriver cl...
android
[4]
3,162,220
3,162,221
Memory leak using raphael.js with hover
<p>There is a serious memory leak happening using the Raphael library pie chart WITH the hover attribute. If I remove the code that includes the hover attribute it works great and when I add it back in the memory footprint steadily grows and hovering over the piechart increases the memory footprint even more so. Unli...
javascript
[3]
5,894,469
5,894,470
Roatate image about it's centre
<p>I am trying an application like rotating image with motion sensor....My problem is that the image does not rotate about centre properly....And my angle range is 0 to 90 and 0 to -90.. And below is my code.....</p> <pre><code> public void onDraw(Canvas canvas) { super.onDraw(canvas); Bitmap arrow = BitmapFacto...
android
[4]
1,655,814
1,655,815
Java - Returning strings
<p>I wish to return a string from a method object that is called by another method in another class. My problem is: when I attempt to assign the returned value to a String in the other class, it cannot find the method object within the class object.</p> <pre><code>Guessing Game = new Guessing(); </code></pre> <p>Thi...
java
[1]
966,893
966,894
How to add an id attribute to a html tag with a certain class using jQuery?
<p>I have a link with a class of <code>special</code> and I want to add an id attribute to it.</p> <p>Only one element in my document will have this class at any one time (I may remove and add a new one at some point).</p> <p>How would I add an id attribute to the element to change it from this:</p> <pre><code>&lt;d...
jquery
[5]
961,728
961,729
How does a Java thread behave when a method is accessed externally?
<p>Suppose I have the following thread:</p> <pre><code>public class MyThread { public void run() { while (true) { // do something forever } } } </code></pre> <p>Then I instantiate the thread as follows:</p> <pre><code>MyThread thread = new MyThread(); </code></pre> <p>What happen...
java
[1]
1,104,520
1,104,521
JavaScript - Input BUTTON hide - not working
<pre><code>&lt;input id="btnupdate" type="button" value="Update" onclick="update()"/&gt; &lt;img id="loadupdate" src="http://localhost/connectu/styles/images/load_big.gif"&gt; </code></pre> <p>This code is returned by and PHP script in response to AJAX request. The update() function contains the code to hide the butto...
javascript
[3]
5,162,750
5,162,751
Fiil an array with buttons
<pre><code>private Button[] Minefiled={g_btn2,g_btn3.....}; private Button g_btnNew; private Button g_btn2; private Button g_btn3; private Button g_btn4; private Button g_btn5; private Button g_btn6; private Button g_btn7; </code></pre> <p>Can i fill an array with buttons like this?</p>
java
[1]
3,372,990
3,372,991
Make subcategories in template script
<p>I really need help with a script i have bought, the script has some categories, but i also need sub categories, so i added an extra field in the table traffic_categories. The original traffic_categories has id and category, but i have added sub_id also, so if the category is a main category it has 0 in sub_id, but i...
php
[2]
3,116,328
3,116,329
Parsing plain text into associative array in PHP
<p>I've been working on this but haven't found any solution yet. I need to parse such string into associative array (PHP) </p> <blockquote> <p>Result: ssl_card_number=35*<strong>**</strong>*0000 ssl_exp_date=1212 ssl_amount=33.55 ssl_invoice_number=0 ssl_description= ssl_company=Some Company ssl_first_name=John ...
php
[2]
583,662
583,663
Why does std::getline(cin, Number) give a "No matching function for call" error?
<p>I wrote a program so the user inputs a number and the program outputs its binary representation.</p> <p>I get this error:</p> <blockquote> <p>No matching function for call to `getline(std::istream&amp;, unsigned int&amp;)'</p> </blockquote> <p>How can I solve this?</p> <p>Also, it outputs:</p> <pre><code>0 0 ...
c++
[6]
5,724,677
5,724,678
Set minimum length of a list?
<p>I have a list in Python. I don't know exactly how long it is, but I know it's less than 15 items long.</p> <p>I want to pad it out to exactly 15 items long, appending empty strings for all the items that I need to add.</p> <p>Is there an efficient way to do this in Python? </p> <p>I was hoping:</p> <pre><code>my...
python
[7]
3,407,837
3,407,838
In C#, can you make a windows form application start as a service?
<p>I have a GUI C# Windows form program that I would like to start as a service when the computer starts and perhaps have an icon in the system tray that when clicked maximizes the program. Is this possible without major rework?</p> <p>Thanks</p>
c#
[0]
3,054,342
3,054,343
What is the best replacement for a gallery in android?
<p>I need to implement gallery of clickable images that can be scrolled horizontally. The Gallery widget is deprecated, what can be the best replacement?</p>
android
[4]
1,382,146
1,382,147
Python for large projects
<p>Are there any resources out there on how to architect large, industrial strength Python projects? I'd like to start on an ambitious personal project, but I'm not really sure how to architect it and what practices to put into place to make the project successful. </p> <p>Are there any resources out there discussing ...
python
[7]
2,507,589
2,507,590
application open and close notification
<p>How can I receive a notification whenever a user is opening and closing any application on the phone?</p>
android
[4]
5,541,694
5,541,695
How to improve NSXMLParser performance
<p>I am developing an application where I use <code>NSXMLParser</code> to parse an XML file. At the moment this takes 8 seconds. But my requirement is to do the parsing within 5 seconds. How can I improve the performance of my parser?</p>
iphone
[8]
22,718
22,719
Update of Inflated TextView Triggers GC_Concurrent
<p>I have a Handler which is triggered by a runnable which updates my TextView.</p> <p>Here is my Handler and Runnable.</p> <pre><code>private Handler durationHandler = new Handler(); private Runnable mUpdateTimeTask = new Runnable() { public void run() { _currentRecordingTrack.setDuration(getCurrentReco...
android
[4]
1,166,734
1,166,735
How to layout view right aligned and bottom of an LinearLayout
<p>I am trying to layout 1 textview (upText) left aligned and 1 textview (downText) and an image view (image) both on the same line and right aligned.</p> <p>how can I do that? I tried that, but both 'textview' and image view at left aligned.</p> <p></p> <pre><code> &lt;TextView android:id="@+id/u...
android
[4]
1,918,006
1,918,007
Programmatically logging into a site
<p>It might sound silly; but can we programmatically login into a site such as Linkedin by passing our user credentials (userid and password)? I am not talking about using OAuth or other mechanism.</p> <p><em><strong>Edit:</em></strong></p> <p>I am using the following code in Page_Load method of an .aspx web page to ...
asp.net
[9]
3,480,219
3,480,220
Easiest way to find GMT offsets where local time is between certain hours?
<p>If it's 2am in London, how can I find the GMT offsets in seconds where the local time is between 7am and 7pm?</p> <p>I have database records with a GMT offset column (-3600, -14400, 28000 etc) . I'd like to be able to select by those with offsets falling roughly within local daytime hours. Right now, which of these...
php
[2]
1,398,657
1,398,658
Javascript basic execution order
<p>I know PHP, server-side scripts, run first and output the html to the browser, then javascript is executed. However, I am trying to get a feel for how the javascript is executed and can't quite figure it out.</p> <p>Is Javascript executed top-down and is consistent with this top-down execution? I am dynamically cre...
javascript
[3]
4,184,601
4,184,602
How do I pass arguments to my JavaScript function?
<p>I have this JavaScript function:</p> <pre><code>function prefixOneDropDown(){ var source = $('#prefix-one'); var selected = source.find('option[selected]'); var options = $('option', source); var DefinitionList = '&lt;dl id="dd-prefix-one" class="dropdown f-left"&gt;&lt;dt&gt;&lt;...
javascript
[3]
2,322,631
2,322,632
Only show div if enough space to do so
<p>I'm looking for a solution to only display a div if there is space to do so.</p> <p>On my blog's post pages I display latest posts in the left sidebar, like so...</p> <p><a href="http://nonaynever.net/12286/manager-vacancy-a-long-shortlist/" rel="nofollow">No Nay Never post page</a></p> <p>I want to show a differ...
javascript
[3]
2,092,774
2,092,775
How to store a date in a cookie?
<p>I have a javascript library that read date in this form:</p> <pre><code>12/31/2020 5:00 AM </code></pre> <p>So I need to save a date in that form in a cookie. I write this code:</p> <pre><code>setcookie("invexpire", time()+3600*24, time()+3600*24*365); echo $_COOKIE['invexpire']; </code></pre> <p>but it display ...
php
[2]
1,711,191
1,711,192
Compilation error: Generic array creation
<p>I would like to create an array of <code>ArrayList&lt;String&gt;</code>. I tried the following:</p> <pre><code>static ArrayList&lt;String&gt;[] displayBlocks = new ArrayList&lt;String&gt;[3]; </code></pre> <p>However, I'm getting a compile time error:</p> <blockquote> <p>generic array creation</p> </blockquote>...
java
[1]
4,834,834
4,834,835
How to Bring Android Activity to the Foreground and Detect if its in background?
<p>I have a callback inside an Activity which is called by a remote service. I fire a Toast when it gets called so, i know its getting called but its in the background, so I need a way from within the activity to make it go to the foreground. How can this be done. Also detect if I am in Foreground or not. How can t...
android
[4]
5,024,667
5,024,668
C++: Problem with overloading mathematical operators
<p>I am looking to overload, let's say, the addition operator and have it add two objects of the same class. When I declare this "operator+" prototype function in the class declaration in the header file, I pass in both objects as parameters. I get a compiler error saying that "binary 'operator +' has too many parame...
c++
[6]
2,317,009
2,317,010
What are the native typesafe enum patterns?
<p>I am a newbie to java, i want to learn about the native typesafe enum patterns? can anybody help me?</p> <p>thanks in advance..</p>
java
[1]
1,979,837
1,979,838
How do I add a new key:value pair in existing JavaScript object?
<p>I have a JavaScript object like:</p> <pre><code>appointerment= {ids: '15,16,17', appointments: {'15': '12.05.2010,14,05,2010'} } </code></pre> <p>now in appointments object I want to add something like <code>'16': '21.05.2010'</code></p> <p>what is the best possible way to do this?</p>
javascript
[3]
5,529,070
5,529,071
Can the following code be editted, so that the second method is executed too?
<p>Is there anyway of calling methodB before methodA finishes, so that methodB gets executed? Ive tried numerous ways of implementing it, and none of them worked :(</p> <hr> <p>can someone explain? Thanks.</p> <pre><code>public List&lt;ObjectA&gt; _OurObjectA= new List&lt;ObjectA&gt;(); public List&lt;ObjectA&gt; ...
c#
[0]
4,440,946
4,440,947
Method call if not null in C#
<p>Is it possible to somehow shorten this statement?</p> <pre><code>if (obj != null) obj.SomeMethod(); </code></pre> <p>because I happen to write this a lot and it gets pretty annoying. The only thing I can think of is to implement <strong>Null Object</strong> pattern, but that's not what I can do every time and ...
c#
[0]
5,483,510
5,483,511
jquery click an img hide an LI
<p>i have something similar to the following... used a python script to JSON to populate.</p> <pre><code>&lt;ul&gt; &lt;li id="p1" class="x"&gt;val1 &lt;img id="ip1" class="redx" src="redx.gif"/&gt;&lt;/li&gt; &lt;li id="p2" class="x"&gt;val2 &lt;img id="ip2" class="redx" src="redx.gif"/&gt;&lt;/li&gt; &lt;li id="p3" ...
jquery
[5]
3,856,184
3,856,185
fail-safe iterator
<p>CopyOnWriteArrayList produce fail-safe iterator because everytime the "structure is modified" , the modification mean a new array is produced. the iterator iterate over the old copy of array? So, fail-safe mean it is safe from failing?</p>
java
[1]
982,619
982,620
Android: Override back button
<p>I have a Main Activity, then a ListActivity to select an item to show, and then a third activity to show selected item. When user push back button, I want him to go back to main activity, not the listActivity.</p> <p>How can I do that?</p>
android
[4]
5,610,715
5,610,716
Malzilla Tutorial #4 - how to get it working
<p>I am trying to understand the basic work flow of using <a href="http://malzilla.sourceforge.net/" rel="nofollow">Malzilla</a> , and therefore doing the tutorials. But already in the <a href="http://malzilla.sourceforge.net/tutorial04/index.html" rel="nofollow">first one</a>, where you actually get to do something I ...
javascript
[3]
3,574,942
3,574,943
How to call a mehod(Function) on 1st day of every month and year in php?
<p>I have two methods(functions) called Mnth_function() and Yr_function(), and I need to call these two methods at different situation (or time) in my web application. <br/></p> <ol> <li>Mnth_function() should call on 1st day of every month at 12:02:00 AM <br></li> <li>Yr_function() should call on 1st day of every yea...
php
[2]
4,907,920
4,907,921
related to php arithmetic
<pre><code>$y = 013; echo $y + 5; //this result in 16 </code></pre> <p>I can not figure it out how its ans is 16? Can any one help?</p>
php
[2]
3,502,249
3,502,250
How to disable network connectivity dynamically for a process?
<p>My app is data intensive and I want to provide users the comfort of turning on/off WIFI only data usage.</p> <p>My application makes use of the network connectivity all over and also the ads do too. How can I globally for the app process limit the data connectivity type to only WIFI?</p>
android
[4]
5,717,670
5,717,671
How to deal with pass a value twice in a PHP file
<p>I am working on modification of a program. There are two value passes happened in one PHP file, and I get a notification from system like this:</p> <pre><code>Notice: Undefined index: content in /Users/alexhu/NetBeansProjects/menagerie/svn/trunk/apps/frontend/modules/legacy/legacy_lib/content/utilities/hraprint.php...
php
[2]
5,896,830
5,896,831
Measure, Layout, and Draw times in Hierarchyviewer
<p>What is the difference between Measure, Layout, and Draw time in Android Hierarchyviewer tool? There is a nice article on Android Developers, however I can't find any information related on actual meanings of these three different time values... Can somebody explain me the difference? Thanks.</p>
android
[4]
5,029,640
5,029,641
string memory allocation
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3361079/string-memory-allocation">string memory allocation</a> </p> </blockquote> <p>What is the difference between</p> <pre><code>System.out.println("hello world"); System.out.println("hello world"); </code></...
java
[1]
4,345,469
4,345,470
Reece Calendar event
<p>I have this problem with the script:</p> <p>Notice: Undefined index: show_times in C:\wamp\www\ReeceCalendar_0.9\cal\gatekeeper.php on line 192</p> <p>Notice: Undefined index: hours_24 in C:\wamp\www\ReeceCalendar_0.9\cal\gatekeeper.php on line 194</p> <p>Notice: Undefined index: start_monday in C:\wamp\www\Reec...
php
[2]
1,010,877
1,010,878
How to parse the file present on SDCArd
<p><br> I have a file which I created and is present in data/data/com.andr.filedemo/files/a.xml. Now I want to parse this file using XML Pull parser. How can we give the path of that file or how we can access that file and then parse that file using XML Pull parser. <br> Can anyone help me in sortig out this issue? <br...
android
[4]
2,603,383
2,603,384
Remove certain values from xml string if checkbox clicked
<p>I have form that builds an xml string of all the values (excluding some) in the submitHandler of an .ajax submitted form to a WCF service, here is an example:</p> <pre><code>function SetServices() { var services = '&lt;SERVICE&gt;&lt;SERVICECD&gt;1KNTK&lt;/SERVICECD&gt;&lt;/SERVICE&gt;'; $(":checked:not...
jquery
[5]
5,053,298
5,053,299
Which is better: require_once? or if (!defined('FOOBAR')) require? or something entirely different?
<p>Assuming PHP version >= 5.2, which is a better solution for managing includes: </p> <pre><code>require_once DEFPATH . 'config.inc.php'; </code></pre> <p>or </p> <pre><code>if (!defined('FOOBAR')) require DEFPATH . 'config.inc.php'; </code></pre> <p>or something entirely different?</p> <p>Site does not use a fro...
php
[2]
2,376,476
2,376,477
how do I include header files like list.h, queue.h and vector.h in C++ file?
<p>I downloaded a sample code and cpp files include header files like list.h, queue.h, and vector.h and if I try to build then I got "fatal error: No such file or directory compilation terminated" I think I should include the path to the system library that has those header files but I don't know how to do that.</p> <...
c++
[6]
4,788,100
4,788,101
How to update only the part of page
<p>I have several combo boxes and labels. when a user select any item from the combo box, the corresponding value will be retrieved from database and will be shown on the label. I have done these part successfully. </p> <p>But my query is, when I select any item from the combo box, the whole page posts back to the se...
asp.net
[9]
5,380,167
5,380,168
Check if is an Object
<p>I need to check if a variable is a pure Object instance. For example: a HTMLElement is <em>instanceof</em> Object. But I really need to check if it is <em>only</em> an Object, like <code>{a: true, b: false}</code> is. It not can validate an Array.</p> <p><em><strong>Note</strong>: I can use newer features of Chrome...
javascript
[3]
4,288,849
4,288,850
how to get the respective value from a database table where one of the column values are displayed in a list view
<p>I have created a table named train_table in SQLite database with 3 columns. they are train_id, train_no and train_name. Now, i wrote a class in which i displayed the train_name in a list view. how do i get the related train_no in the next page? can anyone help me in sorting this problem.? Thanks in advance</p>
android
[4]
3,283,468
3,283,469
Set the dimensions of a google map view v2 android
<p>I need help dealing with my app. I need to know how to make my google map view smaller. I need it to be located in the top left hand corner with a set dimension. </p> <p>Please help or even suggest a resource online??</p>
android
[4]
2,309,205
2,309,206
how to use image like as map?
<p>User can used image like as map .. user can zoom in and zoom out this image like we use google map. i am not required to used google map in my application. anyone please suggest which steps follow for this type of development.</p>
android
[4]
3,883,482
3,883,483
C++ Help - I can't seem to figure out the last part of this code
<p>I'm trying to get the program to display the current height of the child and the estimated height of the child. </p> <p>I have it displaying the before and after for the first child but can't get it to display the estimated height for the rest of the children. </p> <p>I would be very grateful if anyone could help ...
c++
[6]
3,586,500
3,586,501
Fetching the data from database for specific time
<p>Hello here i want fetch the data from database into datagridview for timer interval BETWEEN <code>1900-01-01 23:00:00.000</code> AND <code>1900-01-01 06:59:59.999</code> but here i am unable to do that can anyone help me .......</p> <pre><code>temprature Time date 27 1900-01-01 00...
c#
[0]
2,749,963
2,749,964
Check if a property exists in a list of custom class
<p>I have a list of my custom class(which has properties like Name,Age,Address).How can i check whether I have a property called "Name" in my list of custom class. I dont want to check if an item exists for the property Name , rather i did like to check if the property exists or not.</p> <p>Any help on this?</p>
c#
[0]
5,868,987
5,868,988
How can I add sequence IDs to classes in a list of another class?
<p>I have the following class. Inside of the Parent class is a List of ParentDetail. Now I need to add a new field to the ParentDetail class. The field is called Id. What I need is a method in the main class that will iterate through the ParentDetails and populate the Id field with a number starting at 1. </p> <p>Can ...
c#
[0]
3,931,586
3,931,587
find list view choice mode multiple events
<p>how to find checked events in choice mode multiple.</p> <p>I am using ontemselected method it is not working for me</p> <pre><code> ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_list_item_multiple_choice,getIntent().getStringArrayExtra("agents")); List...
android
[4]
1,942,738
1,942,739
Is boost tokenizer thread safe?
<p>I want to parse a csv string in my program, boost split must have a stl vector to store the result, so I want to use boost tokenizer. Is boost tokenizer thread safe? </p>
c++
[6]
2,416,170
2,416,171
Some problems with Threads
<p>I'm having a-bit of trouble with threads in java. Basically Im creating an array of threads and starting them. the point of the program is to simulate a race, total the time for each competitor ( i.e. each thread ) and pick the winner. </p> <p>The competitor moves one space, waits ( i.e. thread sleeps for a random ...
java
[1]
4,286,744
4,286,745
Convert 2D array to 1D array of column strings
<p>I'm working on a java program that has the following input:</p> <pre><code>A V V V VV V V V E F V E VF E V E C D V C VD B V C A A V A VA G V A V D V V VD E V V A V V A VV V V A </code></pre> <p>and the following output:</p> <pre><code>R R R R R R </code></pre> <p>So an <code>R</code> has to be printed if a co...
java
[1]
1,956,797
1,956,798
get css() property before append()?
<p>how can you get a css property before the element is appended?</p> <p>css</p> <pre><code>input.inp { padding:3px 2px 3px 2px; } </code></pre> <p>js</p> <pre><code>var elm = $('&lt;input class="inp" type="text" /&gt;'); alert(elm.css('padding-left')); td.append(elm); alert(elm.css('padding-left')); </code></...
jquery
[5]
2,424,339
2,424,340
battery related info android
<p>I am just tyring to create an activity which shows the battery level in the picture format automatically when ever there is a change in the battery status so any one can suggest me the procedure to create that type of app</p>
android
[4]
2,109,035
2,109,036
How to Keep previous row selected in iPhone?
<p>When i am select any row of navigation screen it is highlighted with Blue color. I want to keep this row selected with blue color when i am came to screen by back button. Mean when i am go to previous screen by back button, it should be indicated that which row is selected.</p>
iphone
[8]
3,767,102
3,767,103
Pass a simple string when opening a child window
<p>In the parent window:</p> <pre><code>window.open('page.php','nameIWant','toolbar=no') </code></pre> <p>How do I get the target specified in window.open() from the new window code.</p> <p>I tried to retrieve document.title, document.name and document.target, none gave me 'nameIWant' or is there a simple way to get...
javascript
[3]
3,441,933
3,441,934
Position absolute vs div height in a jQuery project
<p>I have this project that assorted people have been helping me with here and I have a minor issue, if you see in my project here: <a href="http://jsfiddle.net/webmonkeycch/4JACw/3/" rel="nofollow">http://jsfiddle.net/webmonkeycch/4JACw/3/</a> the red line indicates a footer div of a site and because the frame is bein...
jquery
[5]
4,514,481
4,514,482
Form validation using Jquery
<p>When I submit my form I need to validate a txt field for not null and other stuff through jquery. But for only one submit button among all the other buttons it must validate that .I am doing the following</p> <pre><code>$(document).ready( function(){ /* validate form */ $("#getEstimateId").click(function(e)...
jquery
[5]
5,112,796
5,112,797
Attach click events in an IFRAME
<p>Basically I have an IFRAME that displays a given page. I am using jQuery to append a number of DIVs within the IFRAME upon load:</p> <pre><code>$('#portal').load(function(){ $('#portal').contents().find('.callout').append('&lt;div class="overlay"&gt;Test&lt;/div&gt;'); }); </code></pre> <p>(#portal is the IFRA...
jquery
[5]
3,441,483
3,441,484
How to check last three elements from a python list - whether they are integer?
<p>I am using Python, version 2.7.2.</p> <p>I have a task to check whether the last three elements from a list are integer? For example:</p> <pre><code>mylist = [String, Large_string_containing_integers_inside_it, 80, 40, 50] </code></pre> <p>For above list I want to check whether the last three elements are integer...
python
[7]
4,048,405
4,048,406
How to make Popen() understand UTF-8 properly?
<p>This is my code in Python:</p> <pre><code>[...] proc = Popen(path, stdin=stdin, stdout=PIPE, stderr=PIPE) result = [x for x in proc.stdout.readlines()] result = ''.join(result); </code></pre> <p>Everything works fine, when it's ASCII. When I'm receiving UTF-8 text in <code>stdout</code> the result is unpredictable...
python
[7]
3,919,023
3,919,024
Split() deprecated
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2813241/php-split-alternative">PHP split alternative?</a> </p> </blockquote> <pre><code> // Successful geocode $geocode_pending = false; $coordinates = $xml-&gt;Response-&gt;Placemark-&gt;Point-&gt;coordinates; ...
php
[2]
1,056,477
1,056,478
Removing Textboxes
<p>Im new to js kindly help me! im using functionality to add text boxes dynamically im done with that part now i want make a js function that removes text boxes on a click on remove button. any help ?</p>
javascript
[3]
3,122,541
3,122,542
selecting unicode characters from text file or webpage
<p>I am able to syllabalise the devnagari words as shown on the following page.</p> <p><a href="https://gist.github.com/950405" rel="nofollow">https://gist.github.com/950405</a></p> <p>But what I want to do is to find the words those start with "ह" from the following webpage.</p> <p><a href="http://www.sacred-texts....
python
[7]
947,316
947,317
Get the next div wrt to current one with same class names
<p>How can I find the next with the same class as the current one. using jquery</p> <p>I have a <code>&lt;div&gt;</code> with <code>class="help"</code>, now when some clicks on a button inside this I want to select the next with the same "help" class.</p> <pre><code>&lt;div class="help"&gt; &lt;div&gt;....O...
jquery
[5]