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,465,456
3,465,457
Adding Years from Date class
<p>Let say i have this:</p> <pre><code> PrintStream out = System.out; Scanner in = new Scanner(System.in); out.print("Enter a number ... "); int n = in.nextInt(); </code></pre> <p>i have a random date, for example, 05/06/2015 (its not a fixed date, its random everytime). If I want to take the 'year' of the this da...
java
[1]
1,759,078
1,759,079
android VerifyError
<p>i'm getting this message when i run my application i don't know why i'm getting it could any one help me. here is the logcat. </p> <pre><code> java.lang.VerifyError: com.kosh.me.Smaller at java.lang.Class.newInstanceImpl(Native Method) at java.lang.Class.newInstance(Class.java:1429) at android.app.Instrumentatio...
android
[4]
4,128,574
4,128,575
is there any way to simplify this double conditional clauses structure?
<p>for example</p> <pre><code>if (x=="A) switch (y) { case "1": Do1();break; case "2": Do2();break; case "3": Do3();break; } else if (x=="B") switch (y) { case "1": Do4();break; case "2": Do5();break; case "3": Do6();break; } else switch (y) { case "1": Do7()...
c#
[0]
1,456,723
1,456,724
How to check if a file has changed?
<p>I have an xml file with database information that should be loaded when the script is installed or when the content of the file changes. Can I use md5_file() on the xml file and then store the value in the db and compare it to the file's hash each time the script is run? Does it have any drawbacks and are there any ...
php
[2]
970,881
970,882
Getting specific value from an array with PHP
<p>If I have an array in the following format: </p> <pre><code>Array ( [0] =&gt; stdClass Object ( [id] =&gt; 1 [c] =&gt; 1 [q] =&gt; value 1. ) [1] =&gt; stdClass Object ( [id] =&gt; 2 [c] =&gt; 1 [q] =&gt; value 2... </code></pre> <p>and I need to get </p> <blockquote> <p>value 1</p> </blockquote> <p>Shouldn't ...
php
[2]
584,239
584,240
Explicit Intent error
<p>I want to new activity when i click an image. I already write <code>activity android:name=.openPdf</code> in manifestfile.</p> <p>but it shows me an error:-</p> <pre><code>"android.content.ActivityNotFoundException: Unable to find explicit activity class {Parsing.this/openPdf.class}; have you declared this activit...
android
[4]
74,784
74,785
How to dissmiss keybord when editing UITextField
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/274319/how-do-you-dismiss-the-keyboard-when-editing-a-uitextfield">How do you dismiss the keyboard when editing a UITextField</a> </p> </blockquote> <p>I know that I need to tell my UITextField to resign first r...
iphone
[8]
2,436,588
2,436,589
jQuery Xbox Tile Style Animation
<p>I'm wondering if anyone knows of an animation for jQuery similar to that present on the Xbox, specifically with Kinect. The animation takes tiles on the UI and applies a teeter-totter type of effect based on where the mouse (hand input) appears on the tile. So if the mouse appears on the top-right corner the tile ...
jquery
[5]
4,806,614
4,806,615
PHP transfer data between 2 remote servers, what is fastest way?
<p>I have Server A and Server B which exchanges some data. Server A on user request pull data from Server B using simple file_get_content with some params, so server B can do all task(database etc) and return results to A which formats and show to user. Everything is in PHP.</p> <p>Now I am interested what is fastest ...
php
[2]
3,669,484
3,669,485
truncate links with jQuery
<p>My first post here, but I learned a lot already by lurking =) This time, I can't find a solution for problem, although it looks like something that's easy to achieve.</p> <p>I have a list of links to blogpost, generated with Feed2JS. Unfortunately, the RSS feed that is the source for this adds anchors to the links ...
jquery
[5]
1,274,594
1,274,595
How to hide other application Shortcut icons on android desktop from my android application
<p>I am in the finally stage of developing my android application and what i am left with is to hide all other application icon on the phone´s desktop with my application. Now I found this code here and I have tried to modify it and even add the proper permission but seem not to be getting the desired result. Kindly he...
android
[4]
5,183,168
5,183,169
How can I display random activity when click button
<p>I used following code in main activity</p> <pre><code>public void button(View v){ //Create an intent to start the new activity. // Our intention is to start secondActivity Intent intent = new Intent(); intent.setClass(this,Activity.class); startActivity(intent); ...
android
[4]
1,210,624
1,210,625
flush out buffer into file
<pre><code>int main() { string line; char buff[10]; for(int i=0; i&lt;10;i++) { cin.get(buff[i]); cout.put(buff[i]); if(i==10) { ofstream file; file.open("TEXT",ios::out); for (i=0 ; i&lt;10 ;i++) file &lt;&lt; buff[i] &lt;&lt; endl; file.close(); } ...
c++
[6]
3,028,953
3,028,954
Java Arraylist printing every other number in a list
<p>This is my code for printing the random numbers in an arraylist:</p> <pre><code>public void printList() { System.out.println("The numbers on the list: ") ; for (int i = 0 ; i &lt; aList.size() ; i++) { System.out.print( aList.get(i) + " ") ; } System.out.println("\n") ; ...
java
[1]
5,308,549
5,308,550
configuration of asp.net mailmessage
<p>Can someone help me pls. I am ready to deploy my web application. I have a contact form that i want users to send me a message. Ive created the smtp when i click on submit, i get the error message cannot be sent. The application is still on my local machine maybe thats why. But i just want to know if this code is g...
asp.net
[9]
389,583
389,584
jQuery nested call returning server error 500
<p>I am not sure why this is happening, but the second jQuery call is giving a 500 error. Is that because nested calls are not allowed? Or something else? Thanks! Below is the whole code:</p> <pre><code>&lt;script type="text/javascript" &gt; $(function() { $('#add_comment').bind('submit',function() //$("inpu...
jquery
[5]
283,017
283,018
Removing different instances in a list
<p>Hi guys!</p> <p>I have a small problem, i can't verbally explain the problem, so i'll just try to illustrate it in code:</p> <pre><code>class move(object): def __init__(self, number): self.number = number list1 = [move(1), move(2), move(3), move(4)] list2 = [move(3), move(7)] list1.remove(list2[0]) ...
python
[7]
5,667,300
5,667,301
why can we declare static object of a class inside the same class?
<pre><code>class A { static const A a; } </code></pre> <p>Why we can do this , while we cannot do this without the word static?</p>
c++
[6]
493,730
493,731
Android server data fetch
<p>I want to fetch some data from a server protected with an username and password . I know both the username and password . Since the server is live , the data is continuing changing I need to fetch data every minute to update the application's status . The only function I know that can fetch data and turn it to a str...
android
[4]
5,576,697
5,576,698
Non-standard library placement new with user-defined allocators
<p>A non-standard library placement new calls a user defined operator new:</p> <pre><code>class T {}; void* operator new(std::size_t s, T*) { return new char[s]; } int main() { T* t; new(t) T(); // calls operator new above return 0; } </code></pre> <p>However, if I am not wrong, the standard placeme...
c++
[6]
3,753,038
3,753,039
Java Finding Elements in Array
<p>I have five arrays where I store incoming int numbers like:</p> <pre><code>int array1 = {1,6,..} int array2 = {2,7,..} . . int array5 = {5,10,..} </code></pre> <p>Now, what I have to do, search for next numbers in another arrays.</p> <p>Like, </p> <pre><code>for(i = 0, i &lt; array1.size ; i++){ int element = a...
java
[1]
734,489
734,490
Passing references type variable as method parameter
<p>After running the code below I get this output: Eve 1200</p> <p>Could anyone explain me why the value of Person type variable is being changed and value of Integer type variable is not? I have already read this:</p> <ol> <li>www.javaworld.com/javaworld/javaqa/2000-05/03-qa-0526-pass.html</li> <li>www.yoda.arachsy...
java
[1]
3,120,406
3,120,407
how to change landscape mode
<p>hi i am new to iphone.what i am doing is displaying the images grid view. what i need is i have to change my simulator to landscape mode from portrait mode. while rotating the simulator the images are not rotated. how can i rotate images along with simulator.pls post some code for all mode </p>
iphone
[8]
574,005
574,006
jQuery: Count specific character in a table column
<p>I have a HTML table where each row has two columns. First column is a capital letter and the second one is a brand name, like so:</p> <p>A | Amazon</p> <p>A | Apple</p> <p>B | BMW</p> <p>C | Chanel</p> <p>etc. But whenever there are two brand names that has the same first capital letter I would like the table t...
jquery
[5]
1,495,272
1,495,273
how to slove Out of memory problem in android
<p>I need help for out of memory error in android application. In my application, only support for portrait mode and i am using background images and icons images for layout. Theses images are directly set in layouts for my application.even, I got out of memory issues at some time. how to solve this problem? please g...
android
[4]
4,942,670
4,942,671
Preg match problem
<p>I try to "validate" a date field. I only want to allow, numeric chars and - character.</p> <pre><code> $born_date=$_POST['date']; $goodchars = array("1","2","3","4","5","6","7","8","9","0","-"); $char_re_good = '/['.preg_quote(join('', $goodchars), '/').']/'; if (!(preg_match($char_re_good, $born_date))) {...
php
[2]
1,232,338
1,232,339
How to save timestamp and user in comments column
<p>I have a textarea, where the user can add their comments. Now after adding the comments and clicking submit, it needs to save the comments along with user name and timestamp.</p> <pre><code>&lt;tr&gt;&lt;font size="2" face="tahoma" color="black"&gt; &lt;b&gt;Comments &lt;/b&gt;&lt;/br&gt;&lt;/br&gt; &lt;/tr&gt; &l...
php
[2]
1,255,332
1,255,333
How can i use two different methods in jQuery?
<p>I am trying to have append and show methods if a check box is checked, problem is that both the methods do not work at the same time.It shows either the div or append the table.How can i have both the table and div if the check box is checked?</p> <p>here is the code:</p> <pre><code>&lt;input type="checkbox" name...
jquery
[5]
5,108,431
5,108,432
Copy part of table with jQuery
<p>I have a large table with data.</p> <p>The table has a header.</p> <p>I need to copy exactly the header of that table, from <code>&lt;thead&gt;</code> to <code>&lt;/thead&gt;</code>, into another section within the same document. How can I do that?</p> <pre><code>&lt;table id="myTbl"&gt; &lt;thead&gt; &lt;tr&gt; ...
jquery
[5]
3,887,587
3,887,588
Determine which app store my application was downloaded from?
<p>is it possible to determine the specific country app store my application was downloaded from? I would like to distinguish if a user downloaded my application from the us app store vs. the canada app store?</p> <p>Not interested in locale settings but the actual store the app came from.</p>
iphone
[8]
2,050,470
2,050,471
How to identify iphone , ipad ,ipod touch, iphpne simulator while programming in 3.2 version?
<p>Am unable to identify the device models (iphone , ipad ,ipod touch, iphpne simulator) while programming (in 3.2 version). Alreay am tried with UIDevice Class and some other means, but am unable to get model as ipad when connected to ipad. every time it is giving model other than ipad. So can any one please help me o...
iphone
[8]
4,802,134
4,802,135
ArrayList or LinkedList
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5846183/arraylist-vs-linkedlist">ArrayList Vs LinkedList</a><br> <a href="http://stackoverflow.com/questions/8069370/arraylist-vs-linkedlist-which-one-is-better-for-sorting">ArrayList vs. LinkedList which one is b...
java
[1]
4,713,500
4,713,501
Iphone stop an ASIFormDataRequest
<p>i have a problem in my viewController when i have a pending ASIFormDataRequest (started as an asynchronous task) that is still executing and the user presses the back button (in order to pop the view).</p> <p>Is there any way to stop that asynchronous task?</p> <p>I have read that is a method called "clearDelegate...
iphone
[8]
5,200,450
5,200,451
java.util.Scanner#findWithHorizon throws OutOfMemory exception on 32Mb input stream
<p>Search string '4914904' exists at the tail of the stream.</p> <p>Here's the code </p> <pre><code> Scanner sc = new Scanner(xmlInputStream, "UTF-8"); if(sc.findWithinHorizon('4914904', 0) != null) { // &lt;--- exception is thrown here } </code></pre> <p>Any suggestions would be highly appreciated...
java
[1]
5,017,707
5,017,708
Python newbie question - I can't figure out what my problem is exactly
<p>I'm completely new to Python and I've been trying to make a fibonacci program with it.</p> <pre><code>def fib(n): print 'n =', n if n &gt; 1: return n * fib(n - 1) else: print 'end of the line' return 1 n = raw_input('Input number: ') int(n) fib(n) </code></pre> <p>When I try to ru...
python
[7]
2,356,513
2,356,514
In programming what is OR,And and No-Proximity when searching for keywords in a doc?
<p>this question is related to this site but unfortunately there is no code, i just need an explanation.</p>
java
[1]
4,290,697
4,290,698
Is C++ (one of) the best language to learn at first nowdays?
<p>C++ is one of the <a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html" rel="nofollow">most used programming language in the world</a> since like 25+ years.</p> <p>My first job as programmer was in C++ and I coded in C++ everyday for nearly 4 years. Now I do mostly PHP, but I will forever cheri...
c++
[6]
2,707,151
2,707,152
how to implement login,search,download and install app from Google play programmatically?
<p>I want to develop one application in android which can search,download and install a particular app from Google play.When user provides app name using my application, it should search only free version of app in Google play and once found then download and install the app automatically on the device.</p> <p>SCENARI...
android
[4]
2,143,839
2,143,840
How can I reduce jQuery?
<p>I'm using just a few basic jQuery functions on my site.<br> How can I remove unused jQuery code?<br> Knowing only the basics, I looked at the code and was not sure where to start. If you could point me in the right direction, that would be appreciated.</p> <p>Thanks.</p>
jquery
[5]
5,312,315
5,312,316
How to get the displaying image on a ImageView
<p>I have this scenario. The app allows me to take a pic of something and save it to a sqlite db. By now this app captures the image from the camera device and displays it on an ImageView. The problem is how to obtain this image from the ImageView and parse it to a byte array</p>
android
[4]
4,189,239
4,189,240
C# get text out of HTML and compare them to a string
<p><strong>I don't know if this is possible, but i want to take a certain word out of a HTML webpage (online) for instance the word "Content" and i want to compare it to a string. And this must be all done in C#</strong></p> <p>First i want to take out a word out of a webpage then compare it to a string. </p> <p>I ho...
c#
[0]
1,089,201
1,089,202
android Intent received to onCreate multiple times
<p>hi I have added an app to the Gallery share menu. Selecting and sharing one image works fine and this code:</p> <pre><code>if (Intent.ACTION_SEND.equals(action)) { </code></pre> <p>in my onCreate is executed. </p> <p>The problem is when i press back(destroy) and open the app again The same Intent is received in ...
android
[4]
2,509,939
2,509,940
Crawl Images, Whole Web Pages and cache them
<p>I am starting a project and wonder the relationship between the characters in images and the whole web page where the images reside.</p> <p>I want to crawl some images and their web pages. I need to save the crawl result in local disk for further analysis. I wonder if there is any open source for this issue? </p>
python
[7]
5,382,175
5,382,176
jquery fadein for all images, should be simples?
<p>I thought this would be a simple things to do, but been searching about an hour...</p> <p>I'm trying to use jquery fadein for all images on a WP site.</p> <p>I've got as far as loading jquery</p> <p>but then all the things I find online are really complex, is there a simples .js I can load to apply fadein unila...
jquery
[5]
4,602,522
4,602,523
Capturing email and password info
<p>I have a screen which displays 3 editText for email address, password and password confirmation. Pressing on the first editText brings up the soft keyboard which necessarily covers the other editTexts. Complete the email address entry and press next and a multiline entry box appears. Complete the entry and press...
android
[4]
4,320,114
4,320,115
How do I change the position of a view in a Linear Layout.?
<p>So I have a Linear Layout already populated with children. Is there a way to change the position at which one of the children is located? </p> <p>I'm trying to swap to views between them if that's of any help.</p> <pre><code>final LinearLayout parrent = (LinearLayout)findViewById(R.id.llWidgetScreen); final Li...
android
[4]
5,116,548
5,116,549
plain text display with vert. scrolling?
<p>Is there an example that would allow a few hundred or thousand words, with paragraphs and CRs, to be displayed in a basic Hello World-style text display, complete with a vert. scroll bar (or vertical grab and move up or down)?</p> <p>Thanks.</p>
android
[4]
1,158,131
1,158,132
Removing 3 nested if-then-else
<p>I'm seeing this code as the equivalent of a mathematical permutation. It tries to set the value of <code>$d</code> based on a combination of <code>$a, $b, $c</code>. Right now it's being done with 3 nested if/then/else. Any other way the same thing can be done more efficiently?</p> <pre><code>if ($a === true) { ...
php
[2]
4,991,288
4,991,289
Reset Class Instance Variables via Method
<p>Does anyone know how to reset the instance variables via a class method. Something like this:</p> <pre><code>class someClass { var $var1 = ''; var $var2 = TRUE; function someMethod() { [...] // this method will alter the class variables } function reset() { /...
php
[2]
4,272,022
4,272,023
Keydown event codes
<p>In a KeyDown event of a textbox, can i check for a range of keyCode</p> <p>For eg: </p> <pre><code>if (e.keyCode == 90 to 97 || e.keyCode == 104 to 110) </code></pre> <p>How do it write this the correct way?</p>
jquery
[5]
1,293,303
1,293,304
How to do mathematical calculation in java based on user input string?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/962778/converting-inserted-string-to-a-compilable-expression">Converting inserted string to a compilable expression</a><br> <a href="http://stackoverflow.com/questions/3260532/how-can-i-evaluate-a-mathematical-fun...
java
[1]
5,169,110
5,169,111
Having trouble downloading and displaying inputstream in Android
<p>I'm trying to grab an inputStream from a secure website, convert it to a bitmap, and display it. The way I have my code set up (with the Logs displaying length of the byte array etc.) right now is because my error is </p> <p>01-25 10:29:44.857: D/skia(13452): --- SkImageDecoder::Factory returned null</p> <p>Howeve...
android
[4]
4,843,845
4,843,846
java...based on Collections
<pre><code>import java.util.ArrayList; import java.util.*; class Employee1 implements Comparable&lt;Employee1&gt; { int empno; String name; Employee1(int i,String j) { empno=i; name=j; } public int compareTo(Employee1 e1) { Employee1 e2=this; Integer i1=e1.empno; ...
java
[1]
3,436,992
3,436,993
how replace a character in a string in javascript
<p>i have a string :</p> <pre><code>var s="here_we_go"; </code></pre> <p>how can i replace all occurrence of '_' by '$' so the string will become: </p> <pre><code>s="here$we$go"; </code></pre>
javascript
[3]
5,976,850
5,976,851
Wrote warnings in file in Windows from during execution
<p>How to start .jar application from command line and wrote errors ( exceptionsand warnings, all what is in Console in eclipse during execution ) in errors.text on Windows ?</p>
java
[1]
4,012,738
4,012,739
Asp.net webforms generated code not well formatted
<p>Hi I recently started to learn asp.net webforms and I noticed that the code it generates is very messy when you check the source code of the page.Here is what I mean: <img src="http://i.stack.imgur.com/HhgLG.png" alt="enter image description here"> </p> <p>Is there a way to make the code look better formated or is ...
asp.net
[9]
2,576,443
2,576,444
exception (ab)use in web development
<p>I find myself using exception in web development even for conditions that are not really errors, let alone exceptional ones - just logic decisions, validations...</p> <p>in a web page, I often write code like so:</p> <pre><code>try { int id; if(!int.TryParse(txtID.Text, out id)) throw new Exception("I...
asp.net
[9]
1,561,470
1,561,471
Mail sending error from the IIS and Shared Server in asp.net
<p>Im doing a project where i have to send a link to my user/clients. The mail will be sent to them once they register their account. Now there will be a link in their mail when clicked on that link the users will be redirected once again to my website and they will be shown a pdf.</p> <p>When i did this from my syste...
asp.net
[9]
951,325
951,326
Calling Parent class method, from an object pointer?
<p>Assuming I have a class B derived from A</p> <p>A defined foo() and also, B defines foo()</p> <p>I have a method in another class that receives a B* (pointer to B). In that function, can I call the A::foo(), just by using the pointer to B the function received?</p>
c++
[6]
3,607,962
3,607,963
url rewriting in php htaccess
<p>1) I want to create a clean url web site. My server is CGI/FastCGI. I know how this does in apache. But how I will do this in CGI server, does any one give me the details?</p> <p>2) I want to create the clean url like <code>mydomain/index.php?id=1&amp;sort=a</code> to</p> <p><code>mydomain/index/id/1/sort/a</code...
php
[2]
3,445,173
3,445,174
jQuery Load default image if other fails
<p>I have been asking around but I dont seem to be getting any answers.</p> <p>I want to load a default image which will be "/images2/no-avatar.png" if another image fails. The img id will be "avatar".</p> <p>I have the latest version of jQuery so that wont be an issue.</p> <p>The image will look something like this...
jquery
[5]
5,072,183
5,072,184
Android finish() Activity Not working
<p>I got this error in my codes when i use <code>finish();</code> "The method finish() is undefined for the type SaveImageTask" . Am I missing some declarations or anything. Can someone please guide me on this. </p> <pre><code> public class SaveImageTask extends AsyncTask&lt;String , String , String&gt; { ...
android
[4]
3,880,724
3,880,725
Is there an easy way in Python to wait until certain condition is true?
<p>I need to wait in a script until a certain number of conditions become true?</p> <p>I know I can roll my own eventing using condition variables and friends, but I don't want to go through all the trouble of implementing it, since some object property changes come from external thread in a wrapped C++ library (Boost...
python
[7]
379,786
379,787
How to identify particular component from tablerow
<p>For EditText I have hard coded as mention code below but how can I check for Button, Spinner and other component...</p> <pre><code>for(int i=0; i&lt; tbl.getChildCount(); i ++) { LinearLayout ll= (LinearLayout)tbl.getChildAt(i); TableRow tbr =(TableRow)ll.getChildAt(0); EditText edttxt = (EditText)tbr....
android
[4]
1,116,453
1,116,454
Non SMTP email with Python
<p>I want to send emails with custom 'FROM' field, like *noreply@example_company.com*, it's easy to do in PHP, but I don't know how to do that in python and can't find any good documentation. </p> <p>in other words, what is the python equivalent of the following php code?</p> <pre><code>$to = "user@gmail.com"; $subje...
python
[7]
5,840,993
5,840,994
threading and getting COM port of attached phone
<p>i have the following code:</p> <pre><code>using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Threading; namespace WindowsFormsApplication1 { public partial class For...
c#
[0]
1,663,615
1,663,616
jquery detect change in class assignment
<p>Does anyone know a way to detect when a given element's class has changed using JQuery?</p> <p>I'm using the "simply countable" JQuery plug-in to notify the user of the number of characters entered into a text area. When the user exceeds the allowed number of characters, I would like to disable the "post" button.<...
jquery
[5]
4,819,185
4,819,186
Recommendation for Free PHP basic auction script
<p>I need the most simple auction script you can imagine.<br> I dont need categories, just a listing of items in a single page. </p> <p>It needs to have a description with pictures.<br> I have mysql, php, cgi, perl, ruby .. and a lot of other stuff installed on my server, but I prefer PHP.<br> Can anyone please give m...
php
[2]
1,769,684
1,769,685
Creating single instance of HTTPClient Object
<pre><code>var SingletonClass = (function(){ function SingletonClass() { var JsonClient = Titanium.Network.createHTTPClient(); return JsonClient ; } var instance; return { getInstance: function(){ if (instance == null) { instance = new SingletonClass()...
javascript
[3]
5,276,854
5,276,855
Any way to catch ACTION_UP in a view that did not intercept ACTION_DOWN?
<p>I'm trying to implement a drag-drop functionality for pre-honeycomb devices. I'd like to touch an item in one frame layout, drag it over another frame layout, and have the second frame see the ACTION_UP event. Unfortunately haven't found a way to do that, it seems only the view hierarchy that saw the original ACTION...
android
[4]
4,285,477
4,285,478
How do I list the libraries that exist in python?
<p>For example, in rails you can do a 'gem list' and it will show all of the gems that you have installed. </p> <p>Any clue how I can do this in python? Also, I am using virtualenv, not sure if that helps?</p>
python
[7]
1,374,942
1,374,943
why does the subclass have to invoke the no args constructor in the super class?
<p>On the piece of code below, I understand super(t) in the subclass is explicitly invoking a no-args constructor in its superclass (class B). What I seem to be having problems understanding is why does the subclass have to invoke the no-args constructor in the superclass? I can't seem to work out the purpose of this?<...
java
[1]
711,606
711,607
Adding a new string to the last line of a file
<p>Like the tittle says, I would like to add a new string on the bottom of the file, but somehow, its not working. Hope someone can help me out x___x</p> <pre><code> private string add(string asd){ {string filename = "asd.txt"; StreamReader reader = new StreamReader(filename); StreamWriter...
c#
[0]
1,175,430
1,175,431
Contacts not appear in list of Android Phone
<p>I made this code to insert contacts. First name is inserted and then a phone.</p> <p>The problem is: I do not know if entered. Each time you debug the code, the rawcontactid is incremented (like the time before that right).</p> <p>But not on the list of default android - phonebook.</p> <p>Could anyone help me? Th...
android
[4]
773,046
773,047
Passing date with backslashes in a URL: Android
<p>Just a simple quick question. I want to pass a date in my HTTP request. The date format is like this <code>22\July\2012</code>. Here's the URL which I am trying to pass. Where <code>dateChat =22\July\2012</code></p> <pre><code>if(this.dateChat!="") { this.dateChat.replace("\\", "\\\\"); } httpclient= new DefaultH...
android
[4]
2,308,334
2,308,335
Simple PHP Shopping Cart without SQL
<p>I'm trying to create a simple PHP shopping cart with prices, products, registration, and a checkout area. I've searched Google for tutorials but all of them incorporate SQL which is not within my skill set yet. Anyone have any examples or other tutorial resources you could refer to a PHP novice?</p> <p>Again just t...
php
[2]
5,382,571
5,382,572
jscript converter
<p>Does anyone know of a good jscript converter. Trying to take a windows environment page (asp) to nix (php) Was able to convert the asp but having trouble with the jscript. Thanks.</p>
javascript
[3]
5,716,500
5,716,501
C# how to wait for a webpage to finish loading before continuing
<p>I'm trying to create a program to clone multiple bugs at a time through the web interface of our defect tracking system. How can I wait before a page is completely loaded before I continue?</p> <pre><code>//This is pseudo code, but this should give you an idea of what I'm trying to do. The //actual code uses mult...
c#
[0]
4,785,534
4,785,535
what does mean with AccountExpirationDate?
<p>what does mean with AccountExpirationDate ?does this mean that accolunt will be deleted after this period?i want to delete the account programaticlly after a specific period.</p> <p>here my code snippet :</p> <pre><code> void _createUserAccount(String User, String Pass, DateTime expirationDate) { PrincipalC...
asp.net
[9]
1,602,051
1,602,052
PHP errors localization
<p>I had updated PHP to 5.3.10 on my workstation. PHP began to show all error in russian language (CP1251 encoding). I can't find a way to change encoding of error messages or language back to english.</p>
php
[2]
2,547,802
2,547,803
rerun javascript on callback
<p>I have a page which shows a map (PolyMap - polymaps.org) within a Devexpress CallbackPanel. When the page initially loads, the map loads just fine, but when a callback is performed within the CallbackPanel, the map does not load. I think that I have narrowed it down to the fact that the javascript is not being reini...
javascript
[3]
999,106
999,107
Is there a quicker way of writing this simple jQuery command?
<p>I would prefer to use .slideToggle and 3 lines of code but not sure how to get the script to 'refresh' itself after it's slid open and return to it's orginal state when it's slid back up (it doesn't slide back up when I use 3 lines and a .slideToggle). Sorry for the bad technical explanation. </p> <pre><code>$('#sh...
jquery
[5]
75,900
75,901
How to get an objects string and add this to a string array
<p>I have an <code>ArrayList</code> of my own class <code>Case</code>. The class case provides the method <code>getCaseNumber()</code> I want to add all of the cases casenumber to a <code>String[] caseNumber</code>. I've tried this</p> <pre><code>public String[] getCaseNumberToTempList(ArrayList&lt;Case&gt; caseList) ...
java
[1]
3,975,635
3,975,636
Android: How to use a Android Pad as a customer information Terminal
<p>I want to us an Android-powered Pad as an information terminal for my customers.</p> <p>The only thing it has to to is to show a HTML5 Webpage.</p> <p>Therefore, 1. it should not be posiible to show another website (only the local one), should be no problem</p> <ol> <li><p>it should be only possible to leave the...
android
[4]
4,397,773
4,397,774
move part of a string to another part of the string
<p>I have a very simple textbox given to a user.</p> <pre><code>&lt;textarea name="text"&gt;ENTER YOUR TEXT, DUDE!&lt;/textarea&gt; </code></pre> <p>Sometimes, users could input something like this:</p> <pre><code>blablablatext blablabla $ 10 blablabla blablablatext </code></pre> <p>Which is fine but what I want to...
php
[2]
3,634,575
3,634,576
Javascript getElementById null error
<p>I posted quite recently about an issue with javascript in firefox, and it was denoted the problem was likely document.write() overwriting the script somehow. <a href="http://stackoverflow.com/a/12028845/1433767">It was suggested I use IDs to solve the problem of both overwriting the script and to avoid stacking of t...
javascript
[3]
562,636
562,637
Why does TheyWorkForYou (TWFY) web API always returns '{}'
<p>I'm calling a web API exposed by TheyWorkForYou (TWFI). <a href="http://www.theyworkforyou.com/api/" rel="nofollow">http://www.theyworkforyou.com/api/</a></p> <p>I'm using the Python bindings provided by twfython: <a href="http://code.google.com/p/twfython/" rel="nofollow">http://code.google.com/p/twfython/</a></p>...
python
[7]
3,193,067
3,193,068
How to change the progress drawable of SeekBar dynamically from the program?
<p>I would like to change the color of the progress (not the <code>SeekBar</code> background) of a <code>SeekBar</code> dynamically from the program.</p> <p>Using <code>seekbar.setProgressDrawable(Drawable drawable)</code> only changes the background of the <code>SeekBar</code>. All the examples I've seen make use of ...
android
[4]
5,014,920
5,014,921
Page refreshes immediately after draw (x3Dom)
<p>I would like the "Add Cone" button to draw a cone, but it seems the code below refreshes the browser immediately after the cone is drawn. What I would like would be for the page to stay on the cone page after each button click, without the refresh. Any help would be much appreciated. </p> <pre><code> &lt;script&...
javascript
[3]
4,283,992
4,283,993
Please Let me know, How to enable Two-Finger rotation on Apple Map using MKMapView
<p>I am new in iPhone, as per customer requirement i want to enable Two-Finger rotation using MKMapView, How can i enable Two-Finger rotation as we can see in Apple Maps in iOS6 ? If any one has done yet please help.</p> <p>Please help me to come out.</p> <p>thank you in advance.</p>
iphone
[8]
3,430,173
3,430,174
Is there any way to Intercept incoming calls/sms to either block/unblock it?..Android
<p>hi Is there any way to intercept incomming calls/sms (to block or unblock it) on the basis of mobile numbers which are added to screening list. Thanks in Advance...</p>
android
[4]
3,534,525
3,534,526
PHP - Please help me to complete my project
<p>How to link the code to smtp. And how to link smtp to my localhost. and how to substitute this with my ISP details and the email id to the email id which i use for sending.</p> <p><strong>Below is the Code for your reference</strong></p> <pre><code>&lt;?php ini_set('display_errors',1); error_reporting(E_ALL|E_STR...
php
[2]
5,193,044
5,193,045
file browser in iphone?
<p>I am new to Iphone.How to create file browser in iphone ? I wish to show all the files and folders in the iphone.How to do this?</p>
iphone
[8]
859,201
859,202
Setting variable and counting
<pre><code>$counter = ""; if($sWall&gt;1){ $counter = $counter + $sWall; } if($sWC&gt;1){ $counter = $counter + $sWC; } if($sOther&gt;1){ $counter = $counter + $sOther; } if(!(empty($counter))){ echo "(".$counter.") "; } </code></pre> <p>This is what I have that does not work. <code>$sOther</code>, <co...
php
[2]
1,631,025
1,631,026
System retval for returning
<p>If there a way of avoiding the <code>$retval == 0</code>, so I can quickly call a system program for a test?</p> <pre><code>&lt;?php function test() { system("grep -q foobar " . __FILE__, $retval); if ($retval == 0) { return true; } else { return false; } } if (test()) { echo "true\n"; } else { echo "false\n"; } ?&...
php
[2]
4,582,909
4,582,910
return by reference - which of the two is the correct one
<p>i have the function: const A&amp; f(...) {...}</p> <pre><code>a. const A a1 = f(..); b. const A &amp;a2 = f(...); </code></pre> <p>which of the is the better one to use? in both cases, if i understand correctly, i prevent the possibility of modifying the returned object. in the first option, the copy constructor ...
c++
[6]
5,970,908
5,970,909
Best practice - How to test if a string exists in Java?
<p>I render some data based on a condition. The backing method performs a check if a string exists. But I don't know if I can be happy with the compare to <code>null</code>?</p> <pre><code>public boolean isString(MyClass var) { return null != var.getMyString(); } </code></pre> <p>Could it be done better?</p>
java
[1]
5,165,952
5,165,953
Jquery Determine which button by keyup
<p>Hi have some buttons labeled A-G. The id's on the buttons are as follows.</p> <pre><code>"btn_A" "btn_B" "btn_C" etc... </code></pre> <p>I am running a keyup function as follows.</p> <pre><code>$(document).keyup(function (event) { var theButton = "btn_"+String.fromCharCode(event.keyCode); alert(theButt...
jquery
[5]
5,164,193
5,164,194
problem in recording the video and saving that video in sd card in android application
<p>I am developing an android application which involves recording video and saving the video in sd card of android emulator,Can anyone tell how should i pursue</p> <p>Thanks in advance Tushar</p>
android
[4]
2,299,168
2,299,169
Javascript: how can I append variables to the url?
<p>how can I append variables to an URL with javascript without navigating to the url ?</p> <p>thanks</p>
javascript
[3]