Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
5,493,308 | 5,493,309 | Trouble using onPause() method | <p>I have an activity.. when it is calls <code>onPause()</code> it starts a new activity.. Problem is when I lock screen of my phone..It calls the <code>onPause</code> which cause it to go back to the main activity but I want to stay in that activity.. Is there a way to fix this ?</p>
<p>This is the code snippet if it... | android | [4] |
1,909,193 | 1,909,194 | Using regex to avoid if elifs | <p>I'm new to Python, which I'm using to do an ugly little put-this-tabular-data-into-a-db conversion. The program looks at the data, creates a table in MySQL, and then reads the data into the table. In this section, header row text is checked to make some decision about data typing. I had an idea that I could be cleve... | python | [7] |
2,405,090 | 2,405,091 | Android Frame Animation | <p>I would like to know if it is possible to remove one of the frames I added using addFrame in Android?</p>
<p>Thanks</p>
<p>Kelvin</p>
| android | [4] |
5,117,228 | 5,117,229 | Proper reuse of ContactHeaderWidget | <p>I am trying to reuse the header layout for contact details display view.</p>
<p>I was able to add the widget of ContactHeaderWidget to my XML file as it is in this <a href="http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;a=blob;f=res/layout-finger/contact_card_layout.xml;h=6e7056134a5167e7b7cf4... | android | [4] |
561,127 | 561,128 | Why is this method "undefined" in Firefox once the page has loaded? | <pre><code>"use strict";
Math.isNumber = function(number) {
return (number >= 0 || number < 0);
};
</code></pre>
<p>I have placed the above in a clean HTML file within <code><script></code> tags within the <code><head></code>. Before the page has fully loaded, I can use <code>alert(Math.isNumber(... | javascript | [3] |
812,073 | 812,074 | Random card generation | <p>I need to randomly generate three cards from array i have the array of 52 cards names from card1 to card52</p>
<pre><code>String rank[]=new String[52];
for(int i=0;i<rank.length;i++)
{
rank[i]= "card"+i;
}
</code></pre>
<p>Now i need to select three cards from the array and it should not be repetable.</p>
<p>c... | java | [1] |
4,690,362 | 4,690,363 | Python: Get relative path from comparing two absolute paths | <p>Say, I have two absolute paths. I need to check if the location referring to by one of the paths is a descendant of the other. If true, I need to find out the relative path of the descendant from the ancestor. What's a good way to implement this in Python? Any library that I can benefit from? Thanks.</p>
| python | [7] |
3,433,667 | 3,433,668 | Message sent using invalid number of digits. Please resend using 10 digit number or valid short code android 9230 in android | <p>I am creating application in which we reply to sender of the text message automatically from our android device. I had check that number has only digits not letters for validation but some times while sending message it gives me error as:</p>
<p>Message sent using invalid number of digits. Please resend using 10 di... | android | [4] |
2,803,577 | 2,803,578 | Create a function and assign its return to a variable | <p>Is there a one line way of doing this? Eg: </p>
<pre><code>var myVare = function(params){
if(param.condition){
return 'a';
}else{
return 'b';
}
}(param:{condition:'abc'});
console.log(myVare);//I would like it to be == to 'a'
</code></pre>
| javascript | [3] |
467,115 | 467,116 | Delete Remote file With @get_file_contents - PHP | <p>I have been trying to delete images from a remote server. I don't want to use a direct link because the server changes depending on the location of the file. I have code like this.</p>
<pre><code>$photo["server"] = "http://img1.myserver.com";
$call = @file_get_contents( $photo["server"]."/delete.php?pho_id=".$pho_i... | php | [2] |
4,245,123 | 4,245,124 | Is there any reason to use this-> | <p>I programmed in C++ for many years and I still have doubt about one thing. In many places in other people code I see something like:</p>
<pre><code>void Classx::memberfunction()
{
this->doSomething();
}
</code></pre>
<p>If I need to import/use that code, I simply remove the <strong>this-></strong> part, and... | c++ | [6] |
1,527,265 | 1,527,266 | thumbs.db messing up my upload routine | <p>I'm getting the following error while uploading a zip archive.</p>
<pre><code>Warning: ZipArchive::extractTo(C:\xampplite\htdocs\testsite/wp-content/themes/mytheme//styles\mytheme/Thumbs.db) [ziparchive.extractto]: failed to open stream: Permission denied in C:\xampplite\htdocs\testsite\wp-content\themes\mythem\upl... | php | [2] |
5,465,828 | 5,465,829 | Can't convert Javascript array to object properly | <p>I have been struggling with this problem the entire day. I feel like it's super solvable, and I'm not sure where I'm going wrong. Each time I go to post this, I feel like I come up with a different solution that doesn't end up working.</p>
<p>I'm looking to do the following:</p>
<pre><code>var someObj = {};
// @p... | javascript | [3] |
2,781,792 | 2,781,793 | Use jquery to display div based on form value selected | <p>I want to display a div if a certain radio button in a form is selected, but hide that div if any other radio button in the form is selected, using jquery.</p>
<p>This is the code I have that isn't working:</p>
<pre><code>$("select").change(function(){
if($("#radio1").is(":selected")){
$("#grid_9 omega").slide... | jquery | [5] |
812,490 | 812,491 | What are the wise and allowed ways to add advertisement to iPhone App? | <p>I will be publishing an App in a few days. Initially I don't want to add advertisements, but can change my mind anytime, so I've thought this. Add a WebView to application and set its image to a dynamic web content. If no ads; I will display a simple logo, but when ads are available, replace the content with them. S... | iphone | [8] |
871,293 | 871,294 | How to reboot android device | <p>How to shutdown and restart android device in my application.
please give me a suggestion if is possible or not.
I search a lot but no code work for me.</p>
| android | [4] |
2,473,151 | 2,473,152 | javascript odd syntax: c.name=i+ +new Date; | <p>colorbox v1.3.15 from colorpowered.com has this javascript in it's minified code:</p>
<pre><code>c.name=i+ +new Date;
</code></pre>
<p>this seems to run perfectly, should it?</p>
| javascript | [3] |
4,022,023 | 4,022,024 | Does checking against null for 'success' count as "Double use of variables"? | <p>I have read that a variable should never do more than one thing. Overloading a variable to do more than one thing is bad. </p>
<p>Because of that I end up writing code like this: (With the <code>customerFound</code> variable)</p>
<pre><code>bool customerFound = false;
Customer foundCustomer = null;
if (currentC... | c# | [0] |
3,616,104 | 3,616,105 | query error on content provider user dictionary | <pre><code> String[] mProjection =
{
// UserDictionary.Words._ID, // Contract class constant for the _ID column name
UserDictionary.Words.WORD, // Contract class constant for the word column name
UserDictionary.Words.LOCALE // Contract class constant for the locale column name
};
searchvalue ... | android | [4] |
262,209 | 262,210 | how to change php encoding in database? | <p>I have got mysql database in utf8_general_ci and php page with utf-8 charset.
Why in php page i have got some text with bad encoding (which takes from data)?
<a href="http://likebox.ru/fbtn/" rel="nofollow">http://likebox.ru/fbtn/</a></p>
| php | [2] |
5,398,199 | 5,398,200 | Which is the best way to fetch/retrieve data from server in android? Is it Xml or Json | <p>I am trying to upload & retrieve data with the server.</p>
<p>Which is the best way to retrieve data using xml or json ?</p>
<p>Thank you</p>
| android | [4] |
2,903,823 | 2,903,824 | Event bubbling or failed bubbling on click event in javascript | <p>My basic issue is that I have a click event that i have attach to my container, i am trying to delgate that click event just to the buttons in that container. All of that is easy, the issue i have is the event.target in webkit is hitting the spans in the button instead of the button its self. How do i stop the click... | javascript | [3] |
5,941,505 | 5,941,506 | Use different name in asp:hiddenfield | <p>I have a for which is built within an ASP.net usercontrol. This form is then used within a CMS as part of integration with a merchant gateway. The gateway requires that a number of hiddenfields be passed in which is fine in the main however one of these needs to be called Profile. The CMS I am using also defines ... | asp.net | [9] |
5,638,910 | 5,638,911 | In case of an Atomic classes, how does Java manage the call by value? | <p>I am currently working on atomic classes and I am unable to track whether it is "call by value" or "call by reference". I understand that Java does not allow call by reference and that it is only and only call by value. But in case of atomic classes, it seems to be call by reference. Can you share your thoughts with... | java | [1] |
4,826,113 | 4,826,114 | C++, please explain Classes to a Python user? | <p>I'm trying to learn C++, Thanks to this article I find many similarity between C++ and Python and Javascript: <a href="http://www.cse.msu.edu/~cse231/python2Cpp.html" rel="nofollow">http://www.cse.msu.edu/~cse231/python2Cpp.html</a></p>
<p>But I can't understand C++ Classes at all, they looks like Javascript protot... | c++ | [6] |
2,473,480 | 2,473,481 | AlarmManager and WakeLock example | <p>I try this wakefull example:https://github.com/commonsguy/cw-omnibus/tree/master/AlarmManager/Wakeful</p>
<p>but I have few questions.</p>
<p>Do I need <code><action android:name="android.intent.action.BOOT_COMPLETED" /></code>? becouse intent is always null as I tested.</p>
<p>And inScheduledService is exa... | android | [4] |
5,084,384 | 5,084,385 | set datasource for combobox | <p>how to set datasoure of combobox by jquery</p>
<p><code>data={"a","b","c","d"}</code>. and <code>ComboBox.datasource=data;</code>==>by jquery</p>
| jquery | [5] |
4,418,518 | 4,418,519 | SensorEvent.timestamp to absolute (utc) timestamp? | <p>I question myself what the timestamp in SensorEvent.timestamp means. Numbers like 3548712982000 occur. It is not plausible for anything: nanoseconds/milliseconds since 1970 etc. Is this maybe some overflow error? It seems as it is different on different devices at the same time!!!</p>
| android | [4] |
2,400,093 | 2,400,094 | Writing 4 arguments with the write function to a file | <p>I would like to write this to a file <code>f.write("add unit at-wc 0 0 0 %s" % x ,y, z, "0.000 0.000 0.000 ")</code> but when I do that I get an error saying <code>function takes exactly 1 argument (4 given).</code></p>
| python | [7] |
4,568,070 | 4,568,071 | Deep text file processing | <p>When dealing with text files in java, is there any way to achieve this results:</p>
<p>Assuming that my text file contains the data below(User number, first name, last name, username, user type)</p>
<pre><code>Num010101 James Jackson JJ123 Normal_User
</code></pre>
<p>Now I have another file that contains... | java | [1] |
2,865,047 | 2,865,048 | capturing jquery Radiobutton list selected values | <p>I am trying to get value of selected item using JQuery in a radio button list. I have 2 radio button lists and I am getting value from 1st radio button list with out any issues. But When I select 2nd dropdown, It shows the same first dropdown result in alert.</p>
<p>Please suggest </p>
<pre><code> $("#<%=RBLTe... | jquery | [5] |
124,550 | 124,551 | How to create named lock in java? | <p><strong> We can achive it in c# as follows- </strong></p>
<pre>
void readFile(File file)
{
Mutex mutexForFile = null;
bool mutexCreateFlag; // Return true/false based on whether mutext is already exist or it is created as part of current call
mutexForFile = new Mutex(false, fi... | java | [1] |
4,426,077 | 4,426,078 | php script to generate checksum from md5 | <p>In order to calculate the checksum i need following things. these parameters are concatenated in a constant (no spaces) string made up of the values of the following parameters in the exact order listed below:
o Secret Key
o Merchant id
o Currency
o Total amount
o Item list (item_name_1, Item_amount_1, item_quantit... | php | [2] |
655,176 | 655,177 | JavaScript API | JS API | <p>If you want to search the library API of the following, you go to their respective links:</p>
<p><a href="http://api.jquery.com/" rel="nofollow">Jquery</a></p>
<p><a href="http://nodejs.org/docs/latest/api/" rel="nofollow">nodejs</a></p>
<p><a href="http://dev.mysql.com/doc/refman/5.0/en/c.html" rel="nofollow">my... | javascript | [3] |
4,255,340 | 4,255,341 | Global Class to access Variables | <p>We like to have a global instance of a class and would like to access across the application (in different forms etc)</p>
<p>What are the different possiblities? (other than static class).</p>
| c# | [0] |
3,658,813 | 3,658,814 | Why? about PHP array and php foreach loop | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2645499/why-does-php-overwrite-values-when-i-iterate-through-this-array-twice-by-referen">Why does PHP overwrite values when I iterate through this array twice (by reference, by value)</a> </p>
</blockquote>
<pr... | php | [2] |
2,001,544 | 2,001,545 | Microsoft Expression SDK | <p>I'm converting mp3 to wma with expression encoder sdk 4 with the code below</p>
<p>A wma file is produced but it is missing the thumbnail / image / cover from the mp3 file.</p>
<pre><code>using (var job = new Job())
{
var mediaItem = new MediaItem(input.FullName)
{
OutputFileName =... | c# | [0] |
3,595,471 | 3,595,472 | How to extract the text from PDF document | <p>I have one pdf document which has links. I need to get link title.</p>
<p>Please help me to solve this issue.</p>
<p>Thanks in advance.</p>
<p>Sow</p>
| c# | [0] |
3,760,052 | 3,760,053 | converting decimal to int in c# | <p>why percentage returns 0 when rate = 0.085 for example ?</p>
<pre><code>int percentage = (int)rate*100;
</code></pre>
| c# | [0] |
5,010,733 | 5,010,734 | Argument exception for Image.FromStream | <p>So I have a byte array "sorted" that holds grayscale values and is 14080 bytes long. I'm trying to render this as an image so I thought it would be a good idea to try to convert it to an image object and then use the save function for images to save the image to a path on my computer. However, every time I run it I ... | c# | [0] |
2,204,762 | 2,204,763 | How to change programmatically a global setting like 'haptic feedback'? | <p>How can I change programmatically a global setting like 'haptic feedback'?<br>
(Manually you can change this setting in 'Sound & Display Settings')</p>
<p>Changing e.g. the airplane mode can be done with the following code:</p>
<pre><code>private void setAirplaneMode(boolean bOn)
{
Settings.System.putInt(g... | android | [4] |
4,771,106 | 4,771,107 | selecting a select list in jquery | <p>There has to be something really simple that I am overlooking, but for some reason I cannot find any information about this and it keeps coming up so..</p>
<p>I am trying to select a select element in jquery. Right now I don't care about it's options, I just want the select element. If I have the following element:... | jquery | [5] |
4,440,162 | 4,440,163 | jQuery adding a function to a link question | <p>I have a dynamically created table which in the last <code><td></code> there is a hidden <code><div></code> which is shown when the user hovers over a link in the <code><td></code>. That all works fine but there are several links in the div that I want to fire a function based on the id of the link... | jquery | [5] |
4,011,653 | 4,011,654 | append url with a session id jquery | <p>I have a static session ID i'm using and need to add it to a url when clicked, but can't seem to get it right. If you go to <a href="http://www.mysite.com/test.php" rel="nofollow">http://www.mysite.com/test.php</a> you get redirected, the session id XYX needs to be added, so the correct url to hit the page would be ... | jquery | [5] |
6,010,363 | 6,010,364 | Check if Activity is running from Service | <p>How can a Service check if one of it's application's Activity is running in foreground?</p>
| android | [4] |
1,059,952 | 1,059,953 | reading specific line in a text file | <p>I have a text file that I am reading from it and writing to it using c++.
the file is like a table that has 4 fields: id,title,year,price. something like this:</p>
<p>1;c++ how to program;1990;50$</p>
<p>2;java how to program;1996;70$</p>
<p>the id is entered at the console, and then I have to search for this id ... | c++ | [6] |
3,461,650 | 3,461,651 | Spacing Between String and Hiding String | <p>I have tried everything now what i need to do is place a space between a $results</p>
<pre><code> echo "<p><h3>".$results['cname'].$results['csurname']."</h3>" .$results['msisdn']."</p>"
</code></pre>
<p>Betweeb cname and csurnname I need a spacing, Also i need to hide the msisdn not to dis... | php | [2] |
2,201,957 | 2,201,958 | Android app signing mechanism | <p>To prevent frauds I have to verify server side, that application connecting to my server is not a fake. I was wondering If I can use built in android signing mechanism? Maybe there is some kind of <em>unique</em> (different for each device) magic number that I can verify on each request?</p>
<p>Thank you for any s... | android | [4] |
2,654,221 | 2,654,222 | Hiding elements with javascript | <p>On button click, I want to hide the div. How do i do it?</p>
<pre><code><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html... | javascript | [3] |
1,566,211 | 1,566,212 | C++ -- Which one is supposed to use "new Car" or "new Car()"? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/620137/do-the-parentheses-after-the-type-name-make-a-difference-with-new">Do the parentheses after the type name make a difference with new?</a> </p>
</blockquote>
<p>Hello all,</p>
<pre><code>class Car
{
publi... | c++ | [6] |
3,335,337 | 3,335,338 | Can a class instantiate another class? (PHP) | <p>I tried this and I get an error when I try to instantiate class "first" inside of class "second".</p>
<p>The commented sections inside of class "second" cause errors.</p>
<pre><code>class first {
public $a;
function __construct() {
$this->a = 'a';
}
}
class second {
//$fst = new first(... | php | [2] |
674,931 | 674,932 | How to get Activity's content view? | <p>Tell me, what method should I call to get know if Activity has it's contentView, I mean method <strong>setContentView()</strong> has been done?</p>
| android | [4] |
2,925,223 | 2,925,224 | how to declare variables in class? | <p>I have following code:</p>
<pre><code>class one
{
public:
typedef int (*funPtr) (void);
one()
{
// here I'm using map variable which is private.
}
~one(){}
private:
typedef map<int, funPtr> mMap;
mMap mapVar;
};
</code></pre>
<p>In this case class constructor gives that error that map i... | c++ | [6] |
4,949,518 | 4,949,519 | Is this a safe way to reference objects in JavaScript? | <p>If I were to define two objects myDataStore and myDrawer something like this:</p>
<pre><code>var myDataStore = function(myObjectRef) {
this.myInternalObject = myObjectRef;
};
var myDrawer = function(myObjRef) {
this.myInternalObject = myObjectRef;
};
</code></pre>
<p>And if I were to create an object like... | javascript | [3] |
1,538,441 | 1,538,442 | How to make histogram with python? | <p>I have some difficulties to solve this problem :<br/>
Write a function word_graph that takes three arguments -(1) <strong>in_grame</strong> sptipulating thr name of a pickle file containing an index of descriptions, (2)<strong>gr_frm</strong> stipulating a file name on which to store the output graph and (3) <strong... | python | [7] |
5,715,894 | 5,715,895 | Can an external Javascript file be called and executed depending on a conditional? | <p>I know that I can run an external Javascript file from within HTML with the following syntax:</p>
<pre><code><script type="text/javascript"
src="http://somesite.com/location/of/javascript.js">
</script>
</code></pre>
<p>This will result in <code>http://somesite.com/location/of/javascript.js</code> bein... | javascript | [3] |
917,450 | 917,451 | Passing a Session.Item to a MySQL query | <p>I have a aspx web page that has a session variable:</p>
<pre><code>Dim UserName As String = CType(Session.Item("UserName"), String)
</code></pre>
<p>I am attempting to include this variable in the <code>MySQL</code> query of a <code>SqldataSource</code> for a Databound <code>GridView</code> control:</p>
<pre><cod... | asp.net | [9] |
2,030,851 | 2,030,852 | jQuery after 4 img add some tag | <p>I have list of pictures and i want after every 4 pictures add li tag. some like this.</p>
<p>I have this.</p>
<pre><code><img src="#" />
<img src="#" />
<img src="#" />
<img src="#" />
<img src="#" />
<img src="#" />
<img src="#" />
<img src="#" />
</code></pre>
<p... | jquery | [5] |
5,941,966 | 5,941,967 | how to create multi choice list view with search box in android | <p>I m having a list of around more than 100 items that i m building a multi choice list, out of which user can select as many items he need,
I created the list view with multi choice selection but scrolling the 100 items is too complex for user so is there any way to put the search box at the top of list view so upon... | android | [4] |
3,105,823 | 3,105,824 | Launch android app on screen unlock | <p>I want to build a lock screen replacement application. Is there any way to create a listener/service that would launch my app whenever the user wakes up/unlocks the screen? </p>
| android | [4] |
3,986,354 | 3,986,355 | Python Program, while loop not executing? | <pre><code>Names=[0,1,2,3,4]
Names[1]=='Ben'
Names[2]=='Thor'
Names[3]=='Zoe'
Names[4]=='Katie'
Max=4
Current=1
Found=False
PlayerName=input('What player are you looking for?')
while Found==False and Current==Max:
if Names[Current]==PlayerName:
Found=True
else:
Current+=1
if Found==True:
... | python | [7] |
2,709,229 | 2,709,230 | jQuery. Prepend with fadeIn (error) | <p>I've used code from here <a href="http://stackoverflow.com/questions/1906066/jquery-prepend-fadein">jquery prepend + fadeIn</a></p>
<p>Without <code>fadeIn</code> it works</p>
<pre><code>function updateResult(data) {
$('#test').prepend(
html
);
}
</code></pre>
<p>But with <code>fadeIn</code> works only when d... | jquery | [5] |
1,626,474 | 1,626,475 | php login script error | <p>I have this login script working just fine on one server but not on other and coudn't figure out why.</p>
<pre><code>include_once 'include/processes.php';
$Login_Process = new Login_Process;
$Login_Process->check_status($_SERVER['SCRIPT_NAME']);
</code></pre>
<p>and the third line won't display the server statu... | php | [2] |
4,968,946 | 4,968,947 | OutOfMemoryError: bitmap size exceeds VM budget (Convert Drawable to Bitmap) | <p>I have out of memory error when i am trying to convert drawable in to Bitmap images. I have past my code and stack trace if its possible plz help.</p>
<pre><code>public static Bitmap convertDrawableToBitmap(Drawable dwb, int width, int height){
if (dwb == null || width == 0 || height == 0)
retur... | android | [4] |
4,219,044 | 4,219,045 | How to implement double tab for surface view in android | <p>can anybody tell How to implement double tab for surface view in android using gesture detector can anybody provide code</p>
<p>Thanks</p>
| android | [4] |
1,197,178 | 1,197,179 | Issue with SlidingDrawer | <p>I have a layout with 2 components: a <code>SlidingDrawer</code> which uses a Button and a <code>LinearLayout</code> (when the Button is clicked ou dragged, the <code>LinearLayout</code> appears or disappears); and one List, which is below the <code>SlidingDrawer</code>. </p>
<p>I need this List to "stretch". So, wh... | android | [4] |
916,719 | 916,720 | Javascript switch statement with months | <p>I have a assignment where the user puts in a number inside a prompt box and the month comes out. Here is code so far:</p>
<pre><code><script type="text/javascript">
var a = prompt("enter a month number please.");
var b = "";
switch(a){
case 1: b = "January";
break;
case 2: b ... | javascript | [3] |
5,757,141 | 5,757,142 | Static variables in ASP.NET | <p>There is <a href="http://support.microsoft.com/kb/312607#4" rel="nofollow">an article</a> that recommends to store ASP.NET application state in static members of <em>HttpApplication</em> class (in Global.asax.cs).</p>
<p>What about storing application state in static members of <strong>other classes</strong>?</p>
... | asp.net | [9] |
4,556,407 | 4,556,408 | UIViewController issue | <p>I want to get objects values from a UIViewController.</p>
<p>I am using this </p>
<blockquote>
<p>SecondViewController *newObject=[[SecondViewController alloc] init];</p>
</blockquote>
<p>But newobject has textview, its value is zero. How can I access the textview?</p>
| iphone | [8] |
452,435 | 452,436 | catch & save outging sms to my app & the native app | <p>iv`e created an SMS app with a db that saves almost all of the messages.</p>
<p>the problem starts when i want to save (1) my app outgoing messages to the native SMS app - the mmssms.db & the (2) outging native SMS messages to my app db.</p>
<p>i searched all over and failed to find a proper example for that q... | android | [4] |
1,231,156 | 1,231,157 | Trying to send mail using yahoo smtp in php | <p>Please can some one suggest me codes to send mails using yahoo smatp, and php.. </p>
<pre><code>require("class.phpmailer.php"); // be sure to change this to your location!
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // sets... | php | [2] |
3,547,106 | 3,547,107 | number of parse calls allowed in trial version of jep jar | <p>I am using jep for evaluating expressions but getting following exception</p>
<pre><code>15:01:00,819 ERROR [stderr] (http--0.0.0.0-8443-3) com.singularsys.jep.ParseException: Trial version limitation: Number of parse calls exceeded
15:01:00,819 ERROR [stderr] (http--0.0.0.0-8443-3) at com.singularsys.jep.Jep.par... | java | [1] |
408,727 | 408,728 | python create a class with complex numbers | <p>i have done this in c++ but i am trying it to python and have difficulties.I did this code:</p>
<pre><code>class mycomplex:
def __init__(self,real=None,imag=None):
self.real=real
self.imag=imag
def read_data(self):
self.real=input("Give the real part :")
self.imag=input("Give the imag part :")
def... | python | [7] |
4,831,622 | 4,831,623 | Quoting a Python function in order to apply it later | <p>Given an object Foo, which has a set of methods Bar, Baz, Quux, and Close.</p>
<p>I want to wrap calls into Foo as follows</p>
<pre><code>def wrapper(method_symbol, *args):
object = Foo()
apply(object.method_symbol, args)
object.Close()
</code></pre>
<p>So later on, I can call <code>wrapper(Bar, MySweetA... | python | [7] |
5,580,669 | 5,580,670 | Can I repeat same tasks in buttonclick C# | <pre><code>private void button1_Click(object sender, EventArgs e)
{
for (int iter = 0; iter < 3; ++iter)
{
//...code for defining some matrix elements and cell id
try
{
var firstTask = new Task(() => invokedisplaymatrix(MatrixInfoValues));
var secondTask =... | c# | [0] |
4,818,063 | 4,818,064 | Database.Script Method Throwing - ArgumentOutOfRangeException | <p><strong>Hello, I'm running the following code:</strong></p>
<pre><code>database.UserDefinedFunctions[name, schema].Script(dropstoredProcOptions);
</code></pre>
<p>With this as dropstoreProcOptions:</p>
<pre><code> ScriptingOptions dropstoreProcOptions = new ScriptingOptions();
dropstoreProcOptions.... | c# | [0] |
5,783,551 | 5,783,552 | JQuery - Get attribute of higher-level item | <p>I am trying to get the ID of <code>item1</code> but it does not return the ID in the code below. Is there a ways to get the ID of a higher-level function?</p>
<p>I assume that the code is trying to get the ID of <code>popup</code> but that is both not needed and does not exist. Can I get the higher-level function... | jquery | [5] |
1,231,324 | 1,231,325 | how do I convert an integer to binary in javascript? | <p>I'd like to see integers, positive or negative, in binary.</p>
<p>Rather like this question, but for javascript.
<a href="http://stackoverflow.com/questions/5263187/how-can-i-print-a-integer-in-binary-format-in-java">How can i print a integer in binary format in java</a></p>
<p>Added-
Answers given so far, using t... | javascript | [3] |
4,421,005 | 4,421,006 | How Can I validate form and sending form via ajax to the another php page? | <p>I have this code between <code><head></head></code></p>
<pre><code><script>
$(document).ready(function() {
$("#test1").validate({
jQuery.extend(jQuery.validator.messages, {
required: "Bez vyplnění této položky nelze objednávku odeslat!",
email: "Prosím zadejte p... | jquery | [5] |
5,983,932 | 5,983,933 | When does ActivityManagerSerivces dump out the content of 'procrank' | <p>When i looked at teh ActivityManagerService.java, it said it will dump out the content of 'procrank' when it is low on memory and there is no background service?</p>
<p>Here is 1 instance of procrank dumped out by ActivityManagerService:
It has '84884K' free. So why ActivityManager thinks it is 'low on memory'?</p>... | android | [4] |
4,258,509 | 4,258,510 | Connect to as400 using sql | <p>I would think this would be a fairly common thing, and easy to find in google, but so far I haven't had much luck. I would like my application to connect to the i-series AS400 system using some method, run an SQL statement over an AS400 physical file, return a result set, and then have my visual c# program process ... | c# | [0] |
3,316,216 | 3,316,217 | Is there a way to force specific order on extenders added to the same control? | <p>I wrote two control extenders that need to be placed always in the same order. Is there any way to make VS always place them in the correct order?</p>
<p>The only solution i found was to place them in a central repository keyed on the target control ID on their init stage - and then have each of them perform its wo... | asp.net | [9] |
3,769,437 | 3,769,438 | Java Scanner multiple delimiter | <p>I know this is a very asked question but I can't find and apropiate answer for my problem. Thing is I have to program and aplication that reads from a .TXT file like this</p>
<pre><code>Real:Atelti
Alcorcon:getafe
Barcelona:Sporting
</code></pre>
<p>My question is how what can I do to tell Java that I want String... | java | [1] |
1,943,986 | 1,943,987 | SygicActivity finish() closes the entire application | <p>I am developing an app that uses Sygic navigation API. I have my main menu activity which calls the sygic activity but then if I call finish on the sygic activity, it closes the entire application.</p>
<p>I spoke to the developers of Sygic and they told me this is the expected result for the activity (obviously not... | android | [4] |
798,714 | 798,715 | how to hide a complete asp.net webform | <p>I want a page to run in the background in my Asp .Net web application.
That page should not be visible to the user. </p>
<p>The exact use of this page: the user will schedule a mail, that is to be send later. After he scheduled, the page should be hidden.</p>
<p>Can we do it?</p>
<p>Platform version (.NET 4)</p... | asp.net | [9] |
2,569,551 | 2,569,552 | Reason for The local variable may not have been initialized? | <p>This is what my method looks like</p>
<pre><code>public int abc()
{
int x;
if(x > 100)
{
//Say ok
return x;//Causes compiler error
}
//if something more, x = some number
return x;//Causes compiler error
}
</code></pre>
<p>I saw an answer at SO - <a href="http://stackoverflow.com/questio... | java | [1] |
197,024 | 197,025 | android honeycomb list menus | <p>I feel stupid for asking: What are the drop menus on honeycomb apps called? I'd like to use them in my app but i don't even know where to start.</p>
<p>An Example from Google Music, notice the triangle in the corner:</p>
<p><img src="http://i.stack.imgur.com/WUxEh.png" alt="unopened menu"></p>
<p>Here it is opene... | android | [4] |
5,816,134 | 5,816,135 | python, create a filtered list from a text document | <p>Every time I try to run this program, Python IDLE responds by telling me that it is not responding and has to close. Any suggestions on how to improve this code to make it work the way I want?</p>
<pre><code>#open text document
#filter out words in the document by appending to an empty list
#get rid of words that s... | python | [7] |
2,326,305 | 2,326,306 | How do I put a javascript variable inside javascript array? | <p>I'm sure this is a simple question, but I couldn't find the answer.</p>
<p>I've included the code as well as my explanation.</p>
<pre><code>var dates = "'2012-07-22','2012-07-26','2012-07-28'";
</code></pre>
<p>i have this JavaScript variable and i need to pass it the below <code>filterDates</code> array...someth... | javascript | [3] |
5,860,830 | 5,860,831 | Deciphering object oriented programming concepts in Java | <p>I've been reading about object oriented concepts, and I'm getting really lost.
Conceptually, all I understand is that a method "does" something and that a class is a "blueprint". I've read all the analogies, but the only thing that really makes sense to me so far is:
Loops,if then, variable assignments, primitive d... | java | [1] |
2,843,913 | 2,843,914 | Mutally exclusive constraints on two methods with the same signature | <p>So these two methods have the same signature but different constraints</p>
<pre><code>public static void Method<T>(ref T variable) where T : struct { }
public static void Method<T>(ref T variable) where T : class { }
</code></pre>
<p>But they cannot be defined in a single class because they have the s... | c# | [0] |
1,484,213 | 1,484,214 | jQuery callback function issue | <p>I am a bit new to programming in jQuery/Javascript and am having some issues showing/hiding a series of headers in a div tag (container). The script code with attempted callback is:</p>
<pre><code>$(document).ready(function(){
$('<h1>Text1</h1>').hide().prependTo("#container").fadeIn(2000, function(... | jquery | [5] |
5,957,845 | 5,957,846 | How to save list items on disk instead of memory in Java | <p>I'm looking for a data structure same as ArrayList in Java that saves items on disk instead of memory.
Does java have such a data structure?
Thanks</p>
<p>I want to have a dynamic structure that saves items on memory and when its size exceeds some value, save new items on disk until the size goes below the value.</... | java | [1] |
5,842,731 | 5,842,732 | How do i set a variable using conditional statements? | <p>This does not work, even though putting a simple print ("foo") in the function block does work. </p>
<pre><code><script>
var viewportHeight = $(window).height();
var X;
$(function() {
if (viewportHeight >= 600) {
var X = 100;
}
});
</script>
</code></pre>
| jquery | [5] |
2,993,524 | 2,993,525 | Javascript function to get the color name from RGB value or Hexadecimal value | <p>Need a javascript method to get color name.</p>
<p>Hoping javascript function should look like as follows </p>
<pre><code>function (r,g,b)
{
....
return <color name>; // like blue, cyan, magneta etc etc
}
</code></pre>
| javascript | [3] |
2,602,918 | 2,602,919 | How to generate short filenames for uploaded photos? | <p>While uploading new photos to a linux server with PHP, I'm having to give them unique names (using it's file name is ruled out). There's no interaction with a DB so getting unique IDs is also not possible. </p>
<p>I thought of using <strong>DATE+TIME.jpg</strong>, but that's just too long. </p>
<p>So what is the ... | php | [2] |
3,352,950 | 3,352,951 | Need help on Bar Chart Plot | <p>I need help on plotting the bar chart to show daily based statistics like below attached image<img src="http://i.stack.imgur.com/Zpkc9.png" alt="enter image description here"> shown on iPhone App to android, can you any suggest the corresponding api for this one.</p>
| android | [4] |
2,192,539 | 2,192,540 | href attribute of <a> not being set | <p>In my application, I send an AJAX request to a server, and based on some data, I have to change the <strong>href</strong> attribute of element. Here's my code:</p>
<pre><code>$('#unclaimed_codes_list li').map(function(){
$(this).children("a:first").text(fname + ' ' + lname + '(' + key + ')');
}
$.get('/accs/g... | jquery | [5] |
551,996 | 551,997 | FTP implement in android issue | <p>i have refer <a href="http://stackoverflow.com/questions/1567601/android-ftp-library">Android FTP Library</a> for implement ftp upload file fundamental in android but when i click on <a href="http://commons.apache.org/net/api/org/apache/commons/net/ftp/FTPClient.html" rel="nofollow">http://commons.apache.org/net/api... | android | [4] |
4,206,781 | 4,206,782 | window.location.href javascript does not trigger shouldOverrideUrlLoading | <p>My tested on nexous one (compiled with android 2.2) shows that shouldOverrideUrlLoading is not triggered when the page is redirected via window.location.href. The onPageFinished is trigger as usual.</p>
<p>Could anyone advise how to intercept javascript page redirect?
Any other way to redirect the page in javascri... | android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.