Unnamed: 0
int64
65
6.03M
Id
int64
66
6.03M
Title
stringlengths
10
191
input
stringlengths
23
4.18k
output
stringclasses
10 values
Tag_Number
stringclasses
10 values
2,436,992
2,436,993
Layout priority in Android
<p>My program had two layout: layout1 and layout2. I make the layout2 visible while layout1 is touched by OnTouchListener(). I want layout2 on the top of layot1. On the contrary, layout2 is overridden by layout1. Any one can help me to resolve the problem? My code as:</p> <pre><code>&lt;?xml version="1.0" encoding="ut...
android
[4]
5,917,608
5,917,609
Javascript not acquiring dropdown value
<p>I have a list of 2 values in dropdown list as...</p> <pre><code> &lt;select id="prop"&gt; &lt;option value="Caa:123"&gt;Ca&lt;/option&gt; &lt;option value="Cb:745"&gt;Cb&lt;/option&gt; &lt;/select&gt; </code></pre> <p>...and in javascript i used...</p> <pre><code> var p = docu...
javascript
[3]
2,565,332
2,565,333
Slide up element on hover
<p>Take a look at <a href="http://www.shopvcf.com/blog/?page_id=56" rel="nofollow">http://www.shopvcf.com/blog/?page_id=56</a></p> <p>I need the area with the red heart to slide up which I have done with this code. </p> <pre><code>$(document).ready(function () { $('div.bottomwrap').on({ 'mouseenter': func...
jquery
[5]
2,301,779
2,301,780
Difference between document.body.contentEditable='true'; and document.designMode='on';
<p>It seems both allow to edit the document, so what's the difference?</p>
javascript
[3]
202,906
202,907
android: how to upload the images from the card
<p>hi to all i my application i want to upload the images from the sd card with restricting the user to upload only less than 2mb. thanx in advanse.</p>
android
[4]
3,708,164
3,708,165
.show table rows is scrolling to the top on first show
<p>When I show a table row for the first time, the page always scrolls to the top in both IE and Firefox. Subsequet shows do not do this.</p> <p>I have traced it to the first action that jquery takes on a show, where it appends, reads the display value, and removes an element from the body in order to populate elemdi...
jquery
[5]
2,193,694
2,193,695
how to force close wifi and data roaming
<p>I want to manually close wifi and data roaming in android. After finishing with processing some data i want to enable it back. How can i do this programatically?</p> <p>I only find this howto but is not working in my android 4.</p> <p><a href="http://stackoverflow.com/questions/11060414/how-do-i-program-android-to...
android
[4]
444,789
444,790
Cannot make static reference to a non-static method
<p>I'm getting the <code>Cannot make static reference to a non-static method</code> error but I don't appear to be making a static reference.. my code is something like the following...</p> <pre><code> public void run() { MyClass mc = new MyClass(); mc.method(); } public void MyClass(){ myothermethod(); //...
java
[1]
1,678,463
1,678,464
Remove Delegate from event - cause Sync issues?
<p>I have an event </p> <pre><code>this._sequencer.Completed </code></pre> <hr> <p>Two delegates are subscribed to this</p> <pre><code>this._sequencer.Completed += OnActivityFinished; this._sequencer.Completed += OnCarrierReLoaded; </code></pre> <hr> <p>The delegates implemnetation is as given below</p> <pre><co...
c#
[0]
1,473,499
1,473,500
role of parentheses in javascript
<p>I'd like to know the difference between the following and the role of the parentheses:</p> <pre><code>foo.bar.replace(a,b) </code></pre> <p>and</p> <pre><code>(foo.bar).replace(a,b) </code></pre> <p>do the parentheses require the contained expression to be evaluated first before moving on to the replace method? ...
javascript
[3]
5,893,291
5,893,292
Add/delete controls on button click
<p>I am new to android development. I am working on a sample application. I need to add a button with context menu, edit text and delete button for each click of a button. and delete all when I click on delete button for adding contact. I have searched a lot and still didn't get any idea. Please help me.</p>
android
[4]
2,384,728
2,384,729
File.Move error in C#
<p>I am trying a simple move as shown below and get the following error: "The process cannot access the file because it is being used by another process." How do I fix this? Thanks.</p> <pre><code>FileInfo file1 = new FileInfo(srcFile); if (file1.Exists) { FileInfo file2 = new FileInfo(destFile); if (!file2.Exists) ...
c#
[0]
288,993
288,994
page onload alerts
<p>i want to show an alerts when a page loads .but i wat it to show only once in a session so that the users does not get disturbed. please help me with some javascript codes.</p> <p>in hope robin .</p>
javascript
[3]
274,158
274,159
What is the rule for declaration before use in C++?
<p>My course notes say "C++ requires declaration before use in a block and among types but not within a type."</p> <p>Is this what it means?</p> <pre><code>int f() { if (i) return i; int i = 1; //allowed? return 0; } //not allowed? int g() { if (i) return i; return 0; } int i = 1; </co...
c++
[6]
1,605,656
1,605,657
Remove a line with specific characters in a variable before putting into CSV
<p>I would like to ask what is the efficient way to achieve this.</p> <p>I have a variable that holds the data below which is to be pass into a CSV file.</p> <pre><code>"Name","Address","Email","Comment" ", &lt;=, ",", &lt;=, ",", &lt;=, ",", &lt;=, " "John Smith","USA","john@john.net","No Comment" </code></pre> <p>...
php
[2]
2,505,838
2,505,839
Will decimal be supported one day with Math.Pow in .NET?
<p>I saw this dated in 2004:</p> <p><a href="http://connect.microsoft.com/VisualStudio/feedback/details/94548/math-pow-method-should-have-an-overload-for-decimal" rel="nofollow">http://connect.microsoft.com/VisualStudio/feedback/details/94548/math-pow-method-should-have-an-overload-for-decimal</a></p> <p>Math.Pow() m...
c#
[0]
4,843,953
4,843,954
Trying to get a number within an array that is twice the average
<p>I have been assigned to set up an array with points. I am told to get the maximum value, average, and within this same array, if any point in the array is twice the average, I should <code>cout</code> an "outlier." So far I have gotten the average and maximum numbers in the array. but i am unable to set the prog...
c++
[6]
3,686,540
3,686,541
datatable sort method not working!
<p>here is my datatable:</p> <pre><code>DataTable dttemp = new DataTable(); dttemp.Columns.Add(new DataColumn("position", typeof(string))); dttemp.Columns.Add(new DataColumn("specimen", typeof(string))); </code></pre> <p>i am sorting like this and then importing every row into a different datatable:</p> <pre><code>v...
c#
[0]
5,007,801
5,007,802
what means return { someObject : someObject }
<p>I saw this code, after looking for a while and look for on the internet I still do not get it.</p> <pre><code>var client = function (){ var engine = { ie: 0, gecko: 0, webkit: 0, version: null }; return { engine : engine }; }(); </code></...
javascript
[3]
1,771,097
1,771,098
how do i deserialize the WCF String in C#
<pre><code>&lt;string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"&gt; |date|time|name| &lt;/string&gt; </code></pre> <p>I keep getting invalid character when I try to deserialize the XML</p>
c#
[0]
147,193
147,194
Hiding UIToolBar for child views of UITableViewController
<p>My main controller is a subclass of UITableViewController with a UIToolBar at the bottom and when a row is selected, I'd like to display another view without the toolbar. How can I hide the UIToolBar in the child view? Right now, it's present throughout all child views unless they're created as modal.</p> <p>Toolba...
iphone
[8]
4,792,774
4,792,775
Find subsequences of strings within strings
<p>I want to make a function which checks a string for occurrences of other strings within them. However, the substrings which are being checked may be interrupted within the main string by other letters.</p> <p>For instance:</p> <pre><code>a = 'abcde' b = 'ace' c = 'acb' </code></pre> <p>The function in question sh...
python
[7]
2,516,044
2,516,045
Getting debug information from your users
<p>If one of your beta testers has problems with your app crashing, how do you usually go about debugging this if it works fine for yourself/other users?</p> <p>Is there a way to have debug information sent to you?</p>
iphone
[8]
727,717
727,718
C# standard class (enumeration?) for Top, Bottom, Left, Right
<p>Is there a standard c# class that defines a notional Left, Right, Top and Bottom? </p> <p>Should I just use my own?</p> <pre><code>enum controlAlignment { left = 1, top, right, bottom, none = 0 } </code></pre>
c#
[0]
3,029,026
3,029,027
Show additional details when you hover over a column in gridview
<p>I want to display additional details when you hover over a row in gridview.The additional information is retreived from a differant table in my database using ado.net</p> <p>Iam sure this might have been done previously and did not find the correct direction to acheive this. Are there any directions or previous lin...
asp.net
[9]
5,964,931
5,964,932
Problem with using javascript to insert <input> tags in html
<p>I am trying to take text that is in an array (one word per value) and insert it into html. All the code is here: <a href="http://jsfiddle.net/chromedude/r6wVq/3/" rel="nofollow">http://jsfiddle.net/chromedude/r6wVq/3/</a>.</p> <p>Update: My question is what am I doing wrong? It does not do anything which is weird.<...
javascript
[3]
5,885,342
5,885,343
How to display results of a sql query on screen
<p>I am trying to write a simple app just to display on screen the results on a sql query.</p> <pre><code>public class ContactLookup extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ...
android
[4]
2,436,979
2,436,980
Disable all SELECTs with jquery?
<p>I have a post form with a first dropdown for choosing a category and a second for choosing a subcategory. The second one changes according to the first category that was chosen.</p> <p>I have many dropdowns and I show the most correct one depending on the chosen category.</p> <p>I need to disable all dropdowns and...
jquery
[5]
941,938
941,939
Javascript dragging
<p>i was trying to make a drag able element but i failed... i don't want to use jquery.</p> <p>i got the following html code:</p> <pre><code>&lt;div id='area'&gt; &lt;div id='drag'&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>i want to drag id='drag' inside id='area' and not going out of it.</p> <p>sorry for my...
javascript
[3]
4,357,228
4,357,229
Getting callable object from the frame
<p>Given the frame object (as returned by <a href="http://docs.python.org/library/sys.html#sys.%5Fgetframe" rel="nofollow">sys._getframe</a>, for instance), can I get the underlying callable object?</p> <p>Code explanation:</p> <pre><code>def foo(): frame = sys._getframe() x = some_magic(frame) # x is fo...
python
[7]
1,887,236
1,887,237
Android - A way to trigger onRetainNonConfigurationInstance?
<p>Is there a way to trigger the calling of onRetainNonConfigurationInstance on my activity, so getLastNonConfigurationInstance() returns something the next time the activity is created?</p> <p>I ask because I have a memory leak in my application which only appears/crashes my app after my phone is left idle for hours,...
android
[4]
5,647,430
5,647,431
Dynamically adding a custom layout one below other
<p><img src="http://i.stack.imgur.com/nUmAg.png" alt="enter image description here">I have to add a custom layout in a relative layout on a button click. Again on another click add that same layout with another values above the previous inflated layout. and it will continue like this. I don't want to use list view.</p>...
android
[4]
2,031,331
2,031,332
PHP from symbol to hex
<p>I have a chinese character set as a variable with character encoding as utf-8:</p> <pre><code>$a='列'; </code></pre> <p>From this, how can I get the value '5217' assigned to a string (<code>$b</code>) (possibly using UTF-16? but there might be a better way to do it)? </p> <p>Codes: <a href="http://www.fileformat....
php
[2]
2,278,898
2,278,899
Can the apk file exceed 50mb size in android?
<p>I am working on android applications. <strong>Currently my apk size is 12mb.</strong> I need to keep 40mb size images in my project. So if I keep those images in my drawable folder then my apk size will exceed 50 mb. <strong>So will the apk install in mobile if it exceeds 50 mb?</strong> Please help me regarding thi...
android
[4]
5,725,277
5,725,278
PHP - Is there a simple way to loop between two dates and fill in missing values?
<p>I have 2 dates. Lets say they look like this.</p> <pre><code>$start = 2010/12/24; $end = 2012/01/05; </code></pre> <p>I query the database to look for visits between these two dates. I find some. I then populate an array called stats.</p> <pre><code>$stats['2010/12/25'] = 50; $stats['2010/12/31'] = 25; ... </code...
php
[2]
5,801,660
5,801,661
iTunes:How to update the binary and upload into Appstore?
<p>I have an application in Appstore. I have fixed few issues and want to update again in Appstore. How to remove the existing app present in Appstore and update with the version what i have? I went and saw in iTunes connect, there is one button called "Add version". I don't want to add any new version for my previous ...
iphone
[8]
2,191,060
2,191,061
Not able to display special characters
<p>I am unable to display special characters (polish characters) on screen. I have a requirement where I get the data from database which has some special characters. I get the data in an xml format (The xml is not recognizing it as a string) and pass it to action where I try to display the data. I am trying to get t...
java
[1]
5,036,816
5,036,817
How do I save data from a DataGridView to an XML file using the SaveFileDialog?
<p>How do I save data from a <code>DataGridView</code> to an XML file using the <code>SaveFileDialog</code>?</p> <pre><code>saveFileDialog1.Title = "Save File"; saveFileDialog1.InitialDirectory = "C:\\XML\\"; saveFileDialog1.Filter = "XML file (*.xml)|*.xml"; saveFileDialog1.FilterIndex = 2; saveFileDialog1.RestoreDir...
c#
[0]
1,167,430
1,167,431
need to get Posted data as fast as i can
<p>I created a web page to receive some data Posted from third party My code is follows</p> <pre><code> static StreamReader sr; string data = string.Empty; protected void Page_Load(object sender, EventArgs e) { try { if (Request.QueryString["Name"] != null) { ...
c#
[0]
3,776,157
3,776,158
Android Display a list using ListView
<p>I am trying to display a list after clicking a button on Android.</p> <p>This is my code:</p> <pre><code>//Button after clicking should display a list final Button button4 = (Button) findViewById(R.id.widget30); button4.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Inte...
android
[4]
1,994,432
1,994,433
Volume Control in android application
<p>I'd like to know how to control my application's volume from the volume keys (contrary to my belief , I've read they control only the ringer volume). Should I overwrite the onKey Down/Up? </p> <p>Or is there other way to accomplish this? I'm asking because if I overwrite the upper mentioned function for an activi...
android
[4]
3,953,580
3,953,581
How to round currency (decimals) to Millions? (C#)
<p>I have decimal currency amounts (from SQl2k* tables as 32,8) and I would like to round them to Millions with 2 decimal places.</p> <p>The system will be displaying 1000s of rows with multiple amounts in them, and I need to summarise the totals for various categories into a "quick view".</p> <p>e.g.</p> <pre><code...
c#
[0]
887,507
887,508
Getting a list of specific index items from a list of dictionaries in python (list comprehension)
<p>I have a list of dictionaries like so:</p> <pre><code>listDict = [{'id':1,'other':2},{'id':3,'other':4},{'id':5,'other':6}] </code></pre> <p>I want a list of all the ids from the dictionaries. So, from the given list I would get the list:</p> <pre><code>[1,3,5] </code></pre> <p>It should be one line. I know I'...
python
[7]
5,123,813
5,123,814
flvFPW1() - What does it do?
<p>I've been tasked with rewriting the Javascript engine currently powering my customer's internal website. While reviewing the code I've come across this function <em>flvFPW1</em> which I do not recognize, nor can I decipher the code(my Javascript knowledge is modest at best). A Google search gives me a few hits, but ...
javascript
[3]
2,752,309
2,752,310
extended GCD algorithm
<p>i have wrote following algorith for extended GCD algorithm,just dont know how to return triple and could anybody help me?</p> <pre><code>#include&lt;iostream&gt; #include&lt;math.h&gt; using namespace std; int gcd(int a,int b) { return (b==0 ?a:gcd(b,a%b));} long long gcd(long a,long b) { return (b==0 ?a:gcd(b,a%b...
c++
[6]
2,304,576
2,304,577
Passing all data from database into arrays as the application starts
<p>My question is not "how?" but "should I?".</p> <p>I got the app that uses access to database very often. It's money manager basically. It uses data to make calculations, draw a charts and stuff. </p> <p>I was wondering if the accessing database every ocasion I need some data is efficent way, especially when databa...
android
[4]
5,133,994
5,133,995
Session State (Server-side)
<p>Ok I'm sure this is pretty obvious. But when you say session state is persisted on the "server" in memory, are we talking about IIS or what? When I think of Server-side session State, I think memory in terms of IIS app pools and such. Am I off base or missing anything here? </p> <p><a href="http://msdn.microsof...
asp.net
[9]
5,563,039
5,563,040
How to parse a string in javascript?
<p>I'm just curious how I go about splitting a variable into a few other variables.</p> <p>For example, say I have the following javascript:</p> <pre><code>var coolVar = '123-abc-itchy-knee'; </code></pre> <p>And I wanted to split that into 4 variables, how does one do that?</p> <p>To wind up with an array where</p...
javascript
[3]
194,497
194,498
Difference between perform selector in backgorund and detachNewThread
<p>I want to know what is difference between perform selector in backgorund and detachNewThread</p>
iphone
[8]
3,615,754
3,615,755
How do these JS code snippets work?
<p>I'm reading about closures, and I had difficulty understanding the difference between these 2 code snippets:</p> <pre><code>var myElements = [ /* DOM Collection */ ]; for (var i = 0; i &lt; 100; ++i) { myElements[i].onclick = function() { alert( 'You clicked on: ' + i ); }; } </code></pre> <p>The ...
javascript
[3]
5,838,957
5,838,958
How to support Bluetooth for both Android 1.x and 2.x at the same time?
<p>I can access the Android bluetooth api via reflection in Android 1.x and I can also access bluetooth api 2.x using the build in Android class but I can't support both at the same time in my App. Like having the reflection to use the old bluetooth api to support 1.x and at the sametime using the new api for 2.0+ with...
android
[4]
1,841,609
1,841,610
increment the i
<pre><code>for(var i=1;i&lt;=($("input:regex(id,[0-9]+)").length);i++) { array.push($("#i").val()); } </code></pre> <p>Hey, I am tying to store the input value in the array. Each of the input has distinct id associated with it, in this case, 1,2,3,4 and so on. How can I change the i in </p> <pre><code>array.push...
javascript
[3]
4,411,942
4,411,943
jQuery: same filename, wont load issue
<p>in html i got this:</p> <pre><code>&lt;div id="userPhoto"&gt; &lt;a href="profil.php?id=&lt;?php echo $sid; ?&gt;"&gt; &lt;img src="images/profilePhoto/thumbs/&lt;?php if($vP["photo"]){ echo $vP["photo_thumb"]; }else{ echo "noPhoto_thumb.jpg"; } ?&gt;" style="float: left; border: 2px solid #CCC; margin...
jquery
[5]
2,508,073
2,508,074
how to update variables, passed to a method?
<p>when i pass variables to my method they are not updated in the main code, but only passed to the method. how to do that once passed variable would update in main code? Thanks!</p> <pre><code>//////////// here is main code: public static class MyCoding extends MainScreen{ static int mee=1; public static v...
java
[1]
5,275,432
5,275,433
why the output is not good in some cases?
<p>i feel stupid and don't know why the output is not good in some cases. here is the output (at the end) it sould find the first sub string in given string for example: sim('banan','na') -> 'na'</p> <pre><code> def rev (str): rev_str='' i = len(str)-1; while (i &gt;= 0): rev_str += str[i]; ...
python
[7]
1,845,890
1,845,891
Executing JavaScript after Ajax-call
<p>I want to execute javascript for creating calendar using "calendarDateInput.js". Is it possible to execute javascript after an ajax call page using ajax tabs ?</p> <p>I am not using any of the ajax libraries, only direct ajax call.</p> <p>Here I want to call the function in an ajax returned page like DateInput("sm...
javascript
[3]
5,349,258
5,349,259
How to change UIImageView's subview's frame
<p>I have UIImageView with subviews. How can I change frames of subviews after rotation UIImageView? I need your help)</p>
iphone
[8]
3,646,467
3,646,468
About Python MatchObject
<p>I'm learning Python regular expressions and I have a question: all books and Python documents I have read tell me that <code>re.search</code> returns a <code>MatchObject</code> or <code>None</code>.</p> <p>My question is where is the definition of <code>MatchObject</code>? What class does <code>MatchObject</code> b...
python
[7]
3,811,171
3,811,172
Maximum file upload limit in php.ini have no effect on wordpress
<p>I have changed the upload limits in php.ini</p> <blockquote> <p>sudo sublime-text /etc/php5/apache2/php.ini</p> </blockquote> <p>upload limit, post limit and something else, I restarted apache2</p> <p>the phpinfo shows me both upload and post limit as 100M for master and local value inside the index file where ...
php
[2]
3,618,036
3,618,037
How to control log output in Android
<p>I found in my cpp source code, if I define LOG_NDEBUG marco to 0, the log can output correctly, else the output cannot print. Who can I tell me why, or how to find the reason. Thank you very much.</p>
android
[4]
2,394,113
2,394,114
jQuery - call the element this into another function
<p>I have this jQuery function :</p> <pre><code>$('a[name=pmRead]').click(function(e) { e.preventDefault(); $(this).parents(".pmMain").find(".pmMain5").toggle(); $.ajax({ type: 'POST', cache: false, url: 'pm/pm_ajax.php', data: 'pm_id='+$(this).attr('id')+'&amp;id=pm_read'...
jquery
[5]
633,176
633,177
Buttons and Layout bot loaded when I call ListActivity from Activity
<p>I have problem when I call ListActivity from Activity. It gives me an error when I call just following drawing strong Code part from activity it works and gives me an List but I have a layout which consist of buttons and List. Error case is that when I call ListView all of block codes. It gives me an error.</p> <...
android
[4]
5,293,998
5,293,999
how to loop through php object and replace a string in each property ( variable )
<p>I need to remove these ' &amp; ' characters from each property of a php object</p> <p>I tried the code below but it's not working...what am I missing?</p> <p>thanks dudes</p> <pre><code>foreach($query_item as $key =&gt; $value) { $key = str_replace(' &amp; ',' &amp;amp; ',$value); } </code></pre>
php
[2]
723,747
723,748
Set value of a scoped variable in callback / closure
<p>I have a very large JS script with many functions, callbacks and so on... one of my first actions is to obtain a value from an Ajax call. This value I then set to a global variable defined at the start of my script so I can reference the value again and again... the value with determine the user language for instanc...
javascript
[3]
3,447,819
3,447,820
Python getattr() member or function?
<p>I'm trying to use Python's getattr() to extract data out of a number of objects that I got from various APIs that I do not control. My idea was to go through a list of hetrogenous objects and try to getattr() on them until I pull out everything that I need.</p> <p>So I'm doing one of these:</p> <pre><code>if hasat...
python
[7]
4,471,526
4,471,527
Crossplatform way to check admin rights in python script?
<p>Is it any cross-platform way to check that my python script is executed under admin rights? Unfortunately, os.getuid() is UNIX-only and is not available under windows :(.</p>
python
[7]
91,572
91,573
How to append an element with jQuery unless it exists already?
<p>I have this jQuery function that appends a <code>span</code> labelled "optional" to a label if no option is set in the select box.</p> <pre><code>function setLabel() { var label=$('label[for=person_address]'); if ($('select#person_organisation_id').val().length != 0) { label.append(' &lt;span&gt;— opt...
jquery
[5]
4,484,426
4,484,427
Update multiple row by get value from check box in php
<p>Could you help me: I have three table :there are <code>:users(userid,uername,password,groupid),group(groupid,groupname),menus(menuid,menuname),permissions(menuid,gorupid):</code> I would like update to table:permission here my coding:</p> <pre><code>&lt;?php require_once("includes/session.php"); $post = (!e...
php
[2]
5,305,814
5,305,815
Newbie having trouble with Javascript
<p>I'm trying to tokenize the string below, but execution terminates at the if statement... What am I missing? The my_tokens.length is OK on the alert, but fails on the if...</p> <pre><code> var my_value = '1 1 0'; var my_tokens = my_value.split(' '); alert('my_tokens=' + my_tokens); /* prints 1,1,0 as expected ...
javascript
[3]
2,975,095
2,975,096
is it possible to have a virtual class declaration in a class?
<p>I'm setting a up an interface for various components of a framework in a personal project, and i've suddenly thought of something that i figured might be useful with an interface. My question is whether this is possible or not:</p> <pre><code>class a { public: virtual class test = 0; }; class b : public a { p...
c++
[6]
210,504
210,505
How can I use localstorage to remember a selection list choice?
<p>I have a selection list that I would like to remember what was chosen when a visitor returns to the page. The selection list is used to set a value used in another function. I understand there is something call DOM storage that can use localstorage to save a value like a cookie but, I don't know how. :(</p> <p>Can...
javascript
[3]
5,810,870
5,810,871
Alternative C++ Compilers?
<p>I want to start learning C++, so I downloaded Microsoft Visual Studio 2010 Express, and the entire application freezes and crashes every time I try to compile (debug and release build) something (I have tried running it in Admin Mode). Is there a good alternative compiler that I could still use VS 2010 as the IDE?</...
c++
[6]
3,565,945
3,565,946
Save file from web?
<p>how do i save file from a website for example an image?</p>
android
[4]
5,437,603
5,437,604
How to get coordinates by tapping google map
<p>I'm developing an Location based reminder for android using gps. I want to obtain the co-ordinates of a particular location by tapping a map. i am unable to find a fitting solution to this problem. Can anybody pls help? Thank you in advance..</p>
android
[4]
917,747
917,748
Manually need to synchronize access to synchronized list/map/set etc
<p>Collection class provides various methods to get thread safe collections . Then why is it necessary to manually synchronize access while iterating ?</p>
java
[1]
178,113
178,114
Build a Database with 7 values already inserted
<p>In my application, after the user presses the appropriate button, an activity starts that creates a database with one table with two columns. The thing I can't seem to get is: I would like one of the columns to automatically fill with the days of the week so that when I return a cursor over the database for the lis...
android
[4]
1,385,959
1,385,960
Auto set input values
<p>Somewhat a simple question, but i can't get it working.</p> <p>I want to make a simple checkup to see if the browser supports the placeholder attribute. If they don't i want to set the values if the input fields with jquery.</p> <p>I'm testing it on firefox now, but can't get it working. I don't get any alert fiel...
jquery
[5]
4,111,870
4,111,871
Ajax Requests Chaining/Nesting?
<p>I'm writing a script that uses Ajax. The script will call an API, and then use that data to call the API again, and then based on that a final request to the API a third time.</p> <p>Currently the Ajax requests are chained, so if response status is 200, it will perform the other Ajax request and if that one is 200 ...
javascript
[3]
4,670,284
4,670,285
Providing expansion content to Android apps
<p>I plan on providing a free app in the Android Market with some sample content from various "expansion" content packages that I intend to sell separately. These expansions would contain no executable code, just additional static data like sounds and images. </p> <p>I've researched this a bit trying to see how this c...
android
[4]
4,419,106
4,419,107
Android App development what is better browser based or pure java based
<p>I have an app that has requirements for various hardware needs on the adroid platform, such as the gps, camera, storage, etc. But this app is also going to communicate constantly while in use with a web based service. Its an extension of that service kinda like how facebook has an app for its services, well I have a...
android
[4]
5,168,240
5,168,241
Hide/show elements in plain JavaScript
<p>I wrote a few lines of jQuery code, but don't know how to realize this in plain JavaScript. That output:</p> <pre><code>echo "&lt;tr id='perf_row' class='table_header_tr' name='tr_$row_fio_perf[0]'&gt; &lt;td class='table_header_td' name='td_$i'&gt; $i &lt;/td&gt; &lt;tr&gt;"; </...
javascript
[3]
293,673
293,674
Adding script tag to document IE7 issue
<p>My page throws an error in IE7 when I appending an script tag the body.</p> <p>The error occurs on the line that is commented:</p> <pre><code>&lt;script type="text/javascript"&gt; cmSetClientID("90065468", false,"www9.blah.com","blah.com"); //--&gt; &lt;/script&gt; </code></pre> <p>This is how I append the...
javascript
[3]
2,912,835
2,912,836
How to access String resource from another application
<p>I have a application 'A' and application 'B'. </p> <p>Say, I have a string resource in the application 'A'</p> <pre><code>&lt;\string name="abc"&gt;ABCDEF&lt;\/string&gt; </code></pre> <p>How do I access the value of abc from the Activity in 'B'.</p> <p>I tried the following method.</p> <pre><code>try { Pac...
android
[4]
1,678,231
1,678,232
Works inSimulator 6.1, but not on iPhone iOS 6.1
<p>I am using the iPhone 6.1 Simulator and it works. However, when I go to my iPhone [iOS 6.1] I get an error "Error while updating. not an error". HELP!!!!</p> <pre><code> NSString *filePath = [[[NSBundle mainBundle] resourcePath ]stringByAppendingPathComponent:@"myDatabase.sqlite"]; NSString* str2 = SeqNo1...
iphone
[8]
5,509,121
5,509,122
Use resource font directly in Java
<p>How to use resource font directly in Java?</p>
java
[1]
2,604,977
2,604,978
how to delete all check file using for loop?
<p>This is my code which deletes only the first checked file. </p> <p>I want to delete all checked files, what changed do I need to make?</p> <p>How do I collect all values in CheckArr[i]? </p> <p>The code only deletes the first checked file in grid. I want to first collect all checked values which are true then m...
android
[4]
5,718,973
5,718,974
how to select a dynamic string from a sentence
<p>How can I select the first number from these example sentences</p> <pre><code>" 1 SAMPLE SAMPLE 1" " 20 SAMPLE SAMPLE 2" </code></pre> <p>I want to isolate the first number from those lines.</p> <p>I tried a few string functions that come with javascript but can't seem to make them work. I don't want th...
javascript
[3]
685,695
685,696
How to check if string contains anything but QWERY/1234
<p>I'm trying to make sure a string I'm posting only has alphabetical and numberical letters/numbers + ,.; etc. However all checks I seem to do still bring back à è ò as valid?</p> <p>Anyone know a solution for this?</p> <p>Thanks</p>
php
[2]
4,298,649
4,298,650
Dynamically display data from csv file into drop down list
<p>I have a csv file that contains a bunch of states in one column of its table. I need to take those states and populate a drop down list with them <em>with no repeats</em></p> <p>My code for this is</p> <pre><code>//make unique array for ($i=0; $i&lt;count($array); $i++) { $state_array[$i]=$array[$i][1]; } //di...
php
[2]
1,906,765
1,906,766
Integer prototype
<p>how can you make an prototype on an Integer?</p> <pre><code>Integer.prototype.num = function(dec){ return number_format(this.toString(), dec); } </code></pre>
javascript
[3]
4,927,152
4,927,153
my simple window.open function in jquery it's not working
<p>i am trying to open two links when i click the readmore text but here same link opened two times my html is:</p> <pre><code>&lt;html&gt;&lt;body&gt; &lt;p&gt; &lt;a style="font-family: Verdana;color:#478718;font-weight:bold;text-decoration:none;cursor: pointer;cursor: hand;" href="http://www.scribd.c...
jquery
[5]
1,507,898
1,507,899
need help regarding $_POST in PHP
<p>i am new to stack overflow :)</p> <p>i have problem with my piece of code , kindly let me know where exactly i go wrong.i am sending an email to my account and the error i get is ... that i get only half of the information.to get a clear idea of wat i am asking i am attaching the code below ...please review and let...
php
[2]
78,150
78,151
How to download audio clip and play in media player in android?
<p>I need help with download audio clip from server and play default android media player with in same screen,How can i download audio clip and invoke media player.How can it possible this.please help me friends </p> <p>Thanks Friends..</p>
android
[4]
5,413,898
5,413,899
main function - what is the point of a return value?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/204476/what-should-main-return-in-c-c">What should main() return in C/C++?</a><br> <a href="http://stackoverflow.com/questions/3309042/what-does-main-return">What does main return?</a> </p> </blockquote> <p>I'...
c++
[6]
2,458,656
2,458,657
How to simulate a click event in jQuery
<p>note: all this is on chrome</p> <p>I am trying to test something that responds to a click a checkbox. I realize jQuery.click() exists, but it seems to be different from a "native" click in that during the click handler, the state of the checkbox isn't updated yet (so checkbox is unchecked, you call .click(), in the...
jquery
[5]
2,368,866
2,368,867
How can I simplify that part of code?
<p>I have a code:</p> <pre><code> byte[][][] file = GetConfigData(); if (file == null) return; int pages = 0; for (i = 0; i &lt; file.Length; i++) { if (file[i] != null) { for (j = 0; j &lt; file[i].Length; j++) { if (file[i]...
c#
[0]
3,940,571
3,940,572
Making a "folder" in Android app - sqlite or other method?
<p>So I'm making a task management app in Android and have thus far made an implementation that just displays a list of tasks which are store in an SQLite database.</p> <p>I want to be able to add categories or folders that the tasks can be sorted in to, and planned to do it using a one to many relationship with SQLit...
android
[4]
2,313,817
2,313,818
retrieve an image from server with a rest web service
<p>Sorry for my english. I want to retrieve image from a server via a rest web service to android.Can someone explain me the architecture which i'll follow to do this? thanks</p>
android
[4]
825,981
825,982
PHP array copying error
<p>when I'm trying to copy an array's element to another using php</p> <pre><code>$new=array(); for($i=0;$i&lt;$num;$i+3){ $new[] = $old[$i]; } </code></pre> <p>it is throwing an error <code>Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 35 bytes)</code></p> <p>I need to copy <code>...
php
[2]
4,870,754
4,870,755
How to get articles from a custom field to display to a specific post
<p>Hy im building a cinema site..</p> <p><a href="http://cinema.trancelevel.com/amazing-spider-man-2012/" rel="nofollow">http://cinema.trancelevel.com/amazing-spider-man-2012/</a></p> <p>How can i get the news that contain the movie title...</p> <p>How can i get the news by tag.</p> <p>i have this code : link <a hr...
php
[2]