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
5,583,131
5,583,132
iPhone how to create scrollable filter like Mashable App?
<p>I'd like to create a scrollable filter just below the navigation bar like in the Mashable iPhone app.</p> <p>Here's what it looks like:</p> <p><a href="http://itunes.apple.com/us/app/mashable/id356202138?mt=8" rel="nofollow">http://itunes.apple.com/us/app/mashable/id356202138?mt=8</a></p> <p><a href="http://img20...
iphone
[8]
2,549,191
2,549,192
How can i replace Space with %20 in javascript
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/853804/jquery-javascript-replace-space-in-anchor-link-with-20">jQuery / Javascript replace &lt;space&gt; in anchor link with %20</a> </p> </blockquote> <p>I am getting sParameter like this :</p> <p><code>sParam...
javascript
[3]
5,106,268
5,106,269
Android: Reading from file (Openfileinput)
<p>I am writing a basic notepad app for a unit at uni. I have created the main class with an editText which I save as string textOutput. </p> <p>I have used the following code from the android developers website to save the string to a file:</p> <pre><code> FileOutputStream fos = openFileOutput(textOutput,...
android
[4]
3,901,749
3,901,750
Iterate two Lists or Arrays with one ForEach statment in C#
<p>This just for general knowledge:</p> <p>If I have two, let's say, <strong>List</strong>, and I want to iterate both with the same foreach loop, can we do that?</p> <p><strong>Edit</strong></p> <p>Just to clarify, I wanted to do this:</p> <pre><code>List&lt;String&gt; listA = new List&lt;string&gt; { "string", "s...
c#
[0]
2,783,942
2,783,943
Array iteration issue
<p>I have this array which I echo and get this result:</p> <pre><code>$hostess_ids=array(); while($row=mysql_fetch_array($resulthst,MYSQL_ASSOC)){ $hostess_ids[]=$row['hostess_id']; } $j=0; foreach($hostess_ids as $hostess_selected){ $hostess_array= explode("-",$hostess_selected); for ($j=0; $j&lt;count($...
php
[2]
5,015,546
5,015,547
BalloonTip can I set diffrent colors to the title?
<p><br> <code>notifyIcon1.ShowBalloonTip</code><br> 1. Can I set the title to a diffrent color?<br> 2. Can I prevent one ballon tip to override the previous one? that means to wait until the previous dissapear and only then show?</p> <pre><code>notifyIcon.ShowBalloon(20000, "My Title", "My Text", ToolTipIcon.Info); </...
c#
[0]
5,514,969
5,514,970
What type of View I can use for text+images report?
<p>I want to make some sort of <strong>non-editable</strong> "report" view with images, titles and text in it. Images generates in code, not from bandle, so I can't use UIWebView.</p> <p>User puts some data into previous view and press "done" - Next view opens with </p> <pre><code>"generated image some text titl...
iphone
[8]
4,108,339
4,108,340
How can i put navigationbar after a splash screen?
<p>I an new in iphone application i want to put Nevigation controller after a splash screen so how can i put?Is there any way to put nevigationbar in my application without Splash Screen. </p>
iphone
[8]
4,482,753
4,482,754
How can I draw a text in my view?
<p>How can I draw a text in drawRect?</p>
iphone
[8]
2,530,506
2,530,507
Adding multiple rows to the table at once based on textbox value?
<p>This is a table I created using html code, and there is a textbox field for user to insert the value. </p> <p>If the user insert two of them and click go, the 2 rows will be automatically added at once to the table below but I there is only available to add one row when clicked. </p> <p>Is that possible to add mor...
javascript
[3]
2,411,674
2,411,675
Expanding List? (android)
<p>So i want to make a list that has a number of items on the list but when a item is clicked i would like it to expand in the list to revile more information</p> <p>i have done something similar with java script before but searching google isnt helping me :(</p> <p>Does any one know a way i can achieve this or will ...
android
[4]
2,074,090
2,074,091
Help with windows path - PHP
<p>I have this path and it is correct however, the browser will not include the source file unless I put "file:///" in front of it. I'm still developing and this will ultimately be on a Linux machine but in the mean time, I'd like to see my work as well as be able to troubleshoot it. Is there a solution for this?</p> ...
php
[2]
3,430,557
3,430,558
Is it possible to wake up iPhone?
<p>I would like to know if it's possible to programatically wake up the iPhone from sleep? I have an NSTimer set to play a sound after a certain amount of time, but I also want it to wake up the iPhone when the timer rings. Is this at all possible? Thanks!</p>
iphone
[8]
872,214
872,215
JQuery .hover() functions external
<p>I run into a little problem today. I've a divbox. This divbox should expand if I hover it and should collapse if I leave it. </p> <p>so I write two functions:</p> <ol> <li>function expand(){....};</li> <li>function collapse(){....};</li> </ol> <p>and then i tried to do the hover effect as following:</p> <pre><co...
jquery
[5]
3,652,788
3,652,789
how to trim the Unicode \u0085 character in a String in Java
<p>I'm not able to trim the unicode control character <code>\u0085</code> in Java. How can you do this?</p> <pre><code>String str = "\u0000\u001f\u0085 hi \n" PrintStream out = new PrintStream(System.out, true, "UTF-8"); out.println(teststr); String st = teststr.replaceAll("\\p{Cntrl}", ""); out.println(st); </code></...
java
[1]
5,190,424
5,190,425
How to strip everything from a variable apart from text and numbers
<p>I'm new to PHP and i'm wondering how i would write a function like this, is there a existing function for this? </p>
php
[2]
5,758,926
5,758,927
Android - methods to alert a user?
<p>I have an android application that gets data from the web such as an event title, location, date and time. I'd like to alert the user when it is time for the event. I've tried using the calendar API but that seems to be quite vague and unsupported by android. Are there any other ways to alert a user when there is an...
android
[4]
4,081,533
4,081,534
How to compile and host asp.net websites?
<p>I'm trying to understand the basics of deploying a c#.net website on a Godaddy server. As of now, project runs properly when I press F5 in Visual Web Developper 2010. However, when I upload it I get the error: constants does not exist in the current context. constants is defined in the file constants.cs which is loc...
asp.net
[9]
5,504,842
5,504,843
How to place the selected Li in h4 using jquery
<p><a href="http://jsfiddle.net/soul/EamPb/" rel="nofollow">complete code JSFIDDLE</a></p> <p>as shown in the code the selected state comes below the h4 , how to display the selected state in h4 and after selecting a state it just shows that particular state and not able to select other states</p>
jquery
[5]
5,801,219
5,801,220
need to convert UTC (aws ec2) to PST in python
<p>I need to convert UTC time, (on ec2 instance) to PST. I am trying to do this. </p> <pre><code>from datetime import datetime from pytz import timezone import pytz date_format='%m/%d/%Y %H:%M:%S %Z' date = datetime.now() print 'Current date &amp; time is:', date.strftime(date_format) my_timezone=timezone('US/Pacifi...
python
[7]
3,546,150
3,546,151
inaccurate values in listitem
<p>I have the following code that should generate listitems from a string that came from server. The code is as follows: </p> <pre><code>foreach (String str in years) { if (string.IsNullOrEmpty(str) || str.Equals(" ")) { System.Diagnostics.Debug.WriteLin...
c#
[0]
30,609
30,610
Why we cant create protected methods in JAVA intefaces?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/423032/interfaces-in-java-cannot-make-implemented-methods-protected-or-private">Interfaces in Java: cannot make implemented methods protected or private</a> </p> </blockquote> <p>By default all the methods in in...
java
[1]
5,669,118
5,669,119
In Python how can I copy a list of dictionaries, and filter specific keys, including nested ones?
<p>If I have a dictionary, which contains lists, dictionaries, strings, and integers, how can I copy that dictionary, but only specific white listed keys?</p> <p>Filtering <code>old_dict</code> through this function would give me <code>new_dict</code>. The white listed keys can be in whatever format, but the solution ...
python
[7]
5,276,897
5,276,898
How to edit file on console from Java?
<p>I'm trying to edit a file from CLI. I'm executing the <code>nano</code> command (I know that command will always be available); when I execute it, I can see nano's output but I cannot interact with it. How can I pass user input to the command? Do you have a better idea to easily edit a file from within my Java app?<...
java
[1]
4,729,258
4,729,259
Functions with dependencies passed as parameters
<p>I'm working on a project where I'm batch generating XML files which can import to the IDE of an industrial touchscreen.</p> <p>Each XML file represents a screen, and most screens require the same functions and the process for dealing with them is the same, with the exception of the fact that each screen type has a ...
python
[7]
754,460
754,461
Javascript Notification Pop-up?
<p>Looking for the best approach to perform a javascript notification pop-up if amount in field A is edited to a smaller amount that what is found in field B?</p> <p>We aren't using any js frameworks but that option isn't ruled out.</p> <p>Thanks.</p>
javascript
[3]
5,065,419
5,065,420
Crawling Twitter with Java twitter4j and building graph of relationships
<p>I am new to crawling social networks. Nevertheless, I need to write <strong>Twitter</strong> crawler that basically goes through <strong>Twitter</strong> and builds <strong>dependency</strong> *<em>graph</em>* between <em>Users</em> (with respect to relations like for example <strong>follows</strong>, <strong>mentio...
java
[1]
2,629,299
2,629,300
Piecewise equation program
<p>I did this program which is a piecewise equation program and I just want to know if i did anything wrong or if i missed anything. The answers are coming out to be right but just wanted to make sure i didn't miss any coding.</p> <pre><code>class RecursiveMethods { RecursiveMethods() //default constructo...
java
[1]
3,808,821
3,808,822
I want that when the mouse is over one option in my dropdownlist, the background color of the option value on my second mask must be changed
<p>I have 2 dialog mask on my window. </p> <p>On the fist one I have a drop-down list with different option values.</p> <p>On the second I have a div table.</p> <p>I want that when the mouse is over one option in my drop-down list, the background color of the option value on my second mask must be changed and when I...
jquery
[5]
2,126,240
2,126,241
How to check if sendBroadcast has finished his job
<p>I got little problem. I'm refreshing my sdcard using:</p> <pre><code>sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory()))); </code></pre> <p>and I have created <code>ProgressDialog</code> with a spinner which pops out at the start ("at the start" ...
android
[4]
124,005
124,006
Issue with member of custom object
<p>I have a custom class</p> <pre><code>@interface XYZ : NSObject </code></pre> <p>{ int sum; .... }</p> <p>@property (nonatomic, assign) int sum; .....</p> <p>In my method, I initialize a new class as:</p> <pre><code>XYZ *myClass = [[XYZ alloc] init]; </code></pre> <p>Then in a for loop in that method, I ...
iphone
[8]
4,599,728
4,599,729
skip an element in zip
<p>I have two files that are <code>zipped</code> with something like the following:</p> <pre><code>for line in zip(open(file1), open(file2)): # do-something </code></pre> <p>Unfortunately, now file2 has changed, and there is an additional line at the beginning. Yes, I could get rid of that manually (or with an ad...
python
[7]
1,734,200
1,734,201
get id's of immediate child divs of a div in jquery?
<p>how do i get the child divs and put it in a array?</p> <pre><code>&lt;div id="parent"&gt; &lt;div id="child1"&gt;&lt;/div&gt; &lt;div id="child2"&gt;&lt;/div&gt; &lt;/div&gt; var array = $('#parent &gt; div').... (im stuck). </code></pre> <p>thanks!</p>
jquery
[5]
2,012,820
2,012,821
Warning: Cannot modify header information (PHP)
<p>I have the following error:</p> <p>Warning: Cannot modify header information - headers already sent by (output started at /home/sn2010/public_html/pagetwo.php:10) in /home/sn2010/public_html/pagetwo.php on line 15</p> <p>It happens when I go to pagetwo.php... You can try it here: <a href="http://sn2010.x10.mx/" re...
php
[2]
5,278,800
5,278,801
Support for different devices (action bar, left nav)
<p>I noticed that for older devices running the FB application it doesn't have action bar or the slide-in left nav. Is it common practice to have 2 different releases? Or is the same app built to accomodate all versions the best thing to do</p>
android
[4]
3,743,242
3,743,243
CSharpCodeGenerator error
<p>I am having this strange problem with my Visual Studio. Everytime, I open a project I get a warning in the Watch window saying "The type initializer for "Microsoft.VisualBasic.VBCodeGenerator" threw an exception. I get the same error when trying a C# project, but with the CSharpCodeGenerator error. When I attempt to...
c#
[0]
2,467,141
2,467,142
PHP 5.3 and '::'
<p>I started into PHP with 5.3 and am using the '::' to access constants ex; class::const. However, when I try to use my code in an older PHP namely 5.1.6 and 5.2.12, I get an error that the '::' is unexpected.</p> <p>How do I access constants in these older versions of PHP5?</p>
php
[2]
1,039,578
1,039,579
Best way to stream audio and video from an Android phone to a RTMP server
<p>I'm looking for the best way to stream video and audio from an Android phone to a server using RTMP. I've spent some time on this problem and this far I've been able to stream video only using FFMPEG. There are many ways to build the lib for Android and I guess that with some more work I should be able to stream Aud...
android
[4]
2,693,302
2,693,303
filtering datagrid
<p>I m using a datagrid. When I enter a value in the textbox I want to search that value in the database and display that in the datagrid.</p> <p>How do i do that?</p>
c#
[0]
2,315,441
2,315,442
How can I join string variables when some might be a null?
<p>I have the following variables:</p> <pre><code>ac, pr, pa, co and it </code></pre> <p>All of these are string variables and some may be null. </p> <p>Is there a way I can create a new variable called pk that is a combination of the contents of all of these variables. I was thinking simply:</p> <pre><code>var pk...
c#
[0]
4,922,107
4,922,108
Javascript - Error creating objects on the fly
<p>I am trying to simulate data to a function that would usually receive a JSON parsed data structure. When running this I get an error <code>TypeError: can't convert undefined to object</code> here: <code>data.targets[i] = {</code></p> <p>What am I doing wrong?</p> <pre><code>function SendFakeTargets(maxTargets, in...
javascript
[3]
4,059,352
4,059,353
Downloading a file cause error when it contains spaces - PHP
<p>Consider that i am uploading a file with following names:</p> <ol> <li>test.pdf</li> <li>test file.pdf</li> </ol> <p>When i download the test.pdf it's working fine.. </p> <p>But when i download test file.pdf it doesn't. <strong>The case is the space between the file name.</strong></p> <p><strong>Unfortunately i ...
php
[2]
2,929,930
2,929,931
Resizing picture C#
<p>need help. i want to resize a certain picture but when i run this code it give me the error {"A generic error occurred in GDI+."}</p> <pre><code> private void btnPic_Click(object sender, EventArgs e) { OpenFileDialog open = new OpenFileDialog(); open.Filter = "Images|*.bmp;*.jpg;*.gi...
c#
[0]
674,999
675,000
Importing PHP class from remote directory and using it
<p>so what I have is a simple script, set up on two different hosting accounts on the same server,</p> <p>So Account #1 has a file index.php</p> <pre><code>&lt;? function get() { return file_get_contents("http://cmyip.com"); } ?&gt; </code></pre> <p>Account #2 has another file</p> <pre><code>&lt;? require_once...
php
[2]
3,820,706
3,820,707
Differentiate between comma and comma space
<p>I have a line coming from a CSV file like this:</p> <p>"Item 1","Item 2","Item 3","Item 4","Item 5, Test 6" Repeat for thousands of lines There are no spaces between the items.</p> <p>The comma between Item 5 and Test 6 is supposed to be there. I am trying to turn this line into an array.</p> <pre><code>$i=1; $te...
php
[2]
693,606
693,607
How to change screen dimming time programatically in android?
<p>I would like to change system dimming time in my custom application.</p> <p>My device is set 30s-timeout for sleep. So if I am in home screen and leave it, it goes dim in 23sec and screen is turned off in 30sec.</p> <p>Is there any idea for changing screen dimming time for my application?</p> <p>It's ok to chang...
android
[4]
3,410,077
3,410,078
JQuery: How to hide/display a div depending on the initial state of a checkbox?
<p>Let's say I've this a checkbox and a div that contains elements that I want to <strong>hide/display</strong> depending on the checkbox being checked or not.</p> <pre><code>&lt;input type = "checkbox" id = "myCheckbox"/&gt; &lt;div id = "display-hide"&gt; //Contains more elements &lt;/div&gt; </code></pre> <p>Now...
jquery
[5]
683,092
683,093
termination of program on main thread exit?
<p>I have two threads: the main thread and a thread generated from the main thread. </p> <p>When the main thread exits, will the whole program terminate?</p>
java
[1]
2,531,582
2,531,583
Activator.CreateInstance failing
<p>I have am creating an Instance dynamically using Activator.CreateInstance. However, it is saying object cannot be null on every attempt. Pasting the code below. Am I doing anything wrong?</p> <p>Is there any problem if </p> <blockquote> <p>Activator.CreateInstance</p> </blockquote> <p>replaces the conventional...
c#
[0]
980,834
980,835
Handing around Lists
<p>I have a question about lists in C++. I am creating a game, where there are a set of insects moving around the screen, and I do this by creating a class, initializing a list, storing the 'insect' object and then creating a draw and move function. Now, I want to be able to pass this list as well as a similiar list of...
c++
[6]
539,238
539,239
What is the regular expression for space and alpha-numeric
<p>I'm using ajax check function to check inserted category name which should be only alpha-numeric and also allowed space</p> <p>I've used this function <code>eregi_replace</code> with the following regular expression <code>[a-zA-Z0-9_]+</code></p> <pre><code>$check = eregi_replace('([a-zA-Z0-9_]+)', "", $catname); ...
php
[2]
474,523
474,524
have ones app copy file from webpage
<p>I have made an app that have to copy a file from a webpage, the following code doesn't do the job, it can't find the file</p> <pre><code>File ekstern = new File("http://192.168.13.40/cache.manifest"); copyFile(ekstern, intern); </code></pre> <p>and the copyFile method:</p> <pre><code> public static void copyF...
android
[4]
4,778,465
4,778,466
Waiting for child window loading to complete
<p>Is there an easy hook for detecting that a window opened by a script has finished loading? Basically, I want the equivalent of the <code>onLoad()</code> hook, but I can't set it directly -- assume that the child document is a given and I can't actually put any code of my own in it.</p> <p>For instance, say I have t...
javascript
[3]
4,313,331
4,313,332
How to specify each DataTable in each Row in Datagridview
<h2> Dt0</h2> <h2>DT1 | Dt1</h2> <pre><code>Dt2 | Dt2| Dt3| </code></pre> <p>I want them to arranged like this.All are from Different DataTable.Specifying each Row values. How can i achieve this.</p>
c#
[0]
4,971,046
4,971,047
Replacing An Amount in a Select Box Using Javascript
<p>OK, so I'm comparing 2 values on a webform, one is a text value, and one is in a select element. When the text value is less than the dropdown I need the dropdown to change to the highest value lower than the one in the text box.</p> <p>For example, if the user selects 2000 in the dropdown, and then enters 1100 in...
javascript
[3]
71,136
71,137
Puzzling C++ syntax using "&"
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5289572/what-is-the-meaning-of-in-c">What is the meaning of &amp; in c++?</a> </p> </blockquote> <p>Here is a C++ class declaration snippet containing an ampersand that doesn't make sense to me:</p> <pre><code>...
c++
[6]
3,559,573
3,559,574
Dealing with two DateTimePicker too error prone?
<p>So often, I want the user to select a start date and a finish date. But just selecting date is not enough, we also have to alter the data.</p> <p>By default, the <code>DateTimePicker.Value</code> are like</p> <pre><code>Value 1: 2012-01-01 10:12:09 Value 2: 2012-01-02 10:12:09 </code></pre> <p>When the user selec...
c#
[0]
4,253,149
4,253,150
error LNK2019: unresolved external symbol "__declspec(dllimport) private
<p>The project runs correctly under VC6.0, however, after I updated it under VS2012, the following link errors occur:</p> <pre><code>revel.lib(BaseEncoder.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) private: void __thiscall std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,...
c++
[6]
928,529
928,530
Storing ab object in a class library
<p>I have an object (a system GUID) I need to use repeatedly in my class library. I would like to store it somewhere. Whats the best way to do that? Im thinking i could serialize and deserialize the object but it dosent seem like the simplest solution. </p>
c#
[0]
5,865,853
5,865,854
Store Coordinates to web server or Data base iphone
<p>Hi everyone I'm working on an application that shows you your current location and gives you more informations about it like the Town and Street.. </p> <p>So my problem is that i want to <strong>store</strong> those <strong>coordinates</strong> to <strong>Web Server</strong> or to a <strong>DatBase</strong>, if the...
iphone
[8]
3,056,454
3,056,455
Mozilla display Problem with javascript
<p>I n an aspx page I am using a javascript function like</p> <p>function ReverseResult() {</p> <pre><code>document.getElementById("ctl00_ContentPlaceHolder1_txtIncrementAmount").value = parseInt(document.getElementById("ctl00_ContentPlaceHolder1_txtNewCTC").value) - parseInt(document.getElementById('&lt;%=lblCurrent...
javascript
[3]
790,501
790,502
Android contacts import
<p>I am using an emulator API 8 and trying to import the contacts (more then 300 ones) I can't get an instant messengers information after all. The contacts vcards are similar that one:</p> <pre><code>BEGIN:VCARD VERSION:2.1 N:Lastname;Firstname FN:Firstname Lastname X-ANDROID-CUSTOM:vnd.android.cursor.item/nickname;N...
android
[4]
2,488,885
2,488,886
Determine calling executable in Python
<p>I am trying to find the best way of re-invoking a Python script within itself. Currently it is working like <a href="http://github.com/benoitc/gunicorn/blob/master/gunicorn/arbiter.py#L285" rel="nofollow">http://github.com/benoitc/gunicorn/blob/master/gunicorn/arbiter.py#L285</a>. The <code>START_CTX</code> is creat...
python
[7]
2,783,558
2,783,559
Attributes running together or a URL query string in an unquoted attribute value
<p>When running validator I am receiving this error. Alos, Internet Explorer 8 fails to load my sidebar in position. What I made wrong here ? TNX</p> <pre><code>global $layout; echo '&lt;div id=\"main\" role=\"main\" class=\"layout_" . $layout . "\"&gt;'; echo '&lt;section id="content" class="grid_8 background_1"&gt;'...
php
[2]
1,302,439
1,302,440
android code to launch my app as soon as phone bootsup
<p>Hi can anybody give me sample code for launching application as soon as phone boots up</p>
android
[4]
3,943,501
3,943,502
Set initial height of div based on how much space is left inside of parent div
<p><strong>I have 3 divs:</strong></p> <p><strong>.main_content, .content_top, .content_bottom</strong></p> <p>.main_content is set to 100% but 100% is not the size of the browser window, it's inside the middle of my page.</p> <p>.content_top is set at 60% height.</p> <p><strong>I want to set the height of .content...
javascript
[3]
5,221,955
5,221,956
php read file looking for string
<p>I'm trying to read a file and look for a specific element within the file. Once it finds it, I would like the script to add the element to a variable. So far I have not been able to find anything on this.</p> <p>This is kind of what I'm looking for:</p> <pre><code>$var = read(($file), "&lt;!--Everything in the c...
php
[2]
3,820,619
3,820,620
Setting the transition animation to the default slide one
<p>I've been reading code for custom transitions, and while I know there are simple ways to write the xml for a slide transition, can it be done using the Android slide transition used on certain phones? Thanks!</p>
android
[4]
534,769
534,770
TypeError xxx is not a function
<p>All, I am struggling with an error which says <code>TypeError: curTemplete.addSection is not a function</code>, Please forgive that I am not familiar with the js OO, Please help to review my problem. thanks.</p> <p>The code looks like below.</p> <p><strong>Templete.js</strong></p> <pre><code>LayoutTemplete=functi...
javascript
[3]
2,257,836
2,257,837
DirectSound - how to get started
<p>I need to use the direct sound librarys for my C# application.</p> <p>Do I need to download a SDK and install?</p> <p>Are the libraries already installed as part of windows xp sp3?</p> <p>In C# under references I just include microsoft.directsound?</p> <p>Many thanks,</p>
c#
[0]
4,567,503
4,567,504
Dynamically Controls
<p>I have dynamically generated a button an its event too.Now want to access a textbox (Generated Dynamically) into the onClick event of the Button.How can i do this?</p>
asp.net
[9]
574,607
574,608
How to Use Ternary Operator in Python
<p>I have this method:</p> <pre><code>def get_compression_settings(self, media_type=None): return self.transmit('GET', 'compression?mediatypeid={0}'.format(media_type)) </code></pre> <p>Is there a way I can check if media_type == None and only append mediatypeid={0} if it is ~=None in a single line using a te...
python
[7]
5,420,576
5,420,577
handling back button in android from jquery
<p>We have developed an application in j query integrated with android(which has only one activity) From this activity we are loading an HTML file on this file we are showing and hiding the div contents .On viewing the web pages provided here and pressing back button provided in android , the application exits.We want ...
android
[4]
1,976,323
1,976,324
How to build a screenmate programatically?
<p>I would like to know how to build an screenmate.</p> <p>Something like this:</p> <p>Example # 1: <a href="http://www.youtube.com/watch?v=SHvDOPkGQqE" rel="nofollow">http://www.youtube.com/watch?v=SHvDOPkGQqE</a></p> <p>Example # 2: <a href="http://www.youtube.com/watch?v=5tHpmeZseIs" rel="nofollow">http://www.you...
c#
[0]
4,311,300
4,311,301
How do I get screen sizes from a service?
<p>From an activity I would do it like this</p> <pre><code>Display display = getWindowManager().getDefaultDisplay(); int x = display.getWidth(); </code></pre> <p>Yet a service ( keyboard ) doesn't seem to support it... any other ideas?</p> <p>Thanks!</p>
android
[4]
732,744
732,745
Is it safe to unplug the phone while USB Debugging is turned on?
<p>I am developin with Eclipse on an Android device. Each time I want to install the new version of the app on the device I need to connect it, enable USB Debugging, install the app, disable USB Debugging, unplug the device (optional). I was wondering if it was safe to just unplug the device without disabling USB Debug...
android
[4]
4,937,677
4,937,678
Python scope inside a nested function inside a class?
<p>How can I set a class variable from inside a function inside another function?</p> <p>var.py</p> <pre><code>class A: def __init__(self): self.a = 1 self.b = 2 self.c = 3 def seta(self): def afunction(): self.a = 4 afunction() def geta(self): r...
python
[7]
5,597,862
5,597,863
how to change image on next button click +iphone
<p>i want to change image on next button click by using uiimage view. i am using following link to get images.</p> <p><a href="http://01s.in/webservices/ratemypic/getData.php?db_table=image" rel="nofollow">http://01s.in/webservices/ratemypic/getData.php?db_table=image</a></p> <p>thanks to all</p>
iphone
[8]
3,381,910
3,381,911
Get whats under the cursor
<p>Is there a way to hook the mouse to detect what it's hovering over? Say I put my mouse over my uTorrent icon on the desktop. Is there a way to detect that and give me information pertaining to that icon/file ? Any help on this matter would be helpful. Thanks.</p>
c#
[0]
2,687,306
2,687,307
filter and increment number inside of element using javascript
<p>I have this HTML code:</p> <pre><code>&lt;div&gt; 756 &lt;span&gt;&lt;/span&gt; &lt;/div&gt; </code></pre> <p>now using javascript I am trying to retriev the number from the div and increment it by 1. But I can not seem to figure out how to filter the <code>&lt;span&gt;</code> out of my variable and then i...
javascript
[3]
5,641,687
5,641,688
what happens to finally block in the following cases?
<p>if i have a following code </p> <pre><code> try{ //some code }catch(Exception e){ //some code }finally{ } </code></pre> <p>what happens to the finally block in the following cases</p> <ol> <li><p>if any checked exceptions happen.</p></li> <li><p>if System.exit() i...
java
[1]
5,602,521
5,602,522
Dom parsing in android
<p>i have parsed xml using dom parser,but when the xml element contains no value it throws null pointer Exception.how to check this?... here my code</p> <pre><code>NodeList TrackName1 = fstElmnt2.getElementsByTagName("Artist_Name"); Element TrackElement1 = (Element) TrackName1.item(0); ...
android
[4]
374,280
374,281
c# using directive depth
<p>I'm trying to understand the c# using directive...Why does this work...</p> <pre><code>using System; using System.ComponentModel.DataAnnotations; namespace BusinessRuleDemo { class MyBusinessClass { [Required] public string SomeRequiredProperty { get; set; } } } </code></pre> <p>but thi...
c#
[0]
5,417,566
5,417,567
hide all elements wit specific alt value
<p>I want to be able to hide all elements which have an ALT value of <code>3</code> using jquery.</p> <p>hide all elements with attribute <code>alt="3"</code></p> <p>Is this possible? And if so, how can it be done?</p> <p>Thanks</p>
jquery
[5]
3,659,487
3,659,488
what is the difference between static and normal variables in c++?
<p>I need to know the difference,am beginner.</p>
c++
[6]
5,485,117
5,485,118
disable img tag
<p>How to remove href attribute of an img on a page using jquery?</p> <p>this img tag does not have any class or ID for referencing</p>
jquery
[5]
4,442,272
4,442,273
Capture the previous value when onkeydown is executed
<p>Need help in event handling. In my scenario, I have a textbox with default value 35 and cursor is set to before the 3. There is a event for this text box which is onkeydown. When I press 4, IE and Safari captures the previous value of the text which is 35. But Mozilla and Chrome captures the new value which is 435.<...
javascript
[3]
1,910,152
1,910,153
Would I use an if statement here or a bool?
<p>I need to figure out a way to handle if <code>results</code> does find something, show "yes, something was found" else show "no users have been found at this time". I've tried to figure this out, but I'm unable to do so. Thank you for your time.</p> <p>My code is as follows: </p> <pre><code>DateTime dt = DateTime...
c#
[0]
1,795,557
1,795,558
Download a whole website using URL class in Java
<p>I wrote a simple program which through the help of url class get the page content. However, it gets only the main page of the website, and inside a page there are also other urls. How can we download all the website including the page inside the specified url page.</p> <pre><code>import java.net.*; import java.io.*...
java
[1]
277,909
277,910
Javascript: Can a string containing a newline "\n" be used as a property name?
<p>It is clear why I would not want to do this. But I have little choice in the matter. </p> <p>Will browsers be able to handle this? </p> <p>Chrome seems to be okay with it: </p> <pre><code>&gt; var x = {}; &gt; x['a\nb'] = 1; 1 &gt; x Object a b: 1 __proto__: Object &gt; Object.keys(x) ["a b"] </code></pre>
javascript
[3]
5,310,888
5,310,889
CellBroadcast listener
<p>I am trying to write application which listens to Cell Broadcast message.</p> <p>The application supposed to be used to emergency notifications.</p> <p>I tried to use this post : <a href="http://stackoverflow.com/questions/7118378/how-to-get-cell-broadcast-message">How to get Cell Broadcast message?</a> but didn't...
android
[4]
654,625
654,626
How to get `File` reference to external disk?
<p>I would like to get in my file browser <code>File</code> reference to external disk not SD Card. I mean I know that there is method</p> <pre><code>Environment.getExternalStorageDirectory(); </code></pre> <p>But to my knowledge this will get reference to SD Card. But how to get external disk (say kind of USB storag...
android
[4]
3,765,178
3,765,179
c++ object sizes
<p>Suppose I have:</p> <pre><code>struct Foo: public Bar { .... } </code></pre> <p>Foo introduces no new member varaibles. Foo only introduces a bunch of member functions &amp; static functions. Does any part of the C++ standard now guarantee me that:</p> <pre><code>sizeof(Foo) == sizeof(Bar) </code></pre> <p>?</p...
c++
[6]
4,163,278
4,163,279
Returning a 2-dimensional array of doubles from function
<p>I have this class in which at some point I am computing a array of two doubles:</p> <pre><code>double* QSweep::computeIntersection(double m1, double b1, double m2, double b2){ double* v=new double[2]; v[0]= (b2-b1)/(m1-m2); v[1]= (m1*b2-m2*b1)/(m1-m2); return v; } </code></pre> <p>In another function of the clas...
c++
[6]
4,964,611
4,964,612
How to resolve java.lang.nullpointer exception in android test project?
<p>In Eclipse i am doing to create a Android Test Project in the below way. But I am getting always java.lang.NullpointerException.</p> <p>Procedure. No Previous project is there on the eclipse.</p> <p>Select New --> Project --> Android -->Android Test Project.</p> <p>It is asking project name. I am giving test. The...
android
[4]
527,496
527,497
definition of Acme Developers for iPhone
<p>I have heard the term acme developer of iPhone. I was just wondering, what it stands for?</p> <p>I think I know the meaning, it is when a developer goes to a client and present's his/her ideas for the app.</p> <p>Thanks for your help.</p>
iphone
[8]
4,162,234
4,162,235
Add related articles - PHP custom solution
<p>I have one custom website with code created 100% by me. I need to show at the end of the article 3 related articles. How can I do it? Is there any way to pickup the most 3 used words in the article and search based on that?</p>
php
[2]
4,097,348
4,097,349
file size check at the time of upload
<p>I wan to check the size of file at the time of upload in javascript (its an image file so if possible want to check in kb or bytes or in px)</p> <p>Is there any way i can do it.</p> <p>Thanks in advance!</p> <pre><code>&lt;input type="file" name="ssimgfile2" id="ssimgfile2" /&gt; </code></pre>
javascript
[3]
3,414,912
3,414,913
int transforms into int&?
<p>code snippet:</p> <pre><code>// some code SDL_Surface* t = Display-&gt;render_text(text); int z=100; Display-&gt;blit_image(t,z,100); // some more code </code></pre> <p>does not compile because z magically changes to an int&amp;, file.cpp:48: error: no matching function for call to ‘display::blit_image(SDL_Surface...
c++
[6]
1,882,368
1,882,369
How to get a list of my app's tasks and the stack of their Activities?
<p>In order to better understand the relationship between Activities, tasks, the back-stack for each task, and different launchModes I want to write an app with about 7 Activities, running in 3 tasks, where the Activities are launched in different launchModes, and as I'm running I want to display the stacks for each ac...
android
[4]