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,777,143
2,777,144
Is there a way to do run something from a parent of a parent?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/183702/access-parents-parent-from-javascript-object">Access parent&#39;s parent from javascript object</a> </p> </blockquote> <p>Im a bit confused how to say this but i want what i would expect from the code "th...
javascript
[3]
329,068
329,069
VNC SERVER source/app for non-jailbroken iPhone?
<p>I have looked and looked and cannot find an answer. I am looking for an open source vnc <strong>server</strong> for the iphone. I would like to deploy it to my device, and not install it via jailbreaking/cydia. [I'm not looking for a tv-out option (I know that exists), nor a VNC client. Also not looking for screen m...
iphone
[8]
675,771
675,772
Template variable in ASP.NET
<p>I have to add a Page's variable into a ItemTemplate but dont know how.</p> <p>For example:</p> <pre><code>&lt;rad:RadMenuItem ID="f" runat="server" Text="Products"&gt; &lt;ItemTemplate&gt; &lt;div class="pitem"&gt;&lt;%= MyText %&gt;&lt;/div&gt; &lt;/ItemTemplate&gt; &lt;/rad:RadMenuItem&gt; </code></pr...
asp.net
[9]
4,870,415
4,870,416
PHP - Image uploading not working
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/11785726/image-uploading-via-php-returning-empty-array">Image uploading via PHP returning empty array</a> </p> </blockquote> <p>I am unable to successfully upload an image/file to my server. The php is as follow...
php
[2]
5,367,036
5,367,037
Best resources to learn JavaScript
<p>The question says it all really, I'm looking for book recommendations, video tutorials etc. I've been programming since I was about six so I don't need a book that spends 4 pages on for loops (thought that might be a <a href="http://www.codinghorror.com/blog/archives/000848.html" rel="nofollow">Bad example</a> in te...
javascript
[3]
4,678,251
4,678,252
Reference to running Thread is null
<p>I can't get a spawned thread to stop:</p> <p>I'm implementing the vibration-part of the Ringer-class in the regular Android Phone.apk (basically word for word), but after vibrating once (and stopping) correctly, the second time I call <code>startVibration()</code> and subsequently <code>stopVibration()</code>, it <...
android
[4]
5,173,506
5,173,507
Writing specific lines of a text file
<p>I write this code:</p> <pre><code>f = open('example.txt','r') lines = f.readlines() for i, line in enumerate(f): if i &lt; 3: lines = ['LC '+line for line in lines] with open('./example.txt', 'w') as f: f.writelines(lines) f.close() elif i &lt; 5: lines = ['LB '+line for line in lines] wi...
python
[7]
3,952,590
3,952,591
<script type="text/javascript">
<p>Is there any difference between </p> <p><code>&lt;script type="text/javascript"&gt;</code> </p> <p>and </p> <p><code>&lt;script&gt;</code> </p> <p>tags ?</p>
javascript
[3]
2,053,520
2,053,521
Execute initially and via function call
<p>What is the best way wrap some code so I can call it with <code>foo();</code> and have it execute when the javascript is loaded ?</p> <p>I want to have foo executed whenever the javascript is loaded and have the ability to call foo with foo();</p>
javascript
[3]
4,998,082
4,998,083
animation in android
<p>I had an activity (say homeActivity) and when I start a new activity(say nextActivity) from my homeactivity i would like to give it an animation effect like appearing it from the bottom. Is it possible in android?</p>
android
[4]
4,347,626
4,347,627
What's wrong with this code in C++?
<pre><code>#include &lt;iostream&gt; using namespace std; int main() { int i; int a[5]; for (i=0; i&lt;5; i++) { cin&gt;&gt;a[i]; } for (int j=0; j&lt;5; j++) { if (a[j] == 42) break; cout&lt;&lt;a[j]; } } </code></pre> <p>Simple program. Read an array of five numbers. ...
c++
[6]
76,925
76,926
Android-Media Player
<p>I am new to android.I am trying to play a video from sdcard.</p> <p>this is the sample code I have used..</p> <pre><code> public class videoa extends Activity { /** Called when the activity is first created. */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);...
android
[4]
1,337,764
1,337,765
receiving an intent when completing a browser download
<p>I'm writing a software update application that (among other stuff) does the following:</p> <p>When I find an image I want to download, I'm passing an <code>ACTION_VIEW</code> intent to the Browser application. The browser starts the download, and when it completes, I see the download complete message in the notific...
android
[4]
4,061,521
4,061,522
Runnable jar doesn't work from one machine to another
<p>So when exporting the project as a runnable jar, the jar works fine on the current machine. Moving the jar to another machine, and it cannot find the main class: Used cmd to get the error:</p> <pre><code> Desktop&gt;java -jar RunMe.jar Exception in thread "main" java.lang.ExceptionInInitializerError ...
java
[1]
2,737,087
2,737,088
Not able to get onClick event of button while using VideoView
<p>I am using VideoView to display video and media controller.</p> <p>I am showing media controller continually by passing value 0. so when i click on HOME button it doesnt directly go back to home but first it hides mediacontroller than again i have to click on HOME button to go back.</p> <p>What i want is : when i ...
android
[4]
3,072,428
3,072,429
C++ Multiple Condition Statements - Merging
<p>I have written a program according to a specification.<br> The Specification has about 3 types and each type gets handled differently on every single point.</p> <p>That means more or less for code readability, I have written it like shown below, now my question is, if you have <strong>200</strong> such <strong>stat...
c++
[6]
3,953,440
3,953,441
Android - Download and save APK files in Phone Storage (Not in SD card)
<p>I was trying to <strong>download one APK file from my server and save it in Phone Storage</strong>. </p> <p>The following is the code that I used:</p> <pre><code> String apkLink = "http://10.1.20.53/files/test.apk"; URL url = new URL(apkLink); HttpURLConnection c = (HttpURLConnec...
android
[4]
2,605,952
2,605,953
javascript toggle for selected odd and even columns in a table
<p>The Script below is working for either odd or even table columns only. Anybody pl correct/modify to work for both odd and even table columns selected.</p> <pre><code>var toggle = function (action) { var trs = document.getElementById('bar').getElementsByTagName('tr'), trs_count = trs.length, need...
javascript
[3]
4,692,185
4,692,186
How Does the toString(), ==, equals() object methods work differently or similarly on reference and primitive types?
<p>How Does the toString(), ==, equals() object methods work differently or similarly on reference and primitive types?</p>
java
[1]
1,438,127
1,438,128
Is there an Object Initializers in Java
<p>Like this one? <a href="http://weblogs.asp.net/dwahlin/archive/2007/09/09/c-3-0-features-object-initializers.aspx" rel="nofollow">http://weblogs.asp.net/dwahlin/archive/2007/09/09/c-3-0-features-object-initializers.aspx</a></p> <pre><code>Person p = new Person() { FirstName = "John", LastName = "Doe", A...
java
[1]
147,058
147,059
C# String.Empty
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/151472/what-is-the-difference-between-string-empty-and">What is the difference between String.Empty and &ldquo;&rdquo;</a> </p> </blockquote> <p>Hello</p> <p>Simple Question;</p> <p>Why</p> <pre><code>Textbox...
c#
[0]
5,347,496
5,347,497
jQuery .fadeIn() not working as expected
<p>I have the code below for showing a submenu. I want the submenu to fade in on mouse-over, but it doesn't fade in - it just immediately shows the submenu:</p> <pre><code>jQuery("ul li").mouseover(function() { jQuery(this).fadeIn(1000, function () { jQuery(this).find('ul').css('right','0px').css('top','24...
jquery
[5]
703,854
703,855
Trying to read this file in parts. read some part and skip some
<p>I am trying to read a file, I want to read some part of the file and skip some part untill I get to the end of the file. This is what I have but I am not getting my desired result. The idea is to read through all the lines and check if it starts with either "CH" or "CL" if not move to the next line until the end of ...
java
[1]
3,731,835
3,731,836
Referencing static fields of the subclass of an abstract class in the abstract class's method body
<p>Given the folowing, in pseudocode</p> <pre><code>abstract public class Bug { private static int BREEDTIME; public void breed() { if (this.age % this.BREEDTIME) { world.setAt(new this.class(newX, newY, this.world); } } } public class Ant extends Bug { private static int BREEDTIME = ...
java
[1]
4,450,094
4,450,095
How to re-select something in a <select> element using jQuery?
<p>Using jQuery, what is the most simple and elegant way to re-select an item in a <code>&lt;select&gt;</code> dropdown list when given chosen_value=111?</p> <p>What if it is checkboxes instead of <code>&lt;select&gt;</code>, having <code>id[]=11&amp;id[]=12</code>... (the [] are actually in %5B%5D)</p>
jquery
[5]
3,370,958
3,370,959
Unable to find control id 'ID of your Meter' referenced by the 'ControlToValidate' property of 'IDofyourMeterRequird'
<p>I have this error when I run the <code>register.aspx</code> in Visual Studio after I added some fields. The fields are <code>id</code>, <code>meter</code>, and <code>address</code>.</p> <p>This is the code:</p> <pre><code>&lt;tr&gt; &lt;td align="right"&gt; &lt;asp:Label ID="Label1" runat="server" Ass...
asp.net
[9]
5,435,742
5,435,743
Apply styles to dynamically created textViews
<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;resources&gt; &lt;style name="detaileventTitle"&gt; &lt;item name="android:layout_width"&gt;fill_parent&lt;/item&gt; &lt;item name="android:layout_height"&gt;wrap_content&lt;/item&gt; &lt;item name="android:textColor"&gt;#000000&lt;...
android
[4]
850,653
850,654
textarea save wont save with breakline
<p>I have a textarea and then I want to present it. I want the text will be saved with the same break lines or \n.</p> <p>but it wouldnt.</p> <p>heres my code :</p> <pre><code>string content = Request.Form["content"]; content = System.Web.HttpUtility.HtmlEncode(content); UpdateContent(content, i...
asp.net
[9]
2,511,857
2,511,858
How to find and modify a TextBox in some word document using Microsoft.Office.Interop.Word
<p>I have to access and change text of some text boxes of some word document by the TextBox id. for example suppose that i have some object named txtDate in a word document and I want to change its content to now's date, so how can i get this object by its id?</p> <p>thanks.</p>
c#
[0]
5,786,440
5,786,441
Make PHP die if there is a warning
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/10520390/stop-script-execution-upon-notice-warning">Stop script execution upon notice/warning</a> </p> </blockquote> <p>Is there a way to make PHP immediately stop script execution if a warning or other error is...
php
[2]
2,129,690
2,129,691
Can this be done in PHP? Simple abc "game"
<p>I need to build the following... 3 main function...</p> <p>1- page with 26 boxes. Each box has a picture of an animal.</p> <p>2-When a animal is clicked, load a new page that shows the animal. there are also 3 letters on the screen. User must choose the correct first letter of animal.</p> <p>3- Return to the firs...
php
[2]
192,622
192,623
How to create a shortcut button to jump to a DialogPreference
<p>I would like to make a button on the front page of the app that jumps to a specific DialogPreference. </p> <p>The purpose of the button is to be a shortcut to that preference, bypassing having to browse the list of all preferences, since I'm going to be resetting that preference a lot.</p> <hr> <p>If it's not po...
android
[4]
1,444,201
1,444,202
Android:Contacts related questions
<p>As I am new to android,please do help me to give some brief idea to make this application</p> <p>User should be able to choose a contact from the contact list and assign a photo to it from the gallery so that the photo would be visible when called or calling and the mobile should not dim down the light or turn off ...
android
[4]
4,157,694
4,157,695
Add a canvas - Android
<p>I dynamically create a canvas with:</p> <pre><code>Canvas canvas = new Canvas(); </code></pre> <p>But how can I add it to my LinearLayout?</p> <pre><code>LinearLayout ll = new LinearLayout(this); </code></pre>
android
[4]
58,907
58,908
Sessions in asp.net? Maintain the session?
<p>In web application, i have admin module and it contain login page also, i am maintaining the sessions throught the admin if session is null it is redirecting to login page of admin, but when i write the page name in url [which is a page of admin module], it is displaying the page, instead of redirect to login page. ...
asp.net
[9]
383,668
383,669
iPhone sdk 3.2.3 upgrade Problem
<p>I just upgraded my Mac to Snow Leopard, and installed Xcode 3.2.3.</p> <p>The app I am working on ran perfectly before the upgrade.</p> <p>Now, the default image appears briefly, then the screen goes black except for the status bar. Same behavior on my iPhone 4 and in the simulator, whether I target iOS 3.2 or 4.<...
iphone
[8]
4,018,278
4,018,279
Location javascript in Android webview
<p>I have a web page in which location is getting detected in android web browser successfully. And based on location my results are filtered out. I am running same website url in a webview of android app. But in android app that location detection javascript is not working. Any suggestions what to do here? Javascript...
android
[4]
3,086,015
3,086,016
Video stegnography in Java with LSB method
<p>I want to hide a secret message inside a video file with Java, using a least significant bits modification algorithm. Can you help me?</p>
java
[1]
3,251,542
3,251,543
Handler.postdelayed
<p>I am using handler.postDelayed method to create some delay for some animation stuff. </p> <p>With that i am playing some song as well using Mediaplayer. User can exit this action class by clicking next. But on next screen the same song is continuing even though i called stop method in the next button's onclickliste...
android
[4]
4,832,026
4,832,027
How to show the route in the map without driving directions?
<p>I am using the Intent(Android SDK) to show the route between two locations by using the code mentioned below:</p> <p>Uri uri = Uri.parse("http://maps.google.com/maps?f=d&amp;hl=en&amp;saddr=Surat&amp;daddr=Kolkata"); Intent intent = new Intent(Intent.ACTION_VIEW, uri); startActivity(intent); </p> <p>The map is vi...
android
[4]
784,947
784,948
Confused with format( ) in python doc
<p>I'm not sure about python doc:</p> <p><a href="http://docs.python.org/py3k/library/functions.html#format" rel="nofollow"><strong>format(value[, format_spec])</strong></a></p> <pre><code>A call to format(value, format_spec) is translated to type(value).__format__(format_spec) which bypasses the instance dictionary ...
python
[7]
1,725,583
1,725,584
Can someone explain this line of code please? (Logic & Assignment operators)
<p>I've seen the following lines of code and I know what they do, but I don't know how the second line works (and hence how to apply it to another situation).</p> <pre><code>$user = User::model()-&gt;findByPk(123); empty($user-&gt;profile) and $user-&gt;profile = new Profile(); </code></pre> <p>The code tries to look...
php
[2]
3,221,089
3,221,090
What is serialization in Java?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/447898/what-is-object-serialization">What is object serialization?</a> </p> </blockquote> <p>I've made a small RSS Reader app using Swing and Eclipse keeps telling me "The serializable class MochaRSSView does no...
java
[1]
5,931,090
5,931,091
How does c# remove the memory allocated in loop?
<p>imagine this code:</p> <pre><code>int i=9999999; while ( i &gt; 1 ) { string UnusedMemory="this is a string that eats some ram" + i.ToString(); i--; } </code></pre> <p>if unreferenced objects were removed only sometimes when <code>GC.Collect()</code> is run, this code should allocate lot of ram until colle...
c#
[0]
5,439,252
5,439,253
TypeError: $(...).tablesorter is not a function
<p>I am using jquery.tmpl to create tables through ajax call. Table row is coming from database .</p> <p>And i included all the tablesorter plugins that is ,tablesorte,js,latest.js and css</p> <p>But it is giving error as tablesorter is not a function...</p> <pre><code>$.ajax({ ..... success:function(){ $("#my...
jquery
[5]
545,502
545,503
Utility activities?
<p>I'm a little confused about the naming conventions used here... but AFAIK it is possible to build an activity(?) that performs some small function than many different programs could use. For example a date-picker tool for use in a calendar or alarm program.</p> <p>Fist of all I wish to know what these things are ca...
android
[4]
5,048,069
5,048,070
C# Bestpractice: Writing a method that returns a value in depdency of the method parameter that is a part of the class itself
<p>At first sorry for my really bad title! If you have a better title just change it or make a comment =)</p> <p>I have this class:</p> <pre><code>public class Config { public Provider1 Provider1 { get; set; } public Provider2 Provider2 { get; set; } public Provider3 Provider3 { get; set; } public Pro...
c#
[0]
1,845,927
1,845,928
Return list of directories containing specified extension
<p>I'd like to get a list of directories below the current directory containing mp3's. </p> <p>I can get the a list of the files easily enough using <code>os.walk</code>. I can get the full path easily enough using <code>os.path.join(os.path.abspath(root), file)</code>, but I just want a list with of the matching dire...
python
[7]
3,372,354
3,372,355
how to put local website in local browser?
<p>In Win Server 2003, I would like to set the default IE homepage to a local website. How do I accomplish this?</p>
asp.net
[9]
1,495,838
1,495,839
how to create list and sublist -android?
<p>I am new to android.Can any one help me .how to create a list. example: List1 by selecting list1 I should get list1 items in sublist list1.1,list1.2.... List2 by selecting list2 sublist items as list2.1 list2.2</p> <p>Please help me.</p>
android
[4]
5,814,431
5,814,432
How do i get facebbok id from mobile phone
<p>Is it possible to take facebook id from other mobile application ?</p>
android
[4]
562,423
562,424
values in queue Java
<p>If I have a queue with strings as values How would I print all the values I was using:</p> <pre><code>System.out.println(queue.elements().toString().); </code></pre> <p>But it prints java objects...?</p> <p>Do I have to use a loop to print values of queue?</p>
java
[1]
4,036,861
4,036,862
ASP.NET requested page in Global.asax
<p>I want to be able to globally grab a reference to the <code>Page</code> object that is currently being requested, so I've added a Global.asax file.</p> <p>Is there any way to do this? I assume it has something to do with the <code>Application_BeginRequest</code> event.</p>
asp.net
[9]
5,004,340
5,004,341
Click element and change the text inside (with jquery)
<p>I use this function to load the div '.slide'. I want to change the text inside open to close when clicking the div. I want to arrange this by Jquery. How is this done?</p> <pre><code>$("#slideopen").click(function () { var slide = $(".slide"); if (!slide.data("loaded")) { slide.load("/v3/ajax/timeli...
jquery
[5]
5,252,493
5,252,494
How to add a SplitViewController to another ViewController in iPhone?
<p>I'm trying to add a splitviewcontroller as a subview in another viewcontroller. </p> <p>To make it easier, I want the splitviewcontroller to be static which means I want to see both master (tableview) and detail controllers in all orientations with no popoverview controller</p> <p>Is that possible and how?? Any he...
iphone
[8]
4,030,925
4,030,926
C# Nullable Types and the Value property
<p>I'm a little unclear on when/if the Value property on nullable types must be used when getting the value contained in a nullable type. Consider the following example:</p> <pre><code>int? x = 10; Console.WriteLine("The value of 'x' is " + x.Value); Console.WriteLine("The value of 'x' is " + x); </code></pre> <p>Bo...
c#
[0]
4,738,651
4,738,652
call the methods from one activite to other( java.lang.IllegalStateException: System services not available to Activities before onCreate())
<p>I'm struck with some problem will calling the method from one activity to other......</p> <p>I have a activity called Transaction2 in this activity,I have a method like getProposal().I need to call this method in to the other activity called PaymentDetails. I called the method like this : I import the activity(impo...
android
[4]
1,544,390
1,544,391
Image Editor Tool + C# web application
<p>Can anyone tell me which is the nicest tool for image editing in C#</p>
c#
[0]
4,065,885
4,065,886
Beginner Python Advice
<p>I recently started using python I'm not bad but I think some of my basics may be a bit weak </p> <p>My question is does anyone know any good tutorials that they learned from or maybe a couple of challenges for me that I could do like I said I can do most basics but I want to have them as solid as I can </p> <p>hel...
python
[7]
1,658,090
1,658,091
How to refresh particular part of my web page?
<p>I want to refresh only a single part of my page not the whole. How ?</p>
asp.net
[9]
6,007,189
6,007,190
Retrieving account features in ICS
<p>The <code>AccountManagerFuture&lt;Account[]&gt;</code> retrieved from <code>AccountManager</code>'s <code>getAccountsByTypeAndFeatures()</code> method sometimes takes forever to yield a result. </p> <p>Documentation says :</p> <blockquote> <p>Account features are authenticator-specific string tokens identifying ...
android
[4]
1,691,918
1,691,919
RequestFocus on Edittext shows up after being removed/deleted from xml code
<p>I had defined a <code>&lt;requestfocus /&gt;</code> tag in xml for my edittext widget for my android 2.2 app. Later on, I removed the <code>&lt;requestfocus /&gt;</code> tag, but the activity in which the edittext is defined is still showing up the soft android keyboard. I have re-designed the code similar to anothe...
android
[4]
3,386,023
3,386,024
Return true, return false when using switch
<p>I'm trying to get a switch to return true or false, but I seem to be failing somewhere. I keep getting false. I'm totally lost. This should have worked actually. How do I get this right?</p> <pre><code>if (validNum(1)) {echo 'Ok';}else{echo 'Fail';} function validNum($x) { switch ($x) { case 1: echo "Number 1"; ...
php
[2]
5,053,476
5,053,477
Do database update notifications only happen within the same Activity/Fragment context?
<p>I've got a FragmentActivity that shows a list of items and clicking on one starts a new Activity which allows the user to edit that item. This is all using the new <code>CursorLoader</code> support from the v4 compat library. Everything is working (finally!) but when I return from the Edit, the changes are not sho...
android
[4]
2,955,599
2,955,600
iPhone-SDK:How to set background color for View and not for the Table?
<p>I have downloaded TableView sample code '4_TableViewCellSubviews' from internet. I am trying to run this program in my way. I am trying to set my own background view color as 'lightgraycolor'. I just wanted to see the background view as lightgraycolor in this application. I don't want to make any color for TableView...
iphone
[8]
1,353,391
1,353,392
How can I find hard disk speed
<p>How can I find hard disk speed ? I can not use System.IO.File.Copy and use timer to get hard disk speed , because after caching file , the speed will be really higher than real time .</p> <p>what can I do ?</p>
c#
[0]
1,800,177
1,800,178
How to check if PHP script is running by shell
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1991346/in-php-how-to-detect-the-execution-is-from-cli-mode-or-through-browser">In php, how to detect the execution is from CLI mode or through browser?</a> </p> </blockquote> <p>How can I check if a PHP script ...
php
[2]
2,034,338
2,034,339
Jquery .on event with selector for dynamically loaded elements with selectors
<p>I am modifying the jquery.unobtrusive-ajax.js that is packaged with asp.net mvc 3 to allow dynamically loaded forms to work.</p> <p>Old:</p> <pre><code>$("form[data-ajax=true]").live("submit", function (evt) { /*code here */ }); </code></pre> <p>My code:</p> <pre><code>$("body").on("submit","form[data-ajax=t...
jquery
[5]
401,835
401,836
javascript doesnt continue even though it should - mysterious
<p>I have written a simple script which goes through a textarea and transports !hash tags! and @person names@ into two separate inputs. </p> <p>However, unless the first of two regex conditions is met (word starts with '!' and ends with '!' symbol), it does not work for the next condition.</p> <p>For example code on ...
javascript
[3]
3,857,988
3,857,989
How to set the selected value for a drop down list based on another drop down list?
<p>If I select x value in the first drop down list, then Y value would be selected on the second drop down list.</p>
javascript
[3]
1,991,112
1,991,113
Test if string exists in file with Python
<p>I'd like to add only servers currently doesn't exist at file</p> <p>My current code :</p> <pre><code> f = open(filename,'a') for server in cmo.getServers() : print &gt;&gt;f, server.getListenAddress() </code></pre> <p>Thanks in advance</p>
python
[7]
646,107
646,108
Need help login validation using java script
<p>I have problem with login validation using javascript. When the user doesn't provide any username or password the pop up message is showing please enter the username and password. I want that when user doesn't provide username the pop up message will come please enter the username, then if i press OK button cursor ...
javascript
[3]
2,628,428
2,628,429
How to use JQuery 'on()' with class selector filter?
<p>Trying to update some old code from <code>live()</code> to use <code>on()</code> and something is failing miserably.</p> <pre><code>$('#accordion').on('click','.EditModeDetails', function(event){ alert('yay'); }); </code></pre> <p>where <code>.EditModeDetails</code> is a class on injected HTML like so:</p> <...
jquery
[5]
3,055,533
3,055,534
How to do a correct size check?
<p>Having four vars:</p> <pre><code>short mantissa, exponent, base; long double factor; </code></pre> <p>How shall I check each of those three components to ensure that result will fit into factor? Or maybe leave it as a user responsibility to make sure that data provided make sense?</p>
c++
[6]
5,822,011
5,822,012
How to check if a remote server supports PHP?
<p>I often have clients who do not know if their server supports PHP (their website is HTML web site). At the moment, I send them hello.php file, they upload it and then I check it remotely if their server supports PHP. As you see this takes day or two and it's just a waste of time. </p> <p>Can I myself any how check ...
php
[2]
2,351,518
2,351,519
Eclipse does not recognize some coda-parts
<p>Sorry for the unspecific title, but I do not know how to formulate it. </p> <p>I have the following problem:</p> <p>I Have installed Android SDK on my laptop and on another PC. I have to work on both PC. When transport a Project form my Laptop, I sometimes get the problem, that on the PC, parts of the code get the...
android
[4]
1,684,580
1,684,581
Python String Formatting Question
<pre><code>def createSVGStyleTransformationMatrix(self, transformMatrix): return "matrix(%f %f %f %f %f %f)"%(transformMatrix[0],transformMatrix[1],transformMatrix[2],transformMatrix[3],transformMatrix[4],transformMatrix[5]) </code></pre> <p>As all the substitutions are from the same list and in sequence I was hop...
python
[7]
4,080,225
4,080,226
Android: simple export/import of sqlite database
<p>I am trying to implement a simple sqlite export/import for backup purposes. Export is just a matter of storing a copy of the raw current.db file. What I want to do for import is to just delete the old current.db file and rename the imported.db file to current.db. Is this doable? When I try this, I get</p> <p>06-30 ...
android
[4]
5,354,093
5,354,094
Replace First Character PHP
<p>this is a simple question so I wanted a simple answer. I want to check user input in the textbox.. if the first character is a 0 (zero), it will be replaced with +63. But it should not replace all the zeroes in the "string". I had search through sites but most are about replacing all of the occurrences. I am hoping ...
php
[2]
3,060,295
3,060,296
web.config forms authentication, cookiename
<p>I have a web.config with the following: </p> <pre><code> &lt;system.web&gt; &lt;customErrors mode="Off"/&gt; &lt;authentication mode="Forms"&gt; &lt;forms loginUrl="Login.aspx" name="SIPE_ASPXAUTH"&gt; &lt;credentials passwordFormat="Clear"&gt; &lt;user name="user1" password="123456"/&gt; &lt;use...
asp.net
[9]
2,299,201
2,299,202
signature widget (painter) does it exists in android?
<p>I want an widget that one can sign on it on the tocuh screen its ambivalent to painter so is there a way using the painter in my application?... thanx</p> <p>i want it too fit the 2.1 version does it exist ?</p>
android
[4]
5,624,563
5,624,564
how to retrieve the name of checkbox if using dynamic name like this<input type="checkbox" name="<%=i%>" /> in servlet?
<p>if provide the dynamic name to the check box and i want to retrieve name of it in servlet for using its value.. </p>
java
[1]
1,635,155
1,635,156
Should hardcoded data in a function be static?
<p>When I have hardcoded data in a function I could just initialize the variable normally:</p> <pre><code>function check_country() { $countries = array( 'aa', 'ab', 'ae', ... ); } </code></pre> <p>Will PHP just make <code>$countries</code> <em>point</em> to the literal data in memory or will it <...
php
[2]
5,461,499
5,461,500
what's the best way to remove element(s) i inserted with after()
<p>when I click a button, i appended (inserted) after it a div with new div, and i donot want to give id to the new div, because i want this function could be use by other button/anchor/etc.</p> <pre><code>$("#buttonA").click(function(){ $("#div1").after("&lt;div&gt;bla bla bla&lt;/div&gt;"); }); </code></pre> <p>and...
jquery
[5]
3,701,601
3,701,602
Delay ajax call on key input in jQuery
<p>I am building an auto-complete like script for text inputs. In order to avoid multiple unnecessary ajax calls, I would like to initiate ajax calls only after the user stopped typing text for 1 second. That way I will save some overhead calls for every key pressed. How can I achieve this using jQuery?</p> <p>Thanks,...
jquery
[5]
5,189,781
5,189,782
PHP filter() function - why?
<p>Why would I want to use PHP's <a href="http://www.php.net/filter" rel="nofollow">filter</a> library? Why wouldn't I?</p> <p>It seems to try and do a bit of clean-up (it's awful when you have to work with regular expressions), but on the other hand function naming and parameter constants seem to be a disaster, if yo...
php
[2]
449,910
449,911
How to implement a singleton per element?
<p><strong>Overview</strong></p> <p>Here is my Message Object. I only want one object allowed per element. The element noted in the comments. </p> <p>As the user sees it, there should be only one message per element. If the user keeps clicking a button for example I don't want to re-instantiate more messages. On...
javascript
[3]
5,629,613
5,629,614
Creating command line switches in python
<p>For example, sqlmap uses <code>python sqlmap.py -h</code>.</p> <p>This command above lists all available switches in sqlmap, and <code>-h</code> is a switch itself.</p> <p>When you are creating a python tool for use in terminal, what is the basic method to create a switch?</p> <p>A hello world example would be mo...
python
[7]
1,246,536
1,246,537
I wanted to delete the open?
<p>I did some sample articles, and are added to my case, and then want to delete. The delete does not work! Does anyone know why this happens?</p> <p><a href="http://jsfiddle.net/8YP94/1/" rel="nofollow">http://jsfiddle.net/8YP94/1/</a></p>
javascript
[3]
5,054,004
5,054,005
How to record audio or video in a browser and store it in my server's database?
<p>I need to record audio from a user and store it in my local server's database. I tried this, but it didn't work.</p> <pre><code>&lt;html&gt; &lt;head&gt;&lt;/head&gt; &lt;body&gt; &lt;?php if(isset($_POST[submit1])) { echo exec("ffmpeg -f alsa -ac 2 -i pulse -acodec pcm_s16le -vcodec libx264 -vpre lossless_u...
php
[2]
3,004,781
3,004,782
Can somebody tell me where is the size coming from。
<p>I'm a beginner of C++. Now I got a little puzzled with the code below. I know there should be a delete operator with which I'm not concerned in somewhere. I just wondering , wow , it worked. Where is the argument "size" coming from?</p> <pre><code>#include&lt;iostream&gt; #include&lt;string&gt; class Base { public...
c++
[6]
1,786,568
1,786,569
Difference between making a button implementation in class or a final inside the onCreate()?
<p>So usually in guides when making a holder for a View let's say Button, I usually see it on the onCreate method like this:</p> <pre><code>public class className extends Activiy{ public void onCreate(){ final Button button = (Button) findViewById(r.something.something); } } </code></pre> <p>Well I was wonder...
android
[4]
5,420,682
5,420,683
How does java program access operating System functions?
<p>How does java program access operating System functions? Is that using JNI ?</p>
java
[1]
4,373,069
4,373,070
Store plus and minus in a variable PHP
<p>How can I solve this problem:</p> <pre><code>if ($variable == 1) { $math = "-"; } else { $math = "+"; } $numberOne = 10; $numberTwo = 10; $result = $numberOne $math $numberTwo; </code></pre> <p>This doesn´t work, is there any way to solve this?</p>
php
[2]
4,261,013
4,261,014
How to convert HEX data into BINARY data?
<p>I am trying to send Binary data using python raw socket. For that i will do following.</p> <pre><code>s = '\x01\x00\x12\x59' # some binary data sock.send(s) # assuming "sock" is a valid, open socket object </code></pre> <p>i have created a DATAGRAM in HEX in by sniffing a network traffic with wireshark.W...
python
[7]
3,639,001
3,639,002
variable scope in asynchronous function
<p>I've built the function to return some variable. But my function uses another function asynchronously.</p> <pre><code>function getVariable() { var myVariable; asyncronousFunction(function(...){ myVariable = ... }); return myVariable; } </code></pre> <p>The problem is that <code>myVariable</code> outs...
javascript
[3]
5,050,532
5,050,533
How to unbox an array of string?
<p>Suppose I have an array of string boxed to an object:</p> <pre><code>string[] files = Directory.GetFiles(path); object obj = files; </code></pre> <p>How can I unboxed the <code>files</code> into array of string again?</p>
c#
[0]
4,366,283
4,366,284
How to reboot android device?
<p>I am facing a problem. I just want to reboot the device just after the installation package has installed on the device. How can i do this? Is there any way to do this?</p> <p>please help me.</p> <p>BR, gsmaker</p>
android
[4]
3,932,176
3,932,177
Function getResourceAsStream returns null while getResource returns a URL
<p>I encountered very strange problem, I hope you will be able to help me: I run the following line:</p> <pre><code>InputStream stream = this.getClass().getClassLoader().getResourceAsStream(SOME_PATH); </code></pre> <p>And it works. Then, I create a new class loader that points to the same file, and then </p> <pre><...
java
[1]
3,496,737
3,496,738
Can you offer prizes, cash and/or products, to say the person w/highest score on an iphone game app?
<p>Does apple allow that? I remember a $30K contest that a team from MIT ended up winning. I think it had to do with locating red balloons on a GPS that were scattered all over the world. Something like that.</p>
iphone
[8]