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
3,551,229
3,551,230
Create class with interface using C# abstract factory
<p>How to create a class with interface using C# abstract factory? Can anybody explain with example.</p>
c#
[0]
3,968,844
3,968,845
Why isn't my hover event firing in JQuery?
<p>I'm not sure why my event isn't firing? I simply want to change the list style type when the user hovers over an li. It doesn't look like I'm missing anything, but nothing is happening.</p> <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&gt; &lt;!DOCT...
jquery
[5]
154,395
154,396
How to add the data from tableview to sql
<p>I am making an application. On one of the tab I have used tableview on which I am adding the local notifications timing by using time picker. I am also using sql database in my app. Now I want the timing which I have added in the table view must be store in database so that I can retrieve it on another tab. How Can ...
iphone
[8]
2,163,124
2,163,125
Android jpg animation
<p>I would like to download 10 JPG pictures from a site.</p> <p>The pictures where taken at intervals >> that is no problem</p> <ol> <li>How do I save pictures in an array of pictures.</li> <li>How would I show them as a moving picture (movie like).</li> <li>What component to use on Android (imageView, animator)? </l...
android
[4]
3,864,537
3,864,538
Execute a timeline of actions
<p>i have a bunch of actions that need to be executed in an android app after an exact waiting period.</p> <p>action 1: start after 1000ms<br> action 2: start after 2000ms<br> action 3: start after 3000ms</p> <p>i developed 2 different approaches to achieve this. one with a ScheduledThreadPoolExecutor and one with a ...
android
[4]
3,133,073
3,133,074
Error when trying to launch an executable .jar file
<p>Hi when in try to run jar file this error shown : "failed to load main-class manifest attribute from ..." but when i run project in netbeans it`s run successfuly !!!</p>
java
[1]
977,841
977,842
jquery How to loop through a series of items and take action?
<p>Given HTML like:</p> <pre><code>&lt;div class="itemList"&gt; &lt;div class="streamBox version-2"&gt; stuff &lt;/div&gt; &lt;div class="streamBox version-2"&gt; stuff &lt;/div&gt; &lt;div class="streamBox version-3"&gt; stuff &lt;/div&gt; &lt;div class="streamBox version-2"&gt; stuff &lt;/div&gt; &lt;div c...
jquery
[5]
4,803,858
4,803,859
Using a console application to reference a VB.net exe form function
<p>I am very new to referencing dll's and .exe's. I have an application that sends reports to users on a daily basis. This is a manual process, and I have been tasked to automate that process. Now, I would like to create a console application, and reference that form that does the work on the .exe. I am so lost on ...
c#
[0]
3,202,814
3,202,815
APN Setting In Android
<p>I am trying to use APN on my application ,can I know how I can configure the APN setting programmatically in android? I also read some of instruction and code given on <a href="http://blogs.msdn.com/b/zhengpei/archive/2009/10/13/managing-apn-data-in-google-android.aspx" rel="nofollow">MSDN</a> and <a href="http://w...
android
[4]
5,435,556
5,435,557
What is an efficient way of waiting for a dynamically loaded Javascript file to finish loading?
<p>I'm loading a Javascript file that has a function in it that I'd like to call. This is not possible, since between 'initiating' the load, and actually calling the function, the JS isn't loaded yet. Of course, I could do something like <code>setTimeout('functionCall();',5000);</code>, but I don't think this is a very...
javascript
[3]
4,569,113
4,569,114
javascript dynamic prototype
<p>I want extend a new JS object while creation with other object passing a parameter. This code does not work, because I only can extend object without dynamic parameter.</p> <pre><code>otherObject = function(id1){ this.id = id1; }; otherObject.prototype.test =function(){ alert(this.id); }; testObject = fun...
javascript
[3]
1,236,808
1,236,809
What is the relationship of .lib and .obj to each other and my project in c++?
<p>What are how do .lib and .obj files relate to each other? What is their purpose? Is a .lib just a collection of .obj files? If so are the .obj's then stored inside the .lib making the .obj's unnecessary? </p>
c++
[6]
4,541,854
4,541,855
How can I populate a menu using intents?
<p>How can I populate a menu using <a href="http://developer.android.com/guide/topics/intents/intents-filters.html" rel="nofollow">intents</a>? I didn't understand that thing.</p> <p>Or is there any better way for that?</p> <h3>Update:</h3> <p>Suppose I have an application that need to resize the image,and there are...
android
[4]
2,562,554
2,562,555
Where to put common shared methods
<p>I have a bunch of methods that are commonly used everywhere. Right now the codefile is named globals, to represent the fact that they are... in fact... global.</p> <p>However, I do not like this.</p> <p>I want to group these into a class and pass an interface around. I'll make only one instance, but I'm not fallin...
c#
[0]
2,493,605
2,493,606
Variable doesn’t exist in current context
<p>I've got a rather odd situation which is bound to something breathtakingly obvious, but it has me stumped.</p> <p>Quite simply, I'm trying to load some configuration data into my app, as follows:</p> <pre><code>namespace XMLGrabberCS { class Grabber { public static void Main() { string test = "tes...
c#
[0]
4,844,680
4,844,681
MRAID file reference
<p>The IAB MRAID specification <a href="http://www.iab.net/media/file/IAB_MRAID_VersionOne_final.pdf" rel="nofollow">http://www.iab.net/media/file/IAB_MRAID_VersionOne_final.pdf</a></p> <h2>Says that a reference to an mraid.js file should be the first line within an MRAID compliant ad</h2> <p>MRAID script reference T...
javascript
[3]
1,310,598
1,310,599
Scale Animation on an EditText .. help
<p>i'm trying to animate an EditText when i touch it using scale animation , i managed to do that by creating my own editText (extends EditText) .The animation works , but after it the EditText size(width) does not change it still the same . How can i change that ? I tried to call this.setWidth() after the animation , ...
android
[4]
3,628,843
3,628,844
C++ const member functions
<p>I have a syntax error that is puzzling</p> <p>Previous code:</p> <pre><code>class A { public: void process(const string&amp; str) {}; }; </code></pre> <p>I have </p> <pre><code>A a; a.process("abcd"); </code></pre> <p>all is well now I change the process member function to a const</p> <pre><code>void proc...
c++
[6]
3,576,590
3,576,591
Better cout a.k.a coutn;
<p>Guys would it be difficult to write coutn which would basically place newline symbol at the end of the input. While working with console (that's all I can do at the moment) I'm finding very tedious to write '\n' every time I want the line to be a new line.<br> Or maybe it is already implemented?</p>
c++
[6]
4,285,354
4,285,355
what is php exit doing in function?
<p>Hi I have this function</p> <pre><code>function fail($pub, $pvt = '') { global $debug; $msg = $pub; if ($debug &amp;&amp; $pvt !== '') $msg .= ": $pvt"; $_SESSION['msg'] = $msg; header ("Location: /voting/"); exit; } </code></pre> <p>The page should redirect before it gets to the ...
php
[2]
4,258,165
4,258,166
How to make my class enabled to cast for Integer
<p>I have a doubt on how to cast my class to <code>Integer</code>. Example:</p> <pre><code>public class IntegerField extends Field { private Integer value; public IntegerField(Integer value) { super(); this.value = value; } public int intValue() { return value; } } </code></...
java
[1]
5,974,391
5,974,392
How do I create a user profile in ContactsContract?
<p>I am trying to create a user profile in ContactsContract...because there is not one, and I need one for testing. I don't have a real-life Android device, and only have the AVD Emulator for testing.</p> <p>Here is the code block that I am working from:</p> <pre><code>ArrayList&lt;ContentProviderOperation&gt; ops =...
android
[4]
2,298,129
2,298,130
scriptdata not working in uploadify
<p>Hi Friends i am using uploadify for my project.. in that i need to pass some data to upload.php to insert it in database. i am using the below code for sending data and getting it using $_POST in that upload.php file but its not getting those values.</p> <pre><code> $("#fileupload").fileUpload({ 'uploade...
php
[2]
5,877,922
5,877,923
session not working
<p>I am using SQL express 2008 and visual studio 2010.</p> <p>I made a simple login form using session. I want that if the session is null the user shouldn't be able to go to the desired page. I have written the following code:</p> <pre><code>public void btnsubmit_CLICK(object sender, EventArgs e) { if (TextBox1....
c#
[0]
3,063,014
3,063,015
python program error
<p>ankit@ubuntu:~/Desktop$ python binary_light.py Could you please tell me where I am doing mistake?? Since I am using your files and have not changed anything in it.</p> <pre><code>Error: Traceback (most recent call last): File "binary_light.py", line 8, in &lt;module&gt; from brisa.upnp.device import Device,...
python
[7]
1,718,217
1,718,218
what's the code meaning?
<pre><code>$file = fopen("test.txt","r"); while($line = fgets($file)) { $line = trim($line); list($model,$price) = preg_split('/\s+/',$line); if(empty($price)) { $price = 0; } $sql = "UPDATE products SET products_price=$price WHERE products_model='$model'"; // run the sql query. ...
php
[2]
2,631,373
2,631,374
RuntimeException in AsyncTask
<p>I am using <code>AsyncTask</code> for a long running task but I am getting the following error.</p> <pre><code>error in doInBackground====java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() </code></pre> <p>Why am I getting that error and what does it mean?</p>
android
[4]
4,713,059
4,713,060
Virtual keyboard issue in android
<p>In my android application i would like to use a Linearlayout at the bottom of the parent and just above that a scrollview with a edittext in it. when a touch on the edittext a virtual keyboard pops up with both edittext and linearlayout aligned at the bottom. I would like to view only the edittext and not the footer...
android
[4]
5,548,824
5,548,825
How to download pdf files in python?
<p>I need to download something like</p> <pre><code>str = 'http://query.nytimes.com/mem/archive-free/pdf?res=9A00EEDE1431E13BBC4850DFBF66838A649FDE' url = urllib2.urlopen(str) file = open('test.pdf', 'w') file.write(url.read()) file.close() </code></pre> <p>It just creates a wrong pdf.</p> <p>how do I write that int...
python
[7]
4,426,031
4,426,032
How to select a certain text from text file and enter into text box
<p>Hi all I have a sql script in text file which is as follows</p> <pre><code>create view [dbo].[budget_change-22] as select projectname, projectnumber,location, client FROM OPENROWSET('SQLNCLI', 'SERVER=AABB1089\abcWORKSS_STO;UID=abcworkss;PWD=abcdef, 'SET NOCOUNT ON;SET FMTONLY OFF;EXEC a...
c#
[0]
699,799
699,800
Strings in Java
<p>I have a code:</p> <pre><code>for(int i=0;i&lt;fList.size();i++){ String targets=""; String values=""; String sql="INSERT INTO "+tableName+"("+targets+") VALUES("+values+")"; Map&lt;Column, String&gt; attrs=fList.get(i).getAttributes(); for(int j=0;j&lt;columns.size();j++){ if(columns.ge...
java
[1]
1,586,455
1,586,456
Asp.Net one page with minimal markup to different code behind classes
<p>I have an aspx page which has minimal markup created at design time. The majority of the page is generated dynamically based on a querystring parameter. In then end, I will have hundreds of these "dynamic" pages. What I want to do is have one aspx page which branches out to different code behind classes based on the...
asp.net
[9]
4,238,546
4,238,547
datetime checking for specific time
<p>I have a windows service and I would like to insert a timer. How can I check if the present time is <code>9:00 AM</code> ? I would like my service to check this every day. Thank you a lot</p> <p>My try:</p> <pre><code>Datetime dt=Datetime.parse("09:00:00 everyday"); if(datetime.now -dt ==0) { //fire event } </...
c#
[0]
2,090,637
2,090,638
Use if else conditions with shortcuts
<p>Below is my codes: </p> <p>Code 1:</p> <pre><code>int x = 10; if (x &lt; 10) { if (x &lt; 5) { MessageBox.Show("less than 5"); } else { MessageBox.Show("value is between 5 and 10"); } } else { MessageBox.Show("grater than 10"); } </code></pre> <p>Code 2:</p> <pre><cod...
c#
[0]
4,961,746
4,961,747
JQuery giving different access to tags when using this
<p>I'm new to JQuery and have a script that creates a dialog via Ajax using the HREF and TITLE tags of an link. The problem is, I can easily pull the HREF tag out of "this", but the same doesn't apply at all to the TITLE tag. In the following example, why does an alert correctly appear with the HREF, but not with the...
jquery
[5]
709,626
709,627
a in-class class access the outer class's data member
<p>I was trying to do this,</p> <pre><code>class Outer { public: struct inner_t { void foo() { printf("%d", _x); } }; int _x; }; int main() { Outer o; o._x = 10; } </code></pre> <p>The above can't compile with errors:</p> <blockquote> <p>error: invalid use o...
c++
[6]
1,788,435
1,788,436
Java Type mismatch - cannot convert from int[][] error in constructor
<p>my constructor is</p> <pre><code>public class Figure{ int[][] x; Color y; public Figure(int[][] x , Color y){ this.x=x; this.y=y; } </code></pre> <p>and i am initializing object in the following way:</p> <pre><code>Figure s = new Figure({{0,1,1},{1,1,0}},Color.ORANGE); </code></pre...
java
[1]
2,790,974
2,790,975
Failed to load Main-Class manifest attribute from external library
<p>I am using the postgresql driver to connect to a sql server with java.<br> It is contained in a jar file that i downloaded form there website. </p> <pre><code>java -classpath /home/asdf/myProgram;/home/asdf/myProgram/lib/postgresql-9.2-002.jdbc4.jar myMainClass </code></pre> <p>results in an error: Failed to ...
java
[1]
1,285,446
1,285,447
PHP server problem
<p>I've build a web site that get source code of the link entered by the user using(HTML DOM), then checks the source depending on standards. the problem is some web sites can't evaluate. this is <a href="http://awaef.org/index.php" rel="nofollow">My Web Site link</a> you can check from here.</p> <p>when you enter g...
php
[2]
53,851
53,852
PHP variable replacement
<p>Is there any function which replaces params in a string? Something like this:</p> <p>Code:</p> <pre><code>$format_str = "My name is %name."; /* this was set in a configuration file - config.php */ $str = xprintf($format_str, array('name' =&gt; 'Joe', 'age' =&gt; 150)); ...
php
[2]
540,989
540,990
Control 'dgDisplay' accessed from a thread other than the thread it was created on with Parallel.for
<p>I get an error trying to use Parallel.For</p> <pre><code>for (int i = 0; i &lt;= count; i++) { DataGridViewTextBoxColumn columnDataGridTextBox = new DataGridViewTextBoxColumn(); columnDataGridTextBox.Name = fileDataField[i]; columnDataGridTextBox.HeaderText = fileDataField[i]; columnDataGridTextBox.Width = ...
c#
[0]
4,359,121
4,359,122
Video Embede code in Div panel? In Asp.net?
<p>In Web application, i am using datalist control to bind the Embed videos to a <code>&lt;div&gt;</code> dynamically. They are coming good, but when we click on video in the <code>datalist</code> they are <strong>start to play</strong>. I dont want that, I would like to play the particular video in a popup, and make a...
asp.net
[9]
4,706,440
4,706,441
How to know name of class in decorator for function-method?
<p>I have a simple timemark-decorator for function:</p> <pre><code>def dec_timemark(f): def tmp(*args, **kwargs): sys.stdout.write(strftime("%d.%m.%Y %H:%M:%S") + ' ' + f.__name__ + ' begin' + "\n" ) res = f(*args, **kwargs) sys.stdou...
python
[7]
5,877,506
5,877,507
Find and edit text files via PHP
<p>Let say a text file contain</p> <blockquote> <p>Hello everyone, My name is Alice, i stay in Canada.</p> </blockquote> <p>How do i use php to find "Alice" and replace it with "John".</p> <pre><code> $filename = "C:\intro.txt"; $fp = fopen($filename, 'w'); //fwrite($fp, $string); fclose($fp); </code></pre>
php
[2]
5,246,456
5,246,457
Problem with including a file
<p>i am getting this error</p> <pre><code>[28-Jan-2011 09:49:03] PHP Warning: require_once(../../includes/database.php) [&lt;a href='function.require-once'&gt;function.require-once&lt;/a&gt;]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/photo/application/php/classes/users.php on line...
php
[2]
4,333,296
4,333,297
issue with tabindex in c# .net
<p>If you will look at this image:</p> <p><img src="http://i.stack.imgur.com/eFSat.jpg" alt=".net c# dialog"></p> <p>The blue numbers represent the tab index property that I have for the controls. My problem is that when I put the focus on the first textbox control and start hitting TAB it goes from index 0 to 1 to 5...
c#
[0]
2,650,523
2,650,524
Positioning graphics or jpanel in the center of the window on resize
<p>In my program I use cardLayout to switch between panels ( each panel is used as a separate class ). One of the panels, lets call it the board, contains graphics. </p> <p>As I understand the size of the panel is fit to the window size or jframe, so when I resize window jpanel size and graphics in it also change in s...
java
[1]
4,366,954
4,366,955
How do I ignore UILocalNotification on devices with OS's older than iOS4?
<p>I am using local notifications in a app I'm making.</p> <p>I use this: </p> <pre><code>Class myClass = NSClassFromString(@"UILocalNotification"); if (myClass) { //Local Notification code } </code></pre> <p>To avoid using UILocalNotifications when not supported.</p> <p>But my app crashes on launch with this error...
iphone
[8]
501,184
501,185
PHP count not working properly
<p>This only returns User doesn't exist. Im guessing it is the count that is failing but it worked last night, but not sure why it isn't currently working, i have been playing with my code and making it look better but everything else is still functioning and sadly i do not have any back ups. this is basically for repu...
php
[2]
2,811,945
2,811,946
C# error - "Not all code paths return a value"
<p>This is fairly simple method. I use <code>entity framework</code> to get some data and then check some values in a <code>if statement</code>. However right now the method is marked with red.</p> <p>This is my method:</p> <pre><code>private bool IsSoleInProduction(long? shoeLastID) { if (shoeLastID == null) ...
c#
[0]
862,856
862,857
How do I format the output of this Python program?
<p>I am trying to figure out how to get these sets of values to line up from left to right (see below). How could I do this?</p> <pre><code>def main(): for temp in range(-20, 70, 10): for windspeed in range(5, 55, 5): print int(35.74 + (0.6215*(temp)) - (35.75* windspeed**0.16) + (0.4275*(temp...
python
[7]
2,942,077
2,942,078
Parse error in var_dump
<p>I am getting parse error in following code:</p> <pre><code>&lt;?php // This: $a = array( 'color' =&gt; 'red', 'taste' =&gt; 'sweet', 'shape' =&gt; 'round', 'name' =&gt; 'apple', 4 // key will be 0 ); $b = array('a', 'b', 'c'); // . . .is completely...
php
[2]
5,680,747
5,680,748
Help writing the output to another file:
<p>Hi here is the program I have:</p> <pre><code>with open('C://avy.txt', "rtU") as f: columns = f.readline().strip().split(" ") numRows = 0 sums = [0] * len(columns) for line in f: # Skip empty lines if not line.strip(): continue values = line.split(" ") f...
python
[7]
1,936,506
1,936,507
label region in bi-level image with python
<p>I want to tag clusters of neighboring pixels from a 2D binary matrix in python. Basically, I am trying to find something similar to the idl function label_region <a href="http://star.pst.qub.ac.uk/idl/LABEL_REGION.html" rel="nofollow">http://star.pst.qub.ac.uk/idl/LABEL_REGION.html</a> Do you have any advice? Thanks...
python
[7]
2,304,631
2,304,632
create javascript timestamp from innerhtml string values
<p>I'd like to create a javascript timestamp based on a rails date_select and time_select property. I attached an onChange function to the select helper and fetching the innerhtml to read the values into a div which works fine. Now I want to use those strings from the select property and create a timestamp in js (using...
javascript
[3]
5,371,110
5,371,111
installing Java 5 SDK on Windows Server 2008 R2 64 bit
<p>I have an Hp/Compaq laptop, intel, 2 processors, using 64 bit. I want to install Java 5 SDK, I see references to AMD 64 bit, I am assuming that is different from intel? Is there a Java 5 sdk for my environment?</p>
java
[1]
4,493,403
4,493,404
simple python list problem
<p>According to the docs:</p> <pre><code>list.append(x): Add an item to the end of the list </code></pre> <p>So, if I do:</p> <pre><code>list = [] list.append("banana") print list[0] --&gt; which is suppose to print the FIRST item of the list &gt; banana </code></pre> <p>So far so good, however if now I append anot...
python
[7]
1,144,630
1,144,631
Should i use public/private key encryption in this case?
<p>I have an iPhone app and a backend php web app.</p> <p>The php site stores some information and i have to use the iPhone app to retrieve that data and show it in it.</p> <p>So, suppose the iphone app has to show a list of houses for a given user, it would call the folllowing php script</p> <p><a href="http://exam...
iphone
[8]
401,075
401,076
Python - use lists instead of strings?
<p><a href="http://stackoverflow.com/questions/1228299/change-one-character-in-a-string-in-python">From an S.O answer</a>:</p> <p>"Don't modify strings.</p> <p>Work with them as lists; turn them into strings only when needed.</p> <p>... code sample ...</p> <p>Python strings are immutable (i.e. they can't be modifie...
python
[7]
5,900,754
5,900,755
Unable to store value in stack
<p>In this code, the <code>subKeys</code> has some values which is extract from cookie, the message prompt <code>cval: 3</code> but I could not push store each <code>subKeys</code> values into <code>stack</code> array which is the <code>stack</code> is always empty.</p> <pre><code>var stack = new Array(); var temp = d...
javascript
[3]
2,064,269
2,064,270
How to use ColorDrawable with ImageView?
<p>I have a layout with an ImageView defined like:</p> <pre><code>&lt;ImageView android:layout_width="45dip" android:layout_height="45dip" android:scaleType="fitXY" /&gt; </code></pre> <p>now I just want to set the imageview to be a static color, like red or green. I'm trying:</p> <pre><code>ColorDrawable cd =...
android
[4]
2,219,453
2,219,454
Ban domain extentions buddypress
<p>can someone please help me out, I am using Buddypress/wordpress and i want to ban some domain extensions e.g .pl, .ru, .asia. i have tried the following functions which works for email domain but not extensions.</p> <pre><code>function my_bp_ban_domains( $result ) { $banned = array('.ru', '.pl'); $error = '...
php
[2]
3,302,605
3,302,606
weird slowness in asp.net web app - VS 2008
<p>I compiled my app in release mode. I then went ahead and 'published' the site.</p> <p>Copies all files and moved them to a staging server with a static ip. Restarted IIS.</p> <p>Went to another machine and hit my web site. It took about 4 seconds for just the default page, which is pure HTML with no custom framewo...
asp.net
[9]
1,394,710
1,394,711
Using htmlentities with BBCode
<p>What I am trying to achieve is a sound method for using BBCode but where all other data is parsed through htmlentities(). I think that this should be possible, I was thinking along the lines of exploding around [] symbols, but I thought there may be a better way.</p> <p>Any ideas?</p>
php
[2]
2,398,375
2,398,376
Python iterable map, range, etc
<p>Why doesn't python have a <code>__future__</code> library that replaces <code>map</code> with <code>imap</code>, <code>range</code> with <code>xrange</code>, etc.? Is it possible to write one?</p>
python
[7]
5,902,795
5,902,796
python 'is not' operator
<p>i notice there is a comparison operator 'is not', shall i literally translate it into </p> <pre><code>!= </code></pre> <p>instead of </p> <pre><code>== not </code></pre> <p>thanks</p>
python
[7]
3,221,435
3,221,436
jQuery Tabs - Populate Tab Panel with URL content
<p>I need help regarding jQuery Tabs.</p> <p>I have following code that prints tabs</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;jQuery UI URL Tabs&lt;/title&gt; &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" /&gt; &lt;script src="http:...
jquery
[5]
2,654,003
2,654,004
TextView setTextColor is ignored when LinearLayout android:background is set
<p>The code is at the very bottom. I can change the color of the text [android:id="@+id/vonage_login_status"] by running </p> <pre><code>vonage_login_status.setTextColor(this.getResources().getColor(R.color.light_grey)); </code></pre> <p>However, I want a different colored background, so I added the line <code>androi...
android
[4]
4,186,925
4,186,926
php - not loading variable into the database
<p>I have a database table - serial (autoincrement primary key), version, and turk_number. I am using the following code to insert a new row. I am receiving these variables via $_GET and I did a printout so I know that the variables are available, so I'm not sure whats wrong. The serial and version are loaded in, but n...
php
[2]
985,932
985,933
Why am I endlessly appending a String in Java
<p>I was writing a game, and when I try to send a chat message to the server, I get an odd memory leak. Sending string: !chat¥Test Turns into:</p> <pre><code>!chat¥test !chat¥!chat¥test !chat¥!chat¥!chat¥test !chat¥!chat¥!chat¥!chat¥test !chat¥!chat¥!chat¥!chat¥!chat¥test !chat¥!chat¥!chat¥!chat¥!chat¥!chat¥test !chat...
java
[1]
2,304,733
2,304,734
Example or tutorial to deal with didRecieveWarning in iPhone
<p>I want to know if there is any tutorial provided by apple people or any blog where I can learn how to deal with memory and view releasing when you get didRecieveWarning in iPhone.</p>
iphone
[8]
301,906
301,907
Comparison of Pojo class properties
<p>I have a class containing two properties:</p> <pre><code>public class player{ public player(String playerName,int points){ this.playerName=playerName; this.points=points; } public String getPlayerName() { return playerName; } public void setPlayerName(String playerName) { this...
java
[1]
4,155,409
4,155,410
Unable to solve error on map: map<int,Element>::iterator i2=0;
<p>I am trying to run a tool written in C++. Upon compiling, it throws the following error:</p> <blockquote> <p>tt_hgraph.cpp: In member function ‘void tt_hgraph::Print_tt_hgraph(char*)’: tt_hgraph.cpp:774: error: conversion from ‘int’ to non-scalar type ‘std::_Rb_tree_iterator >’ requested</p> </blockquote> <p>I...
c++
[6]
4,009,647
4,009,648
How to use particle effects in view based application?
<p>How to use <strong>particle effects</strong> in view based application? </p> <p>I have created a game using view based application and I want to use a particle effects in my game. But, I don't have any idea about using a particle in view based application. </p> <p>Please give some/any idea.</p>
iphone
[8]
3,120,933
3,120,934
I have a redirect error
<p>I'm working on a simple login form and i have this redirect URL:</p> <pre class="lang-html prettyprint-override"><code>&lt;form method="post" action="/incs/login.php?redirect=&lt;?php echo $_SERVER['PHP_SELF'];?&gt;"&gt; </code></pre> <p>but when I'm filling the form and hit the submit button I'm redirected to a w...
php
[2]
1,083,337
1,083,338
Send value to servlet with javascript
<p>In my JavaScript function I do like this in order to redirect parameters to servlet:</p> <pre><code>var ids1=document.getElementById("projet").value; document.location.href("http://localhost:8080/Opc_Web_App/ServletAffectation?ids1="+ids1); </code></pre> <p>and in the servlet I do the following to get Value:</p> ...
javascript
[3]
807,136
807,137
How to use selectedIndexedChanged event in dropdown?
<p>In list of dropdown i have added some text and i want that if i select any particular text then it fired selectedIndexedChanged event but its not firing.please tell me how it will fire using C# ?</p>
asp.net
[9]
5,181,199
5,181,200
determining if a field exists on a form
<p>I have a form field (a series of checkboxes) that's being created dynamically from a database, so it's possible that the field will not exist on the form (if there are no matching values in the database). I have some code that needs to execute based on whether the field exists, and pull in the values that are select...
javascript
[3]
1,964,319
1,964,320
reason for program termination before method
<p>Trying to learn why my program terminates prematurely. Runs the gallons to liters conversion method ok but stops there. Does not run the "root" method (purpose of which is to compute square roots for number 1 to 100). I believe this is more an issue of formatting than semantics. Thank you for help.</p> <pre><code>p...
java
[1]
1,305,119
1,305,120
Android Popping off the Activity Stack
<p>In our app, we have Activities A,B,C,D, and E. The user usually goes from A to E.</p> <p>In Activity E we want to go back to A, and get ride of B,C,D from the stack. We don't want to recreate A from E.</p> <p>How do I 'pop off' B,C,D from the stack and then return to A ?</p>
android
[4]
3,124,215
3,124,216
java.lang.RuntimeException: Unable to start activity ComponentInfo: java.lang.NullPointerException
<p>My app gives me this error when using this onclicklistener</p> <pre><code>private OnClickListener btn_Config_Onclick = new OnClickListener() { public void onClick(View v) { Bundle bundle = new Bundle(); bundle.putString("Name", selected_Name); bundle.putString("Image", selected_Image); ...
android
[4]
5,551,166
5,551,167
Determining the size of an Android view at runtime
<p>I am trying to apply an animation to a view in my Android app after my activity is created. To do this, I need to determine the current size of the view, and then set up an animation to scale from the current size to the new size. This part must be done at runtime, since the view scales to different sizes dependin...
android
[4]
2,511,094
2,511,095
Problem in connecting IBOutlet
<p>In my application, I am trying to remove all existing subviews and add a new one created in Interface Builder. However, I don't seem to be able to connect the view.</p> <p>When a button clicks, the following function is executed (inside a subclass of UIViewController): </p> <pre><code>// Display a list of settings...
iphone
[8]
3,805,303
3,805,304
Html List tag not working in android textview. what can i do?
<p>Html List tag not working in android textview. this is my string content:</p> <pre><code>String str="A dressy take on classic gingham in a soft, textured weave of stripes that resembles twill. Take a closer look at this one.&lt;ul&gt;&lt;li&gt;Trim, tailored fit for a bespoke feel&lt;/li&gt;&lt;li&gt;Medium spread...
android
[4]
4,312,438
4,312,439
jquery Selectors
<p>I'm writing a simple code using jQuery, in which I need to call a function for a series of selectors and eliminate some functions being called for a particular selector, for example </p> <pre><code>$('#id1, #id2, #id3').click(function() { function1(); function2(); function3(); // rest of my code }); </code></p...
jquery
[5]
81,254
81,255
Independant button
<p>I have a Javascript code that creates buttons OnLoad with the attributes being the values from an ASP page that fetches from the database. But whatever event I want each button to do, all the other buttons do it and it executes before the buttons are displayed. Please help...</p> <pre><code>function createButtons(t...
javascript
[3]
682,099
682,100
sin inverse in Iphone SDK?
<p>I wanted to calculate sin inverse ..so i did this:</p> <pre><code> float radians = asinf(1.1205); NSLog(@"%f",radians); </code></pre> <p>Output is something like "nano"....any help?</p>
iphone
[8]
1,568,811
1,568,812
cannot find ActivityCreator.bat
<p>I have recently started learning Android development. In the android-sdk/tools folder, there should be a command-line tool named ActivityCreator.bat, right? But I cant find it. Can anyone tell me why is it so? The version of android platform is 2.1</p>
android
[4]
5,663,955
5,663,956
python - how can I display a image from web?
<p>I'm using Python to make a "web album viewer", but I meet some problem.</p> <p>I use Tkinter to write GUI, urllib2 to fetch the image from web, PIL to handle the image</p> <p>So the code is like this:</p> <pre><code>root = Tk() frame = Frame(root) frame.pack() response = urllib2.urlopen(a_pic_url) photo = ImageTk...
python
[7]
4,920,623
4,920,624
Session variables not being display on particular page
<p>I'm not a PHP developer here.</p> <p>I have a page that is unable to display session values even though they definitely exist. I am able to view them on another page, yet for some reason they cannot be seen on a certain page!?</p> <p>EDIT: Below is the script that exists on the top of the page</p> <pre><code>&lt;...
php
[2]
2,721,264
2,721,265
Memory address of variables in Java
<p>Please look at the picture below. When we create an object in java with new keyword, we are getting a memory address from the OS.</p> <p>I wonder that, when we write <code>out.println(objName)</code> we can see some strings as output.</p> <ol> <li>what is this output?</li> <li>If it is memory address which given b...
java
[1]
1,609,382
1,609,383
jQuery run a function every 5 seconds in a jsp page
<p>I have a following script in my jsp page that I need to refresh (call) every 5 seconds to refresh the data to be displayed:</p> <pre><code>$(document).ready(function () { var sampleData = &lt;%=sms.getTimeline()%&gt;; ... }); </code></pre> <p>Can someone please let me know how to ...
jquery
[5]
5,065,322
5,065,323
Writing specific lines of a text file
<p>I write this code:</p> <pre><code>f = open('example.txt','r') lines = f.readlines() for i, line in enumerate(f): if i &lt; 3: lines = ['LC '+line for line in lines] with open('./example.txt', 'w') as f: f.writelines(lines) f.close() elif i &lt; 5: lines = ['LB '+line for line in lines] wi...
python
[7]
3,673,822
3,673,823
Updating UI from broadcastreceiver
<p>I'm using the bump android sdk. I have a broadcast receiver and i would like to update some elements from my ui depending on different intent filters. for example </p> <pre><code>else if (action.equals(BumpAPIIntents.NOT_MATCHED)) { Log.i("Bump Test", "Not matched."); BumpTest inst =...
android
[4]
4,492,249
4,492,250
Access main site dll's class and create object from sub site in c#
<p>I have one dll in my main project location's bin folder at the server, and i have one sub site under the main site, </p> <p>i want to refer/access the main site's dll class and create object from my sub site. I will keep my dll's in the main site's bin location only, i dont want to copy the referred dll in the sub...
c#
[0]
2,071,623
2,071,624
How run programm once in python in linux?
<p>I want to write statement, in which I will check runs that script from other place (on that machine) or not?</p>
python
[7]
814,777
814,778
Jquery - Focus on an input field in a form on pageload?
<p>I am trying to focus on the username input in my login screen to allow for easier access to logging in and currently my jquery looks like this</p> <pre><code>$(document).ready(function() { $('#Username').focus(); }); </code></pre> <p>but that doesn't work... any ideas?</p>
jquery
[5]
2,789,298
2,789,299
The version of xcode that supports Iphone OS 3.1.2(7D11)?
<p>HELLO, I am working on XCODE 3.1.4 , my iphone have 3.1.2 os...But as this version of xcode supports iphone os3.1.1 and below.. so plz help me as either tell me the newer version of xcode that supports iphone os 3.1.2 or should i downgrade my iphone os to 3.1.1,,</p> <p>any assistance is really appreciated..</p>...
iphone
[8]
2,433,183
2,433,184
Need help on setting value fetched from db to list
<p>Friends, I need to fetch data from SQlite Db and set it on List View,it fetches data has well but the view showing on screen being empty,anybody help me to get the content to visible.</p>
android
[4]
1,312,573
1,312,574
How to convert ISOString to local ISOString in javascript?
<p>How to convert ISOString to local ISOString in javascript?</p> <p>I have <a href="http://en.wikipedia.org/wiki/ISO_8601" rel="nofollow">ISO 8086</a> style string(e.g. '2013-02-18T16:39:17+00:00')</p> <p>And I want to convert that to local ISO_8601 style string...</p> <pre><code>'2013-02-18T16:39:17+00:00' -&gt; '...
javascript
[3]