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
4,402,547
4,402,548
How to create multiple buttons at runtime?
<p>In my Android application, I have to add multiple buttons at runtime at the base of the screen. How can I add onClick listener to each button when adding them?</p>
android
[4]
2,268,576
2,268,577
Get Value of Div after append function
<p>All, I'm using the following code:</p> <pre><code>$(document).on('change','.found_other_vendor',function(){ if(checked){ alert("it was checked"); if($("#other_liked_vendors").val()!=""){ alert("second_one"); $.post(ajaxurl, { clicked_id: clicked_id, action: action }, function(results){ ...
jquery
[5]
5,889,423
5,889,424
Learning Python Exercise
<p>I have taken it upon myself to learn python. As it is my second language is has not been that hard to get the hang of. I am looking for some simple python projects to undertake so I can better learn the syntax of the language in general. I would specifically like to learn the syntax of arrays, lists, and dictionarie...
python
[7]
5,900,862
5,900,863
Google Map Traffic Overlay on Android Device
<p>I am currently doing an android project that shows live traffic congestion report. I am a newbie in Android Dev. I successfully deplayed Google map on my emulator. I also did some overlay control. I would like to do something like Google did, highlight the road with red (congested), orange (moving slowly) and green ...
android
[4]
2,684,893
2,684,894
DateTime.Now.Ticks is too slow
<p>I am making a password generator which can generate a password.</p> <pre><code> var listOfCharacters = "abcdefghijklmnopqrstuvwxyz" //the chars which are using chars = listOfCharacters.ToCharArray(); string password = string.Empty; for (int i = 0; i &lt; length; i++) { ...
c#
[0]
1,084,399
1,084,400
Call a javascript function at distinct time intervals
<p>I've created a stock ticker function and need to call it every 2 minutes.</p> <p>I've succeeded in doing this with the javascript <code>setInterval</code> function, but the problem is on the first call it waits 2 minutes before calling the function, whereas I want the first load to be called right away.</p> <pre><...
javascript
[3]
758,211
758,212
How to show a progress dialog while waiting for share intent to pop up
<p>I noticed on older devices that once you do a standard share intent (fb, twitter, email, etc) there is a few second delay until the actual share dialog is popped up. I was wondering how you would be able to have a progress dialog pop up while you are waiting for this share dialog to show up?</p> <p>Here is my code...
android
[4]
1,319,384
1,319,385
Why do we say that a static method in Java is not a virtual method?
<p>In object-oriented paradigm, a <strong>virtual</strong> function or virtual method is a function or method whose behavior can be overridden within an inheriting class by a function with the same signature to provide the <strong>polymorphic behavior</strong>.</p> <hr> <p>According to the definition, every non-stati...
java
[1]
666,570
666,571
how to get the selected radio buttons value
<p>I have a simple from with 2 radio buttons and I need to get their values if they are checked.</p> <pre><code> &lt;form class="descriptions" id="collection" method="post" action=""&gt; &lt;table width="200"&gt; &lt;tr&gt; ...
jquery
[5]
497,030
497,031
Need username to disappear when clicking
<p>I am new to android and I was goin through a basic login application in android. I just wanted to know how to make the "username" disappear when I click the username field like in all the applications we can see. Now what I have to do is delete the string "username" in the username field and type which I feel is awk...
android
[4]
1,282,426
1,282,427
JavaScript Help and Explanation
<p>Me and a friend were working on a site. I had him do the JavaScript as I am not really familiar with JavaScript.</p> <p>He has since moved away and I am looking at a piece of JavaScript code that I do not really understand. I know what the logic is doing but the structure of the code is unfamiliar to me, I know J...
javascript
[3]
5,729,291
5,729,292
Arc'd jumping method?
<p>Okay, so I'm making a platformer, and I wanna know how I can make a arc'd jump easily. Like what Mario does in super Mario Bros 1. Any ideas on a simple way to accomplish this?</p>
java
[1]
2,359,438
2,359,439
Problems with BufferedOutputStream in Java
<p>I have this line of code in my server/client pair:</p> <pre><code>BufferedOutputStream out = new ObjectOutputStream(clientSocket.getOutputStream()); </code></pre> <p>It works fine, the code works well, then if I modify it to:</p> <pre><code>BufferedOutputStream out = new ObjectOutputStream(new BufferedOutputStrea...
java
[1]
3,948,828
3,948,829
String Constant Pool vs String pool
<p>I am confused about these two things. I need a help. Please clear my doubt, whether String Constant Pool and String pool both are same concept. I faced this question on interview. I have already read lot of sites and blogs but, my doubt is not cleared.Please clear my doubts.</p> <p>Thanks in Advance.</p>
java
[1]
2,823,321
2,823,322
string manipulation
<p><a href="http://stackoverflow.com/questions/2243688/javascript-text-manipulation/2244002#2244002">http://stackoverflow.com/questions/2243688/javascript-text-manipulation/2244002#2244002</a></p> <p>I need to make little manipulation in the string.I need to retrieve the matched text and then replace the matched text....
javascript
[3]
1,237,502
1,237,503
What is the best way to know is $_GET['example']=="somevalue"?
<pre><code>if((isset($_GET[example]))&amp;&amp;($_GET['example']=='somevalue')){ ... } </code></pre> <p>OR</p> <pre><code>if((!empty($_GET[example]))&amp;&amp;($_GET['example']=='somevalue')){ ... } </code></pre> <p>OR just</p> <pre><code>if($_GET['example']=='somevalue'){ ... } </code></pre> <p>I am asking that w...
php
[2]
1,293,611
1,293,612
Javascript: validation for mobile number with paste option
<p>I am working in Javascript. I am trying to make a function on the <code>keypress</code> event. I want to make function for validation on mobile number. I want to allow only digits in it. I also want to allow <em>ctrl+v</em> and <em>ctrl+a</em> in this but I dont want to allow V and A as characters.</p> <p>I have se...
javascript
[3]
2,599,662
2,599,663
Asp.Net hide url of file
<p>I hav an Asp.NET site that displays a PDF/Word/Excel file but I would like to hide the location of the file i.e. if the user requests a file via a link instead of displaying the path just open the filename, I've seen some other posts on other sites but since they are old they do not wok.</p> <p>Any help is apprecia...
asp.net
[9]
2,019,642
2,019,643
Write data from text box to a text file
<p>I have developed a text box and I am trying to write this data to a text file. The PHP code is generating the file but the data is not being written. below is my code: </p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;form name="form" method="post"&gt; &lt;input type="text" name="text_box" size="50"/&gt; &lt;input type...
php
[2]
5,064,333
5,064,334
.ajax won't work in IE
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/10232017/ie9-jquery-ajax-with-cors-returns-access-is-denied">IE9 jQuery AJAX with CORS returns “Access is denied”</a> </p> </blockquote> <p>Have a bit of a problem with my .ajax call to an remote xml file. Works...
jquery
[5]
4,259,454
4,259,455
iAd revenue questions
<p>my app got recently approved, and I have a few questions regarding iAd.</p> <p>1) How much exactly is revenue per impression and per click?</p> <p>2) I have not seen ads showing up on my own device, but they do show up on my friends' devices. Is it supposed to be like this?</p> <p>3) What if someone clicks on di...
iphone
[8]
676,093
676,094
jQuery focus/blur on form, not individual inputs
<p>How could this be achieved via jQuery?</p> <p>When the user clicks on any input in the form, it is focussed. When a user clicks out of the form from any input it is blurred, but, the blur does not get triggered between tabbing between inputs in the form itself.</p> <p>For something like this, we're looking at this...
jquery
[5]
4,488,559
4,488,560
Expected specifier-qualifier-list before ... only in classes in a certain folder
<p>Classes in my iPhone project are organised within folders on the filesystem, these correspond to groups (for each folder) in xcode. My problem is that there seems to be a particular class which classes in a particular group/folder cannot make reference to; the compiler complains of "Expected specifier-qualifier-lis...
iphone
[8]
4,641,551
4,641,552
Performant text-file reading and parsing (split()-like) needed
<p>Currently I have:</p> <ul> <li>1 file with 9 million lines</li> <li>BufferedReader.readLine() to read every line</li> <li>String.split() to parse every line (columns separated by a pipe)</li> <li>A lot of RAM used (because of String interning?)</li> </ul> <p>The problem is: As you may have guessed, I want to read ...
java
[1]
4,003,872
4,003,873
ImageView "Ghost" icons?
<p>I have a strange problem... I made a Tabbed interface within an activity using a custom layout for the tabs and have an ImageView on them. This ImageView holds the icon for the tab.</p> <p>Sometimes it takes a while to load the data when switching to a new tab.</p> <p>During this time - occasionally - it will disp...
android
[4]
5,507,566
5,507,567
Adding getters and setters dynamically to existing class
<p>Any once suggest me how can I add getters and setters dynamically to existing class? I need to create the instance of same class for further use. I will be having Pojo class at compile time. At run time reading property file and need to create getters and setters those entities</p>
java
[1]
1,156,217
1,156,218
Retaining MM/DD/YYYY format in String
<p>I need to write date in MM/DD/YYYY format. From a Date Picker Control. I try to assign it to a DateTime variable. Before Writing it to a file I assign it to a string. I see the value stored in String variable is in DD/MM/YYYY format.</p> <p>Below is assignment statement</p> <pre><code>DateTime startTime, endTime; ...
c#
[0]
3,573,180
3,573,181
In C# use the Delegate class to invoke a constructor
<p>There is a method defined like so:</p> <pre><code>public static void MyMethod(Delegate action, parames object[] parameters) { action.DynamicInvoke(parameters); //Do something } </code></pre> <p>So far this method works very well to receive all kinds of method and functions with any number of parameters but I...
c#
[0]
2,177,055
2,177,056
JQuery get border attribute of image (not css)
<p>I'm trying at this:</p> <pre><code>var cur_border = $('id_grid_pic_'+cur_id).attr('border'); alert(cur_border); </code></pre> <p>But the alert sends back "object". I am wanting to get the value of the border=1 attribute of an image.</p>
jquery
[5]
592,518
592,519
What makes new Date() / 1000 a valid javascript?
<p>How come I can "divide" an object by a number? </p>
javascript
[3]
1,988,598
1,988,599
Does locking apps need root access ?
<p>I am working with a developer to develop an app that will provide parents with some control over Android Tablet PC. This include locking the camera, blocking access to some apps, blocking websites, blocking some advertising networks ..etc. The developer is telling me the devices need to be rooted. </p> <p>So can ...
android
[4]
4,589,884
4,589,885
String.replace()?
<p>I have to replace '/' to '\' in a String value. The given string would be like:</p> <pre><code>String url = "//machineName/TestFolder/SampleFile.html"; url = url.replace('/', '\\'); </code></pre> <p>Here, the output of url is like: </p> <pre><code>\machineNameTestFolderSampleFile.html </code></pre> <p>Why is it ...
java
[1]
1,533,950
1,533,951
Manipulating TCP Header Flags in Android
<p>I'm trying to write an app that is able to send individual TCP packets with specific TCP header flags set (syn,ack,fin,etc). As far as I know, the only potential way to do this is with JNI. So I did some searching and found jnetpcap, which I was able to compile and load using these instructions: <a href="http://jnet...
android
[4]
226,218
226,219
PHP Random Display of Variables
<p>I have a variable called </p> <pre><code> $core </code></pre> <p>I also have 3 other variables called </p> <pre><code> $one, $two, $three </code></pre> <p>I need to (many times) display a random combination of these where $core is always included and 1 of the 3 other variables are included once either before or...
php
[2]
5,410,439
5,410,440
PHP 5.2 will not echo a <
<p>I can not get a <code>&lt;</code> to go into a an array or echo out. If I use <code>echo "From: &lt;test@none.net&gt;";</code> the result is <code>From:</code>.</p> <p>If I use </p> <pre><code>$mailheader[] = "From: ".$current_user-&gt;display_name." &lt;".$current_user-&gt;user_email."&gt;\r\n"; $mailheader[] = ...
php
[2]
2,240,684
2,240,685
jQuery CSS not applying
<p>I'm using <a href="http://stackoverflow.com/questions/4619025/jquery-change-css-color-based-on-inline-style-width">this</a> jQuery with this:</p> <pre><code>//Table select $("#reports-table tr").click( function(e) { if($(e.target).is(".row-button-small")) return; var detail_id = $(this).attr('i...
jquery
[5]
5,796,424
5,796,425
Mantaining dropdown.. Script is so long?
<p>I've read that using session is one way to retain the values from PHP submit failure. The data is wiped out as soon as you send the form to the server so to get back the data, a session should be use. I have a dropdown that is a list of country. It contains more than 60-80 countries. I used the ternary condition to ...
php
[2]
5,849,635
5,849,636
System.IO.FileMode.Open
<p>For my system, i first need to read CSV file and then i need to connect to the database in SQL server 2008 according to the data in .ini file.</p> <p>I use System.IO.FileStream() to read file. There is no problem to open and read data.</p> <p>But, when i read csv file and then connect to the database , i cant acce...
c#
[0]
1,032,664
1,032,665
Android setTitle in the tab ActivityGroup
<p>My application is Tab using ActivityGroup.I have done title of each activity using <code>getParent().getParent().setTitle("New Tilte");</code>. </p> <p>My Problem is :</p> <p>I have 2 tab.</p> <p>Sale have 3 child . </p> <pre><code> RouteActivity - Title--Route Retailer - Title--Retailer OrderActivity - T...
android
[4]
2,087,978
2,087,979
PVMFErrContentInvalidForProgressivePlayback MediaPlayer IOException: Prepare failed.: status=0xC8
<p>I want to play video from a URL via HTTP. I read <a href="http://developer.android.com/guide/topics/media/index.html" rel="nofollow">Media Tutorial</a> and other stackoverflow questions. Here is my code:</p> <pre><code>String url = "http://..../myVideo.mp4" MediaPlayer mediaPlayer = new MediaPlayer(); mediaPlayer.s...
android
[4]
3,946,312
3,946,313
Setting UITextField Delegate Using Interface Builder and Not Updating the Header File
<p>I am stepping into the deep waters of IPhone development. I have the following header file. </p> <pre><code>// // FirstProjectViewController.h // FirstProject // // Created by Mohammad Azam on 6/25/10. // Copyright HighOnCoding 2010. All rights reserved. // #import &lt;UIKit/UIKit.h&gt; @interface FirstProjec...
iphone
[8]
2,909,404
2,909,405
Jquery Function required to replace content in a String
<p>I have a textarea where users can type content and also include emoticon symbols like :) or ;)</p> <p>When 'Sent' is pressed the textarea string needs to be parsed to convert any emoticon symbols into <code>&lt;img&gt;</code>'s for display.</p> <p>I can easily generate a list of emoticons and there relevant image ...
javascript
[3]
5,623,539
5,623,540
how do i make a stack out of a linked list?
<p>I'm trying to create a Stack to take a string and add each of the strings characters to it, but I was told it would be far more efficient use a LinkedList. How would I use a LinkedList to create and manipulate a stack? </p> <p>An example would be very appreciated! </p>
java
[1]
5,506,318
5,506,319
Parse JSON with Jquery
<p>How do I parse this? I'm working with WordPress and Jquery.</p> <pre><code>{ "MyCustomOutput": [ { "id": "2", "name": "This is the name of the custom output", "version": "1.00", "description": "This is the Description", "changelog": "This is t...
jquery
[5]
2,936,230
2,936,231
How to minimize compilation time in C++
<p>I've coded an script that generates a header file with constants like version, svn tag, build number. Then, I have a class that creates a string with this information.</p> <p>My problem is the following: As the file is created in every compilation, the compiler detects that the header has changed, and forces the re...
c++
[6]
1,261,075
1,261,076
give a function as parameter
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4685563/how-to-pass-a-function-as-a-parameter-in-java">How to pass a function as a parameter in Java?</a> </p> </blockquote> <p>How can i give a function as parameter?</p> <p>for example:</p> <pre><code>for(Co...
java
[1]
1,714,868
1,714,869
asp.net vb 2008: searching in grid results
<p>We have a client who wants the following:</p> <ol> <li>display all equipment in a grid</li> <li>when entering a search string in two textboxes which target different columns, automatically search on either entered string</li> <li>grid holds approximately 5000 items and must be paged and header-sortable</li> </ol> ...
asp.net
[9]
921,116
921,117
variable in definition
<p>I'm loading an XML file into the page and want to get information from the URL parameter and put it in the url for the XML file that simplexml is laoding. is this possible? Here is the current code:</p> <pre><code>$gid = $_GET['gid']; $gach = simplexml_load_file('http://xml.com/GIDHERE/page.html?xml=1'); </code><...
php
[2]
4,634,563
4,634,564
how can let two windows(a window is opened by another) communicate
<p>if the title is not clear let me describe it again if has a page a.html that has a javascript code below</p> <pre><code> window.open("http://www.baidu.com/", "_self", ""); </code></pre> <p>and how can the original window and the new opened window communicate??</p> <p>thanks</p>
javascript
[3]
5,194,415
5,194,416
how do I close all the activities in Android in one simple click
<p>I know that the mechanism of android about stacks work as a stack each one of them goes above each other, what i want is how to make it clear and exit the app with one single click. I google it and i found some long code instead of this should have been very easily and simple to do it.</p> <p>Thanx</p>
android
[4]
22,251
22,252
Altering list while iterating
<p>Python noob here. I have a list of numbers represented as strings. Single digit numbers are represented with a zero and I'm trying to get rid of the zeroes. For instance, ['01', '21', '03'] should be ['1', '21', '3']. </p> <p>My current solution seems a bit clumsy:</p> <pre><code>for item in list: if item[0]...
python
[7]
206,649
206,650
Best way to explain why something failed
<p>Suppose I had the following method in an object:</p> <pre><code>public class foo { public bool DoSomethingAwesome() { bool bar = DidSomething() //suppose this sends an email; return bar; } } </code></pre> <p>If I wanted to provide more detail on why DidSomething returned a false would ...
c#
[0]
2,368,953
2,368,954
Asp.net Account in windows 7?
<p>I want to authorize the asp.net account to access some folders in my project.</p> <p>However, I get this error::</p> <blockquote> <p>System.UnauthorizedAccessException: Access to the path 'D:\ProgramingPart\FromYamn\WebExercise\WebExercise\AccordionImgs' is denied.</p> </blockquote> <p>I am using win 7 so what ...
asp.net
[9]
4,791,155
4,791,156
How do i hide the <h2> if the <h1> appears
<p>I'm working on a WordPress site that automatically displays an <code>h2</code> on the page as what the page/post is titled. I want to manually create <code>h1</code> for some pages and have the <code>h2</code> to be hidden if the <code>h1</code> appears. </p> <p>Is there a way to do that?</p>
php
[2]
1,931,814
1,931,815
php preg_replace problem
<pre><code>$strSubject= preg_replace('/\b'.$strWord.'\b/i', '&lt;b&gt;'.$strWord.'&lt;/b&gt;', $strSubject); </code></pre> <p>above code works in php 5.2.6 but not working in php 5.2.9 and get " warning,unknow modifer....." error. please help</p>
php
[2]
3,211,607
3,211,608
I want to pass three different strings to my main method in java. How do I do this?
<p>I want people to enter there first name then middle name then last name inside of a method. I then want to pass all three variables into my main method.</p> <p>Is there anyway I can do this? </p> <p>And how would I get the different data stored in my main method?</p>
java
[1]
5,570,370
5,570,371
Duplicate folder with PHP
<p>I've been searching all morning for this.</p> <p>Is there a simple PHP function that will duplicate a folder on my server, changing permissions temporarily along the way if needs be? Basically a PHP alternative to me using FTP to copy an entire folder down and then back up again?</p> <p>I've tried the function bel...
php
[2]
1,167,437
1,167,438
Tracer une courbe point par point sur Android - Trace a curve from a list of points in Android
<p>J'ai à tracer une courbe 2D à partir d'une liste de points sur une vue Android mais j'ai rien trouvé sur ce sujet. Pouvez-vous m'aider?? Merci</p> <p>I have to trace a 2D curve from a list of points in Android, but I can't find anything on this subject. Can you help me? Thank you.</p>
android
[4]
3,748,454
3,748,455
Is the behavior of "a=(b+n)/++n" defined?
<p>I am wondering if following expression has defined behavior (always equal to "<code>a=n/(n+1); ++n;</code>") in C++?</p> <pre><code>a=n/++n; </code></pre>
c++
[6]
3,126,590
3,126,591
Python: Make a class to read files in a directory
<p>I am trying to teach myself how to make classes in Python. I am currently able to write a class that enables me to draw multiple shapes using the same class which is pretty basic.</p> <p>I am having trouble with more advanced tasks using classes, for instance I would like to be able to make a class which includes f...
python
[7]
33,874
33,875
Android 4.0.4 TabActivity
<p>I have a app which uses TabActivity and now as the device to upgraded to Ice cream sandwitch, formatting of the tab name is not working. Also images do not show up.</p> <pre><code> intent = new Intent().setClass(this, StnAircrafts.class); intent.putExtra("EmpID", empid); intent.setFlags(Intent.FLAG_ACTIV...
android
[4]
1,666,032
1,666,033
Sub domain file not found
<p>I am making a sub domain. I have made the adjustments to the IIS and get no error with a simple htm page but get this Error.htm?aspxerrorpath=/server/default.aspx when I try to put an aspx page there in the sub folder. 'server' is the sub domain.</p> <p>What am I missing? </p>
asp.net
[9]
4,566,096
4,566,097
Not working in move_uploaded_file for For Loop
<pre><code>for($i=0;$i&lt;count($sentto1);$i++) { $sel="insert into newmessage set sendto='".$sentto1[$i]."', sendfrom='".$almemailid."', subject='".$subject."', message='".$color."', attac='".$fi...
php
[2]
1,311,313
1,311,314
Split string into array of equal length strings
<p>I have a string that I need split into smaller strings with an equal length of 6. I tried using:</p> <pre><code>'abcdefghijklmnopqrstuvwxyz'.split(/(.{6})/) </code></pre> <p>But it returns an array with empty strings like so:</p> <pre><code>["", "abcdef", "", "ghijkl", "", "mnopqr", "", "stuvwx", ""] </code></pre...
javascript
[3]
5,839,933
5,839,934
Is it required to have Apple OS X Macintosh to deploy iPhone App through App Store?
<p>If I use third party package like PhoneGap and Titanium that allows you to develop native iphone app using plain javascript, css and html without using any object-c, am I still required by Apple to use Apple Mac OS X computer to actually deploy and go through Apple approval process of finished iphone App? Also the s...
iphone
[8]
103,891
103,892
object name same a function name?
<p>If We have </p> <pre><code>var randomname = {}; randomname.attribute = 'something'; function randomname(){ alert(randomname.attribute); } randomname(); </code></pre> <p>Will javascript throw any errors?</p> <p><hr /><strong>Update</strong><br /> So, We know that we cannot have a object have the same name as a ...
javascript
[3]
3,308,026
3,308,027
How do I avoid hiding (or dismissing) an AlertDialog when clicking a NeutralButton?
<p>I'm trying to use a multiple selectable dialog as the code below. And I want to use a neutral button to deselect all the items in the list. But when clicking a button whichever on the dialog, the dialog disappears immediately, I assume it must be a default action. But I want to remain it since a user doesn't expect ...
android
[4]
2,404,778
2,404,779
onTouchEvent how to get curret view under finger
<p>this is my code </p> <pre><code>public class Main extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout rLinear=new LinearLayout(this); rLinear.setId(200); for (int c=0;c&lt;5;c++)...
android
[4]
3,167,860
3,167,861
can't access child node's value but i can access child node's name
<p>when i try to access child nodes i can , but i can't access their value it says null</p> <pre><code> if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLH...
javascript
[3]
4,221,416
4,221,417
resolve of scanning cannot be resolved or is not a field
<p>hi i want to do one tutorial named bluetoothChat from google but i get this kind of erros:</p> <p>scanning cannot be resolved or is not a field-for line-setTitle(R.string.scanning);</p> <blockquote> <p>id cannot be resolved or is not a field -for line-findViewById(R.id.title_new_devices).setVisibility(View.V...
android
[4]
3,548,002
3,548,003
System.out could be set or not?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5951464/java-final-system-out-system-in-and-system-err">java: “final” System.out, System.in and System.err?</a> </p> </blockquote> <p>Direct setting of <code>System.out</code>,</p> <pre><code>System.out = null;...
java
[1]
5,887,505
5,887,506
Create a function and assign its return to a variable
<p>Is there a one line way of doing this? Eg: </p> <pre><code>var myVare = function(params){ if(param.condition){ return 'a'; }else{ return 'b'; } }(param:{condition:'abc'}); console.log(myVare);//I would like it to be == to 'a' </code></pre>
javascript
[3]
3,876,361
3,876,362
What is wrong with this javascript and canvas code?
<p>Tutorial : <a href="http://thecodeplayer.com/walkthrough/make-gauge-charts-using-canvas-and-javascript" rel="nofollow">http://thecodeplayer.com/walkthrough/make-gauge-charts-using-canvas-and-javascript</a> Customised (Working) : <a href="http://jsfiddle.net/lewisgoddard/JyGkQ/29/" rel="nofollow">http://jsfiddle.net...
javascript
[3]
816,943
816,944
Need to set background of live wallpaper using images from sd card
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3208708/setting-the-wallpaper-from-an-image-on-the-sdcard">Setting the Wallpaper from an Image on the SDCard</a> </p> </blockquote> <p>i am working on live wallpapers .i need to display images from sd card as li...
android
[4]
5,235,291
5,235,292
Android: My game keeps starting from the beginning if the view orientation changes
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5263346/problem-while-changeing-the-orientation-in-android-app">problem while changeing the orientation in android app</a> </p> </blockquote> <p>I have a card game app I'm working on. When I flip the android de...
android
[4]
396,898
396,899
ASP.NET SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value
<p>I got error for DropDownList11 that say "'DropDownList11' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value". The other dropdownlists with SQLDatasource work fine. I manually create this dropdownlist in edit DetailsView. Once it selected and click update, it w...
asp.net
[9]
1,153,975
1,153,976
Is it possible to use content:// as a source for an <audio> element in a WebView
<p>I created a ContentProvider. It exports files within my assets/ directory. I'm using content:// urls to access the exported content in a WebView. </p> <p>The following HTML works as expected:</p> <pre><code>&lt;img src="content://&lt;provider-name&gt;/test.jpg"&gt; </code></pre> <p>I'm trying to use the content p...
android
[4]
4,080,113
4,080,114
Fade class out with delay w/jQuery
<p>I have the following two functions. One checks for a class and if none found it removes another class. The second function executes the first one with delay. Both work well, but instead of abrupt removal of a class I would like to fade it away gradually. Here's what i have so far. Need to fadeOut .txtCCC.</p> <pre>...
jquery
[5]
4,495,305
4,495,306
Private variables in inherited prototypes
<p>I think I have misunderstood how Javascript prototypal inheritance works. Specifically, the prototypes internal variables seem to be shared between multiple different sub-objects. It is easiest to illustrate with code:</p> <pre><code>var A = function() { var internal = 0; this.Increment = function() { ret...
javascript
[3]
3,246,383
3,246,384
Max connections
<p>What is max connections in a web.config?</p> <p>If it is 40, does it mean only 40 users can be connected at a time?</p> <p>Thanks.</p>
c#
[0]
2,260,142
2,260,143
DrawString Centered Text in C#
<p>Today I am trying to draw a string on a form, but need to be drawn exactly in the middle, I have sought functions but I do not see the parameters of the rectangle centered or obtained automatically.</p> <p>If someone would kindly give me some function in which to center the text automatically. The commands I use ar...
c#
[0]
1,466,590
1,466,591
Javascript Table Navigation
<p>I am working on script that searches and downloads something from a website, but during the I would like it to be able to skip to the next page of the table when it's done with the current page and continue searching. I have tried commands like:</p> <pre><code>document.getElementById("Skip to next page of results")...
javascript
[3]
4,683,003
4,683,004
C# data structures
<p>I'm building an app in C#, however I'm new to the language though its pretty easy to learn because its too damn similar to Java.</p> <p>However, I'm getting lost with the data structures as I haven't found a list of comprehensive available data structures with their methods like how Java has them.</p> <p>Anyone ha...
c#
[0]
3,735,050
3,735,051
Which way is the best for removing duplicates from a dataTable with multiple columns
<p>Which way is the best for removing duplicates from a dataTable for multiple columns?I mean below code is only for a single column.</p> <pre><code>public DataTable RemoveDuplicateRows(DataTable dTable, string colName) { Hashtable hTable = new Hashtable(); ArrayList duplicateList = new ArrayList(); //Add li...
c#
[0]
2,225,416
2,225,417
opening MS word document without using com object
<p>Hai frnd can give me some solution.. 1.how to open ms word document without using com(word.application) 2.actually i want to edit existing document only changing content without affecting any properties?</p>
php
[2]
931,071
931,072
display map in fragment of viewpager
<p>I want to display Map in one of my <code>Fragment</code> I am using 4 fragments in which one shows the map but i don't want to use <code>LocalActivityManager</code>to host a Activity inside a fragment. It is a deprecated class, but it offers the simplest solution.</p> <p>By using <code>MapActivity</code> it is sta...
android
[4]
554,307
554,308
Why it is not possible to use IList<T> in interface definition and List<T> in inplementation?
<p>Why it is not possible to use IList in interface definition and then implement this property using List? Am I missing something here or just C# compiler doesn't allow this?</p> <pre><code>public interface ICategory { IList&lt;Product&gt; Products { get; } } public class Category : ICategory { public List&l...
c#
[0]
2,003,551
2,003,552
Why won't my lines move?
<p>Okay, so I'm calling a function that draws three lines to display an 'I' on-screen. Then, I call another function which calls this function, but adds 1 to the x variable to make a the letter bold. Then I want to put x++ add in the 'tick' function, which executes every frame. It isn't working, but why? If you don't u...
c++
[6]
2,075,123
2,075,124
C# WebBrowserDocumentCompletedEventHandler inside of foreach loop
<p>How do I cause the documentCompleted event to actually wait for completion inside a foreach loop.</p> <p>The StaticStringclass.URLList is a list of websites, so just like www.google.com,www.aol.com.</p> <p>Any advise is awesome.</p> <p>StaticStringClass.holderList = new Queue();</p> <pre><code> StaticStri...
c#
[0]
3,404,634
3,404,635
Create a fixed menu bar
<p>I got to create a fixed menubar on the top of the screen with two image buttons in it. How can i do that ?</p> <p>Thanks,</p>
android
[4]
1,775,596
1,775,597
Includes and Functions calls
<p>I just want to confirm something as my understanding has been shaken by a test I did on another server that I expected something to work and it didn't. Please see question in code below.</p> <pre><code>&lt;?php function xyz(){ } include("test.php"); /* * A function in the above include checks if the function abc...
php
[2]
4,350,114
4,350,115
getting error with learn python the hard way exercise 14
<p>I am following zed shaw's learn python the hard way and am following exercise 14. Here's the program I am talking about:</p> <pre><code>from sys import argv script, user_name = argv prompt = '&gt; ' print "Hi %s, I'm the %s script." % (user_name, script) print "I'd like to ask you a few questions." print "Do you ...
python
[7]
5,173,592
5,173,593
Post to a forum or blog via PHP
<p>This is a random question but, Is it possible to make a PHP script (or another web based language) to login to a forum or a wordpress blog and make a post there? I would like to login to my own account on various forums, and post the same update to each one.</p> <p>Obviously if it's not possible then oh well, but I...
php
[2]
245,852
245,853
Android List view color change
<p>I am having a list view in which i wanna to change the color when user clicks or scroll down over the List.. I included listSelector in the XML attributes its not working.. Is there any way to color change when the list scroll down..</p> <p>My code is :</p> <pre><code>&lt;ListView android:id="@+id/allcity" ...
android
[4]
212,017
212,018
what is the most suitable PHP based POS System for resturant
<p>hi I did already searched web and throughout Stactoverflow before asking my questions with no luck.Mine's are more like experience based questions. To save your time understanding them, i will write with number list.</p> <ol> <li>my project is take away pizza shop (no delivery)</li> <li>server environment is linux<...
php
[2]
2,562,254
2,562,255
Best way to handle device orientation iPad
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2815802/iphone-ipad-orientation-handling">iphone/ipad orientation handling</a> </p> </blockquote> <p>i beg your pardon. i am very new in iOS. would you please tell me the best way to handle device orientation. <...
iphone
[8]
2,361,092
2,361,093
Use of header in PHP
<p>What are some possible uses of the <code>header</code> function in PHP?</p> <p>Could someone provide me with some links for reading about this function?</p> <p>Thank you.</p>
php
[2]
137,096
137,097
Execute a Program Which Accept Command Line Parameters
<p>How to Execute a Program Which accepts Command Line Parameters in c#?</p>
c#
[0]
2,834,858
2,834,859
Python Lambdas and Variable Bindings
<p>I've been working on a basic testing framework for an automated build. The piece of code below represents a simple test of communication between two machines using different programs. Before I actually do any tests, I want to completely define them - so this test below is not actually run until after all the tests...
python
[7]
3,935,639
3,935,640
how to use setpixel function in iphone
<p>how to use setpixel function in iphone</p>
iphone
[8]