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,425,510
4,425,511
findViewByID(R.layout.skeleton_activity) returns null
<p>I am trying to register a context menu in a skeleton app's OnCreate():</p> <pre><code>/** Called with the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Inflate our UI from its XML layout description. setContentView(R.lay...
android
[4]
1,329,548
1,329,549
why is this the output of the following loop?
<p>why am I getting the following output: 4 8 12 16 20</p> <pre><code>int i, j = 1, k; for (i = 0; i &lt; 5; i++) { k = j++ + ++j; Console.Write(k + " "); } </code></pre>
c#
[0]
3,904,988
3,904,989
How do I get the nth item in a queue in java?
<p>I have a number of queues and priority queues in my application. I would like to easily access the nth items in these queues, but don't see an easy way to do that using the API. I guess I could create an iterator and iterate to the nth or use toArray()[index]--but it seems like there should be an easier way. </p> <...
java
[1]
4,471,638
4,471,639
I want to catch only update,insert and delete operation of Contacts when onChange is called. How can i do it ...?
<p>I have following code.</p> <pre><code>public class TestContentObserver extends Activity { int contactCount = 0; final String[] projection = new String[] { RawContacts.CONTACT_ID, RawContacts.DELETED }; Cursor curval; @Override public void onCreate(Bundle savedInstanceState) { super.onCre...
android
[4]
1,085,672
1,085,673
Exporting to excel probelm in exporting number feiled
<p>Hi i have one grid which contain phone numbers..and whike am exporting to it phone number field is automatically taken as numeric filed and phone number is displaed as exponential .. do any one know to solve it?? thanks in advance</p>
c#
[0]
1,423,101
1,423,102
How to decode eval( gzinflate( base64_decode(
<p>I have this code injected in my site. How can I decode the trailing string? I need to know what happened and what is the code behind it.</p>
php
[2]
3,825,355
3,825,356
How do I append different courses in to each classrooms?
<p>I want to append different courses into two different classrooms, however it keeps adding the same courses to both of the classrooms. This is my AddCourse function </p> <h1>Edited</h1> <p>I modified my code according to your suggestions.</p> <pre><code>class Classroom: """I omitted part of the class for br...
python
[7]
3,280,640
3,280,641
How to refresh a page in jquery?
<p>I need to refresh the page using jquery? I am using <pre>location.reload(true);</pre>This code reloads the page i need to refresh the page(Once a page refresh user entered content would be there). how to refresh?</p>
jquery
[5]
2,417,206
2,417,207
What is the maximum number of touch events per second I can receive?
<p>When I drag a finger across the screen, there seems to be a limit to how quickly touchesMoved gets called. It seems that the limit is around 50/second. What controls this limit, and is it possible to change this? </p> <p>I'm guessing this is controlled at a very low level and I'm stuck with it, but perhaps not. I'd...
iphone
[8]
664,895
664,896
php sorted array and readfile not reading in order
<p>I am trying to write a php function to save and then display comments on an article.</p> <p>In my save.php, I am formulating the file with: <code>$file = "article1/comments/file".time().".txt";</code></p> <p>Then using fwrite() to write to a directory. </p> <p>In my index I have:</p> <pre> if ($handle = opendir...
php
[2]
1,464,632
1,464,633
my csv file only gets one row
<p>I'm outputting a temporary table to a csv file, but it only gets one row ?</p> <p>here is the code</p> <pre><code>$fileName = fopen('cmv_sailings.csv', 'w'); while ($i = mysql_fetch_assoc($export)) { $ship = $i['code']; $title = $i['title']; $sailDate = $i['sailDate']; $fromPort = $i['fromport']; ...
php
[2]
1,332,073
1,332,074
If I use a shared hosting, can I really set all value on my php.ini file in the runtime?
<p>Something like:</p> <pre><code>ini_set("display_errors", 1);</code></pre>
php
[2]
5,229,874
5,229,875
IP-addresses stored as int results in overflow?
<p>I'm writing a chat-server in node.js, and I want to store connected users IP-addresses in a mysql database as (unsigned) integers. I have written a javascript method to convert an ip-address as string to an integer. I get some strange results however.</p> <p>Here is my code:</p> <pre><code>function ipToInt(ip) { ...
javascript
[3]
138,221
138,222
What do you consider to be the current benchmark for ASP.Net skills?
<p>I have a friend who works at a job that has no planned upgrade plan on getting off of VS2005 and Sql Server 2000. He's concerned that his skills may fall behind even though he attends user group meetings and tries to cover various topics on his personal time. After talking with him, it got me interested in what pe...
asp.net
[9]
5,493,109
5,493,110
DSR is on. Don't send DTR on Android
<p>In the logcat I'm seeing this a lot </p> <blockquote> <p>"DSR is on. Don't send DTR on Android". </p> </blockquote> <p>I have tethered my phone wirelessly to my mac because my internet is down. I have it in dev mode also. So what does that mean? I have seen something about bluetooth but it's off though.</p> <p>...
android
[4]
161,264
161,265
iPhone development time
<p>I have been asked to develop a relatively simple iPhone application. However, it would be my first application. </p> <p>I am a fairly competent programmer and can turn my skills to a new language fairly quickly... what my question is, is...</p> <p>How long has it taken some of you guys to make your first iPhone ap...
iphone
[8]
819,721
819,722
create HWND in c#
<p>am import some dll for create the live video. here myprob is i have c++ code like </p> <p>int PLAYER_SDK_SPEC CreatePlayer( HWND hWndParent, RECT&amp; rectPlayer, const char* szWndTitle );</p> <p>in c# i have import dll like </p> <p>[DllImport("PlayerLib")] public static extern int CreatePlayer(IntPtr Handle,...
c#
[0]
4,679,032
4,679,033
Undefined Index when using post
<p>I'm getting undefined index errors on the $_POST variables. I.E. $_POST['hostname']. I know kinda why I'm getting them, but is there a way to keep the php and form in the same file and not get these errors? </p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Install Forum&lt;/title&gt; &lt;/head&gt; &lt;b...
php
[2]
2,044,135
2,044,136
Jquery SlideToggle wont work
<p>What could possibly be wrong with my code? The main idea is grab the return data and display it by making a div slide. </p> <pre><code>$(document).ready(function(){ $(".toggle-content").hide(); var question_id = ''; var reply = ''; $("div.mainIfeed").click(function() { question_i...
jquery
[5]
4,420,542
4,420,543
IE window.resize how to stop resizing it?
<p>I recently write a window.resize in javascript for resizing the browser window for certain conditions.e.g. start with vertical resolution 900 keep resizing the browser window until height become 400 then stop resizing. But browser window keep resizing as I clear the handler for it. Is there any way to just stop brow...
javascript
[3]
1,934,238
1,934,239
Setting value of hidden element in php
<p>I have a hidden field in form. On form submit I call a database function to add the inputs to database and return result of query. I wish to set the value returned to hidden field. But when I am not able to assign a value to it</p> <pre><code>&lt;form name="frmAddBook" id="frmAddBook" method="post"&gt; &lt;input ty...
php
[2]
877,191
877,192
call to super first line
<p>I am a newbee so advise and help is always greatly appreciated.</p> <p>Cannot seem to get my container contentPane to display the title.</p> <p>My code:</p> <pre><code>class CreateStockCodeDetails extends JFrame implements ActionListener { OptraderSA parent; OptraderGlobalParameters GV = new Optra...
java
[1]
790,285
790,286
How to get Purchased state of a managed productid in android in appbilling?
<p>I am using market billing Dungeons example for inapp billing.Its working fine.But my problem is i purchased a product with reserved productid "android.test.purchased" and it displays in my product list,but if i uninstall my app and re-install iam not getting the product.How to get purchased items even if i uninstall...
android
[4]
5,312,903
5,312,904
Header files slow down the program
<p>My program have encountered a strange error: the header files slows the program down. I test the header file with empty code ( that is : <code>main() {}</code> ) and it takes 40s to run that empty code.</p> <p>Header files .h </p> <pre><code>#include "stdafx.h" #include &lt;string&gt; #ifndef LZ_H #define LZ_H ...
c++
[6]
3,560,673
3,560,674
Jquery treating objects with zero width and height as invisible
<p>When an html element has the height and width set to zero, jQuery does not find the object when using a selector and specifying visible although the object is visible.</p> <p>for example</p> <p>$("#test").children(":visible")</p> <p>the above will ignore children of #test where the width and height is zero. Is th...
jquery
[5]
2,831,522
2,831,523
Android:Simulator instance newly opens every time
<p>I have been trying to search about this issue in the forums etc. but have not found any solutions yet. I have installed Eclipse 3.7.1 and using Android 3.0. When i want to debug the Android project, i select Debug As->Android application, simulator opens after a few mins but doesn't launch my app even after did lock...
android
[4]
4,040,007
4,040,008
Adding a search function to return a social security number
<p>I have a program that takes in user input. Once the user information is on file a .dat file stores it. The admin should be able to search on the user social and retrieve the social on file by searching by the social.. I was thinking of using a switch statement where they can search by social, last name, and birt...
c++
[6]
1,424,571
1,424,572
xml parsing error
<p>my code: index.php <pre><code>if(array_key_exists("member", $_GET)) { $member = strip_tags($_GET['member']); } else { $member = 'keyur'; } // Initialize the Object by passing in the users Public Profile name; // // $LIProfile=new LinkedInProfile($member, 'http://icorbin.com/code/linkedin/pro...
php
[2]
5,825,882
5,825,883
WebView leaks entire Activities - with a simple example!
<p>I'm starting to notice, that, even on honeycomb, you'll leak an entire Activity and WebView if you're using WebView and you rotate your phone a few times.</p> <p>I've got some test code here for proof:</p> <pre><code>public class WebViewTestActivity extends Activity { /** Called when the activity is first crea...
android
[4]
2,013,332
2,013,333
How to make Android UI focus move smooth?
<p>In <code>ListView</code> and <code>GridView</code> ,when the focus moving looks so stiff.I try to encode the <code>onDraw</code> function myself,but doesn't look better.</p> <p>Then I use a class that inherit <code>LinearLayout</code>,realize all function of <code>SlidingDrawer</code>,also has right sliding.but It...
android
[4]
6,026,437
6,026,438
Getting this error when running my web service
<blockquote> <p>Server Error in '/' Application. Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. </p> <p>Parser Error Message: Could not create ...
asp.net
[9]
3,937,023
3,937,024
How do I redirect to different pages from a drop down list in php?
<p>When users come to my home page I want them to select which page they want to go to. So, for instance sports, trivia, etc. from a drop down list. How would I get it to redirect to the specific page that is selected using php? This should be simple but I haven't found the solution by searching google.</p>
php
[2]
4,285,091
4,285,092
adding to lists in c#
<p>I'm retuning a list of months from a function. </p> <p>I'm looking to see if there's an elegant solution to adding 3 elements to the beginning of that list.</p> <p>Thanks for your suggestions.</p>
c#
[0]
3,362,522
3,362,523
How to control webpages via PHP?
<p>I want to login into a website, make some choices there, submit and logout.</p> <p>Not so impressive by itself, but I want to do it with PHP. And without cURL, as it is not installed on my server.</p> <p>How do I do it?</p>
php
[2]
3,517,588
3,517,589
Check HTTP Image path if valid
<p>I have a question in Java how can I check if an image http path is valid or existing?</p> <p>For example:<br> This image is existing. <a href="http://g0.gstatic.com/ig/images/promos/homepage_home.png" rel="nofollow">http://g0.gstatic.com/ig/images/promos/homepage_home.png</a></p> <p>But this one is not. <a href="h...
java
[1]
4,348,869
4,348,870
Weird functioning of Application event in iPhone
<p>iPhone app shuts down when ever any call accepted by user. When call ends, app will resume.</p> <p>I want to capture that event when app resumes after call ends. Howsoever I have tried: on App delegate: - (void)applicationWillTerminate:(UIApplication *)application - (void)applicationDidFinishLaunching:(UIApplicati...
iphone
[8]
1,594,837
1,594,838
C++ maximum non negative int
<p>Is the following going to work as expected on all platforms, sizes of int, etc? Or is there a more accepted way of doing it? (I made the following up.)</p> <pre><code>#define MAX_NON_NEGATIVE_INT ((int)(((unsigned int)-1) / 2)) </code></pre> <p>I won't insult your intelligence by explaining what it's doing!</p> <...
c++
[6]
3,587,471
3,587,472
Creating a lottery game of some sort
<p>i am creating a lottery type game where players are able to click a button, and they can then get a random amount of coins (a high amount being rare and low amount being common.)</p> <p>So far all i could think of is an array, is there a more efficient way of doing this?</p> <pre><code>private static final int[] R...
java
[1]
493,781
493,782
Java, call a method on start
<p>I have a really simple question, I want to call a method when my application starts. I know it's easy to accomplish on android with "oncreate", but strange enough, I can't find anything about how to accomplish this with java.</p> <p>EDIT: Figured it out now, seems to be that the 'main' method is called on start, re...
java
[1]
2,742,769
2,742,770
Android app crashes when sim is locked
<p>I m working on an auto start application. In my application when app starts i need to get the sim number. When i have not applied any sim lock my app is working fine but when i apply sim lock and again reboot the device it asks for the sim password and as soon as screen comes my auto start app gets crashed with null...
android
[4]
3,156,753
3,156,754
Creating an instance of a class in its static constructor - why is it allowed?
<p>Another question on SO inspired me to try this code in C#:</p> <pre><code>class Program { static Program() { new Program().Run(); } static void Main(string[] args) { } void Run() { System.Console.WriteLine("Running"); } } </code></pre> <p>This prints "Running" when ru...
c#
[0]
24,567
24,568
How to determine which server is closer/faster to the user in Android?
<p>On the first app start I download ~50 mb of files and then unzip them..<br> I have users from around the world and I have 3 different server that I can host the files, so I thought of using them all and check by code which server is the fastest/closest to user and to use that..</p> <p>How can I achieve that?</p>
android
[4]
634,581
634,582
Checking if there were no arguments on commandline
<p>While I was going through some tutorial one of the source code file had following to check if there were no command-line arguments :</p> <pre><code>if (null==args[0]) { System.err.println("Properties file not specified at command line"); return; } </code></pre> <p>Which for obvious reasons throws ArrayIndexOut...
java
[1]
1,509,072
1,509,073
Android SQLite Database Sample
<p>I want to know how database work in android, m having the basic knowledge but need a sample appliaction t store and view the databse in the interface.</p>
android
[4]
5,632,109
5,632,110
PHP Error handling
<p>Thank you one and all ahead of time.</p> <p>I am currently in the process of tweaking/improving a MVC framework I wrote from scratch for my company. It is relatively new, so it is certainly incomplete. I need to incorporate error handling into the framework (everything should have access to error handling) and it s...
php
[2]
388,736
388,737
startIndex cannot be larger than length of string in c#
<p>I tried to test the month of the staff working whether equal 3 months from they started work till now. And this is what I am trying to use :</p> <pre><code>int totalMonth = 3; int totalYear = 0; int mon = DateTime.Now.Month; int yr = DateTime.Now.Year; //block of code that I used LinQ to Entity to get staff start w...
c#
[0]
3,708,655
3,708,656
jquery rename all attributes
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/317170/how-can-i-change-html-attribute-names-with-jquery">How can I change HTML attribute names with jQuery?</a> </p> </blockquote> <p>I have a large/complex form with different available questions based on the ...
jquery
[5]
1,999,028
1,999,029
Android keyboard button change
<p>My layout has 4 edittext, et1, et2, et3, and et4. I want the keyboard show "Next" button while the et1, et2, and et3 input. And press them to change the cursor to et2, et3, and et4. The keyboard show "Done" button while et4 was input. And press to finish input. Where should to modify to show the "Next" and "Done" bu...
android
[4]
4,833,590
4,833,591
javascript - Create Simple Dynamic Array
<p>What's the most efficient way to create this simple array dynamically.</p> <pre><code>var arr = [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]; </code></pre> <p>Let's say we can get the number 10 from a variable</p> <pre><code>var mynumber = 10; </code></pre>
javascript
[3]
3,037,153
3,037,154
Java 'Write the code necessary to "left rotate" their values:'
<p>I've tried a lot of combinations and have searched on the web for something useful but unfortunately I've found nothing useful.</p> <p>This is for my homework. Only question I cannot answer out of 69 questions.</p> <p>Question:</p> <p>Four integer variables, pos1, pos2, pos3, pos4 have been declared and initializ...
java
[1]
5,429,889
5,429,890
error: request for member ... in ... which is of non-class type
<p>I have a class with two constructors, one that takes no arguments and one that takes one argument.</p> <p>Creating objects using the constructor that takes one argument works as expected. However, if I create objects using the constructor that takes no arguments, I get an error.</p> <p>For instance, if I compile t...
c++
[6]
1,670,986
1,670,987
Measures to prevent from closing a program
<p>Say I have a simple C# monitoring program that is to be installed on some company computers, so I know what the employees are doing. The program is a single .exe file that works in the system tray. How do I prevent employees from closing this program? Is there a way to be notified when a program is closed?</p>
c#
[0]
3,170,528
3,170,529
Coding JavaScript in Adobe Acrobat Professional
<p>I'll soon be coding some JavaScript in Adobe Acrobat Pro, but I hate coding in notepad because it doesn't show me my mistakes. I know the JavaScript implemented by Acrobat Pro is a little different from web JavaScript. I'm wondering if there are software (Visual Studio, Notepad ++ or the like) that would help me hig...
javascript
[3]
3,876,227
3,876,228
ASP.NET with MVC 2 in VS2010
<p>Hi i want to do a work in asp.net using mvc and ajax i have a button when i click that button,its text should be changed.e.g before click(Click me) after click(u clicked me) but i want to do this work in MVC2 i have studied but couldn't understood mvc kinfly do this example so that i can understand it easily</p> <p...
c#
[0]
1,715,304
1,715,305
Andriod - Contact ID from Phone Number - multiple numbers case
<p>I would like to get the ID of the contact by a given phone number. I'm aware of the well known solutions using</p> <pre><code>Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phone_number)); </code></pre> <p>my problem is that it does not work if a contact has more than one number o...
android
[4]
1,028,719
1,028,720
PHP script execution method
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2720488/how-exactly-is-a-php-script-executed">How exactly is a PHP script executed?</a> </p> </blockquote> <p>How does a php script gets executed at the server side? I would like to know if php has life cycle li...
php
[2]
4,867,006
4,867,007
Defining format for fscanf with "%s\t,\t
<p>hey guys was hoping you could help me out,</p> <p>I am relatively new to php and trying to read a file that is formatted as such</p> <pre><code>asdf , asdf , asdf </code></pre> <p>i.e a string followed by a tab, comma and another tab, then another string followed by a tab, a comma and another tab, then ...
php
[2]
4,962,951
4,962,952
Java error, Scanner cannot find symbol
<pre><code> System.out.print("Are you sure you want to quit? (Y or N)"); char selection; selction = sc.nextChar(); if(selection == 'y' || 'Y'){ close = 1; }else if(selcetion == 'n' || 'N'){ break; }else{ ...
java
[1]
5,366,399
5,366,400
Page being loaded twice
<p>I'm developing a ASP.NET 4.0 application with the Patterns and Practices MVP pattern. When I was debugging today I noticed that my page load was being fired twice. When I turned on Fiddler (A HTTP Traffic Monitoring Tool) I was able to pinpoint that my Page was actually being downloaded twice. I'm wondering if an...
asp.net
[9]
4,273,501
4,273,502
What is the use of documented protected properties is in framework classes?
<p>DataGridViewRowCollection has the following properties:</p> <pre><code>Count (public) Gets the number of rows in the collection. DataGridView (protected) Gets the DataGridView that owns the collection. Item (public) Gets the DataGridViewRow at the specified index. List (protected) Gets an array of DataGridViewRo...
c#
[0]
4,318,708
4,318,709
Trying to get a string from within a <p> using jQuery
<p>I am trying to get the string Test123 in the following with jQuery:</p> <pre><code>&lt;div id="pri_txt"&gt;&lt;p&gt;Test123&lt;/p&gt;&lt;/div&gt; </code></pre> <p>I used: </p> <pre><code>var str = $('#pri_txt').next('p').text(); </code></pre> <p>But it doesn't seem to work. Am I missing something?</p>
jquery
[5]
4,456,623
4,456,624
Iphone disable ear headphone button
<p>I'm using MPMoviePlayerController to play a video when application starts. The problem is that when i press the earmic button the movies pauses. I can't use method resume in the MPMoviePlayerController because the application will crash and i don't know how to disable the button function.</p> <p>Thanks, Raxvan</p>
iphone
[8]
2,918,664
2,918,665
collection value comparsion
<p>I have and want to compare two IDictionary collection for sepecific key value. E.g. IDictionary col1 and E.g. IDictionary col2.</p> <p>i am looping all items from both the collection and finally using this "Equals" to compare key values from both the collection - </p> <pre><code>if(col1.Values[key2].Equals(col2.V...
c#
[0]
372,947
372,948
PyMOL: How to enlarge python's console font?
<p>Is there a way to enlarge python's console font? I'm on Kubuntu 11.04.</p>
python
[7]
3,263,312
3,263,313
Hide button based on containing text using jQuery
<p>I'm looking to hide a button containing the text 'Buy Now' using jQuery. This button is within a containing div.</p> <p>Basically something like this:</p> <pre><code>$("button contains('Buy Now').parent('div').hide(); </code></pre>
jquery
[5]
5,998,030
5,998,031
Object comparison: Address vs Content
<p>Hey guys im just messing around and I cant get this to work:</p> <pre><code>public static void main(String[] args){ Scanner input = new Scanner (System.in); String x = "hey"; System.out.println("What is x?: "); x = input.nextLine(); System.out.println(x); if (x == "hello") System.ou...
java
[1]
62,927
62,928
PHP PayPal Subscriptions
<p>I'm looking for any way of using the PayPal IPN to create subscriptions and update my Databases.</p> <p>I know it's a bit of a vague question but any script/class that will create a subscription and allow me to do anything automated on payment would be great.</p> <p>I've been playing around with the PayPal IPN for...
php
[2]
5,399,258
5,399,259
Loop construct in Python
<p>I'm a python noob and have issues setting up a loop that checks if an int z is divisible by a set of numbers, e.g. by 1 - 10. I wrote the following code snippets, but they all return X =[all the numbers of z]... i.e. they fail to apply the if condition so that the mod is checked over all n in a given range/set. </...
python
[7]
2,614,274
2,614,275
Why its better (Return IList Instead of return List)?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/400135/c-listt-or-ilistt">C# - List&lt;T&gt; or IList&lt;T&gt;</a> </p> </blockquote> <p>When I return a list from my method I can do in 2 way. As a List</p> <pre><code>Private List&lt;datatype&gt; MethodName()...
c#
[0]
1,973,333
1,973,334
PHP Static functions don't work when directory changes?
<p>I have a class that looks like this:</p> <p>utils/Result.php</p> <pre><code>&lt;?php class Result { public static function ok() { echo "OK"; } } </code></pre> <p>If I create the following script</p> <p>./sandbox.php</p> <pre><code>&lt;?php require_once("utils/Result.php"); print_r(Result::o...
php
[2]
4,370,330
4,370,331
remove spaces in string using javascript
<p>I need to do some functions on some text field contents before submitting the form, like checking the validity of the customer registeration code, having the customer name as his code in customers table appending an incrementing number.</p> <p>I don't want to do it after the form is submitted becuase I need it to b...
javascript
[3]
815,592
815,593
ASP.NET TextBox filter
<p>is there a simple way to suppress certain keystrokes within a textbox? for example if i only want to allow numbers.</p>
asp.net
[9]
1,611,262
1,611,263
How do I call up a function from anywhere in the program in C++?
<p>Here is the code: </p> <pre><code>while (inDungeonRoom1 == true) { if (choice == "torch" || choice == "Torch" || choice == "pick up torch" || choice == "Pick up torch" || choice == "grab torch" || choice == "Grab torch") { torch++; </code></pre> <p>I want to be able to call a function,...
c++
[6]
3,792,493
3,792,494
How to add a new element in the current object?
<p>There is the following JQuery code:</p> <pre><code> $(document).ready(function(){ $(".translated").mouseenter(function(){ $(this).html("&lt;input type='text'/&gt;"); }); }); </code></pre> <p>And there is the table with many <code>&lt;div class="translated"&gt;</code> items with t...
jquery
[5]
629,489
629,490
Display a single frame from a multipage TIFF file from a listbox in a picture box
<p>I have created a C# application which allows you to load a multipage TIFF file and displays them in a listbox. There are then buttons that you can add and remove pages and save the new image file.</p> <p>I have used the code from here <em><a href="http://www.bobpowell.net/addframes.htm" rel="nofollow">Adding frames...
c#
[0]
2,927,588
2,927,589
Google Analytics tracker
<p>I have an application, in which I set a tracker. I use <code>tracker = GoogleAnalyticsTracker.getInstance();</code> and <code>tracker.startNewSession("&lt;UA number", this);</code> in<code>onCreate()</code> in every activity. What I'm interested in - is it efficient to start new session in every separate activity or...
android
[4]
586,080
586,081
How to open the default webbrowser using java
<p>Can someone point me in the right direction on how to open the default web browser and set the page to "www.example.com" thanks</p>
java
[1]
5,927,679
5,927,680
Is there a way to implement a StringBuilder in JavaScript
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/112158/javascript-string-concatenation">JavaScript string concatenation</a><br> <a href="http://stackoverflow.com/questions/2087522/does-javascript-have-a-built-in-stringbuilder-class">does javascript have a built...
javascript
[3]
4,373,354
4,373,355
jQuery: issues with mouseover event if the element has children
<p>I have the following element:</p> <pre><code>&lt;div id="#block-block-1"&gt; &lt;p&gt;KAREN LANCEL:&lt;br&gt; lancel(at)xs4all.nl&lt;br&gt; phone 0031 (0)624873424&lt;/p&gt; &lt;p&gt;HERMEN MAAT:&lt;br&gt; maat(at)xs4all.nl&lt;br&gt; phone 0031 (0)628536885&lt;/p&gt; &lt;/div&gt; </code></pre> <p>which is supp...
jquery
[5]
4,160,077
4,160,078
How to Get the number of files included in a byte array?
<p>I am using <code>ICSharpCode.SharpZipLib.Core</code> library to zip the files in my C# code. After zipping i will return a byte array . Is there any way we can find the number of files in the byte array ? </p> <p>my code looks like</p> <pre><code>string FilePath ="C:\HELLO"; MemoryStream outputMemStream = new Mem...
c#
[0]
4,117,527
4,117,528
struct class member in C++
<p>Im new and learning C++, is this code a valid C++ implementation, please see code below,</p> <pre><code>// FoomImpl.h #include "Foo.h" namespace FooFoo { namespace Impl { class FooImpl { public: FooImpl( FooFoo::CFoo::stBar bar ) { m_bar = bar; } private: FooFoo::CFoo::stBa...
c++
[6]
5,140,120
5,140,121
Error during configuration iGridMedia on Ubuntu
<p>I have heard about an open source project called iGridMedia. I'm trying to configure it in order to do some research. Although I have followed the install guide, but it still produced errors, seems like C++ error:</p> <blockquote> <p>$ make -f Makefile.gcc.debug<br> cd ../../src/p2framework; make -f Makefile.gc...
c++
[6]
2,782,095
2,782,096
How can I removing escape characters using php?
<p>I have the following text </p> <pre><code>$text = "\\vct=140\\Araignée du soir espoir,araignée du matin,espoir du matin." </code></pre> <p>I want to remove the escape characters using php..I do not want to use stripslashes since it is server dependent.. </p> <p>I want to remove the '\' before the '\vct=140' and...
php
[2]
299,480
299,481
What are Class methods in Python for?
<p>I'm teaching myself Python and my most recent lesson was that <a href="http://dirtsimple.org/2004/12/python-is-not-java.html">Python is not Java</a>, and so I've just spent a while turning all my Class methods into functions.</p> <p>I now realise that I don't need to use Class methods for what I would done with <co...
python
[7]
343,186
343,187
Why synchronized keyword does not create monitor enter every time
<p>Why synchronized keyword does not create monitor enter at byte code level every time I use it? </p>
java
[1]
1,676,830
1,676,831
change date format in java
<p>I have string in <code>'mm/dd/yyyy'</code> format and want to convert it into <code>'dd-Mmm-yy'</code>.</p> <p>eg <code>'04/01/2012'</code> should be converted itno <code>'01-Apr-12'</code></p> <p>Can anyone please suggest how to get this?</p>
java
[1]
498,024
498,025
php file_get_contents and &amp;
<p>I'm trying to use php's file_get_content('a url');</p> <p>The thing is if the url has '&amp;' in it, for example</p> <p><code>file_get_contents('http://www.google.com/?var1=1&amp;var2=2')</code> </p> <p>it automatically make a requests to <code>www.google.com/?var1=1&amp;amp&lt;no space here&gt;;var2=2</code> </p...
php
[2]
1,749,800
1,749,801
Deleting from Array but keep order?
<p>Ok so im trying to delete an object from my array, each object has a user id, so the 0 index in array would hold an object with id one. when I delete object wih id of 2 for example I want to delete the 1 index in array and redo the model and display that. so I want the model to show 1:blah then 3:Blah and so on leav...
java
[1]
1,352,028
1,352,029
How to handle the begin/end of the incoming/outgoing call
<p>How do I handle the begin/end of the incoming/outgoing call?</p> <p>In the other words "to catch the moment when an incoming/outgoing call is beginning/ending" (<strong>the time between</strong> the answer and hang up) and write it in the log.</p> <p>Android version is 2.3 </p>
android
[4]
2,962,202
2,962,203
How to use a string as stdin
<p>I have been going crazy over a seemingly easy question with Python: I want to call a function that uses raw_input() and input(), and somehow supply those with a string in my program. I've been searching and found that subprocess can change stdin and stdout to PIPE; however, I can't use subprocess to call a function....
python
[7]
4,086,514
4,086,515
Android capture new outgoing call
<p>The requirement is to replace newly dialed number with another one. I have captured the ACTION_NEW_OUTGOING_CALL event and used Intent.EXTRA_PHONE_NUMBER to get the current outgoing number and then I have used setResultData inside my class(which extends BroadcastReceiver) to replace the dialed number. Basically code...
android
[4]
4,247,531
4,247,532
ASP.NET Wizard Steps: Getting form data to next page?
<p>I can't figure out how to pass form data from a Wizard Steps Control to a new page. I posted <a href="http://stackoverflow.com/questions/1461273/pass-hiddenfield-value-within-a-wizardsteps-control-to-next-site">THIS POST</a> some days ago, but the answer here didn't really help me because i can't even get the value ...
asp.net
[9]
5,448,193
5,448,194
IntentServicewon't show Toast
<p>This IntentService I created will show Toasts in onStartCommand() and in onDestroy(), but not in onHandleIntent(). Am I missing something about the limitations of an IntentService?</p> <pre><code>public class MyService extends IntentService { private static final String TAG = "MyService"; public MyService(){ ...
android
[4]
1,038,216
1,038,217
How to validate 3 fields in javascript
<p>I want to validate 3 fileds</p> <ol> <li>First name text box</li> <li>Last name text box</li> <li>Middle name text box</li> </ol> <p>here is my code:</p> <pre><code>function validateForm() { var x=document.forms["myForm"]["fname"].value; var y=document.forms["myForm"]["lname"].value; var z=document.fo...
javascript
[3]
4,695,789
4,695,790
How to reference a dynamically created text box
<p>Using Javascript or jquery, how would I reference some text boxes which were dynamically created. I have the following javascript which references one text box, but when the other text boxes are created, they have different id's. Any ideas's?</p> <pre><code>&lt;script type="text/javascript"&gt; $(function(){ $(...
javascript
[3]
5,792,951
5,792,952
type error need string or buffer, file found in python
<p>So when i write this chunk of code separately, it works fine but when i combine them together it give me typeError. Why is this happen? I don't get it when i wrote them separately it works fine. thanks in advance :)</p> <pre><code>def printOutput(start, end, makeList): if start == end == None: return e...
python
[7]
5,154,122
5,154,123
why can't an element be accessed from the name attribute in Jquery
<p>what is the main reason that we cannot access the element from its name attribute rather it can be accessed from id attribute</p> <pre><code>&lt;input type="text" name="textname" id="textid" value=""&gt; &lt;input type="button" name ="buttonname" id ="buttonid" value ="button" $(document).ready(function(){ $(...
jquery
[5]
935,300
935,301
Hierarchical Parent Error when create new android project
<p>When I create new android project, in "New blank activity", the wizard show an error <code>Activity name must be specified</code> as below:</p> <p><img src="http://i.stack.imgur.com/y8uq0.png" alt="enter image description here"></p> <p>What is this error? and Hierarchical parent used to be for what? if I type a s...
android
[4]
59,122
59,123
Waiting for a Java keypress
<p>The application I am wishing to write is quite large, but requires being run as a service. I plan on using FireDaemon to convert it and run it as a service, but need to have it do nothing until a specific key is pushed.</p> <p>I tried using <code>DataInputStream</code> and a do/while loop which would wait for a ke...
java
[1]
960,242
960,243
does date_default_timezone_set suffer from same process problem as setlocale?
<p>Does date_default_timezone_set have the same problem as setlocale as defined in the php manual?</p> <blockquote> <p>locale information is maintained per process, not per thread</p> </blockquote> <p>is this the same for date default timezone set problem</p>
php
[2]