Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
4,069,291 | 4,069,292 | Code not getting hot swapped in emulator | <p>everything was working fine, suddenly hot swap of code is not working.
after i change anything in the code and rebuild and launch, console flashes this error:</p>
<blockquote>
<p>Installation error: INSTALL_FAILED_CONTAINER_ERROR Please check logcat
output for more details. Launch canceled!</p>
</blockquote>
... | android | [4] |
1,020,427 | 1,020,428 | changing the background color of custom cell | <p>It looks simple thing but i dont know why i am not able to change the background color of a custom tag on which i am working. Please check my code below for the custom cell.</p>
<pre><code>- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if ((self = [super initWithS... | iphone | [8] |
5,803,632 | 5,803,633 | Selecting all children and decendants with jQuery | <p>I have some HTML that is being produced by a WordPress plugin that is designed to allow for expandable/collapsible text, with up to three levels of depth. I would like it so that if you were to collapse the first or second levels and the children below it were also expanded those too would get collapsed but nothing ... | jquery | [5] |
1,615,502 | 1,615,503 | How to set different images alternately in listView's row? | <p>I have a listview, in which I am fetching data from Twitter, I also show it in listView,
but I want to show different images in different rows of listView.</p>
<p>I used <code>convert-view.setBackGroundResource(R.drawable.strip1);</code>, it repeats this image in all rows, but I want to set it alternatively. How is... | android | [4] |
4,539,145 | 4,539,146 | Editing an asp.net DropdownList | <p>I have a dropdown list of 5 elements. My problem is that I want to make this dropdown list editable. Basically a user might want to delete one of these elements or might want to add more elements. Whats a good approach of doing that in asp.net ?</p>
| asp.net | [9] |
1,439,241 | 1,439,242 | CONVERT MM/DD/YYYY HH:MI:SS AM/PM to DD/MM/YYYY in C# | <p>How can I convert MM/DD/YYYY HH:MI:SS AM/PM into DD/MM/YYYY using C# ?I am using C#2008.</p>
<p>Thanks</p>
| c# | [0] |
5,307,797 | 5,307,798 | How to Integrate yahoo calendar on ASP .NET Application | <p>I am working on a project where we would like to sync users events(Appointments) within our site with their yahoo calendar. Does anyone know if this is even supported?Any help would be greatly appreciated.</p>
| asp.net | [9] |
3,412,844 | 3,412,845 | android download files problem | <p>i wanna download files in my application ,</p>
<p>so i used threads to download , </p>
<p>but i found that if i close application , the downloading stopped.</p>
<p>should i use 「service」 to implement downloading?? or something else ??</p>
<p>could someone give me suggestions?</p>
| android | [4] |
1,677,821 | 1,677,822 | Count the number of rows in a database from an activity outside the adapter | <p>Trying to get a count of the rows in a database from a separate activity. I have been messing with the methods to do so, but I can't seem to instantiate them from another activity if the method is built in the database adapter class. Ideally, I would like the method in the adapter to return an int that I can then ... | android | [4] |
2,863,055 | 2,863,056 | jQuery - Changing the src of another image on rollover | <p>Im wondering if someone could help me .... I have 2 images, and i want to be able to change the src of one when i rollover the other one if that makes sense.</p>
<p>for example, i have 2 images</p>
<p></p>
<p></p>
<p>When someone hovers over 'imimage2.jpg' i want 'imimage1.jpg' to change to 'imanewimage.jpg'</p>... | jquery | [5] |
2,880,254 | 2,880,255 | Notification bubbles from nothing in C# | <p>in a C# application that has no graphics at all, and does a bunch of network operations, I need to be able to show notification bubbles (on top of everything, for a few seconds) near the icon tray on certain events.</p>
<p>I've been looking at this : <a href="http://www.codeproject.com/KB/miscctrl/taskbarnotifier.a... | c# | [0] |
1,940,562 | 1,940,563 | How to capture and convert textbox into pdf file format? | <p>I want to capture my text box and convert it into the PDF format.<br>
I tried the following code, but it captures the whole screen. How can I capture only my textbox values?</p>
<ol>
<li><p>Code:</p>
<pre><code>try
{
Rectangle bounds = this.Bounds;
using (var bitmap = new Bitmap(bounds.Width, bounds.Height... | c# | [0] |
2,703,608 | 2,703,609 | can we get the ready made setting bundle? | <p>can i get setting bundle ready made so it can easily deploy in my app</p>
| iphone | [8] |
2,347,950 | 2,347,951 | Whats the difference between theese two java code snippets? | <p>I have this code i am doing for university. The first code works as expected, the second one provides different results.</p>
<p>I can not see what they are doing differently??</p>
<p>first:</p>
<pre><code>public Mat3 getNormalMatrix() {
return new Mat3(this.getInverseMatrix()).transpose();
}
</code></pre>
<p... | java | [1] |
3,212,575 | 3,212,576 | In a Python class, what is the difference between creating a variable with the self syntax, and creating one without ? | <p>What is the difference between creating a variable using the self.variable syntax and creating one without? </p>
<p>I was testing it out and I can still access both from an instance: </p>
<pre><code>class TestClass(object):
j = 10
def __init__(self):
self.i = 20
if __name__ == '__main__':
test... | python | [7] |
5,697,590 | 5,697,591 | how to add tableview on scrollview programtically | <p>I have created one tableview programmatically. But i want to enable horizontal scroll for that tableview.So i think i need to add first scrollview programmatically and then on that scrollview i need to add tableview which i have created.Please help me how to do this or correct me if i am going wrong.</p>
| iphone | [8] |
3,908,184 | 3,908,185 | How can i implement Feature Like "Precache Map Area" as like Google Map | <p>Can I Implement Feature Like <code>"Cache Google Map Tile" or "Precache Map Area"</code> which is in Google Maps?</p>
<p>In Latest Google Maps Update, There is a option like <code>"Precache Map Area"</code> So i want to implement this Feature in My Own Application and on My Own Device. So can i Do this Using Google... | android | [4] |
3,517,509 | 3,517,510 | When I change a parameter inside a function, does it change for the caller, too? | <p>I have written a function below:</p>
<pre><code>void trans(double x,double y,double theta,double m,double n)
{
m=cos(theta)*x+sin(theta)*y;
n=-sin(theta)*x+cos(theta)*y;
}
</code></pre>
<p>If I call them in the same file by </p>
<pre><code>trans(center_x,center_y,angle,xc,yc);
</code></pre>
<p>will the v... | c++ | [6] |
1,992,819 | 1,992,820 | How to hide a value in a textbox? | <p>I am showing the value in the textbox.The value comes from the databse first I store it in the variable.I have three radio buttons and when the <strong>user click third radio button</strong> the textbox going to be disabled.<strong>At the time I want to hide the textbox value displayed within the textbox.</strong>Bu... | jquery | [5] |
1,207,941 | 1,207,942 | How to pass string from onListItemClick event to onButtonClick event of the same activity in android? | <p>I have to pass value of a string variable once the the list item is clicked to button click event of the same activity so that i can use it's value.Actually the value is passed and i am able to see in a toast but if i try to display in textveiw .It does't show.Basically i want to check its value with sqlite database... | android | [4] |
2,636,263 | 2,636,264 | php API throttle (users/request) | <p>First off all this question is answered here:
<a href="http://stackoverflow.com/questions/1375501/how-do-i-throttle-my-sites-api-users/1500309#1500309">How do I throttle my site's API users?</a></p>
<p>But i cannot understand what value it should give here:</p>
<pre><code>$minute_throttle = $this->get_throt... | php | [2] |
2,273,281 | 2,273,282 | why does python os.path.isfile seem to ignore certain file types? | <p>simple script on a unix system (Mac) which seems to only return certain files True. Can't figure out why:</p>
<pre><code>workdir = '/Volumes/place/sub place'
def myFunc(bla, dir, flist):
for f in flist:
print f, os.path.isfile(f)
os.path.walk(workdir,myFunc,None)
</code></pre>
<p>Returns:</p>
<pre... | python | [7] |
3,349,493 | 3,349,494 | Passing a function return result into a foreach loop | <p>Out of curiosity, are the two options below functionally equivalent?</p>
<pre><code>$array_variable = function_that_creates_an_array();
foreach($array_variable as $a){
do_something()
}
</code></pre>
<p>vs.</p>
<pre><code>foreach(function_that_creates_an_array() as $a){
do_something()
}
</code></pre>
<p>J... | php | [2] |
882,564 | 882,565 | A panel to configure JavaScript parameters on a website | <p>I am looking for a library that would create a "settings panel" with configurable amount of sliders, checkboxes, etc and add it to a website. After a slider or checkbox is changed in the panel, a callback function would be executed.</p>
<p>Rationale: I am building a canvas demo and I don't want to spend time on wri... | javascript | [3] |
2,444,163 | 2,444,164 | When not to use a private field? | <p>When should it be considered dangerous to use a <strong>private</strong> field all over the place in the methods of your class? I mostly just create the variable and set it to a default value like null. Then in my methods reference it and set it to an instance of that object type from the methods.</p>
<p>I don't ... | c# | [0] |
1,925,744 | 1,925,745 | Java checking no of days in a month and adding dates that are missing | <p>Hi I have the following arraylist strings of dates</p>
<p>["2010-08-01","2010-08-02","2010-08-04","2010-08-05","2010-08-06","2010-08-07","2010-08-08","2010-08-09","2010-08-11","2010-08-12","2010-08-13","2010-08-14","2010-08-15","2010-08-17","2010-08-18","2010-08-20","2010-08-21","2010-08-26","2010-08-28","2010-08-2... | java | [1] |
1,580,029 | 1,580,030 | opening file with php not working | <p>Why does:</p>
<pre><code>$test='tester.txt';
$bigarr=str_getcsv($test,',');
print_r($bigarr);
</code></pre>
<p><code>texter.txt</code> contains: <code>one,two,three,four</code></p>
<p>Not work please?</p>
<p>EDIT: It outputs just 'tester.txt' and does not put the individual elements into an array like it is supp... | php | [2] |
3,551,311 | 3,551,312 | jQuery to flip div 180 degrees | <p>Bascially trying to show a series of cards similar to playing cards or Tarot which each have a unique picture or image on one side and a text description on the other.</p>
<p>When page is loaded the image will show first off but on clicking a button the card will flip 180 degrees to show a text description of the c... | jquery | [5] |
2,640,928 | 2,640,929 | passing value to function | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/7998209/pass-by-reference-in-java">pass by reference in java</a> </p>
</blockquote>
<p>I am new to java. I tried to search a lot for my query but could not find. Please help me if you know. I have a function:</p... | java | [1] |
2,794,353 | 2,794,354 | Using the Android Pattern Lock screen as a LOG-in to my android application | <p>I am making an Android application and I want dat the entry into the application should be protected by keeping the pattern lock screen as a LOG-in.
Is it possible to use the Android pattern lock screen as a Log-in to our own made applications...
If possible HOW...?</p>
| android | [4] |
650,823 | 650,824 | Iphone - how to programmatically answer a call | <p>I saw this application on Cydia ( forgot the name) that will answer/ reject a call when you shake the phone.
Any ideea how is it done ? Couldn't find anything in SDK.</p>
<p>Thanks</p>
| iphone | [8] |
4,374,209 | 4,374,210 | Is binding a click event to document better than binding it to body? | <p>The question is simply between</p>
<p><code>$("body").click(function(e){});</code> vs <code>$(document).click(function(e){});</code></p>
<p>which is more efficient or advisable? Or does it depend on the situation?</p>
<p>Honestly I have used them both interchangeably and haven't seen any differences until I got c... | jquery | [5] |
1,939,865 | 1,939,866 | How to exit a loop on condition? | <pre><code>$arr = array(1, 2, 3, 4);
foreach ($arr as $value) {
$i=0;
if($i==1||$i==2){continue;}
echo $value;
$i++;
}
</code></pre>
<p>I am a newbie of PHP, now i do a test, and i want to go out the loop not output 2 and 3, why the above code doesn't work?</p>
| php | [2] |
3,537,133 | 3,537,134 | Hide select field on external click | <p>I am wondering how should I hide a drop down list by clicking on anywhere in page, I want same function like select field (<code><select></select></code>) do, if we open any select field and then click anywhere in page it pop back.</p>
<p>Let me know if my question is not clear.</p>
<p>Thanks.</p>
| jquery | [5] |
5,322,634 | 5,322,635 | Double while loop to read a text file | <p>Is it possible to read a text file with a double while/for loop? </p>
<p>I'd like to do something like this:</p>
<pre><code>for( String row1 = 0; row1 < file.length; row1++ ) {
for( String row2 = row1 + 1; row2 < file.length; row2++ ){
if( file[row1] == file[row2] ){
// other code
... | java | [1] |
4,757,087 | 4,757,088 | Is there a way to invoke a static method of a class using a string which has the name of the class? | <p>I have an array of strings containing names of classes. Is it possible to invoke the static methods of the actual class using the 'name of the class' in the string array.</p>
<pre><code>public class SortCompare {
// There are classes called 'Insertion', 'Selection' and 'Shell' which have a
// method cal... | java | [1] |
293,532 | 293,533 | How can I copy value from ostringstream to string? | <p>I tried :</p>
<pre><code>ostringstream oss;
read a string from file and put to oss;
string str;
str << oss.str();// error here "error: no match for ‘operator>>’ in 'oss >> str' "
</code></pre>
<p>If I use <code>str = oss.str();</code>
Instead of printing the value of the string, it prints out <co... | c++ | [6] |
5,281,009 | 5,281,010 | change label text in usercontrol at run time | <p>hello
i m new to c# and im working on a project,in which i made a usercontrol1 as
*<em>label textbox datepicker</em>*now i wnt to change the label text,i m trying this code but it is not working</p>
<pre><code>using System;
using System.Windows.Forms;
namespace library_system
{
public partial class UserContr... | c# | [0] |
5,202,003 | 5,202,004 | Get inner list from list of list C# | <p>I am working with C# and I have a following </p>
<pre><code>List<List<UserObj>> obj;
</code></pre>
<p>How do I get the inner list (<code>List<UserObj></code>) of obj?</p>
<p>Thanks.</p>
| c# | [0] |
328,521 | 328,522 | custom listview over an exsisting activity | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4547511/how-can-i-display-a-listview-on-the-top-of-another-activity-in-android">how can i display a listview on the top of another activity in Android</a> </p>
</blockquote>
<p>hi..i want to display a custom lis... | android | [4] |
1,523,305 | 1,523,306 | how Open Dialog from BroadcastReceiver class | <p>I want to open dialog from BroadcastReceiver but it gives an error.</p>
<p>Here is my code:</p>
<pre><code>final Dialog mydata= new Dialog(context);
mydata.getWindow().setFlags(
WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
myda... | android | [4] |
5,888,335 | 5,888,336 | How to read the client MAC Address using NetworkInterface in Java | <blockquote>
<p>I have a code that reads the LocalHost Mac Address.
The code is being called from the Servlet or JSP.<br />
But failed to read the address of REMOTE HOST or Client.
I am using the NetworkInterface class to implement the functionality.<br />
One reason which I understand that its reading the ... | java | [1] |
5,072,141 | 5,072,142 | How to use custom functions in QT4 for slots | <p>Currently I'm working on a class project where I'm making an asteroids game, and what I'm trying to figure out is how to use a custom function for a slot so when an Open QAction in a QMenu is clicked, that function is called. From what I understand, writing your own custom functions isn't possible, but is it possibl... | c++ | [6] |
976,861 | 976,862 | allow specific extension in forms authentication | <p>I am using forms authentication with </p>
<p>
</p>
<pre><code><authorization>
<deny users="?" />
</authorization>
</code></pre>
<p>However, I want to allow all calls made for specific extension say *.abc.</p>
<p>I tried:</p>
<pre><code><location path=".abc">
<system.web&g... | asp.net | [9] |
2,171,421 | 2,171,422 | PHP shorthand rewrite | <p>Probably really easy for a pro, but could someone re-write this from it's PHP shorthand form to non-shorthand?</p>
<pre><code>($facebook) ? $fb_active_session = $facebook->fbc_is_session_active() : $fb_active_session = false;
</code></pre>
<p>Thanks!</p>
| php | [2] |
1,688,773 | 1,688,774 | insert null value when no selected value from ddl | <p>I had ddl which determine gender and user can donot choose any value from ddl so i tried to check if user didnot select any value from ddl inser null value or any value in database i made that but error apear(Procedure or Function 'InsertRegisteration' expects parameter '@Gender_Id', which was not supplied).any one ... | c# | [0] |
4,942,138 | 4,942,139 | php API throttle (users/request) | <p>First off all this question is answered here:
<a href="http://stackoverflow.com/questions/1375501/how-do-i-throttle-my-sites-api-users/1500309#1500309">How do I throttle my site's API users?</a></p>
<p>But i cannot understand what value it should give here:</p>
<pre><code>$minute_throttle = $this->get_throt... | php | [2] |
2,069,644 | 2,069,645 | Adding formatting tags to textbox value | <p>In my form I want to allow the user to format text and add lists and such (basic html functionality, without having to know html).</p>
<p>Using the Bold button as an example:</p>
<pre><code><div class="goBold button">B</div>
<input type="text" name="txtMessage" />
<script>
$(".goBold").clic... | jquery | [5] |
2,966,394 | 2,966,395 | ASP.NET: Questions about ASPNETDB.MDF | <p>in my web site i have two databases, ASPNETDB.MDF and a self created one (database.mdf). (The don't contain a lot of data yet)
But i need a relationship (foreign key) between a table in ASPNETDB.MDF and a table in database.mdf.</p>
<p>So i guess i need to merge both databases first, would you just extend the "ASPNE... | asp.net | [9] |
6,014,583 | 6,014,584 | Why the following defined a cast operator? | <p>Saw the header definition from a library </p>
<pre><code>operator const wchar_t*() const
</code></pre>
<p>anyone can explain to me why the above defined a cast operator?</p>
| c++ | [6] |
2,464,842 | 2,464,843 | How to Pass Data from One frame to Another and to all other frames in the project? | <p>I wanna want to pass or share data(values) from login frame to all frames in my project, H have made class of this variables like this </p>
<pre><code>public class SharedData {
public String LoginName;
public SharedData() {
}
/**
* @return the LoginName
*/
public String getLoginNa... | java | [1] |
5,542,431 | 5,542,432 | What's the difference between this and super keywords in java? | <p>Check my coolMethod, babes:</p>
<pre><code>package zoo;
public class Zoo {
public String coolMethod() {
return "Wow baby!";
}
}
</code></pre>
<p>My Moo Class, that extends my Zoo class, full of ways to do the same thing, which is calling my coolMethod.</p>
<pre><code>package zoo;
public class ... | java | [1] |
1,584,614 | 1,584,615 | What are PHP 5.2 settnigs which affect compatibility with old code (developed for PHP 4 and 3)? | <p>What are PHP 5.2 settnigs which affect compatibility with old code (developed for PHP 4 and 3)?</p>
<p>A web application using XTemplate 0.2.4-2 (officially meant for 3.0.11) works fine on one server running PHP 5.2 but works incorrect (seems that the form can't be submitted or processed correctly) on new PHP 5.2 a... | php | [2] |
3,073,021 | 3,073,022 | How to use FieldPosition argument in java MessageFormat.format method? | <p>How is the FieldPosition argument used in the <code>MessageFormat.format</code> method in java? In all the examples I have seen online, there have been no uses of the FieldPosition argument. Is this argument used for anything? I am looking at the spec here: <a href="http://docs.oracle.com/javase/1.5.0/docs/api/ja... | java | [1] |
1,346,323 | 1,346,324 | Why is this chaining method not working? | <p>It's a simple counter. The method <code>add</code> is being called to increment the private variable <code>count</code> by 1 by default. I am returning the <code>Counter</code> class from the function so that it may be chained, but when I look at the output, it gives me 1 when I expect it to be 3 because I called <c... | c++ | [6] |
3,740,883 | 3,740,884 | Android app development for dummies book? | <p>has anyone ever read/skimmed through this book? it is valuable/very helpful to people such as myself, who are complete noobs to android programming? I am thinking of purchasing one on amazon for $20 but dont know if its going to be a really helpful book. </p>
<p>Also, when i skim through the book on the amazon wesi... | android | [4] |
3,934,755 | 3,934,756 | Using Python's isinstance | <p>The following usage of <code>isinstance</code> doesn't seem to work in Python 2.5.2 or 2.6.2:</p>
<pre><code>class BananaCake:
def __init__(self):
print 'Banana Cake'
class ChocolateCake:
def __init__(self):
print 'Chocolate Cake'
class CakeFactory:
@staticmethod
def create(name):
... | python | [7] |
1,823,833 | 1,823,834 | Android Log data | <p>I'am using log to store all the transfer. How can I check the logged data?</p>
<pre><code>Log.i("login", "recevied " + getResponse(response.getEntity()));
</code></pre>
| android | [4] |
4,213,072 | 4,213,073 | Still confused about JavaScript's 'this' | <p>I've been reading through quite a few articles on the 'this' keyword when using JavaScript objects and I'm still somewhat confused. I'm quite happy writing object orientated Javascript and I get around the 'this' issue by referring the full object path but I don't like the fact I still find 'this' confusing. </p>
<... | javascript | [3] |
1,916,183 | 1,916,184 | How to create a small box above selected text ( double click to select it ) | <p>I try to write a dictionary extension for Google Chrome. Now, I want to pop out a small box when I double click to select text . How can I implement it :)
Or like this one ( Fastest Chrome ). They're written in javascript.</p>
<p><img src="http://img130.imageshack.us/img130/9721/abcjq.jpg" alt="alt text">
Thanks so... | javascript | [3] |
2,265,680 | 2,265,681 | PHP appends localhost to out-going email | <p>Here's a PHP code that I'm using to test email sending for one of my forms. Although it works well, but for some reason it appends
@localhost.mydomain.com to the sender email address. Here's an example:</p>
<pre><code>From: James <james.bond@hotmail.com@localhost.mydomain.com>
</code></pre>
<p>Here's the fu... | php | [2] |
5,390,990 | 5,390,991 | Deduping a complex list using a simplified copy of itself | <p>I have two lists of strings that are passed into a function. They are more or less the same, except that one has been run through a regex filter to remove certain boilerplate substrings (e.g. removing 'LLC' from 'Blues Brothers LLC').</p>
<p>This function is meant to internally deduplicate the modified list and rem... | python | [7] |
4,446,865 | 4,446,866 | JQuery issue - http://jqueryui.com/latest/themes/base/ui.all.css not working | <p>I have never used J Query....Was wondering what does the link ..</p>
<p><a href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="nofollow">http://jqueryui.com/latest/themes/base/ui.all.css</a></p>
<p>link to?
One of the websites i have taken over has stopped working. When i take this source out at the top ... | jquery | [5] |
4,675,063 | 4,675,064 | Find the value in the minimum number of trials | <p>I have an array of 52 different values that I can pass through a class to get a number in return.</p>
<pre><code>$array = array("A","B","C","D"...);
</code></pre>
<p>Each value passed through the class gives a different number that can be either positive or negative.
The numbers are not equally distributed but are... | php | [2] |
2,570,242 | 2,570,243 | Key Value pair storage in Settings file | <blockquote>
<p><strong>Possible Duplicate:</strong><br />
<a href="http://stackoverflow.com/questions/1166496/key-value-storage-in-settings-file">Key Value Storage in Settings file</a> </p>
</blockquote>
<p>Hi,
I am developing an application in C#, which needs to store an array of key value pair in settings fi... | c# | [0] |
1,578,208 | 1,578,209 | In PHP 5.2 why is instantiating a class and calling a method on the same line invalid? | <p>This is what I'd like to do:</p>
<pre><code>$app = (new Factory())->GetApp();
</code></pre>
<p>However, I get an "unexpected T_OBJECT_OPERATOR" error.</p>
<p>To avoid this, I have to do:</p>
<pre><code>$Factory = new Factory();
$app = $Factory->GetApp();
</code></pre>
<p>Why is this necessary? I'm runnin... | php | [2] |
1,734,944 | 1,734,945 | How to get interactive input from user and to be able to use arrowkeys while entering input? | <p>When I do a raw_input() and enter values, I am not able to use my arrow-keys to change stuff... is there any way for doing that?</p>
<p>Thanx readline module helps in line editing features. How to use the readline module?
Just importing the readline module works!</p>
| python | [7] |
1,524,593 | 1,524,594 | Compiler complains about "missing return statement" even though it is impossible to reach condition where return statement would be missing | <p>In the following method, the compiler complains about a <em>missing return statement</em> even though there is only a single path through the method, and it contains a <code>return</code> statement. Suppressing the error requires another <code>return</code> statement. </p>
<pre><code>public int foo() {
if (true... | java | [1] |
3,984,963 | 3,984,964 | Special Bidirectional Association | <p>I think it was called reflexive association but I'm not quite sure.</p>
<p>This is the code (It should be enought to see what ist important):</p>
<pre><code>CGmae::CGame(void)
{
CFigure * figure = new CFigure(this);
}
CFigure::CFigure(CGame * game)
{
CGame * game = game;
}
</code></pre>
<p>I wanted to cr... | c++ | [6] |
5,294,676 | 5,294,677 | Jquery and adding row to table | <p>I have the following jquery code.</p>
<pre><code>var destTable = $("#numbers");
$(document).ready(function() {
$("#btnAdd").click(function() {
//Take the text, and also the ddl value and insert as table row.
var newRow = $("<tr><td>hi</td></tr>");
$("#numbers").append(newRow);
}... | jquery | [5] |
5,057,697 | 5,057,698 | goto and RAII in C++ | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3179936/goto-out-of-a-block-do-destructors-get-called">Goto out of a block: do destructors get called?</a> </p>
</blockquote>
<p>I know that goto operator both in C and C++ is useless in almost all situations, b... | c++ | [6] |
3,810,907 | 3,810,908 | How to create Syntax Highlighting Text Box | <p>How to create a Syntax Highlighting Textbox Using C#.Net</p>
| c# | [0] |
97,273 | 97,274 | it there a better way to write the line in php? | <pre><code> <div class="meta">
<?php echo $submitted."pubblished in".$fenl; ?>
<a href="<?php echo base_path().'comp/'.$node->nid;?>">
<?php echo $comment_count;?>comment</a>
</div>
</code></pre>
<p>it there a better way to write the above code.</p>
<p>2,</p>
<pre><code>... | php | [2] |
3,500,573 | 3,500,574 | javascript get element by name | <p>Ok i have this little cute code as a expirement:</p>
<pre><code>function validate()
{
var acc = document.getElementsByName('acc').value;
var pass = document.getElementsByName('pass').value;
alert (acc);
}
</code></pre>
<p>and this html part</p>
<pre><code><table border="0" cellpadding="2" cellspacing="0" vali... | javascript | [3] |
5,324,442 | 5,324,443 | bypass password on android adb backup | <p>I am trying to write shell script to run android phone backup automatically using adb backup.
Is there any methods to bypass password screen(no password), when doing android adb backup?</p>
| android | [4] |
2,040,711 | 2,040,712 | Convert foreach to for in PHP | <pre><code>foreach ( $this->parent->get_sections(null, $this->parent->author) as $section)
{
//...
}
</code></pre>
<p>I'm trying to do is force the loop to output each <code>$section</code> in the order I want. Each <code>$section</code>'s name can be retrieved by <code>$section->name</code>. Let's sa... | php | [2] |
4,095,068 | 4,095,069 | Is a class with static members and a public constructor a static class? | <p>If I have a class that is not marked <code>static</code>, but it does have <code>static</code> member variables, does this make the class itself <code>static</code>? It's being used in code like it is, but it has a public constructor. I thought they can only have private constructors?</p>
<p>Also, in a web applicat... | c# | [0] |
4,430,798 | 4,430,799 | AutoCompleteTextView from URL | <p>Hi I want to create AutoCompleteTextView from URL.Can anybody help me.Precisely speaking from JSon which returned from webservice</p>
| android | [4] |
2,432,753 | 2,432,754 | how to make download.php ?id=number | <p>How to make a download.php where I can set the external download links by id 's.(id numbers).
then I can make my link with my own domain
like this:- <a href="http://link.domain.com/" rel="nofollow">http://link.domain.com/</a><em>*</em>*/download .php?id=number.</p>
<p>Because I wanted to show my link but it will d... | php | [2] |
4,091,945 | 4,091,946 | What's the predicate in C++? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/5921609/what-is-predicate-in-c">What is predicate in C++?</a> </p>
</blockquote>
<p>When I read the C++ primer, there is a defined term which is <strong>predicate</strong>.</p>
<p>The definition is this :</p>
... | c++ | [6] |
2,501,624 | 2,501,625 | Write to CLOB in Java | <p>Now we are using the following code to write the data into the .csv file ( i.e for creating)</p>
<p>But Now I have to update this data directly to the one database column CLOB.
without generating any .csv file.</p>
<p>How can I add this data to CLOB.
here we r passing each and every line as vector to the writeIT()... | java | [1] |
2,927,817 | 2,927,818 | jQuery: select checkbox based on name and value | <p>I have the following HTML:</p>
<pre><code><form id="test">
<input type="radio" value="A" name="C1"/>
<a href="javascript:selectCheckbox('C1', 'A');"> OPTION-A </a>
<input type="radio" value="B" name="C1"/>
<a href="javascript:selectCheckbox('C1', 'B');"> OPTION-B </a&... | jquery | [5] |
3,834,847 | 3,834,848 | How does one use TrafficStats.incrementOperationCount()? | <p>The documentation for <a href="http://developer.android.com/reference/android/net/TrafficStats.html#incrementOperationCount%28int,%20int%29" rel="nofollow"><code>TrafficStats.incrementOperationCount()</code></a> says:</p>
<blockquote>
<p>Increment count of network operations performed under the given
accountin... | android | [4] |
2,162,890 | 2,162,891 | Help with php sessions | <p>I like to know how to use a condition on php sessions</p>
<p>in this code if the user is not loged in page will redirect to login.php. </p>
<pre><code><?
session_start();
if(!session_is_registered(username)){
header("location: login.php");
}
?>
</code></pre>
<p>what i want is to redirect user to another p... | php | [2] |
3,585,265 | 3,585,266 | Retrieving element from a 2D array in column JAVASCRIPT | <p>i create a table with a 2D array displaying numbers. Now i want to retrieve element from it. the code below is retrieving it row wise. How can i modify the code below to retrieve it column wise?</p>
<pre><code>var newArray;
var buffer ="";
newArray = totalRows.map(function(arrayNode){
return arrayNode.map(f... | javascript | [3] |
5,271,925 | 5,271,926 | Scope of enumerators | <p>In the following, I don't know if i'm confusing enums in C# with C++ but
I thought you could only access enumerators in enum using <code>Forms::shape</code> which actually gives an error. </p>
<pre><code>int main()
{
enum Forms {shape, sphere, cylinder, polygon};
Forms form1 = Forms::shape; // error
... | c++ | [6] |
5,024,004 | 5,024,005 | C#, how to halve a byte array? | <p>I have a byte array defined like this</p>
<pre><code>byte[] fileContents = File.ReadAllBytes(zfoFileName);
</code></pre>
<p>How can I get the first 1/2 of the fileContents byte array?</p>
<p>In other words if the upper bound of the array is 10, I would like a new byte array to have the first 5 values of fileConte... | c# | [0] |
2,519,619 | 2,519,620 | screen orientation like portrait and landscape in iphone | <p>Im new to iphone development. here i want to view the screen like landscape porgrammaticaly in iphone. i completed like portrait side now when i turn left and right sides automaticaly i added some images and pickerview data these are also shown like portrait and landscape screens to iphone . </p>
<p>Can any one plz... | iphone | [8] |
2,217,983 | 2,217,984 | Unexpected indent Python | <p>I keep getting the error "unexpected indent" for the line "lijst2 = lijst + [cat]" in the following code. I have no idea why, because as far as I can see indentation seems to be correct? Please keep in mind I am a beginner. Thank you! This is my code:</p>
<pre><code>for fileid in corpus.fileids():
tekst1 = corp... | python | [7] |
624,300 | 624,301 | java "cannot find symbol" - how to import a file in the same directory? | <p>I have two java files in a directory, neither of them are in a package. I want one of them to be able to reference the other. What is the right way to do this? </p>
<p>Currently in Class A, I'm trying to reference class B, and getting this error:</p>
<pre><code>[javac] A.java:11: cannot find symbol
[javac] symbol ... | java | [1] |
269,606 | 269,607 | Calling a class method dynamically | <p><strong>Edit: In real life i don't have a Book class. This is just an example to be clear. Real problem really needs reflection to solve it.</strong></p>
<p>Suppose that I have some classes:</p>
<p>Book, Apple, Door.</p>
<pre><code>class Book
{
...
public decimal getPrice()
{...}
public string getTitl... | c# | [0] |
4,519,935 | 4,519,936 | Select particular word while copying | <p>In this sample app I'm trying to copy the text from the edittext it is working fine ,
Now the thing is that I want to copy a particular word from the edittext how to achieve that</p>
<p>Thanks in advance</p>
<p>My sample app </p>
<pre><code>public void onCreate(Bundle savedInstanceState) {
super.onCreate... | android | [4] |
5,501,632 | 5,501,633 | if else for None in Python | <p>Any way to write this in one line in Python, or even better, as an expression instead of a statement?</p>
<pre><code>parts = ['0', '1', 'None', '5', '4']
[int(p) for p in parts]
</code></pre>
<p>This of course gives an error,</p>
<pre><code>ValueError: invalid literal for int() with base 10: 'None'
</code></pre>
... | python | [7] |
2,594,604 | 2,594,605 | Using non-blocking scripts | <p>The more i use JavaScript the more i try to come up with efficient ways of loading and executing my scripts.
One method i have found to be really useful is loading javascript without blocking. </p>
<pre><code>function include_js(url) {
var script = document.createElement("script");
script.type = "text/java... | javascript | [3] |
1,890,614 | 1,890,615 | Why is char being converted into a ushort instead of an int in this decompilation? | <p>When i write a for loop as below it works fine.</p>
<pre><code>for (Char ch = 'A'; ch < 'Z'; ch++)
{
Console.WriteLine(ch.ToString());
}
</code></pre>
<p>I thought that compiler converts Char type to int but when i looked at the decompiled code, this is what i saw:</p>
<pre><code>for (char i = 65; i < 9... | c# | [0] |
5,955,542 | 5,955,543 | Convert Numbers to Numbers and Letters in PHP | <p>I have the following number 353711000 and I need to convert it to 35371TH in PHP.</p>
<p>How would I go about this?</p>
| php | [2] |
2,605,904 | 2,605,905 | Applying style to particular character in textview | <p>Currently I am using 26 <code>Textview</code> so that I can apply style to particular character depending on runtime situation.
But if I can able to apply style on particular character in textview I can achieve my goal using only one textview.</p>
<p>e.g.
If I want to make character 'M' red in following code. Is it... | android | [4] |
245,113 | 245,114 | Python basics- why aren't the contents of my file printing? | <p>I'm running this from eclipse, the file name I'm working with is ex16_text.txt (yes I type it in correctly. It writes to the file correctly (the input appears), but the "print txt.read()" doesn't seem to do anything (prints a blank line), see the output after the code:</p>
<pre><code>filename = raw_input("What's ... | python | [7] |
1,031,983 | 1,031,984 | how to get data from the UIAddressbook in iphone? | <p>I want to import data frome the iphone address book to my applciation.
Can you give me any reference sample code?</p>
| iphone | [8] |
5,318,730 | 5,318,731 | Android - no connectivity for my App. How to debug? | <p>I have check for internet connectivity that goes like this:</p>
<pre><code>public static boolean isInternetAvailable(Context ctx)
{
NetworkInfo info = ((ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo();
if (info == null || !info.isConnected()) retu... | android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.