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,891,770 | 4,891,771 | Why we assigned the the value of variable "option" 1 before loops? | <p>I'm a new to programming and I chose python as my first language because its easy. But I'm confused here with this code:</p>
<pre><code>option = 1
while option != 0:
print "/n/n/n************MENU************" #Make a menu
print "1. Add numbers"
print "2. Find perimeter and area of a rectangle"
prin... | python | [7] |
4,409,415 | 4,409,416 | Java, converting string to numbers then add all the numbers together | <p>I need to add 8 numbers together from a string.E.g. If someone enters say 1234 it will add the numbers together 1 + 2 + 3 + 4 = 10 then 1 + 1 = 2. I have done this so far. I cannot figure out how to add these numbers up using a for loop.</p>
<pre><code>String num2;
String num3;
num2 = (jTextField1.getText(... | java | [1] |
4,463,861 | 4,463,862 | Java Hit Formulas | <p>I'm making a simple RPG game and finding out formulas is hard. So far I hav this:</p>
<pre><code>import java.lang.Math.*;
import java.util.*;
import java.text.*;
public class expTable {
public static void main(String[] args) {
int myLevel = 6;
int myAttack = 6;
int myDefense = 1;
DecimalFormat df = new Decim... | java | [1] |
4,146,898 | 4,146,899 | PHP variable in an ing src | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/12645493/use-img-source-with-php-variable">use Img source with php variable</a> </p>
</blockquote>
<p>I have a small issue here, i am sure it is an easy one but I am terribad at php.</p>
<p>I am using a WP plug... | php | [2] |
1,096,606 | 1,096,607 | How to create a static library from an Xcode project? | <p>I struggling with a problem. I am having two apps. I want to link/integrate those two apps to my third app. I need to keep all these three apps class files and other resource files independent. Because most of them have the same name. How can I do this? I have to convert them to library and integrate them? If so, ho... | iphone | [8] |
5,936,645 | 5,936,646 | KeyDown in jquery not updating when pressed | <p>I am trying to get the div to change the font size and update it on the screen. The following code works but there is a problem when you press a key you need to press another key to register the last key was pressed i dont know want that to happen. How would i make it update as soon as you press a key? </p>
<pre><c... | jquery | [5] |
992,588 | 992,589 | php drop down detect selection | <p>I have a date of birth, and when the user is over Feb (02), the days should go only to 29. As you can see I'm using <code>$month="1"</code> just to test it. I'm supposed to use PHP only, no JavaScript or anything else. How would i go about making that?</p>
<pre><code><?php
$month="1"; // <-- currently using t... | php | [2] |
5,556,163 | 5,556,164 | Advice with String and Char array | <p>For the application I am working on ,I want my text to be displayed as ticker text and I am using a Notification for that, the constructor is Notification(int,char array[],when).The problem is the second argument should be a char array but all I have is a string, now would the string serve the same purpose ,if I use... | android | [4] |
4,186,005 | 4,186,006 | How do i persist this change of layout in database using JQuery Portlet? | <p>I just saw this cool feature of JQuery which is JQuery Portlet</p>
<p><a href="http://jqueryui.com/demos/sortable/portlets.html" rel="nofollow">http://jqueryui.com/demos/sortable/portlets.html</a></p>
<p>I was just wondering how do i persist this to my database? so that it's available even for future sessions to a... | jquery | [5] |
2,529,677 | 2,529,678 | In which situation we use jmp_buf in C programming | <p><code>jmp_buf</code> is used in which situation durinf C Programming.</p>
<p><code>jmp_buf</code> is what?
I mean is it Keyword/data type ??</p>
| c++ | [6] |
3,588,021 | 3,588,022 | jQuery dynamically append table rows without flickering | <p>I have a page that every 5 seconds fetch new data from the server with jQuery ajax and append it to a table.
<br>
Everything is working fine except from one annoying issue.every append action causing the table to flickers.
<br>
I am looking for a way to smooth things a bit, and make this action more "eye friendly" ... | jquery | [5] |
2,742,271 | 2,742,272 | how to find modulus of a number in c# | <p>how to find modulus of a number in c# .net?</p>
| c# | [0] |
1,537,101 | 1,537,102 | Weird javascript output | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/850341/workarounds-for-javascript-parseint-octal-bug">Workarounds for JavaScript parseInt octal bug</a> </p>
</blockquote>
<p>I was learning the parseInt() function of javascript and was just trying out, and out... | javascript | [3] |
3,403,931 | 3,403,932 | jQuery image fader slow in IE6 & 7 | <p>I'm using the following jQuery script to rotate through a series of images pulled into an unordered list using PHP:</p>
<pre><code>function theRotator() {
$('#rotator li').css({opacity: 0.0});
$('#rotator li:first').css({opacity: 1.0});
setInterval('rotate()',5000);
};
function rotate() {
var curr... | jquery | [5] |
3,736,527 | 3,736,528 | Android Start Preference Activity Intent results in Exception | <p>i have a problem, i want to run an activity which handles a preference dialog</p>
<pre><code>Intent i= new Intent(getBaseContext(), PreferencesActivity.class);
startActivity(i);
</code></pre>
<p>when i run the app i only get an nullpointerexcepltion when the activity should start. what is wrong?</p>
<... | android | [4] |
3,954,319 | 3,954,320 | Last Time Contacted | <p>How does android calculate the value for last time contacted. It provides the value in integer format but I am unable to decipher the given value. For example what if I want to compare the two give values to know which contact has been contacted later. Any type of help would be appreciated. </p>
| android | [4] |
802,059 | 802,060 | can copy constructor be a conversion operator? | <p>Consider the following code.</p>
<pre><code>#include <iostream>
using namespace std;
class Test
{
private:
int x,y;
public:
Test () {
cout <<" Inside Constructor "<<endl;
x=100;
}
... | c++ | [6] |
1,007,838 | 1,007,839 | jquery remove behavior | <p>I have the following html</p>
<pre><code><div class="foobar">
<div> child 1 </div>
<div> child 2 </div>
<ul>
<li> list elem 1 </li>
<li> list elem 2 </li>
<li> list elem 3 </li>
</ul>
</div>
</code></pre>
<p>Wh... | jquery | [5] |
1,168,658 | 1,168,659 | pass functions as a parameter in JavaScript | <p>How do I pass functions as a parameter in JavaScript.</p>
<p>In the code below if I call <code>whatMustHappen (TWO(),ONE())</code> I want to them to fall in the sequence of the <code>x</code> and the <code>y</code> on the <code>whatMustHappen</code> function.</p>
<p>Right now it fires as it sees it in the paramete... | javascript | [3] |
3,914,394 | 3,914,395 | Sanitising a POST array for INSERT query | <p>Morning SO,</p>
<p>I have a checkbox array (name = "cat[]") in a form which at present, contains six values, 1- 6 (it may contain more in the future). A user can select any number of these. </p>
<p>These values are then collected in:</p>
<pre><code>$_SESSION['cat'] = $_POST['cat'];
</code></pre>
<p>(They're in a... | php | [2] |
774,408 | 774,409 | retrieve EditText multiline text as it is android? | <p>I want to get text from Edit text as it is and display in TextView.But whenver i get text using getText() it gives me text in one line. How to entered text in multiline EditText as it is. Please give me guidance?</p>
| android | [4] |
355,956 | 355,957 | Track changes of atributes in instance. Python | <p>I want to implement function which takes as argument any object and trackes changes of value for specific attribute. Than saves old value of attribute in old_name attribute.</p>
<p>For example:</p>
<pre><code>class MyObject(object):
attr_one = None
attr_two = 1
</code></pre>
<p>Lets name my magic functi... | python | [7] |
1,455,540 | 1,455,541 | posting back with a textbox vs label | <p>Here is my code - </p>
<pre><code>dtDetails = getDataSet();
foreach (DataRow dr in dtDetails.Rows) {
int rowID = 1;
HtmlTableRow row = new HtmlTableRow();
{
HtmlTableCell cell = new HtmlTableCell();
TextBox tb = new TextBox();
tb.ID = "tbJanuary" + rowID;
tb.Text = dr[... | c# | [0] |
512,481 | 512,482 | Read Value from ArrayList | <p>I have an array List as:</p>
<pre><code>{IDS=[10, 12], SALARY=[10000, 20000]}
</code></pre>
<p>What I want is, I should be able to print like</p>
<pre><code>IDS=10,12
SALARY=10000,20000
</code></pre>
<p>Code:</p>
<pre><code> ArrayList<HashMapImpl> ds = XmlUtils.getListFromXml("Abc", "XYZ", str);
Sy... | java | [1] |
4,986,244 | 4,986,245 | List uploaded files | <p>I have som files uploaded on a server. Lets say a mixture of .jpg, .doc and .txt
I want to list these on a webpage and supply a downloadlink. Preferably using only php/html/jQuery. (ie no SQL)
Can anyone help me how to do this? </p>
| php | [2] |
3,965,978 | 3,965,979 | Calculating overtime work | <p>Here's my code. </p>
<pre><code><p>You worked <?php echo $hours ?>hour(s) this week.</p>
<p>Your pay for the week is: <?php $wage = $_GET["wage"] * ($hours > 40 ? $hours * 1.5 : $hours);
;echo number_format("$wage",2); ?></p>
</code></pre>
<p>Thing about this is it calculat... | php | [2] |
6,020,395 | 6,020,396 | How to call root parent's function from n-th child window using javascript? | <p>there.
Let's say that I don't know how many child window would be open by window.showModalDialog.
If it's only 1 depth between child and parent, it would be easy to call parent's function using javascript.
But I have to open a child window and from that child window to another child window, and another, and another.... | javascript | [3] |
2,890,739 | 2,890,740 | Submit a form in a hidden php script | <p>I am working in a form, which is in a hidden script called by Ajax method.<br>
In this php script, I want t submit the information using an URL,using this piece of code:</p>
<pre><code>header("location: https://www.page.com/servlet/?encoding=UTF-8&oid=333&first_name=$first_name&last_name=$last_name");
<... | php | [2] |
3,095,128 | 3,095,129 | How to pause an Activity till I get facebook id while signing in in Android? | <p>While using facebook in Android to log in/register, it takes a while for facebook to send the request. Thus, how do I pause the activity(show a process dialog) till I get the facebook id/username of the user who is trying to register? I can't do this in the base Listener as it is a background process. </p>
<p>I tri... | android | [4] |
5,968,178 | 5,968,179 | Is it possible to use Loaders class in MapActivity? | <p>I have an android app to regularly record locations and store in a db in the background. db comes with content provider. use alarm receiver and service to set repetitive record task. </p>
<p>Now I'd like to put pins on a map using data(lat&long) in the db. I currently use a Loader to load the cursor and read da... | android | [4] |
1,900,424 | 1,900,425 | Sharing an object through several classes | <p>I need to share 1 instance between several classes.
The Connect class has methods to create a URL and to download data, and the ui is the interface (swing form) through which I get the data to build the url (dates theat comprise the url).</p>
<p>What's the best way to do it?</p>
<p>Thought of:</p>
<p>1) Making it... | java | [1] |
4,154,617 | 4,154,618 | Color flash in Jquery? | <p>I am working on a JQuery, which hides & shows a particular element whenever user checks a box. I want to do a color flash on the element which is changed from hidden to visible, so that user knows where it is.</p>
<p>I tried doing this </p>
<pre><code>jQuery("#login-form").show()
.css({bac... | jquery | [5] |
3,738,596 | 3,738,597 | Parents selector in jQuery | <p>I need to get all elements whose n-th parent (i.e. elem.parent().parent()...parent()) has a specific class. Is that possible?</p>
<p>For example:</p>
<pre><code><div class="success">
<div id="depth-1">
<div id="depth-2">
<div>Return me</div>
<div>Return me</... | jquery | [5] |
4,760,713 | 4,760,714 | Can I have a common Queue to queue up the requests received through function call? | <p>I will be happy, if you can give me some suggestions to solve my problem.</p>
<p>I have to make a function call from one program to another program (separate package). Now my question is, can i have a common Queue in the called program in which all the calling requests will be queued up ???? is it possible to main... | java | [1] |
4,691,681 | 4,691,682 | Namespaces and List Comprehension in python 2.7 | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4575698/python-list-comprehension-overriding-value">Python list comprehension overriding value</a> </p>
</blockquote>
<p>I did some googling around, but no solutions to this issue. It seems like list comprehensi... | python | [7] |
3,711,463 | 3,711,464 | Prevent android from sleeping in webapp | <p>I'm developing a <strong>webapp</strong> that receive notifications from a server. Currently, The target device is only an Android 4 device [a Samsung Galaxy Nexus]). As normal, when the user doesn't touch the screen for a while the screen goes off, lock screen.</p>
<p>I have search in the developers.adnroid.con pa... | android | [4] |
3,916,520 | 3,916,521 | PHP url question | <p>Is there a way I can strip out the variables from a link using PHP for example, if I have a link that reads <code>http://localhost/link/index.php?s=30&p=3</code> how would I strip out <code>?s=30&p=3</code> so my link reads <code>http://localhost/link/index.php</code></p>
| php | [2] |
260,164 | 260,165 | Android: Detecting application backgrounding | <p>Hey all,
I have an application that has many screens. Is it possible to detect if the screen NOT belonging to the application (not defined in my android manifest) comes into visibility?</p>
| android | [4] |
5,842,157 | 5,842,158 | Dynamically Specify the First Activity | <p>The main activity is specified in AndroidManifest.xml with:</p>
<pre><code> <intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</code></pre>
<p>But I don't ... | android | [4] |
1,246,458 | 1,246,459 | JavaScript open in a new window, not tab | <p>I have a select box that calls <code>window.open(url)</code> when an item is selected. Firefox will open the page in a new tab by default. However, I would like the page to open in a new window, not a new tab. </p>
<p>How can I accomplish this?</p>
| javascript | [3] |
5,155,053 | 5,155,054 | Understanding Traceview | <p>I am trying to understand how a traceview works. I have tried to analyze a method using the traceview but have a query about it. </p>
<p>I have attached the snapshot of the .trace. It indicates that the majority time is taken by (toplevel) marked in blue. however no further info is available on the same. (when this... | android | [4] |
1,572,856 | 1,572,857 | how to return newest object from the FIFO Queue without removing it | <p><code>Peek</code> Returns the object at the beginning of the Queue without removing it.</p>
<p>What if I want to do the same thing with the "last object in the queue". I.e. the "newest" one (the one was just inserted).</p>
<p>I've tried <code>queue.Reverse().Peek()</code> but this doesn't compile.</p>
| c# | [0] |
2,759,216 | 2,759,217 | Do I have to disable in-app purchase if I don't need it? | <p>I can see my new created iOS applications are defaulted to In-App purchase to enabled. I don't need in-app purchase. Do I have to explicitly disable it? Or It's okay for me to submit an app but simply without attaching any in-app purchases with the submission?</p>
| iphone | [8] |
1,863,591 | 1,863,592 | Code inside submit event executes after or before form submitting? | <p>Does the code inside <code>$('form').submit(function() {});</code> executes <strong>before</strong> or <strong>after</strong> the form submit?</p>
<p>For example, if I edit the value of one of the inputs there, will the new value be included on the request?</p>
| jquery | [5] |
1,829,936 | 1,829,937 | Multiple file_put_contents with with str_replace? | <p>I am trying to replace multiple parts of a string in a file with <code>file_put_contents</code>.
Essentially what the function does is finds a particular phrase in the file (which are in the <code>$new</code> and <code>$old</code> arrays and replaces it.</p>
<pre><code>$file_path = "hello.txt";
$file_string = file_... | php | [2] |
5,488,226 | 5,488,227 | jQuery Time Refresh | <p>I am using the jQuery countdown timer at <a href="http://keith-wood.name/countdown.html" rel="nofollow">http://keith-wood.name/countdown.html</a></p>
<p>I am trying to get the time remaining to refresh automatically without reloading the page. It is getting the remaining time from a MySQL DB and if I change the val... | jquery | [5] |
3,576,257 | 3,576,258 | C++ dynamic cast | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/28002/regular-cast-vs-static-cast-vs-dynamic-cast">Regular cast vs. static_cast vs. dynamic_cast</a> </p>
</blockquote>
<p>is there any harm in using static_cast when I know the type for sure?
Any issue if it ha... | c++ | [6] |
4,928,890 | 4,928,891 | Jquery window.location - how to open a blank window | <p>I have a login script and currently when all is done the client is redirected to the billing page.</p>
<p>I'd like this page to open in a new browser window not the existing one as the current code does.</p>
<p>Thank you for your help</p>
<p>Dave</p>
<pre><code>function go_to_private_pageb()
{
window.location = ... | javascript | [3] |
5,427,507 | 5,427,508 | FF keeps spinning after document.write() | <pre><code><html>
<head>
<script type="text/javascript" >
function fn() {
document.write("Hello there!!!");
}
</script>
</head>
<body>
<button onclick="fn()">click</button>
</body>
</html>
</code></pre>
<p>After ... | javascript | [3] |
1,430,894 | 1,430,895 | What would be a good sample project to ask a prospective programmer to code during the hiring process? | <p>My understanding is that asking for a work sample is a good way to determine if someone has the skillset you are looking for, as some people just interview well. So I want to ask potential developers to write some sample code for me.</p>
<p>I'm looking for ideas on what kind of small project would be something they... | php | [2] |
3,160,768 | 3,160,769 | How can I connect to a database on the web through netbeans/java | <p>I am developing a chat program in java for mobiles. I have to connect to a database that is located in my web host, so how should I connect to that db?</p>
<p>Thanks in advance :)</p>
| java | [1] |
3,217,541 | 3,217,542 | regular expression : the dollar sign ($) work with re.match() or re.search() ? | <p>I only know the dollar sign <code>$</code> will match a pattern from the
end of a string, but which method does it work with, <code>re.match()</code> or <code>re.search()</code>?</p>
| python | [7] |
755,363 | 755,364 | problem of while loop and array | <pre><code>$result=array();
$table_first = 'recipe';
$query = "SELECT * FROM $table_first";
$resouter = mysql_query($query, $conn);
while ($recipe = mysql_fetch_assoc($resouter, MYSQL_ASSOC)){
$result['recipe']=$recipe;
$query2="SELECT ingredients.ingredient_id,ingredients.ingredient_name,ingredients.ammount FRO... | php | [2] |
3,687,630 | 3,687,631 | problem in jar file | <p>hi
I created one jar file in following folder:</p>
<h2> '/usr/local/bin/niidle.jar'</h2>
<p>But when I type command as follows:</p>
<h2>>>jar tf /usr/local/bin/niidle.jar</h2>
<p>then it is showing following error:--
--The program 'jar' can be found in the following packages:
* java-gcj-compat-headless
* gc... | java | [1] |
2,240,269 | 2,240,270 | Use Python format string in reverse for parsing | <p>I've been using the following python code to format an integer part ID as a formatted part number string:</p>
<pre><code>pn = 'PN-{:0>9}'.format(id)
</code></pre>
<p>I would like to know if there is a way to use that same format string (<code>'PN-{:0>9}'</code>) in reverse to extract the integer ID from the ... | python | [7] |
1,507,338 | 1,507,339 | Practice exercises? | <p>Is there anything like: <a href="http://nathansjslessons.appspot.com/lesson?id=1000">http://nathansjslessons.appspot.com/lesson?id=1000</a></p>
<p>Something where I can learn and practice javascript? I remember when I was going to start with c++, there was a list of practice exercises for command prompt programs. A... | javascript | [3] |
415,078 | 415,079 | Finding dollar sign with strpos | <p>So I'm trying to find several special characters, such as {, $ in a string returned by DOM element</p>
<p>When I run</p>
<pre><code>if(strpos("$", $u) === FALSE AND strpos("{", $u) === FALSE AND $u != "#") {
echo "Attempting {$u} ecoded: ".urlencode($u)."<br/>";
return true;
}
</code></pre>
<p>However when ... | php | [2] |
4,687,403 | 4,687,404 | how to check bundle version for our application by programming? | <p>I have make application and i have installed in iphone.But i want to check my application bundle version by programming.How it possible can you give me advice?</p>
| iphone | [8] |
3,494,434 | 3,494,435 | can I use float[] to hold ints? | <p>we have one class which has one <code>float[]</code> and one <code>int[]</code>. Sometimes the user of that class needs put float valuse and sometimes int values, but will not be both for each instance.</p>
<p>We know all the possilbe float and int values will not be big (less than 100000). I am thinking we may not... | java | [1] |
493,291 | 493,292 | How do I set time limit for loop? | <p>I do have a loop, say:</p>
<pre><code>$lines = file('file.txt');
foreach ($lines as $line) {
// some function
}
</code></pre>
<p>Some times this take more time to complete one loop if data is not available. So how do I set a time limit to each loop so if any info isn't available it will move to next?</p>... | php | [2] |
4,046,437 | 4,046,438 | how to track two keyboard key when they are down at same time | <p>think user pressed two keys at same time .</p>
<p>I want to be notified of this two keys , not one .</p>
<p>like <code>Up + Left</code></p>
<p>how can I find out this ?</p>
| c# | [0] |
1,906,138 | 1,906,139 | How can i make some image analyzing using android API ? | <p>How can i make some loop that run on all the pixels on the image that i got from the camera ? </p>
<p>I want to be able to scan all the pixels and according to the RGB of some pixel i need to make some decision about the next activity that my application will make. </p>
| android | [4] |
3,155,426 | 3,155,427 | Generating all subsets from a single set | <p>I was trying to understand the code to generate all the subsets from one set. Here is the code</p>
<pre><code>#include <stdio.h>
/* Applies the mask to a set like {1, 2, ..., n} and prints it */
void printv(int mask[], int n) {
int i;
printf("{ ");
for (i = 0; i < n; ++i)
if (mask[i])
... | c++ | [6] |
5,082,872 | 5,082,873 | Editing properties files w/o losing formatting | <p>I have a properties (Java world) file with comments and key=value. I simply want to take backup of the file and edit few key=value. I need to edit the key in loop as the number of keys are not fixed and also the key names differ partly which is not a problem, but i am struggling to know how to maintain the format of... | java | [1] |
23,002 | 23,003 | Update text with submitted data w/jQuery | <p>I have a form on a page. I have a link acting as submit button. The value is sent to a php page via ajax where the value is set into a session.</p>
<p>After submit I swap the form with text field where the text is displayed. How do I use the text from the submitted form to display withing <code><pre></pre&... | jquery | [5] |
5,334,410 | 5,334,411 | iPhone UITableView shows one cached view in it's UITableCellView, the last one added! | <p>I have an object that return a cached image view (UIImageView), which do the loading, showing the loading image, and then populate the view with the loaded image.</p>
<p>In my case, the TableView shows multiple rows, where the same user photo might appears more than once, and I noticed that because it is cached, it... | iphone | [8] |
2,804,865 | 2,804,866 | How does JavaScript distinguish between objects? | <p>I have wriiten</p>
<pre><code>document.createElement("p");
document.createElement("p")
</code></pre>
<p>How does Javascript intepreter knows do distinct between those two?</p>
<p><strong>Id</strong> ? ( what is the Js <strong>property</strong> )? maybe something <strong>else</strong> ?</p>
| javascript | [3] |
5,454,962 | 5,454,963 | Override browsers CTRL+(WHEEL)SCROLL with javascript | <p>In most browsers on linux, CTRL+(WHEEL)SCROLL allows the user to zoom in and out of the page by enlarging or shrinking the size of all elements. Now I want to override this behaviour and get CTRL+WHEEL to zoom into an SVG element I have by applying affine transformations.</p>
<p>Is this possible? Specifically, is i... | javascript | [3] |
380,331 | 380,332 | Class specific new/delete | <p>Is it possible to overload class specific new/delete that is called when arrays of objects are created.</p>
<pre><code>class Foo;
Foo* f = new Foo[10]; // calls overloaded new
delete[] f; // calls overloaded delete
</code></pre>
<p>Thank you.</p>
| c++ | [6] |
944,223 | 944,224 | Development environment for a LAMP-based website - Redirects to Server Default Page | <p>In our current environment, if any changes need to be made to the code, these changes are directly coded and updated to the Live server. GWe would like to set-up a development server where we can test our changes before uploading to the live site. </p>
<p>I have attempted to build a development site locally by inst... | php | [2] |
3,496,428 | 3,496,429 | Use JQuery to Replace type of tag with same ID | <p>I wish to use JQuery to replace (backward and forward)</p>
<pre><code><a id="my_id">abc</a>
</code></pre>
<p>to</p>
<pre><code><span id="my_id">abc</span>
</code></pre>
<p>May I know how I can do so in JQuery?</p>
<p>Thanks.</p>
| jquery | [5] |
1,366,548 | 1,366,549 | How to Combine TemplateFields in ASP.Net GridView? | <p>Everyone.</p>
<p>I have a question when combining cells in GridView. I konw how to combine BoundField cells, but I do not know how to combine TemplateField cells in asp.net GridView.</p>
<p>EDIT:</p>
<p>Perhaps I did not make my question clearly and I am sorry about that. My question is that I use <code>GridView<... | asp.net | [9] |
4,043,625 | 4,043,626 | How can I get the variable of outer function in Javascript | <p>If only string is allowed to pass into function process(), what should we do inside the function process() to access the array value. Eval is one of the method, but its usage is not suggested by many people.</p>
<pre><code>function demo2(name2)
{
var alpha = [];
alpha["a"] = "test1";
var bravo = [];
bravo["a"] ... | javascript | [3] |
5,341,858 | 5,341,859 | Finding Parent form's button from frame in javascript | <p>i cant get my main form's button from frame by javascript.I am getting button's ID by querystring then i execute following script but cant get button.When i write parameter's name such as getElementByID('btnDelete'),it founds control?What can be reason and how can i solve this problem?</p>
<pre><code> functio... | javascript | [3] |
381,417 | 381,418 | how to add numbers in various textboxs and the sum displayed in a label | <p>Am trying to add different numbers from different textbox, in a way that once the values are entered into each textbox, the summed value is displayed in a label showing the total value. eg. textbox1 + textbox 2 values to be displayed in label1. in C#. pls how do i go about this? thanks</p>
| c# | [0] |
3,550,624 | 3,550,625 | How to compare a parameter string Visual C++ | <p>I want to do something simple: check what a parameter is.</p>
<pre><code>void _tmain(int argc, WCHAR *argv[])
{
if(argv[4] == "-h");
{
//do stuff
}
}
</code></pre>
<p>I am getting an incompatible error from WCHAR * to const char *.</p>
<p>Such a conversion question has been asked, but the answers I ... | c++ | [6] |
4,919,521 | 4,919,522 | 'no resource identifier found for attribute 'textcolor' in package 'android'' | <p>When creating my hello android app, I am getting an error: </p>
<blockquote>
<p>'no resource identifier found for attribute 'textcolor' in package
'android''</p>
</blockquote>
<p>I am a complete newb to android development and I thought that I must have put in the wrong https in the location field when buildin... | android | [4] |
4,820,756 | 4,820,757 | Find Element in PHP Array (if exists) | <p>I'm wondering if there is a more elegant way to do this:</p>
<pre><code>$foo = (isset($bar) and array_key_exists('meh', $bar)) ? $bar['meh'] : '';
</code></pre>
<p>If I remove the <code>isset</code> part, PHP issues a warning if <code>$bar</code> isn't an array, if I remove the <code>array_key_exists</code> part, ... | php | [2] |
1,766,718 | 1,766,719 | display a long string in a table row | <p>i have a tableview which displays the result from the web service
the result fron the web sevice is in form of string array, where each string in the array is pretty long. It is like "1|123|JP Morgan|111|2000.0|Pending", similarly there are strings which i diplay in each row of the table.
but as you can see the stri... | iphone | [8] |
4,852,724 | 4,852,725 | cast numerics to double efficiently | <p>I have a bunch of numeric values. They can be <code>Short</code>, <code>Integer</code>, <code>Long</code>, <code>Float</code> or <code>Double</code> (and are the output of an external library (snakeYaml) which returns these as type <code>Object</code>)</p>
<p>I'd like to convert these Objects (which are guaranteed ... | java | [1] |
5,598,744 | 5,598,745 | Replace text with JavaScript | <p>I need to replace text using Javascript. It's a little different than the other ones I've seen on S.O. because the text that needs to be added in is an incrementing integer.</p>
<p>For example: Replace the string: "John Mary Ellen Josh Adam" with "John1 Mary2 Ellen3 Josh4 Adam5"</p>
| javascript | [3] |
5,730,282 | 5,730,283 | numeric array sort() | <p>Is this part from the book "Learning PHP, MySql and Javascript by. Robin Nixon" wrong?</p>
<pre><code>numbers = [7, 23, 6, 74];
numbers.sort(function(a,b){return a - b});
</code></pre>
<p>output is 6,7,23,74</p>
<p>The book says:</p>
<blockquote>
<p>If the anonymous function inside sort() returns a value grea... | javascript | [3] |
3,200,260 | 3,200,261 | Row Transfer according to the person login | <p>I have two pages, called "Staff_Common" & "Staff_Main". Both this page had griedview. "Staff_Common" can be view by all staff. but "Staff_Main" is personal for each staff. My question is, when a particular person login, how to tansfer a row from "Staff_Common" Gridview to "Staff_Main" Gridview if the user click... | asp.net | [9] |
2,852,857 | 2,852,858 | Incrementing hexa strings in Python | <p>I'm trying in python to increment hexa decimal values that are represented in strings
like <code>'84B8042100FE'</code>, how can i increment this value with 1 to have <code>'84B8042100FF'</code> ?</p>
<p>thank you.</p>
| python | [7] |
3,153,306 | 3,153,307 | Calling a method from different class | <p>Hi so I'm still learning to use methods, but one of my assignments requires me to call a method from a method in a different .java file.</p>
<p>The problem is "Sets" is not recognized and it displays an error message stating that both "Sets" cannot be resolved to a variable. Am I calling the method incorrectly?</p>... | java | [1] |
4,711,735 | 4,711,736 | Linq To SQL: a newbies Journey | <p>I am new to asp.net and I am trying to learn Linq to SQL. So I have found two different ways to pull from the database. The normal linq to SQL way and the direct SQL statement way. </p>
<p>I have both working, but I want to know which way is the accepted standard? I want to use straight SQL statements, because ... | asp.net | [9] |
1,703,142 | 1,703,143 | php delete array elements inside foreach loop? | <p>I have a foreach loop and I would like to completely remove the array elements that satisfy the criteria and change the keys to stay 1,2,3,4.</p>
<p>I have:</p>
<pre><code>$thearray=array(20,1,15,12,3,6,93);
foreach($thearray as $key=>$value){
if($value<10){
unset($thearray[$key]);
}
}
print_... | php | [2] |
4,224,362 | 4,224,363 | Python count sub lists in nested list | <p>I have created a list -></p>
<pre><code>a = [[1,2,3],[4,5,6],[7,8,9]]
</code></pre>
<p>1) How do I get the count of number of sub-lists in a?
Like in this case it is 3</p>
<p>2) I am using iterator tool chain for traversing this list</p>
<pre><code> for elt in itertools.chain.from_iterable(node):
</code></pre>
... | python | [7] |
1,242,828 | 1,242,829 | Image caching and loading in Linear layout | <p>I am searching for fast solution how to cash images. </p>
<p>I found many done this in loading in ListView images. </p>
<p>However i need to load images into ImageButton which is subview of Linear layout. </p>
<p>Maybe someone saw this implemented or could give me some tips how to do this ? </p>
<p>Thanks.</p>
| android | [4] |
2,391,727 | 2,391,728 | How to Get Only Text from an HTML File in java | <p>How can we get only Body(Text) of an HTML file using regexp in java ?</p>
| java | [1] |
5,781,142 | 5,781,143 | jTruncate / live() | <p>I been looking at <a href="http://blog.jeremymartin.name/2008/02/jtruncate-in-action.html" rel="nofollow">http://blog.jeremymartin.name/2008/02/jtruncate-in-action.html</a>. It doesn't seem to work for html added to the page after page load.</p>
<p>Does anyone know how that would work or if there is a better solut... | jquery | [5] |
1,591,524 | 1,591,525 | Changing document.domain to completely other domain | <p>I'm trying to prove that changing document.domain can be used only for cross scripting on the same upper level domain. For example if i will try to change document.domain to "google.com" on page which is located on www.test.com I will get a security exception in FF. Does anybody know where to locate an official proo... | javascript | [3] |
3,932,637 | 3,932,638 | Curved text on outside of path | <p>How should I go about drawing text along a curved path, but facing out rather than in? I found this <a href="http://stackoverflow.com/questions/8337221/how-to-write-curved-text">answer</a> on drawing text to a curve and it' the method I currently use, but the text is unreadable when upside down(at the bottom of a ci... | android | [4] |
4,004,907 | 4,004,908 | JQuery Highlight is not working | <p>i have the following references to jquery on my page:</p>
<pre><code><link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src=... | jquery | [5] |
188,042 | 188,043 | Get Top position of Dialog in JQuery | <p>I am using the <a href="http://jqueryui.com/demos/dialog/#option-position" rel="nofollow">position option on JQuery dialog plugin</a>. I am trying to figure out how to get just the "top" and "left" values out of this position object. However, I'm having difficulty figuring this out. Right now, I have a dialog define... | jquery | [5] |
181,444 | 181,445 | If vs. while in specific JavaScript code | <p>Why does the author of <em>Test-Driven JavaScript Development</em> (Christian Johansen) use the <code>while</code> statement instead of the <code>if</code> statement in the code below?</p>
<pre><code>function getEventTarget(event) {
var target = event.target || event.srcElement;
while (target && ta... | javascript | [3] |
3,868,700 | 3,868,701 | Android Rotation layouts not behaving properly on emultor 2.3 android | <p>I am using an eclipse ide.I am trying a simple Rotation program with xml files with one show Landscape mode and other with Potrait mode
i have name this files as main.xml in res/layout and res/layout-land respetively
but does not behaves properly.When i press ctrl+F12 for rotation on an emulator.</p>
<pre><code><... | android | [4] |
5,195,598 | 5,195,599 | JavaScript images | <p>How do I display the same image on the same page multiple times?</p>
<pre><code><head>
<Script language="javascript">
function xdf(){
for (i=0;i<10;i++) {
document.write('<b>hello world</b><br>');
}
}
</script>
</head>
</code></pre>
<p>this code displays "hello world... | javascript | [3] |
1,465,142 | 1,465,143 | Can one combine android resource strings into new strings? | <p>Android allows to create aliases of resource strings like:</p>
<pre><code><resources>
<string name="foo">somestring</string>
<string name="bar">@string/foo</string>
</resources>
</code></pre>
<p>by which the resource "bar" becomes an alias for the resource named "foo".</p>
<p... | android | [4] |
3,439,750 | 3,439,751 | Android expandablelistview child click listener not working | <p>in my android project i am using <code>Expandablelistview</code> with <code>SimpleExpandableListAdapter</code>,its <code>onGroupexpand</code> function is working but <code>onChildClick</code> function whick is under <code>setOnChildClickListener(new OnChildClickListener() )</code> is not working.<br>
I have read all... | android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.