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 |
|---|---|---|---|---|---|
803,239 | 803,240 | How to take formatted input from ifstream | <p>I have a text file with a set of names formatted in the following way:</p>
<pre><code>"MARY","PATRICIA","LINDA","BARBARA","ELIZABETH"
</code></pre>
<p>and so on. I want to open the file using <em>ifstream</em> and read the names into a string array (without quotes, commas). I somehow managed to do it by checking t... | c++ | [6] |
1,964,844 | 1,964,845 | Finding account nature of a contact group? | <p>I am developing an application in which it is required to find the nature of a contact group means whether it is google group , phone group or sim group. How to find it.Please suggest me how to do it.
Thanks in advance.</p>
| android | [4] |
5,373,595 | 5,373,596 | Why do I get duplicate define although using require_once()? | <p>My defs.php has a define that I need, and although I used require_once for it, when I try to access defs.php, I get a series of duplicates as if the defs.php was already called before.
On the other hand, if I don't call it, I get undefined <code>use of undefined constant</code>...</p>
<p>Any ideas? </p>
<p>Thanks!... | php | [2] |
1,997,660 | 1,997,661 | webpage not loading javascript script | <p>so, I have this webpage here [ <a href="http://saikonet.org" rel="nofollow">http://saikonet.org</a> ] and it's not loading the tipsy script. If you go into the source, it's on line 11. Now, the strange part is all the other scripts are loading fine, and if you click on the tipsy script link, it's loads fine in brows... | javascript | [3] |
399,354 | 399,355 | The linked program is no longer installed Toast message on click of android market app on HTC-Evo(Sprint) | <p><img src="http://i.stack.imgur.com/GgV3g.png" alt="enter image description here">The linked program is no longer installed Toast message on click of android market app </p>
| android | [4] |
5,909,016 | 5,909,017 | Disabling event handler for link inside UL | <p>I have a LI element to which I have added a "Toggle" event handler</p>
<pre><code>$("#myUL li").toggle {}
</code></pre>
<p>Inside the LI there is an anchor (link) element:</p>
<pre><code><ul id ="myUL">
<li>Click anywhere to initiate toggle handler <a href="/">(Except here)</a></li>
... | jquery | [5] |
5,480,576 | 5,480,577 | absolute addressing - relocations | <p>so I upgrade to Snow Leopard and XCode 3.2.3 / SDK4</p>
<p>now my project won't compile:</p>
<p>ld: absolute addressing (perhaps -mdynamic-no-pic) used in -[MyAppDelegate applicationDidFinishLaunching:] from /Users/ade/Documents/XCodeprojects/MyApp/build/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/armv6/... | iphone | [8] |
3,669,597 | 3,669,598 | simple Jquery animation don't work Works on Jsfiddle | <p>Are going crazy about this now...</p>
<p>I'm trying to get an animation that work on jsFiddle to work local/ftp but nothing happens.</p>
<p>I have include ALL this library's </p>
<pre><code><link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"... | jquery | [5] |
899,860 | 899,861 | How to integrate admobs to android apps? | <p>I have to ingrate admobs to android apps. i have alredy create aaccount on admobs. i dont have any idea about how to get appid, publisherid. How many id want to my apps? how to create it ?</p>
<p>Thanks in advance</p>
| android | [4] |
4,077,766 | 4,077,767 | Map a link with a function | <p>Suppose I have a link and a function as below, how can I map this link with the function?</p>
<p>As a result, user click on the link "remove user" will execute the function "remove_user</p>
<pre><code><a href="xxx">remove all compare items</a>
functio remove_user() {
return mysql_query("DELETE * FROM ... | php | [2] |
2,962,190 | 2,962,191 | how to select the parent field using jquery | <p>my main file is</p>
<pre><code><div id="man">
//some content
<div id="one">
//some content
<div id="two">
//some content
<div id="three">
//some content
<div id="four">
<a title="to delete">delete</a>
<a title="to reset">reset</a>
<a title="to change">chan... | jquery | [5] |
1,348,552 | 1,348,553 | JQUERY string --> variable | <p>In the html, I have a select with some options with values "a", "b", "c"</p>
<p>I retrieve whatever the user chooses using</p>
<pre><code>function getOp(){
return $("select[name = 'choices'] option:selected").val();
}
</code></pre>
<p>Let's say they chose <code>a</code></p>
<p>I have a <code>var x = getOp()... | jquery | [5] |
4,497,819 | 4,497,820 | Is there any way to represent any number as sum of 4 squares? | <p>Is there any way to represent any number as sum of 4 squares.</p>
<p>For example 29 can be represented as 5^2+2^2+0^2+0^2</p>
<p>I tried the following code but some numbers giving 5terms for example 23 as 4^2+2^2+1^2+1^2+1^2</p>
<p>the code i tried is :</p>
<pre><code> x=0;
while(num!=0){
x=(int)Math.... | java | [1] |
1,590,869 | 1,590,870 | Iterable Sum in Java? | <p>Is there a library that does this:</p>
<pre><code>public class Iterables{
private Iterables() {}
public static <T> int sum(Iterable<T> iterable, Func<T, Integer> func) {
int result = 0;
for (T item : iterable)
result += func.run(item);
return result;
... | java | [1] |
3,161,826 | 3,161,827 | Are Python serial write and socket send commands blocking? | <p>I am running an into an issue with my python SocketServer application which seems to be blocking some threads intermittently. I am guessing this could be because of a network outage and somehow the write buffer is overrun and the write is blocked after that.</p>
<p>These are my questions
1) When I do a write on a ... | python | [7] |
4,886,477 | 4,886,478 | Not Able Play an video through VideoView API | <p>I am trying to play <a href="http://110.234.149.86/vedios/sw.mp4" rel="nofollow">this video</a> through VideoView.My code is below.</p>
<pre><code>public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
VideoView vv =(VideoView)findViewById(R.id.videoView... | android | [4] |
2,781,810 | 2,781,811 | Is there a built in function in PHP to compare a variable with many variables in an array? | <pre><code>$numbers = array('1','2','3','4');
$number = '1';
</code></pre>
<p>Is there any way to compare all numbers with a number to see if some of the values is equal to $number?</p>
| php | [2] |
3,046,743 | 3,046,744 | How to Get audio file from the project | <p>i m not getting sound in iphone here is my code</p>
<pre><code>NSString *filepath=[[NSBundle mainBundle]pathForResource:@"horror (2)" ofType:@"mp3" ];
NSLog(@"filepath=%@",filepath);
url=[[NSURL alloc]initFileURLWithPath:filepath ];
NSLog(@"url==%@",url);
audioplayer=[[AVAudioPlayer alloc]initWithContentsOfURL:url ... | iphone | [8] |
1,957,862 | 1,957,863 | How to implement gallery swiping with dots under | <p>How to implement gallery swiping with dots under? I need to show indicator of the current image.</p>
| android | [4] |
5,495,035 | 5,495,036 | Java array of ArrayList - strange goings on? | <p>I've been pulling my hair out with this all day. Probably a newb error of some sort, but I can't get my head around it.</p>
<p>It started out more complicated, but I've simplified it to:</p>
<pre><code>public class Main {
static ArrayList<Selection>[] a = new ArrayList[2];
public static void main(S... | java | [1] |
2,181,523 | 2,181,524 | Visual effects with video recording | <p>Hi
I am looking forward to get some visual effects will recording video but unable to get any help from any where. It would be great if any one now how to do this. I am stuck in this from long time.</p>
<p>Thanks in Advance.</p>
| iphone | [8] |
4,449,392 | 4,449,393 | c# why wont this display to label | <p>I want to be able to display balance to label and my code is not working. This is code I got so far:</p>
<pre><code>SqlDataReader readdata;
{
sqlCommandbalance.Connection.Open();
sqlCommandbalance.Parameters["@accountID"].Value = show.accoundID;
readdata = sqlCommandbalance.ExecuteReader();
string ... | c# | [0] |
2,769,872 | 2,769,873 | charCodeAt to return correct code for custom charcodes | <p>Would this be good way to return correct code for custom charcodes</p>
<pre><code>String.prototype._charCodeAt = String.prototype.charCodeAt;
String.prototype.charCodeAt = function( i , keycodes ) {
if( keycodes !== 'undefined' ) {
for( var j = 0; j < keycodes.length; j++ ) {
if( this[i] ... | javascript | [3] |
5,204,088 | 5,204,089 | Java nested classes- under the hood? | <p>I have a couple of questions relating to nested classes within Java.</p>
<ul>
<li><p>How do nested classes appear "under the hood", with regards to memory allocations?</p></li>
<li><p>You cannot declare a static variable within a nested class (I think the exact error was that static attributes can only be declared ... | java | [1] |
4,393,460 | 4,393,461 | More elegant way to update index into circular list? | <p>I have a list of questions that the user will iterate through, they can start at any question, but they do have a order to them, so in order to do this I just maintain an index into the array and increment it like so:</p>
<pre><code>CurrentQuestion = (++CurrentQuestion < questions.Length) ? CurrentQuestion : 0;
... | c# | [0] |
4,179,231 | 4,179,232 | [PHP]: Error -> Too few arguments in sprintf(); | <p>This line is giving error: "Too few arguments". What is the problem?</p>
<pre><code>$InsertQuery = sprintf("INSERT INTO listing (ldate, places, company, designation, projectdetails, desiredcandidate, hrname, hrcontact, email) VALUES (DATE_FORMAT(%s,'%Y %m %d),%s,%s,%s,%s,%s,%s,%s,%s)", $ldate,$places,$company,$desi... | php | [2] |
2,830,147 | 2,830,148 | Break statement in Python | <p>I am trying to break out of a for loop, but for some reason the following doesn't work as expected:</p>
<pre><code>for out in dbOutPut:
case_id = out['case_id']
string = out['subject']
vectorspace = create_vector_space_model(case_id, string, tfidf_dict)
vectorspace_list.append(vectorspace)
case_... | python | [7] |
488,585 | 488,586 | A good way to release fixtures | <p>Hey, my problem is as follows,
I am trying to create code where a set of sporting fixtures are created with dates on.
Say I have 8 teams, with 7 rounds of fixtures.</p>
<p>I have generated the fixtures, but want to add a date generation on them.
So if i had 7 rounds, I would put 28 days and it would make each roun... | php | [2] |
3,408,308 | 3,408,309 | const error message | <p>hi
what does this error message mean :
error C2662: 'addDoctor' : cannot convert 'this' pointer from 'const class Clinic' to 'class Clinic &'
I'm not using const though</p>
<p>sorry,but this is my first time posting experience</p>
<p>Clinic.h</p>
<pre><code>class Clinic{
public:
Clinic();
int ad... | c++ | [6] |
4,535,020 | 4,535,021 | Converting month name to month number using JavaScript | <p>Is there a a better solution than what I have below to convert a month name to a month number using JavaScript or PHP?</p>
<p>I did like this:</p>
<pre><code>$monNum = date('n',strtotime($staff->curMonth));
</code></pre>
| javascript | [3] |
4,003,407 | 4,003,408 | Cant access global variable in function | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/894990/cant-access-global-variables-inside-a-usort-function">can't access global variables inside a usort function?</a> </p>
</blockquote>
<p>I've experienced this problem more then one time now, and I this ... | php | [2] |
1,756,663 | 1,756,664 | Remove unwanted id for a control when declared in asp:content in ASP.NET | <p>Consider sample piece of code in asp.net which has a master page associated with it</p>
<pre><code><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderA" Runat="Server" >
<asp:TextBox ID="TextBoxB" runat="server" CausesValidation="True" Height="96px" Width="426px" />
</asp:Content&... | asp.net | [9] |
5,685,069 | 5,685,070 | send .doc file as an attachment to mail | <p>i want to send a .doc file as an attachment via email.</p>
<p>i am using the code below:</p>
<pre><code>final Intent emailIntent = new Intent(
android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
emailIntent.putExt... | android | [4] |
3,900,231 | 3,900,232 | android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 5 | <p>plz help me i face this problem</p>
<p>my code is</p>
<pre><code>`final Cursor curr = dbhelper.getdatatomanagedata();
startManagingCursor(curr);
Integer colid = curr.getInt(0);
String colans = curr.getString(1);
objansMap = new HashMap<Integer, String>();
if (curr!=null)
{
curr.moveToFirst();
while(!curr... | android | [4] |
4,437,795 | 4,437,796 | How to unit test an helper function that use HTTPConnection | <p>I have written a <strong>helper function</strong> that can retrieve content from a url. This function can also parse a <code>Map</code> of parameters and feed a url or a body on request depending on <code>GET</code> or <code>POST</code> method. Let's say this function also do other things (change headers, cookies et... | java | [1] |
3,774,926 | 3,774,927 | php newline not working | <p>For some reason i cant get the carriage return to appear on the web page. When i view source code it is fine.<br>
I have tried various iterations of \n but it is kicking my butt.</p>
<pre><code><?php
/* Define string */
$greeting = "Greeting Professor Falken.";
$question1 = "Would you like to play ... | php | [2] |
1,580,312 | 1,580,313 | Problems with my PHP script - newbie fails? | <p>Hey Guys I have a Problem with my PHP Script it doesn't work ...
I don't know why it doesn't work or which skills I have to improove.</p>
<p>I would be thankfull for help</p>
<p>The Code is here : <a href="http://pastebin.com/gkFBEJS0" rel="nofollow">http://pastebin.com/gkFBEJS0</a></p>
<p>Thanks a loot
Chris</p>... | php | [2] |
3,271,178 | 3,271,179 | iPhone audio analysis | <p>I'm looking into developing an iPhone app that will potentially involve a "simple" analysis of audio it is receiving from the standard phone mic. Specifically, I am interested in the highs and lows the mic pics up, and really everything in between is irrelevant to me. <br><br>Is there an app that does this already (... | iphone | [8] |
3,104,409 | 3,104,410 | PHP forcing a specific set of numbers | <p>Im writing a script at the moment which requires the layout to be formatted into <code>3 numbers ( 000 )</code> .... When i return my SQL, the results i get could be '1', could be '100', could be '50' it could be anywhere between 0 and 999 .... How can i always get it to return as a 3 number layout.</p>
<p>For inst... | php | [2] |
4,340,952 | 4,340,953 | Error to remove text from text function in jquery | <p>I want to remove the text. I'm using the following function.</p>
<pre><code> var ta=$('title', item).text();
</code></pre>
<p>The out put of this is "Cases That Charge On-The-Go(video)".
I want to remove the "(video)" from the text. plz let me know ho</p>
| jquery | [5] |
5,582,188 | 5,582,189 | One android app to control another app | <p>I currently have an android app in the market which has a free and pro version of the app. The pro app doesn't provide any functionality it is just an unlock app which enables extra features from within the pro app. </p>
<p>What I want to be able to is to allow the user from the free app to enable SMS messaging tha... | android | [4] |
2,269,502 | 2,269,503 | Detect long press on "virtual" back-key | <p>havent found a solution yet.
I want to detect a long press on the "virtual" back-key, the one you find at the galaxy s2 for example.</p>
<p>I tried to detect the onKeyDown-events (which works) when the user presses the button and the onKeyUp-events when the user leaves the button but the virtual key is firing onKey... | android | [4] |
5,806,258 | 5,806,259 | run JavaScript without UIWebView | <p>is it possible to run JavaScript in objective-c without using UIWebView ? i ask for this because i need to get the part of html data created by JavaScript when the web page loaded .the html source look like this </p>
<pre><code><table dir = "rtl .......">
<tbody>
<script src = "get.aspx?type=js&f... | iphone | [8] |
1,177,598 | 1,177,599 | Why does Java Compiler refuse to compile this? | <p>Why does Java Compiler raise "The local variable s may not have been initialized" in the finally block. I can not figure out in which flow of code, <strong>s</strong> remains un-initialized.</p>
<pre><code> public static void test() {
String s;
try {
s = "abc";
} catch (Throwable e) {
s ... | java | [1] |
5,437,030 | 5,437,031 | future in iphone development? | <p>i have done btech,nw i am searching job but one big question arise me in front of me several times that as a <strong>iphone developer</strong> i can survive or not ? i learned nowdays iphone development but my seniors said to me after learn iphone development you become miniority developer why dont you start from ja... | iphone | [8] |
2,893,359 | 2,893,360 | How to append string representation of a specified object to a instance | <p>I have a code like this:</p>
<pre><code>StringBuilder systemCondition = new StringBuilder();
systemCondition.Append("^(");
systemCondition.Append(Regex.Escape(this.Class));
systemCondition.Append(" : ");
systemCondition.Append(Regex.Escape(this.Instance));
systemCondition.Append(")$");
m_afc.QualifiedInstanceFilter... | c# | [0] |
2,085,511 | 2,085,512 | Getting correspoding enum key for the value passed | <pre><code>var StateValue = {
Unknown: 0,
AL: 1,
AK: 2,
AZ: 3,
AR: 4,
CA: 5,
CO: 6,
CT: 7,
DE: 8,
},
</code></pre>
<p>Now if i pass 8 i need the value DE to be printed. How can i do this. </p>
| javascript | [3] |
2,425,377 | 2,425,378 | lat long android GPS location on screen android | <p>Latitud , Longitud in the gps in a string so i will be able to send each change position to my python server with my new location using the open socket !! so any help to save this latitud and longitud !! here is my code</p>
<pre><code>package letget.h;
import android.app.Activity;
import android.content.Context;
i... | android | [4] |
4,344,941 | 4,344,942 | How To Put Data At Run Time In a Table i.e Table Also Create At The Run Time? | <p>i am trying to put data as a summery in my application from data table in a label but i want to put data in a table inspite of label such that table also create a t run time wile my code is putting data ina label at run time .. .</p>
<pre><code> for (int m = 0; m < dtGroupedByDate.Rows.Count; m++)
{
Label... | c# | [0] |
5,515,308 | 5,515,309 | how to hide other application from my application from list of apps android | <p>Could anybody please help me find a way to hide other application from my application. I'm retrieving a list of apps installed with check boxes and when I check some apps, those should be hidden from the application list in emulator. I've searched in google but I couldn't find it. I am waiting for help....
Thanks, <... | android | [4] |
1,339,422 | 1,339,423 | How to get the values of a dynamic textbox | <p>I have added some dynamic textboxes upon a button click. I need the values in the click event of another button click. How can I achieve that?</p>
| asp.net | [9] |
1,859,392 | 1,859,393 | g++ cannot find the correct copy constructor when doing copy initialization | <p>With the following code:</p>
<pre><code>class B{};
class A{
public:
A(B& b);
A(const A& a);
};
A::A(B& b){
}
A::A(A& a){
}
int main(){
B b;
A a = b;
}
</code></pre>
<p>no matching function call to 'A::A(A)'</p>
<p>I looked up some references, and thought it might caused by the R... | c++ | [6] |
1,362,377 | 1,362,378 | How to use the -> in PHP | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1234196/what-does-this-php-construct-mean-html-redirecturl">What does this php construct mean: $html->redirect(“URL”)?</a> </p>
</blockquote>
<p>Hi, I've been looking for what this operator "->" d... | php | [2] |
541,170 | 541,171 | Delegate definition in C# | <p>Assuming I have the following delegate:</p>
<pre><code>public delegate int TestD(int p);
</code></pre>
<p>Is there any difference between</p>
<pre><code>TestD del = MyMethod;
</code></pre>
<p>and </p>
<pre><code>TestD del = new TestD(MyMethod);
</code></pre>
| c# | [0] |
252,745 | 252,746 | jquery autocomplete() is not working | <pre><code><link rel="stylesheet" type="text/css" href="jquery-ui-1.8.2.custom.css" />
<script src="jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
<body>
Search: <input id="example" />
</b... | jquery | [5] |
2,941,750 | 2,941,751 | which version of the code below is right? | <p>Hi I found this function in a utilities code file:</p>
<p><strong>Version 1:</strong></p>
<pre><code>public static bool IsValidLong(string strLong)
{
bool result = true;
try
{
long tmp = long.Parse(strLong);
}
catch (Exception ex)
{
result = false;
}
return result;
}... | c# | [0] |
1,991,091 | 1,991,092 | changing a link url with javascript | <p>This is a javascript menu for a website I'm updating. I want to add a dynamic link (id=IT-LINK) to link to the Italian version of the site. But the URL needs to change depending on which page the viewer is on. Can someone please tell me how to do it!? I'm very new to javascript and am learning by myself. Thanks, Cat... | javascript | [3] |
3,347,972 | 3,347,973 | Python pyodbc settings | <p>I am looking at a system that is using PyODBC and FreeTDS with a connection similar to the following:</p>
<pre><code>cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=srv;DATABASE=dbtable;UID=uid;PWD=pwd')
</code></pre>
<p>I was wondering if after this connection is made, if it is possible to view the settings tha... | python | [7] |
3,925,832 | 3,925,833 | bind and live not working | <p>(the input value is filled with 'a' 'links' but after the links are generated (inside another div ) thei do no act on hover)
i have this:</p>
<pre><code><a href="#">This works</a><br><br>
<input class="input" type="text" style="width:400px;" value=" <a href='#'>This works...NOT<... | jquery | [5] |
2,204,326 | 2,204,327 | caesar cipher Simple Encryption code in python | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1538935/caesars-cipher-using-python-could-use-a-little-help">Caesar's Cipher using python, could use a little help</a> </p>
</blockquote>
<pre><code>def affine (a, b):
for i in range(26):
print c... | python | [7] |
4,121,393 | 4,121,394 | jQuery show element one time on multiple clicks | <p>The link below calls the DeleteUser function and displays the message below. When the link is clicked again, the message repeats, and continues to do so each time the link is clicked. Is there a way to stop this behavior? I have tried to hide the link after it is clicked once, but the element remains, so when anothe... | jquery | [5] |
4,718,926 | 4,718,927 | When using Pick_Contact, after i choose a Contact it open ups Android Market | <p>help please</p>
<p>here is my code on onClick</p>
<pre><code> if(v.getId()==R.id.btnContacts)
{
Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);
startActivityForResult(intent, PICK_CONTACT);
}
</code></pre>
<p>here is my code on onActivityRe... | android | [4] |
1,831,267 | 1,831,268 | How to change string to date in Java | <p>i need to to convert an string to date format in java i have an string that i get from torrent file </p>
<pre><code>the string is like 1278622088
</code></pre>
| java | [1] |
5,396,090 | 5,396,091 | Import Python file from within executing script | <p>I am attempting to import a python file(called test.py that resides in the parent directory) from within the currently executing python file(I'll call it a.py). All my directories involved have a file in it called init.py(with 2 underscores each side of init)</p>
<p><strong>My Problem:</strong> When I attempt to im... | python | [7] |
4,618,607 | 4,618,608 | Need help with returning a 2D array C++, please | <p>I'm trying to create an array and pass it to functions, which then return it, but I don't know the correct way of returning.
I've been looking around tutorials and trying stuff out, but haven't managed to solve this.
I'm new to C++ and thought it would be similar to Java, but apparently it isn't.</p>
<p>This is whe... | c++ | [6] |
3,100,978 | 3,100,979 | Array operations? | <p>I want to know if there is something similar to (input==(letters[i]-'c')) that i can use. I know what i type doesn't make sense but i'm trying to create something similar to that. If the user's input is anything in the array but c, then it displays the first message, else if it is c, then it displays the second mess... | java | [1] |
3,642,216 | 3,642,217 | how can i make php alert pop ups just like in javascript | <p>i need a pop up window which asks me before proceeding to next like <strong>alert</strong> in <strong>javascript</strong>.</p>
<p>Is any built in facility in PHP like that.</p>
| php | [2] |
2,539,699 | 2,539,700 | How to make a web browser bot? | <p>I have searched this site and other sites for an answer that would help me but I just can't get the codes I come across to work for me.</p>
<p>First let me explain how my program works and where I am at with it, then let me explain what I am trying to do but can't get it to work.</p>
<p>1st: I have Form1 as a logi... | c# | [0] |
1,243,147 | 1,243,148 | Does the code below use command pattern | <p>I have a very basic question about the command pattern. Supose, I have an interface like</p>
<pre><code>public interface Task {
public void execute();
}
</code></pre>
<p>and some class implementing the interface Task</p>
<pre><code>class SomeClass implements Task {
public void execute() {
//do some... | java | [1] |
3,860,791 | 3,860,792 | Removing windows close button in jQuery dialog | <p>I want to remove the window close button provided by jQuery.</p>
<pre><code>$(function () {
$('form').submit(function () {
$("#popUp").dialog({
modal: true,
minWidth: 700
});
$('div').close({ onload: function () {
$('#popUp').remove();
... | jquery | [5] |
241,971 | 241,972 | Turning an integer into random string and back again | <p>what I'm wanting is to convert an integer into a string. For example, 123456789 may become 8GFsah93r ... you know like Youtube, Pastebin and what not. I then want to convert it back.</p>
<p>I'm working with large integers, for example: 131569877435989900</p>
<p>Take a look at this link: <a href="http://codepad.vip... | php | [2] |
1,723,613 | 1,723,614 | event.preventDefault(); when trigger is parent div not link? | <p>I have a div as a trigger for some jQuery. The div contains a link. Sometimes clicking the div will also mean clicking the link and I need to stop the link's behaviour. </p>
<p>I believe this can be done with event.preventDefault(); but the following doesn't work in IE8. Im assuming this is because the trigger is a... | jquery | [5] |
3,283,875 | 3,283,876 | Send song title to spotify to start playing from android app | <p>Is there any way to send a song title to the spotify app from my app so that it will start playing the song through spotify?</p>
<p>I tried using the bellow code i found in another code but nothing happens.</p>
<pre><code>Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setAction(MediaStore.I... | android | [4] |
1,687,701 | 1,687,702 | How to get multiple list of tabs on clicking a tab? | <p>I am trying to implement the application that shows tabactivity of five tabs like <code>Tab 1</code>, <code>Tab 2</code>,<code>More</code>,<code>Tab 3</code>,<code>Tab 4</code>, likewise.</p>
<p>By clicking on the <code>More</code> tab it should display me list of remaining tabs above the <code>More</code> tab. I'm... | android | [4] |
308,943 | 308,944 | Label text not updated | <p>I have a Windows Form with a status bar which shows the current state of application.
I have a class named AppState with update the Label in the status bar and in dispose it changes the state back to "Ready".</p>
<p>In code when I do an operation like:</p>
<pre><code>using (AppState state = new AppState("Processin... | c# | [0] |
2,933,167 | 2,933,168 | British Date Formatting in PHP | <pre><code><?php
$firstdate = '2011-11-16';
$sample = date("d-m-Y", strtotime($firstdate));
echo $sample;
?>
</code></pre>
<p>I have a column in a table with date in this format 2011-11-16
But I need it in reverse, so I've used the following code.</p>
<p>The problem is that when the date is 0000-00-00, it pri... | php | [2] |
153,431 | 153,432 | Writing a login screen like default android pattern lock | <p>I want to write a login screen for my new app like android's default pattern lock. Is there a way to do this? Is there any library to help doing this?</p>
<p>Thanks in advance.</p>
| android | [4] |
2,887,739 | 2,887,740 | real time output in php | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/5763796/how-to-make-for-loop-real-time-in-php">How to make For Loop Real Time in PHP</a> </p>
</blockquote>
<p>I think when we run php script,web server wait until end of script and after that will return output... | php | [2] |
318,429 | 318,430 | Deprecated methods in java | <p>If a method is deprecated in Java there will be a another best way to have same functionality, right?</p>
<pre><code>Date date = new Date();
date.getHours()
</code></pre>
<p>If <code>getHours()</code> is deprecated then what is the best way to get date using only the Date class?</p>
| java | [1] |
4,070,069 | 4,070,070 | else if in Python 2.7 | <p>The purpose of this code isn't important,but I'm getting an indentation error. They are usually really obvious fixes, but in this case I don't see why the error comes up.</p>
<pre><code>group=0
for i in range(0,len(line)):
for j in range(0,len(both)):
if both[j]==line[i]:
elif both[j]==line[i]-1... | python | [7] |
2,957,347 | 2,957,348 | deleting memory allocated in static function in C++ | <p>I have C++ class as follows</p>
<pre><code>class anotherClass;
class myClass {
private:
myClass() {}
~myClass() {}
typedef std::map<string, anotherClass* > stringToClass;
static stringToClass s_stringToClass;
public:
static anotherClass* getStringToclass(string name);
}... | c++ | [6] |
825,814 | 825,815 | JavaScript: How can i set a variable in a string | <p>I would like to set attributes on all elements that id starts with "id-" followed by a number [e.g. id="id-0", id="id-1) and so on]. I thought about something like this:</p>
<pre><code><script type="text/javascript" >
function Prepare() {
var = 0
while(document.getElementById("id-{var}")) {
d... | javascript | [3] |
914,684 | 914,685 | How to do a mail merge from a SP List to a word doc? | <p>Is there a simple way to do this? Basically I would have a list that contains a bunch of customer information and I would like to merge each list item to a specific word doc and insert each document into a library.</p>
<p>I've found a few things online but they seem unnecessarily complex...</p>
| asp.net | [9] |
4,258,015 | 4,258,016 | How to get authentication to access google services with android? | <p>In my application I am interfacing with google services such as calendar and documents. For testing I have just been providing a user name and password to access services as follows...</p>
<pre><code>myService.setUserCredentials(username,password);
</code></pre>
<p>This method, at least how I'm implementing it, r... | android | [4] |
846,459 | 846,460 | Javascript replace with part of match? | <p>I'm looking over <code>replace()</code> examples and I'm not exactly sure the best way to do this:</p>
<p>Say I have a string something like </p>
<pre><code>{G}{J}{L}...
</code></pre>
<p>What's the best way to use <code>string.replace()</code> to change the inner and outer brackets but leave the letter inside the... | javascript | [3] |
167,542 | 167,543 | What's the difference of different location of "using statement"? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/125319/should-usings-be-inside-or-outside-the-namespace">Should Usings be inside or outside the namespace</a> </p>
</blockquote>
<p>Hi, friends,</p>
<p>What's the difference between the following 2 code snippet... | c# | [0] |
2,476,577 | 2,476,578 | I want to compare two time values in the format of HR:MIN:SEC. of the type string in c#? | <p>Following is a code that a did in comparison between dates. Is it possible to use that code for strings also. OR Is there any sol?</p>
<pre><code> protected void Button1_Click(object sender, EventArgs e)
{
int uid = Convert.ToInt32(dlFaculty.SelectedValue);
string starttime = ... | c# | [0] |
683,566 | 683,567 | How to make a clickable link based on users login details | <p>I have created a login system (with help from people on this site) that redirects a logged in user to several pages that only they have access to based on their login information. When navigating the site they will also have access to other pages that all logged in users have access to.</p>
<p>This information is i... | php | [2] |
3,534,936 | 3,534,937 | Use jQuery to match current URL to herf in a UL and add class if matched | <p>I have a dynamically created UL. I want to use jQuery to use the current URL, search through a specified UL and find any li with a matching href. If one is found then add the class "current_page".</p>
<p>I came up with this but it doesn't seem to do the trick.</p>
<pre><code>$(document).ready(function() {
$(... | jquery | [5] |
6,027,539 | 6,027,540 | Application crashes when user presses Back Button | <p>Good day all, First of all, maybe i went about this the wrong way in the first place. Situation is, i have a listview that when an item is clicked, it creates an intent and calls startActivityForResult() to another activity, to be able to edit the entries in the row. and that other activity after editing the require... | android | [4] |
5,106,291 | 5,106,292 | Use `object` to instantiate custom class | <p>here is my haha class</p>
<pre><code>class haha(object):
def theprint(self):
print "i am here"
>>> haha().theprint()
i am here
>>> haha(object).theprint()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: object.__new__() takes no parameters
... | python | [7] |
4,718,916 | 4,718,917 | Preference UI Components without PrefernceActivity | <p>Is there a way to use the ui Components from the preference package without a PreferenceActivity?</p>
<p>I have to build a lot of settingsviews, and i cant use sharedprefernces.</p>
<p>Do i Have to build this all by hand?</p>
<p>Vino</p>
| android | [4] |
4,218,015 | 4,218,016 | exit(); die(); return false; | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1795025/what-are-the-differences-in-die-and-exit-in-php">what are the differences in die() and exit() in PHP?</a> </p>
</blockquote>
<p>I guess the main question is what is the difference between the 3 exactly?<... | php | [2] |
5,477,353 | 5,477,354 | Android AutoCompleteTextView | <p>When I type <code>a</code> on EditText, I want to let <code>add</code>、<code>acer</code>、...show in the drop down menu. I know it can complete with <strong>AutoCompleteTextView</strong>. But I want it also show <code>bat</code>、<code>cat</code>..., the string <code>a</code> is in a word, not in the front.</p>
| android | [4] |
4,198,752 | 4,198,753 | How to shrink a text output in python | <p>Hi
I have a program in python which upon running displays an output on a single page. But when I print the output to an A4 size page the output does not fit on to a page, and gets distorted. Is there a way I could shrink my output or adjust the font size of my output, and print it on to a single page?</p>
| python | [7] |
2,419,430 | 2,419,431 | Jquery compatability issue 1.4 - 1.6 | <p>Im running two scripts, one that only works using jQuery 1.4 and another that needs 1.6 to work correctly. I'm sure there is some obvious (to someone who knows) synatx change or something in between the versions but I cannot figure it out.</p>
<p>This is the 1.4 script: <a href="http://demo.marcofolio.net/slot_mac... | jquery | [5] |
4,743,434 | 4,743,435 | Cannot get Jquery .ajax or .load to execute scripts | <p>Here's test.html :</p>
<pre><code><html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<script language=javascript>
$(document).ready(function() {
$("button").click( function... | jquery | [5] |
1,361,409 | 1,361,410 | What does this -> ~T() do? | <p>Can anyone explain what this code extract is doing? My first guess was that <code>d()</code> calls the destructor of itself but then I wondered why you couldn't just call the destructor of <code>T</code> yourself.</p>
<pre><code>class T
{
void d()
{
this -> ~T();
}
}
</code></pre>
<p>Thank y... | c++ | [6] |
1,115,053 | 1,115,054 | Learning python though short tasks and coding competions | <p>I recall seeing a website about learning python that consisted of small tasks with interactive examples and a score board where you could rank.</p>
<p>What was it?</p>
<p>There was also a javascript section. </p>
| python | [7] |
3,628,449 | 3,628,450 | Chat Server - client/server chat Java homework | <p>My chat room program. I have 2 packages, 1 for Client & other for Server. Run Server program, fill the PortField and click button Start Server, window program is stuck, i cant do anything on it, but Server still work, Clients still connect and chat.</p>
<pre><code>private void btnOpenActionPerformed(java.awt.ev... | java | [1] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.