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
5,256,629
5,256,630
BroadcastReceiver + SMS_RECEIVED
<p>I'd like my app to catch incoming SMS messages. There are a few examples of this around. Looks like we just need to do this:</p> <pre><code>// AndroidManifest.xml &lt;receiver android:name=".SMSReceiver"&gt; &lt;intent-filter&gt; &lt;action android:name="android.provider.Telephony.SMS_RECEIVED" /&gt; &lt...
android
[4]
4,495,981
4,495,982
JavaScript problem: getElementsByName() doesn't work for me
<p>Just trying to alert the value entered in the phone field, but it alerts undefined:</p> <pre><code>&lt;script type="text/javascript"&gt; function foo() { alert(document.getElementsByName("phone").value); return false; } &lt;/script&gt; &lt;form action="foo.php" method="post" onsubmit="return foo()"&gt; ...
javascript
[3]
3,816,302
3,816,303
Z-order-curve coordinates
<p>How could i access data which is being stored using Z-order with O(1) time complexity in array? I need fast access to each of element by their coordinates. I there any faster way to access this data than using while to shift bits?</p> <p>One way would be using lookup tables (i have static size of data)</p> <p><str...
c++
[6]
5,580,440
5,580,441
Login system with shopping cart
<p>For exmaple, we've got site that sells car's wheels. I'm not registered there and add wheel to shopping cart (it's stored in <code>cookie</code>). After I login, I get this wheel in my account shopping list. </p> <p>What seems wrong: what if someone else has added another wheel from my computer and I'll get it in ...
php
[2]
3,460,193
3,460,194
what are all the web application present which is similar to jquery?
<p>Hi I am looking for some web application which is similar to jquery is there any</p>
jquery
[5]
4,343,004
4,343,005
Monitoring Android activity life-cycle callbacks
<p>I want to be able to launch an arbitrary app from a program (e.g. by executing the command "am start ", then have the program be notified in some way when the life-cycle callbacks (e.g. onStart, onStop) in the app's activity are called.</p> <p>The problem is that I can not rely on having the app's source code, so c...
android
[4]
2,929,422
2,929,423
Android SDK and fresh install
<p>I'm looking into buying an Android phone and I'd like to do some development on it as well. Is it possible to perform a fresh clean install on any Android device via the SDK? In other words, is it possible to remove the preloaded OS (i.e. with additional provider software) and install the standard Android OS?</p> <...
android
[4]
3,956,050
3,956,051
How to create dynamic text?
<p>What i have to do to display text dynamic?</p> <p><code>Some text [-]</code> to go <code>Some text [|]</code> and then back to <code>Some text [-]</code>.</p> <p>Is there a way to do this without clearing whole screen?</p>
python
[7]
2,693,319
2,693,320
How to remove last character from a string inside a loop
<p>I am trying to print the different category's selected in a single line in xml, like</p> <pre><code>&lt;cat_name&gt;meeting, food and drinks, sports&lt;/cat_name&gt; </code></pre> <p>The output I am getting:</p> <pre><code>&lt;cat_name&gt;meeting, food and drinks, sports,&lt;/cat_name&gt; </code></pre> <p>I wan...
php
[2]
4,893,269
4,893,270
Get traveled distance using GPS
<p>I would like to track my traveled distance with my car. It would start recording when my speed would be greater than 0 in KM/H</p> <p>I got my speed with this code : speed = location.getSpeed() * 3.6;</p> <p>Would like to do this:</p> <p>if (speed > 0) //track my distance.</p> <p>I only found how to calcul...
android
[4]
3,494,388
3,494,389
Linking installed apps to android market
<p>How to link manually installed apps to android market?<br> <a href="https://play.google.com/store/apps/details?id=com.keramidas.TitaniumBackupPro" rel="nofollow">Titanium Backup Pro</a> and <a href="https://play.google.com/store/apps/details?id=com.rerware.android.MyBackupPro" rel="nofollow">MyBackup Pro</a> provide...
android
[4]
5,685,700
5,685,701
Java - Count number of symbols in string
<p>Let's say I have this string:</p> <pre><code>String helloWorld = "One,Two,Three,Four!"; </code></pre> <p>How can I make it so it counts the number of commas in <code>String helloWorld</code>?</p>
java
[1]
2,784,927
2,784,928
Javascript: separate place values of a number
<p>I want a function that can take a number (say 1000.43) and return the tens, hundreds, thousands, and decimal part. So in 1000.43, it would maybe return an array with <code>[1000, 0, 0, .43]</code>. I know it sounds hard but how would I do that. Maybe you can give me some advice on how to do that or can supply me wit...
javascript
[3]
933,393
933,394
Pass name of global var to function that alters var?
<p>I encountered a strange problem today. </p> <p>The good: I successfully changed a global var value from within a function(in other words the below example works fine when "passedVarName" is substituted with "a").</p> <p>The bad: When trying to pass the global var name "a" (rather than putting it directly in the fu...
javascript
[3]
1,041,333
1,041,334
How to know which button was pressed on Android application download window
<p>Is there a way to know programmatically which button the user pressed (Install or Cancel) on android application download/install window? I had some luck finding information how to know if aplication was installed but no success if cancel button was pressed.</p>
android
[4]
2,171,972
2,171,973
Start a .py file in windows command line
<p>Here is my situation:</p> <pre><code>D:\Python27\python.exe D:\Python27\search\file.py </code></pre> <p>But <code>file.py</code> takes some arguments to start</p> <pre><code>file.py -a searchFunction=dfs </code></pre> <p>How can I open this file?</p>
python
[7]
6,008,770
6,008,771
how to break a large image into 8 equal parts in android
<p><br> i just want to break a large image into some equal parts like 4, 6 or 8. can we do it? actually i want to store every parts of image as a separate image in my drawable folder for future use.</p> <p>can any one help me?</p> <p>Thanks in advance sunit</p>
android
[4]
5,630,088
5,630,089
Creating prepopulated set in Java
<p>In Java, how do I create a final Set that's populated at construction? I want to do something like the following:</p> <pre><code>static final Set&lt;Integer&gt; NECESSARY_PERMISSIONS = new HashSet&lt;Integer&gt;([1,2,3,6]); </code></pre> <p>but I don't know the proper syntax in Java.</p>
java
[1]
4,027,494
4,027,495
How to add a button widget to a rectangle canvas in Android?
<p>Hi, I want to develop a form on a rectangle. </p> <p>I have designed a rectangle using a bitmap and an image, but how do I add edit texts and buttons onto that? </p> <p>Please provide some good guidelines.</p>
android
[4]
2,037,790
2,037,791
How can i provide multi language and multi currency facility to my php Project?
<p>I need to provide <strong>multi language</strong> and <strong>multi currency</strong> facility to my project. My team don't want to use Google language converter. How can i achieve this task. My project is related to hotel bookings and i'm developing this project using php. Please help me.</p>
php
[2]
4,151,762
4,151,763
Example code that handles the full game lifecyle properly
<p>I am attempting to write an android game involving a class which extends SurfaceView and implements SurfaceHolder.CallBack. The class then creates its own thread which may need to be paused/unpaused appropriately. I wanted to use the example Lunar Landeras a reference, but this seems not to implement all sorts of es...
android
[4]
3,321,393
3,321,394
Battery level for playing video in android
<p>At which battery level video cannot played by videoview in android?</p> <p>The level which is received by broadcast from</p> <pre><code>Intent.ACTION_BATTERY_CHANGED </code></pre> <p>This intent will return battery level like 1,2....</p> <p>Thanks in advance</p>
android
[4]
750,021
750,022
In Android, how to have bi-directional scroll AND show both scroll bars?
<p>It seems that Android ScrollView does not support bi-directional scroll. Although, a HorizontalScrollView can be placed inside a ScrollView, which effectively provides bi-directional scrolling (as below). </p> <p>However, the horizontal scrollbar is now "at the bottom of" the vertical scroll view. So, if I scroll...
android
[4]
3,351,257
3,351,258
how to Access individual characters in a textbox in javascript?
<pre><code>&lt;script type="text/javascript"&gt; function change() { var a = $("#bb").text(); /// bb-&gt; textbox id b = a.substr(0, 1); alert(b); } &lt;/script&gt; </code></pre>
javascript
[3]
2,720,079
2,720,080
How to move a image using buttons(up,down,left ,right)
<p>Hi I have app where i can move the image left,right,up,bottom.i have created four buttons and implemented onclick listener on four buttons now i don't know code how move the image.When i click on left button it should move towards left and click on right it should towards right.can any one help please help me </p>
android
[4]
1,185,717
1,185,718
How to implement int in/out params in java
<p>Apologies for asking such a primitive question. </p> <p>I wrote a function which took one parameter; this parameter was supposed to be an in/out parameter. </p> <p>After debugging, I realized, since there are no explicit reference types in java, I should probably use Integer object (instead of int primitive) as th...
java
[1]
5,056,319
5,056,320
How to append to the dictionary?
<p>I have a dictionary defined.</p> <pre><code>Dictionary&lt;string, string&gt; dataSource; </code></pre> <p>There is a function defined in such a way that this Dictionary will get filled atleast ones.</p> <pre><code>dataSource = l2ListText .Zip(l2ListValue, (lText, lValue) =&gt; new { lText, lValue }) ...
c#
[0]
4,475,725
4,475,726
C# static vs instance methods
<p>I'm risking it this might be a newb question but here goes. I'm tempted to add a method to a class that could possible have thousands and thousands of instances in memory at a given time. Now, the other option is creating a static class with a static method, and just create the [static] method there, instead of an i...
c#
[0]
1,197,372
1,197,373
Provisioning profiles handling in Xcode 4
<p>I have : adhoc_myApp.mobileprovision, i would like to submit my .ipa with mail to the tester. I have done like this : Product/ Archive, and i have got the error :</p> <pre><code>Code Sign error: The identity 'iPhone Distribution' doesn't match any identity in any profile </code></pre> <ol> <li><p>i think that, i s...
iphone
[8]
1,122,750
1,122,751
When to load an image to use the Javascript function drawImage()?
<p>I would like to use the drawImage() function to load an image in a Javascript animation, but the image does not load with my current code. I think I need to specifically ask for the image to be loaded at some point, but I'm not sure when or how. The idea is to make a cloud that goes across the canvas. Thank you fo...
javascript
[3]
3,992,875
3,992,876
Why can't I cast to B*?
<p>I'm trying to cast to B* using operators but it's not working. Why? Thanks.</p> <pre><code>struct B; struct A { A() = default; operator (B *)() { return new B(); } }; struct B { B() = default; }; int main() { A a; B *b = a; } </code></pre> <p>I get the error: <code>cannot convert...
c++
[6]
501,044
501,045
about activities in android
<p>please give me the solution</p> <pre><code>public class Calc extends Activity implements OnClickListener { private Button clr; clr=(Button)findViewById(R.id.Button01); } public void onClick(View v) { case R.id.Button01: tv1.setText("REF"); if( ref_flg==true) ...
android
[4]
279,236
279,237
Can't access HyperLinkField text in a GridView
<p>I have a HyperLinkField defined as follows:</p> <pre><code>&lt;asp:GridView ID="gvNotifications" runat="Server" AutoGenerateColumns="false" EnableViewState="true" CssClass="tableWhole" AlternatingRowStyle-CssClass="tableAlt"&gt; &lt;Columns&gt; &lt;asp:HyperLinkField HeaderText="Item#" DataTextField="sku" ...
asp.net
[9]
5,631,030
5,631,031
best method of processing dynamic amount of _POST or _GET variables
<p>I am building a simple scheduling program for week long scheduling: Sunday - Saturday.</p> <p>Under each day when the schedule is saved there will be a variable amount of employees working and the data for their shift and job code.</p> <p>For example:</p> <p>Sunday: Bob - Kitchen - Opening Shift Sam - Kitchen - C...
php
[2]
5,144,276
5,144,277
How to invoke a method at runtime from a jar file
<p>I have multiple jar files at a specific location.Based on some calculation ,i need to load different jar files and invoke a certain method inside the jar. The jar file contains methods that act as a client to web services. When i invoke the method using reflection, it throws an error Wrapper class not found.Have y...
java
[1]
480,103
480,104
Running a line in 1 hour intervals in python
<p>I'm trying to create a espeak based talking clock completely in python</p> <p>I want to know how to run</p> <pre><code>spk.speak('It is now &lt;time&gt;') </code></pre> <p>Each time the system hits time's like 12:00 1:00 etc</p>
python
[7]
3,688,705
3,688,706
How to add custom message box
<p>I am new to the iPhone. After running my application if I click a menu button I would like it to display About or Help, just like an alert message. If they select the about it will open the a webpage. When help is selected it will display some text. </p>
iphone
[8]
399,215
399,216
php, how to calculate the sum from an while loop?
<p>i have a while loop that returns some values:</p> <pre><code>while ($get_keywords3 = mysql_fetch_array($keywords2)){ ?&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="margin: 0 3px;"&gt;&lt;?php echo $get_keywords3['grand_total'];?&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php } </code></pre> <p>this returns back:<...
php
[2]
3,908,029
3,908,030
Need Solution to reduce object creation, used spring - but have a problem , method explained in detail
<p>I am using spring to reduce new objects creation, for the number of resultset available, I will create a row object inside and add the row object in a rowset object, which maintains a list of rows.</p> <p>My code goes like this.</p> <pre><code> while(rs.next()) { Row r = new Row(); //Logic rowset.addRow(r...
java
[1]
4,905,575
4,905,576
how to read pdf and doc file from asset into webview in android?
<pre><code>File file=new File("file:///android_asset"+filename); if (file.exists()) { Uri targetUri = Uri.fromFile(file); Intent intent1 = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(targetUri, "application/pdf"); try { startActivity(intent1); }...
android
[4]
1,034,206
1,034,207
how does SCListener work?
<p>How would I go about using Stephen Celis' fantastic SCListener singleton? </p> <p>(<a href="http://stephencelis.com/2009/03/02/now-i-just-need-an-audience.html" rel="nofollow">http://stephencelis.com/2009/03/02/now-i-just-need-an-audience.html</a>)</p> <p>I would like to start with something incredibly simple.. li...
iphone
[8]
4,242,605
4,242,606
replace anything other than a-z,A-Z,0-9 or a space with nothing
<p>I am making a registration form. When a user is selecting a username I want jquery to replace anything other than <code>a-z,A-Z,0-9</code> or a space with nothing. </p> <p>So on keyup the form field with the id of username will only allow <code>a-z,A-Z,0-9</code> or a space and replace anything else with nothing ""...
jquery
[5]
3,323,961
3,323,962
Check if a program exists from a python script
<p>How do I check if a program exists from a python script?</p> <p>Let's say you want to check if <code>wget</code> or <code>curl</code> are available. We'll assume that they should be in path.</p> <p>It would be the best to see a multiplatform solution but for the moment, Linux is enough.</p> <p>Hints: </p> <ul> <...
python
[7]
1,000,128
1,000,129
Javascript weird syntax
<p>So I was programming some stuff in Javascript and some time later I saw I made a typo in the following piece of code:</p> <pre><code>(function() { var someEl = document.getElementById('id-of-some-el'),l &lt;----- someOtherEl = document.getElementById('some-other-el'); someEl.onclick = function(...
javascript
[3]
5,405,792
5,405,793
Java Signed Right Shift
<p>I have seen this in a java code.</p> <pre><code>int n = 300 //passed through a function size = (n + 31) &gt;&gt; 5 //size = 10 </code></pre> <p>what could be the significance of <code>5</code>? What is the significance of <code>31</code> //should something to do with int size (31 bit + 1 sign)</p> <p>Thanks</p>
java
[1]
1,958,297
1,958,298
How do I call a function using a function name generated from a string variable
<p>In the process of automating some code, I am looking to call upon a function based on what a string is. </p> <p>For example, I have a variable <code>$somevar</code> which is set to the string "This". Now I want to run a function <code>doThis();</code></p> <p>So, I was hoping I could write <code>do.$somevar($var,...
php
[2]
552,077
552,078
Replacing carets in Javascript
<p>I'm trying to replace multiple carets (^) in a string with spaces in Javascript. Following the w3schools entry on replace(), I used this code:</p> <pre><code>var str = "Salt^Lake^City, UT"; var result = str.replace(/^/g, " "); </code></pre> <p>However, value of <code>result</code> is " Salt^Lake^City, UT". One car...
javascript
[3]
3,801,146
3,801,147
adding only odd numbers
<p>So the question I'm trying to solve the user is supposed to enter any positive number. Then I'm trying to write a program that adds only the odd numbers up to the number the user enters and displays the total. So for example if the user enters 4 my program should add four odd numbers. 1 + 3 + 5 + 7 = 16. <br/> The o...
java
[1]
3,171,206
3,171,207
copying and fading HTML over to another spot on the page on hover
<p>I am trying to copy the HTML from the title and description spans within each li into the info div below. Preferably appending h2 tags around the title whilst fading it in. If another li is hovered the current selection should fade out and the new one fade in...</p> <p>HTML</p> <pre><code> &lt;li&gt; &...
jquery
[5]
3,564,081
3,564,082
How to make a working img src from a local img src - PHP
<p>I am using cURL to get the img srcs of all the img tags used in a website. But the website has many names specified without host names, like:</p> <pre><code>&lt;img src="/images/look.jpg" /&gt; &lt;img src="i4.ytimg.com/vi/OmliBRZUxnk/maxresdefault.jpg?feature=og" title="youtube pic" /&gt; </code></pre> <p>So how ...
php
[2]
2,187,486
2,187,487
way to get exact below format of current date
<p>Is there any way to get exact below format of current date- 18 Aug 2010. I tried -</p> <pre><code> string dt = DateTime.Now.ToShortDateString().ToString(); dt = dt.Replace("-", " ");//return 18 Aug 10. </code></pre> <p>But I want the exact format: <code>18 Aug 2010</code></p> <p>Thanks</p>
c#
[0]
1,892,615
1,892,616
Call to undefined function recaptcha_get_html() How to fix?
<p>Hello all im getting the following error. I tried putting the files everywhere i can and no fix. is there something else i have to do to make this work? thanks here is the error</p> <pre><code>Fatal error: Call to undefined function recaptcha_get_html() in /home/folder/public_html/site/views/users/register.php on l...
php
[2]
22,522
22,523
Creating Local Android Service
<p>I created a local android service. When user selects the start button then a service is started and an inner class which extends from Activity and implements the runnable and SensorEventListener is created.</p> <p>I would like to get the x,y,z coordinates of the mobile device before and after the device is locked (...
android
[4]
3,917,681
3,917,682
iOS 4 - How to add table view to a tab bar application
<p>I am new to iPhone programming and am having a really hard time trying to figure out how to add a table view to a tab bar application. There are not many tutorials on this for iOS SDK 4 and the Apple documentation is very light on details. Since I am new I would really like some tutorial that has screenshots (or at ...
iphone
[8]
565,558
565,559
Find and replace a word in several text files with Java?
<p>How can I find and replace a word in several text files, using Java?</p> <p>Here's how I do it for a single <code>String</code>...</p> <pre><code>public class ReplaceAll { public static void main(String[] args) { String str = "We want replace replace word from this string"; str = str.replace...
java
[1]
3,825,175
3,825,176
can't use javaScript setInterval method
<p>i cant use setInterval mehod, i don't know why. what's wrong with this script, after clicking on stop it doesn't show the result of counter i in the text field.</p> <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" conten...
javascript
[3]
5,576,955
5,576,956
Instantiating classes with identical properties and methods
<p>I have 2 classes that manage the operation of 2 different brands of net cam, each have exactly the same public members, but very different private members. One or the other of them is docked inside of a Pane class ( which type is decided at run time). The Pane class provides additional display functionality plus con...
c#
[0]
1,530,284
1,530,285
How to Create 2D list View
<p>hi <br> I am writing an Android App, in which I need to display a List, Clicking on any list item should show another list besides that list item. Can anyone help me how can this be implemented in Android.</p> <p>Thanks in Advancem</p>
android
[4]
4,114,793
4,114,794
int (*p) [4]?
<pre><code>int (*p) [4] ; </code></pre> <p>Is "p" pointer to array of 4 integers ?? or what ?? </p> <p>and How can I call "new" for this pointer ?? </p>
c++
[6]
4,219,648
4,219,649
Defining constant as function result in header = bad idea?
<p>In a widely used include file in one of our projects we have these convenience constants:</p> <pre><code>const double kPi = asin(1.0) * 2.0; const double kPiHalf = asin(1.0); const double kDeg2Rad = asin(1.0) / 90.0; const double kRad2Deg = 90.0 / asin(1.0); </code></pre> <p>Is it a bad idea to use funct...
c++
[6]
2,491,939
2,491,940
Javascript accessing methods with brackets?
<p>I saw this in some code:</p> <p><code>var _0xdf50x7 = document['createElement']('form');</code></p> <p>How does this work? Does this mean that an object's methods can be accessed like the elements of an array?</p>
javascript
[3]
418,297
418,298
Inserting audio clips into an android app
<p>I plan on making an app for a church, and it's pretty much a relatively simple one, it's just going to have a menu in the main xml which will contain an about section contact and a clips section. now when the user clicks on clips they will be redirected to an xml file listing all the audio clips for the services of ...
android
[4]
632,957
632,958
jQuery custom function throwing error when no selected elements exist
<p>I have a custom function which disables text selection for the selected elements. The custom function is structured like this:</p> <pre><code>$.fn.DisableTextSelect = function() { return this.each(function() { // do things to 'this' element // ... }); }; </code></pre> <p>I call it like this, for exampl...
jquery
[5]
5,811,236
5,811,237
run php script automatically
<p>i have a php script that should be run automatically every day. as the php script is run on a request,how can i do it? is there any way else using cronjob task?</p>
php
[2]
4,577,450
4,577,451
using ternary operator in javascript to invoke two functions?
<p>So can this be done in Javascript?</p> <pre><code>type == 1 ? function1() : function2(); </code></pre>
javascript
[3]
3,333,212
3,333,213
c# can't close application
<p>I'm developing a c# application and when the user clicks on the X the application gets minimized inside a trayicon. Like so:</p> <pre><code>private void frmChat_FormClosing(object sender, FormClosingEventArgs e) { e.Cancel = true; Hide(); } </code></pre> <p>The application i...
c#
[0]
2,340,184
2,340,185
Create instance of class or superclass from generic type
<p>I'm new in Java. I'm developing program for Android similar to app for iOS. One of the purposes of app - is get data from server. Data often is <strong>array</strong> with <strong>dictionaries</strong> like "id = 1", "name = SomeName". I've class</p> <pre><code>class BaseArrayList&lt;Type extends BaseItem&gt; exte...
java
[1]
5,442,484
5,442,485
Only grab completed files
<p>I'm making a real simple "backend" (PHP5) for two flash/air-applications. One of them will upload a photo, the backend will save it to a folder, and the second app will poll the backend for new photo's and show them. </p> <p>I don't got any access to a database, so the backend has to be pure PHP5 and nothing more. ...
php
[2]
4,354,444
4,354,445
retrieve file line one by one using C#?
<p>I have a file name <strong>abc.txt</strong>. On that file have some lines like this:<br></p> <blockquote> <p>jani<br> 50,south carolina,USA<br> karim<br> 16,roam,Italy<br> fara<br> 52,sydny,Australia<br></p> </blockquote> <p>First line is name and second line is address. Now I need the info name on a string...
c#
[0]
795,343
795,344
No newlines in template file
<p>So i am writing an open source software written in PHP and i am going to use a template system. The templates will be stored on the hard drive.</p> <p>I tried this method, however all the html that is in the files gets displayed in just one line, while in the files itself it is on a few lines.</p> <p>Why is that?<...
php
[2]
3,600,427
3,600,428
how to explode array within array in php
<p>i have an array contain value like :</p> <pre><code>Check_Value ('level_codes', '1000', '1001','(1000,1002,1004)', 'DO ', '1')==1 </code></pre> <p>i want to get values and store into an other parametrs like :</p> <pre><code>$codes = level_codes; $first_value = 1000; $second_value = 1001; $list_values = (1000,1002...
php
[2]
2,507,503
2,507,504
How to select folder using ASP.NET
<p>i want select folder using asp.net , when i click browse button it will open file selection dialog. </p>
asp.net
[9]
4,607,079
4,607,080
jquery delete table row
<p>I have a table</p> <pre><code>&lt;table id="favoriteFoodTable"&gt; &lt;th&gt; Food Name: &lt;/th&gt; &lt;th&gt; Restaurant Name: &lt;/th&gt; &lt;th&gt; &lt;/th&gt; &lt;?php while ($row = $foods-&gt;fetch()) { ?&gt; &lt;tr&gt; &lt;td&gt; ...
jquery
[5]
5,428,334
5,428,335
Definition of ONE asp.net application?
<p>How do you define <strong>ONE</strong> asp.net application? Does it have to be built under one solution or does it have to be deployed under one application under IIS? </p> <p>Can multiple web projects be deployed under one IIS application (so that they have access to each other's session, cache etc) ?</p> <p>This...
asp.net
[9]
4,991,284
4,991,285
What is the proper selector on an thumbnail image using Jquery on nested DIVs in a gallery?
<p>When each image is clicked, the main image is supposed to change. I am having trouble accessing the correct selector. I have tried .parent and many different variations of the selector (i.e. img.redCarpet, redCarpet.img, etc.).</p> <h2>JQUERY</h2> <pre><code>$('img.redCarpet').click(function () { var src = $(...
jquery
[5]
5,949,054
5,949,055
jquery $.postMessage is not a function
<p>I have a site that is loading several versions of jQuery. Will that possibly cause the "is not a function" error?</p> <pre><code> TypeError: $.postMessage is not a function .postMessage( { if_height: $('body').outerHeight( true ) }, parent_url, parent ) </code></pre> <p>I know that I should not load several versio...
jquery
[5]
3,666,604
3,666,605
How to use CalendarContract class in API Level 8
<p>After the launch of android 4, <code>CalendarContract</code> class is introduce to write event in device calendar. But if i have created my app using API level 8 and Now i want to use this <code>CalendarContract</code> class in my project done using API level 8, because in API level 8 i have use undocumented API to ...
android
[4]
5,160,065
5,160,066
Send sms via usb 3g
<p><em>Hi all,</em></p> <p>I want to use usb 3G to send sms to a phone number every 30 minutes from a computer.</p> <p>How could i do that? Please somebody help me.</p> <p>Thanks very much !!!</p>
java
[1]
2,784,151
2,784,152
Getting a file from directory
<p>I have to develop a service in which my 1st task is </p> <p>->CSV files get put into a directory</p> <p>directory is in the form of \servername\DirectoryName\<em></em>.csv.</p> <p>can any one help me out how to do this because I am a absolute beginner in programming.</p>
c#
[0]
4,055,828
4,055,829
How to check if selected index of dropdownlist is not 0 or -1 using jquery
<p>How to check if selected index of dropdownlist is not 0 or -1 using jquery?</p>
jquery
[5]
4,061,072
4,061,073
Sorting div class with jQuery
<p>I created jQuery plugin to sort class with <code>class="apple"</code> and <code>class="tree"</code> but how do I create a sort with displaying all of the above <code>class="apple"</code> ?</p> <pre><code>&lt;ul&gt; &lt;li class="apple"&gt;APPLE&lt;/li&gt; &lt;li class="tree"&gt;TREE&lt;/li&gt; &lt;li class="a...
jquery
[5]
438,420
438,421
Pass parameter from 1 page to another using post method
<p>I have a page "Demo.aspx". I need to set some parameters using post method and redirect the page to "DemoTest.aspx".</p> <p>Is there any way to set parameters in post method in asp.net? I don't want to set "Querystring" due to security propose.</p> <p>Also I need server side code for this. I am not able to use "Ja...
asp.net
[9]
2,271,657
2,271,658
Compilation Error in g++ 4.3.4 compiler
<pre><code>#include &lt;iostream&gt; #include &lt;string.h&gt; char* basename(const char* filname); int main() { return 0; } char *basename(const char* filename) { char* base = (char *)filename; return base ; } </code></pre> <p>compiling on g++ 4.1.2 20070115 (SUSE 10): No issue</p> <p>compiling on g++ ...
c++
[6]
4,157,185
4,157,186
How to improve NSXMLParser performance
<p>I am developing an application where I use <code>NSXMLParser</code> to parse an XML file. At the moment this takes 8 seconds. But my requirement is to do the parsing within 5 seconds. How can I improve the performance of my parser?</p>
iphone
[8]
3,730,397
3,730,398
how to show gridview row in zoom
<p>work on asp.net vs05.i want to set mouse event on gridview</p> <p>Then based on the event type if event is mouseover it zoom the row else if the event is mouseout it changes the row’s zoom back to its original before the event occurred.</p> <p>if (e.Row.RowType == DataControlRowType.DataRow )</p> <pre><code>{ ...
javascript
[3]
936,067
936,068
How to get html tags?
<p>Say I have a text file like this:</p> <pre><code>&lt;html&gt;&lt;head&gt;Headline&lt;html&gt;&lt;head&gt;more words &lt;/script&gt;even more words&lt;/script&gt; &lt;html&gt;&lt;head&gt;Headline&lt;html&gt;&lt;head&gt;more words &lt;/script&gt;even more words&lt;/script&gt; </code></pre> <p>How would I get just th...
python
[7]
3,756,716
3,756,717
Do spaces/comments slow Javascript down?
<p>I was wondering, do whitespaces and comments slow down JavaScript? I'm doing a brute force attack which takes some time (30 seconds). Removing whitespaces does not show a significant growth in speed, but I think the browser just does have to parse more.</p> <p>So, is it of any use to remove unnecessary whitespaces ...
javascript
[3]
4,141,021
4,141,022
Select All Checkboxes On Click using Jquery
<p>I have following HTML:</p> <pre><code>&lt;label&gt;&lt;input type="checkbox" value="12" name="Cevent[]" /&gt; Yoga&lt;/label&gt; &lt;label&gt;&lt;input type="checkbox" value="12" name="Cevent[]" /&gt; Yoga 1&lt;/label&gt; &lt;label&gt;&lt;input type="checkbox" value="12" name="Cevent[]" /&gt; Yoga 2&lt;/label&gt; &...
jquery
[5]
4,583,542
4,583,543
Java new Date with time stamp in date format
<p>I have used the following </p> <pre><code>SimpleDateFormat df = new SimpleDateFormat("dd-mm-yyyy hh:mm:ss zzz"); Date date = new Date(); String formattedDate= df.format(date); Date dateWithTime = df.parse(formattedDate); </code></pre> <p>i got the formatted date as string when i conver this into date i got err...
java
[1]
3,336,979
3,336,980
Should in generic class fields be initialized to their default values using default(T) or...?
<blockquote> <p>With generics Default can be used to set a type parameter to its default value. This is clearly helpful given that a generic type does not know the actual placeholders up front and therefore cannot safely assume what the default value will be</p> </blockquote> <p>When should in a generic ...
c#
[0]
1,555,191
1,555,192
How to access iphone method from javascript/HTML5?
<p>I want to access a method written in objective C when I click any event in HTML5/javascript. I do not know javascript and HTML too much/ So please some one suggest me with some sample code and tutorial. thanx in advance.</p>
iphone
[8]
5,073,851
5,073,852
PHP Image not uploaded to website
<p>On my website I have 2 separate places for users to upload an image. The first works perfectly. The second doesn't. As far as I can see, they are exactly the same. To test, I used the same image on both, with it working on the first, but not the second. Here is the code from the non-working one:</p> <pre><code...
php
[2]
4,149,009
4,149,010
Lifecycle of a widget provider
<p>I am having hard time finding documentation on this. For the provider of an android widget, what is the life cycle of that particular provider object? I noticed that if I start off a async test then look for the object at a later time, it's gone. (by observation I can call onUpdate from onReceive, and I can tell t...
android
[4]
509,066
509,067
Decompiling of .apk files
<p>How to decode the .apk files, I followed <a href="http://dedexer.sourceforge.net/" rel="nofollow">http://dedexer.sourceforge.net/</a> but ddx.jar didnot produce any output file.</p>
android
[4]
2,445,734
2,445,735
How to display sqlite contents
<p>I'm not that experienced so I may have missed something obvious. What I am trying to achieve is a search feature for the database.</p> <p>The two methods I'm thinking of are either an edittext and a listview and everytime the edittext changed a query is run and the listview is updated. Or populating the listview wi...
android
[4]
3,619
3,620
Execute event when iphone application is not active
<p>I want a timer to keep executing in background even when the application is not active. And depending upon some conditions I want to fire a local push notification. How can I achieve this? </p> <p>Thanks Pankaj</p>
iphone
[8]
2,960,005
2,960,006
Is it "legal" for C++ runtime to call terminate() when the C++ code is used inside some non-C++ program?
<p>In certain cases - especially when an exception escapes a destructor during stack unwinding - C++ runtime calls <code>terminate()</code> which must do something reasonable post-mortem and then exit the program. When a question "why so harsh" arises the answer is usually "there's nothing more reasonable to do in suc...
c++
[6]
3,243,447
3,243,448
If statement doesn't seem to work correctly
<p>I may be doing it wrong but take a peek. If I hardcode the logic, it works but not if I try to use it as a variable.</p> <pre><code>if($range &lt;= 50) { $operator = "&lt;="; } else { $operator = "&gt;="; } foreach($cursor as $s) { $data = round($this-&gt;distance($zip_lat, $zip_lon, $s["lat"],$s["lon"...
php
[2]
3,596,841
3,596,842
What's the best way to set a path to an audio file to an id dynamically?
<p>What's the best way to set a path to an audio file to an id dynamically? And to have the app remember the newly set path for the future? (I guess we can't reset the xml files dynamically?) </p>
android
[4]
3,061,372
3,061,373
js get by tag name not working
<p>i want to resize all the images inside div test but its not working here the script and html</p> <pre><code>&lt;script type="text/javascript"&gt; function x(){ var yourdiv = document.getElementById('test'); var yourImg = decoument.getElementsByTagName('img'); yourImg.style.height = '400px'; ...
javascript
[3]