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,199,483
4,199,484
Why does it throws error like this?
<p>I do import the data from Excel sheet to Sql database..everything is fine,when i run this code,my access engine could not find mt sheet,it throws like this error.. my error is</p> <blockquote> <p>The Microsoft Jet database engine could not find the object 'Sheet1$'. Make sure the object exists and that you spell...
asp.net
[9]
4,996,728
4,996,729
set sleep time in iphone app
<p>Can anyone suggest me how to set sleep time in iphone application? so that after that time iphone goes in sleep mode.</p> <p>Thanks in advance.</p>
iphone
[8]
3,768,017
3,768,018
Draw Path jquery with the following coords
<p>i have to draw a path, i get the following coordinats!</p> <p><a href="http://i.stack.imgur.com/h1Sw3.gif" rel="nofollow">http://i.stack.imgur.com/h1Sw3.gif</a></p> <p>i think s = startpoint, f = finishpoint. my problem are the attributes (ax, ay, bx and by)</p> <p>may someone could show me an example (with jquer...
jquery
[5]
845,314
845,315
Calculation of words, sentences and paragraphs from text entered by the user
<p>I need to write a program to take an entry 'essay' from the user. This essay can contain any characters (special characters, quotation marks, etc.). It then has to calculate the total number of words, sentences and paragraphs, and the total number of special characters. How should I go about doing this?</p>
c#
[0]
364,511
364,512
Is it possible to programmatically change the Default.png launch image?
<p>Is it possible to programmatically change the Default.png launch image?</p> <p>For example, could I replace it by an other image that fits better? My app has a tab bar and every tab has a very different screen, and I want to recover to that particular tab after a hard launch from scratch when the app got terminated...
iphone
[8]
2,174,338
2,174,339
disable text input history
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2530/how-do-you-disable-browser-autocomplete-on-web-form-field-input-tag">How do you disable browser Autocomplete on web form field / input tag?</a> </p> </blockquote> <p>I am building an application which will ...
php
[2]
4,306,141
4,306,142
how to obtain browser url in javascript from an iframe
<p>Whilst inside an iframe, can you please let me know how I can obtain main/parent window browser url using javascript?</p> <p>Thanks.</p>
javascript
[3]
4,047,489
4,047,490
To add a node at a particular place in tree view in C#
<p>I have a Tree view and has a project and there are so many files and folders in this project. I have a Tabcontrol also in this form. When I click a file which is in the project then it will be open in the tab control. So My problem is this when I SaveAs this open file and want to save in a another folder which is in...
c#
[0]
646,120
646,121
c# Compilation Error
<p>I'm doing image steganography and visual cryptography project using RSA algorithm. While compiling the project I'm getting these errors:</p> <blockquote> <p>ArgumentException was unhandled</p> </blockquote> <p>and also </p> <blockquote> <p>Empty path name is not legal</p> </blockquote> <p>This error shown in...
c#
[0]
2,512,153
2,512,154
Switch case - else condition
<pre><code>&lt;script type="text/javascript"&gt; //You will receive a different greeting based //on what day it is. Note that Sunday=0, //Monday=1, Tuesday=2, etc. var d=new Date(); var theDay=d.getDay(); switch (theDay) { case 5: document.write("Finally Friday"); break; case 6: document.write("Super Saturday");...
javascript
[3]
165,223
165,224
How to find substring of href with javascript
<p>I have the following output.</p> <pre><code>&lt;tr id='row_27' valign='top'&gt; ... ... &lt;td width="5%"&gt;&lt;a href="http://localhost/daikon2/index.php/projects/admin/delete_log/6/6/27" class="deleteme"&gt;&lt;img src="http://localhost/daikon2/assets/icons/delete.png" alt="delete" title="Delete Log" /&gt;&lt...
javascript
[3]
4,842,062
4,842,063
How can I loop through a list changing the list elements at each time step, adding or subtracting input values that are in the txt files?
<p>Why don´t I get the following result, in this order? [-2.0, -1.0, 0.0, 1.0, 2.0] [-1.0, 0.0, 1.0, 2.0, 3.0] [-2.0, -1.0, 0.0, 1.0, 2.0], instead i get the second list in the wrong place. Can I edit list elements in a more consistent way, considering this form of input data? My objective is to change a initial list (...
python
[7]
5,818,018
5,818,019
Preventing javascript generated clicks on link
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/6674669/in-jquery-how-can-i-tell-between-a-programatic-and-user-click">In Jquery, how can I tell between a programatic and user click?</a> </p> </blockquote> <p>Depending on the browser, there are several method...
javascript
[3]
3,012,397
3,012,398
What are the benefits of comma's compared to semicolons in jquery?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/694102/declaring-multiple-variables-in-javascript">Declaring Multiple Variables in JavaScript</a> </p> </blockquote> <p>I was setting some variables in jQuery and someone suggested I do it this way:</p> <pre><c...
jquery
[5]
5,579,174
5,579,175
Differences that may occur between Debug and Release builds?
<p>I was asked today in an interview to list four differences that <em>may</em> occur between debug and release builds. I suppose they meant differences in behavior and not differences such as debug information and whatnot. I was only able to name two:</p> <ol> <li>Debug builds are generally much slower due to some fu...
c++
[6]
2,852,244
2,852,245
Bind a label in array of labels
<p>I have an array of labels. I use these command lines to bind the Label's text to a column in my table, but it is not binding properly.</p> <p>Here is the applicable code:</p> <pre><code>Label[] LL = new Label[26]; for (int i = 0; i &lt; LL.Length; i++) { LL[i] = new Label(); LL[i].Text = null; } LL[0].Dat...
c#
[0]
5,923,195
5,923,196
Where to put containers of user defined types?
<p>Consider one has some user defined types, and containers of those types that are often manipulated because there are often multiple instances of those types on screen at a time.</p> <p>Currently I have a header with an associated source file and a namespace to hold these containers, but should I create a separate c...
c++
[6]
80,659
80,660
how to bring the control out of the sql statement once the where condition is met in C#
<pre><code> Stream stream = SystemStreams.Where(st =&gt; st.getName().Equals(s.OBJECT_NAME)) .Single(); </code></pre> <p>in the above query in C# even if my condition of where clause is met my program reads all the records. due to which its becoming really slow. Can anyone help?</p>
c#
[0]
389,449
389,450
How I can change time to users timezone with javascript?
<p>I'm trying to find out how to make function on javascript that takes time on UTC timezone and converts it to the users timezone. Can you guys help me out?</p>
javascript
[3]
5,708,387
5,708,388
how to go default calendar in android?
<p>I am making calendar based app and I am trying to go to my application to default calendar and also searching on internet but i can't it so is it possible to open default calendar using intent advance in thanks.</p>
android
[4]
3,843,900
3,843,901
How to fix an error with adding integers in Java?
<p>In given example:</p> <pre><code>int a, b, c; a = 2111000333; b = 1000222333; c = a + b; System.out.println("c= " + c); </code></pre> <p>will return: <code>c= -1183744630</code> , why?</p> <p>How to fix that? </p>
java
[1]
4,508,268
4,508,269
retry/cancel popup while refreshing the page-ASP.NET C#
<p>I'm having an image button as a templatefield inside a gridview.On clicking of the image button i will retrieve a pdf document from a folder location as byte array.The method will return null if the document is not available.after that if we try to refresh the page ,it throws retry/cancel popup.</p> <p>The grid is ...
c#
[0]
2,731,917
2,731,918
JQuery background color
<p>I am using JQuery Autocomplete on my ASP.net page. I am not sure how to change the backgroud color of the AutoComplete. Right now, it displays the list with "Clear" background. </p> <p>Where can i change the background color? (And, I am wondering why it's not taking the default settings. I downloaded the JQurey ...
jquery
[5]
5,694,637
5,694,638
How to call php function from button?
<p>I've got an easy php script :</p> <pre><code>&lt;?php $command = "git pull"; $output = shell_exec($command); echo "&lt;pre&gt;$output&lt;/pre&gt;"; ?&gt; </code></pre> <p>And I want to call it by pressing button : </p> <pre><code>&lt;form metod="post" action="/pull.php"&gt; &lt;button type="submit"...
php
[2]
398,261
398,262
filter list in python by another list of stop-words (substrings)
<p>I'm looking for nice pythonic way of filtering one list by another stop-list, but I want to match substrings from second list in first. </p> <p>To be specific: I have list1 of URLs and list2 like:</p> <pre><code>['microsoft.com', 'ibm.com', 'cnn', '.ru'] etc </code></pre> <p>First list of URLs is huge (thousands ...
python
[7]
4,959,656
4,959,657
logging exception in c#
<p><strong>logging exception</strong> this is below code which is used for logging exception in a text file. here i am getting only the decription of the error.</p> <p><strong>but it is not telling me where the exception occured at which line.</strong> would any onr tell me howi can achive that so that i g...
c#
[0]
4,780,329
4,780,330
jQuery nth-child exclude other elements
<p>I have some floated div's and I want to select the third with jquery. Also, after each 3 elements I have a hr tag in my html and this hr is also included by jquery in the nth-child count. Can I select only the divs and exclude the other elements inserted in html?</p> <p>This is my code</p> <pre><code>$('.col:nth-c...
jquery
[5]
4,385,864
4,385,865
Are class declarations that are initially set, internally the same as setting them in the constructor?
<p>Are class declarations that are initially set, internally the same as setting them in the constructor?</p> <p>example:</p> <pre><code>class test { int test1 = 5; } </code></pre> <p>Is there any difference between that and</p> <pre><code>class test { int test1; public test() { test1 =...
c#
[0]
1,310,852
1,310,853
Any Issues if I use toLong instead of new Long() to convert string Long
<p>Can any one tell me the difference between <code>toLong()</code> and <code>new Long(String)</code>? Are there any differences in performance between the two?</p> <p>Example : <code>String str="1236";</code></p> <p><code>Long val=str.toLong();</code></p> <p>OR</p> <p><code>Long val=new Long(str);</code></p> <p>W...
java
[1]
1,889,270
1,889,271
Convert Object to Boolean[][]
<p>How I can convert an Object to Array of Boolean Arrays?</p> <pre><code>Boolean[][] mass; mass = (Boolean[5][5])Object; </code></pre>
java
[1]
704,971
704,972
how to implement application purchase from the iphone?
<p>I am implementing application purchase application using apple payment gateway.but how to integrate with iphone i dont know.can u give me some advice for that.</p>
iphone
[8]
2,022,494
2,022,495
Add animation when changing tabs
<p>Hello I have a TabHost activity with two child activities. What would be the best solution to add a "left - right" animation for the child activities?</p> <p>Best regards!</p>
android
[4]
5,695,848
5,695,849
Trying to add/subtract variable
<p>I am trying to have something where when it is enabled it adds to a variable and when it is disabled it subtracts from the variable but when I <code>alert</code> the value of the variable is just comes up saying <code>NaN</code> Here is my code:</p> <p>This is for enabling/disabling the button</p> <pre><code>var s...
javascript
[3]
523,791
523,792
Change events execution order using jQuery.live()
<p>I have the following piece of code:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script src="myplugin.js" /&gt; &lt;script&gt; $(document).ready(function() { $('#mytable tbody tr').live('click', function() { alert('Hi'); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;script&gt; $('#mytab...
jquery
[5]
221,708
221,709
Basic decrement loop - PYTHON
<p>Newbie to python and hit a snag in my latest program. Simply put, I'm trying to code up a decrement loop for a user input variable if possible. Essentially I have a global constant set to value e.g. 13, each time the program loops it prompts the user to input a value then that user value is shaved off 13 until it re...
python
[7]
3,009,496
3,009,497
How do I convert an integer to decimal in JavaScript?
<p>I have a number in JavaScript that I'd like to convert to a money format:</p> <pre><code>556633 -&gt; £5566.33 </code></pre> <p>How do I do this in JavaScript?</p>
javascript
[3]
3,560,184
3,560,185
Time-based movement question
<p>I am reading about time-based movement, but I can't seem to fully understand what's going on. In the game, I have this code:</p> <p>About the deltaTime:</p> <pre><code>long startTime = System.nanoTime(); while(running) // some code here float deltaTime = (System.nanotime()-startTime) / 1000000000.f; startTime = S...
android
[4]
2,433,235
2,433,236
Reading lines from a file in PHP
<p>I'm having problems reading lines from a text file in PHP.</p> <p>I have this code:</p> <pre><code>$a_path = "./data/answers.txt"; $answers = fopen($a_path); $line_num = 1; while ($line = fgets($answers)) { for ($i = 0; $i &lt; count($common_q_line_nums); $i++) { if (...
php
[2]
2,455,581
2,455,582
jQuery live not firing on resize and scroll
<p>Can someone let me know why the following code isnt firing the console.log on resize and scroll? (jquery 1.7 is definately loaded).</p> <pre><code>&lt;script&gt; $(window).live('scroll resize', function () { console.log('am i working?'); }); &lt;/script&gt; </code></pre> <p>Thanks.</p>
jquery
[5]
3,895,333
3,895,334
jquery two select connects
<p>I am trying to connect two HTML <code>select</code> elements. What I want is that when item is <code>select1</code> select disable or remove in <code>select2</code>. I tried so</p> <pre><code>var selector = "#select2 option [value = '" + id_familia + "']"; $(selector).remove(); </code></pre> <p>but as may be updat...
jquery
[5]
342,079
342,080
What's wrong with the Thread?
<pre><code>public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Thread thread = new Thread(){ public void run() { try { sleep(50); Toast toast = Toast.makeText(getApplicationContext(), "Logged In", 100); toast.s...
android
[4]
5,106,676
5,106,677
Is there a risk in running file_put_contents() on the same file from different PHP threads?
<p>I know <a href="http://us.php.net/file_put_contents" rel="nofollow">file_put_contents()</a> makes it really easy to append data to a file in PHP. I'd like to try using PHP "<a href="http://www.funkynerd.com/knowledgebase/articles/2" rel="nofollow">threads</a>" to <code>file_put_contents()</code> to the same log file...
php
[2]
1,929,677
1,929,678
Strange javascript addition problem
<p>I have this code:</p> <pre><code>var totalAmt=0; for (i in orders) { order=orders[i]; if (order.status !='Cancelled') totalAmt=totalAmt + order.amount; } </code></pre> <p>But if i have 3 orders with amounts 3, 1, and 5, then instead of <code>totalAmt</code> being 9, i get <code>0315</code>. So I thin...
javascript
[3]
5,349,409
5,349,410
How to find all image tags using Regular Expressions
<p>I need to find all the image html tags that are included in a page using PHP regular expressions</p> <p>Example</p> <pre><code>&lt;img src="images/image.jpg" /&gt; </code></pre> <p>My code</p> <pre><code>preg_match('/&lt;img src=\"images\/.*/',$tags,$matches); </code></pre> <p>The strange thing is it only finds...
php
[2]
4,858,164
4,858,165
JQuery, Ajax and Internet Explorer - callback only works when response is blank
<p>My code works perfectly in FF, Safari and Chrome... just in IE 7 and 8 this happens...</p> <p>My JQuery AJAX post looks like this:</p> <pre><code>$.post( 'page.php', { test: 'testing' }, function(r){ alert('Data: ' + r); }); </code></pre> <p>Now, in IE, if the response (r) comes back blank, it will display th...
jquery
[5]
3,594,865
3,594,866
Heap Memory Size Increases While Adding Bitmaps in Arraylists in Android?
<p>I am making a painting application in which I have to add bitmaps of images in an Arraylist when drawing many lines. Unfortunately, I got an out of memory exception. I am unable to fix the issue, though I have increased the size of heap.</p> <p>I am adding current bitmaps in an Arraylist like this:</p> <pre><code>...
android
[4]
3,506,156
3,506,157
code showing prime number (c++) using recursive function and without using any loop
<p>Thats all in title.<br> In simple i had write this.</p> <pre><code>#include &lt;iostream&gt; using namespace std; int main() { int a,i; cout&lt;&lt;"Enter a number: "; cin&gt;&gt;a; for (i=2;i&lt;=a/2;i++) { if (a%i==0) { cout&lt;&lt;"Its not Prime ...
c++
[6]
5,494,075
5,494,076
How to use location manager as a service
<p>i am doing a project in which i want use the location manager as a service instead of an activity.Can anyone tell me how can i do it programatically?</p>
android
[4]
3,677,901
3,677,902
Switching on non-Ints in Java
<p>I'm having trouble figuring out the inner workings of switches in Java I'm told that for all primitives, the value is promoted to a Integer. </p> <p>However, in the following example, I'm testing on a byte variable, and any case larger than 127 will not compile:</p> <pre><code>byte k = 5; switch(k){ case 128: ...
java
[1]
5,213,590
5,213,591
How to add "quoted text" content to email?
<p>I have a webview which shows a mail . I need to forward the content of this webview in an email using the Intents. Now I am able to get the content of the webview but how do I add this content to the outgoing email as "Quoted text " as the native Gmail app does when you try to forward something.</p>
android
[4]
511,051
511,052
How to find minimum date from 3 dates using javascript function?
<p>I want to find minimum date from 3 dates (8/1/2011,6/1/2011,7/1/2011) format is (mm/dd/yyyy) using java script.</p> <p>Thanks in advance.</p> <p>Kanak Vaghela</p>
javascript
[3]
2,698,354
2,698,355
Why should we use <?php for embedding php code?
<p>I once posted a question here with php code embedded using <code>&lt;?</code>. Someone told me I should NOT do that and I should use <code>&lt;?php</code></p> <p>The person did not tell me why it is so. Can someone please explain why it is unsafe to use <code>&lt;?</code>?</p>
php
[2]
4,038,745
4,038,746
Locally parsing PHP in the browser
<p>I'm looking for a recommendation as to the best way of parsing PHP locally. Is there an add-on for Google Chrome that would mean I don't have to host a file in order to run the PHP?</p>
php
[2]
5,257,519
5,257,520
jQuery - code working partialy when changing Select, why?
<p>I have this in html code:</p> <pre><code>&lt;select name="t" id="t"&gt; &lt;option value="6"&gt;test2&lt;/option&gt; &lt;option value="0"&gt;Overall&lt;/option&gt;&lt;/select&gt; &lt;select name="m" id="m"&gt; &lt;option value="9"&gt;something to change&lt;/option&gt; &lt;option value="0"&gt;back to Overall&lt;/op...
jquery
[5]
3,427,585
3,427,586
Iphone & Web App synch
<p>I am trying to build an Iphone App client for our CRM solution so our sales people would be able to access the information available in our CRM through an Iphone App. </p> <p>I am trying to find out what is the recommended approach to architect the application when it comes to the database. I am not sure where shou...
iphone
[8]
3,508,991
3,508,992
Javascript type of custom object
<p>How can I check if my javascript object is of a certain type.</p> <pre><code>var SomeObject = function() { } var s1 = new SomeObject(); </code></pre> <p>In the case above <code>typeof s1</code> will return "object". That's not very helpful. Is there some way to check if s1 is of type SomeObject ?</p>
javascript
[3]
2,253,666
2,253,667
Problem comparing arrays of Strings with nested loops
<p>This is the problem I am trying to solve: I have two arrays of Strings ("matches" and "visibleObjects"). I would like to search through all the words in the array "matches" to see if there is at least one word from the array "visibleObjects". If this condition is satisfied, I'd like to search through the words in "m...
java
[1]
5,301,544
5,301,545
Can I combine variables into a javascript object?
<p>I have the following code:</p> <pre><code>var submitHandler = function ($link, $form, close) { var val = $form.valid(); var action = $form.attr('data-action') var entity = $form.attr('data-entity') var href = $form.attr('data-href'); var rownum = $link.attr('data-row'); var $row = $('#row_' + row...
javascript
[3]
3,787,976
3,787,977
Show warning message with OK button before close window in Java Script
<p>I know that by using this function in java script:</p> <pre><code>window.onbeforeunload = function(e) { return 'Please press the Logout button to logout.'; }; </code></pre> <p>It will show the warning message when I press the close window button. But the warning message will ask user to choose between 'stay on the...
javascript
[3]
5,376,086
5,376,087
How to add functions to prototype of inner function in the global scope in JavaScript?
<pre><code>function A() { this.B = function() { var bla; }; } A.B.prototype.foo = function() {console.log("Do whatever");}; </code></pre> <p>I get this: </p> <blockquote> <p>TypeError: Cannot read property 'prototype' of undefined</p> </blockquote> <p>How to add a function to the prototype of ...
javascript
[3]
1,016,997
1,016,998
how can i specify the resources that can be used for particular resolution
<p>I need to provide specific resources say images for Particular resolution say 240 * 432</p> <p>How can i do that without using -large extension(is der something like layout 240*432 ??)</p> <p>regards, Kariyachan</p>
android
[4]
547,471
547,472
multiple replace of a letter
<p>I have a string variable <code>var str = 'this is eeeeeeee';</code>. I want to replace each letter e in this string. When I do <code>str.replace('e', 'E');</code> it does it only to the first e</p>
javascript
[3]
2,695,823
2,695,824
exporting data from mysql to ms excel
<p>I have the following code which I am using to export data from mysql database to microsoft excel</p> <pre><code> $result = $this-&gt;db-&gt;query($sql); $num_fields = mysql_num_fields($result); $header = ""; for($i = 0; $i &lt; $num_fields; $i++ ) { $header .= mysql_field_name($result,$i)."\t";...
php
[2]
2,402,437
2,402,438
How to pass a string as sdtin to python script from command line interface
<p>Currently iam using following command to do this</p> <p>python scriptName.py <p>This command uses "&lt;" to stdin the file to script. and it works fine, I can use sys.stdin.read to get the file data.</p> <p>But, what if i want to pass file data as a string, I dont want to pass file path in operator "&lt;".</p> ...
python
[7]
5,974,119
5,974,120
C# Interface casting... dictionary lookup?
<p>Does C# do a dictionary lookup every time you cast an Object to an interface? I'd think it'd have to. </p> <p>Generic object that could implement hundreds of interfaces -> GetType() -> Get interface by name (or numeric ID, not going to be in a predictable location) -> Get method pointers from array and save to th...
c#
[0]
5,726,657
5,726,658
How create a showdialog?
<p>I customize a dialog as: </p> <pre><code>dialoge3 = new Dialog(this); dialoge3.setContentView(R.layout.layoutdialoge003); Button btnCacnel = (Button) dialoge3.findViewById(R.id.btnE3Cancel); btnCacnel.setOnClickListener(new OnClickListener() { public void onClick(View v) { // TODO Auto-generated ...
android
[4]
3,123,953
3,123,954
Form of fbrequest
<p>I'm using fbconnect in my app to connect to Facebook. Whenever i code a feature, I must google to find the form like below:</p> <pre><code>////// NSString *event = @"{\"name\":\"A party\",\"start_time\":\"1215929160\",\"end_time\":\"1215929160\",\"location\":\"Somewhere\"}"; NSDictionary *params = [NSDictionary dic...
iphone
[8]
5,585,310
5,585,311
change live wallpaper when idle?
<p>Hi I'm just wondering is there an option or an app in android that will control the android live wallpaper when it's idle? For instance I have a live wallpaper that consumes a tremendous amount of battery and 90% of the time I don't even see the live wallpaper since my phone is in my pocket idle. Is there something ...
android
[4]
4,341,273
4,341,274
Adding use to the home button
<p>When you press the home button, what does it do by default?</p> <p>I want to keep what it does by default, but make sure it ends my music as well. </p> <p>For example:</p> <p>public void onBackPressed() { return;</p> <p>I disabled my back button.</p> <p>I want to make it so the home button does what it does...
android
[4]
937,872
937,873
How to use GetAsyncKeyState without calling it multiple times?
<p>This is how my code currently looks like:</p> <pre><code> if (GetAsyncKeyState(VK_CONTROL) &amp;&amp; GetAsyncKeyState(0x31)) { //... } if (GetAsyncKeyState(VK_CONTROL) &amp;&amp; GetAsyncKeyState(0x32)) { //... } if (GetAsyncKeyState(VK_CONTROL) &amp;&amp; GetAsyncKeyState(0x33...
c++
[6]
3,403,462
3,403,463
drop down list changed
<p>in my application I need to check if a drop down list has changed or not. can you please let me know how I should write it? </p> <pre><code>if (document.form.dropdownlist.???) </code></pre> <p>I don't know what to write instead of ????</p>
javascript
[3]
125,269
125,270
JS looping a folder of images, preload them and assign to an array?
<p>I have a folder named "img" and i want to use js to look up the folder and find all the image files (jpg,JPG or png) and preload them and assign them to an array.</p> <p>Can this be done in terms of looking up a folder like that on my server? Or does client code not allow you to loop through files in a folder?</p>
javascript
[3]
1,085,092
1,085,093
Getting data from two different arrays for the same index
<p>I created an array like this:</p> <pre><code>string mobs [5] = {"Skeleton", "Dragon", "Imp", "Demon", "Vampire"}; int mobHP[5] = {10, 11, 12, 13, 14, 15}; </code></pre> <p>I created a random number generator for getting the mob number that i want, but I failed. Supposing, the generated number is 4, how will I equa...
c++
[6]
3,728,775
3,728,776
How to create datalist dynamically
<p>In my application I want to create a dynamic datalist and bind the database values. please help me this is my code</p> <pre><code>protected void btn_Click(object sender, EventArgs e) { DataList datlst = new DataList(); da = new SqlDataAdapter("select emname from emp", con); ds = new DataSet(); da.Fi...
asp.net
[9]
3,814,515
3,814,516
Turn off register_globals through a php file
<p>I want to know how can I turn off the register_globals for a single php file? Like is there any code which is capable of turning off the register_globals feature in configuration file?</p>
php
[2]
2,597,716
2,597,717
Android: ICS Spell-Checking not working
<p>I've just tried out my application on a physical device running ICS for the first time and much to my surprise and dismay the spell check that underlined misspelled words in the emulator is not working. The device in question is a HTC One S. The spelling correction does appear to be there in other applications. I...
android
[4]
4,169,735
4,169,736
Jquery fade in not working
<p>I am trying to change an img src then set opacity to 0 then fade in.</p> <pre><code> $("#featureImg").attr('src','07.jpg').css({opacity:0}).fadeIn("slow"); </code></pre> <p>This works up to the </p> <pre><code>.css({opacity:0}) </code></pre> <p>Meaning it does set the opacity to 0,but the fade never happens.</p>...
jquery
[5]
2,348,326
2,348,327
How to achieve a flash/strobe effect?
<p>I want to create an effect of camera flash similar to one from cuttherope.ie (the moment when you replay level) and I am stuck at the beginning: I want to use animate() with document to switch its background and font colors and then animate again removal of set properties. However even I can't get the first part wor...
jquery
[5]
1,431,684
1,431,685
Javascript functions, how can I start beginning to understand them?
<p>I totally understand that in order to learn javascript I need to know how functions work, I understand the basics of passing in parameters and then calling the function with the values to maybe add something together, etc. I've read countless articles about functions as well as books, etc., but I just dont get how t...
javascript
[3]
1,048,584
1,048,585
C++ template and ODR Rule
<p>Why does following works in <code>C++</code>, I thought <code>ODR</code> rule will come into picture for following code</p> <pre><code>typedef char int8; class Sample { public: template &lt;typename T&gt; void test( T param){ } }; int main() { Sample s; s.test&lt;char&gt;('a'); s.test&lt;int8&gt;...
c++
[6]
2,988,732
2,988,733
How can I add an image to the title bar in android 3.0?
<p>I am learning android 3.0. Can any one tell How can add Image in Title bar in android 3.0? In developer site they are telling by default it will come.but for me it is not coming. Thanks in advance.</p>
android
[4]
5,465,110
5,465,111
change img src with jQuery
<p>There are many answers on SO that show how to set an img src with .attr in jQuery. For some reason this is not working.</p> <pre><code>&lt;img id="imgMap" style="position:absolute;bottom:7px;right:7px;width:250px;height:250px;" /&gt; &lt;script&gt; $(function () { $("#imgMap").attr( 'src', 'http://maps.go...
jquery
[5]
1,135,165
1,135,166
Android ICS 4.0 OS
<p>I am a new Android developer starting out.</p> <p>I hope that someone from the androids developers team can answer this question: if I have a tablet with android ICS 4.0 OS, given that this OS is UNIX-based, can I install the Android Developer Kit and related platform+ packages on it, so that I might study developm...
android
[4]
665,323
665,324
How to check element is not null in java
<pre><code>filterItems = null; filterItems = new ArrayList&lt;SelectItem&gt;(); Iterator&lt;String&gt; it = RefListMap.keySet().iterator(); while (it.hasNext()) { String s = (String) it.next(); filterItems.add(new SelectItem(s, s)); } </code></pre> <p>Now i am getting filterIt...
java
[1]
2,240,256
2,240,257
Removing the Title bar of external application using c#
<p>My application starts up another application. whereby, i want to remove the title bar of the application which is started using c#.</p> <p>What is the feasibility and how ?</p> <p><strong>After all comments, i got some idea to implement. The below code works fine :</strong></p> <p>//Finds a window by class name ...
c#
[0]
419,159
419,160
android - notifications without alerting the user
<p>I currently have an ongoing notification that displays some information about my app. While this information is useful, there's no need for the user to actually see that I've created the notification. Its basically there to tell them that "hey, my app is doing stuff in the background, click here to go back to it".</...
android
[4]
2,597,590
2,597,591
iPhone SDK: Why is my view not lining up?
<p>When I run my app, for some reason the view is pushed up too far. The space it is pushed up too far appears to be the height of the status bar. (</p> <p>I am using a NIB. I have verified that both MainWindow and this view has the simulated status bar checked. </p> <p>I'm not sure what could be wrong?</p> <p>Any h...
iphone
[8]
4,897,089
4,897,090
create an automatic update RSS feed out of .txt file
<p>i have a .txt file consist of number of text lines, i want some PHP script to create an RSS feed and update it with line by line out of the .txt file every some amount of time, say 2 minutes [say, i have a .txt file consists of 100 text lines, the script will create an RSS Feed and update it every 2 minutes with an ...
php
[2]
3,085,207
3,085,208
HttpWebRequest timeout in Windows service
<p>I am getting a timeout error while starting my Windows service. I am tring to download an XML file from a remote system which causes a timeout during the service OnStart.</p> <p>This is the method I am calling from OnStart:</p> <pre><code>public static StreamReader GetResponseStream() { try { Even...
c#
[0]
282,114
282,115
How to drag webview onTouch in android
<p>I have the following layout:</p> <pre><code>|===================================| | webview-1 | | | | | |===================================| |-----------------------------|-----| | ...
android
[4]
1,838,167
1,838,168
Android Back button code never executed
<p>I have the following code in my Activity. I have Breakpoints set to all of these methods. When I press the Menu button, it enters onKeyDown and onKeyUp. When I press the back button, the app closes and phone goes back to home screen without passing any of my breakpoints.</p> <p>EDIT: This could should work accordin...
android
[4]
324,058
324,059
Android Library Project - can't find class from library project at runtime?
<p>I'm trying to create an android library project so I can make a lite and full version of my app with shared code. Following the directions here:</p> <pre><code>http://developer.android.com/guide/developing/projects/projects-eclipse.html http://blog.donnfelker.com/2010/08/05/howto-android-full-and-lite-versions/ </c...
android
[4]
5,957,298
5,957,299
Define statement being printed in output
<p>I'm trying to define a constant for deployment proposes so that we know that we are on a development environment.</p> <ol> <li><p>I've created a PHP file with:</p> <pre><code>define('LDEV', true); </code></pre> <p>And name it, for example: <strong>devEnv.php</strong></p> <p>I've placed somewhere: ex: <em>/home/u...
php
[2]
5,346,564
5,346,565
How to call any webservices in phone gap application
<p>My application is phonegap template based i am understand about Javascript,CSS,HTML all is fine but i want call any webservices in my javascript code so how can i do if anybody know so please reply me answer to this question</p> <p>Thank You To ALL </p>
iphone
[8]
2,831,137
2,831,138
When to use parentheses with javascript function
<p>I have a function called <code>showText()</code> which copies some text from form textbox to a paragraph elsewhere. It is called with the following:</p> <pre><code>document.getElementById("mybutton").onclick = showText; </code></pre> <p>It will not work if I add the () to the end of showText, which I understand ...
javascript
[3]
1,634,688
1,634,689
how to play my images in java script
<p>can you look this page <a href="http://www.itheatrep.com/" rel="nofollow">http://www.itheatrep.com/</a> how to auto movement in java script </p>
javascript
[3]
5,220,580
5,220,581
How can I make this function with substr work when rk is null or ""
<p>I have the following function in C#:</p> <pre><code> public string getRowKey(string topic, string rk) { return string.Join("", from s in topic.Split('.') select s.PadLeft(2, '0')).PadRight(4, '0') + rk.Substring(4); } </code></pre> <p>I have a p...
c#
[0]
1,119,508
1,119,509
programmatically create TABBAR
<p>i created TAb bar programatically in this manner</p> <pre><code>UITabBarController *tabBarController = [[UITabBarController alloc] init]; contacts *vc1 = [[contacts alloc]init]; vc1.tabBarItem.image=[UIImage imageNamed:@"contacts.png"]; search* vc2 = [[search alloc] init]; vc2.tabBarItem.image...
iphone
[8]
4,487,750
4,487,751
Select element client side modification?
<p>I use tools like Firebug pretty routinely, and often build SPA style dynamic forms where DOM manipulation with user inputs is routine. Are there any safeguards against a user inserting options into a select box using a tool like Firebug or any sort of javascript CLI?</p> <p>As a simple example, consider this select...
javascript
[3]
2,053,881
2,053,882
Substituting class name by variable in PHP
<p>Since which version of PHP is it possible to use the following:</p> <pre><code>$class::method()-&gt;something($val); </code></pre> <p>I need to use this but in 5.2.11 I get a T_PAMAAYIM_whatever error, and I just wanted to determine whether it's version related or bad coding.</p> <p>If it's version related, what'...
php
[2]