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
369,617
369,618
how to insert the text of a select box into a hidden field
<p>I need to insert the text of a selected text box into a hidden field, I'm not quite sure how to achieve that,</p> <p>any help would be appriciated.</p> <pre><code>&lt;form id="select"&gt; &lt;select name="select" id="select"&gt; &lt;option&gt;NY, 10&amp;quot;, £6.65&lt;/option&gt;...
jquery
[5]
5,718,366
5,718,367
how to use java stringtokenizer?
<p>how to use java stringtokenizer for the below string</p> <p>|feild1|field2||field4|...</p> <p>i want java to take the blank as a field too, but stringtokenizer is skipping it.</p> <p>Any option to get it?.</p>
java
[1]
1,862,295
1,862,296
Java: check for null or allow exception handling
<p>I'm wondering about the cost of using a try/exception to handle nulls compared to using an if statement to check for nulls first.</p> <p>To provide more information. There's a > 50% chance of getting nulls, because in this app. it is common to have a null if no data has been entered... so to attempt a calculation u...
java
[1]
4,186,560
4,186,561
psycopg2. Ident Authentication failed for user 'clutch'
<p>I have tried many links with the same error but when I try to connect to clutchio server, this error is displayed and the following message displays Starting clutchrpc on 0.0.0.0:41674... It takes long time and server never starts</p> <p>Could anyone please help me with the issue.</p> <p>This is my pg_hba.conf fi...
android
[4]
1,818,584
1,818,585
Using PHP and MySQL to develop website
<p>I want to develop a professional website using PHP and MySQL. Can i do it in Windows 7 (64-bit) or i need to install linux based OS. How to go for it.</p>
php
[2]
3,114,155
3,114,156
How do I add white space between word
<p>I want to add space to word something like this</p> <pre><code>CountryName RegionName ZipPostalCode </code></pre> <p>to be</p> <pre><code>Country Name Region Name Zip Postal Code </code></pre> <p>Let me know how can be done with php</p>
php
[2]
786
787
Guard code after switch on enum is never reached
<p>I have just hit a confusing problem when trying to compile some code using g++ 4.4.3.</p> <p>The code below compiles fine, but instead of hitting the expected assert when I pass an 'invalid' enum value, the function just returns 1. What I find even stranger is that when I uncomment the lines pertaining to the E3 en...
c++
[6]
1,201,736
1,201,737
How to replace words in file?
<p>In test.txt:</p> <pre><code>rt : objective tr350rt : objective rtrt : objective @username : objective @user_1236 : objective @254test!! : objective @test : objective #15 : objective </code></pre> <p>My codes:</p> <pre><code>import re file3 = 'C://Users/Desktop/test.txt' rfile3 = open(file3).read() for altext in r...
python
[7]
5,852,486
5,852,487
SharedPreferences file not being removed on uninstall
<p>I have a suspicion that this might be due to my running a custom rom... but I figured I should at least come by and ask here.</p> <p>I'm working on an app that uses some SharedPreferences. Everything in that aspect works fine, but after completely uninstalling and then installing again, I found that my SharedPrefer...
android
[4]
1,539,959
1,539,960
Is there any way to track the server is going offline during ftp file download process via php
<p>Is there any way to track the server is going offline during ftp file download process via php?</p> <p>I've only found this function ftp_nb_continue() which has a returning value FTP_FAILED. Now it's seems to me that we only gonna receive this value if something goes wrong during the download, except the ftp server...
php
[2]
2,038,329
2,038,330
iPhone standard UI details
<p>Are there any UI standards with respect to font size, color, height of a section header in table view, padding, image size in a table cell etc. If yes, can you please guide me where can I found them.</p>
iphone
[8]
187,080
187,081
python:send class object in socket.sendto()
<p>I want to send a class object in socket.sendto(classObject , (host , port)).</p> <p>Basically I want to send some more information with the message.How can I do this.</p>
python
[7]
3,901,792
3,901,793
How to open pdp context(2G, 3G) in the libraries layer without using httpclient directly
<p>I usually make functions used in libraries layer in android. These day, I need to make new function using http protocol. So I found httpclient in Java layer. But I want to know how to open pdp context(2G, 3G) in libraries layer without using httpclient in java layer directly.</p> <p>Tthanks in advance mark.</p>
android
[4]
842,780
842,781
How to utilize Asp.net 4.0 native registration
<p>I have created an ASP.net (4.0) website that uses the auto-generated user registration and login. Is there anyway i can utilize the registration method of the app without using the form provided, such that when I manually pass the required data to some function the person could be registered?</p> <p>The generated r...
asp.net
[9]
4,615,772
4,615,773
What are the differences between these two javascript cases?
<pre><code>var foo1 = function () { return { init: function () { alert(this+" hello foo1"); } }; }(); var foo2 = { init: function() { alert(this+" hello foo2"); } }; foo1.init() foo2.init() </code></pre> <p>The differences I see are:</p> <ul> <li>the first is "clos...
javascript
[3]
3,191,067
3,191,068
Encapsulation in Java
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/114237/considering-object-encapsulation-should-getters-return-an-immutable-property">Considering object encapsulation, should getters return an immutable property?</a> </p> </blockquote> <p>Does encapsulation ma...
java
[1]
1,956,831
1,956,832
PHP regex in simple_html_dom library
<p>I was trying to scrape imdb by following code. </p> <pre><code>$url = "http://www.imdb.com/search/title?languages=en|1&amp;explore=year"; $html = new simple_html_dom(); $html-&gt;load(str_replace('&amp;nbsp;','',$data = get_data($url))); foreach($html-&gt;find('#left') as $total_movies) { $content = $total_movies-...
php
[2]
707,870
707,871
How can I balance the load of a UI across several processor cores?
<p>I am running a C# winform application that shows huge number of statistics and charts frequently. This application consist of multiple forms, each form has different output. When I open the task manager and check out the cpu usage, I find that only one core out of my eight cores is over loaded and the rest are doing...
c#
[0]
2,182,260
2,182,261
Get list of File object of Internal memory
<p>I want to write something like file manager, but don't understand how get begin directory(not SD card), namely all besides sd card. I try like this:</p> <pre><code>File myDir=new File("/"); File myDir=Environment.getDataDirectory(); File myDir=Environment.getRootDirectory(); </code></pre> <p>.. I try to use <code>...
android
[4]
2,992,494
2,992,495
Loop array for scrape
<p>I have an array with some values</p> <pre><code>$array = array("Bob","jim","frank","pat"); </code></pre> <p>And i have some scrape code from simple html dom</p> <pre><code>$html = file_get_html('http://somesite.com?search=name'); //itteration and so on </code></pre> <p>I want to be able to give the url the value...
php
[2]
3,521,181
3,521,182
How to detect if an sdcard or mount point will mount as removable storage or MTP?
<p>When an android phone is connected to a computer with a USB cable it may mount as removable storage but some phones might mount it as mtp (media transfer protocol) is there a way to detect this in android whether a sdcard will mount as removable or mtp?</p>
android
[4]
3,298,012
3,298,013
C++ string parsing
<p>All:</p> <p>I got one question in string parsing:</p> <p>For now, if I have a string like "+12+400-500+2:+13-50-510+20-66+20:"</p> <p>How can I do like calculate total sum of each segment( : can be consider as end of one segment). For now, what I can figure out is only use for to loop through and check +/- sign,...
c++
[6]
5,798,755
5,798,756
Country wise address validation c#
<p>in my case user will select country in the form and also fill up other detail. user can select any country in the worl i need a api which validate postcode based on country. is there anything available. please share with me.</p>
c#
[0]
1,100,365
1,100,366
ASP.net: What type of application/website is more suitable to Webform or MVC?
<p>I have read all the post regarding the pro and con of ASP.net webform vs mvc.</p> <p>However, I'm wondering under what circumstance does one use webform or mvc? would it come down to what you or your team is more familiar with?</p>
asp.net
[9]
4,270,684
4,270,685
How to stop is_callable from displaying includes
<p>I am trying to use <code>is_callable</code> to check for class and method existence, it goes very well but keeps displaying my include parameters.</p> <p>Here is the code:</p> <pre><code>if(!is_callable(array(self::$classy,self::$action))) { self::$classy = 'index'; self::$action = 'index'; } </code></pre...
php
[2]
1,127,021
1,127,022
Listing contents of classes in Java
<p>Folks, is there somewhere on the Net where I can find a list of the contents of standard Java classes? Say I wanted to know what functions the class Math contains. Can someone please point me in the right direction?</p> <p>Just feeling my way as a beginner. Sorry for the dumb question :-)</p> <p>Thanks in advance,...
java
[1]
3,573,346
3,573,347
Python reverse list
<p>Im trying to reverse a string and using the below code but the resultant reverse list value is None.</p> <p>Any inputs </p> <p>Code</p> <pre><code>str_a = 'This is stirng' rev_word = str_a.split() rev_word = rev_word.reverse() rev_word = ''.join(rev_word) </code></pre> <p>Error: Typeerror</p>
python
[7]
4,470,871
4,470,872
no icon for alert dialog
<p>even if I don't set icon <code>.setIcon(android.R.drawable.ic_dialog_alert)</code> for dialog box, it is showing info icon.</p> <p>How can I completely remove the icon from dialog box?</p> <pre><code>new AlertDialog.Builder(MyActivity.this) .setTitle(R.string.success_title) .setMessage(R.string.success_msg...
android
[4]
139,387
139,388
How to categorized results from SQL, display 6 columns and set colorize on every category
<p>I would like to ask for help on how to achieve this. I have this code below that pull records from DB and display it in 6 columns.</p> <p>What I want to achieve is that, I want to display results on 6 columns but I want to categorize and set different color on every category.</p> <p>let say i want to display the w...
php
[2]
1,632,753
1,632,754
asp.net Response.Write
<pre><code> Response.Write("&lt;script&gt;alert('Konaklama Başarıyla Eklendi')&lt;/script&gt;"); string url = "NewAccommodation.aspx?mID=" + mID; Response.Redirect(url); </code></pre> <p>Hi, on the above code, it does not show the alert box because of the code lines after it. How to fix that?</p>
asp.net
[9]
84,007
84,008
How can I select for an input and a textarea?
<p>I have the following code:</p> <pre><code> $('input.update-grid', $form) .each(function () { var id = this.id.replace('modal', ''); $('#input' + id).val(this.value) }) </code></pre> <p>I would like this to also select for textareas that have a class of...
jquery
[5]
3,245,420
3,245,421
Error in the use of the function library from JNI
<p>When I run this code:</p> <pre><code>package jni_2; public class Min2 { static { System.loadLibrary("kernel32"); } public native long FlushProcessWriteBuffers(); public static void main(String[] args) { Min2 c = new Min2(); c.FlushProcessWriteBuffers(); } } </code></p...
java
[1]
536,180
536,181
HTML Source to PHP forms
<p>I have a system that exports data to a HTML page. What i need is to take that data and import it to a PHP page</p> <p>Client="3883561112" Response Type="OnLBSResponse" RefNo="827627628"</p> <p>this is how it is output into the HTML page</p> <p>I need to take the information of say Client and insert it into a PHP ...
php
[2]
2,590,966
2,590,967
Javascript Function Events Not Firing in Order
<p>I have a function that is meant to clear a div of all its children with a specific name before refilling said div with a new set of children. </p> <pre><code>function displaySearchResults(resultsList) { var length = resultsList.length; var searchDiv = document.getElementById('search-results'); //CLEAR DIV if(searc...
javascript
[3]
3,831,387
3,831,388
How to hide an element, based on its text, with JavaScript?
<p>I'm a beginner developer. I'm trying to hide a div that is dynamically added to the page by a 3rd party JavaScript for aesthetic purposes.</p> <p>The problem is that the div has no <code>id</code> attribute; is this even possible? Do divs have any inherent attributes based on the order in which they load? Or is the...
javascript
[3]
4,237,638
4,237,639
Android: Dismissing one popup window when the next is called?
<p>I have 3 Image buttons and on press they each have a Popup window that opens up. The issue is when i click on button 1, there is a popup, if I DONT dismiss that popup but click on Button 2 instead, the pop-up for Button 1 and Button 2 appear. How do i dismiss any open Pop-up's when a new button is pressed?</p> <p>...
android
[4]
2,512,231
2,512,232
are there any way to input text from user without using editText
<p>i'm newbie in android programming i want to make typing game on android but i don't want to use editText to input text from user. are there any way to input text from user ? </p>
android
[4]
3,915,152
3,915,153
how to display the same value into another class's textfield?
<p>hi all i have implemented code as shown in the below here problem is when i clicked on click event textfield *settextvalue value is not appearing into the next view textfield for this give me the solution in iphone. </p> <p>ClassA.h</p> <pre><code>@classB { UITextField *settextvalue; ClassB *b; } @propert...
iphone
[8]
2,296,553
2,296,554
Detect if Variable Contains Number Sequence
<p>I have a variable like this:</p> <p>33,100,200</p> <p>I need to detect if it contains a specific number, say</p> <pre><code>if(var contains '33'){ do stuff } </code></pre> <p>But it has to not work if say they didn't have 333 in the variable the above statement shouldn't validate the if statement.</p> <p>Edit...
php
[2]
1,726,518
1,726,519
jQuery select and unselect image
<p>i have image set div tag like below</p> <pre><code>&lt;div style="width: 600px; background: #CCC;padding: 50px;" class="jjj"&gt; &lt;img src="http://www.nasa.gov/images/content/297522main_image_1244_946-710.jpg" class="ddd" width="200"/&gt; &lt;img src="http://www.nasa.gov/images/content/297522main_image_1244_946-...
jquery
[5]
2,564,179
2,564,180
Is it a good practice to prefix the function definition with namespace in CPP files?
<pre><code>// classone.h namespace NameOne { class ClassOne { public: ... void FuncOne(); ... }; } // *** Method 1 *** // classone.cpp namespace NameOne // always define member functions inside the namespace { void ClassOne::FuncOne() { ... } } // *** Method 2 *** // classone.cpp void NameOne::Class...
c++
[6]
2,933,438
2,933,439
Why is code after document.write() not executed?
<p>I have the follwing JavaScript. </p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script language="JavaScript"&gt; function fdivisible() { document.write("&lt;h1&gt; Just a javascript demo&lt;/h1&gt;"); var x=document.forms["aaa"]["txt1"].value; ...
javascript
[3]
182,531
182,532
C2678 error on remove from list of custom datatypes
<p>I'm currently hard at work on an assignment piece, which contains several custom datatypes. I've run into a problem where list is complaining that I am trying to remove a custom data type from a list of that same data type.</p> <pre><code>Error 3 error C2678: binary '==' : no operator found which takes a left-h...
c++
[6]
1,188,699
1,188,700
Replace jQuery from div to id
<p>Is there any way to replace a content using jQuery from - let's say,</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;div class="information1"&gt; This is the information. &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>to</p> <pre><code>&lt;html&gt; &lt;body&gt; ...
jquery
[5]
5,270,986
5,270,987
How to get value using DOM HTML
<p>I have a html:</p> <pre><code>$content = " &lt;tr&gt; &lt;td class="ttl"&gt;&lt;a href="#"&gt;Colors&lt;/a&gt;&lt;/td&gt; &lt;td class="nfo"&gt;Dark Grey, Rose Red, Blue, Brown, Sand White&lt;/td&gt; &lt;/tr&gt;"; </code></pre> <p>And code php:</p> <pre><code>$dom = new DOMDocument(); @$dom-&gt;loadHTML($co...
php
[2]
1,537,290
1,537,291
Why doesn't my DOM get updated when I change the HTML with jQuery?
<p>I have the following:</p> <pre><code>&lt;div id="info-message"&gt;&lt;/div&gt; </code></pre> <p>I am changing the text in between the DIVs like this:</p> <pre><code>$('#info-message').html = "xxx"; </code></pre> <p>However even though I can step through this in the firebug debugger I don't see any change on the ...
jquery
[5]
5,127,151
5,127,152
android game image
<p>Can you help me making a touchable image? And when you place it to its correct place, a pop up message will come and displays text. My game is a body parts game that you will be placing the body parts to its corresponding places... Help me please, I will highly appreciate your responses, thanks a lot....</p> <pre><...
android
[4]
509,242
509,243
If string does not contain any of list of strings in python
<p>I have a list of strings, from which I want to locate every line that has 'http://' in it, but does not have 'lulz', 'lmfao', '.png', or any other items in a list of strings in it. How would I go about this?</p> <p>My instincts tell me to use regular expressions, but I have a moral objection to witchcraft.</p>
python
[7]
2,779,000
2,779,001
Error using clientY when vertical scrollbar exists
<p>I am trying to popup a div whenever a span with id <code>toolpopup</code> is clicked (div should appear at those coordinates) and it works fine for the spans which are at the top of the page. But when i scroll down and click the span the div is created but not at the desired coordinates. What could be possibly wrong...
javascript
[3]
5,344,193
5,344,194
What Advantage Does HasOwnProperty Offer When Checking if a Property Exists As Part of An Object Literal?
<p>The code I'm referencing comes from <a href="http://stackoverflow.com/a/1961068/122164">this</a> answer:</p> <pre><code>Array.prototype.getUnique = function(){ var u = {}, a = []; for(var i = 0, l = this.length; i &lt; l; ++i){ if(u.hasOwnProperty(this[i])) { continue; } a.push(this...
javascript
[3]
2,556,486
2,556,487
documentBuilder.parse fails under android 4.0.3
<p>I my application, documentBuilder.parse(inputStream) throws the following error in Android 4.0.3.</p> <pre><code>"SAXException : Unexpected token (position:TEXT ?xml version='1....@1:38 in java.io.InputStreamReader@419ae708)" </code></pre> <p>The same code is working in all the older versions of android.</p> <p>...
android
[4]
617,079
617,080
Android Application looks like iphone
<p>I am an experienced iphone developer and recently taken the plunge into android development as well. i came across this app and i wonder how was it developed on android (Cause it looks so much like an iphone app), see link below <a href="http://lh5.ggpht.com/_63_i7B_SEMw/SmhfwhjWx2I/AAAAAAAAAI8/OoA40e42clo/s400/NYTi...
android
[4]
3,574,980
3,574,981
How to display data in android page using Accordion?
<p>In my project I need to <strong>display more number of details</strong> of a customer. So I need to use <strong>Accordion</strong> for that page for displaying the details. Can anybody suggest us how to do that in android? Is it possible? Please help me regarding this.</p> <p>Thank you,</p>
android
[4]
1,082,340
1,082,341
What causes the blackhole effect?
<p>By blackhole I mean, errors in code which throw no error.</p> <p>I made a mistake where I called a method that did not exist like this:</p> <pre><code>NS.doesNotExist(); // NS exists. doesNotExist doe not. </code></pre> <p>and JavaScript did not tell me anything. I had to troubleshoot.</p> <p>Is there a reaso...
javascript
[3]
5,160,484
5,160,485
Console.Write syntax: what does the format string "{0, -25}" mean
<p>I am writing C# code</p> <pre><code>Console.Write("{0,-25}", company); </code></pre> <p>In above code what does this <code>"{0,-25}"</code> thing mean?</p>
c#
[0]
2,030,721
2,030,722
Python - split string into smaller chunks and assign a variable
<p>Is it possible to split a string in python and assign each piece split off to a variable to be used later? I would like to be able to split by length if possible, but im not sure how it would work using len().</p> <p>i tried this but its not getting me what i needed:</p> <pre><code>x = 'this is a string' x.split('...
python
[7]
1,789,664
1,789,665
Client Side File Generation and Download
<p>Hi as u understand from question title, I want client side file generation and download. I know there is Downloadify that exactly do what I said. But downloadify is using flash + javascript. I just want to do that with jQuery. I have a text and I have a link. When user click the link, it will generate a file with th...
jquery
[5]
5,913,842
5,913,843
.Trim() when string is empty or null
<p>I'm receiving some data from the client in the form of json. I'm writing this:</p> <pre><code>string TheText; // or whould it be better string TheText = ""; ? TheText = ((serializer.ConvertToType&lt;string&gt;(dictionary["TheText"])).Trim()); </code></pre> <p>If the variable that's being parsed from json comes bac...
c#
[0]
1,418,634
1,418,635
JQuery hide priority over show?
<p>I'm having an issue with JQuery show and hide. When I hover over an element, I want to show another element pop out to the right. I have managed that with the following code:</p> <pre><code>var actionHoverInListener = function () { $(this).children('.pop-out').show("slide", { direction:"left" }, 100); }; var ...
jquery
[5]
1,893,605
1,893,606
How to remove duplicate values from a list in c++
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4877504/how-can-i-remove-duplicate-values-from-a-list-in-c">How can I remove duplicate values from a list in c++?</a> </p> </blockquote> <p>Hi, I have to remove duplicate values from a list in c++. can any one t...
c++
[6]
1,871,693
1,871,694
How can i only apply animation for activity but not for toolbar?
<p>I have several activities which have the same toolbar at bottom of each activity. The problem that i'm encountering is when i apply animation slide in/out for all activities, the whole of activity will be applied this animation. But i don't want toolbar do this animation. I mean that when i move from an activity to ...
android
[4]
561,549
561,550
In Java, how do I override the class type of a variable in an inherited class?
<p>In Java, how do I override the class type of a variable in an inherited class? For example:</p> <pre><code>class Parent { protected Object results; public Object getResults() { ... } } class Child extends parent { public void operation() { ... need to work on results as a HashMap ... results.put(resu...
java
[1]
5,722,194
5,722,195
How can I eliminate an element in a vector if a condition is met
<p>I have a vector of Rect: <code>vector&lt;Rect&gt; myRecVec;</code></p> <p>I would like to remove the ones which are overlapping in the vector:</p> <p>So I have 2 nested loop like this:</p> <pre><code>vector&lt;Rect&gt;::iterator iter1 = myRecVec.begin(); vector&lt;Rect&gt;::iterator iter2 = myRecVec.begin(); whi...
c++
[6]
3,052,026
3,052,027
Compile an exe file inside c++
<p>I want to create a c++ program in which</p> <ol> <li><p>I can read an external file (that can be exe,dll,apk...etc...etc). That is read the file convert them into bytes and store them in an array</p></li> <li><p>Next,I want to compile the bytes inside the array Now this is the tricky part i want to compile the byte...
c++
[6]
1,181,972
1,181,973
System service or disable uninstalling?
<p>Is it possible to write an android "service" that cannot be erased/disabled/uninstalled?</p> <p>Thanks</p>
android
[4]
5,862,804
5,862,805
input from the keyboard and print out asterisks
<p>Hi there I'm trying to input 3 integers from the keyboard and print rows of asterisks equal to the integers input from keyboard. I really appreciate if someone could help on this, thanks in advance.</p> <pre><code>public class Histogram1 { /** * @param args the command line arguments */ public sta...
java
[1]
2,862,437
2,862,438
jQuery change function and IE 7
<p>I know that change() is not working with IE7.</p> <p>Although I still need to find a solution to my problem: Here is my jQuery:</p> <pre><code>$("input[type='checkbox']").change(function () { if ( $("input[type='checkbox']").is(':checked') ) { $(".subbut").show(); } else { $(".subbut").hide(); ...
jquery
[5]
3,162,836
3,162,837
Checkout files from tortoise svn using subprocess.Popen
<p>I was using this command to check out the file using Tortise svn</p> <pre><code>work = "F:\Test" exe = "C:\\Program Files\\TortoiseSVN\\bin\\TortoiseProc.exe" argu = ("/command:checkout /url:https://Test/help /path:" + str(work)) proc1 = subprocess.Popen([exe, argu]) </code></pre> <p>Once I run the this command I ...
python
[7]
2,792,573
2,792,574
Problem in Multiple button onclick event in iPhone
<p>I have created five buttons in a for loop dynamically. Now I want to associate an OnClick event with every button which do different actions. How I can do this and how can I detect which button is clicked?</p> <pre><code>for (NSUInteger i=0;i&lt;5;i++) { UIButton *myButton1 = [[UIButton buttonWithType:UIButtonT...
iphone
[8]
1,728,887
1,728,888
How to make doubles always contain a . character?
<p>I noticed my doubles contain different precision characters depending on regional settings. </p> <p>For example:</p> <p><code>3,47</code> or <code>3.45</code></p> <p>How can I enforce the double should always contain a <code>.</code> precision character?</p> <p>Problem is once I serialize the class containing th...
c#
[0]
1,660,751
1,660,752
Toggle the display of a text field with a checkbox
<p>When Unlimited is checked, remove the input box. That works. However, when the checkbox is unchecked the input box wont show back up.</p> <pre><code>&lt;script type="text/javascript"&gt; function getQuantity() { var checkbox = document.getElementById("unlimited"); var qty = document.getElementBy...
javascript
[3]
1,828,119
1,828,120
Parent.FrameName.FunctionName is not working in Mozilla
<p>This is what I am having in the page </p> <pre><code>&lt;frameset border="0" frameborder="0" frameSpacing="0"&gt; &lt;frame name="banner" src="one.aspx?tab=" marginwidth="0" marginheight="0"&gt; &lt;frame name="filter" src="two.aspx" marginwidth="0" marginheight="0"&gt; &lt;/frameset&gt; </code></pr...
javascript
[3]
130,983
130,984
Scrollable Canvas or surfaceview
<p>I want to create an application, wherein users can create a design on canvas with bitmaps and lines on it, but i want it to be scrollable i.e. my canvas should be larger than the screen size. I am using sufaceview and using canvas on it. But i have trouble having making it scrollable, what shold be my approach 1) ma...
android
[4]
2,851,237
2,851,238
How to determine when the text of an html element is changed
<p>I have an error message like this:</p> <pre><code>&lt;span class="errorMessage"&gt;Your input sucks!&lt;/span&gt; </code></pre> <p>and I need to determine when it changes. the validation framework I'm using sets the text when there's an error and removes it when it's complete. I'm hoping to tap into that by watchi...
jquery
[5]
2,915,966
2,915,967
Reccomended C# book for strictly web programming?
<p>I have Visual Studio 2010 Ultimate, and SQLServer 2008 so tools are not an issue. I'm going to be learning some web C# for work and I would like a recommendation for a total beginner, and then something of an intermediate book (unless there is one that can do them both). Thanks!</p>
c#
[0]
2,463,586
2,463,587
How to get Bitmap image from OI file manager path?
<p>My application requires an image to be selected from gallery.</p> <p>I start activity:</p> <pre><code>Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent,"Select Picture"), PICK_IMAGE); </code></pre> <p>It will pr...
android
[4]
1,119,313
1,119,314
select change event is triggering multiple times
<p>Very strange thing is happening with the 'change' event of the dropdown list.</p> <p>Basically I have a dropdown, on change of which i have to do some cross domain web service call. This call is being made from the javascript itself. </p> <p>For the first time when i change an item in the 'select' list the change...
javascript
[3]
1,342,044
1,342,045
How to get a list of available network providers?
<p>I'm trying to get a list of the available cellular network providers. Unfortunately I can't find any service or class that might help me out. Does anyone have an idea on how to manage this? It has to be possible since you can see the list when you go to the settings on your Android device.</p>
android
[4]
695,719
695,720
What control to render dynamic HTML text on an aspx page
<p>Page_Load generates a string of HTML for a dashboard. (html) </p> <p>What control on an aspx page to bind that "text" to so when the page renders you see the tables, and buttons within?</p> <p>Tried </p> <p>With dhtml.Text = html but I don't see the buttons. I do see the tables as well as the borders of cells t...
asp.net
[9]
20,263
20,264
jquery escape character issue?
<p>I have this jquery issue that seems to only break when using background image url. My impression is that it looks like a character escape issue, but i could be wrong.</p> <p>Here's what i have for a working demo version: <a href="http://jsfiddle.net/W4CZG/" rel="nofollow">http://jsfiddle.net/W4CZG/</a></p> <p>Esse...
jquery
[5]
6,028,217
6,028,218
Insert a row of elements into a multi-dimensional array based on index
<p>Insert a row of elements into a multi-dimensional array based on index</p> <p>For Example:</p> <pre><code>MultiArray = new Array(5); MultiArray [0] = new Array(2); MultiArray [0][0] = "Tom"; MultiArray [0][1] = "scientist"; MultiArray [1] = new Array(3); MultiArray [1][0] = "Beryl"; MultiArray [1][1] = "eng...
javascript
[3]
2,332,112
2,332,113
JQuery click event not targeting div children
<p>I have a problem which seems simple, but I can't seem to find a solution. I basically have a div which triggers a click event. My html is:</p> <pre><code> &lt;li class="infobox"&gt; &lt;a href="#"&gt;&lt;img class="thumb" src="img/2.jpg" alt="image02" /&gt;&lt;/a&gt; &lt;div class="over"&gt; &l...
jquery
[5]
4,014,937
4,014,938
android: access local network share
<p>I was wondering, is there any way to get a file/directory listing from a local network share?</p> <p>Iam trying to make an app that shows an overview of all the movies or music on my NAS.</p> <p>Martijn Lenderink</p>
android
[4]
3,103,506
3,103,507
how can i remove script virus from my script
<p>i have following code added automatically into my script...</p> <pre><code>&lt;script type="text/javascript" src="http://obscurewax.ru/Kilobyte.js"&gt;&lt;/script&gt; &lt;!--72628eb2e686638651ad69b6a34a630f--&gt; </code></pre> <p>at the end of my each page when i see source code of my page it shows me the above c...
javascript
[3]
844,183
844,184
Surround outputted email addresses in quotation marks in Python3.2
<p>I have a small script:</p> <pre><code>#!/usr/bin/python3.2 #takes the bad_emails out of full_emails and leaves us with good_emails #This is a manually generated list of bad emails (bounce backs) bad_list = [] with open("bad_emails.txt","r") as bad: for line in bad.readlines(): bad_list.append(line) #th...
python
[7]
216,561
216,562
Can an app delete its own internal resources?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4398523/how-we-can-remove-a-file-from-the-assets-folder-at-runtime-in-android">how we can remove a file from the assets folder at runtime in android?</a> </p> </blockquote> <p>I am trying to find a way to delete...
android
[4]
350,068
350,069
Help me understand this Strange C++ code
<p>This was a question in our old C++ exam. This code is driving me crazy, could anyone explain what it does and - especially - why?</p> <pre><code>int arr[3]={10,20,30}; int *arrp = new int; (*(arr+1)+=3)+=5; (arrp=&amp;arr[0])++; std::cout&lt;&lt;*arrp; </code></pre>
c++
[6]
2,400,710
2,400,711
Use of comma with class name in a variable declaration in C#?
<p>I can understand the use of the latter one. Can you explain the use of the following comma? </p> <pre><code>private WaveGestureTracker[,] _PlayerWaveTracker = new WaveGestureTracker[6, 2]; </code></pre>
c#
[0]
546,337
546,338
how to extract plain text from ms word document file in pure c++?
<p>Is there any pure c++ library to extract plain text from .doc file. I'm developing a c++ program to read .doc, .pdf file. And i have to extract plain text from that file and write into a .txt file. If any one know please help me.</p> <p>Thanks.</p>
c++
[6]
5,197,246
5,197,247
Destroying Activity or application itself from another application
<p>I have two applications. One is a receiver and its starting my application. It works fine. Now i want destroy my application from the receiver itself. Is that possible ? Please note that these are my own application</p>
android
[4]
1,949,545
1,949,546
find control and html tags
<p>i have this code in my default aspx file : </p> <pre><code>&lt;body&gt; &lt;form id="form1" runat="server"&gt; &lt;div&gt; &lt;asp:PlaceHolder ID="holder1" runat="server"&gt; &lt;asp:Label ID="label1" runat="server" Text="Label"&gt; &lt;/asp:Label&gt; &lt;input ty...
asp.net
[9]
4,248,592
4,248,593
jQuery: checking slideToggle visibility not working?
<p>I am trying to use slide toggle to show a sign in form and if they click outside of the box, I want that form to slide up.</p> <p>I have everything running fine however my check for visibility isn't working and thus clicking outside the form container is not working. Can you spot why?</p> <pre><code>var loginForm...
jquery
[5]
4,705,355
4,705,356
php oop and mysql
<p>I need to get data, to check and send to db. Programming with PHP OOP.</p> <p>Could you tell me if my class structure is good and how dislpay all data?. Thanks</p> <pre><code>&lt;?php class Database{ private $DBhost = 'localhost'; private $DBuser = 'root'; private $DBpass = 'root'; private $DBname...
php
[2]
26,823
26,824
Javascript Function always returns wrong value, although variable had correct values before
<p>I have a function that returns the highest value of an attribute in an xml file</p> <p>The Value returned is always 0, so I think the value under the JQuery function doesnt know what happens inside of it. Here is the function:</p> <pre><code>function findHighestValue(url,attr){ var highestValue = 0; $.ajax({ t...
javascript
[3]
2,659,186
2,659,187
How to extract unique characters from a string?
<p>How to extract unique characters from a string using c#? </p> <p>For example:</p> <p>I have string "aabbcccddeefddg" and I want to extract unique charecters from the string, the result set should be "abcdefg". </p> <p><strong>Note</strong>: I don't want to use string.distinct function in c#.</p> <p>Thanks,</p> ...
c#
[0]
2,290,058
2,290,059
eval-ing a function, performance after being evaled
<p>We all know that the code:</p> <pre><code>var ssum = function(a,b) { return a+b; } </code></pre> <p>is executing faster than</p> <pre><code>eval("var esum = function(a,b) { return a+b; } "); </code></pre> <p>for many reasons. </p> <p>what I want to know is that if a function which was created by eval-ing a str...
javascript
[3]
5,158,686
5,158,687
How can I open Wifi Connection System Dialog?
<p>I want to write a application list AccessPoints and when you click one, a wifi connection dialog will open. I searched in the Internet and found some hint: startActivity(new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK)) – But I can't do it. Please help.</p>
android
[4]
605,185
605,186
is there a way to view the source of a module from within the python console?
<p>if I'm in the python console and I want to see how a particular module works, is there an easy way to dump the source?</p>
python
[7]
5,118,930
5,118,931
Javascript : repeat function not work
<p>I wrote this function to fly DIV from top right to bottom left:</p> <pre><code>var myObj; function infly() { myObj=document.getElementById('mydiv'); myObj.style.right='0px'; myObj.style.top='0px'; } function flyer() { var x=parseInt(myObj.style.right); var y=parseInt(myObj.style.top); ...
javascript
[3]
1,268,370
1,268,371
Some header passing variable?
<p>Im trying to pass some variables from the URL to the PHP script. Now I know that <code>www.site.com/index.php?link=HELLO</code> would require <code>$_GET['link']</code> to get the variable "link". I was hoping there are other ways to do this without the variable. </p> <p>For instance I want a link structure like th...
php
[2]