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,785,525
2,785,526
Enable and disable the system searching option
<p>how to enable/disable the system searching option thru c# program</p> <p>yes i want enable/disable (Start->Search) option. already i have disable it thru program i don't know how to enable it..</p>
c#
[0]
1,569,461
1,569,462
startActivityForResult is undefined for class CustomizeDialog extends Dialog
<p>I am working in android. i want to make a custom dialog in which i want to add a paypal button. </p> <p>this is the code for my program:-</p> <pre><code>public class CustomizeDialog extends Dialog implements OnClickListener { Button close; String TAG="CustomizeDialog"; Context customize_dialog; CheckoutButton l...
android
[4]
3,804,716
3,804,717
Help with PHP Session Start
<p>my program gives me this error, - Warning-PHP Function_start(); C:/PHp\tmp no such file or directory.</p> <p>What do i do?</p> <p>the session save thingy is pointing to windows temp.</p> <p>Thank You</p>
php
[2]
5,447,188
5,447,189
How to process sound in Java for Android?
<p>Folks,</p> <p>As a start, I would like to develop a Java application that will act as a guitar tuner. The application should listen to what I play on the guitar and tell me the notes I played. I am wondering what level of support is provided by Android SDK. Do I need any other open source library? Any pointers woul...
android
[4]
3,554,265
3,554,266
Pass entire $_POST variable to popup
<p>I have a PHP webpage that takes which accepts a rather large POST array. I have a button on the page that opens a PHP popup window. Is there a convenient way to pass the entire $_POST array to the popup?</p> <p>Edit: It is an entirely different page. I open it with JavaScript: window.open</p>
php
[2]
2,833,962
2,833,963
Reading stream twice?
<p>When I have uploaded an image from my website I need to do 2 things: </p> <ol> <li>read the image dimensions</li> <li>save the image to the database</li> </ol> <p>the first thing I do is reading the image stream into an Image object, like so:</p> <pre><code>var file = Request.Files["logo"]; Image FullsizeImage =...
c#
[0]
2,700,766
2,700,767
Why the result of bool(true) && string is string in javascript?
<p>test code is:</p> <pre><code>console.log(true &amp;&amp; "abc");//abc </code></pre> <p>who can tell me why the result is <code>abc</code>?</p>
javascript
[3]
955,358
955,359
Empty folder in Assets tree on Android
<p>I'm using the AssetManager to list the contents of my assets folder on Android. Everything is working as expected except for if I have an empty subfolder. It is not included in the list. If I put a file in the folder, the folder and the file show up no problem.</p> <p>Is this the expected behavior? I imagine that u...
android
[4]
2,920,602
2,920,603
multiple choice questionaire in php
<p>condition is </p> <ul> <li>IF D is more than or equal to 3 Answer No1</li> <li>IF I is more than or equal to 3 Answer No2</li> <li>IF S is more than or equal to 3 Answer No3</li> <li>IF C is more than or equal to 3 Answer No 4</li> <li>IF D&amp;I are more than or equal to 3 Answer no5</li> <li>IF D&amp;S are more t...
php
[2]
5,668,088
5,668,089
apk installation via my application
<p>i get parse error once i use my function below</p> <pre><code>public void installFile() { String path = "/data/data/com.utsc.smartdictate/"; String filename = "smartdictate.apk"; File file = new File(path + filename); if(file.exists()) { Intent intent = new Intent(Intent.ACTION_VIEW); ...
android
[4]
4,918,254
4,918,255
How to Edit custom UITableViewCell's Frame size?
<p>I am using custom UITableViewCell class to make table view cell. I am changing row height dynamically:</p> <pre><code>- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 60; } </code></pre> <p>Its working for row height perfectly.</p> <p>But this only changi...
iphone
[8]
3,100,934
3,100,935
Intializing classes in module for namespace
<p>There is a module <code>car.py</code>.</p> <p>There are engine and tires, and I want them (theirs methods and properties) to be accessible as </p> <pre><code>car.engine.data # and car.tires.data </code></pre> <p>So file <code>parts.py</code> looks like </p> <pre><code>class engineClass(object): def __init__...
python
[7]
5,281,478
5,281,479
How to get the onResume of Application?
<p>My application has 3 activities-Main menu, sub menu, detail. Every time the <strong>APPLICATION</strong> resumes, I want to get some intimation so that I can start downloading some files. </p> <p>Right now what i am doing is- on each activity <code>onResume</code>, i check if downloading is already going on or not....
android
[4]
3,898,529
3,898,530
How do you sanitize your data?
<p>This is the function i currently use(from a php book i bought):</p> <pre><code>function escape($data) { return mysql_real_escape_string(trim($data), $this-&gt;linkid); } </code></pre> <p>But I feel like it could be safer. for example, maybe use htmlspecialchars. It always makes me paranoid. I've read that mysql_...
php
[2]
95,413
95,414
What's wrong w this code: file_get_contents from remote zipped file and extract to local directory
<p>The purpose of this code is to pull upgrade.zip from a central server, extract it and place it in a folder on the resident server. I get no errors, it just results in the die("!There was a problem. Please try again!"); </p> <pre><code>require('../../../wp-blog-header.php'); function openZip($file_to_open...
php
[2]
2,397,231
2,397,232
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
<p>I need to work on a project that was written in msvcpp6.0sp6</p> <p><strong>I DIDN'T write the project. I know very little about its inner works. I DO know it WAS POSSIBLE to build it in the past.</strong></p> <p>while trying to build this project that was built successfuly in the past(not by me)</p> <p>I get the...
c++
[6]
4,464,901
4,464,902
const char* initialization
<p>This is one usage I found in a open source software.And I don't understant how it works. when I ouput it to the stdout,it was "version 0.8.0".</p> <pre><code>const char version[] = " version " "0" "." "8" "." "0"; </code></pre>
c++
[6]
4,286,248
4,286,249
Extraxt values and distribute with jquery
<p>This question is the <strong>opposite</strong> of <a href="http://stackoverflow.com/questions/9135079/collect-several-input-fields-and-insert-into-a-single-field-with-jquery/9135129#9135129">Collect several input fields and insert into a single field with jquery</a></p> <p>I have 4 input textfields, and a single te...
jquery
[5]
37,948
37,949
how to access the id of textarea in javascript
<p>i have to acces the id of textarea in javasript.Please tell me how we can access the id of the textarea in javascript.</p>
javascript
[3]
3,406,601
3,406,602
Is it possible to control the keyboard type by code ? (android)
<p>Is it possible to control the keyboard type by java android code ? </p> <p>for example: if flag=1 and the focus on TextView the keyboard will be numeric</p> <p>and if the flag=0 the keyboard will be alpha numeric</p>
android
[4]
1,162,590
1,162,591
Javascript access parent properties
<p>How can I get parent options?</p> <p>I would like to access a global myObject options</p> <pre><code>var myObject = { method: function(){ this.options = {}; }, property: { propertyMethod: function(){ alert(this.options); } } } myObject.method(); myObject.proper...
javascript
[3]
3,791,165
3,791,166
When to use Parasitic Constructor Pattern
<p>Why should Parasitic constructor pattern be used with caution and when it would be appropriate to use that pattern?</p>
javascript
[3]
3,046,366
3,046,367
Why does 1.__add__(1) yield a syntax error?
<p>Why does </p> <pre><code>1.__add__(1) </code></pre> <p>yield <code>SyntaxError: invalid syntax</code>? What do the extra brackets add?</p> <pre><code>(1).__add__(1) </code></pre>
python
[7]
2,831,776
2,831,777
PHP - aiContactSafe change field order
<p>i created form using aiContactSafe. But the field order is different. How to change the field order? i dont know how to change the field order. please help me. Please tell the procedure step by step.</p> <p><img src="http://i.stack.imgur.com/18xsG.png" alt="enter image description here"></p>
php
[2]
5,661,364
5,661,365
Create a function to a function that runs a for loop?
<p>I have made some code that creates a red border around an image when the user click on to highlite thats the choosen one. But I want to erase previous or all border with a white border around all images before a new click is made on another image. My question is how do I activate a call to a function when a click is...
jquery
[5]
5,525,907
5,525,908
How can I link the command pattern to the button selected and the last checkbox selected?
<pre><code>Public Interface command{ public void execute(); { } //this is the command interface public class UndoCheckbox implements command{ Undo undo; Public UndoCheckbox(Undo undo){ this.undo=undo; } public void execute(); //to execute } ...
java
[1]
2,362,931
2,362,932
A cool python script to get teen learning python excited about programming?
<p>So I'm teaching a friends son some python programming, just going through control of flow, basic data types/structures.</p> <p>I want to go through a tutorial with him, and hopefully build something simple yet cool to get him excited about the power of python.</p> <p>Any ideas?</p>
python
[7]
1,915,186
1,915,187
how to set SplitPane setOneTouchExpandable expand in only one direction
<p>I set setOneTouchExpandable(true) and setEnabled(false) in my JSplitPane allowing the users only to expand left or right . But what I actually want is to have the the left panel either collapse to the left or stay at the default position. (that's why i set setEnabled(false)).</p> <p>is there a simple way to achieve...
java
[1]
2,528,676
2,528,677
Re-Sizing Images With PHP
<p>I have a website where users can upload images. Most of these images are far too big. I know I can limit the size of the file before the user even uploads it, but that is impractical. Most smart phone image sizes range from 2MB- 4MB, and that is what I expect my users to upload. But when they do, even after the page...
php
[2]
5,554,508
5,554,509
Downloading a large list of files in the background on Android
<p>I have an app that allows the user to cache data for offline use. The data I need to download is mostly images, but includes other things like videos, text files &amp; mp3s. There may be as little as 20 files to download or upwards of 300 or more. The files range from a few kilobytes to several megs in the case of v...
android
[4]
2,155,528
2,155,529
Creating a processing queue in python
<p>I have an email account set up that triggers a python script whenever it receives an email. The script goes through several functions which can take about 30 seconds and writes an entry into a MYSQL database.</p> <p>Everything runs smoothly until a second email is sent in less than 30 seconds after the first. The...
python
[7]
3,926,318
3,926,319
asp.net - best way to display 5 records at a time using two pages
<ol> <li><p>I have to create a asp.net page that shows 5 records, stays for 10 seconds, shows the next 5 for another 10 seconds and return to the first 5 record when reaching last record.</p></li> <li><p>I need to retrieve data from database every 5 min only to do refresh for the displayed record. I want to do this in ...
asp.net
[9]
5,160,260
5,160,261
javascript alert problem
<p>Work on ASP.net C# vs 05.</p> <p>To Preventing Duplicate Record Insertion on Page Refresh. Under the button event i wrote below code</p> <pre><code>Response.Redirect(Request.Url.ToString(), false); </code></pre> <p>i also used a javascript alert under this event ,after use the above code alert message is not show...
javascript
[3]
2,705,703
2,705,704
Does the SDK provide a way to group Annotations, like on Photos (places)
<p>I would like to implement a similar effect where the pins are grouped together then separate with an animation as you get closer to the points. This effect is seen in the Photos app when you select Places with geotagged apps</p>
iphone
[8]
2,073,629
2,073,630
I cannot use IF-THEN-ELSE and $_SERVER variables in PHP class definition
<pre><code>class MY_CONFIG { if ( $_SERVER["SERVER_ADDR"] == "127.0.0.1" ) { var $default = array( 'foo' =&gt; 1, 'bar' =&gt; 2 ); } else { var $default = array( 'foo' =&gt; 3, 'bar' =&gt; 4 ); } } </code></pre> <p>I am new to PHP. What's wrong with my code above?</p> <p>The system keeps s...
php
[2]
159,653
159,654
Merge two DataColumns of type DateTime
<p>i have a datatable which contains two Datacolumns (date_start,date_sent) and i wanted to merge them into one single column (date_order) to then apply a sort like this:</p> <pre><code>DataRow[] dtSorted = dt.Select(null, "date_order DESC",DataViewRowState.CurrentRows); </code></pre> <p>Since whenever date_start is ...
c#
[0]
408,256
408,257
Console.ReadLine().ToString() generates error
<p>I never did Console programming so got stuck in this silly thing:</p> <pre><code>Console.Write("Enter customer's salary: "); string sal = Console.Write("{0}! ", Console.ReadLine().ToString()); </code></pre> <p>It generates error: Cannot implicitly convert type 'void' to 'string'</p>
c#
[0]
3,215,560
3,215,561
C++ :: Boost :: posix_time (elapsed seconds. elapsed fractional seconds)
<p>I'm trying to come up with an answer to two questions that didn't seem hard at first. Q1 : How do I obtain the number of elapsed seconds between UTC.Now() and a given date? A1 : Just like in the code below! Q2 : How do I determine how many fractional seconds have elapsed since the last "full" second ? I'd like to pr...
c++
[6]
710,300
710,301
How to Create a class dynamically with its variables and methods in Java?
<p>How to Create a class dynamically with its variables and methods in Java without using Reflections.</p> <p>I want that the class should be created at runtime with variables like age, name and method like display(String age,String name). </p>
java
[1]
5,591,217
5,591,218
Accessing "pseudo-globals" by their name as a string
<p>I am now in the process of removing most globals from my code by enclosing everything in a function, turning the globals into "pseudo globals," that are all accessible from anywhere inside that function block.</p> <pre><code>(function(){ var g = 1; var func f1 = function () { alert (g); } var func f2= function (...
javascript
[3]
3,255,006
3,255,007
Android soft keyboard showing problem
<p>I'm trying to control soft keyboard using this:</p> <pre><code>((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)) .hideSoftInputFromInputMethod(filterText.getWindowToken(), 0); ((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)) .showSoftInput(filterText,...
android
[4]
3,870,308
3,870,309
Python and PAMIE
<p>I am having trouble navigaing a website with PAMIE. I want to invidually use it to open IE, then put in my username and password on a website. First I am trying o just navigate a site. This is what I have so Far....</p> <pre><code>from PAM30 import PAMIE ie = PAMIE.PAMIE() website = "http://www.python.org" ie.na...
python
[7]
1,143,612
1,143,613
reading excel error on configuring IIS of running asp.net application
<p>I am running my asp.net application on Window Server 2008.</p> <p>IF I enable x86 application on ISS, it is running fine with excel 2003 files: xls</p> <p>But then I got a problem of running excel 2007: (Microsoft.ACE.OLEDB.12.0). If I switch it back to x64 mode, then it is running fine with excel 2007. </p> <p>S...
asp.net
[9]
2,899,842
2,899,843
function that finds how many times n can be divided in half
<p>Basically, I need a function that will divide n by 2 and return the number of times it can be done.</p> <p>Coding so far:</p> <pre><code>def div(n): while n &gt;= 0: n / 2 return n </code></pre> <p>I know for a fact that I have to use the while loop but I'm not confident in my third line of coding...
python
[7]
4,508,065
4,508,066
How to use presentModalViewController to create a transparent view
<p>I am displaying a modal view with</p> <pre><code>[self presentModalViewController:controller animated:YES]; </code></pre> <p>When the view moves up the screen it is transparent as per the setting in the xib file it is created from, but once it fills the screen it goes opaque.</p> <p>Is there anyway of keeping the...
iphone
[8]
5,312,070
5,312,071
Why does my ListView stack views on top of each other instead of vertically cascading downwards?
<p>I am returning a Custom View that extends RelativeLayout.</p> <p>How can I fix this? Thanks.</p> <p>This is the listview:</p> <pre><code>&lt;ListView android:id="@+id/view_container" android:layout_below="@+id/optionBarContainer" android:layout_width="fill_parent" android:layout_he...
android
[4]
3,842,012
3,842,013
I am a new programmer and I can not get my fields to be stored in the database from a registration form
<p>If I declare a global variable such as a database connection of $mysqli how do I use that in a class. i am trying to use it in my user class. Do i store it as a public variable in the class or as a global in the function itself. I also think there is something wrong with my following code but I may be wrong.</p> <p...
php
[2]
4,326,401
4,326,402
Declaring class properties as a decimal
<pre><code> public class Invoice { public decimal Amount { get; set; } } </code></pre> <p>I know that <strong>M</strong> is the suffix for decimal values</p> <pre><code> public class Invoices { public void IdentityTest() { Invoice firstInvoice = new Invoice(); ...
c#
[0]
1,958,720
1,958,721
How to convert German plural nouns to singular in Python?
<p>I'm searching for an algorithm, which converts German plural nouns to singular. Any idea is welcome.</p>
python
[7]
395,771
395,772
Multiple return statements vs Multiple goto statements : which one would be preferable?
<p>I read that both multiple returns and multiple goto statements are bad programming practice. I have a function which can detect some 8 types of errors. In case of error, should i return error code or should i use goto statment to go to end of function and return from there. Whenever memory freeing is required befor...
c++
[6]
4,914,995
4,914,996
Threads, Queue and a serious headache
<p>I am making a program for days but nothing seems to be working. I want to run (n threads=user sepecified threads ie 1-100) on a listview which has 1st field as email (the list is of 10000 records). Now I want to verify each email and add on the 2nd column the thread id and on the third column the result whether the ...
c#
[0]
1,605,690
1,605,691
ListPreference: how to display without popup?
<p>In my app's preferences there are some voices that are managed with ListPreference. For example:</p> <pre><code>&lt;ListPreference android:title="@string/pref_clear_buttons" android:summary="@string/pref_clear_buttons_summary" android:key="clear_buttons" android:defaultValue="right" ...
android
[4]
859,696
859,697
Use regular expression to split up a decimal number
<p>Using VS 2012, Windows Forms, C#</p> <p>If I have a <code>decimal</code> variable called <code>productPrice</code> and I want to split it up into two numbers, the number to the left of the decimal, and the decimal and the number to the right, what is the <code>regex</code> pattern I need to use?</p> <p>For example...
c#
[0]
3,624,238
3,624,239
How to get count(*) on PHP?
<p>I have a following outputs from MySQL.</p> <pre><code>Array ( [0] =&gt; stdClass Object ( [id] =&gt; 19 [date] =&gt; 2010-10-04 11:00:00 [course] =&gt; Yoga [course_id] =&gt; 19 [count(*)] =&gt; 2 [capacity] =&gt; 20 ) [1] =&gt; stdClass Object ( ...
php
[2]
1,738,280
1,738,281
Comparing Textbox values in JQUERY
<p>Am comparing 2 values in text box </p> <p>say <code>$('#Low'.val()) &gt; $('#High'.val()) //Where low and high are textbox id</code></p> <p>But it is fails in few scenarios as it is comparing string. </p> <p>i have 2 questions here</p> <p>1.how to convert to integer or float and check it in correct way </p> <p...
jquery
[5]
2,258,022
2,258,023
Releasing of the associative arrays
<p>How to rightly release the associative arrays from memory? Or memory will be released automatically and manually release isn't necessary?</p>
javascript
[3]
2,947,402
2,947,403
Handle multiple Clients
<p>I'm writing an application that deals with a server and a client. I don't necessarily know how to get the server to handle multiple clients, this is where I'm having problems with. Right now the server side only handles one client. So how can I handle multiple clients. </p>
c#
[0]
254,225
254,226
How to resrtrict resolution in Android Manifest
<p><a href="http://developer.android.com/guide/topics/manifest/supports-screens-element.html" rel="nofollow">http://developer.android.com/guide/topics/manifest/supports-screens-element.html</a> <a href="http://developer.android.com/guide/topics/manifest/supports-screens-element.html" rel="nofollow">http://developer.and...
android
[4]
303,096
303,097
Multiple Selection in Dropdown and update query string
<p>I generate a report according to selection of company and their customer. I use one dropdown for company and according to company the customer is displayed. However, I want to make it possible to select multiple customers, and when the user clicks on the button to the view report, I want to update the query string w...
c#
[0]
3,993,849
3,993,850
apending a row in php
<p>how a row can be appended to a table using php?</p>
php
[2]
3,679,820
3,679,821
Navigating through
<p>I am new to android and, of course, I have some problems. Your help will be appreciated. </p> <p>I am trying to create two activity classes: one of them is ListActivity class. </p> <p>Normal activity class pass a data(string) to ListActivity class(using bundle) to display in the list. </p> <p>Once we click on th...
android
[4]
4,010,941
4,010,942
JavaScript shells - what is the difference
<p><a href="https://developer.mozilla.org/en/JavaScript%5Fshells" rel="nofollow">https://developer.mozilla.org/en/JavaScript_shells</a> lists quite a few shells. What is there to choose between them.</p>
javascript
[3]
680,284
680,285
How to save contact number in android device?
<p>I want to save contact number in my Apps, if I am using android 1.6 so this my apps is not work in android2.2 and same if T use android2.2 so my apps does not work with Adroid 1.6 supportable device.</p> <p>Please help me.</p> <p>Thanks in advance.</p>
android
[4]
3,431,367
3,431,368
Cache selector in object (jquery)
<p>i've a problem... What am I doing wrong?</p> <p>I want to use a selector previously saved in a variable. The idea is to use it within a function in an object.</p> <pre><code>var escribir = { obj:$('#cont'), algo: function(i) { escribir.obj.html(i++); setTimeout('escribir.algo('+i+')',1000)...
jquery
[5]
4,744,367
4,744,368
JavaScript: What is the equivalent of PHP's "$this->$somefunc()"?
<p>Is it possible to store the name of a function as string in JS, and invoke it from an object, pretty much like the PHP code below?</p> <pre><code>$this-&gt;$someFunc(); </code></pre>
javascript
[3]
2,263,253
2,263,254
Is there a way I can generate a class with all the properties obtained from a List<string>?
<p>I have a List object. In the code, I want to declare a new class , and its attributes, which are dynamically generated, are all obtained from the List object. Is there a way I can do this?</p> <p>For example: I have a <code>List&lt;string&gt; lstStr= "apple, pear, banana";</code> and I want to generate a new class ...
c#
[0]
3,826,923
3,826,924
Show content between two dates with PHP?
<p>I want to be able to show some content or echo some text between and on two dates.</p> <p>Its for a promotion of a product, between the dates given the price will be lower and after the promotion the price will return to the original cost.</p> <p>Is this possible?</p> <p>Cheers</p> <p>Matt</p>
php
[2]
3,317,866
3,317,867
Colour Animation in Javascipt
<p>I would like my text to fade from white to black and the background colour to change from black to white simultaneously any ideas?</p>
javascript
[3]
4,599,586
4,599,587
Display date and time something like blog
<p>I have a blog. Regularly I post some fun thing. I maintain the timestamps for response times. How do I display the time like the following?</p> <ul> <li><p>2010-02-09 1 hour before, if the reply is just 1 hour old</p></li> <li><p>2010-02-09 20 hour before, if the reply is just 20 hour old</p></li> <li><p>2010-02-08...
php
[2]
4,151,588
4,151,589
How to get the current user's home directory in Windows
<p>How can I get the path to the current User's home directory?</p> <p>Ex: In Windows, if the current user is "guest" I need "C:\Users\guest"</p> <p>My application will run on most of the Windows versions (XP, Vista, Win 7).</p>
c++
[6]
1,268,383
1,268,384
How to start developing applications for Android?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/144254/getting-started-with-android">Getting started with Android</a> </p> </blockquote> <p>I'm interested about learning how to develop applications for Android. I downloaded the Android SDK but I don't see whe...
android
[4]
2,839,044
2,839,045
online php developer tools for my server?
<p>I'm searching for a tool, which i can upload to my server and then edit/create new php files so that i can create a new php project with any computer that have a internet browser</p>
php
[2]
3,670,582
3,670,583
Adding activity re-sizing feature
<p>I have a activity which I want to resize based on user event.I tried <code>getWindow.setLayout()</code> inside <code>onTouchListener</code> but the resizing is not smooth at all.Please provide some suggestions.</p>
android
[4]
2,075,898
2,075,899
Is it possible to obfuscate raw C# source code?
<p>I have seen many C# obfuscators, and they all need an assembly (.exe, .dll, etc.) Why isn't it possible to just obfuscate the source code? Like you can do with javascript for example: <a href="http://www.javascriptobfuscator.com" rel="nofollow">http://www.javascriptobfuscator.com</a></p>
c#
[0]
555,014
555,015
Get attribute values as array from selection of elements using jQuery
<p>I have the following using jQuery:</p> <pre><code>var x = $('.boxes &gt; input:checked'); </code></pre> <p>From x I am trying to retrieve an array of id values and have been unable to work out how to do this.</p> <p>Something like:</p> <pre><code>var y = x[id]; // y becomes an array like ['1', '2', '3'] assuming...
jquery
[5]
4,175,195
4,175,196
Android : Using GPS
<p>Is there any way by which i can get the last GPS location my application itself ???? </p> <p>Is there any API available which can show me the Lat and Long. of the place from where i have connected GPS last time.</p> <p>Any help, much appriciated </p> <p>Thank you</p>
android
[4]
5,815,690
5,815,691
calling jquery ajax function from javascript
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4982983/jquery-ajax-return-value">jQuery ajax return value</a><br> <a href="http://stackoverflow.com/questions/14220321/how-to-return-the-response-from-an-ajax-call-from-a-function">How to return the response from...
javascript
[3]
422,863
422,864
jquery 'invalid expression' using selector on a tablecell
<p>Hi can someone tell me what i'm doing wrong in this jquery statement. I have a 'row' object which contains any number of tablecells, and i'm looking only for the cells that contain a textbox or text area.</p> <p>This statement works fine:</p> <pre><code>var $textCells = jQuery('td:has(textarea)', row); </code></pr...
jquery
[5]
3,140,902
3,140,903
How do I match words in different languages
<p>How can I write a regular expression to efficiently match both Swedish and English words?</p> <p>I must be able to match the likes of Å, é and '. I think 123 is also a word. I even think 1:e and 1st are words... </p> <p>How would I proceed if I wish to match words from Russian and Japanese also. </p> <p>Thanks,</...
python
[7]
560,393
560,394
How to load images loading.gif before load iframe in jquery?
<p>I have a Jquery code:</p> <pre><code>&lt;script type='text/javascript'&gt; jQuery(function ($) { $('.basic').click(function (e) { var loading = '&lt;img src="loading.gif"/&gt;'; $('&lt;div&gt;&lt;/div&gt;').load(loading); var src = 'test.php'; var html = '&lt;iframe src="...
jquery
[5]
5,434,585
5,434,586
How do I hide a menu item in the actionbar?
<p>I have an action bar with a menuitem. How can I hide/show that menu item?</p> <p>This is what I'm trying to do:</p> <pre><code>MenuItem item = (MenuItem) findViewById(R.id.addAction); item.setVisible(false); this.invalidateOptionsMenu(); </code></pre>
android
[4]
5,941,842
5,941,843
How to create an sqlconnection in a class with c# to use in all form?
<ol> <li>Create sqlserver connection in class</li> <li>call connection class to use all form.</li> </ol> <p>I want to create SQLServer connection in class with C# to use all forms.</p> <p>Hereabout code of connection in class file </p> <pre><code>public System.Data.SqlClient.SqlConnection Con = new System.Data.SqlCl...
c#
[0]
2,407,896
2,407,897
PHP - Source (hostname) of a GET request
<p>I have a Javascript widget that people can embed on their site. </p> <p>I want to use a simple cross domain get request to pull in a hash. </p> <p>However I need my PHP script to only allow this cross domain request from a series of domains I have stored in an array. </p> <p>What can I do in my PHP script (not in...
php
[2]
1,854,223
1,854,224
Halt closing the div; if hover over it
<p>as shown below, if the user hover over the div then how to halt the fade out div? and if the is not hover the div then fadeout whatever the time is set to.?</p> <p>below is the code i am using....for fadein and fadeout:</p> <pre><code> $("#success").fadeOut('slow'); $("#success").fadeIn('slow'); $("#success").fa...
jquery
[5]
1,468,053
1,468,054
Memory management on the array initialized for UITabBarController
<p>I am still learning the ropes of Objective C and iPhone development. My weak point is memory management - any help will be much appreciated.</p> <p>In the code below, where can I release the <code>NSMutableArray listOfViewControllers</code>? Keep in mind the function <code>createTab</code>s can be called within the...
iphone
[8]
4,463,437
4,463,438
A simple HTML Anchor Link does not show-up as a link when sending a mail from Samsung galaxy S III
<p>I have developed an android application in which I am sending a mail whose body text contains a link for downloading my application from Google play store.</p> <p>This works fine for all other android devices except Samsung Galaxy S III. The issue that I am facing is when I am <strong>sending a mail from Samsung Ga...
android
[4]
1,012,842
1,012,843
Creating anonymous dynamic runtime instances
<p>How can I create implementations of an interface dynamically at runtime in java?</p> <p>I have a factory that will read the annotations on class Foo and create an instance of class Bar. For this factory to be type safe, I'd like my client factories to be interfaces with a factory method that takes type Foo and retu...
java
[1]
1,615,256
1,615,257
Order Unordered Group of Div's by ID or Class with jQuery
<p>Is it possible to order a group of Div's by id or class using jQuery? Here's my code:</p> <pre><code>&lt;div id="product_categories"&gt; &lt;div class="wpsc_categorisation_group" id="categorisation_group_49"&gt; &lt;a href="http://africa.local/store/african-dolls/"&gt;African Dolls&lt;/a&gt; &lt;/div&gt...
jquery
[5]
2,241,263
2,241,264
comparing against undefined
<p>Is it unsafe to compare a variable against undefined?</p> <pre><code>if(foo == undefined) </code></pre> <p>vs</p> <pre><code>if(foo == 'undefined') </code></pre> <p>Is the first example sufficient? Or should it be something like</p> <pre><code>if('undefined' in window){ //compare against undefined } else {...
javascript
[3]
3,979,069
3,979,070
C# replace part of string but only exact matches possible?
<p>I have a <code>string beginString = "apple|fruitsapple|turnip";</code></p> <p>What I want to do is replace just apple with mango, not fruitsapple.</p> <p><code>string fixedString = beginString.Replace("apple","mango");</code> This doesn't work because it replaces both apple and fruitsapple.</p> <p>Any ideas?</p>
c#
[0]
487,788
487,789
Uncaught ReferenceError: jquery is not defined (anonymous function)
<p>I am trying to learn jquery and seem to be struggling to get it to work how i would expect, can someone please help.</p> <p>So far I have gone to Jquery and copied and pasted the source code into a .js file which I have named jquery. I have referenced the file in the body of my practice page.</p> <p>I then added<...
jquery
[5]
2,442,194
2,442,195
Eclipse: Android not adding id class to R.java
<p>I am currently writing a program for an android app and I keep running into a problem where I get an error <code>"id cannot be resolved or is not a field"</code>. For example I have a line of code: </p> <pre><code>mBodyText = (EditText) findViewById(R.id.body); </code></pre> <p>After viewing the <code>R.java</cod...
android
[4]
5,736,267
5,736,268
Virtual functions cannot be friends
<p>I wish to create an interface for a class C which has this function:</p> <pre><code>friend bool operator==(const C&amp; a, const C&amp; b);* </code></pre> <p>I wish to the create a mock for C for test driven purposes.</p> <p>I tried doing it like this:</p> <pre><code>class IC { virtual friend bool operator==...
c++
[6]
768,733
768,734
Why string method on a string object doesn't modify the object in Python?
<p>I found it odd that a string method operation on a string object doesn't modify the string object. Why is it? I wasted quite a bit of time yesterday trying to understand why my code wasn't working when I finally discovered this.</p>
python
[7]
3,673,726
3,673,727
Extending an Applications Browse for Files Dialogue
<p>I need to extend the Browse for File Dialogue box in an application, however the problem is I did not create the original application so I do not have the code that brings up the dialogue. What i'm hoping to do is something similar to Direct Folders or FileBox eXtender (sorry I can't post more then 2 links as I am n...
c#
[0]
2,045,979
2,045,980
How to access the +/- dialog to modify a number (like when setting the time)
<p>If you pop open the clock application and set the alarm you get a nifty pop-up with the time that you can modify using + and - buttons. I'm wondering if there's that's a standard and, if so, if there's an easy way to access it so that it pops up when clicking on an element in a ListView?</p> <p><img src="http://i....
android
[4]
4,607,624
4,607,625
Android: java.lang.NoSuchFieldError: android.os.Build.SERIAL
<p>In android, I have the following error thrown:</p> <pre><code>java.lang.NoSuchFieldError: android.os.Build.SERIAL </code></pre> <p>It happens only on certain devices, for instance: "sec_smdk6410" or "sdkDemo".</p> <p>I have tried to catch the exception but it ignores the try/catch block.</p> <pre><code> try {...
android
[4]
919,879
919,880
Deleting empty (0-lenght) files in a directory
<p>the php script below select and elaborate one by one all .txt files contained in a specific directory. First of all, a file is copied in a subdirectory named "copy", after the script calls read.php so that the file is analyzed and elaborated. Finally the same file can be deleted from the main directory. This is done...
php
[2]
5,164,247
5,164,248
Differences in these Javascript function declarations
<p>Today I saw two different types of Javascript function declarations and I'd like to have a deeper understanding of the two:</p> <pre><code>function Car( model, year, miles ){ this.model = model; this.year = year; this.miles = miles; } /* Note here that we are using Object.prototype.newMethod rather t...
javascript
[3]
4,766,245
4,766,246
Excel Sheet in asp.net?
<p>In web application [asp.net], i am upload the Excel file from admin end. now i want to display that excel sheet in my asp.net at the user end whe he click on button "Show", is it possible to show the uploaded excel sheet in asp.net pages. Tahnk you.</p>
asp.net
[9]