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,252,234
4,252,235
Synchronized methods and locks
<p>When a thread invokes a synchronized method, it automatically acquires the intrinsic lock for that method's object and releases it when the method returns but what happens when a static synchronized method is invoked because a static method is associated with a class not an object?</p>
java
[1]
4,405,740
4,405,741
Creating a Alert Dialog after the animation ends in onAnimationEnd method
<p>I want to create a Alert Dialog after the animation ends. I used AlertDialog.Builder in onAnimationEnd method but i did'nt get any alert.So, please help me out with this.</p> <p>The Code looks something like this</p> <p>onAnimationEnd () { // Code Here }</p>
android
[4]
2,854,142
2,854,143
Method contains default parameter value
<p>I want to define a function in c# with 2 parameters and they have their default values , like</p> <pre><code> public T AccessEntity(string Id = null, string File = null) { return (from e in ServiceContext.CreateQuery&lt;T&gt;(TableName) where e.RowKey == Id || e.File == File ...
c#
[0]
1,638,586
1,638,587
Opening Browser in Android
<p>I tried to open link in a browser in JavaScriptInterface but it seems it didn't work. What the problem with the code below:</p> <pre><code>import android.app.Activity; import android.content.Context; import android.content.Intent; import android.net.Uri; public class JavaScriptInterface extends Activity{ Cont...
android
[4]
1,289,296
1,289,297
No XML or code generated after creating a new Android Project
<p>No XML file (the default Main.xml) is generated after I create a new Android Project.</p> <p>I am using eclipse 4.2, ADT 20.0.3. ADT and SDK have been successfully installed, I think.</p> <p>When I create a new project, after choosing BlankActivity and leaving out all the details for the activity in their default ...
android
[4]
1,751,926
1,751,927
PHP Caching, Storing cache in multiple directories
<p>We have a number of client sites still at GoDaddy, and they're complicated sites, so it will take some time for us to get around to migrating them. Ultimately, they'll end up in a dedicated environment, but for now, we're stuck with GoDaddy's shared hosting scenario.</p> <p>I want to setup output buffer PHP caching...
php
[2]
3,179,484
3,179,485
Pointer to class holding array of pointers to another class
<p>I have three classes one is for drawing a <code>tilemap</code> to the screen, one contains the ships that have been initialized, and the last ones are the ships.</p> <p>The problem: I need the <code>tilemap</code> class to be able to see every ships location, so that it knows whether to draw water, or a ship based ...
c++
[6]
5,918,463
5,918,464
How can i upload file in remote machine(LAN) using java
<p>How can i upload file in remote machine(LAN) using java program.I want to connect remote machine in LAN and upload file from my local machine to remote machine.So please tell me how can i do this.</p>
java
[1]
2,059,360
2,059,361
Android app doesnt work on version 4.0 +
<p>I have made an app that works on version 1.6 and above but once I updated my phone to 4.0.4 it gives me the following error, unfortunately, test has stopped and it wont run at all. Any reason as to why this might have happened? maybe I need to change something on the coding to make it work on the new version? pa...
android
[4]
1,155,130
1,155,131
Any mean to filter dataview with a custom function?
<p>I tried to filter dataview with a custom function but it isn't recognized. Is it possible ? If yes any article ?</p>
c#
[0]
2,114,743
2,114,744
how does the first part of this work?
<p>I have this snippet of <a href="http://jsfiddle.net/gL2kY/" rel="nofollow">jquery</a> and i want to know how it works....i understand the keypup but what i dont understand is the data ..what is it doing and </p> <p>here is the parts i dont understand</p> <pre><code>$('p span').each(function(){ $(this).data('fac...
jquery
[5]
3,343,330
3,343,331
jQuery : selecting an element whose content is exactly such and such
<p>I want to select all A elements whose content is exactly "^" (these are return to top links). How to do that ?</p>
jquery
[5]
4,545,324
4,545,325
getting the error" No provisioned iPhone OS device is connected" for iphone
<p>what this error mean, when i am installing the app on device,i am getting this error. how can i solve this error. </p>
iphone
[8]
3,895,286
3,895,287
jQuery syntax help - filmstrip gallery code
<p>I'm trying to make a simple gallery and can't figure out what is wrong with my jQuery syntax.</p> <p>When the user clicks a thumbnail (one of the first three list items), I want to <code>clone()</code> the image and caption, and paste it into <code>li.expand</code> (the full-size image).</p> <p>The first two lines...
jquery
[5]
1,990,262
1,990,263
Setting tab title textsize (android)
<p>Im trying to set tab title textsize in android.. </p> <p>Basically so I can see the text in all 4 tabs and I was searching up another question and they said to use custom theme but its not working for me for some reason. </p> <p>This is the code I'm using:</p> <p>Manifest </p> <pre><code>&lt;?xml version="1.0" e...
android
[4]
1,041,234
1,041,235
create image file on server
<p>I'm trying to use the facebook api to get the app user's profile pic and then save it on the server. I'm getting the image just fine, but creating a new image file and saving it in the correct folder seems to be a problem. I tried using the fopen and file_put_contents functions, but apparently they require that a fi...
php
[2]
1,863,416
1,863,417
How to customize the Android Ringtone Picker Dialog?
<p>I show a dialog for selecting one of the ring tones with the following code:</p> <pre><code> Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER); intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE,"My customised Title"); Uri uri = ContentUris.withAppendedId( MediaStore.Audio.Media.EXTERNAL_CONTE...
android
[4]
3,739,182
3,739,183
Function Return writing style in Java
<p>Is this :</p> <pre><code>String function() { return someString; } </code></pre> <p>Any different than this ?</p> <pre><code>String function() { return(someString); } </code></pre> <p>Its the return I'm interested in. I see the 2nd style less frequently, is it just convention or is the return in parenthesis actua...
java
[1]
884,400
884,401
PHP removing backslash from code submitted through $_POST
<p>I have a code editor block and and submitting code like the following:</p> <pre><code>$something = "&lt;a href=\"somepage.html\"&gt;Link&lt;/a&gt;"; </code></pre> <p>However, when I submit it the string that gets output is missing the backslash escape characters and I get:</p> <pre><code>$something = "&lt;a href=...
php
[2]
4,183,403
4,183,404
My classes and functions - is there a better way?
<p>Just been looking at the way I am structuring my classes and wondering it there is a better way.</p> <p>I have forms which pass the information through to the process class. This class just forwards everything onto my main class which then does the work. When the work is done, it then passes the information through...
php
[2]
4,374,147
4,374,148
Runtime populated enum-like class
<p>I have many objects using few classes (means elements visual categorization like in html+css). Classes are not known at compile-time and they are used in conditions many times.</p> <p>To improve performance I've got one solution:</p> <pre><code>public class ElementClass { private static final Map&lt;String, E...
java
[1]
4,222,092
4,222,093
Suggest closest matching 'correct' number from an array if, if statement returns false
<p>To simplify this question, I'm looking for php to suggest the nearest triangular number from an array to the number that has returned false.</p> <p>For example if the value of the original number is 54 (which is not triangular), I'd like php to select the nearest two variables from an array that would fit this: 55 ...
php
[2]
776,498
776,499
Array values not being changed by method
<p>not a js expert so this might be a stupid question but...</p> <p>Why does the log show that the array has changed? I was expecting the array still to be a [0,0] since the method is invoked after the console.log. Also, if I try to replace the whole array like this: </p> <pre><code>this.my_array = [1,0]; </code></pr...
javascript
[3]
2,537,089
2,537,090
Why onRestoreInstanceState() never gets called
<p>I am trying to save data in my activity and than restore it. I save data in on onSaveInstanceState() and then I try to restore the data in onRestoreInstanceState().</p> <p>I setup breakpoint, the method onSaveInstanceState() get called. But onRestoreInstanceState() or onCreate() never did.</p> <p>Here is my step...
android
[4]
660,100
660,101
Warning message with virtual event
<p>I want to use virtual event &amp; override it in derive class. Following is the code snippet, I get a warning message while declaring the virtual event.</p> <pre><code> using System; using System.Collections.Generic; using System.Linq; using System.Text...
c#
[0]
4,971,077
4,971,078
Changing colors on static image
<p>Is there a way to change the color of each state on a static image of the USA? My goal is to use state health rankings to color code a map of the USA, to show the overall 'healthiness' of each state. At first I thought I could just change the opacity of each state, but all the states are combined in one image. Then ...
android
[4]
2,829,835
2,829,836
Launching app in background in iPhone
<p>Is there a way that I can use the url scheme approach to launch an application in the background or if it is already running in the background invoke it without it (the callee) coming to the foreground? I heard that this can be done in iOS 4.2 but don't see it when I use </p> <p>[[UIApplication sharedApplication] o...
iphone
[8]
3,612,570
3,612,571
How can i present efficiently 10000 record list in single html file
<p>I have single html file that contains 10000 list items that needs to be in single html file order by categories for example ordered by the ABC not all of them needs to be shown.<br> each time only 500 ( so the other are hidden ) .<br> what way or method can efficiently rearrange me the list in this way ?<br> java s...
javascript
[3]
3,158,123
3,158,124
Removing elements from an object with changing indexes
<p>I am having trouble deleting rules from the stylesheet object due to ever changing indexes.</p> <p>I have this function:</p> <pre><code>function delete_styles(delete_array){ console.log(delete_array); // ["0,0", "0,1", "0,2", "0,6", "0,7", "0,8", "0,9", "0,10", "0,14", "0,15", "0,16"] for(var i in delete...
javascript
[3]
3,864,348
3,864,349
Java Set of Bytes
<p>Hello Can anyone help me to know how can I have a "Set" of Bytes in Java? Thank you</p>
java
[1]
2,363,060
2,363,061
What is the simplest way to automatically reconnect with the same port after the connection is reset? - Java
<p>I'm going through the tutorial <a href="http://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html" rel="nofollow">Knock Knock Server and Client from Oracle</a>. I'm testing it on a single computer, and I'd like to add functionality that will automatically reconnect (ideally without losing 'progress...
java
[1]
454,463
454,464
Dynamically add ImageView to TableRow
<p>I have a TableLayout in my XML, and I'd like to dynamically add a TableRow with an ImageView to that TableLayout. What I have so far is this:</p> <pre><code>TableRow tr = new TableRow(this); ImageView imgView = new ImageView(this); LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams( ...
android
[4]
3,177,940
3,177,941
How to avoid Fatal error: Allowed memory size of 83886080 bytes exhausted
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3887692/error-allowed-memory-size-of-67108864-bytes-exhausted">Error: Allowed memory size of 67108864 bytes exhausted</a> </p> </blockquote> <p>I have a (multiple) file upload form on my website, and it works, b...
php
[2]
2,559,595
2,559,596
Inheritance Object method in IE
<p>I've defined method fadeIn for Object</p> <pre><code> Object.prototype.fadeIn = function(d, callback) { //some code here }; .... var b = documentGetElementById('b1'); // &lt;div id="b1"&gt;&lt;/div&gt; b.fadeIn(); </code></pre> <p>It works in FF, Opera, Chrome, but IE reports "Object doesn't support this propert...
javascript
[3]
5,851,061
5,851,062
Application Error:while retriving messages from MSMQ to application
<p>I am getting following error. This is related to HUB. I mean i am trying to retrive messages from MSMQ to application. But i am getting following error in that application log.</p> <p>Timestamp: 7/27/2012 12:35:26 PM<br> Message: Publish exception<br> Category: Service, Service<br> Priority: 5<br> EventId: 0<br> Se...
asp.net
[9]
4,186,135
4,186,136
how do I replace certain characters in a string?
<p>Suppose I have a string like this</p> <pre><code>SOMETHING [1000137c] SOMETHING = John Rogers III [SOMETHING] SOMETHING ELSE </code></pre> <p>and I need to turn it into this</p> <pre><code>SOMETHING [1000137c] SOMETHING = John_Rogers_III [SOMETHING] SOMETHING ELSE </code></pre> <p>Therefor I need to replace spac...
php
[2]
5,588,388
5,588,389
jQuery watermark not working
<p>I am trying to use jQuery watermark and it's not working.</p> <pre><code> $(function () { var watermark = "Enter Phone Number"; watermark.fontcolor = $(this).col if ($("#txtPhone").val() == "") { $("#txtPhone").val(watermark); } $("#txtPhone").focus(function () { if (this...
jquery
[5]
4,102,430
4,102,431
Reducing recursive calls on pow recursion method?
<p>Had a question on how to reduce the amount of recursive calls on a self implementation of the pow method. Here is what I wrote, can this be improved?</p> <pre><code>public static int pow(double a, int b) { boolean isNegative = false; if(b &lt; 0) { isNegative = true; } if(b == 0) { ...
java
[1]
5,970,028
5,970,029
Searching for string withing string in JS issue
<p>i am using HTML5 and indexOf gives me an error, so what else can i use to search for the word "correct" in a string: <code>a001_new_quiz_multiple_choice_new_mc4_correct.html</code> which is in a variable called <code>value1</code></p> <pre><code>function SetAPIValue(key1, value1) { // alert("action is " + key1 +...
javascript
[3]
2,922,334
2,922,335
Android: why is my OnKeyListener() not called?
<p>I defined an EditText-field and I want to be informed when the user edits that fields. So I thought: simple - I add an OnKeyListener and so I did. But even though the text field gets edited (and even displays the entered/modified text) I don't get any callback, i.e. the LOG-output doesn't show up. </p> <pre><code> ...
android
[4]
5,055,078
5,055,079
Update GUI controls from a background thread of another class
<p>I am creating an windows based application which download the data from server. I am using background thread which is created on different class to perform these download operation.And I want to continuously show the download status on rich textbox i.e on main thread.But i am unable to do this,get an Cross-thread op...
c#
[0]
5,411,330
5,411,331
Can any body access the database files stored in application's data folder in android?
<p>I am using the SQLite database to store data in my application. Can the databases I created for use in my application be accessed by others or any outside application?</p>
android
[4]
3,384,681
3,384,682
Can't get out of the loop when I type nothing or press cancel
<p>I can't seem to get out of the loop when I type nothing in the input or I press cancel. Is there a way out?</p> <pre><code> While (last == '?'){ input = (int)(Math.random()*2); if (number == 1){ answer = "Nice"; } if (number == 2){ answer = "Okay"; ...
java
[1]
801,746
801,747
Error opening a file with date/time stamp in its name
<p>I want to create a file with date and time stamp appended to the file name using Python. When I am doing this, I am getting the error while opening the file.</p> <pre><code>today = datetime.datetime.today().strftime("%m-%d-%Y_%H:%M:%S") file = "text" + today open(file,'w') </code></pre> <p>It reports error for inv...
python
[7]
2,565,261
2,565,262
Refresh rate for GPS - what's acceptable?
<p>I'm trying to figure out a refresh rate to use for my GPS location listener to get around a bug on the HTC Hero where the GPS icon won't remove itself off the notification bar.</p> <p><a href="http://groups.google.com/group/android-developers/browse%5Fthread/thread/e687b3bfa9146f31/7fa59b0108bbdf89?lnk=gst&amp;q=gp...
android
[4]
3,701,863
3,701,864
Grab the content of a div,which is inside another div
<p>I am doing an application where I want to grab the content of div,which is inside a div.In my application I want to grab the content of <code>&lt;li&gt;&lt;/li&gt;,</code>which is inside <code>&lt;ul class="snippet-list"&gt;&lt;/ul&gt;</code>.The ul class is inside <code>&lt;div data-analyticsid="related"&gt;&lt;/di...
php
[2]
5,849,170
5,849,171
Stop application from running in background?
<p>How to stop application from running in background in android? I want my application to start fresh everytime it loads. How to do it programatically.</p>
android
[4]
4,264,126
4,264,127
C++ delete storage space in a different function from where it was allocated
<p>Will I get undefined behavior if I delete a storage space in a different function from where the space was originally allocated?</p> <pre><code>typedef struct { unsigned int Data1; unsigned int Data2; unsigned int Data3; }TData; void CreateStorage(void) { TData *TempData = new TData; DeleteSto...
c++
[6]
4,475,432
4,475,433
How a developer from countries not listed in the "android app selling countries list" sell their apps?
<p>I am from Pakistan and my country is not included in the "Android App selling Countries list". I want to sell the apps on Android Market. </p> <p>Is there any way I can sell my apps. </p>
android
[4]
38,883
38,884
even and odd number of clicks count in jquery
<p>I have four divs in my html page something like this: the working fiddle implementation is here: <a href="http://jsfiddle.net/GxaCK/3/" rel="nofollow">http://jsfiddle.net/GxaCK/3/</a></p> <pre><code> &lt;div class="first"&gt; &lt;p&gt; First &lt;/p&gt; &lt;/div&gt; &lt;div class="second"&gt; &lt;p&g...
jquery
[5]
4,054,796
4,054,797
jQuery - shuffling two absolutely positioned elements
<p>I have a container called three. It has the two divs inside as 'one' and 'two'. I would just like to shuffle their absolute positions. Is it possible? If so, is there any built-in function with <a href="http://en.wikipedia.org/wiki/JQuery" rel="nofollow">jQuery</a>?</p> <p>This is my try, but it does not work prope...
jquery
[5]
2,192,113
2,192,114
How do I display only match keyword in array
<p>This is my array output</p> <pre><code>Array ( [0] =&gt; Array ( [tweet_text] =&gt; Fedora 16 "Verne" released! http://t.co/lECbdzE0 #Fedora #Linux ) [1] =&gt; Array ( [tweet_text] =&gt; Ubuntu 11.10 "Oneiric Ocelot" released! #Ubuntu #Linux ) ) </co...
php
[2]
4,335,669
4,335,670
how to fix a bottom relative layout when soft keyboard comes?
<p>When i write something on the edit text in my app ,the soft keyboard comes in along with a bottom relative layout..I want to fix the bottom relative layout position fixed.Any help will be greatly appreciated..</p>
android
[4]
2,579,561
2,579,562
simple php pagination
<p>I have rows of data coming from database, I would like to have simple pagination, is there any simple code or tutorials pls help.</p>
php
[2]
3,220,319
3,220,320
Android: Make a button not visible
<p>How can I remove a button in android, or make it invisible. </p>
android
[4]
3,280,333
3,280,334
Eclipse issue - Launch error: Failed to connect to remote VM. Connection timed out
<p>I get the message "Launch error: Failed to connect to remote VM. Connection timed out." each time i debug my application on read device. </p> <p>I added to the AndroidManifest the </p> <p> and android:debuggable="true" </p> <p>But still this is not helping. </p> <p>When i reset the Eclipse ( close it and open i...
android
[4]
2,132,817
2,132,818
ImageDownloader example?
<p>I'm looking at an image cache / downloader for android, I see there's something called ImageDownloader from the sdk examples, also part of this blog post from the team:</p> <p><a href="http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html" rel="nofollow">http://android-developers.blogsp...
android
[4]
2,667,629
2,667,630
Application interfering with OS processes
<p>I am new to android. I have created a simple application that starts a service to register an SMS broadcast receiver. The application works fine but I keep getting alerts that different process are not responding. The associated buttons are to "Force Close" or "Wait". The particular process varies. For example, "com...
android
[4]
1,443,275
1,443,276
php expression question
<pre><code>function createHash($string) { $check1 = $this-&gt;stringToNumber($string, 0x1505, 0x21); $check2 = $this-&gt;stringToNumber($string, 0, 0x1003F); $factor = 4; $halfFactor = $factor/2; $check1 &gt;&gt;= $halfFactor; $check1 = (($check1 &gt;&gt; $factor) &amp; 0x3FFFFC0 ) | ($check1 ...
php
[2]
3,752,617
3,752,618
How to pass a dynamically generated ID to Jquery
<p>I'm using a nice <a href="http://www.planitworks.nl/en/jeegoocontext" rel="nofollow">Jquery context menu</a> which returns the ID of my element in the form </p> <pre><code>$(context).attr('id') </code></pre> <p>and not in the form</p> <pre><code>$(this).attr('id') </code></pre> <p>due to the fact that I'm using ...
jquery
[5]
2,918,156
2,918,157
Where to set User Control event handlers?
<p>Where in the page life cycle is it most appropriate to set event handler delegates for events raised by custom User Controls?</p> <p>I have a <code>ReportFilter</code> user control that raises an <code>ApplyFilterClicked</code> event. Currently I am just using <code>Page_Load</code> to assign a handler method.</p>...
asp.net
[9]
2,490,269
2,490,270
hi all , i have a query regrding to playing wave file from raw directory from res > raw
<p>i have a query regrding to playing wave file from raw directory from res > raw, i have written a code on button click event here is my code </p> <pre><code>public void buttonOnclick(View v) { try { MediaPlayer mMediaPlayer = new MediaPlayer(); mMediaPlayer = M...
android
[4]
3,662,049
3,662,050
C# string parsing problem
<p>I have a file thats exported with a ton of lines. I want to be able to parse the file into a neat order that I can easily use.</p> <p>I have a sample string here:</p> <pre><code>&lt;a href="http://www.foxnews.com/us/2010/07/28/cemetery-allows-father-war-veteran-fly-flag-grave/?test=latestnews"&gt;deal reached on ...
c#
[0]
2,326,207
2,326,208
changes in jquery 1.4.2 breaking the code?
<p>I had this code on a page using jquery 1.3, but now in jquery 1.4.2 it's breaking with syntax error/uncrecognized expression:</p> <pre> $(document).ready(function(){ $("span[@name^=charge]").click(function(){ $("#" + $(this).attr("name")).show(); $(this).hide(); }); }); </pre> <p>How do I f...
jquery
[5]
874,155
874,156
Problems changing properties on a control using the controls name
<p>This should work.. I think..</p> <pre><code>string ctrlName = "btnSomeButton" + someIndexValue; this.Controls[ctrlName].Text = "Some value"; </code></pre> <p>I get 'Object reference not set to an instance of an object.', the control does exist on the form. I've tried casting it.</p> <p>Solution:</p> <pre><code>s...
c#
[0]
2,960,758
2,960,759
Lazy loading images on ListView not getting refreshed
<p>I was just including this code into my <a href="https://github.com/thest1/LazyList" rel="nofollow">project</a> from <a href="http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview/3068012#3068012">an answer to Stack Overflow question <em>How do I do a lazy load of images in L...
android
[4]
808,149
808,150
Can I have XML Defination in this way
<p>HI </p> <p>Can i have a xml defination like below</p> <pre><code>&lt;add key="FirstName" ServerType="FirstName" Mandatory="Yes" length="3" DataType="String"/&gt; </code></pre> <p>if yes how can i read this in my dot net c# code i use dotnet 2.0 frame work Please help me with the code</p>
c#
[0]
3,315,885
3,315,886
Multiplying 2d array in java
<p>I have declared an array that i would like to multiply the value of the first column by value of the second column of each row and create a grand sum of these products. I have tried the code listing below, what am i missing</p> <pre><code>public class Arrays { public static void(String[] args) { int a...
java
[1]
762,352
762,353
How to create a simple First Person Dungeon Crawler
<blockquote> <p><strong>Possible Duplicate:</strong><br /> <a href="http://stackoverflow.com/questions/54223/how-do-i-get-started-in-game-development">How do I get started in game development?</a> </p> </blockquote> <p>I am an amateur programmer trying to make my first game. I've been trying to create an 'old-sch...
python
[7]
2,271,548
2,271,549
Overloaded virtual function call resolution
<p>Please consider the following code: </p> <pre><code>class Abase{}; class A1:public Abase{}; class A2:public A1{}; //etc class Bbase{ public: virtual void f(Abase* a); virtual void f(A1* a); virtual void f(A2* a); }; class B1:public Bbase{ public: void f(A1* a); }; class B2:...
c++
[6]
4,903,737
4,903,738
What's the best way to do "application settings" in Android?
<p>I'd like to store some application settings (like the URL of an API, and some settings for testing) for an Android application.</p> <p>I mostly work as a <a href="http://en.wikipedia.org/wiki/.NET_Framework">.NET</a> developer, so I'm used to using the file <code>app.config</code> for this purpose. What's a good wa...
android
[4]
4,935,447
4,935,448
Handle orientation from Portrait to Landscape mode for Checkbox
<p>I am using the Checkbox on a layout xml .</p> <pre><code>&lt;CheckBox android:id="@+id/chkbox" android:checked="false" android:button="@drawable/ic_uncheck_img"&gt; </code></pre> <p>The Checkbox is by default set to "false" &amp; a image is added for unchecked button.</p> <pre><code>private CheckBox mCheck= null...
android
[4]
4,687,315
4,687,316
Change image with if statement
<p>When the program loads, there's already and image for a place holder</p> <pre><code>ImageIcon icon = new ImageIcon(Path + "Hangman1.jpg"); JLabel label = new JLabel(); label.setIcon(icon); </code></pre> <p>Now i know how to write an if statement that prints out the body part</p> <pre><code>if (guesses &gt;= 1)...
java
[1]
1,530,323
1,530,324
Android Keyevent injection requires system permissions
<p>hi i am using key event injection using window manager but when i tested this application it gives me error </p> <pre><code> 04-12 18:19:35.794: WARN/WindowManager(58): Permission denied: injecting key event from pid 6290 uid 10039 to window Window{45034880 com.android.launcher/com.android.launcher2...
android
[4]
1,966,325
1,966,326
Convert select dropdown into list for printing
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/7336437/how-to-convert-select-dropdown-into-an-unordered-list-using-jquery">How to convert &lt;select&gt; dropdown into an unordered list using jquery?</a> </p> </blockquote> <p>I want to convert all select drop...
jquery
[5]
1,327,546
1,327,547
Android MVC and Inner class
<p>I learn the android for one year,But now I am so confused about how to use MVC in android apps,I can't deal with UI、Activity、network,I often use inner class to avoid the communication between classes,but it looks like mess, encapsulation is so bad.so who can help me to figure out how to use android mvc,and inner cla...
android
[4]
1,145,894
1,145,895
How to disable all links before load jQuery?
<p>I need a pure Javascript code to disable all links while loading the page, avoiding to click them and redirecting to other page when its using a <a href="http://defunkt.io/facebox/" rel="nofollow">Facebox</a>.</p> <p>Can be something that I place in a <code>&lt;script&gt;</code> tag in the <code>&lt;head&gt;</code>...
javascript
[3]
3,595,219
3,595,220
Radio button array with cloned row
<p>I have a form where a row get's clowned if a user clicks "add row". My problem is with the radio buttons, the name of the radio group stays the same and I need to get them unique for each cloned row. This is how I have it at the moment.</p> <pre><code> &lt;input type="radio" name="chronic_l_duration[]" value="Chron...
javascript
[3]
3,366,007
3,366,008
How to get First Day and last day of the week of a date
<p>I am using DatePickerDialog to show the calender. I want to access First day and last day of the week of the date selected.</p> <p>Here is what I have tried</p> <pre><code> this.tv_date.setText( new StringBuilder() // Month is 0 based so add 1 .append(mDay).append("-") ...
android
[4]
789,268
789,269
how to view an alert dialog box even when android phone is rotated
<p>I am creating an application in which an alert dialog box pops up when i click on a button.Now when the phone is rotated this view gets disappears.<strong>Can anyone help me to retain this alert view even if phone is rotated?</strong></p>
android
[4]
5,220,039
5,220,040
how to get table object using cssclass selector?
<p>I have an HTML page with lot of tables. Among that I have a table with the following format</p> <pre><code>&lt;table&gt;&lt;tr&gt;&lt;td class="myclass"&gt;..&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td class="myclass"&gt;..&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; </code></pre> <p>How can I get the object of this table usi...
jquery
[5]
5,781,751
5,781,752
How to convert variable name to string in JavaScript?
<p>I am new to stackoverflow but I found it pretty helpful several times. Now I have my own question: Is there a way to convert variable names to strings in javascript? To be more specific:</p> <pre><code>var a = 1, b = 2, c = 'hello'; var array = [a, b, c]; </code></pre> <p>Now at some point as I go through the arra...
javascript
[3]
4,894,091
4,894,092
Keyboard covers up part of edittext
<p>I have a numberpicker but my keyboard is not showing up like I want.</p> <p>Screen: </p> <p><img src="http://i.stack.imgur.com/I80X5.png" alt="enter image description here"> </p> <p>As you can see, the keyboard covers part of the edittext.</p> <p>How can I fix this <strong>without using a scrollview</strong>? ...
android
[4]
5,983,876
5,983,877
jQuery animate bottom div
<p>I try to move a specific <code>div</code> using jQuery <code>animate</code>. However, It does not work for div, but it works for <code>img</code>. Here's my code (it doesn't work):</p> <pre><code>&lt;body&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $('#clickme').hover(function() { ...
jquery
[5]
1,105,702
1,105,703
how to create a popup window in C#.net
<p>I have two different applications on different system.If a button pressed in one application i keep its record in Database and according to the record I want to popup a window in second application that notifying that Button is pressed in first application.</p> <p>How could I do this? Is it feasible?</p>
c#
[0]
2,999,671
2,999,672
array_key_exists works properly when method is called direct, but not when through another method
<p>I'm having some trouble in finding out why the code extract below does not do what I expect. When passing a setting string immediately to <code>settingIsProtected</code> the function returns correctly if a setting is protected (has leading underscore in the data array). But when the method is called through <code>ge...
php
[2]
2,881,663
2,881,664
Android GLSurfaceView as subview
<p>I'm very new to an Android platform and currently trying figure out why things work this way:</p> <p>If I create <code>GLSurfaceView</code> and add it using the <code>setContentView</code> or <code>addContentView</code> to an activity everything works fine (<code>Renderer.onDrawFrame</code> is called as expected). ...
android
[4]
4,319,816
4,319,817
What to replace a UIButton to improve frame rate?
<p>I created a minesweeper clone game and I made a 30 x 30 grid of cells. Now in my initialize design, I planned to use UIButton for each cell so that I can use its touchDown and touchUpInside. But my problem is using UIButton makes the game slow in zooming and especially in loading or adding each cell(900 pcs) in a U...
iphone
[8]
5,407,289
5,407,290
asp.net dropdown list control - dropdown list selected index change event not fired
<p>i have only one item in dropdownlist, so the selected index changed event is not fired. can someone help me in this? Thanks</p>
asp.net
[9]
626,098
626,099
The distance Calculation from two places
<p>I have latitude and longitude of two places. Can i calculate the distance between them in android.? </p> <p>Regards Aneesh </p>
android
[4]
3,409,431
3,409,432
How to delete images from a folder using PHP Script
<p>We need to delete images created in linux file system. in a path <code>/home/user/img/</code> (All images)</p> <p>We have tried using <code>unlink()</code> but it is taking lot of time to delete it. Can someone help us how to delete images using linux commands must be passed with php script. I think <code>rm</code...
php
[2]
2,029,997
2,029,998
Automatically saving doc file after 20 secs
<p>i am doing a php program which requires doc file to be saved after every 10 secs.msword should not ask the path to be saved. actually i have written a program which opens a doc file. the file should be auto saved to the exact location from where the file is opened.</p>
php
[2]
4,195,873
4,195,874
javascript load image to div onclick
<p>I want to display image user click from image link in a for loop to a div. </p> <p>my for loop is as follows.</p> <pre><code>&lt;a href='' name=my_image[i] onclick='disp_image('link_image_url')'id=my_image[i] class='popup-open'&gt;&lt;img src=my_image[i] width='80' height='65'&gt;&lt;/a&gt;; </code></pre> <p>an...
javascript
[3]
3,233,414
3,233,415
conversion - ASCII hex to float in c++
<p>I have a string containing, for example "3F800000".</p> <p>This is a hexadecimal representation of the float 1.0 Only I can't seem to find any convenient way of making this conversion in C++. Suggestions?</p>
c++
[6]
715,879
715,880
Basic If/Else if in C++
<p>I've just started learning C++ - and I have a Quick Question.</p> <p>Using if/else if statements for more than one variable at a time. How do I have them separated?</p> <p>Ex. </p> <pre><code>float a, b, c, d, e; if (a &gt; 0 &amp;&amp; b &gt; 0) cout &lt;&lt; "blah blah"; else if (a &gt; 0) cout &lt;&lt...
c++
[6]
3,016,241
3,016,242
asp control vs html control
<p>Im new to web programming and i've started with asp.net 2.0,i would like to know what are the differences on using an html control than an asp control,and i'd like to know too how the attribute runat = "sever" works.</p>
asp.net
[9]
1,129,678
1,129,679
Parsing File to Get List of Names in C#
<p>I'm parsing my <code>/etc/passwd</code> file, which looks like this:</p> <pre><code>root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync </code></pre> <p...
c#
[0]
3,455,234
3,455,235
Why should compilation fail for this code?
<p>Another SCJP question. I think the output is K=7, but the book's answer is "compilation fails". I just don't see anything wrong with the code.</p> <pre><code>1. class RevQOne{ 2. public static void main(String [] args) { 3. boolean i = true; 4. boolean j = false; 5. short k = 10; 6. if((k == 10) &a...
java
[1]
2,444,987
2,444,988
Event is not firing while redirect from one page to another
<p>In my home page i have a search button and its working perfectly but when i redirect to any page of my websites and come back to home page the search button is not working... this the event binding code for search button</p> <pre><code>$("#search_top_form").delegate("#search_button", "click", function(e) {       ...
jquery
[5]
2,452,492
2,452,493
event handlers in javascript
<p>I'm looking to build two functions:</p> <pre><code>var MyObject = new Object(); MyObject.MyProperty = 1; function ListenToChange() { here I want to listen to changes in MyProperty1 and do something when it changes } function ThrowEvent () { here I change the value of MyProperty every 5 seconds setTimeOut('T...
javascript
[3]