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 |
|---|---|---|---|---|---|
1,278,869 | 1,278,870 | How to display a specific alert with radio buttons using jQuery? | <p>I have a form with two radio buttons, "Yes" and "No", that toggles visibility of a div.</p>
<p>I'd like to display an alert to the user if the "No" option is selected ONLY when the "Yes" option is already selected. </p>
<p>If neither option has been selected and "No" is clicked, the alert should not display.</p>
... | jquery | [5] |
1,418,499 | 1,418,500 | Getting my own .apk file name | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4635448/how-to-get-the-file-apk-location-in-android-device">How to get the file *.apk location in Android device</a> </p>
</blockquote>
<p>How should I get the my own application name , including path which is i... | android | [4] |
1,408,205 | 1,408,206 | correct pattern to use: this or prototype | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/310870/use-of-prototype-vs-this-in-javascript">Use of 'prototype' vs. 'this' in Javascript?</a> </p>
</blockquote>
<p>If I have an object function, when should I use <code>this.something</code> i... | javascript | [3] |
3,106,733 | 3,106,734 | What does this JS Expression mean? | <p>What does this JS expression mean? What are we returning?</p>
<p><code>return dihy(year) in {353:1, 383:1};</code></p>
| javascript | [3] |
3,508,324 | 3,508,325 | android:how to save sdk platform | <p>I want to keep all the installed sdk platforms/docs etc in storage for later use, so that I dont have to download them AGAIN after I install SDK later. How to keep these files and how to restore them later in SDK manager ?</p>
| android | [4] |
5,920,084 | 5,920,085 | How to sort a bunches of 2D arrays | <p>I have a 2D array of p*q. I want to sort this array in bunches of 2D arrays of m*n where p>m and p=km and q>n and q=kn
and where k is and integer.
for example
i have array of 16*16 and i have divided it into 2d arrays of 4*4 now i want to sort these 4*4 arrays independently.
Which algorithm can i use to sort these ... | c++ | [6] |
3,087,421 | 3,087,422 | android gps location same value | <p>I am using <a href="http://stackoverflow.com/questions/3145089/what-is-the-simplest-and-most-robust-way-to-get-the-users-current-location-in-an/3145655#3145655">What is the simplest and most robust way to get the user's current location in Android?</a> </p>
<p>So i did as per instruction, </p>
<pre><code>publi... | android | [4] |
5,676,911 | 5,676,912 | Android game engine - which one is this? | <p>By the pic below, can you guys tell me which engine was used to make this game?
If it's not possible, which engine will give me a result like this?</p>
<p><img src="http://i.stack.imgur.com/JIBZZ.jpg" alt="https://lh5.ggpht.com/rhneVRaqwwE6270Nb-zn0458j76GQPNO1kMMNNJbC5IOXo5wKhBcurddH6wDlBQA7g"></p>
<p>thank you</... | android | [4] |
1,796,594 | 1,796,595 | Documentation for adding new fonts to Android | <p>Planning to add new Apache lincenced TTF fonts to support SE.Asian locales in Android Jelly Bean.</p>
<p>Looking through Android code tree. I found that 'Android/frameworks/base/data/fonts' is right place to add the files and modify the make files. </p>
<p>Is there any documentation I can refer to before submittin... | android | [4] |
1,893,791 | 1,893,792 | spin.js starts but doesnt stop | <p>How can I stop the spin? Something strange happens. Here is the code that doesn't work:</p>
<pre><code> <body>
<div id="spin">
</div>
<button type="submit" onclick="spin_stop();" id="stop">Stop</button>
<button type="submit" onclick="spin_start();" id="start">Start</button>... | javascript | [3] |
12,707 | 12,708 | C++ in which way here is no l-value error? | <p>In which way it is possible to compile this code?</p>
<pre><code>buf_right.el(j, k) = block.el(i, j, k);
</code></pre>
| c++ | [6] |
2,133,417 | 2,133,418 | Java inheritace | <p>I am learning Java . I got stuck in basic Inheritance property.</p>
<p>Can any one explain will be of great help.</p>
<pre><code>public class A{
int x;
protected void setX(){
int x = 2;
}
protected int getX(){
return x;
}
}
public class B extends A{
System.out.println(getX()); // ERRoR.
}
</co... | java | [1] |
3,277,646 | 3,277,647 | javascript canvas is null | <p>just starting in JavaScript and I'm getting the error "canvas is null"</p>
<pre><code>function draw() {
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var width,height;
width = canvas.width;
height = canvas.height;
ctx.fillStyle = "rgb(0,0,0)";
... | javascript | [3] |
1,906,220 | 1,906,221 | Convert timestamp from milliseconds to Date or Calendar in local time zone | <p>I get a string with a millisecond and a timezone like this "1353913216000+0000", so a UTC time basically. How can I convert this to my local time? I do not think i can use a DateFormat, there is no millisecond pattern.</p>
| java | [1] |
5,974,843 | 5,974,844 | Question on .asec (encryption) on Froyo 2.2 / installing app onto sdcard | <p>I installed my app on the emulator with 2.2 and onto the sdcard. When I browse via adb shell, I can see that the encrypted app file lies under /mnt/secure/asec/com.myapp-1.asec but it also lies as plain apk file unencrypted at /mnt/asec/com.myapp-1/pkg.apk as well and I can do a 'adb pull' without special permission... | android | [4] |
2,381,940 | 2,381,941 | What is a good way to animate UIViews inside UITableViewCell after a callback? | <p>We couldn't find a way to animate UIViews inside a UITableCell as an action from a callback. </p>
<p>Suppose in a scenario where you click on a button on the UITableViewCell and it fires off an asynchronous action to download a picture. Suppose further that when the picture is downloaded we want a UIView in the cel... | iphone | [8] |
927,128 | 927,129 | variable number of digit in format string | <p>Which is a clean way to write this formatting function:</p>
<pre><code>def percent(value,digits=0):
return ('{0:.%d%%}' % digits).format(value)
>>> percent(0.1565)
'16%'
>>> percent(0.1565,2)
'15.65%'
</code></pre>
<p>the problem is formatting a number with a given number of digits, I don't... | python | [7] |
2,187,331 | 2,187,332 | Access multiple return objects with $.when.apply & derferreds | <p>I have code like this, </p>
<pre><code>var deffereds = $(someArray).map(function(index, ele) {
return $.Deferred(function(def) {
//Do Some custom thing with ele here
def.resolve(someValue); //SomeValue will be differnt for each element
});
});
$.when.apply(null, deffereds.get()).then(function (r1,r2... | jquery | [5] |
4,050,300 | 4,050,301 | Constructor vs setter validations | <p>I have the following class : </p>
<pre><code>public class Project {
private int id;
private String name;
public Project(int id, String name, Date creationDate, int fps, List<String> frames) {
if(name == null ){
throw new NullPointerException("Name can't be null");
}... | java | [1] |
5,473,279 | 5,473,280 | Quickest route to get up to speed with iPhone development | <p>Am currently reading Cocoa Programming for Mac OS X by Hillegass just to get up to speed on Objective-C and the Development tools. What would be the next best step ?</p>
<p>Instructor led course ?
Online training?
Specific books ?</p>
| iphone | [8] |
703,470 | 703,471 | how to translate struct packing from vc++ to gcc | <p>How to translate the below vc++ packing commands into gcc commands in Linux? I am aware how to do it for a single struct, but how do I do this for a range of struct? </p>
<pre><code>#pragma pack(push, 1) // exact fit - no padding
//structures here
#pragma pack(pop) //back to whatever the previous packing mode was
<... | c++ | [6] |
1,220,201 | 1,220,202 | What is the (recent?) significance of adding "_t" to class names in C++? | <blockquote>
<p><strong>Possible Duplicates:</strong><br>
<a href="http://stackoverflow.com/questions/231760/what-does-a-type-followed-by-t-underscore-t-represent">What does a type followed by _t (underscore-t) represent?</a><br>
<a href="http://stackoverflow.com/questions/1391447/what-does-the-postfix-t-stand-fo... | c++ | [6] |
5,224,084 | 5,224,085 | Check input is a valid integer | <p>Hi Can anyone help me please. I need to check that my input only contains integers. Im guessing from looking it up that I use the <code>isDigit</code> function but I am not sure how to use this to check the whole number.</p>
<p>I'm using C++ to interact with MSI so i'm getting the integer as follows:</p>
<pre><cod... | c++ | [6] |
1,206,105 | 1,206,106 | How to set a title for a context menu? | <p>When I bring up the context menu on a contact in the Android built-in app, the context menu has a title (the contact's name). Same for playlist context menu in the Music app.</p>
<p>I have added a context menu to an ImageView (no list item). There is no title, just the options are shown. Is there an easy way to set... | android | [4] |
4,152,484 | 4,152,485 | javascript: plus symbol before variable | <p>this really sounds like a simple question but I had no luck searching. what does the <code>+d</code> in </p>
<pre><code>function addMonths(d, n, keepTime) {
if (+d) {
</code></pre>
<p>means?</p>
| javascript | [3] |
5,741,831 | 5,741,832 | find and replace strings | <p>I am trying to find and replace strings. Below is what I have sofar.
I am troubled on how to force all the changes to show in one line as showed below.</p>
<pre><code>Strings source = "parameter='1010',parameter="1011",parameter="1012" ";
Expected result = "parameter='1013',parameter="1015",parameter="1009" ";
S... | java | [1] |
291,870 | 291,871 | zerodivisionerror-Float division error | <pre><code>ctr=0.0
i=0
pc=0.0
pi=0.0
nc=0.0
ni=0.0
for line in fileinput.input(['/pro/file1']):
line = line.replace("\n", "")
if (i < len(revs)):
if('pos' in revs[i]):
if(float(line) > 0):
ctr=ctr+1
pc=pc+1
else:
... | python | [7] |
4,528,262 | 4,528,263 | C++ Passing unknown function as an agument | <p>My problem is following, I have a function which takes one function as a parameter. The problem is that in some cases the passed function fEval() needs to be called with two parameters instead of one as fEval(somevalue1,somevalue2)</p>
<pre><code>Func(double (*fEval)(double F1),double min, double max,...)
{
dou... | c++ | [6] |
1,752,515 | 1,752,516 | Delegate unique jQuery event handlers to child elements | <p>Mootools has the following syntax for delegating unique event handlers to child elements of a given parent element using different event types. Does a similar syntax exist in jQuery? I'm trying to avoid writing a separate case for each element I want to attach an element to.</p>
<pre><code>$('myElement').addEvents(... | jquery | [5] |
904,810 | 904,811 | C++ array initialization | <p>Considering this:</p>
<pre><code>typedef struct
{
int x;
int y;
} Coordinate;
Coordinate places[100];
</code></pre>
<ul>
<li><p>Is the memory for the 100 Coordinates allocated automatically? Or does it allocate one at a time when you initialize each element of the array?</p></li>
<li><p>What happens if you adre... | c++ | [6] |
820,768 | 820,769 | Why do we need to delete allocated memory in C++ assignment operator? | <p>Why do we need the delete statement?</p>
<pre><code>const MyString& operator=(const MyString& rhs)
{
if (this != &rhs) {
delete[] this->str; // Why is this required?
this->str = new char[strlen(rhs.str) + 1]; // allocate new memory
strcpy(this->str, rhs.str); // cop... | c++ | [6] |
1,228,107 | 1,228,108 | android how to set the phone alarm through code | <p>I want to set the alram for phone through program coding. I have an button where by clicking DatePicker come & also time picker. I want what time i set here that time should be set in phones alaram. How can I do that . plz give me the answer . Thank you</p>
| android | [4] |
977,892 | 977,893 | iPhone video gets displayed in lower right hand corner when orated from vertical to horizontal | <p>When my app runs, the video and the phone is rated to landscape mode, my video then plays in the lower right hand corner, is there a way to have the video be in the middle of the screen when the user rotate it?</p>
| iphone | [8] |
5,683,497 | 5,683,498 | How to make a URL connection to localhost:8080 and check if the HTTP Response code is between 200 and 209? | <p>I have been struggling to get answer for this question. </p>
<p>How to make a URL connection to localhost:8080 and check if the HTTP Response code is between 200 and 209?</p>
| java | [1] |
4,504,634 | 4,504,635 | Trivial C++ program not writing to file | <p>These lines are the sole contents of main():</p>
<pre><code>fstream file = fstream("test.txt", ios_base::in | ios_base::out);
string word;
while (file >> word) { cout << word + " "; }
file.seekp(ios::beg);
file << "testing";
file.close();
</code></pre>
<p>The program correctly outputs the content... | c++ | [6] |
2,731,339 | 2,731,340 | What is a "race condition"? | <p>In a java book, There are a statement like "Class A has a static int variable counter and A has two instance a1 and a2.Both will have a static variable counter whose value would be always same except <strong>race condition.</strong>" what is the meaning of <strong>race condition</strong></p>
| java | [1] |
3,882,395 | 3,882,396 | aspnet table row | <p>I am trying to add a table in aspx page and need to have access to the table cells in .cs file. Created AspNet:Table with some rows and cells but keep getting 'not a valid identifier' error and can't see why:</p>
<pre><code><asp:Table runat="server" ID="tblStatus" Width="920" CellPadding="0" CellSpacing="0">
... | asp.net | [9] |
341,069 | 341,070 | ResolveInfo.isDefault always on false | <p>I'm trying to get the icon of the default program associated with an extension.</p>
<p>Here's my code:</p>
<pre><code>Intent intent = new Intent(Intent.ACTION_VIEW);
MimeTypeMap mime = MimeTypeMap.getSingleton();
String tt = mime.getMimeTypeFromExtension(getExtension());
intent.setDataAndType(Uri.fromFile(getFile... | android | [4] |
3,766,002 | 3,766,003 | PHP write in file | <p>I want to write something in a textfile.</p>
<pre><code>$myFile = "meinung.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "Floppy Jalopy\n";
fwrite($fh, $stringData);
$stringData = "Pointy Pinto\n";
fwrite($fh, $stringData);
fclose($fh);
</code></pre>
<p>when i want to execute this, it sa... | php | [2] |
4,264,478 | 4,264,479 | getting all of the currecny values out of a text file | <p>im having trouble with getting my python code to read through a text file and add together all of the monetary values. the code seemed to be working fine on my pc, but as soon as i transferred the file to my mac it gave me a whole slew of errors. here is the code</p>
<pre><code>#!usr/bin/python
import sys
def find... | python | [7] |
5,891,058 | 5,891,059 | Load picture in app from local folder | <p>I have inside my app folder : images folder with images inside and I have .jar file which I run. I need to load pictures from images folder. I have method which load pictures from URL, I tried with</p>
<pre><code>String path=System.getProperty("user.dir")+File.separatorChar+"images"+File.separatorChar+"first.jpg... | java | [1] |
5,344,722 | 5,344,723 | Proper way of getting variable from another class | <p>I can call variables 2 ways.</p>
<p>One is just to do it like this:</p>
<pre><code>MyClass myClass = new MyClass();
myLocalVar = myClass.myVarVal;
</code></pre>
<p>And the other way is to use a getter like this:</p>
<pre><code>myLocalVar = myClass.getMyVarVal();
</code></pre>
<p>Both ways are working fine,... | java | [1] |
1,874,128 | 1,874,129 | Best way to access a class variable in an object? | <p>These both work:</p>
<pre><code>class A:
V = 3
def getV(self):
return self.V
def getVbis(self):
return A.V
print A().getV()
print A().getVbis()
</code></pre>
<p>Which one is more pythonic? Why?</p>
| python | [7] |
3,482,752 | 3,482,753 | How do I show results that start with a letter e.g A only | <p>I have a <code>list.txt</code> file.</p>
<p>It contains about 100 records, but if user <code>cin</code> a letter, e.g A, I just want show all records containing A in the loop.</p>
<p>Records are recorded in line break format, in shell command we use A*, but in C++, how do we do it?</p>
<p>Example:</p>
<pre><code... | c++ | [6] |
795,371 | 795,372 | How to call same method between two class packages that share certain code | <p>I have 2 auto-generated packages (generated by JAXB) from XML schema's that are controlled by a third party. They have sections of their XML definitions that are identical. Some of those sections I will be using to gather information for processing the XML. How can I go about this to reduce the amount of code duplic... | java | [1] |
3,908,169 | 3,908,170 | Is choiceMode compatible with ExpandableListView? | <p>Is it possible to make a multiple choice list with <code>android:choiceMode="multipleChoice"</code> or <code>setChoiceMode(ListView.CHOICE_MODE_MULTIPLE)</code> on an <code>ExpandableListView</code>? I am able to do this with <code>CheckBox</code>es on a plain <code>ListView</code>, but it doesn't seem to be working... | android | [4] |
2,664,232 | 2,664,233 | Why can you read, but not modify, global values? | <pre><code>>>> import sys
>>> print(sys.version)
2.4.4
>>> b = 11
>>> def foo2():
... a = b
... print a, b
...
>>> foo2()
11 11
>>> def foo3():
... a = b
... b = 12
... print a, b
...
>>> foo3()
Traceback (most recent call last):
File "<... | python | [7] |
1,208,164 | 1,208,165 | file() VS file_get_contents() which is better? PHP | <p>I just want to know how to improve the speed of the web application I am creating.</p>
<p>I am also open to other suggestions.</p>
<p>fread or file_get_contents??</p>
| php | [2] |
6,014,742 | 6,014,743 | custom dialog border is always white | <pre><code><?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/yellow"
android:orientation="vertical" >
<LinearLayout
... | android | [4] |
203,268 | 203,269 | Iphone web view during use of Camera | <p>Is it possible to open webview during use of camera in app.if it is possible plz let me know.</p>
| iphone | [8] |
326,759 | 326,760 | Removing newlines in php | <p>Following is the syntax for <code>preg_replace()</code> function in php:</p>
<pre><code>$new_string = preg_replace($pattern_to_match, $replacement_string, $original_string);
</code></pre>
<p>if a text file has both Windows (rn) and Linux(n) End of line (EOL) characters i.e line feeds.</p>
<p>then which of the fol... | php | [2] |
1,100,024 | 1,100,025 | C++ "well-known" Open Source Code | <p>I'm looking for a C++ "well-known" Open Source code for a programming project.</p>
<p>I need to analize the code(with helpfull tools such as Cppcheck) and check for bad programming stuff, such as too many if's with giant conditions instead of using a function to check it, or switches with tons of if's then else's a... | c++ | [6] |
932,388 | 932,389 | Count the number of '8's Problem in Java | <p>Im stuck with the below problem.</p>
<p><strong>Problem Statement:</strong></p>
<p>Given a non-negative int n, return the count of the occurrences of 8 as a digit, except that an 8 with another 8 immediately to its left counts double, so 8818 yields 4.</p>
<p>Note: mod (%) by 10 yields the rightmost digit (126 % ... | java | [1] |
2,506,584 | 2,506,585 | How to find the name of the parent class, within a base class in C#? | <p>I inherit a class from a base class "MyLog". </p>
<p>If I call "Write" within the inherited class, I want it to prefix any messages with the name of the inherited class.</p>
<p>As this application needs to be fast, I need some way of avoiding reflection during normal program operation (reflection during startup is... | c# | [0] |
5,941,331 | 5,941,332 | How to update contact fields individually? | <p>I am new to android, so thought of doing a small project on Native Contacts. Application should Add, Update & Delete Native Contacts through my application.</p>
<p>Adding & Deleting native contacts is working fine, but Update contacts is not working at all.</p>
<p>This is the code i am using for Update &am... | android | [4] |
5,527,972 | 5,527,973 | Static nested classes inside a static context of a class in Java | <p>I am learning about static nested classes and I came across the following:</p>
<p>A static nested class is declared inside another class with the static keyword or within a static context of that class.</p>
<p>What I cannot understand is what does it mean when it says "or within a static context of that class."</p... | java | [1] |
2,768,777 | 2,768,778 | Insert date into array | <p>I have inserted random date into a textbox let it be 12/2/2009 now I want only 2 in this how to do it with javascript how do I need array or any other method.</p>
<p>Please give me an appropriate example</p>
| javascript | [3] |
1,258,367 | 1,258,368 | How does javascript work in the browser address bar? | <p>How does Javascript work in the browser address bar? </p>
<p>To be more specific: how can I make a script that goes to a web site and clicks a button on that site? Not maliciously, of course, I'd like to be able to do this for personal use.</p>
| javascript | [3] |
3,032,379 | 3,032,380 | Referencing enumerated style attributes from XML in Android | <p>I have an app that requires scrollbars to be enabled in one landscape orientation but not in portrait orientation. I thought the easiest way to do this would be to make an attribute indicating whether the scrollbar is enabled or not, such as the following:</p>
<pre><code><ScrollView
a:layout_width="fill... | android | [4] |
1,051,065 | 1,051,066 | Access static property in another class's non-static constructor in c# | <p>I'm trying to access a static property of a normal class (ClassA.StaticPropertyXX) in another class's non-static constructor. ClassA is a normal class.</p>
<p>It works fine. I need to know if its the right way.
Please let me know.</p>
| c# | [0] |
3,989,664 | 3,989,665 | Main data model on android | <p>I have an android application with a number of activities.
I have a singleton class holding my main data model which all activities access to get data.</p>
<p>The problem is that sometimes the android GC decides to destroy my singleton when the app in the background (when you press the home button).
Is there anyway... | android | [4] |
4,901,523 | 4,901,524 | Getting the first x item from a list | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/509211/good-primer-for-python-slice-notation">Good Primer for Python Slice Notation</a> </p>
</blockquote>
<p>I have a string and I'm splitting in a <code>;</code> character, I would like to associate this strin... | python | [7] |
1,208,376 | 1,208,377 | Service state is reported incorrectly | <p>I installed my c# application as windows service using the following command,</p>
<p>Installutil.exe</p>
<p>The installation is done in 32 bit machine.And the c# application is using 8088 port.
After installing the service the service property has changed to Automatic.
When the system restart the service also will... | c# | [0] |
2,766,412 | 2,766,413 | Getting run time error while using thread handler and message object | <p>I wrote a simple program on thread handlers.
When the button is clicked the action is handled in a new thread.
But the operating system is closing my application when the button is clicked.
Please help me in debugging this code.
Thanks in advance.</p>
<pre><code>package example.practice.handlerthread;
import andr... | android | [4] |
4,625,755 | 4,625,756 | ASP.net set value to hidden form control | <p>In the ASP.net, I try to set a variable value to hidden field, but I get exception. </p>
<p>In the first output, it is correct. then I put it into hidden field, failed.</p>
<p>How to fix it ?</p>
<pre><code> user name: <%= User.Identity.Name %> // output is correct
<form runat=Server>
<asp:... | asp.net | [9] |
1,376,790 | 1,376,791 | Setting an object to null within itself | <p>Just wondering if this would be an acceptable way of terminating an object from within itself? Since</p>
<pre><code>this = null;
</code></pre>
<p>is not possible. I usually just set a bool called disposed or something and throw an exception if the object is accessed after I terminate it. But then this occurred to ... | c# | [0] |
3,300,805 | 3,300,806 | Reload a Web Page Using C# | <p>I have a web page that prompts for user input via DropDownLists in some table cells. When a selection is made the selection replaces the DropDownList so that the action can only be performed once. In the case that a change needs to be made I want to be able to click a button that reloads the page from scratch. I ... | c# | [0] |
5,468,040 | 5,468,041 | Android Display Mocean adds | <p>I am using mocean add in my android application, but it doesn't show the ad.</p>
<p>I have referred sample example given by mojiva SDK. I have set site id and zone id which I get after register my app on mojiva site.</p>
| android | [4] |
5,296,261 | 5,296,262 | Finding File Size in javascritpt | <p><p>I am trying to find the file size before upload <p></p>
<p>i use the code <b>file[0].size</b> but it is not working IE</p>
<p>Please help me to get the file size in IE To</p>
<p><b>Thank You</b></p>
| javascript | [3] |
5,189,856 | 5,189,857 | How to increment number in string using Javascript or Jquery | <p>The id of my textarea is string and of this format</p>
<blockquote>
<p>id='fisher[27].man'</p>
</blockquote>
<p>I would like to clone the textarea and increment the number and get the id as <code>fisher[28].man</code> and prepend this to the existing textarea.</p>
<p>Is there a way to get this done easily with... | javascript | [3] |
511,569 | 511,570 | Padding a string using PadRight method | <p>I am trying to add spaces to end of a string in C#:</p>
<pre><code>Trip_Name1.PadRight(20);
</code></pre>
<p>Also tried:</p>
<pre><code>Trip_Name1.PadRight(20,' ');
</code></pre>
<p>None of this seems to work. However I can pad the string with any other character. Why?</p>
<p>I should have been more specific, h... | c# | [0] |
2,242,603 | 2,242,604 | Marshall Xml file | <pre><code><?xml version="1.0" encoding="UTF-8"?>
<parent>
<parents-arg>
<child>
<arg>
<local>
<method>
<name>responseData</name>
<arg>
<local>
<method>
... | java | [1] |
3,348,175 | 3,348,176 | how to copy list of files into another file? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1001538/how-do-i-concatenate-files-in-python">How do I concatenate files in Python?</a> </p>
</blockquote>
<pre><code>def copy_file(file_name,copy_file_name,copies):
i=0
a=open(file_name,'r')
f=open(... | python | [7] |
5,472,907 | 5,472,908 | remove first span element after input | <p>How to remove first span element after <code><input id="mytxt" type="textbox"/></code> , if it exists?</p>
<pre><code> $('#mytxt').live('change', function(){
//TO DO
}
</code></pre>
| jquery | [5] |
171,744 | 171,745 | Implementing .equals(Die aDie) method and static variables | <p>I am creating the method .equals(Die aDie) in my program. Do I compare every instance variable including static ones?</p>
| java | [1] |
5,323,546 | 5,323,547 | How to return the specific page in jQuery Datatables paging? | <p>I have a datable and "Edit" button in each row. When I click that button, /edit/ url opens. Everything is Ok until now. But if I need to go back to the datatable, it starts from the first page. What can I do for that?</p>
<pre><code> $('#table').dataTable({
"sDom" : 'rtFip>',
'fnDrawCallback' : f... | jquery | [5] |
4,797,692 | 4,797,693 | Menu click opens a small box? | <p>again im having a issues, I'm trying to get when a menu item is clicked then it'll open up a box that has a title and maybe a text box/ btn in it how could I do this?</p>
<p>This is what menu code im using </p>
<pre><code>public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
... | android | [4] |
4,534,135 | 4,534,136 | Name of my app is only showing up half below its icon | <p>Is there a way to get my app name to show fully under its icon? The name is ( Nationals and Yorgey's ). But it only displays Nationals. How do i get the full name to show up?</p>
| android | [4] |
5,524,637 | 5,524,638 | Public accessors vs public properties of a class | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/295104/what-is-the-difference-between-a-field-and-a-property-in-c">What is the difference between a field and a property in C#</a> </p>
</blockquote>
<p>Can someone explain the diffrence if any between these two... | c# | [0] |
5,625,209 | 5,625,210 | Is it safe to use CamelCased file names? | <p>I'm developing a simple CMS which I'd like to make it open source.</p>
<p>For the file structure, do you think it's safe to use names like:</p>
<pre><code>AppData
FileUploads
</code></pre>
<p>instead of</p>
<pre><code>app-data
file-uploads
</code></pre>
<p>?</p>
<p>Because I heard some servers have problems wi... | php | [2] |
1,653,897 | 1,653,898 | java overriding not working | <p>I'm a beginner in Java, I used PHP, C++ and Lua and never had this problem, I made two classes just for exercising's sake <code>Facto</code> and <code>MyFacto</code>, first one does find a factorial and the second one should find factorial not by adding, but by multiplying. Don't blame me for the stupid and pointles... | java | [1] |
4,694,121 | 4,694,122 | About Math.floor(Double.MIN_VALUE) | <p>why is Math.floor(Double.MIN_VALUE) == 0 ?
can any one send me the java algorithme of Floor function or at least explain this result please?</p>
| java | [1] |
5,154,655 | 5,154,656 | Asp.Net - what is <%$? | <p>I should know this by now, but I don't, and for some reason, I am not finding the answer on Google, so I thought I'd try here.</p>
<p>I know that <code><%= %></code> is the equivalent of <code>Response.Write()</code></p>
<p>And I've seen <code><%# %></code> for databinding.</p>
<p>However, today I n... | asp.net | [9] |
4,807,724 | 4,807,725 | String variable and double variable of same name are different? | <p>How can I make it so when I refer to the display1 variable, I refer to double, and not the string? The program still refers to display1 as a string. I want the double.</p>
<pre><code>[code]
package rechee.cool;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.B... | android | [4] |
5,226,993 | 5,226,994 | JQuery - add DOM element then remove it | <p>I need to add a child div inside a parent div and then delete the child div in x sec.</p>
<p>There could be several children divs added to parent div.</p>
<p>What would the best way to identify and delete the child div?</p>
<pre><code>$("#parent_div").prepend("<div>"+msg+"</div>");
</code></pre>
<p>T... | jquery | [5] |
70,714 | 70,715 | byte array assignment | <pre><code>byte test[4];
memset(test,0x00,4);
test[]={0xb4,0xaf,0x98,0x1a};
</code></pre>
<p>the above code is giving me an error expected primary-expression before ']' token.
can anyone tell me whats wrong with this type of assignment?</p>
| c++ | [6] |
4,459,176 | 4,459,177 | Check password - Where is the error in code? | <p>The password authentication code, but does not work.. Where is the error in my code?</p>
<p><strong>JS:</strong></p>
<pre><code>function checkPass() {
var pass = document.getElementById('pass');
var pass2 = document.getElementById('pass2');
if(pass != pass2) {
document.layers.passResponse.innerHTML = "Passwords d... | javascript | [3] |
5,915,875 | 5,915,876 | Remove utm_* parameters from URL in Python | <p>I've been trying to remove all utm_* parameters from a list of URLs.
The closest thing I have found is this: <a href="https://gist.github.com/626834" rel="nofollow">https://gist.github.com/626834</a>.</p>
<p>Any ideas?</p>
| python | [7] |
1,928,355 | 1,928,356 | A question related to @property | <p>why we are using nonatomic in the @ property
@property(nonatomic,retain)UIButton *button;</p>
<p>what is the meaning of nonatomic?</p>
| iphone | [8] |
2,719,137 | 2,719,138 | force download of different files | <p>I am trying to force a php download. from here:
<a href="http://www.iwantanimage.com/animals/animals01.html" rel="nofollow">http://www.iwantanimage.com/animals/animals01.html</a>. Click on the sterling image & the next page offers the options of three formats.</p>
<p>this is my php code</p>
<pre><code><?php... | php | [2] |
4,570,299 | 4,570,300 | Can I make my class play nice with the Python '"in" keyword? | <p>I'm heading into hour 5 or so of my experience with Python, and so far I've been pretty impressed with what it can do. My current endeavor is to make a short attempt at a Stream class, the code for which follows:</p>
<pre><code>class Stream:
"""A Basic class implementing the stream abstraction. """
def __... | python | [7] |
4,796,427 | 4,796,428 | How can I show a grey transparent overlay in C# | <p>It should overlay other process which are not owned by the application doing the overlay.</p>
| c# | [0] |
1,134,577 | 1,134,578 | How to continue program execution even after throwing exception? | <p>I have a requirement where in program execution flow should continue even after throwing an exception.</p>
<pre><code>for(DataSource source : dataSources) {
try {
//do something with 'source'
} catch (Exception e) {
}
}
</code></pre>
<p>If exception is thrown in the first iteration, flow execut... | java | [1] |
2,006,621 | 2,006,622 | How do I make Java ignore the number of spaces in a string when splitting? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/225337/how-do-i-split-a-string-with-any-whitespace-chars-as-delimiters">How do I split a string with any whitespace chars as delimiters?</a> </p>
</blockquote>
<p>Both of these Python lines gives me exactly the ... | java | [1] |
5,006,907 | 5,006,908 | How to modify the criteria part and get location by GPS automatically in Android? | <p>I would like to set that the device prefer to choose to get location by GPS rather than network provider, but the device still always using network provider to get location. How can I modify the criteria part and get location by GPS automatically?</p>
<p>The criteria I am using: </p>
<pre><code>public void getLoca... | android | [4] |
439,375 | 439,376 | How to develop a notifier type Android application | <p>I am starting to develop Android applications. I've read several tutorials and already made a small useless (but beyond hello world) application.</p>
<p>I know how I should go about creating a regular application, but that's not what I want to do.</p>
<p>I want to build a "notifier type" application. Think about a... | android | [4] |
4,096,554 | 4,096,555 | Text to Image in android | <p>I am developing an application where I need to generate an Image from text and store that Image to the SDCard.<br>
Can anyone tell me a library(just like textimagegenerator for java) I need android compatible library or source which I can use for this?</p>
| android | [4] |
4,412,708 | 4,412,709 | Preferred database for storing long word-meaning list in android | <p>I want to make a dictionary app in android. What would be the preferred and efficient database for storing word-meanings list ? I am a novice programmer, any help would be great.</p>
<p>Thanks. </p>
| android | [4] |
4,177,344 | 4,177,345 | Accessing internal/external memory in android | <p>I am pretty new to android programming and I need your help in proceeding further in my application. I wanted to access the internal or external memory of android phones through my application with both write and read permissions. I wanted to give users a choice as to which memory to be used in the application.</p>
... | android | [4] |
2,467,703 | 2,467,704 | how to call global function in jquery | <p>i have make two global function now i want to call them in my HTML page. i have make separate file for global function and calling them it into our HTML page but it seems that something wrong with my code</p>
<pre><code><script type="text/javascript">
(function ($) {
jQuery.functionOne = function () {
... | jquery | [5] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.