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,395,638
4,395,639
Fix a id in JQuery
<p>I am using JQuery for my application.. Having a doubt on how to add a id to my element tr.</p> <p>My code is </p> <pre><code> &lt;script type="text/javascript"&gt; $(document).ready(function(){ var tr = document.createElement('tr'); var td1=document.createElement('td'); ...
jquery
[5]
158,001
158,002
fade and replace images without a fixed size
<p>I need to make a slideshow on a client's website, and am having troubles getting it right. The div cannot be a fixed size because the images auto resize inside a div which is the full width of the page. I have working code that does it with JavaScript, but I need to fade the images as well. I've played with adding t...
javascript
[3]
4,412,501
4,412,502
Display a sentence, one character at a time
<p>I want to display a sentence one character at a time, one by one, with jQuery. Is there a plugin that can do this Or how could I get this effect?</p>
jquery
[5]
3,769,192
3,769,193
Most efficient way to remove an element from an array, then reduce the size of the array
<p>Say I have an array of 10 elements. Another part of my program determines I must remove the item at index 4. </p> <p>What is the most efficient method to remove the item and shorten the array? </p> <p>I wrote the following method, however it does not seem to work properly. Am I missing something, for example if ...
java
[1]
1,437,249
1,437,250
How to make a TextView Text vertical
<p>I want a vertical label for my app. Is there a property to make text vertical? Here's what I mean vertical label: </p> <pre><code>S t a c k o v e r f l o w </code></pre> <p>thanks ahead.</p>
android
[4]
491,571
491,572
javascript not showing image in imgsrc
<p>i am using javascript to change the value of img src at run time.. i am using fileupload in html to take the input from use and i want that image to be uploaded in the "Image1" image tag.. but it is not uploading the image.. i am using:</p> <pre><code> function upl(obj) { filen...
javascript
[3]
3,336,501
3,336,502
How many halfscreen images can I add to an animated UIImageView before performance would start to suck?
<p>Does anyone have experience with this? I didn't try because I have no appropriate imagery for this, right now. But I wonder if the iPod touch is capable of displaying a fluid, movie-like animation out of fullscreen images (300 x 270)? I fear performance would suck dramatically.</p>
iphone
[8]
4,414,116
4,414,117
Take photo automatically
<p>In my app I want to take photo automatically every several seconds, so I tried to startActivity using the google IMAGE_CAPTURE intent and inject some key events. But I cant find the way to intent keyevent to activity not written by me. Anyone can suggest any other method?</p> <p>Or else I have to write my own photo...
android
[4]
858,894
858,895
Benefits of JavaScript anonymous function with namespaces
<p>Is there any benefit when writing JavaScript classes and namespaces of this...</p> <pre><code>if(typeof MyNamespace === 'undefined'){ var MyNamespace = {}; } (function(){ MyNamespace.MyClass = function(){ this.property = 'foo' return this; } }()); </code></pre> <p>Versus just this...</p> <pre><code>...
javascript
[3]
5,380,771
5,380,772
Why does a method with the same name as the class not need a return type?
<p>Why is this legal?:</p> <pre><code>public class TwoFrames extends JFrame { public TwoFrames() { return; }; } </code></pre> <p>And this isn't (NetBeans IDE saying <strong>invalid method declaration; return type required</strong>)?:</p> <pre><code>public class TwoFrames extends JFrame { public f...
java
[1]
3,324,574
3,324,575
Bug in bassistance form validation
<p>I'm trying to use bassistance form validation plugin</p> <p>I want to use the code demonstrated in <a href="http://jquery.bassistance.de/validate/demo/custom-methods-demo.html" rel="nofollow">this demo</a>.</p> <p>In the first <code>textbox</code>, it shows error until i type 3-digit value, then it shows OK, the b...
jquery
[5]
237,414
237,415
Date.parse sends three extra zeroes when converting from utf-timecode
<p>I have a variable called</p> <pre><code>posts_object[i].updated_time </code></pre> <p>It's always an utf-timecode. It seems to always send three zeroes too much. A few examples:</p> <pre><code>Unix Date 1339705666000 · 2012-06-14T20:27:46+0000 1280403912000 · 2010-07-29T11:45:12+0000 1338635118000 · 20...
javascript
[3]
3,128,725
3,128,726
Is JS autocomplete diff from other functions?
<p>I have this code:</p> <pre><code>$("input#autocomplete").autocomplete({ source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"] }); </code></pre> <p>and it works. If I try to put anything else in there like:</p> <pre><code>$("input#autocomplete").autocomplete({ alert ("test"); source: [...
jquery
[5]
606,889
606,890
Rookie C# problem
<p>I am a rookie to C# and here is my question</p> <hr> <pre><code>class myClass { int start; int end; ....... } class program { public void main() { myClass[] a= new myClass[10]; for (int i = 1; i &lt; a.length; i++) { myClass b = new myClass(); a...
c#
[0]
1,616,794
1,616,795
Encode URL parameters using Java
<p>I want to encode part of URL paramter in JAVA</p> <pre><code>http://statebuild-dev.com/iit-title/size.xml?id=(102T OR 140T) </code></pre> <p>to </p> <pre><code>http://statebuild-dev.com/iit-title/size.xml?id=(102%20OR%20140) </code></pre> <p>have tried using URI to encode but it also encodes ? which I do not wan...
java
[1]
2,402,358
2,402,359
fingerprint reader
<p>i have a fingerprint reader device for pc but now i want to connect that fingerprint reader to my android mobile ?anyone help me which is the usb connector for this???</p>
android
[4]
2,454,037
2,454,038
Value stored to seconds during its initialization is never read
<pre><code>float seconds = audioPlayer.currentTime; if ((seconds = 11)){ [self performSelector:@selector(viewController) withObject:nil]; } else { if ((seconds = 23)){ [self performSelector:@selector(secondViewController) withObject:nil]; } else { } </code></pre> <p>Anyidea how to fix this messag...
iphone
[8]
924,471
924,472
Is the "X-Mailer: PHP/<phpversion>" header required to send a mail in PHP?
<p>A lot of examples I found online about sending emails with php set the header</p> <pre><code>"X-Mailer: PHP/" . phpversion() </code></pre> <p>But I find disclosing I'm using php and its version a very bad security practice.</p> <p>Is this a required header?</p>
php
[2]
934,263
934,264
Do If statements stop code after it being executed?
<p>I have an order form script with a function in which says if the job will take longer than x flash up a message. Script works fine if i leave my if statement out, but If i put it in it only executes if X variable meets the if condition, does this make sense? </p> <p>My Script is...</p> <pre><code>if (EstimatedCore...
javascript
[3]
4,525,907
4,525,908
Specifying startup window/form location on multiple displays
<p>I have two displays (two monitors) connected to my machine, and I noticed a strange thing happening today. I had an Explorer window open with my compiled exe on my primary display, and when I double-clicked it, it opened in the primary display (left monitor). However if I pressed enter to launch the executable, it s...
c#
[0]
1,796,670
1,796,671
Update Label text from XML
<p>I have an XML will is parsed and then fed to a bunch of Labels. </p> <p>I am trying to add a live element so that the labels refresh automatically from the XML.</p> <p>From what I've read this is possible using a tableView and [tableView reloadData] but the design dictates the use of labels. At the moment the labe...
iphone
[8]
5,401,141
5,401,142
How do I compare file's signature to a database of signatures?
<p>I have a database stored in memory of different files headers. I would like to test the signature of a given file for example a .jpg to those signatures in the database. </p> <p>Consider that scenario, the signature of the file to be tested is FFD8FFE0, but in the database, there is only a partially matched signat...
java
[1]
3,158,357
3,158,358
Where to store data used in different Android activities?
<p>In my application, I have one activity, which connects to the server and gets certain user information from it. Then, it launches another activity where that information should be processed.</p> <p>What is the correct way to pass data between activities in Android?</p>
android
[4]
5,966,550
5,966,551
Input fields won't allow some operators to be printed
<p>I have an input form which I use in order to post some data in the database, the issue is it won't allow me to post characters like "+", "&amp;" etc..</p> <p>Now I've used this format:</p> <pre><code>$postPagesashtepi = $_POST["postPagesashtepi"]; </code></pre> <p>The form looks like this:</p> <pre><code>&lt;inp...
php
[2]
1,260,280
1,260,281
C# Interfaces Question
<p>I'm trying to understand interfaces. </p> <p>From what I know about interfaces is that they are used along with classes and allows a class to be attached to an interface class? I don't quite understand the concept. When and why would I want to use this? I'm reading from a book it was to put behaviors into classes ...
c#
[0]
235,992
235,993
Java equals ordo value
<p>What is the Ordo for a java equals method? We dont know what type the objects that are being compared are. Does it make it a O(1) because its constant time for comparing object?</p> <p>example: X.equals(Y)</p>
java
[1]
5,200,142
5,200,143
How can I found a specific data in jpg image file by PHP
<p>I have a very much of jpg images, these images are copy of contract. and i need PHP script that can check these images if it had a fingerprint and stamp and barcode and image of person. Thanks in advance.</p>
php
[2]
1,758,532
1,758,533
UITextField lose focus event
<p>I have an UITextField in a MyCustomUIView class and when the UITextField loses focus, I'd like to hide the field and show something else in place.</p> <p>The delegate for the UITextField is set to MyCustomUIView via IB and I also have 'Did End On Exit' and 'Editing Did End' events pointing to an IBAction method wit...
iphone
[8]
5,572,518
5,572,519
Change Background Color with mouse Over reference by class JQuery
<p>I have given class to a group of div's and want to change the background color of a div on mouse over it. What I did is this : <br> <strong>HTML</strong></p> <pre><code>&lt;div class="menu_top"&gt; &lt;div id="1" class="menu_top_menu"&gt;Home&lt;/div&gt; &lt;div id="2" class="menu_top_menu"&gt;About Us&lt;/div&gt;...
jquery
[5]
3,238,727
3,238,728
c++ call a method from one class of other class
<p>I have two classes </p> <pre><code>Class A { char * param1; char * param2; void SetParam1(const char * ptr) { param1 = new char[strlen(ptr) + 1]; strcpy(param1,ptr); } void SetParam2(const char * ptr) { param2 = new char[strlen(ptr) + 1]; strcpy(param2,ptr); ...
c++
[6]
1,981,075
1,981,076
Javascript validation
<p>My issue is i need to validate the Card(Master, Visa, etc). In this i have to check different condition for different cards.. and i am using the following way to validate..</p> <pre><code>"CardNumber" : ["CardNumber", /^[51-55]{16}$/, true, "Please enter the valid card number."] </code></pre> <p>here i can check o...
javascript
[3]
4,414,692
4,414,693
Clear shared preference by hand
<p>I'm writing login capability using share preference. I use SharedPreferences.Editor::commit() to store username and password; read it from shared_prefs to check login. After logging in, I cd to /data/data/com.&lt; my_package >/shared_prefs/ and remove the "shared_prefs" folder. The problem is the application screen ...
android
[4]
5,609,876
5,609,877
Bookmarklet to populate form?
<p>I would like to create a bookmarklet that would take the current URL that the person is on and pass it to a form on another website. The form is a POST and cannot be converted to a GET. Sounds similar to: <a href="http://stackoverflow.com/questions/11024021/bookmarklet-to-pass-url-to-form-field">Bookmarklet to pass ...
javascript
[3]
5,462,463
5,462,464
Problem reading file from URL - permission denied
<p>I was trying to connect to some host like this</p> <pre><code> url = new URL(urlString); BufferedReader in = new BufferedReader( new InputStreamReader( url.openStream())); </code></pre> <p>but I always get MalformedExcep...
java
[1]
4,982,372
4,982,373
Why passing an integer matches an object method rather than premitive type method
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3674368/overload-resolution-and-virtual-methods">Overload resolution and virtual methods</a> </p> </blockquote> <p>If i call this , why object method is being called?</p> <pre><code>Classes.Class2 c = new Class...
c#
[0]
97,903
97,904
How to set the language as French of my android application?
<p>I have to change my application's language to French programmatically, so all texts a should be displayed in french.My app has set of activities and one background service so activity can registered with service and send and receive information from the server. Server will send data in French language so i need to d...
android
[4]
2,445,918
2,445,919
Get the URL of the file where is declared the function
<p>I can't find anything on the web. The keyword I used all give me more traditional answers.</p> <p>I am working on an embeder for a Flash file. I want to have a folder with the flash file and the javascript code to embed it properly.</p> <p>My question is, how do I get the path to my Flah file? I have the relative ...
javascript
[3]
1,696,552
1,696,553
check whether a $_POST exists and value
<p>i am trying to check if $_POST exists and check only for a specific value. in my code i am trying to check for data header=h1. the code works, it checks for data header but i do not know how to specify for value of header i.e check for header=h1</p> <pre><code>if ($_POST['data']['header']){ $myBuildPath...
php
[2]
3,926,325
3,926,326
how to implement color picker in java swing
<p>i have used JColorChooser but look and feel is not that much great, any other way to implement color picker using java swing</p>
java
[1]
1,033,035
1,033,036
What is the difference between INT, INT16, INT32 and INT64?
<p>I need to know about the difference of <code>INT</code>, <code>INT16</code>, <code>INT32</code> and <code>INT64</code> other than its size?</p>
c#
[0]
4,926,016
4,926,017
Function references - Please enlighten!
<p>Could anyone explain why the two below are not equal? I'm basically trying to figure out what's happening behind the scenes. My understanding was that they'd both refer to the same function but that doesn't seem to be the case.</p> <pre><code>var foo = function bar() {} typeof foo //"function" typeof bar //"func...
javascript
[3]
766,119
766,120
jQuery plugin for contextual menu
<p>Hello i need to have a fancy jQuery contextual menu for my web app; when the user clicks a point i would like to show a menu as a ballon or other graphical items with different options.</p> <p>Can anyone point me toward a similar example?</p> <p>Thanks and greetings c.</p>
jquery
[5]
4,033,854
4,033,855
asp.net - change column to hyperlink column
<p>I have the following column:</p> <pre><code> &lt;asp:BoundField DataField="ProID" HeaderStyle-BackColor="#0066cc" HeaderStyle-Font-Size="7pt" HeaderStyle-HorizontalAlign="center" HeaderText="ProID" ItemStyle-HorizontalAlign="center" /&gt; </code></pre> <p>How do I make this into a hyperlink column?...
asp.net
[9]
2,814,893
2,814,894
Application Variable Vs Web.Config Variable
<p>Which is better from a performance perspective?</p> <ul> <li>Accessing a Global Application Variable (Application["foo"])</li> </ul> <p>versus</p> <ul> <li>Accessing an AppSetting variable from the web.config</li> </ul> <p>Does .NET Cache the AppSetting variables so that it is not accessing the web.config file w...
asp.net
[9]
4,289,820
4,289,821
In javascript, alias namespace?
<p>In javascript, shouldn't I alias a namespace?</p> <p>In the <em>Naming</em> chapter of <em><a href="http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml?showone=Naming#Naming">Google JavaScript Style Guide</a></em>, it says:</p> <pre><code>//Do not alias namespaces. myapp.main = function() { var...
javascript
[3]
4,374,922
4,374,923
I want to get property value from code behind
<p>I have a case that I need to set the Text property for an asp label in the aspx page not from code behind. More exactly, I need to set a value to asp control in aspx page and this value is set by a property in the same page code behind.</p> <p>so I need to use an expression to do that like:</p> <pre><code>&lt;asp:...
asp.net
[9]
4,365,706
4,365,707
How do I get around uninitialized global variables in another module in Python?
<p>I have a problem where I'm trying to use a function from another module but that function calls a debug function which checks if a global variable has a certain attribute. This global variable is not set (otherwise set using <code>parser.parse_args</code>) when I import the function so the function complains that th...
python
[7]
844,347
844,348
Convert a ResultSet value into XML?
<p>Is it possible to convert the value of a ResultSet (result of a query execution) into XML??! If so which API would deal with this?!</p>
java
[1]
5,793,893
5,793,894
Best option to access youtube videos in android application?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/574195/android-youtube-app-play-video-intent">Android YouTube app Play Video Intent</a> </p> </blockquote> <p>I am going to implement the application which access the youtube video. Am new to android and kindly ...
android
[4]
95,382
95,383
GridView values not changing on value change of the combobox it is bound to
<p>I have two 2 dropdown lists D1 and D2 and a griview G1. D2 gets updated when selected value in D1 changes, through a postback. G1 gets updated when selected value in D2 changes.</p> <p>The problem is, Data in G1 gets refreshed only if I explicitely change the value in D2. When I change value in D1, D2 automaticall...
asp.net
[9]
4,690,240
4,690,241
Displaying loading image for a long time in jquery
<p>Hi I want to know is there any technique through which I can control the time for which the loading image using jquery can be displayed for a long time. For example:</p> <pre><code>$('#ajax').html('&lt;img src="ajax.gif"/&gt;'); $('#iframe').load('file.php'); </code></pre> <p>Now I want to know is there any way th...
jquery
[5]
3,097,525
3,097,526
startActivity and startSubActivity
<p>Can anyone tell me the Difference between startActivity and startActivityForResult</p> <p>is startActivity is used to call activity asynchronously and startActivityForResultfor synchronous call ? </p> <p>startActivity(intent) and startActivityForResult(intent,-1) are same ?</p>
android
[4]
62,930
62,931
How to possible user subscription in i-contact in android?
<p>I make user subscription in my android application.Also made this user subscription in php example at this link </p> <p><a href="http://www.softwareprojects.com/resources/programming/t-icontact-20-api-integration-php-example-1925.html" rel="nofollow">http://www.softwareprojects.com/resources/programming/t-icontact...
android
[4]
3,599,844
3,599,845
How to make two WORD to DWORD
<pre><code> short val1 = short.MaxValue; short val2 = short.MaxValue; int result = val1; result |= val2 &lt;&lt; 16; Console.WriteLine( "Result =\t" + result ); //2147450879 Console.WriteLine( "Expected =\t" + int.MaxValue ); //2147483647 </code></pre>
c#
[0]
1,502,511
1,502,512
Method-Chaining in C#
<p>I have actually no idea of what this is called in c#. But i want to add the functionallity to my class to add multiple items at the same time.</p> <pre><code>myObj.AddItem(mItem).AddItem(mItem2).AddItem(mItem3); </code></pre>
c#
[0]
360,954
360,955
Prevent a method from being called if it is incorrect using __getattr__
<p>I am trying to prevent an instance from throwing an exception if a method that does not exist for the instance is called. I have tried the following:</p> <pre><code>class myClass(object): def __init__(self): pass def __getattr__(self,name): print "Warning - method {0} does not exist for this...
python
[7]
5,288,763
5,288,764
how to add a Ymail/Gmail share button in android app?
<p>hi friends i have a custom list coming from server and i want to add two share buttons for Gmail and Ymail resp. in that , its like when i click the Ymail share button it asks for username and password and then redirects me into the compose message section with message body as the link of the respective list and the...
android
[4]
5,656,067
5,656,068
Is it possible to access UIBarButtonItem using tag?
<p>I hope to access UIBarButtonItem on an UIToolbar using tag. The codes show below</p> <pre><code>UIBarButtonItem *myBarButtonItem=(UIBarButtonItem*)myUIToolBar.items[i]; </code></pre> <p>but myBarButtonItem returns no object(0x0)</p>
iphone
[8]
4,869,388
4,869,389
jQuery: how to select the text in a text input
<p>I'm trying to create a button linked to a text field that will let me select all the text in a textarea so the user can copy it to the clipboard. I've tried this:</p> <pre><code>$('#selectCode').click(function() { var input = $('#MyTextBox'); input.focus(); input.select(); }); </code></pre> <p>base...
jquery
[5]
141,730
141,731
FIPS County Code Lookup
<p>I'm looking for a library, or some sort of method in Python to return a county name from a <a href="http://en.wikipedia.org/wiki/FIPS_county_code" rel="nofollow">county code</a> such as 48235 which is Irion County, TX.</p>
python
[7]
5,353,008
5,353,009
store image and audio file in android internal storage
<p>how to store image and audio files in android internal storage</p> <p>and how to retrieve back to display image imageview </p> <p>Thanks in advance</p> <p>Aswan </p>
android
[4]
4,065,337
4,065,338
Unlock without pressing hard key in android
<p>Can anybody know how to unlock a screen without pressing hard key..? or how to wake a screen without pressing hard key when phone is in locked state.</p> <p>Thanks in advance</p>
android
[4]
1,221,736
1,221,737
Javascript Date (Year)
<pre><code>&lt;script language="JavaScript"&gt; &lt;!-- Hide from older browser var x= new Date() var y= x.getYear() var m= x.getMonth()+1 // added +1 because javascript counts month from 0 var d= x.getDate() var h= x.getHours() var mi= x.getMinutes() var s= x.getSeconds() document.write("Today's date is: ") document....
javascript
[3]
4,877,699
4,877,700
import error while bundling using py2exe
<p>I bundled a small script written in python using py2exe. The script uses many packages and one of them is reportlab. After bundling using py2exe I tried to run the executable file and it is returning following error:</p> <pre><code>C:\Python26\dist&gt;DELchek.exe Traceback (most recent call last): File "DELchek....
python
[7]
4,552,335
4,552,336
Heap sizes for different Android devices
<p>Hi this question was asked a while ago, I'm wondering if the situation has changed.</p> <p>Is there a comprehensive list of (or any way to find out) the size of heap for various Android devices.</p> <p>I understand they range from 16mg to 48mg+. If you can't tell in advance is there anyway to tell from the market,...
android
[4]
5,234,853
5,234,854
Map actors and their movie onto a dictionary
<pre><code>def parse_actor_data(actor_data): while 1: line = actor_data.readline().strip() if line.count('-') &gt; 5: break actor_movie = {} values = [] actor_name = '' running_list = [] movie = [] for line in actor_data: position = line.find(')') ...
python
[7]
673,616
673,617
Starting an activity from a random class
<p>I've adapted the <code>GridInputProcessor</code>-class of the 3D-Gallery ( <a href="http://android.git.kernel.org/?p=platform/packages/apps/Gallery3D.git;a=blob;f=src/com/cooliris/media/GridInputProcessor.java;h=91dfd4783be6b21ec8ff2518a5c244752570e90d;hb=HEAD" rel="nofollow">http://android.git.kernel.org/?p=platfor...
android
[4]
1,519,503
1,519,504
How To switch between themes?
<p>I want to change CSS file due the user choice in select list :</p> <pre><code>&lt;select&gt; &lt;option&gt;light&lt;/option&gt; &lt;option&gt;dark&lt;/option&gt; &lt;/select&gt; </code></pre> <p>so when chosen light the css file will be light.css and when Dark so dark.css And save this coice in the cookies or what...
php
[2]
185,259
185,260
How To hide status bar and disable home button at the same time?
<p>I'm new here in this forum. And I have the same question with @MindWire at this following link.<a href="http://stackoverflow.com/questions/8422204/disable-home-button-and-have-application-full-screen-with-no-title-no-status-ba">The link</a></p> <p>I'm developing a screen lock on Android in a project.The question is...
android
[4]
525,153
525,154
Java Cloning - deep copy and shallow copy
<blockquote> <p><strong>Possible Duplicates:</strong><br> <a href="http://stackoverflow.com/questions/2657810/deep-copy-vs-shallow-copy">Deep copy vs Shallow Copy</a><br> <a href="http://stackoverflow.com/questions/1175620/in-java-what-is-a-shallow-copy">In Java, what is a shallow copy?</a><br> <a href="http://...
java
[1]
2,685,365
2,685,366
Finding File size in bit
<p>I need Exact size of File.</p> <p>is there anyway to find file size in bits (not byte).</p> <p>I do not want to find System.IO.FileInfo.Length and convert it to bits. Because this lose one byte information .</p>
c#
[0]
5,611,685
5,611,686
javascript odd syntax: c.name=i+ +new Date;
<p>colorbox v1.3.15 from colorpowered.com has this javascript in it's minified code:</p> <pre><code>c.name=i+ +new Date; </code></pre> <p>this seems to run perfectly, should it?</p>
javascript
[3]
2,698,136
2,698,137
jquery, is it possible to store information in a variable, rather than an input field?
<p>I want to store the current page number in a jquery variable, but I am not sure if it is possible, so I am storing it in an input field. Am I doing it the most efficient way?</p> <pre><code>&lt;input type='hidden' id='current_page' /&gt; $('#current_page').val(0); </code></pre> <p>if page is changed,</p> <pre...
jquery
[5]
1,314,224
1,314,225
Using mysql to query a table with a product code which is part of a filename
<p>I am trying to query a table which has a column called "filename".</p> <p>The actual filename is made up of "productcode-category.jpg"</p> <p>If i have the product code posted to a php page, how could i then take the value and search in the filename column where it equals the product code?</p> <p>It would be grea...
php
[2]
773,825
773,826
How to implement Registration module in android applications?
<p>I want to implement registration module in my android application. Can anyone please let me know the procedure. I mean, how can I use HttpRequestHandlerRegistry, SQLite connectivity etc</p> <p>Thanks in advance.</p> <p>Regards, serenity.</p>
android
[4]
416,789
416,790
convert std::wstring to const *char in c++
<p>How can i convert std::wstring to const *char in c++?</p>
c++
[6]
349,237
349,238
How to fall back if elements are missing for a certain index
<p>Is there a way to fall back to an empty value if there are no elements in a certain index of the array</p> <pre><code>foo_val = int(data_arr[3]) </code></pre> <p>IndexError: list index out of range</p>
python
[7]
2,024,740
2,024,741
Character counter for various textarea that are loaded dynamically, how to do it?
<p>I've found a javascript code that counts the characters on a textarea. <a href="http://edrackham.com/javascript/how-to-create-a-textarea-character-counter-limiter-using-jquery/" rel="nofollow" title="This is the code">This is the code</a>.</p> <p>My problem is that I'm doing a backend where the user can load variou...
jquery
[5]
3,584,121
3,584,122
How can I force Python to create a new variable / new scope inside a loop?
<p>Today I explored a <em>weird</em> behavior of Python. An example:</p> <pre><code>closures = [] for x in [1, 2, 3]: # store `x' in a "new" local variable var = x # store a closure which returns the value of `var' closures.append(lambda: var) for c in closures: print(c()) </code></pre> <p>The a...
python
[7]
2,607,669
2,607,670
How to hide the outer parents in Jquery
<p>Below is my code, my goal is when the user click the <code>&lt;a&gt;</code> which is in 'child_2', I want to hide $(this) class="parent". How can I achieve this? </p> <pre><code>&lt;div class="parent"&gt; &lt;div class="child_1"&gt; &lt;/div&gt; &lt;div class="child_2"&gt; &lt;div&gt; ...
jquery
[5]
5,078,398
5,078,399
Python doesn't show anything
<p>It's my first Python program and my first excercise is that I just need to swap places in a tuple:</p> <pre><code>stamboom = [("Frans","Eefje"), ("Klaar","Eefje"), ("Eefje","Mattho"), ("Eefje","Salammbo"), ("Gustave","Mattho"), ("Gustave","Salambo")] </code></pre> <p>Is the tuple, and I need to swap Fr...
python
[7]
1,238,143
1,238,144
file_get_contents prints text not sound
<p>I'm trying to get a sound file to be printed on a php page. I'm using the code below. I thought when I run this script it would have shown a sound file to download but it prints some text. What do you think I should do to fix this?</p> <pre><code>&lt;?php $mylanguage=$_GET["mylanguage"]; $soundtext=$_GET["soundtext...
php
[2]
1,862,564
1,862,565
Why do a lot of ASP.NET CMSs use individual pages, rather than one page with parameters?
<p>I've noticed a trend in blogs, online newspapers written in ASP.NET, where rather than having one page serve content (something like <code>/Article.aspx?ID=foo-bar</code>), a new (physical) page serves one article (eg <code>/Articles/Foo-bar.aspx</code>). It looks unnecessarily complicated, especially if an article ...
asp.net
[9]
1,052,085
1,052,086
I want to create an inbox to retrieve all sms from the custom inbox and display in my app? I dont understand from where to start coding this?
<p>I am trying to develop a sms application in android. I'm done with sending and receiving sms . I want to create an inbox to retrieve all sms from the custom inbox and display in my app? I dont understand from where to start coding this? I have to continue with creating a lock for the application and an auto respond...
android
[4]
3,036,471
3,036,472
Setting up launch icon, but shows only android default
<p>I Have setted on my AndroidManifest on tag Application the attribute android:icon, but it's not working. I have added an image with name icon.png on folder drawable-hdpi,drawable-ldpi, drawable-mdpi, but it insists to show default android icon.</p> <p>What Am I doing wrong?</p> <p>Thanks</p> <p>My AndroidManifest...
android
[4]
4,373,360
4,373,361
android input problem
<p>I have an android problem which generates a pie chart. There are two files in my project, mainActivity and drawChart. In mainActivity I put all the variables and the algorithm in. In drawChart I put the onDraw function. For now I want to generate some input areas. The problems are, How should I generate the input? ...
android
[4]
5,354,129
5,354,130
python's glob only returning the first result
<p>I am really stumped on this one.</p> <p>I have a simple python wrapper which looks something like this:</p> <pre class="lang-py prettyprint-override"><code>import glob for found in glob.glob(filename): if not os.path.isdir(found): my_module.do_stuff(found) </code></pre> <p>where <code>filename</code> has b...
python
[7]
1,288,396
1,288,397
Restrict Duplicate entry in android listview
<p>my Android project is that i have made contact list into Spinner and after that i put one by one my contacts into Listview.i want that my spinner contact will not be repeated in the listview.i want to put some check point before to listview execute.what should i have to do?? PLEASE HELP ME </p>
android
[4]
2,191,393
2,191,394
error: ISO C forbids declaration of `test' with no type
<p>I'm learning C++ by myself and I ran into this problem. I wrote several lines of simple code just wanted to test "auto", and it seems that it no longer works. I pasted my code below:</p> <pre><code>#include &lt;iostream&gt; using namespace std; int main(int argc, char** argv) { auto test=1; return 0; } </co...
c++
[6]
2,250,932
2,250,933
iPhone, if possible to get a photo from album without use UIImagePickerController?
<p>as topic, I want iPhone app can access the photo album and got a photo but without popup the UIImagePickerController, does it possible ? </p> <p>thanks for tip </p>
iphone
[8]
4,624,752
4,624,753
What do I need jQuery for?
<p>What do you think of killing jQuery in the public facing WP site? Isn't it useless and making for slower page loading? What's the best way to get rid of it?</p>
jquery
[5]
4,929,271
4,929,272
how to store fetched data from database in session?
<pre><code> $data_query = mysql_query("Select id, reminder_name From user_reminder WHERE user_name= '".$_SESSION['user_name']."'") or die(mysql_error()); $_SESSION['table_name']= $reminder_name; </code></pre>
php
[2]
5,472,356
5,472,357
jquery hover triggering on element under absolute element
<p>Is it possible to have the jQuery hover event (or mouseenter or mouseover events) trigger on an element that is positioned under a fixed or absolutely positioned div that covers the triggering element? Hopefully this makes sense. Thanks in advance</p> <p><strong>EDIT</strong> This is the solution I came up with. ...
jquery
[5]
5,952,152
5,952,153
browsing of local server through iphone app
<p>can anyone help me to make the iphone app which can browse the files of the computer which is available on local network?</p>
iphone
[8]
296,634
296,635
Android switching between activities
<p>I currently have an activity called RaceActivity in my app which performs a setContentView() to display a surface view. Inside of my surface view I am checking to see if the user has won my game and when he/she has I would like to switch to another view that shows a simple game finished message. I have tried using:...
android
[4]
4,754,337
4,754,338
php fetchpage() function help, identifying image sizes from a url in php
<p>hey guys so im building an application and one of teh features it will have is the ability to show photo links from twitter inline sort of like what tweetdeck has done in their chrome browser version and sites like crowdreel have been able to do, i spent some time researching how to grab image tags from urls on goog...
php
[2]
5,189,663
5,189,664
date.timezone switch not found in php.ini file
<p>i have a problem with php.ini file.<br> i need to change current date and time in wamp server in local.<br> i know that for this should change <strong>date.timezone</strong> switch in <strong>php.ini</strong> file. i want change it like this that is my time zone location</p> <pre><code>date.timezone = "Asia/Tehran...
php
[2]
4,546,163
4,546,164
Strange rounding of numbers when reading in from text file C++
<p>I have a text line containing only the following lines. </p> <pre><code>0.01180994648909809 0.0118339243907452 0.01153905217670122 0.0376759911531237 0.03771224865527065 0.03765957194275842 </code></pre> <p>I used the following code to read this data and output it to terminal</p> <pre><code>using namespace std; ...
c++
[6]
158,931
158,932
Why static fields (not final) is restricted in inner class in java
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1953530/why-does-java-prohibit-static-fields-in-inner-classes">Why does Java prohibit static fields in inner classes?</a> </p> </blockquote> <p>I was going through the specification and got that it is not possib...
java
[1]
192,512
192,513
How to add or remove (if already exists) a key=>value pair to an array?
<p>I would like to do this with a single function.</p> <p>I have a key=>value pair:</p> <pre><code>14=&gt;1 </code></pre> <p>I have an array containing many such pairs:</p> <pre><code>array(15=&gt;2, 16=&gt;7, 4=&gt;9) </code></pre> <p>I want a function which will add the key=>value pair to the array in case it is...
php
[2]