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
50,834
50,835
Difference between while(i=0) and while(i==0)
<p>In my exam the following problem appeared in C++</p> <p>Code:</p> <pre><code>int i,n; int* A cin&gt;&gt;n; A=new int[n] for(int i=0;i&lt;n;i++) cin&gt;&gt;A[i]; while(i=0){ cout&lt;&lt;A[i]&lt;&lt;endl; i=i-1; } } </code></pre> <p>What will be the output? I think that it should go into indefinite loop!</p>...
c++
[6]
2,017,600
2,017,601
Backslash in PHP -- what does it mean?
<p>I just saw the use of a backslash in reference to a PHP object and was curious about it (never seen this before). What does it mean?</p> <pre><code>$mail = new SendGrid\Mail(); </code></pre> <p>If you're curious, here's <a href="http://docs.sendgrid.com/documentation/get-started/integrate/examples/php-email-examp...
php
[2]
3,023,178
3,023,179
Custom container control
<p>I'm trying to create a CollapsiblePanel control, which is essentially just a panel which has a header which can be used to expand / collapse the body. I've got an example of it working on a page (inline) but now what to make it a reusable control that can be used as follows</p> <pre><code>&lt;cc:CollapsiblePanel ru...
asp.net
[9]
5,759,485
5,759,486
How to get Content on Post Method
<p>I've used below code for <code>HttpPost</code>, Its execute successfully. But unable to see the response.I get <code>InputStream</code>. I want to know what are the contents in it.</p> <p>I want to display as string format.How to do this.</p> <pre><code> HttpPost httppost = new HttpPost(requestURL); ...
android
[4]
1,309,476
1,309,477
How do I downgrade Java from 1.6.0 to 1.5.0 in Ubuntu?
<p>I need to downgrade Java in Ubuntu. Current version is 1.6.0, I have to use JDK 1.5.0 for my Android platform.</p> <p>How to do it? Remove it and reinstall?</p>
java
[1]
3,890,881
3,890,882
How to pass a 2D matrix to function
<p>I am doing an addition of matrices using classes.I have declared a class 'Matrix'.now i need to pass an object of Matrix to a function.how do i do that? </p>
c++
[6]
4,782,039
4,782,040
How do I move a div with javascript?
<p>I have a div with text on the center of the page. When I click on the div it should be moved anywhere on the page (for example: 100px above). How can I do it?</p>
javascript
[3]
3,315,398
3,315,399
Why does this code result in 0?
<p>I have the following code</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;iostream&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; using namespace std; int main(){ int x; cin&gt;&gt;x; uint32_t Ex; Ex=(x&lt;&lt;1)&gt;&gt;24; cout&lt;&lt;Ex&lt;&lt;endl; return 0; } </code></pre> ...
c++
[6]
2,244,144
2,244,145
C#: bandwidth
<p>I was successfully calculate bandwidth consumed by my application (which connects to web service to send files) using [this][1] [1]: <a href="http://stackoverflow.com/questions/442409">http://stackoverflow.com/questions/442409</a> i used the code provided by Rasmus Faber... One thing puzzled me: the received bytes...
c#
[0]
1,147,992
1,147,993
Does the default constructor of std::pair<> set basic types (int, etc) to zero?
<p>After writing:</p> <pre><code>std::pair&lt;int, int&gt; x; </code></pre> <p>Am I guaranteed that x.first and x.second are both zero? Or could they have any value? </p> <p>The reason why I care is because I'm trying to determine whether a map whose values are pointers is guaranteed to return NULL if I access an ...
c++
[6]
1,560,059
1,560,060
is there a JavaScript implementation of the Inverse Error Function, akin to MATLAB erfinv()?
<p>is there a JavaScript implementation of the Inverse Error Function? This would implement the Gauss inverse error function. Approximations are ok.</p>
javascript
[3]
884,013
884,014
reload the sourcecode of a C# app on command
<p>i have a C# application, and id like to be able to make a system, so that within the program, you can display the sourcecode of the application. easy enough so far right?</p> <p>well, i need them to be able to edit that code, almost like the debug break option... then load the new code and continue without stopping...
c#
[0]
4,289,111
4,289,112
Check status of dialog in android
<p>I create dialog by:</p> <pre><code>protected void showAlertDialog(String title, String message) { AlertDialog.Builder builder = new Builder(this); if(title != null) { builder.setTitle(title); } if(message != null) { builder.setMessage(message); } builder.setPositiveButton("OK...
android
[4]
1,886,540
1,886,541
inputAccessoryView from UISearchBar
<p>How can I access to <code>inputAccessoryView</code> propery from <code>UISearchBar</code>? I mean there's no <code>UITextField</code> property in <code>UISearchBar</code> that by it I could access to <code>inputAccessoryView</code>.</p> <p>Regards</p>
iphone
[8]
124,786
124,787
what is this nameless function?
<p>What does this line from the following code sample mean? </p> <pre><code>synchronized (_surfaceHolder) { _panel.onDraw(c); } </code></pre> <p>I can guess what it does, but what is it called and how does it works? Is it a nameless synchronized function?</p> <pre><code>class TutorialThread extends Thread { ...
android
[4]
5,916,035
5,916,036
Passing Complex JavaScript Object to WCF using JQuery
<p>I have a FireFox browser plugin that is devloped in C++, that connects to a Scanner and retrievs data</p> <p>When a user clicks on a button on a Web Page (Developed in ASP.net AJAX 3.5) it retrieves data from the scanner by JavaScript and sends to the WCF service (RESTful WCF and accepts JSON message format)</p> ...
jquery
[5]
281,099
281,100
Using the Prototype object correctly
<p>HI,</p> <p>I have a JavaScript program that's written with object literal syntax:</p> <pre><code>var MyJsProgram = { someVar: value1, somevar2: value2, init : function() { //do some initialisation }, libraryFunction : function() { }, getStyle : function() { }, ext...
javascript
[3]
998,379
998,380
mysql insert PHP statement keeps throwing error
<p>Does anybody know why the following <code>PHP</code> code keeps throwing errors: I have been unable to log any proper error other than the if statement $result not going through and giving me the <code>Echo 'Error'</code> statement. Is there something wrong with my insertion?</p> <pre><code> $new_tbl_name = 'Pas...
php
[2]
4,926,052
4,926,053
window.close(); not working when page changed or refreshed
<p>I have this little function to open/close a popup player:</p> <pre><code>function popuponclick(popup) { my_window = window.open("folder/player-itself.htm", popup, "width=350,height=150"); } function closepopup() { my_window.close(); } </code></pre> <p>I call the functions from HTML anchors that are on each ...
javascript
[3]
3,351,525
3,351,526
How to parse the response of youtube video upload api to get the video's url
<p>I'm using the youtube api's non resume method to upload a video to youtube from my android app. The response of this upload is an xml file. I need to parse it and find the url of the video (WHICH IS IN THE TAG media:player url). How to get that url?</p> <p>The xml is as follows </p> <p><img src="http://i.stack.img...
android
[4]
2,076,317
2,076,318
Problem with input in c++
<p>I have a very basic question i want to take integer input in certain range from user. if the user gives some string or char instead of integer. then my program goes to infinite loop.</p> <p>my code is some what like that</p> <pre><code>cin &gt;&gt; intInput; while(intInput &gt; 4 || intInput &lt; 1 ){ cout &l...
c++
[6]
167,992
167,993
PHP 5.4 after-install: preg_match(): Compilation failed: unknown option bit(s) set at offset 0
<p>I recently upgraded my PHP to version 5.4.1 on my Lion OS X 64bit, I'm getting an error thrown in Codeigniter:</p> <pre><code>Severity: Warning Message: preg_match(): Compilation failed: unknown option bit(s) set at offset 0 Filename: core/Utf8.php Line Number: 44 </code></pre> <p>I Googled the problem, this se...
php
[2]
5,919,551
5,919,552
Why is my icon not being distributed to the device?
<p>During the work on my iPhone application the icon changed from time to time. Colleagues or management came with fancy new ideas and .pngS and all I did was changing the Icon.png in the file system. Most times the new icon was distributed to simulator or device with the very next build, sometimes I had to delete and ...
iphone
[8]
5,326,853
5,326,854
Why struct can not have parameterless constructor
<p>Why struct can not have parameterless constructor? What's the problem in doing this for CLR or why it's not allowed ? Please explain it as I don't understand it.</p>
c#
[0]
2,828,288
2,828,289
Call master page function from user control?
<p>After searching Google I found one way to call a master page function from a user control: </p> <ol> <li>Create an interface that includes your method.</li> <li>Implement the interface in your master page</li> <li>From your control, reference this.Page.Master via the interface type.</li> <li>Call your method.</li> ...
asp.net
[9]
2,989,605
2,989,606
How to fill the part of the imageview with another color
<p>I am developing an application in which I am using one <code>UIImageView</code> and adding one rectangle image to that <code>UIImageView</code>. I am getting some float value from another calculation like 67.4 and I need to place one green image on the 67.4 part of rectangle <code>UIImageView</code>. So please tell ...
iphone
[8]
5,769,373
5,769,374
why does my code "break" out of loop?
<pre><code>fileName = raw_input("Enter the filename: ") n = input("Enter the line you want to look: ") f = open(fileName,'r') numbers = [] for line in f: sentenceInLine = line.split('\n') for word in sentenceInLine: if word != '': numbers.append(word) print numbers print len(numbers) pr...
python
[7]
2,290,728
2,290,729
jquery live function not working for a specific selector
<p>i'm having trouble applying .live function to a specific input tag having a unique id. Am i doing it the wrong way? Any suggestions?</p> <pre><code>$('input.newQty').live('change', function(){ }); //works $('input.newQty[id="'+naam+'"]').live('change', function(){ }); //does not work </code></pre>
jquery
[5]
1,031,380
1,031,381
multiple file preview by javascript
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4100927/chrome-filereader">Chrome FileReader</a> </p> </blockquote> <p>I was wondering how I can change this code in order to be able to preview multiple images.</p> <p>Thank you in advanced.</p> <pre><code>Se...
javascript
[3]
5,562,184
5,562,185
Make DatePicker and TimePicker smaller
<p>Is there any way to make smaller DatePicker and TimePicker (but to be visible all parts ) in Android ? I tried to set layout_width="130dp" but then DatePicker isn't visible, just left upper corner.</p>
android
[4]
1,576,387
1,576,388
How to perform the default link action after the specified action with Jquery?
<p>I have a "slide out" div that I'm hiding/showing via CSS positioning, and using jquery to toggle a class that sets the hidden/shown state of the div. </p> <p>That's all working great. What I'm now trying to do is have any link farther up on the page change the class to show the div, and jump down the page to it.</...
jquery
[5]
1,156,596
1,156,597
Cell Index of a GridView Cell
<p>I'm a novice in .Net. I w8ish to know how to get index of a cell just like getting row index of a row after accessing the GridView.</p>
asp.net
[9]
1,282,946
1,282,947
How to use int.TryParse with nullable int?
<p>I am trying to use TryParse to find if the string value is an integer. If the value is an integer then skip foreach loop. Here is my code.</p> <pre><code>string strValue = "42 " if (int.TryParse(trim(strValue) , intVal)) == false { break; } </code></pre> <p>intVal is a variable of type int?(nullable INT). ...
c#
[0]
552,729
552,730
How to get the current week starting date and add it to a combo box?
<p>I'm attempting to recreate a time sheet built on asp and I can't figure out how to get the current weeks starting date "6-13-2010" and have it populate a combo box can you help me with this I'm new to C# and asp programming.</p>
c#
[0]
2,287,369
2,287,370
jQuery core method overload
<p>how can I <em>overload</em> or extend (or intercept) jQuery's .html() method so that it works its default way unless the object has a certain class?</p> <p>Thanks</p>
jquery
[5]
5,552,671
5,552,672
finding the request on a port
<p>how i can write a java program to find the total number of requests which can be found on a particular port with complete specification (request at present,request running &amp; request pending?</p>
java
[1]
5,059,241
5,059,242
php unable to show chr(128+) when called by jquery
<p>Normally when I ask php to show a character e.g. the EURO sign with <code>chr(128)</code> there is no problem. However, when the php code is being called by jQuery, <code>chr()</code> only works up to 127.The code above will print an empty result is produced.</p> <p>Any idea why and how it can be fixed?</p> <p>Tha...
jquery
[5]
1,207,154
1,207,155
Call C++ main classes from other file
<p>Alright so Im making a text adventure game in C++ and I am quite new to it. I'm experienced in java and some other languages. But I have a problem. I'm trying to call a class from the main file into my other file and I get an error. I get it even when I include the main.cpp in my header file or in my .cpp file. I al...
c++
[6]
5,169,957
5,169,958
Installed PHP module and restarted nginx but but PHP configuration isn't updating?
<p>Okay, I'm on CentOS 5.3 and I'm running an nginx/php/mysql server stack with FastCGI. One of my Twitter apps requires PHP to connect to the Twitter API, which uses OAuth. So I installed the OAuth module with PECL and confirmed that oauth.so was compiled in /usr/lib/php/modules and extension=oauth.so was added in PHP...
php
[2]
3,667,606
3,667,607
nth-child not working using jQuery
<p>Hello Fellas i am trying to use nth-child in my code but its not working following is my code </p> <p><strong>HTML</strong></p> <pre><code>&lt;ul class="colour" &gt; &lt;li&gt;one&lt;/li&gt; &lt;li&gt;two&lt;/li&gt; &lt;li&gt;three&lt;/li&gt; &lt;li&gt;one&lt;/li&gt; &lt;li&gt;two&lt;/li&gt; ...
jquery
[5]
5,567,272
5,567,273
question about code comments in book about designing the business layer
<blockquote> <p>Thanks all for the help</p> </blockquote> <p>Hi All,</p> <pre><code>public static List&lt;Order&gt; LoadAll() { // Load all orders in the table. If too // many records, consider exposing this // operation as a plain ADO.NET function. } </code></pre> <p>What would the "plain ADO.NET f...
c#
[0]
3,877,413
3,877,414
Set all properties of same name recursively
<p>I have an <code>IsDirty</code> property of type <code>bool</code> on most of my objects.</p> <p>My base object is called <code>Client</code>, but contains several inner collections e.g.: <code>Client.Portfolios.Policies.Covers.CoverOptions</code>, each object type has an <code>IsDirty</code> property:</p> <ul> <li...
c#
[0]
3,730,617
3,730,618
Can you perform an action based on a seperate window in asp.net?
<p>I have a page of search results, and clicking one opens a new window where they edit the information about it. Once they finish, they currently have to hit "search" again to refresh the results to ensure it saved correctly (it refreshes the search results and reflects the new status).</p> <p>Is there any way to tri...
asp.net
[9]
5,282,736
5,282,737
How to define default "TagPrefix" for custom controls
<p>I have a number of custom controls that I am trying to enable designer support for. The signature looks something like the following:</p> <pre><code>[ToolboxData("&lt;{0}:MyDropDownList runat=\"server\" CustomProp="123"&gt;&lt;/{0}:MyDropDownList&gt;")] public class MyDropDownList: DropDownList { ... code here }...
asp.net
[9]
266,303
266,304
Calling webservice from android application without Ksoap
<p>What would be best and simplest way to call Yahoo weather webservice/any json webservice in android? Some people suggest not to use Ksoap for mobile application instead use Restful or Json webservice.</p> <p>TIA Bhaskar</p>
android
[4]
1,273,485
1,273,486
chaining appendTo method to animate is not working?
<p>chaining appendTo to the animate is not working? Meaning the left margin never moves over to margin 0 from margin 600px?</p> <pre><code> $(data).filter('.test1Div').appendTo("#tes1Section").animate({"left": + slideLeft},"slow"); </code></pre> <p>I can see the data get inserted into the #test1Section because I m...
jquery
[5]
2,019,549
2,019,550
How do I make a input field active after I tick a checkbox, using JQuery?
<p>I have this code I wrote but it doesnt seem to be working, see below:</p> <pre><code>$('#Reserve, #BuyItNowPrice, #featureplate').attr('disabled','disabled'); $('.fake-fieldset .fake-input').css({'background-color':'#e1e1e1'}); $('.enable').click(function(){ if($('.enable:checked')){ $(this).closest('...
jquery
[5]
5,681,542
5,681,543
Trying to write a simple Blackjack, but there are errors I don't understand
<p>I have a problem with a code of mine. It gives random errors and I don't know why.. I'm a newbie to C++ so please bear with me >.></p> <p>Here is the code that's problematic:</p> <pre><code>while (!IsGameOver) { struct decktype deck = DeckInit(); struct card card = PickACard(deck); PrintHand(TextCard(c...
c++
[6]
3,478,019
3,478,020
avoid overwritting on array
<p>is there any way where overwritting of the array can be avoided...in my implementation i have to write data to an buffer/array of fixed size say buff[100]....and wll b using buff[100] when ever i want to o/p data i wll write to buff[100](i.e wll u again using the same buff[100]) the next time when i use buff[100] it...
c++
[6]
1,480,865
1,480,866
Why is it called onBlur?
<p>JavaScript has an event called onBlur that fires when a control loses focus. My question is: Why is it called that? Wouldn't all of our lives be easier if it was called OnFocusLost?</p>
javascript
[3]
3,297,329
3,297,330
split links in text file PHP
<p>I have a text file which contains many (over 5000) links. Like this:</p> <pre><code>http://www.website.com/rgfdefvrggh http://www.website.com/rgfdefvrggh http://www.website.com/rgfdefvrggh http://www.website.com/rgfdefvrggh http://www.website.com/rgfdefvrggh http://www.website.com/rgfdefvrggh http://www.website.com...
php
[2]
4,937,587
4,937,588
Word game server in Python, design pros and cons?
<p>I'd like to get busy with a winter programming project and am contemplating writing an online word game (with a server load of up to, say, 500 users simultaneously). I would prefer it to be platform independent. I intend to use Python, which I have some experience with. For user data storage, after previous experien...
python
[7]
5,525,546
5,525,547
How to allow Android WebView to accept Address and Phone information
<p>I am making a webapp for android that uses a WebView that takes control of all hyperlinks instead of having them passed onto a browser for client ease. What would you use when when you'd like to have it so that when you click an address or phone number, it will ask you what program you'd like to open it with? the de...
android
[4]
4,498,096
4,498,097
Integration of sms and speech to text
<p>I am a beginner.I build two apps 1)sms 2)speech to text.Both are working fine on real device.I want to integrate these two apps such that the user must speak the message instead of typing.Is it possible.If yes how can i do it.Any link to build such an app.Or any clear idea plz let me know.</p>
android
[4]
477,610
477,611
Adding values to a list
<p>I'm an R newbie and am trying to create a basic "database" for my comic books. However, I have a problem.</p> <p>The idea is to place each new entry as a list. I assumed that I could set up the lists to look like the following.</p> <pre><code>[Thor, 50, Marvel] [Thor, 51, Marvel] [Thor, 52, Marvel] ... eventually...
python
[7]
2,359,681
2,359,682
jquery remove part of href that is dynamic
<p>In this href:</p> <pre><code>&lt;a href="/Lists/ListeActualitesCarrousel/4_.000/DispForm.aspx?ID=4" class=""&gt;Lire l'article&lt;/a&gt; </code></pre> <p>This part <code>/ListeActualitesCarrousel/4_.000/</code> is dynamic and can change, I would like to remove it. Thus, the URL will become:</p> <pre><code>&lt;a h...
jquery
[5]
1,573,062
1,573,063
Home screen takng time to load after the application in android
<p>i have an application which i have made. Once i use this application for sometime and if i press the home screen, it takes the home screen sometime to load and a progress dialog appears telling me that it's loading.</p> <p>My application is not a graphics intensive application. It just parsers data from the an XML ...
android
[4]
4,406,598
4,406,599
Celcius to Fahrenheit
<p>I can convert from fahrenheit to celcius, but not the other way around. I have attached the code below. Hopefully it's enough to see what is going on.</p> <pre><code> public void actionPerformed(ActionEvent arg0) { double temps = 0, temp1 = 0; String instrings; instrings = temp.ge...
java
[1]
3,847,841
3,847,842
using IMG_FILTER_GAUSSIAN_BLUR makes my thumb too much blury
<p>so im using my class to resize an image to a very little thumb, and im trying to blur that thumb in order to have a decent image and not some broken image all pixaleted. but IMG_FILTER_GAUSSIAN_BLUR its a little TOO MUCH. </p> <pre><code>imagefilter($newImg, IMG_FILTER_GAUSSIAN_BLUR); imagefilter($n...
php
[2]
2,183,683
2,183,684
How do i get the full path of the file in Firefox
<p>How do i get the full path of the file in Firefox with JavaScript?</p> <p>Thanks in advance!</p>
javascript
[3]
3,026,120
3,026,121
get top margin from a div and apply to another
<p>I have used the following Jquery code to make fixed position sidebar div middle of screen.</p> <pre><code>$j("#sidebar").css('margin-top', $j(window).height()/2 - $j("#sidebar").height()/2); </code></pre> <p>now i am trying to get it's top margin to apply with #content div.</p> <p>is there any way to do it easily...
jquery
[5]
3,483,693
3,483,694
How check javascript not to open the same window with window.open function
<p>In my javascript i want to open URL in new window with this method:</p> <pre><code>var win = window.open(url...); </code></pre> <p>How can i check this, not to open the same window and lose all inputted data. For example, if i opened "www.musite.com/addproduct" URL in new window, input data, leave my work place. t...
javascript
[3]
4,512,615
4,512,616
how do I automatically execute javascript?
<p>how do I automatically execute javascript?</p> <p>I know of <code>&lt;body onLoad=""&gt;</code>, but I just thought maybe there is another way to do it?</p> <p>html:</p> <pre><code>&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;div id="test"&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt; </code></pre> <p>javasc...
javascript
[3]
1,599,953
1,599,954
jQuery - rule for "does not contain element"
<p>I want to create a rule to match only on the following:</p> <pre><code>&lt;ul id="root"&gt; &lt;li&gt; &lt;a href="item.html"&gt;Root Menu Item&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p>However it must not match if the "li" element contains another "ul" element:</p> <pre><code>&lt;ul id="root...
jquery
[5]
2,883,670
2,883,671
how to autoplay all songs one after another?
<p>i am creating a music application in which i m having 20 songs.First i have to download all the songs from my server which i am done with now my next requirement is after downloading gets over all the songs should play one after another.</p> <p>To play one song m using the below code:</p> <pre><code> player=[[AVAu...
iphone
[8]
1,906,142
1,906,143
How do I use Python to convert a string to a number if it has commas in it as thousands separators?
<p>I have a string that represents a number which uses commas to separate thousands. How can I convert this to a number in python?</p> <pre><code>&gt;&gt;&gt; int("1,000,000") </code></pre> <p>Generates a <code>ValueError</code>.</p> <p>I could replace the commas with empty strings before I try to convert it, but t...
python
[7]
4,084,149
4,084,150
jQuery each element
<p>I'm curious why this code is invalid:</p> <pre><code>$.each( $("p") ).css("color", "green"); </code></pre> <p><br /> While this code works fine:</p> <pre><code>$.each($("p"), function() { $(this).css("color", "green") }); </code></pre> <p><br /> Is it not possible to chain elements with each?</p>
jquery
[5]
3,789,308
3,789,309
dynamic button creation with single refrence
<p>Here i am creating 20 Button dynamically using for loop</p> <p>exmple</p> <pre><code>for(int i =1 ;i &lt;= 20 ;i++){ Button b = new Button(this); b.setText(String.valueOf(i)); b.setId(String.valueOf(i)); b.setBackgroudColor(Color.Red); b.setOnClickListener(new View.OnClickListener() { public void onClick(...
android
[4]
727,986
727,987
change style (using variable)
<p>I've this code and I need to change MyCustonTheme1 to 2 or 3 or 4 (From a value by sharedpreferences, user choose a value (1,2,3,4)</p> <pre><code>AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.MyCustomTheme1); </code></pre> <p>In MainActivity I've:</p> <pre><code>if (fade == 500){ ...
android
[4]
2,711,203
2,711,204
Why do we still use JavaScript?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://programmers.stackexchange.com/questions/44842/why-arent-there-other-client-side-scripting-languages-for-websites">Why aren&#39;t there other client-side scripting languages for websites?</a> </p> </blockquote> <p>It seems to me that, despi...
javascript
[3]
1,316,290
1,316,291
Hiding a folder in Android
<p>I want to make an application in android ,which can hide my selected files are folders from Sdcard . your suggestion will be appreciated.Thanks!! </p>
android
[4]
2,972,747
2,972,748
Android List with Image - How to implement
<p>I'm looking for a clear way to establish the XML resource for a list of strings with an image attached to it. Should I use attributes? What is the best practice? </p>
android
[4]
1,835,609
1,835,610
Android: Application restarts sometimes
<p>I found a strange behavior in my App. When i try to fetch data from the internet with bad wifi signal, i have a couple of exceptions(IOException, SocketException). All this exceptions are handled in the application in try-catch block, but app performance slows, and in one moment application restart. I have a SomeCla...
android
[4]
3,834,656
3,834,657
How to change href of <a> tag on button click through javascript
<p>I want to change the href of <code>&lt;a&gt;</code> tag through javascript on button click.I m not find out any help regard this.Please help me asap.I shall be very thankful to you</p> <pre><code> &lt;script type="text/javascript"&gt; function f1() { do...
javascript
[3]
2,758,203
2,758,204
obtaining current location in GPS?
<p>Below is my code but its not working. Can anyone help me???</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; CLController = [[CoreLocationController alloc] init]; CLController.delegate = self; //[CLController setDesiredAccuracy:kCLLocationAccuracyBest]; [CLController.locMgr startUpdatingL...
iphone
[8]
4,863,267
4,863,268
I found a php code in my server , how can know what is mean?
<p>How are you ?</p> <p>I found a php code , but i can't know what is mean .. maybe some one put it in my server ..</p> <p>it is strange ..</p> <p>maybe you can know what is mean?</p> <p>here : <a href="http://codepaste.net/3rj6y8" rel="nofollow">http://codepaste.net/3rj6y8</a></p>
php
[2]
3,737,964
3,737,965
Script tag in JavaScript string
<p>I am encountering an issue where having a ending script tag inside a quoted string in JavaScript, and it is killing the script. I assume this is not expected behaviour. An example of this can be seen here: <a href="http://jsbin.com/oqepe/edit">http://jsbin.com/oqepe/edit</a></p> <p>My test case browser for the in...
javascript
[3]
3,690,525
3,690,526
Strange behavior when comparing float with a constant
<p>I was struck by this strange behavior:</p> <pre><code>float pi = 3.14; if(pi == 3.14) cout &lt;&lt; "OK"; else cout &lt;&lt; "How is it possible?"; </code></pre> <p>Could anyone explain this?</p>
c++
[6]
4,590,892
4,590,893
Is it possible to call a method with a null parameter but have the argument not be null?
<p>In the function below, what can I use to replace <code>&lt;typedefinition&gt;</code> to make the program print "O noes!"?</p> <pre><code>public static void main(String[] args) { Object o = null; story(o); } private static void story(&lt;typedefinition&gt; o) { if (o != null) System.out.println("...
java
[1]
1,233,346
1,233,347
problem with installing app in the device
<p>I have an android app. (built for 1.5) while installing it on my device it creates no error, but while running it, it says "the application is not installed in your phone".. can any one help me...? I have tried this installing after uninstalling it for many times...</p> <p><strong>Manifest file:</strong></p> <pre...
android
[4]
489,124
489,125
Problems with reading and searching thru txt file with PHP
<p>I am writing a small script which checks if a users has his username in file called whitelist.txt or not. If the username is not found its added. This is the script:</p> <pre><code>$fh = @fopen("whitelist.txt", 'a+'); $stringData = $_POST[usr]. "\n"; if ($fh) { while (!feof($fh)) { $...
php
[2]
5,425,106
5,425,107
why the method with int parameter is considered for numerical value?
<pre><code>class Test { void m1(byte b) { System.out.print("byte"); } void m1(short s) { System.out.print("short"); } void m1(int i) { System.out.print("int"); } void m1(long l) { System.out.print("long"); } public static void main(String [] args) { Test test = new Test(); ...
java
[1]
2,998,583
2,998,584
Need timer to run after 10 seconds in C#
<p>I am working with socket programing ,I can to check the live connection of Users after some time intervals such as 10 seconds.But currently, i have no idea. how i will do it.</p> <p>Please help me. I shall be highly thankful.</p>
c#
[0]
3,049,586
3,049,587
Determine the file type using C#
<p>I have a web page that has the file upload component to upload the allowed document types only to my system (images only). I don't want to use the regular expression to determine the file type and using the extension.</p> <p>Please let me know if there is any other means of determining file types in C#.</p>
c#
[0]
1,262,166
1,262,167
Python Method Placement
<p>Can someone give me a solution to this</p> <pre><code>dosomething() def dosomething(): print 'do something' </code></pre> <p>I don't want my method defines up at the top of the file, is there a way around this?</p>
python
[7]
2,533,489
2,533,490
How a reference address become NULL in C++?
<p>I have a coredump,it shows a reference address is NULL....</p> <p>details:</p> <pre><code>(gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0x005b6c10 in raise () from /lib/libc.so.6 #2 0x005b8521 in abort () from /lib/libc.so.6 #3 0xf749e641 in Application::fatalSignal () at Application.cc:277 #4 &lt;signal ...
c++
[6]
5,993,388
5,993,389
Resizing the webview content
<p>I am loading image url on to webview it fetching the image as well but i need to display it in resizeable it means te height to be reduced,help me to get reduced height of the image.</p>
android
[4]
886,965
886,966
HTML-formatted selected text returns whitespace from a range selection
<p>I have a Javascript routine that retrieves the selection text by a user formatted as HTML:</p> <pre><code>function getHTMLOfSelection() { var range; if (document.selection &amp;&amp; document.selection.createRange) { range = document.selection.createRange(); return range.htmlText; } ...
javascript
[3]
3,409,436
3,409,437
Splitting a string into words in Java
<p>Could you please assist me with the code for splitting this string. I am using <strong>"|"</strong> as a special character to mark how the splitting is to be done</p> <p>The string is "<strong>The|value|is|infinite</strong>" so that after splitting I have 'the','value','is' and 'infinite' as separate strings. Thank...
java
[1]
2,103,213
2,103,214
What does it mean if change the order of code bugs occur?
<p>I change places function so that the caller is before called, an error occurs.</p> <p>What can say this character? Maybe somewhere in the distance of a kilometer bracket is not closed?</p> <p>UPD: For example, its code work correctly if I place first string at end:</p> <p>SCRIPT5022: Pass a function that returns ...
javascript
[3]
4,394,534
4,394,535
c# Progress Bar based on event and delgate not working
<p>I need help in troubleshooting my code. I have 3 classes. Class 1 is a WinForm with Progressbar on it. Class 2 is where the event is fired. Class 3 is the EventArg for the progress. The program compiles with out any errors, but when I click the button, the progress bar does not move!. </p> <pre><code>namespa...
c#
[0]
3,692,225
3,692,226
get contacts Birthday in iphone
<p>I got the code from stackoverflow of getting contacts birthday in label in iphone but it is printing in console 2013-01-09 13:31:15.913 addressBook[1478:c07] 1604-09-29 12:00:00 +0000 so how can only print birthdate.plz help me</p>
iphone
[8]
4,375,180
4,375,181
What's the difference between e.preventDefault(); and return false?
<pre><code>$("a.avatar").click(function(e){ e.preventDefault(); $("#thumbnails").fadeIn(); }); </code></pre> <p>and </p> <pre><code>$("a.avatar").click(function(e){ $("#thumbnails").fadeIn(); return false; }); </code></pre> <p>Both can achieve the same goal for me.</p>
jquery
[5]
4,267,495
4,267,496
android keyboard
<p>Hi I have added a new button in android virtual keyboard and gave name Done. Now i want to perform some action by pressing Done button. How to do this can any body help?</p> <p>Thanks &amp; Regards.</p>
android
[4]
3,400,037
3,400,038
how to set a confirm box with picture(javascript)
<p>In Chrome web store, when I add a new application, there is a confirm box with a picture (App icon) to ask me. I have tried to search the JavaScript code to find the answer but there is no result.</p> <p>Is it created by JavaScript API?</p>
javascript
[3]
5,263,896
5,263,897
Refer to class variable in another class variable definition
<pre><code>class SomeClass: SOME_CONST = "hello" SOME_OTHER_CONST = SomeClass.SOME_CONST + " world" </code></pre> <p>This doesn't work.</p> <blockquote> <p>NameError: name 'SomeClass' is not defined</p> </blockquote> <p>Is there any way to refer to the class within the class?</p>
python
[7]
5,508,882
5,508,883
Get the ActionBar to redraw itself?
<p>I'd like to replace the icon used for an ActionBar item at runtime (it appears as an action item on the ActionBar). I'm trying the following:</p> <pre><code>private Map&lt;Integer, Integer&gt; mPendingReplacements = new HashMap&lt;Integer, Integer&gt;(); @Override public boolean onCreateOptionsMenu(Menu menu)...
android
[4]
3,880,289
3,880,290
How to use a UIButton as a toggle switch
<p>I am using a UIButton of custom type and what I want is use it like a toggle switch with the change of image. Like when it is clicked if previously it was not in selected mode it should go in selected mode or otherwise vice-a-versa. Also it will have a different image and when it is selected it will have a different...
iphone
[8]
5,374,778
5,374,779
jquery mobile - Aligning issue
<p>I have the following in jquery mobile:</p> <pre><code> &lt;div class="ui-grid-b"&gt; &lt;div class="ui-block-a" style="width:40%"&gt; &lt;label for="Main_deg"&gt;Deg&lt;/label&gt; &lt;asp:DropDownList id="deg" runat="server"&gt; &lt;/asp:DropDownList&gt; &lt;/div&g...
jquery
[5]
37,934
37,935
HTC problems with android application
<p>I have written a simple android application for auto-replying to SMS messages. It starts a service for monitoring incoming messages, then replies to them.</p> <p>It works fine using the Elipse AVD as well as the 3 Motorola phones I have installed it on. I have been having problems with it causing problems with "com...
android
[4]