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,529,327
4,529,328
Unhalted error by system call
<p>I am new to C#, and I am trying to call 'cls' command using the following:</p> <pre><code>Process.Start("cls"); </code></pre> <p>When i execute this line the program halts. If I switch 'cls', lets say to 'notepad' the progam works properly. Why is that?</p> <p>Thanks, Sun</p>
c#
[0]
5,362,704
5,362,705
Eight queens in Java in recursion
<p>This is my Java code for eight queens. I don't know why it place same results for eight times. In this code, diagonal is not included.</p> <pre><code>import java.util.*; class eightTeight { Set&lt;Integer&gt; s = new HashSet&lt;Integer&gt;(); public void print() { if (s.size() &lt; 8) { ...
java
[1]
4,388,267
4,388,268
Windows Batch File to run PHP file
<p>I have PHP script that fetches information from a backend server and saves into a database.</p> <p>I am using wamp server and mysql. Now how do I make this run periodically (every 1 hour) without user interaction? I thought of using Windows Batch file. Is there any other way?</p> <p>How do I execute a PHP file in ...
php
[2]
3,749,840
3,749,841
Show/Hide div using jquery - Not working
<p>I am using this function to show/hide a div. </p> <p>But this is not working. </p> <p>It's working only for hide and not working for show. And i need to show and hide the fields in slow style.</p> <p>How can this be done?</p> <p>what was my mistake here...</p> <pre><code>$(document).ready(function(){ $("#fi...
jquery
[5]
417,486
417,487
IE8 not processing Flickr feed
<p>I've got a Flickr Image feed running on here:</p> <p><a href="http://rational-animal.co.uk/lewis" rel="nofollow">http://rational-animal.co.uk/lewis</a> -- but when I have a look at it in IE8, it refuses to load the Flickr feed. Any reason why this would be the case?</p> <p>Thanks! </p>
javascript
[3]
5,464,724
5,464,725
How to restart a guess number game
<p>I am using python 2.7.1</p> <p>I would like to be able to restart the game based on user input, so would get the option of restarting, instead of just exit the game and open again. Can someone help me figure out??Thanks</p> <pre><code>import random the_number = random.randrange(10)+1 tries = 0 valid = False whil...
python
[7]
950,153
950,154
Easy: Addclass removeClass hasClass issue?
<p>I have some buttons in a container div that need to toggle active but only 1 active button at a time. </p> <p>EDIT:</p> <p>html is: div container of .filter(btn, btn, btn, etc) there are 3 containers of buttons. The third container has a button with an id of: #filter1-none</p> <p>The code below works to have on...
jquery
[5]
5,481,538
5,481,539
php increment numerical value variable by even or odd numbers
<p>Im iterating through two lists dumping data into their own single array, but i need to merge the 2 arrays in numerical order into a single array.</p> <p>Im using a counter (<code>foreach and $i++</code>) to name the keys in the proper order, but both operations leave me with arrays named with numbers 0-10.</p> <p>...
php
[2]
5,411,053
5,411,054
Voice Recognizer not present
<p>I try this code</p> <pre><code>PackageManager pm = getPackageManager(); List activities = pm.queryIntentActivities( new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0); if (activities.size() != 0) { speakButton.setOnClickListener(this); } else { speakButton.setEnabled(false); speakButton.setText("Recog...
android
[4]
1,238,721
1,238,722
Selecting Edit on row returns wrong row after sorting
<p>I am currently setting my GridView AllowSorting = true. The sorting works fine, but when I click on the edit button for a specific row after sorting, the wrong row gets returned. It edits the row that was previously in the position of the current row before sorting.</p> <p>Here is my code in the Sorting event.</p...
asp.net
[9]
3,161,731
3,161,732
When is a Custom Content Provider called for?
<p>I have seen custom content providers for sqLite in apps, but thats about it. When should a Custom Content provider be built?</p>
android
[4]
4,862,636
4,862,637
select div with class unless it has ancestor of another class
<p>Asked this question ten minutes ago, but realized that I used the term parent instead of ancestor. I'm looking for something that refers to a class that has a particular ancestor.</p> <p>How can I select all inputs that do not have an parent of a particular class?</p> <p>Here I just want to get the inputs that do ...
jquery
[5]
2,315,713
2,315,714
Using arrays in a class
<p>Why can I do:</p> <pre><code>public class ThisTest { int[] anArray = new int[10]; public int[] getArr(){ anArray[0] = 100; anArray[1] = 200; return anArray; } } </code></pre> <p>But not:</p> <pre><code>public class ThisTest { int[] anArray...
java
[1]
4,060,815
4,060,816
how can i retrieve text from textview
<p>I have a text view with 3 lines of data.</p> <p>eg: abcde efghi jklmn</p> <p>Now i need to retrieve the middle line text(efghi).</p> <p>These 3 lines are unwrap text.</p> <p>How can i can any one please help me.</p> <p>Thank u in advance.</p>
iphone
[8]
1,613,419
1,613,420
jquery: if children with specific class?
<p>i wonder how i can determine if a ul has MORE than 2 children and if there are two children with two specific classes inside this ul …</p> <pre><code>if($(this).children().length &gt; 2 &amp;&amp; $(this).children('.section-title, .active')) { $(this).append('&lt;li class="dots"&gt;&amp;hellip;&lt;/li&gt;'); } ...
jquery
[5]
3,874,055
3,874,056
Separate test cases across multiple files in google test
<p>I'm new in google test C++ framework. It's quite easy to use but I'm wondering how to separate the cases into multiple test files. What is the best way?</p> <p>Include the .cpp files directly is an option. Using a header seems that does nothing...</p> <p>Any help is welcome</p>
c++
[6]
4,227,353
4,227,354
Programmatically switch to developer mode in Android
<p>I want to create a tool that allows to switch to developer mode on Android devices with an Android version less than 4.2. I want to create an apk to activate and deactivate the developer mode. Is this possible? How?</p>
android
[4]
2,391,372
2,391,373
Tax form on iPhone Developer, non-us live in Us
<p>I am a International student studying in US. and I am not a US citizen. iTunes Connect assume me as a US citizen just because my address is in US. The only form I can chose is W9 form, which is only suitable for US citizen.</p> <p>Does anyone know how to solve it? I know W8-Ben form is the right form for me, but I...
iphone
[8]
3,702,495
3,702,496
Java Web Start Not Launching Problem
<p>I've just install New OS windows 7 64bit, After installed java. </p> <p>I couldn't launch any Java Web Start application from my browser (by downloading and launching a *.jnlp file). When I try to launch an app, the loading cursor spinning for 10-20 seconds then nothing happen. I am getting frustrated with this iss...
java
[1]
5,356,389
5,356,390
grep prefix python strings
<p>I'm having problems using findall in python. </p> <p>I have a text such as:</p> <p><code>the name of 33e4853h45y45 is one of the 33e445a64b65 and we want all the 33e5c44598e46 to be matched</code></p> <p>So i'm trying to find all occurrences of of those alphanumeric strings in the text. the thing is I know they a...
python
[7]
2,441,695
2,441,696
Return to my separated activity by launcher
<p>Apologize for my poor english first.</p> <p>I have an activity separated from my process which taskAffinity was set to ="", let us call it X, and the main activity is A.</p> <p>The question is, when I operate like this:</p> <p>1.A -> HOME -> (something triggered) -> show X</p> <p>If I finish X, it will return to...
android
[4]
3,503,455
3,503,456
Alphabetic scrolling like in Contact App
<p>Does anyone know where I can find the source on how to implement the alphabetic scroll bar exactly like the one in the ICS contacts app.</p> <p>I would like the same look and feel, i.e. the triangular shaped window. I have seen lots of similar examples but none of them look like Google's implementation.</p> <p>Tha...
android
[4]
1,900,128
1,900,129
Shared information between some Android activities
<p>I am new in Android and I'm developing my first app. Right now I have been able to implement some activities that work on their own and share information through intents, bundles, etc.</p> <p>The problem is that a have a list that I manipulate in several activities and I don't want to pass it each time I change my ...
android
[4]
2,964,634
2,964,635
How to upload pdf file in asp.net
<p>When I upload pdf file using my asp.net web app, I get that is Error 101 (net::ERR_CONNECTION_RESET): Unknown error.</p>
asp.net
[9]
2,818,464
2,818,465
Python store client address?
<p>Below is my simple server code.</p> <p>I want to store/print the addresses of any client's sending data.</p> <p>For example the output should be:</p> <pre><code>Connection from ('127.0.0.1', 61334) foo from ('127.0.0.1', 61334) Connection from ('127.0.0.1', 61335) bar from ('127.0.0.1', 61335) baz from ('127....
python
[7]
3,912,931
3,912,932
How create class errors?
<p>I create service and I need create class MyErrors (not exception)</p> <p>My web method returned or data or error, example response "<code>#45#Not valid login or password.</code>"</p> <p><code>#</code> - is a flag that says an error has occurred <code>45</code> - code error.</p> <p>example use error class:</p> <p...
java
[1]
3,731,372
3,731,373
Connect GPS device to android app through bluetooth
<p>Im creating an application to read data from a bluetooth GPS receiver through bluetooth just Like GPSInfo android app. Im able to list the paired devices but while connecting to the device the application crashes.Can any one help with some code please.</p> <p>Thank you.</p>
android
[4]
3,918,589
3,918,590
how to use local variable in other functions
<p>This is my code:</p> <pre><code>var shuffle = function(x) { var deck = []; deck.push(x); return deck; }; var Placemat = function() { var card1 = deck.shift(); var card2 = deck.shift(); } </code></pre> <p>By returning deck in <code>shuffle()</code> like this, can I use it in <code>Placemat()</...
javascript
[3]
3,112,404
3,112,405
Sending Message From Android Emulator
<p>I am developing an android messaging application. I want to send sms to url from android emulator. Is it possible? Can anyone help me?</p> <p>Thanks in advance, Tushar</p>
android
[4]
4,362,140
4,362,141
AccountManager adds account but does not show up under Accounts in Settings
<p>I have created a custom account type by following the SimpleSyncAdapter example provided by android. I am able to add accounts with the Account Manager, and on some phones (tested on Galaxy S3, Galaxy Nexus, HTC Desire HD), I do see my account under Accounts and Sync in Settings. To add an account, I am doing the fo...
android
[4]
3,513,194
3,513,195
would it ever make sense to modify a reference to a const char* passed in as a parameter to a method?
<p>Say I have something along the lines of:</p> <pre><code>int main() { const char* someString = "Hello"; MyClass myClass; myClass.modifySomeString(someString); return 0; } </code></pre> <p>And two possible method signatures for <code>modifySomeString</code>:</p> <p><strong>case A</strong> <code>vo...
c++
[6]
90,922
90,923
jquery how can i collect matching elements?
<p>if any one give me a suggession to collect matching elements using each?</p> <p>this is i tried:</p> <pre><code>&lt;ul&gt; &lt;li class='options'&gt;&lt;/li&gt; &lt;li&gt;&lt;/li&gt; &lt;li class='options'&gt;&lt;/li&gt; &lt;li&gt;&lt;/li&gt; &lt;li class='options'&gt;&lt;/li&gt; &lt;li class='options'&gt;&lt;/li&...
jquery
[5]
2,413,364
2,413,365
C# Windows Services Alternative
<p>Could anyone please tell me whether there is any alternative to Windows Services? The reason for my question is that I find windows services hard to test as it requires it be installed first.</p> <p>Thank you.</p>
c#
[0]
484,497
484,498
PHP If statements not working
<p>This is my code: </p> <pre><code> if ($username == "" || $pass == "" || $emailad==""|| $fname=="") { $msg = "Not all fields were entered"; }else { if(uniqueUser($username,$emailad)) { $msg="The username or email already exists"; }else { insertIntoDB($fname,$emailad,$u...
php
[2]
5,131,805
5,131,806
Adding + and - sign while show/hide div
<p>I use the following jQuery to show/hide a div. I need to add a '+' and '-' symbol to it. Someone please tell me how to add it</p> <pre><code>function toggleWidgets() { $('#secondary h3.widget-title').addClass('plus'); $('#secondary h3.widget-title').click(function() { $(this).toggleClass('plus')....
jquery
[5]
2,696,170
2,696,171
How to pass argument in function?
<p>i have function like this.</p> <pre><code>function load($name, $arg1, $arg2, $arg3, $arg4){ $this-&gt;$name = new $name($arg1, $arg2, $arg3, $arg4); } </code></pre> <p>the <code>load()</code> method will load some class and set it as class <code>property</code> and the infinite arguments, depend in the class t...
php
[2]
1,799,826
1,799,827
Impersonation using absolute path
<p>I am trying to access a file using impersonation. Everything works fine when the file folder is shared. However when the folder is not shared and try to access the file using absolute path, it does not work. </p> <p>It works: \\folder\test.txt</p> <p>It does not work: \\nt9999\d$\folder\test.txt</p> <p>Thanks f...
c#
[0]
796,299
796,300
Read SHOUTcast's 7.html with Java
<p>Alright, I'm at my wit's end. I've been trying for ~hours~ to read the following url in to a Java string and I can't for the life of me do it. I've tried about a bajillion different methods (that all work for other web pages!) I've found online and I'm about to lose my mind! Please help me get the contents of this w...
java
[1]
5,560,437
5,560,438
how to start android application from my application but the application should not be visible to others
<p>supposing that i have created an application "MyApp" and it contains a button.When this button is clicked it should start another application say"App".this application "App" should not be available in any other part of the phone. please help me with this. thank...
android
[4]
5,701,326
5,701,327
jQuery function on $('p')[0]
<p>I tried the script</p> <pre><code>$('p')[0].innerHTML = 'hi'; </code></pre> <p>and it worked<br> but for slideUp/Down it does not works :(</p>
jquery
[5]
5,389,962
5,389,963
Need help using UIImagePNGRepresentation
<p>I'm trying to save a UIImageView image to a png file, and then use that file as a GLTexture. I'm having trouble with this, when I try to run my code in the simulator, XCode says it succeeded, but the simulator crashes with no error messages. Can someone help me with this? Here is my code:</p> <pre><code>NSString *...
iphone
[8]
878,426
878,427
c# game have multiple icons resolution?
<p>How can I make my games developed in c# having multiple icons? (same picture with different resolutions), so, after installing it, and going to start-->games, and change your view, the resolution will be adapted to the right size. Thx in advanced</p>
c#
[0]
1,960,962
1,960,963
How can i set different action commands while implementing an action listener?
<pre><code>import javax.swing.*; import java.awt.*; import java.awt.event.*; class Menu extends JFrame implements ActionListener{ // Create the components and global variables JButton newGameButton = new JButton("New Game"); JButton instructionGameButton = new JButton("Instructions"); JButton exit...
java
[1]
2,705,873
2,705,874
jQuery: Input value lost on keyup?
<p>I have a simple form which I would like to submit (i.e fire ajax) when the user presses enter (return) on an input field. If I press the submit button the event fires fine, but when using keyup to fire the exact same function the value of the input field is blank. I tried passing the value of the input field (from t...
jquery
[5]
4,961,392
4,961,393
good C# interview questions book
<p>Please suggest me a good C# interview questions book</p>
c#
[0]
4,316,289
4,316,290
take path of script as an argument python
<p>I have this python script which sits in </p> <pre class="lang-none prettyprint-override"><code>/some/folder/foo.py </code></pre> <p>So if I am in <code>/some/folder</code> and do </p> <pre><code>python foo.py </code></pre> <p>the script runs great. Now I want to take this path <code>/some/folder</code> as an arg...
python
[7]
1,712,384
1,712,385
ADB needs reset always
<p>Whenever I run my emulator for the first time, it shows up but doesnt start my app and I find no device in DDMS view UNTIL I reset the ADB. It happens always FOR THE FIRST TIME. But after I reset the ADB it works from then on.</p>
android
[4]
1,516,632
1,516,633
What is a more efficient way in Python to return list elements which are not in a second list?
<p>Is there a faster way to do this in python?</p> <pre><code>[f for f in list_1 if not f in list_2] </code></pre> <p>list_1 and list_2 both consist of about 120.000 strings. It takes about 4 minutes to generate the new list.</p>
python
[7]
1,294,326
1,294,327
how to concisely create a temporary file that is a copy of another file in python
<p>I know that it is possible to create a temporary file, and write the data of the file I wish to copy to it. I was just wondering if there was a function like:</p> <pre><code>create_temporary_copy(file_path) </code></pre>
python
[7]
930,340
930,341
How can I cache a dynamic page to a flat file in PHP?
<p>I am trying to roll a caching system to reduce the load on the database.</p> <p>I want to be able to compare timestamps of the last updated time the flat file was updated to make sure it's not too long ago that the file was last updated.</p> <p>Here's the code: <pre><code>$cache_file = $_GET[ 'page_id' ] . ...
php
[2]
1,289,269
1,289,270
Python - Extract multiple lists from a list of lists by index
<p>Is there an efficient way to loop through a list of lists and extract the 1st element of each list into another list, 2nd elements into another one, etc. Such as:</p> <pre><code>x = [[1, 2, 3], [4, 5, 6] , [7, 8, 9]] y1 = [i[0] for i in x] y2 = [i[1] for i in x] </code></pre> <p>Is there a way to extract y1 and y2...
python
[7]
1,906,301
1,906,302
Unable to GET data from ajax (get)
<p>I have a little problem with my code ...</p> <p>I have a page named "listeclients.php" which have several clients with id's etc. I just made a little button in order to send some data to a page named "actionclient.php", which just has to display the parameters I send to it. The actionclient.php consists in this :</...
jquery
[5]
67,008
67,009
Place view to right of other view and vertically centered relatively to this view using RelativeLayout
<p>I was wondering if there is a way for placing a view to the right side of another view and centering it vertically on the second views height. In know this can be done using a LinearLayout, but for other reasons the 2 views must be part of the same RelativeLayout. </p> <p>Thanks a lot</p>
android
[4]
3,007,938
3,007,939
Jquery drag drop bug in IE9
<p>I’m working on a JQuery "Nettuts drag and drop" from <a href="http://nettuts.s3.amazonaws.com/127_iNETTUTS/demo/index.html" rel="nofollow">iNETTUTS demo</a>.</p> <p>Which I have downloaded from <a href="http://www.1stwebdesigner.com/freebies/drag-drop-jquery-plugins/" rel="nofollow">webdesigner.com</a>.</p> <p>The...
jquery
[5]
54,195
54,196
Is there any alternative of window.showModalDialog & window.open
<p>I want to use popup window in my Project with customize flavor like address bar don't display return value, customize close button finally it will be look like :</p> <p><img src="http://i.stack.imgur.com/eepNH.jpg" alt="enter image description here"></p>
javascript
[3]
222,927
222,928
How to launch two java program in the same time through another one?
<p>i'm a beginner and i try to code very simple java programs and here i have two java programs.</p> <p>the first program for selecting recent files from a folder.</p> <p>the second program for concatenating these recents files.</p> <p>what i want is to create a third java program that -will launch the first prog...
java
[1]
2,885,285
2,885,286
How to develop an iPhone application
<p>I want to develop an ebook application for iPhone. I'm new to iPhone developement, so don't have much idea about how to proceed. What I know is, I need the following:-</p> <ul> <li>iPhone SDK</li> <li>Intel Mac running mac OS X</li> <li>Xcode (?)</li> </ul> <p>Please indicate is that correct and how I can proceed ...
iphone
[8]
3,097,673
3,097,674
Calling webservice from javascript on android
<p>How to call a webservice from javascript on android? </p> <p>My html file is in <code>assest/www</code> folder.</p>
android
[4]
4,918,645
4,918,646
Adding a library/JAR to an Eclipse Android project
<p>This is a two-part question about adding a third-party library (JAR) to an Android project in Eclipse.</p> <p>The first part of the question is, when I try to add a third-party JAR (library) to my Android project I first get the problem of</p> <blockquote> <p>Error parsing XML: unbound prefix</p> </blockquote> ...
android
[4]
2,868,489
2,868,490
how do I load a file into the python console?
<p>I have some lines of python code that I'm continuously copying/pasting into the python console. Is there a 'load' command or something I can run? e.g. "load file.py"</p>
python
[7]
4,399,420
4,399,421
Store information about a directory
<p>Other than the foldername, is there a way to get/set information about a directory to the actual folder itself? </p> <p>I want to set a directory priority so folders are displayed in a certain order by assigning a number to each. </p>
php
[2]
3,958,394
3,958,395
How to search & replace in Python?
<p>How can I add a character "-" to a string such as 'ABC-D1234', so it becomes 'ABC-D-1234'? Also, how can I add a character after the first 2 number, ie from 'ABC-D1234' to 'ABC-D12-34' Many thanks.</p>
python
[7]
1,939,307
1,939,308
How to get attribute from a <link tag in pure javascript?
<pre><code>&lt;link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.blogger.com/rsd.g?blogID=7487871339000666216" /&gt; </code></pre> <p>How can I get the href attribute of this link tag without using any javascript library?</p> <p>Right now I'm using the code below to achieve this but I want to...
javascript
[3]
448,959
448,960
Now I have duplicate emails lists name
<p>I have a TXT file with a list of emails Now I have duplicate emails lists name Example:</p> <pre><code>sami@woo.com sds@woo.com sami@woo.com asfi@woo.com sami@woo.com </code></pre> <p>I want to show me only once every mail</p> <p>And the result:</p> <pre><code>sami@woo.com sds@woo.com asfi@woo.com </code></pre> ...
php
[2]
746,434
746,435
Why does Java not permit the use of headers as in C++
<p>I have a question that I did not find an answer for except the following answer that does not meet my requirements:</p> <blockquote> <p>"Because James Gosling didn't want to"</p> </blockquote> <p>I know that Java can have interfaces (only pure virtual functions, no attributes), but it is not the exact same thing...
java
[1]
3,911,958
3,911,959
implementing an SDK on android
<p>I have some kind of voice related algorithm and I want android apps to be able to use it. I want multiple apps to be able to use it at the same time (it doesn't have to support multiple clients calling at once, but it does have to support multiple clients loading the library). What is the best way to implement it? I...
android
[4]
500,005
500,006
Sending SMS using free gateway
<p>I just wanted to develop one web application which allows users to send an SMS to any mobile free of charge . I searched on the net and found many codes and articles and through those articles i came to know that for that kind of application, i required either of the following things:</p> <ol> <li>Web service (Thir...
c#
[0]
3,980,787
3,980,788
need to extend two classes somehow
<p>I am creating an app which has a dashboard layout as its home screen and each icon opens a seperate activity.</p> <p>I have an abstract class called DashboardActivity which has methoda such as what to do when the home button in the title bar is pressed etc. </p> <p>I then have various classes such as 'hotels' whic...
android
[4]
5,606,519
5,606,520
Copy data from an SD card to a raw file
<p>How might I copy data from an SD card to a raw file?</p>
android
[4]
4,632,167
4,632,168
No resource found that matches given name in main.xml
<p>This is really starting to drive me crazy.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@id+/textview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/hello"/&gt; ...
android
[4]
184,683
184,684
Is it possible to use an ArrayAdapter (no subclassing) with a custom View to display data?
<p>Often, a simple of ArrayAdapter does what I want and during early development I will provide the android.R.simple_list_item_1 for the view id required by the ArrayAdapter constructor. Is it possible to provide a customized view which is based on the android.R.simple_list_item_1 to the ArrayAdapter constructor?</p> ...
android
[4]
4,490,100
4,490,101
Positing user current location
<p>first i would love to thank you for help me,i am develop the android application that contain 3 activities one of them is map.i am using google maps</p> <p>what i want : 1- when the user open the activity (map) it shows the user her location not the coordinate 2- the user also can be able to positing(pining) any pl...
android
[4]
3,431,431
3,431,432
C++ exceptions catch clause
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1654150/scope-of-exception-object-in-c">Scope of exception object in C++</a> </p> </blockquote> <p>I have the following catch clauses:</p> <pre><code>catch(Widget w); catch(Widget&amp; w); void passAndThrowWid...
c++
[6]
1,983,869
1,983,870
Autorelease and release function
<p>what's the difference beetween Autorelease and release function. ??can u give me example of autorelease function.</p>
iphone
[8]
60,181
60,182
Integrate auriotouch
<p>I need to integrate <code>aurioTouch</code> in another app. I have put all of his classes in my app, I have also changed is <code>didFinishLaunching</code> function to a normal void function, and removed <code>UIApplicationDelegate</code> tag from the header file. In my app, I put this code:</p> <pre><code>aurioTou...
iphone
[8]
2,408,447
2,408,448
setup two php versions in a one machine
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://serverfault.com/questions/103798/linux-one-apache-two-php-versions-possible">linux: one apache two php versions. possible?!</a> </p> </blockquote> <p>I was asked in an interview.</p> <p>How can we set up two different php version ex:php v...
php
[2]
1,125,688
1,125,689
jQuery load doesn't work as I expected
<pre><code>$(".content") .load("content/intro.html #bt") .hide() .fadeIn(2000) .delay(2000) .fadeOut(2000) .load("content/intro.html #ofm") .fadeIn(2000) .fadeOut(2000) .load("content/main.html") .fadeIn(800); </code></pre> <p>I would expe...
jquery
[5]
1,393,110
1,393,111
Error in PHP file uploader
<p>Now, i am getting another problem.... i am trying to upload file with this code :-</p> <pre><code>&lt;form action="up.php" method="post"&gt; &lt;input type="hidden" name="MAX_FILE_SIZE" value="200000" /&gt; Choose a file to upload: &lt;input name="uploadedfile" type="file" /&...
php
[2]
5,544,840
5,544,841
How to handle back navigation on notification - android
<p>I have a notification list on my application.when i click one notification item it will move to some page.when i click back button on emulator.,my application will be crashed.How to recover this probs.</p>
android
[4]
1,129,596
1,129,597
Regular Expression: Not all matches are printed when using System.out.println(m.matches());
<p>I execute the following code:</p> <pre><code>public static void test() { Pattern p = Pattern.compile("BIP[0-9]{4}E"); Matcher m = p.matcher("BIP1111EgjgjgjhgjhgjgjgjgjhgjBIP1234EfghfhfghfghfghBIP5555E"); System.out.println(m.matches()); while(m.find()) { System.out.println(m.group()); } </code></pre> <p>}<...
java
[1]
2,396,031
2,396,032
Make a read only property writable in the derived class
<p>What I want to achieve is the following : I have a property declared in the BaseClass. If this property is accessed via the base class' pointer, only the getter should be available but if the derived class pointer is used I want to be able to get and set the property. So the intellisense should not even show a sette...
c#
[0]
3,538,759
3,538,760
How to add data/functions to all instances of a javascript object created by a constructor?
<p>How can I add data/functions to all instances of a javascript object created by a constructor so that all instances have the same reference and not a copy of it?</p> <p>Basically implementing the equivalent of a static method in C#.</p> <p>For example, given the following code which creates a Widget class.</p> <p...
javascript
[3]
5,175,105
5,175,106
multiple json objects in jquery $.post
<p>I wanted to know if it was possible to send multiple json objects to a php file in jquery, kind of like this:</p> <pre><code>$.post('convert.php', [{name: 'John', font: 'arial', size: '12'},{name: 'Smith', font: 'verdana', size: '14'}]); </code></pre>
jquery
[5]
4,545,243
4,545,244
How to stop the notification Audio?
<p>Iam doing one application in that i used the notification and assign the sound name.And my requirment is when the notification occur i touch the screen and stop the notification sound.SO for this how to develope the code.please guide me .</p>
iphone
[8]
1,780,985
1,780,986
java.io.IOException: error=2, No such file or directory
<p>I am trying to run a java program from another java program using Runtime.getrunTime().exec</p> <p>Code :</p> <pre><code>String java_home = System.getenv("JAVA_HOME"); String[] command = {""+java_home+"/bin/java -cp -cp /sc/sug/p-lib/* Tdesigner -cd /pr -in ing.rsp -out /scratch/sug/ng.pla -ad -stopO "}; ...
java
[1]
3,126,829
3,126,830
How do String objects work (like immutable objects)?
<p>I have these two situations:</p> <pre><code>String s = "aa"; s = s + " aa"; System.out.println(s); //...... </code></pre> <p>that work fine! It prints <b>aa aa</b>. But there is a problem:</p> <pre><code>String s = "aa"; this.addStringToStatement(s, " aa"); System.out.println(s); //... private void addStr...
java
[1]
5,892,429
5,892,430
Calendar Month and Displaying 4th Day in Red in PHP (Loop, Date, HTML Display Font Red)
<p>I'm trying to do a simple loop of the days in the month of that year. So I'm using a for loop in PHP. I assigned a date April 2013, $date = mktime(0, 0, 0, 4, 1, 2013). I also determined the numbers of days in that month, $days = date("t", $date). And then I did the loop using for loop so that for ($i = 1; $i &lt;= ...
php
[2]
3,258,831
3,258,832
How to preserve the last appliaction state in android when returning back from the Web Browser in android
<p>I am stuck with severe issue, I have an develop application in which iam redirect to the MAP browser showing the Route between Two cities , now when i press the back button on the Device my previous data are lost and i get unusual result.</p> <p>How to solve the application preserving previous state</p>
android
[4]
294,826
294,827
Scaling android app to different screen sizes
<p>So I'm working on scaling my application to different screen sizes. Right now Its optimized for a 10.1 inch screen but I'm working to get it to run on the kindle fire which has a 7 inch screen. I'm only using relative layouts. As of now my background scales perfectly but the image buttons ontop of the background don...
android
[4]
5,151,614
5,151,615
Record audio in Android
<p>How to put on pause? I have not found such a function. There are other ways?</p>
android
[4]
820,196
820,197
overwrite java class in jar
<p>I have class called org.jbpm.task.Comment in my jbpm.jar.</p> <p>However, this it's a CR1 version and there is a bug in the class that I would like my application to overwrite.</p> <p>Is it fine just to have a class in my project under com.jbpm.task called Comment and everywhere even in other jars it will refer to...
java
[1]
1,249,813
1,249,814
Java test specific property of an object using Collection.contains()
<p>In Java how to test if a Collection of objects contains an object depending on one of its properties.</p> <p>For example I would like to test if <code>Collection&lt;myObjects&gt;</code> contains an instance of myObjects which has myObjects.name = "myName".</p>
java
[1]
2,691,682
2,691,683
How to execute commands using java
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4916918/java-execute-a-command-with-a-space-in-the-pathname">Java execute a command with a space in the pathname</a> </p> </blockquote> <p>I am having following command </p> <p><code>i_view32.exe C:\*.bmp /impo...
java
[1]
3,944,631
3,944,632
How to read passive RFID cards using Android?
<p>I am working on Android application (Droid Incredible).</p> <p>I am planning to read passive RFID tags using Android phone but I found that there is no slot for Android to connect to RFID reader.</p> <p>After some research, I found out that I will have to get RFID reader which can send RF data over bluetooth to An...
android
[4]
5,091,690
5,091,691
'class X' has no member 'Y'
<p>This error is inexplicably occurring. Here is the code and output:</p> <p>timer.cpp: </p> <pre><code>#include "timer.h" #include "SDL.h" #include "SDL_timer.h" void cTimer::recordCurrentTime() { this->previous_t = this->current_t; this->current_t = SDL_GetTicks(); }</code></pre> <p>timer.h: </p> <pre>...
c++
[6]
3,046,742
3,046,743
Fastest way to read numerical values from text file in C++ (double in this case)
<p>Currently, my code is simply this:</p> <pre><code>void ReadFile(double Cst[][1000], char* FileName, int height) FILE* ifp; double value; int nRead = 0; int mRead = 0; //open the file, check if successful ifp = fopen( FileName, "r" ); if (ifp==NULL){ ... } for (nRead = 0; nRead &lt; height; nRead++){ for...
c++
[6]
5,917,428
5,917,429
How can I make stop watch in Android?
<p>I am need stop watch like widget in android.Currently I am using Android chronometer,it is not fulfilling my requirements as when I am stopping the chronometer its stops in UI but but it continues to tick in background.</p>
android
[4]
5,282,016
5,282,017
How to load image in textview?
<p>I want to display image in textview,is it possible?anybody knows,please give sample code for me.. Thanks All</p>
android
[4]
1,246,687
1,246,688
Using an intent to start new activity from ListActivity
<p>my ListActivity has a button on the bottom that I want to use to fire up a new activity using an intent. When I tried saying <code>Intent intent = new Intent(this, OtherActivity.class)</code> I'm getting an error that the constructor is undefined. FWIW, the other activity extends MapActivity. Not sure if that matter...
android
[4]
795,471
795,472
Quick Debug about reading words
<p>I have this code and I receive an error when I run the program. Am I doing something wrong with this?</p> <pre><code>import java.io.*; import java.util.*; public class countLines { public static void main(String[] args) throws Exception { int count = 0; int word = 0; File f = new File("...
java
[1]