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
72,862
72,863
Displaying CSS properties and values of a HtmlControl
<p>I have a <code>&lt;div id="Result" ... &gt;</code> with a bunch of CSS properties and values and I would like to display them when I click a button. This is what I currently have:</p> <pre class="lang-cs prettyprint-override"><code>protected void Button1_OnServerClick(object sender, EventArgs e) { for (int i = ...
asp.net
[9]
5,341,363
5,341,364
How to return person with max sales in salesperson program- JAVA
<p>Kind of confused by one part of my HW problem. It seems like it would be easy, but I can't put my finger on it. I am trying to return the salesperson with the max and min sales. I am confused on how to do that. Help would be much appreciated.</p> <pre><code>import java.util.Scanner; public class Cray { public s...
java
[1]
3,535,602
3,535,603
Converting codes written in Python 2 to Python 3
<p>I'm given a task of converting a bunch of codes written in Python 2.7 into Python 3. So my question is What are the fundamental differences between the two and what are the new features expected from conversion? I'm assuming it's not just syntactical issues. Where should I start and what should I focus on? It'll be ...
python
[7]
1,040,410
1,040,411
Can anyone show me how to display this in normal xhtml?
<pre><code>$("body").trigger({ type:"logged", user:"foo", pass:"bar" }); </code></pre>
jquery
[5]
119,701
119,702
Ups Integration and getting Track number
<p>How can I use UPS integration in my asp.net application to get tracking information for a package?</p>
c#
[0]
764,054
764,055
Show form field and focus
<p>In have a selector and when I select a particular option it shows additional form field. At that point I want to switch the focus to the new field. Here's what I tried but it does not seem to work. What am I missing?:</p> <pre><code> $('#mySelector').change(function () { var st = $(this).val(); if...
jquery
[5]
2,137,897
2,137,898
Replace word with jQuery
<p>I have word Hello on most of my pages and i want to change it to Welcome. Is it possible and if yes how to replace the words with jQuery?</p> <pre><code>Hello &lt;p&gt;Hello user Jack&lt;/p&gt; &lt;div&gt;Hell ow you from us &lt;h1&gt;12344 Hello&lt;/h1&gt; &lt;div&gt;Hellow&lt;/div&gt; &lt;/div&gt; &lt;scr...
jquery
[5]
3,120,273
3,120,274
How does JRE know the line number of code where exception occured?
<p>Consider the following Exception print</p> <pre><code>java.util.NoSuchElementException at java.util.StringTokenizer.nextToken(StringTokenizer.java:332) at com.infoaxe.mr.homefeed.ReduceTwo.reduce(MapReduce.java:290) </code></pre> <p>Since Java is a compiled language and what runs in JVM is the bytecode and...
java
[1]
5,861,262
5,861,263
Get child of next consecutive div
<p>Apologies for the noobness of the question, I've done a search but can't find anything matching 'get child of next consecutive div'.</p> <p>Any ideas please?</p> <pre><code>//get current var current = $('#holder').find('img.current'); //get next image var next = &lt;div id="holder"&gt; &lt;div class="item odd"&...
jquery
[5]
3,724,149
3,724,150
os.environ['http_proxy'] not working
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/263005/is-it-possible-to-change-the-environment-of-a-parent-process-in-python">Is it possible to change the Environment of a parent process in python?</a> </p> </blockquote> <p>I am using python 2.4.3. I tried t...
python
[7]
5,030,751
5,030,752
How To Use Kunststube-CSRFP?
<p>I put <a href="https://github.com/deceze/Kunststube-CSRFP" rel="nofollow">Kunststube-CSRFP</a> demo.php on my server : <code>http://domain1.com/demo.php</code> and hit 'TRY IT' button and it says : <strong>Form submission ok.</strong></p> <p>then I look at the source code and copy the token generated by the script ...
php
[2]
5,944,630
5,944,631
python string on one line
<p>My string is</p> <pre><code>a b c d </code></pre> <p>I want to do this</p> <pre><code>a b c d </code></pre> <p>How?</p>
python
[7]
1,759,268
1,759,269
Javascript: regex for money values
<p>Been out of the regex game for a while. Trying to come up with something that will allow the user to enter a money value either with/without dollar sign or with/without commas. For example, all the of the following values should be valid:</p> <p>5</p> <p>5.1</p> <p>5.10</p> <p>$5</p> <p>500,000</p> <p>500,000....
javascript
[3]
5,086,477
5,086,478
Eclipse+Android NDK plugin takes too long to build native code on Windows+Cygwin
<p>I have a lib that is derived from webRTC. I can build it from the command line. It takes an acceptable time.</p> <p>I'm now trying to use the NDK plugin of eclipse to be able to debug it. The problem is that it takes too long to build it. It takes about 1 min per file. If there isn't a way to make it faster it wou...
android
[4]
2,753,094
2,753,095
redirecting a page link and changing page text based on link
<p>OK I am not sure if the question title is actually correct , newbie web developer here so bear with me.<br /> This is an ASP.NET webiste running on IIS 6.0<br /> So here is the problem: I have two pages called Page1 and Home<br /> you can navigate to both like so<br /> www.mysite.com/Page1.aspx, www.mysite.com/Home....
asp.net
[9]
4,819,072
4,819,073
Parsing long to a Date object with formatting
<p>I'm trying to do a function that will parse a long millesecond value into a Date object with formatting:</p> <pre><code>public static Date parseDate(long millisec, String format) { try { SimpleDateFormat formatter = new SimpleDateFormat(format); Date formattedDate = new Date(millisec); f...
java
[1]
1,188,475
1,188,476
Determine if key values in two arrays are equal then update if they are
<p>I've taken up PHP programming as a hobby after work and kids. So, my appologies if this code is bogus...but I've been searching for awhile. Anyways, I am trying to compare the values in two arrays and...where each key value equals another I would like to update that value to '1'. So for example, in one array the val...
php
[2]
227,355
227,356
jQuery plugin: Html autocomplete as in Dreamweaver
<p>Is there any jQuery plugin that works as follows: when you type a tag like <code>&lt;p&gt;</code>, the editor will automatically add <code>&lt;/p&gt;</code> and put the cursor after the first tag, it should also display a context sensitive list of valid tags.</p>
jquery
[5]
3,642,800
3,642,801
How screen changes from horizontally to vertically or Vice-versa automatically in Android
<p>Hii</p> <p>I want to know the mechanism how the screen changes automatically from horizontally to vertically or vice-versa in android when we change the position of phone. Example in terms of coding would be highly appreciable.</p> <p>Regards</p> <p>Piyush</p>
android
[4]
3,519,877
3,519,878
Get the first and last item of an array of strings
<p>If I have the following array of strings:</p> <pre><code>string[] stringArray = {"one", "two", "three", "four"}; </code></pre> <p>Is there a way to get the first and last item ("one", "four") in C# from the array, besides using array indexing (stringArray[0], stringArray[3]), something like stringArray.First and s...
c#
[0]
5,529,673
5,529,674
PHP fgetcsv escape '\'
<p>A csv file contains a '\' character in one of its record for which i am not able to get the exact number of key value pair in the array. </p> <p>I am using PHP fgetcsv function as follows-</p> <pre><code> while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { .... } </code></pre> <p>I have also tried escap...
php
[2]
2,163,030
2,163,031
PHP Take a Variable in an If statement literally
<p>I was wondering if it would be possible to do this:</p> <pre><code>$var = '$something == $somethingelse'; if ($var) { // Say hello } </code></pre> <p>and have it mean the same thing as this:</p> <pre><code>if ($something == $somethingelse) { // Say hello } </code></pre> <p>I know this will not work at the momen...
php
[2]
5,744,197
5,744,198
Iterating through a list of objects and displaying the property in the combobox
<p>I have 2 combo boxes, the first one lets you pick an interface and the second one should display the appropriate addresses depending on which interface you chose, I have a list of objects, each object is an interface with associated addresses. I need to display these addresses to the combo box after the user choose...
c#
[0]
2,451,400
2,451,401
Generating generic getters and setter on javascript object
<p>It is possible to create getters and setters in javascript as shown by</p> <pre><code>Object.defineProperty __define***__ </code></pre> <p>In all those instances, the name of the property is known. </p> <p>Is it possible create a generic one.</p> <p>By this I mean, I have a getter and or setter and it is called ...
javascript
[3]
5,768,480
5,768,481
Use Input "Id" instead of Input "Name"
<p>Hey guys I managed to get a text input and select box to updated based off of the input box using some javascript....but we changed our form variables so I can no longer use the input "name"...I now need to use the id. How can i alter my javascript to use the id t do what Im currently doing?</p> <p>jsp:</p> <pre>...
javascript
[3]
1,192,700
1,192,701
How can I check the value of the Next Row while looping using PHP/MYSQL?
<p>I got previousRow of record using this code</p> <pre><code>&lt;?php $previousRow = array(); while ($temp = mysql_fetch_row($res2)) { echo "&lt;br&gt;currentRow:".$temp[1]; echo "previousRow:".$previousRow[1]; $previousRow = $temp; } ?&gt; </code></pre> <h2>oupout</h2> <p>currentRow:1pr...
php
[2]
3,426,645
3,426,646
How to automatically close the parent window when the child window is opened in Firefox
<p>i have this code i need to close the parent.html window when the child window opened, i need the code for that working well in IE and Firefox</p> <p>Parent.html</p> <pre><code>&lt;HTML&gt; &lt;SCRIPT TYPE="text/javascript"&gt; function sendTo() { window.open('child.html','_blank','resizable=yes,width='+(sc...
javascript
[3]
414,937
414,938
get html code into a php variable
<p>I'm don't use PHP that much and right now I'm stuck at a problem. I need to save the site of a webbrowser as a pdf. I'm using right now mPDF (which was suggested in a wiki of stackoverflow) and it seems to work pretty well (I just have simply write a short html code into a php variable and then created the pdf). </p...
php
[2]
4,049,613
4,049,614
Parse error: syntax error, unexpected T_VARIABLE in /home/designea/public_html/blog/blog_end/inc/comments.inc.php on line 1
<p>Im getting this error "Parse error: syntax error, unexpected T_VARIABLE in /home/designea/public_html/blog/blog_end/inc/comments.inc.php on line 1" can somebody help me..here's my code</p> <pre><code>&lt;?php function get_gravatar( $email = $_POST['email1'], $s = 50, $d = 'mm', $r = 'g', $img = false, $atts = arra...
php
[2]
3,093,921
3,093,922
Use jquery :contains and and .eq() to modify text style within specific div
<p>Is it possible to combine the use of :contains and .eq() to search for text within a specific div?</p> <p>I currently use the following two statements which create jquery statements based upon values grabbed from the URL by PHP $_GET[].</p> <p>The first simply checks for link text matching the current $platformStr...
jquery
[5]
4,296,769
4,296,770
Difference between <?php echo $session_id ?> and <?= $session_id ?>
<p>Is there any particular reason to use one over the other? I personally tend to use the latter, as it just seems to flow better to me.</p>
php
[2]
651,527
651,528
jQuery Slide Toggle help
<p>I have the following code:</p> <pre><code>$("a.sticky-link").click(function (e) { e.preventDefault(); $("div.stickies-box").slideToggle('slow'); $("a.sticky-link").toggleClass("selected"); }); $("div.stickies-box").mouseup(function () { return false }); $(document)....
jquery
[5]
848,127
848,128
what is wrong with this PriorityQueue?
<pre><code>fringe = new PriorityQueue&lt;Node&gt;(10,new Comparator&lt;Node&gt;(){ @Override public int compare(Node node1,Node node2) { if (f(node1)&gt;f(node2)) return 1; else return -1; } }...
java
[1]
5,650,092
5,650,093
Whats the difference between if(!Variable) and if(isset($variable))?
<p>Whats the difference between if(!Variable) and if(isset($variable)) ?</p>
php
[2]
1,565,717
1,565,718
Drawing a grid on a PictureBox
<p>I am currently working with a pictureBox. I am having difficulties drawing a grid over the picture box that is approximately the size of 2 x 2 squares. Now the code below is only giving me a line drawn across. How can I proplery draw a full grid on top of the pictureBox?</p> <p><strong>CODE:</strong></p> <pre><cod...
c#
[0]
675,741
675,742
android reading from a text file
<p>I have a java class where it reads some data from a text file using a buffered reader and returns that data as a hash map:</p> <pre><code>import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.HashMap; public class FrequencyLoade...
android
[4]
2,301,581
2,301,582
How to wait three seconds then turn to another webpage
<p>I'm new to web development, and I'm currently using ASP.net. I wonder what would I need to do to let the browser wait for 3 seconds so my users can read the text "Customer Successfully Added" before turning to another page? I have attached my code as follows. </p> <pre><code>Protected Sub btnAdd_Click(ByVal sender ...
asp.net
[9]
781,642
781,643
How to create a tabView like the image
<p>I would like to create a tabView like in the picture.</p> <p><img src="http://i.stack.imgur.com/I7Awg.jpg" alt="enter image description here"></p> <p>the gradient tab is the one i have clicked</p> <p>but i dont want to be like this for example</p> <p><a href="http://www.androidhive.info/2011/08/android-tab-layou...
android
[4]
3,148,417
3,148,418
jquery execution order
<p>Consider the following code:</p> <pre><code>function searchText() { if($('#searchtext').val() == null || $('#searchtext').val().trim() == '') { alert('must provide a text to search for'); return false; } urllink='http://search.twitter.com/search.json?q=' + escape($('#searchtext').val().tr...
jquery
[5]
2,053,971
2,053,972
Send/Receive Data to server in C#
<p>In my programe I have a need for requesting data from server and upon collecting the response, use the returned data for further processing. </p> <p>I am using "system.net.webrequest" class for the same. I have few questions on this:</p> <ol> <li>after I receive the data (data is of 0.5MB size in minimum) I have t...
c#
[0]
1,026,981
1,026,982
Finding if a string contains a date and time
<p>I am working on a project where I am reading in a file which could come in two different formats, one includes a date and time and the other doesn't. </p> <p>When I read in the first line I need to check whether the string contains the date and time or not and read the file and based on the check read the file in a...
c#
[0]
465,372
465,373
about android view design
<p>I want to design android game program!</p> <p>i use android DroidDraw program design UI view(Only 2.7" size)</p> <p>absolutelayout.linearlayiut.tablelayout have tried</p> <p>However, the components designed address will change with different resolutions</p> <p>how do design to achieve what I want?</p>
android
[4]
2,605,408
2,605,409
is it possible to shorten a conditional statement checking for a bunch of different values for a single variable
<p>if (hello == 50 || hello == 60 || hello == 70) {</p> <p>would it be possible to shorten this to something like that ?</p> <p>if (hello == (50,60,70));</p> <p>or something along those line, just to avoid having to constantly rewriting the same variable.</p>
java
[1]
4,004,926
4,004,927
Can JavaScript detect onblur() for a window opened through window.open()?
<p>What I'm looking to do is create a new window using <code>window.open</code> and then when the new window opens, I want to check if that window is active throughout? </p> <p>For example: I have</p> <pre><code>myNewWindow = window.open(document.getElementById("inputbox").value).focus(); </code></pre> <p>Once this ...
javascript
[3]
1,101,145
1,101,146
Java multiplayer server blocking io
<p>I am currently developing a prototype for a game and I need a simple server to run it. At this stage, I don't want to invest the time learning about all the different full-featured multiplayer game servers already there (smartfox, etc...)</p> <p>I know how to develop a basic Server with Threads listening on Sockets...
java
[1]
5,455,528
5,455,529
Javascript error on page reload using response.redirect in asp.net
<p>I have a button on my page which I use to redirect the user to the same page.</p> <pre><code>protected void Undo123_Click(object sender, EventArgs e) { Page.Response.Redirect(Page.Request.Url.ToString(), true); } </code></pre> <p>I get this error:</p> <pre><code>Microsoft...
asp.net
[9]
2,768,266
2,768,267
Android: User input on image
<p>I am trying to add user input on a selected image. So far I am able to select the image, then the keypad of the emulator comes up but the text is not added on the image. Following is the code. Could anyone please help me figure it out? Thanks!</p> <pre><code>public class FullImageActivity extends Activity implement...
android
[4]
4,361,782
4,361,783
How do you retrieve the call list and voicemail messages on the iPhone?
<p>I'm developing an iPhone application that replicates the functionality of the built-in phone application, but adds a few features on top. This is for ad hoc distribution only.</p> <p>In particular, is there a way to programmatically retrieve the last calls received by the phone? Also, how can an application acce...
iphone
[8]
2,281,481
2,281,482
Writing a program to add all the odd numbers in an array
<pre><code> // Write a program to sum all the odd elements of an array a = Number(prompt("a:")); b = Number(prompt("b:")); c = Number(prompt("c:")); sum=Number(0); var test = [a,b,c]; for (i=0; i&lt;test.length;i++) { // All even numbers can be divided by 2 if ((test[i]%2)&gt...
javascript
[3]
642,503
642,504
Where do you put global application data in an iPhone app?
<p>I have an app that allows the user to view, manipulate and manage a collection of Schedule objects. Different parts of the app need access to this data. I've experimented with making the collection a singleton, but I didn't find that very clean.</p> <p>I recently changed to storing the global data in the AppDelegat...
iphone
[8]
4,782,812
4,782,813
How to pass a string literal to a function which takes const std::wstring&
<p>I have a function which takes <code>const std::wstring&amp;</code> font_family, i.e.</p> <pre><code>Font Font::CreateFont(const std::wstring&amp; font_family){ ... } </code></pre> <p>By question is how can I call that funcion by passing a string literal (e.g monospace)?</p> <p>I tried </p> <pre><code>CreateFont(...
c++
[6]
5,126,175
5,126,176
Date() converts certain date strings to local time
<p>I'm trying to compare two date strings for equality by wrapping them with the Date() object. I live in Seattle and for some reason, the second date string is converted to PST and then rendered in GMT, resulting in the below: </p> <pre><code>new Date("January 1, 2012") &gt;&gt;&gt; Sun Jan 01 2012 00:00:00 GMT-0800 ...
javascript
[3]
3,089,152
3,089,153
byte array assignment
<pre><code>byte test[4]; memset(test,0x00,4); test[]={0xb4,0xaf,0x98,0x1a}; </code></pre> <p>the above code is giving me an error expected primary-expression before ']' token. can anyone tell me whats wrong with this type of assignment?</p>
c++
[6]
5,345,147
5,345,148
using a method instead of override string ToString
<p>Every object has its own <code>public override string ToString(){ return string; }</code> method. But we can achieve the same with a custom method. Then why have a separate override string method?</p>
c#
[0]
3,015,157
3,015,158
How to add category and subcategory in shoppingcart
<pre><code>&lt;h2&gt;Add Product&lt;/h2&gt; &lt;?php $sql="select * from category where parent_id=0 "; $res=mysql_query($sql); echo "&lt;FORM METHOD=POST ACTION='' enctype='multipart/form-data'&gt; &lt;TABLE&gt; &lt;TR&gt; &lt;TD&gt;Product Category&lt;/TD&gt; &lt;TD&gt;&lt;SELECT NAME='sel'&gt; &lt...
php
[2]
2,240,654
2,240,655
C++ and pin tool -- very weird DOUBLE variable issue with IF statement
<p>I am working with pin tool that simulates a processor and having a very strange problem. In the code snippet below, Router::Evaluate() is called repeatedly many times. After it is called several million times, strange behavior occurs intermittently where "_cycles != 0" is evaluated to be true in the first IF stateme...
c++
[6]
559,190
559,191
variables in img src
<p>this is going to an easy one i think but for the life of me i cant get it to work.</p> <p>i have a variables $id i want to put it in a img src that i have echo (eg. "uploaded/$id.jpg")</p> <p>i have tried lots of way and looked all over the net and cant get it to work </p> <pre><code>echo " &lt;td&gt...
php
[2]
1,322,821
1,322,822
Compilation error while compiling 2.1.2 code on 3.0 iphone SDK
<p>When I'm trying to compile 2.1.2 SDK code on 3.0 or higher version, it gives a compilation error saying "CFXMLTreeRef undeclared identifier". Below is the code snippet where it shows the error:</p> <pre><code>#ifdef TARGET_IPHONE_SIMULATOR #import &lt;CoreServices/CoreServices.h&gt; //cause of the preoblem #else ...
iphone
[8]
2,784,233
2,784,234
what is the equivalent reference for "this" in C/C
<p>Guys i just started to learn C# and i have no idea about "this" reference in c# someone can give me a very simple example in real life. I mean why do i need to use "this" in C# or where can i use "this" what is the benefit? </p> <p>Thanks.</p>
c#
[0]
5,705,542
5,705,543
On/Off status with jQuery
<p>There is a plugin to fav &amp; unfav my data? I have an example:</p> <p><strong><code>id name status</code></strong><br /> <code>1 jackii on</code><br /> <code>2 derekk off</code><br /> <code>3 carool on</code><br /></p> <p>I want to on/off my data instally without refresh (the same idea used by many webapps. l...
jquery
[5]
752,382
752,383
Could someone tell me the purpose of Inner classes and if iterator pattens should or a good idea to use inner classes?
<p>Could someone tell me what the purpose of inner classes are? Also when designing the iterator pattern do we have to use inner classes? Would it be better to use inner classes?</p>
java
[1]
3,795,800
3,795,801
How can i set Brightness value while the activity style is Theme.NoDisplay?
<p>1.First i set the activity style is NODisplay in manifest.xml use the follow code</p> <pre><code>android:theme="@android:style/Theme.NoDisplay" </code></pre> <p>2.I set brightness value use the follow code :</p> <pre><code>public void setBrightness(Activity activity,int brightness){ WindowManager.LayoutPa...
android
[4]
3,841,904
3,841,905
In Android how to get CheckBox onCheckedChanged from other activity
<p>the first one - 16.1 Example A Preferences</p> <p><a href="Http://www.bogotobogo.com/Android/android16Preferences.html" rel="nofollow">Android tutorial</a><br> (sorry for the link)</p> <p>Cant for the love of android not get this to work I want to click that CheckBox witch is connected to the autosave PreferenceAc...
android
[4]
4,115,125
4,115,126
forward break label
<p>How can i do forward jumps like this?? Eclipse is complaining label1 is not found...</p> <p>Thx</p> <pre><code>public class foo { int xyz() { int b = 1; if (b == 0) { break label1; } // MORE CODE HERE label1: return 1; } } </code></pre>
java
[1]
4,442,682
4,442,683
I want to calculate distance in a gps
<p>I am currently working on a gps project. I have read an xml file, I can print out the longitude and latitude bounds in the form of minLat, maxLat, minLon, maxLon. Way,Relation and Node properties like, id, user, uid, version, visible, changeset and timestamp . I can also print out the tag key and value and the refer...
java
[1]
5,894,347
5,894,348
How to use Contains(Of T)(T) method?
<p>I have a byte list variable which I store byte array information here:</p> <pre><code>internal List&lt;Byte&gt; portBuffer = new List&lt;Byte&gt;(); </code></pre> <p>And I have another byte array variable:</p> <pre><code>byte[] ret_bytes = { 0x4F, 0x4B }; </code></pre> <p>How can I find out if ret_bytes is insid...
c#
[0]
2,474,957
2,474,958
jQuery combine statements? (follow up)
<p>Thanks for the help on my previous post, @AndyE, your solution works great.</p> <p>now for my follow up, same idea, different function(s)...i tried to implement your previous solution, but couldnt get it to work right...:</p> <pre><code>$(document).keypress(function(e) { if (e.which == 27) { $('#timeli...
jquery
[5]
4,965,367
4,965,368
Java: Call subclass out of another subclass
<p>How can I call a subclass out of another subclass, if the first class was initialized in the main class? It's something like that:</p> <pre><code>public class main { Sub1 test = new Sub1(); Sub2 test2 = new Sub2(); Sub2.bummer2(); } </code></pre> <p>Subclass 1:</p> <pre><code>public class Sub1 { p...
java
[1]
5,788,380
5,788,381
Navigate between windows in a simple quiz app
<p>I have to make a simple quiz application in JAVA and I have no idea on how to navigate between windows, for example, how to go to the next question or how to go back. I have a single question per window. Can you give me an idea on how to navigate? Should I use repaint() or a CardLayout or something else? Thanks!</p>...
java
[1]
3,646,246
3,646,247
Access object from hash map
<p>My Hashmap as declared as <code>HashMap&lt;String, ArrayList&lt;SortableContactList&gt;&gt;</code> where <code>SortableContactList</code> list is a POJO class as </p> <pre><code>public class SortableContactList { private long id; private String displayName; private String homePhone; private String w...
java
[1]
479,986
479,987
PARSing JSON to ListView
<p>Okay I have went through tons of examples on PARSing my JSON results, with no luck. I have the below JSON example I don't want status info or geoLocation right now. I just want to use stations object and pick some things from the array to display in my ListView as a list. I don't understand any of the documentation ...
android
[4]
4,736,142
4,736,143
How can I bind events to HTML generated after the page loads?
<p>I'm using jquery <code>.clone()</code> to add HTML to my page according to user clicks.</p> <p>I'd like to add onclick handlers to the newly created HTML. I know <a href="http://api.jquery.com/on/" rel="nofollow"><code>.on()</code></a> can be used to trigger events on future-created HTML, but I believe that must ...
jquery
[5]
2,641,879
2,641,880
php, get values from matrix (array)
<p>I have Matrix and how get value from there? The data obtained from a file, so that the matrix can be of different sizes</p> <p>Thanks</p>
php
[2]
2,539,598
2,539,599
Duplicate methods in java.io.Console?
<p>In <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Console.html" rel="nofollow"><code>java.io.Console</code></a>, there are two methods, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Console.html#printf%28java.lang.String,%20java.lang.Object...%29" rel="nofollow"><code>printf</code></a> and <a ...
java
[1]
4,786,389
4,786,390
How do I set a background color for each item in a list view based on content
<p>So I've been modifying the notepad tutorial code: <a href="http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html" rel="nofollow">http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html</a> . </p> <p>Basically what I want to do is to create specific layout styles (i.e. backgrou...
android
[4]
889,907
889,908
android background service application
<p>Is it possible to create an android application which is purely a background service? There is no need of any icon launcher, layout, etc.If yes, is it possible to do this using eclipse?</p> <p>I just need a Broadcast Listener to listen to my incoming messages and perform some sound and vibration activity. </p>
android
[4]
5,030,631
5,030,632
How can we improve the below line of code?
<p>Can we improve this line of code</p> <pre><code>if ((l_Subscription.PackageInfo.Applications.Where(x =&gt; x.DeviceType != DeviceType.UnKnown)).Count() &gt; 0) { //l_Subscription.DeviceTypeID = ((l_Subscription.PackageInfo.Applications.Where(x =&gt; x.DeviceType == DeviceType.Tablet)).Count() &g...
c#
[0]
2,161,601
2,161,602
slide() gives me error - jQuery
<p>Why does this slide() gives the error</p> <pre><code>$(this).hide("slide", { direction: "down" }, 1000); </code></pre> <p><strong>Error: Message: Object doesn't support this property or method</strong> Thanks Jean</p>
jquery
[5]
8,185
8,186
Debug fails but works in other cases
<p>WHy do I always get |Access is denied| exception during debug ?</p> <pre><code>foreach(Process p in Process.GetProcesses()) { string module=p.MainModule.Filename; } </code></pre> <p>Whatever process it is, the exeption's always called. But it works if I just start without debugging. I'd like to get the full pa...
c#
[0]
1,343,614
1,343,615
how to reference an instance created in another class
<p>I have a function in Class A which I would like to change the value of a field in Class B.</p> <p>Class C has my <code>main()</code> and creates a new instance of class B and Class A. Class A is from an API and one of their functions is a listener function. I would like for that listener function to be able to chan...
java
[1]
3,997,419
3,997,420
Javascript object creation using functions
<pre><code>var boxArea = function() { this.width=2; }; alert(boxArea.width); </code></pre> <p>Good day. Why does this return an undefined value?</p>
javascript
[3]
2,264,768
2,264,769
How generate unique Integers based on GUIDs
<p>Is it possible to generate (highly probable) unique Integer from GUIDs?</p> <pre><code>int i = Guid.NewGuid().GetHashCode(); int j = BitConverter.ToInt32(Guid.NewGuid().ToByteArray(), 0); </code></pre> <p>Which one is better?</p>
c#
[0]
3,126,678
3,126,679
Hide the Application in Application Manager in Android
<p>I want to hide my <strong>Application</strong> in <strong>Android's</strong> <strong>Application Manager</strong>.</p> <p>Is it possible ?</p> <p>How I can achieve this ?</p> <p>Thanks.</p>
android
[4]
3,363,941
3,363,942
Jquery How to build dynamic html
<p>i want to dynamically create 5 tr each having 3 tds with a loop, note: inside each i am filling dynamic html which has dynamic values that are filled from an array</p> <pre><code>&lt;tr&gt; &lt;td&gt;&lt;td&gt;&lt;td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;td&gt;&lt;td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;td...
jquery
[5]
5,868,393
5,868,394
ObjectDataSource - data biding - asp.net
<p>Here the object "BookShop" has properties AuthorName and AuthorId of type "string", Is it possible to code a user defined class like "BookDetails" so that I can specify something like BookDetails.Author or </p> <pre><code>&lt;form id="form1" runat="server"&gt; &lt;asp:DropDownList ID="DropDownList1" runat="server...
asp.net
[9]
1,208,724
1,208,725
Is there a javascript equivalent of .= for self concatenating?
<p>Rather than doing</p> <pre><code>my_var = my_var+'extra string'; </code></pre> <p>is there a shorthand method like .= in php?</p>
javascript
[3]
1,543,135
1,543,136
How to make infinite loop in an Activity
<p>When somebody is doing some game they can do it like this: <code>mainActivity</code> which extends <code>Activity</code> and in this main activity there is a method e.g: </p> <pre><code>setContentView(BouncingBallView); </code></pre> <p><code>BouncingBallView</code> extends <code>View</code> and there we have got ...
android
[4]
5,799,912
5,799,913
Cycle "for" in python like in C
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/477486/python-decimal-range-step-value">Python decimal range() step value</a> </p> </blockquote> <p>I have a cycle in C:</p> <pre><code>for (float i = 0; i &lt; 2 * CONST; i += 0.01) { // ... do something }...
python
[7]
387,127
387,128
How can I bypass IE's popup blocker so my JavaScript popup works?
<p>I have to open a new window</p> <pre><code>window.open(); </code></pre> <p>But in IE, it will detects a popup and block, if I allow then the window is opened.</p> <p>How can I bypass this popup blocker and open it directly?</p>
javascript
[3]
4,092,970
4,092,971
QFlags python alternative
<p>In PyQt4, what is the alternative for:</p> <pre><code>class TestClass { public: enum Option { OptionA = 0x0, // 0x000000 OptionB = 0x1, // 0x000001 OptionC = 0x2, // 0x000010 OptionD = 0x4, // 0x000100 OptionE = 0x8, // 0x001000 OptionE = 0x10 // 0x0...
python
[7]
4,162,272
4,162,273
Deleting a line from a file
<p>Please help to solve this problem. I want to delete every line from a file after reading that line. Can we delete like this? I don't want use any temporary file to do this process.</p> <p>please help me, thank you.</p>
java
[1]
699,838
699,839
java inheritance after compilation
<p><code>class Car extends Viecle</code></p> <p><code>Car</code>is compiled.</p> <p>Class <code>Client</code> uses <code>Car</code>.</p> <p>Are fields and methods from <code>Viecle</code> put into <code>Car</code> class during compilation, or <code>Car</code> simply needs class <code>Viecle</code> to be compiled (an...
java
[1]
4,454,846
4,454,847
prevent go to the top page
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5448962/scroll-go-to-the-top-page">scroll go to the top page</a> </p> </blockquote> <p>Hi all </p> <p>please how i can prevent go to the top page when post back page (asp.net)</p>
asp.net
[9]
5,854,613
5,854,614
Python Syntax Error on Bit Literal
<p>I have inherited this python program and, being sort of a noob with bits and such I can't figure out what the problem is. I am getting a syntax error on the first line of the following function:</p> <pre><code>def tileKey(self, z, x, y): zBits = z &amp; 0xFFL # 8bits, 256 levels. normally [0,21] xBits ...
python
[7]
1,256,824
1,256,825
Operator '&&' cannot be applied to operands of type 'System.DateTime' and 'System.DateTime'
<p>I thought this would work, but apparently it doesn't. Any suggestions please? </p> <pre><code>if (c.ArrivalTime = DateTime.MinValue &amp;&amp; c.ExpiryTime = DateTime.MinValue) { } </code></pre> <p>then I got this, <em>Operator '&amp;&amp;' cannot be applied to operands of type 'System.DateTime' and 'System.DateT...
c#
[0]
5,067,674
5,067,675
Get all elements by inner text
<p>I'm stuck with a problem: I want to search for a string in a html document. So far I tried with window.find(..) method, but I can't get back the node of the found elements. Just for example i can highlight all the matching texts. But I want to put all the nodes in an array, and I can't find a method, which can retur...
javascript
[3]
4,392,276
4,392,277
Removing link from second span
<p>I have a page which list comments of users.</p> <p>My problem is that I have two span</p> <p><img src="http://i.stack.imgur.com/OVyMK.png" alt="enter image description here"></p> <p><img src="http://i.stack.imgur.com/0h31P.png" alt="enter image description here"></p> <p>When i click "devam" link as you see, the...
php
[2]
229,563
229,564
Send Data To Different Domain
<p>I need to send a fairly small amount of data (~215characters) from Domain A to Domain B using only JavaScript (No JQuery, etc). I have full control over Domain B, so how the data gets there really isn't as important as how it's sent (Only using JavaScript) and there is zero need for Domain B to send anything back to...
javascript
[3]
4,620,564
4,620,565
Python: Download Image From Link Without Picture Extension
<p>How would I go about downloading the picture from the following link:</p> <p><a href="http://cdn.svcs.c2.uclick.com/c2/332b584051f7012f2fd300163e41dd5b" rel="nofollow">http://cdn.svcs.c2.uclick.com/c2/332b584051f7012f2fd300163e41dd5b</a></p> <p>Thanks</p>
python
[7]
5,006,511
5,006,512
"blinking" boolean with system.currentTimeMillis()
<p>Why is this value always true? I just can't figure out how to have a boolean that "blinks" every second.</p> <pre><code>long millis = System.currentTimeMillis(); boolean blink = (Math.floor(millis/1000 + 0.5)==Math.floor(millis/1000)); </code></pre>
java
[1]