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 |
|---|---|---|---|---|---|
5,854,663 | 5,854,664 | What happens when you give NULL to a PHP function that expects string? | <p>For example to: <code>preg_match</code> or when you use concatenation?</p>
<p>Answer to comments:</p>
<p>I can test for <code>preg_match</code> or concatenation results, yes.</p>
<p>But there is a difference between:</p>
<p>PHP function with the signature: <code>int f(string $parameter)</code></p>
<ul>
<li>Will... | php | [2] |
2,769,955 | 2,769,956 | Jquery Progressbar with countdown timer | <p>Ive been searching high and low and was just wondering if it was possible to make the Jquery UI Progressbar interact with this piece of code. </p>
<p>Jquery Progress bar found here > <a href="http://docs.jquery.com/UI/Progressbar/" rel="nofollow">http://docs.jquery.com/UI/Progressbar/</a></p>
<p>Code:</p>
<pre><c... | jquery | [5] |
3,038,799 | 3,038,800 | Function inheritance with templates | <p>When base class A is abstract, save for a few functions common the the entire class hierarchy... and class B is declared:</p>
<pre><code>template <class widgetType> class B : public A { ... };
</code></pre>
<p>and class C is declared:</p>
<pre><code>class C : public B<myWidget> { ... };
</code></pre>
... | c++ | [6] |
2,983,080 | 2,983,081 | Conflicting static vars with non-static ones in changing values | <p>Consider the following code:</p>
<pre><code>class A {
private $a;
function f() {
A::a = 0; //error
$this->a = 0; //error
$self::a = 0; //error
}
}
</code></pre>
<p>How can I change <code>$a</code> in f()?</p>
| php | [2] |
1,021,801 | 1,021,802 | Problem with unassigned local variable in c# | <p>Ok, i feel so ashamed to ask this question, but I can't understand why this code in c# does not compile in vs2010 express:</p>
<pre><code>string[] value;
for (int i = 0; i < 3; i++)
{
value[i] = "";
}
</code></pre>
<p>Why it says that it's unassigned?</p>
| c# | [0] |
4,114,436 | 4,114,437 | Error - The constructor Level2Class(double) is undefined | <p>My code - </p>
<pre><code>public abstract class Level1Class
{
protected double num = 0.0D;
protected Level1Class(){}
protected Level1Class(double num){this.num = num;}
protected abstract methods A, B, C...etc //pseudocode !
}
public class Level2Class extends Level1Class
{
//NO CONSTRUCTORS HERE
//B... | java | [1] |
4,777,746 | 4,777,747 | Always Returning Zero | <p>Why this code always return 0</p>
<pre><code>public int loveCal(String bname, String gname) {
char[] boy_name = bname.toLowerCase().toCharArray();
char[] girl_name = gname.toLowerCase().toCharArray();
int boy = 0;
int girl = 0;
int love = 0;
for(int i = 0; i < bname.length(); i++)
... | java | [1] |
5,106,622 | 5,106,623 | Use StringBuilder or String in the following case? | <pre><code>String address=null;
String body = "";
String date = "";
for(int i = 0; somecondition; i++)
{
body = cursor.getBody(i);
//and so on all strings get changed
//REST OF THE CODE
}
</code></pre>
<p>This loops for arround 500 times so what should I use?</p>
| java | [1] |
4,693,903 | 4,693,904 | Iterating the json response | <p><a href="http://paste.pocoo.org/show/VEB0PT7yZO1yuOxtrXGP/" rel="nofollow">http://paste.pocoo.org/show/VEB0PT7yZO1yuOxtrXGP/</a></p>
<p><strong>I tried the following way, but i could not get the result.</strong> </p>
<pre><code> for (i = 0, len = json.PatientListGetResult.Appointments.length; i < len &... | javascript | [3] |
2,438,837 | 2,438,838 | populating char** | <p>I'm trying to read in a list of files from another file. The file reading works but populating the array of char* isn't. It works for the first iteration but then gets a bad pointer on the next line. I tried with a vector of strings but was having problems, I think due to its destructor trying to free an argv.</p... | c++ | [6] |
3,150,256 | 3,150,257 | Redirect to error page when the browser back button hit? | <p>I want to redirect to my Error page. If the user clicks the Back button in my web application.
I want to achieve this simply in Javascript. Do anyone knows?</p>
| javascript | [3] |
4,654,858 | 4,654,859 | How can i convert a String[] into a String[][] in Java? | <p>How can i convert a String[] array into a String[][]? For example, if the String[] was like this: String[] array = new String[]{"Artist,Song,Genre"}; How can i convert that into a String[][] so that "Artist" is in one "cell" e.g String[0][0] = "Artist"; </p>
<p>Thank you.</p>
| java | [1] |
3,844,023 | 3,844,024 | Compound component design problem in Android | <p>I am trying to create a compound component in android. This compound component have 2 inner components. one of them is a custom component (assume CompX ) with some public methods.
And the second component is the plain button
So the compound component looks like the below,</p>
<p>class CompoundComp extends LinearL... | android | [4] |
4,110,598 | 4,110,599 | Need Javascript Code That Will Open A Webpage Then Fill Out The Form And Submit | <p>Just as the title says, I need help with javascript code that will open a webpage and fill out the form then submit the information.</p>
<p>Here is what I have currently:</p>
<pre><code>var firstName = 'Billy';
var lastName = 'Bob';
var loginWindow = window.open('my website', 'loginWindow');
loginWindow.document.g... | javascript | [3] |
4,003,672 | 4,003,673 | public void add(int a, int... b) { | <p>Could someone show me a practical a use of the ... array method delcaration?
Is it just a way to declare an optional parameter instead of passing null value?</p>
<pre><code>public void add(int a, int... b) {
// do something
}
add(1);
add(1,2,3);
</code></pre>
| java | [1] |
2,021,033 | 2,021,034 | Loading renamed C# assembly throws FileNotFoundException | <p>I have an C# assembly that is referenced by a C# application. </p>
<p>Because of our coding standards, there is a rule where debug DLLs are postfixed by a "d" (e.g. <code>ProjectA.dll</code> becomes <code>ProjectAd.dll</code>). When I add a reference to the renamed DLL to the application, it builds successfully, bu... | c# | [0] |
5,545,167 | 5,545,168 | How to parse user mentions in PHP | <p>I am developing a system where user enters his message in following format:</p>
<p>Hey @john are you coming in birthday party of @elise?</p>
<p>here as soon as you type @ in text box dropdown appears and you can select desired name from that.</p>
<p>My problem is is while posting the message it should be HTML cod... | php | [2] |
2,097,081 | 2,097,082 | Should GD need so much memory when resizing? | <p>I have a resize script i made in PHP that uses GD (my VPS doesn't have imagemagick installed) to resize an image, I have recently started getting memory errors so i have increased the memory_limit up to 50Mb and still get memory error. </p>
<p>The image I am trying to resize is only 2Mb, is this correct for PHP ima... | php | [2] |
80,614 | 80,615 | converting a std::string to an array of c strings | <p>I'm trying to find a way to convert a string to array of c strings.
So for example my string would be:</p>
<pre><code>std::string s = "This is a string."
</code></pre>
<p>and then I would like the output to be something like this:</p>
<pre><code>array[0] = This
array[1] = is
array[2] = a
array[3] = string.
array... | c++ | [6] |
4,676,558 | 4,676,559 | Server.Transfer() inside Global.asax file showing problem | <p>I am using Global.asax page for error handling. While there is an error I want to transfer to a Error page to show a friendly message. But it is not showing that page.</p>
| asp.net | [9] |
237,641 | 237,642 | jQuery <div> issue | <p>I have HTML table structure displaying some records.<br/>
There is an "info" (i.e., small 16x16 'i') image, I need following functionality:<br/><br/>
Clicking on "info" image should open a div, containing 'more' details about particular/selected transaction<br/>
Issue/problem is I need to show div above page content... | jquery | [5] |
5,451,083 | 5,451,084 | Run jar with reference to specific java version | <p>I got an exception running XMLspark.jar because of my JRE version configured in the system.</p>
<p>How can i suggest another java that is residing in my system?</p>
<pre><code>C:\Program Files\XMLSpark\XMLspark>java -jar XMLspark.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: base/MainWi... | java | [1] |
3,136,717 | 3,136,718 | Service Unavailable 503 when trying to update to ASP.NET 4 | <p>I am trying to update my web application from 3.5 to 4.0. I've changed to ASP.NET 4.0 Integrated application pool and removed from web.config all the unnecessary tags.</p>
<p>When I try now to access my site it says:</p>
<blockquote>
<pre><code>Service Unavailable
</code></pre>
<p>HTTP Error 503. The service ... | asp.net | [9] |
5,313,000 | 5,313,001 | Show Avatar Facebook to ImageView | <p>I used the code as follows to show up facebook avatar to ImageView </p>
<pre><code>@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ImageView img = (ImageView) findViewById(R.id.imgAvatar);
img.setImageBitmap(getBitmapF... | android | [4] |
2,965,050 | 2,965,051 | Java error cannot find symbol class Scanner.using jdk 6 | <pre><code>import java.util.scanner;
import javax.swing.JOptionPane;
public class FirstHomeJavaApplet{
public static void main(String[] args){
int num1=2;
int num2=2;
int sum;
sum=num1+num2;
System.out.println("My first home practice of java applet");
JOptionPane.showMessageDialog(null, num1 + "+" + num2 + "... | java | [1] |
2,335,405 | 2,335,406 | toggle div next to clicked div from many div having same class | <p>i want to toggle ul next to clicked tag from many ul having same class just like this </p>
<pre><code> <ul class="section menu">
<li>
<a href="#" class="menuitem">Menu 1</a>
<ul class="submenu">
<li> <a>Submenu 1</a> </li>
</ul>... | jquery | [5] |
2,745,117 | 2,745,118 | Javascript: How to simplify this list of JS styles? | <p>I'm trying to write a simple form. The form basically need to validate 2 mandatory drop down fields upon clicking the submit button by highlighting the labels if nothing was selected.</p>
<p>I have this working fine, but its so long and chunky atm that I must ask, is there a way to simply this? </p>
<pre><code>fu... | javascript | [3] |
1,309,132 | 1,309,133 | Twitter Bootstrap: Content Appears When Button is Clicked, But Content Should Show on 'Hover' - What's Wrong Please? | <p>Thanks in anticipation of help.</p>
<p>Using the W3C Bootstrap popover tutorial I got the below Code. Using Visual Studio the webpage runs fine; however, the content "It's so simple to create a tooltop for my website!" should show when the button is hovered over (as in the 1st demo here: <a href="http://www.w3reso... | jquery | [5] |
4,350,271 | 4,350,272 | Iphone tableview time show in seconds | <p>In iphone application
I have a table view having 5 rows. first row is for showing the decreasing digit like time in second. i.e 30,29,28.......0. this is for user to choose a action from table view within 30 seconds. how this will implement?</p>
<p>Thanks, Aaryan</p>
| iphone | [8] |
1,527,466 | 1,527,467 | LoadLibraryEx function | <p>I am trying to use the LoadLibraryEx function however, it fails everytime and does not give me any proper error to know what is going wrong. Here is my code: </p>
<pre><code> HMODULE h;
h = LoadLibraryEx("C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Include\\LMJoin.h", NULL, 0x00000008);
... | c++ | [6] |
5,594,015 | 5,594,016 | Why my external DB is not accessible in Android 4? | <pre><code> @Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory){
File externalFilesDir = Environment.getExternalStorageDirectory();
if(externalFilesDir == null)
return null;
File dbFile = new File(externalFilesDir, SQLiteHe... | android | [4] |
4,475,163 | 4,475,164 | Which changes need to do during uplaod iPhone app on AppStroe? | <p>I am uploading app on App store it is necessary to change bundle? </p>
| iphone | [8] |
1,802,129 | 1,802,130 | app jumping around instead of going in a linear pattern | <p>I am having a problem with my app jumping around instead of going through the search in a linear fashion. I'm not sure what is causing this and any help is appreciated. </p>
<p>Thanks</p>
<p><em>(removed link)</em></p>
| android | [4] |
4,466,827 | 4,466,828 | add diffrent intent to each notification | <p>Currently i'm developing android app witch will show notifications(advertisements, discounts avalible and so on) when i'm near some shop. The problem is there could be many shops around and as a result many notifications, so how can i set difrent intents for my notifications if they are generated like this:`</p>
<p... | android | [4] |
2,427,188 | 2,427,189 | Accessing reference of Class inside itself while in different context | <pre><code>function Foo(){
}
Foo.prototype={
foo:'some text'
,bar:function(){
console.log('Want to be able to retrieve foo of Foo',this.foo);
}
}
var instance=new Foo();
instance.bar.apply({});
</code></pre>
<p>Here is link to jsfiddle:</p>
<p><a href="http://jsfiddle.net/dnJFt/1/" rel="nofollow... | javascript | [3] |
1,463,989 | 1,463,990 | is there putAll like method for dict in python? | <p>Is there a method like putAll() for dict in python? I did not find a method in the document that seems to do this. Sure I can iterate over the key set and put every thing in the new dict, but I think there might be a better way.</p>
<p>Also (this might be another question), is 'Python Library Reference' considered ... | python | [7] |
1,811,143 | 1,811,144 | Canvas to ImageView problem in Android | <p>I want to display Canvas contents on ImageView in android,</p>
<p>but ImageView displaying blank.</p>
<pre><code>Bitmap imgBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.image);
Canvas canvas = new Canvas();
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
canvas.drawBitmap(imgBitmap, 0, 0, paint... | android | [4] |
1,925,013 | 1,925,014 | Writing into a document using Javascript | <pre><code>jQuery(document).ready(function($) {
var devices = $(".menu-item-custom").map(function() {
return this.id.substr(10);
}).toArray();
$.each(devices, function() {
$("#menu-item-settings-"+this+" .description").eq(3).after("<p class='description description-t... | javascript | [3] |
5,081,663 | 5,081,664 | jquery each vs. native for | <pre><code>var arr=[];
var k;
for(var i=0;i<5000;i++)
arr[i]=i;
console.time("native loop");
var len=arr.length;
for(var j=0;j<len;j++)
k=arr[j];
console.timeEnd("native loop");
console.time("jq loop");
$(arr).each(function(i,el){
k=el;
});
console.timeEnd("jq loop");
</code></pre>
<p>It is generating, 14ms... | jquery | [5] |
3,608,630 | 3,608,631 | org.json.JSONException: Unterminated object | <p>I am writing an android application.Can someone plz let me know which object is unterminated here ?? </p>
<pre><code>12-24 17:47:26.642: DEBUG/youtubeviewer(273):
12-24 17:47:26.672: WARN/youtubeviewer(273): org.json.JSONException: Unterminated object at character 23 of [{ "id":"12,
... | android | [4] |
4,780,967 | 4,780,968 | Sorting files in a list | <p>Let's say I have a list of files</p>
<pre><code>files = ['s1.txt', 'ai1.txt', 's2.txt', 'ai3.txt']
</code></pre>
<p>and I need to sort them into sub-lists based off of their number so that</p>
<pre><code>files = [['s1.txt', 'ai1.txt'], ['s2.txt'], ['ai3.txt']]
</code></pre>
<p>I could write a bunch of loops, how... | python | [7] |
4,672,991 | 4,672,992 | What is wrong with this attempt using php to include functions.php and header.php file? | <p>What, if anything, is wrong with this code? I'm a beginner. I'm trying to include a header file but when I test and try to load it says it's not working.</p>
<pre><code><?php include("http://test.orwallo.com/widget_corp/includes/header.php"); ?>
</code></pre>
| php | [2] |
1,627,857 | 1,627,858 | trying to redirect an entire state from viewing website | <p>I'm trying to send all visitors in the state of NY to a different page but in my logs I still see people from NY in my main page meaning that it isn't working. Is this configured correctly and is there a php version of max-mind geopip? </p>
<pre><code><script language="JavaScript" src="http://j.maxmind.com... | javascript | [3] |
5,031,756 | 5,031,757 | Build a Ranking | <p>I have a newssystem where you can rate News with 1 to 5 stars. In the Database i save the count, the sum and the absolute rating as int up to 100 (for html output, so 5 stars would be 100 1 star would be 20percent.
Now i have three toplists:
Best Rated
Most viewed
Most commented</p>
<p>Last two ones are simple, but... | php | [2] |
3,946,914 | 3,946,915 | Is there anything wrong with the way that this C++ header is laid out? | <pre><code>#pragma once
#include "LudoCore/Singleton.h"
class LudoTimer : public Singleton<LudoTimer>
{
friend class Singleton<LudoTimer>;
public:
void Update();
void ShortenDay();
void LengthenDay();
UINT64 GetDeltaTime() const;
float GetPercentageOfDayElapsed() const;
private:
... | c++ | [6] |
1,738,870 | 1,738,871 | How to open a list from python module depending upon user input | <p>I have a bunch of lists in a module (say student_data) which I import in my file. All the list are of type student[1-100]. Now depending on user input I wish to iterate through the corresponding list. Lets say the user inputs 10 then I want to print the contents of list student10. How do I go about doing this?</p>
... | python | [7] |
1,255,672 | 1,255,673 | How to record video in iphone | <p>HI,</p>
<p>I need to record video using iPhone. To do that i used UIImagePickerController. I have an iPhone 3G, with me. when i run my code to check if source type available it says device not supported. My OS is 3.2.1, where i am wrong, can some one tell me what i need to change. </p>
<p>Also is there some other ... | iphone | [8] |
2,410,212 | 2,410,213 | Android requesting superuser command gingerbread 2.3 | <p>So I am making an app that request superuser permission and then on a button click will reboot the phone. This command below works fine in <strong>[a modified version of]</strong> android 2.2 api level 8 but when trying to use <strong>[a modified version of]</strong> gingerbread 2.3 api level 9 or 10 it will not ope... | android | [4] |
4,959,118 | 4,959,119 | Thread.dispatchUncaughtException is being thrown, but I don't have any threads | <p>I'm getting this error dispatchUncaughtException and I have no idea what that means, googling has been less than effective in answering what it is. I consistently get it on the first run through of some code I wrote for a recursive interpolation search.</p>
<pre><code>public static int interpolationSearch(int[] ar... | java | [1] |
3,801,764 | 3,801,765 | Assign elements of a list to variables without knowing the size of list? | <p>Newbie here. <br>
Say you want to assign the elements of a list to variables without knowing beforehand the size of the list, how do you do it, specifically in Python? <br>
Eg. <code>list</code> has 5 elements, program creates 5 variables (var1, var2, var3, var4, var5) and assigns the elements to it. </p>
| python | [7] |
4,385,981 | 4,385,982 | How to add ul and li to each image with jquery? | <p>I have the following code generated dynamically. It can be just one, two, three or four images.</p>
<pre><code><div id="system">
<FORM ACTION="command.asp" METHOD="get" NAME="artForm">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD VALIGN="top">... | jquery | [5] |
1,317,488 | 1,317,489 | PHP contest Logical | <p>In one of my web application in php there is a contest section . It contains a multiple choice 10 questions , Each has 4 options . </p>
<p>After user filling the form I am saving the answer as comma separated values in a db . like follows:</p>
<pre><code>user | answer
-------------------------------------
112... | php | [2] |
5,260,984 | 5,260,985 | iPhone:How to implement Push Notification in iPhone like facebook? | <p>I want to implement push notification functionality in my apps like Facebook provide us so please tell me any link or any idea to develop this functionality.</p>
| iphone | [8] |
5,542,219 | 5,542,220 | How to use php serialize() and unserialize() | <p>My problem is very basic.</p>
<p>I did not find any example to meet my needs as to what exactly serialize() and unserialize() mean in php? They just give an example - serialize an array and show an output in an unexplained format. It is really hard to understand the basic concept going through their jargon.</p>
<p... | php | [2] |
5,714,749 | 5,714,750 | which website will be nice for Jquery Tutorial | <p>Please suggest a site to learn Jquery it should contain more tutorial.</p>
| jquery | [5] |
4,042,433 | 4,042,434 | Java code for system date dynamically and giving an alert | <p>I am trying to write a java code that will give an alert at a specific time of day but I don't know why I am failing(Please be gentle to my questions as I am totally new to programming). I have this code</p>
<pre><code> new ScheduledThreadPoolExecutor(1).schedule(new Runnable() {
public void run() {
... | java | [1] |
1,185,271 | 1,185,272 | php bool echo output | <p>I have a strange problem.</p>
<p>If have function that does this return the value,</p>
<pre><code>public function isVipCustomer($customer_id){
$cus_vip_id=FALSE;
$sql="SELECT customerid FROM customers WHERE is_vip='1'
AND customerid='".$customer_id."' LIMIT 0,1 ";
$result... | php | [2] |
2,924,333 | 2,924,334 | How can I get a delete confirm in asp:GridView | <p>How do I pop up a delete confirm for a delete button in an asp:GridView?</p>
| asp.net | [9] |
1,870,172 | 1,870,173 | Using array.splice inside Array prototype | <pre><code>Array.prototype.move = function(oldIndex, newIndex) {
var val = this.splice(oldIndex, 1);
this.splice(newIndex, 0, val[0]);
}
//Testing - Change array position
var testarray = [1, 2, 3, 4];
testarray.move(3, 0);
console.log(testarray);
</code></pre>
<p>This produces an error "this.splice is not a f... | javascript | [3] |
2,178,452 | 2,178,453 | convert std::wstring to const *char in c++ | <p>How can i convert std::wstring to const *char in c++?</p>
| c++ | [6] |
4,238,133 | 4,238,134 | Compare dictionary values and key in python | <p>I have a dictionary <code>item</code>. It has strings as keys and the values are lists e.g.:</p>
<pre><code>item['title'] = [u'python']
item['image'] = [u'/link/to/image']
item['link'] = [u'link to article']
</code></pre>
<p>I want to check if any value is 0 in length, but link or image may be empty, so I did the ... | python | [7] |
5,502,347 | 5,502,348 | Assistance required for scanning the .mp3 files in sdcard | <p>I have been trying to make a music player application,and as I have just started android, Could any one tell me how can I accces the music files in my sdcard, I have given the location of the sdcard as "\sdcard\" in my String variable MEDIA_PATH ,but what after that? How should the system access the music files put ... | android | [4] |
355,712 | 355,713 | update nested array documents in mongodb | <p>I am new guy to mongodb and node.js. I have a one problem, I have a data's contain in mongodb has following structure. And i want to update id:11 & name : John. </p>
<p>So <strong>first</strong> i have check name: john already present or not, using this coding</p>
<pre><code>collection.findOne({"team":testi... | javascript | [3] |
4,276,457 | 4,276,458 | Hide Checkbox on a particular page | <p>I am working on ASP.NET application where I am reusing a user control. The user control contains a checkbox and bunch of other controls. I want to display all the controls inside the user control on all the pages but on one single page I want to hide the checkbox. </p>
<p>I was thinking that I can use the databind ... | asp.net | [9] |
4,288,274 | 4,288,275 | Parsing a boolean json value in jQuery | <p>In this fiddle I'm just trying to return true : <a href="http://jsfiddle.net/WCFtp/" rel="nofollow">http://jsfiddle.net/WCFtp/</a> for jQuery key 'saved'</p>
<p>Why do I receive the error "Uncaught SyntaxError: Unexpected token s"</p>
<p>Code below : </p>
<pre><code> var test = "{saved: true}";
var... | jquery | [5] |
1,226,421 | 1,226,422 | There is a problem in width property for DropDownList | <p>I have dropdownlist and textbox and both of them have width property set to 100px,
why the dropdownlist is smaller than textbox.</p>
<pre><code><asp:DropDownList runat="server" Width="100" ></asp:DropDownList>
<asp:TextBox runat="server" Width="100" ></asp:TextBox>
</code></pre>
| asp.net | [9] |
3,573,335 | 3,573,336 | Populate ListView from List<String[]> | <p>I am getting data in List. It is in the following format.</p>
<pre><code> AAA 123 456
BBB 235 156
CCC 458 425
</code></pre>
<p>I would like to display first column in the listview.</p>
<pre><code> ListView list1 = (ListView)findViewById(R.id.out_listtext);
ArrayAdapter&l... | android | [4] |
2,674,121 | 2,674,122 | String values to Numeric Array | <p>What is the best way to convert the string values to an int array, e.g.:</p>
<pre><code>var s = '1,1,2';
</code></pre>
<p>to:</p>
<pre><code>var a = [1,1,2];
</code></pre>
<p>Thanks</p>
| javascript | [3] |
782,229 | 782,230 | C# Using wyBuild for updating | <p>Is there a way to automate the process of checking updates?
I would like my application to automatically check updates when it starts, instead of having to click on a MenuStrip.</p>
<p>Thanks!</p>
| c# | [0] |
5,256,744 | 5,256,745 | Python object.__repr__(self) should be an expression? | <p>I was looking at the builtin object methods in the <a href="http://docs.python.org/reference/datamodel.html#objects-values-and-types">Python documentation</a>, and I was interested in the documentation for <code>object.__repr__(self)</code>. Here's what it says:</p>
<blockquote>
<p>Called by the repr() built-in f... | python | [7] |
296,651 | 296,652 | How to get NumberFormat instance from currency code? | <p>How can I get a <code>NumberFormat</code> (or <code>DecimalFormat</code>) instance corresponding to an ISO 4217 currency code (such as "EUR" or "USD") in order to format prices correctly?</p>
<blockquote>
<p><strong>Note 1:</strong> The problem I'm having is that the <code>NumberFormat</code>/<code>DecimalFormat<... | java | [1] |
10,474 | 10,475 | How to do circular scroll view? | <p>I am doing an application in which i have to show a semi circle on which there should be different options in scroll view. That means on that image of semicircle i have to show scroll in circular way .</p>
<p>How can i do that??</p>
<p>Can anyone please guide me ? </p>
| iphone | [8] |
3,983,838 | 3,983,839 | Testing if PHP Variable contains a Nowdoc String | <p>Is there a way to tell if a PHP variable contains a nowdoc string?</p>
<p>I recently posted <a href="http://stackoverflow.com/questions/10918924/escaped-backslash-characters-in-php-single-quoted-strings">this</a> question.</p>
<p>My goal is to output PHP strings exactly as they are and I discovered that using nowd... | php | [2] |
4,571,095 | 4,571,096 | How to show the selected user is admin in php | <p>In one query i am getting all the user details in the user table.</p>
<pre><code>$userDetails = $dbUser ->getAllUsers();
</code></pre>
<p>In second query i am getting the user details which are there in the selected group.</p>
<pre><code>$groupMemberDetails = $dbGroupMembers ->getAllGroupMembers($groupId);... | php | [2] |
1,751,361 | 1,751,362 | Having problems with a java program | <p>I have a <strong>Fahrenheit</strong> class thats supposed to take a number from the main class and convert it into celsius.
Everything works but the conversion part.
I made a method that I call so that the number can be converted, but whenever the program runs it gives me either -0.0 or 0.0 (no matter what the num... | java | [1] |
5,161,032 | 5,161,033 | JQuery finding the right .next() | <p>How can I keep going through <code>.next()</code>s until I find the one with the class or id I want?</p>
<p><code>.next()</code> only searches the immediately succeeding sibling but I want JQuery to keep going until it finds the one I want <b>and only return that one</b>. In the below case, I'd like JQuery to retur... | jquery | [5] |
3,119,846 | 3,119,847 | Long path with ellipsis in the middle | <p>I would like to truncate a long path to specific length. However, I want to have the ellipsis in the middle.</p>
<p>for example: <code>\\my\long\path\is\really\long\and\it\needs\to\be\truncated</code>
should become (truncated to 35 chars): <code>\\my\long\path\is...to\be\truncated</code></p>
<p>Is there a standard... | c# | [0] |
3,815,566 | 3,815,567 | python unittest assertRaises throws exception when assertRaises fails | <p>I've got code where assertRaises throws an exception when assertRaises fails. I thought that if assertRaises fails then the test would fail and I'd get a report at the end that says the test failed. I wasn't expecting the exception to be thrown. Below is my code. I'm I doing something wrong? I'm using Python 2.... | python | [7] |
1,325,554 | 1,325,555 | Android Round Button and Spinner inside Activity Group | <p>I have a Spinner and 2 buttons in an Activity Group. I want to apply rounded corner to the buttons. I have created shape xml resource file for round button in Android. I have assigned this resource file as background to the button while creating the button in Layout. But the change is not reflected after executing t... | android | [4] |
3,686,878 | 3,686,879 | HTTP POST not working.Getting Not Found error | <p>I am trying to Post a .txt file to a local tomcat webserver that i have on my system.
But when i try to do a post then i get a Error: Not Found.
The source file is present but even after that i get this error.
Can you please let me know what i am doing wrong here. i have pasted my code below.</p>
<pre><code> Fil... | java | [1] |
3,730,106 | 3,730,107 | Is it possible to delay multiple parts of a thread with a gui? | <p>Is it possible to delay multiple parts of a thread with a gui?
Like setting a JLabel</p>
| java | [1] |
5,516,603 | 5,516,604 | How to dispose a WPF application GUI? | <p>I have a WPF application with a GUI on the MainWindow. I want to dispose this window after a while based on some user actions. But I want the application continue to run in background. I know that Window can be set to hidden, but it still uses the memory.How to destroy the MainWindow without quitting the WPF applica... | c# | [0] |
1,151,566 | 1,151,567 | How can I optimize the construction of a pair in this case? | <p>I have a </p>
<pre><code>template<class Key, class Value, class Comp = std::less<Key> > class MyContainer;
</code></pre>
<p>which is implemented with a tree of nodes internally, where each node type is defined as below:</p>
<pre><code>typedef std::pair<Key, Value> Node;
</code></pre>
<p>To eras... | c++ | [6] |
648,539 | 648,540 | delete a particular row from session array | <p>I am a beginner in php.
I want to know how a particular row in a php session array can be deleted(not from the database, but from the page only).
I have a table namely, issues having columns issue_id & issue_descrp.
The page is displayed with a table in which each row contains issue and its corresponding id. E... | php | [2] |
3,037,623 | 3,037,624 | android how to create a try it yourself editor | <p>I have read about javascript editors here, more specifically refered this link <a href="http://stackoverflow.com/questions/8794998/how-to-create-a-javascript-try-it-yourself-editor">How to create a JavaScript "Try It Yourself" Editor</a> but I would want to know how to integrate a java script into my andro... | android | [4] |
3,340,596 | 3,340,597 | Finding structures from web articles with Python | <p>I'm looking for some Python tool, that can help me determine content structures from an article website such as <a href="http://www.bbc.co.uk/" rel="nofollow">http://www.bbc.co.uk/</a>. I used boilerplate removal library - Boilerpipe to clean the web page from unwanted stuff (banners, links, pictures, etc).
Now whe... | python | [7] |
3,860,750 | 3,860,751 | How to Create a Cloud Chart? | <p>I've seen these charts referred to as tag clouds, task clouds, and cloud charts, but can anyone recommend a pure JavaScript (no Flash please) library or utility with which one can generate cloud charts? Many thanks.</p>
| javascript | [3] |
4,726,088 | 4,726,089 | How does jQuery .live() work? | <p>I was thinking about performance regarding</p>
<p><code>.click()</code> vs <code>.live("click")</code></p>
<p>and that left me wondering about how .live does work.</p>
<p>Does it monitor DOM changes and when it detects a change in the DOM it just attaches the event then, does it use some sort of timer (I wouldn't... | jquery | [5] |
5,271,277 | 5,271,278 | iPhone Retina Graphics | <p>I have a question RE Retina display graphics (and potentially iPad 2 graphics if the rumours of double resolution displays are to be believed).</p>
<p>Is there any advantage to having two graphics:
Graphic.png 480x320
and
Graphic@2.png 960x640</p>
<p>and letting the iPhone use the @2 version for retina displays r... | iphone | [8] |
5,854,769 | 5,854,770 | Lazy load class in PHP | <p>I want to lazy load class but with no success</p>
<pre><code><?php
class Employee{
function __autoload($class){
require_once($class);
}
function display(){
$obj = new employeeModel();
$obj->printSomthing();
}
}
</code></pre>
<p>Now when I make this </p>
<pre><co... | php | [2] |
1,542,660 | 1,542,661 | PHP Parse error (Beginner) | <pre><code><?php
#Console Application
#Öppnar Fil.
$file = fopen("words.txt","r")
#Finns Filen?
if(file_exists("words.txt")) {
echo "Filen Finns";
}
?>
</code></pre>
<p>Gives me error </p>
<pre><code>PHP Parse error: parse error in C:\main.php on line 7
</code></pre>
<p>What im going wrong? do you see the pr... | php | [2] |
4,696,764 | 4,696,765 | Unable to generate a string | <p>I have a group of 7 checkboxes as name="restriction[]" and value that I have assigned is Pos1 to POS7. Now I wish to generate string according to selected chechkboxes that is If 1st,5th, 7th boxes are selected it gives me sting as 1000101
if only first is selected it generate 1000000</p>
<p>My code is </p>
<pre><c... | php | [2] |
516,586 | 516,587 | Android: Saving ListView data when app closes | <p>I have an Android app which has a list view which is updated during the lifetime of the app. </p>
<p>I have a 'Quit' menu option which saves the list data in a thread and then finishes the app by calling finish();</p>
<p>How should I save the data if the app gets killed by the system? In particular, when should ... | android | [4] |
5,406,841 | 5,406,842 | error: ISO C++ forbids comparison between pointer and integer | <p>here is some codes that I want to find the desired substring block in a string:</p>
<pre><code>#include <algorithm>
#include <string>
using namespace std;
...
unsigned int stage = 3;
string::iterator iter = s.begin();
string::iterator iter_next = s.end();
for (unsigned int i=0; i<stage; i++) {
... | c++ | [6] |
2,099,968 | 2,099,969 | Javascript compare 3 values | <p>I have 3 values that I want to compare f, g and h. I have some code to check that they all equal each other and that none of them are null. I've had a look online but could not find anything that seemed to answer my query. Currently I am checking the code in the following way...</p>
<pre><code>if(g == h && ... | javascript | [3] |
1,305,413 | 1,305,414 | How to use callbacks in my own code | <p>Here I update my world to include the canvas size</p>
<pre><code>world.getViewPort().updateViewPortSize(width,height);
</code></pre>
<p>Is there a better way to do this? Is there a way that I can automatically update my world object without having to manually call it in the setSurfaceSize method but instead call ... | android | [4] |
3,237,669 | 3,237,670 | python __str__ for an object | <p>While trying to figure out how BeautifulSoup works, I incidentally learnt the <code>__str__</code> method (I'm new to python). So if I did not misperceived then the <code>__str__</code> method helps to shape how the class will be represented if printed out. For instance:</p>
<pre><code>class Foo:
def __str__(se... | python | [7] |
2,281,563 | 2,281,564 | Why can't I put a variable declaration in the test portion of a while loop? | <p>You can, obviously, put a variable declaration in a for loop:</p>
<pre><code>for (int i = 0; ...
</code></pre>
<p>and I've noticed that you can do the same thing in if and switch statements as well:</p>
<pre><code>if ((int i = f()) != 0) ...
switch (int ch = stream.get()) ...
</code></pre>
<p>But when I try to ... | c++ | [6] |
3,677,231 | 3,677,232 | how to give dynamic path to the $.get method of jquery | <p>i am writing a function to load highcharts data from a .csv file. but i am having some problem in providing the file path to the jquery's .get method.
Here is my method</p>
<pre><code> $.get('data.csv', function(data)) {.......}
</code></pre>
<p>my file 'data.csv' is placed in a path: "myproject/public/data.cs... | jquery | [5] |
4,222,869 | 4,222,870 | fatel error wx/wx.h: No such file or directory | <pre><code>In file included from c:/abc.h:11:0,
from a.h:12,
from glwidget.h:5,
from mainFrm.h:12,
from main.cpp:10:
c:/xx/xx/include/Logger.h:12:19: fatal error: wx/wx.h: No such file or directory
compilation terminated.
make[2]: *** [build/Debug/MinGW-Windows/main.o... | c++ | [6] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.