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,347,462
5,347,463
Php, out-pay of coins
<p>If one were to make a "vending machine" and you would write in how much you would pay and if you paid £100 for a £2 item, then make it echo the amount you get back, and then echo the amount in coins (1p,5p etc. If you get my drift.) how would you do the echo'ing of coins?</p> <pre><code>$valg = $_POST['select']; $p...
php
[2]
1,967,562
1,967,563
Change css class of loop values in PHP
<p>I have the following </p> <pre><code>echo "&lt;span&gt;".apply_filters(" $value\n", $value)."&lt;/span&gt;"; </code></pre> <p>that outputs </p> <pre><code>&lt;span&gt;Value&lt;/span&gt; &lt;span&gt;value 2&lt;/span&gt; &lt;span&gt;value 3&lt;/span&gt; </code></pre> <p>I want to append a 1 to each span outputted,...
php
[2]
3,151,097
3,151,098
JQUery validation plugin for checking data availability
<p>I am learning how to use JQuery validation plugin, I got a simple input text field like this:</p> <pre><code>&lt;input type="text" name="username"&gt; </code></pre> <p>But I don't know how to use this plugin to do some data availability tasks.</p> <p>Could you help me please?</p>
jquery
[5]
5,417,811
5,417,812
how to work with device keyboard
<p>Actually i have an editText box where i have to type a password..Now when i click the editText box an device input keyboard is open. So what i want is that when i click "done" in device input keyboard and if the password is right i have to move to the next activity..</p> <p>But i dont know how to use event of devi...
android
[4]
1,215,603
1,215,604
Android_Alert Message_Which will not Close
<p>I am trying to develop popup message box which shows warning to user and won't allow to go anywhere (even not allowed to go at home screen/menu).</p> <p>I'm trying to put button on it until I press on that button and write username and password, so that user can't go any where.</p> <p>Should I interrupt or simply ...
android
[4]
5,202,267
5,202,268
How to add to $.get in JQuery error handling function?
<p>How to add to $.get in JQuery error handling function ? My request looks like</p> <pre><code>$.get('www.test.com', temp_parameters, function(data) { alert('data='+data['result']); },"json"); </code></pre> <p>but there is no function if error happens. Where to add that function ?</p>
jquery
[5]
1,430,579
1,430,580
how to open row in edit mode in gridview
<p>how to make gridview ro visible false when i click on delete button because i am using static data and i want to open the row in gridview in edit mode when i click on edit button. How to do this in c#</p>
asp.net
[9]
1,788,619
1,788,620
attaching DOM event handlers from a plugin that loads asynchronously?
<p>I have a jQuery plugin that loads asynchronously and attaches events to a DOM element on page load.</p> <p>Intermittently the DOM elements are not attached with events from the plugin - This happens due to the loading of these DOM elements via another javascript file.</p> <p>Is there any way to ensure that event h...
jquery
[5]
3,112,704
3,112,705
How do I Update DataSet with update sql, then Udate the database in C sharp
<p>How do I Update DataSet with update sql, then Udate the database in C sharp. I have so code it does something but does not actually update the database. I feel I am really close to figuring this out, but I am missing something or I am not doing something right. my code is below if someone can see what it is I am not...
c#
[0]
2,559,131
2,559,132
How to create movable and resizable graphic objects for a graphic 2D drawing application?
<p>Good day, I'm learning how to develop applications for Android (API 14). I'd like to create an application in which I could create 2D graphic objects (shapes or text), select them, move, resize, rotate or select and move their nodes. A picture taken by the camera should be used as a background image. The application...
android
[4]
1,504,803
1,504,804
Login page shows blank
<p>The login page on a project i'm currently fixing up shows blank. i tried echoing some words to find out where the fault lied. I found out that commenting out the below piece of code made it to display.</p> <pre><code>elseif( isset($_POST['do_login'] ) ){ //Login user $email = (isset($_POST['login']) &amp;&am...
php
[2]
696,382
696,383
problem passing listener class to a function
<p>I'm using a library that manipulates a binary search tree. In this library is a function that traverses the tree and passes each node it finds to a callback class:</p> <p><code>bool TCODBsp::traverseInvertedLevelOrder(ITCODBspCallback *callback, void *userData)</code></p> <p><code>ITCODBspCallback</code> is a bas...
c++
[6]
1,423,205
1,423,206
Get stored id's using iteration
<p>I please need some help: I have this database, which has this fields with their respect values:</p> <pre><code>agency_id | hostess_id 3 | 12-4-6 5 | 19-4-7 1 | 1 </code></pre> <p>In hostess_id are stored all hostesses ids that are associated with that agency_id but separated with a "-" </p>...
php
[2]
4,811,446
4,811,447
Unregister a live click event when the objects keep on changing dynamically
<p>I have a div in which i dynamically add different tables.</p> <p>I need to maintain a column that was sorted out.</p> <p>I am using Global Variables for storing the column names.</p> <p>Since the table gets changed (a different structured table can be added dynamically too)</p> <p>I register a TH (table head cli...
jquery
[5]
477,619
477,620
Downloading empty file
<p>For the life of me I can't see why, but it has the correct file name and all, but the files themselves are empty after download. As far as I can see its going to the correct spot, the database has the correct info too. </p> <pre><code>function download() { global $session,$project,$config,$args; $fid = $ar...
php
[2]
5,468,705
5,468,706
Hide microphone button Android virtual keyboard
<p>I wanted to know if is it possible to hide the microphone button (speech-to-text) in Android Virtual Keyboard programatically.</p> <p>I know I can disable this option through device settings, but I don't want the user to use this feature in my application independently of his/her settings. I mean i want to force t...
android
[4]
3,047,128
3,047,129
Help submitting a form
<p>This was working but has suddenly stopped for some reason. I can't see what's wrong. Can someone tell me what I am doing wrong here? I'm using an onclick event in a span tag then calling this function.</p> <p>Firefox reports: <code>Error: document.forms[0].submit is not a function</code></p> <pre><code> function ...
javascript
[3]
2,153,405
2,153,406
How to mock object?
<p>How to mock object for testing if the class you're testing is abstract? you can't instantiate from it ?</p>
java
[1]
4,145,992
4,145,993
I don't understand this function(options)
<p>I don't understand this, if I have image slider and image preloader </p> <pre><code>jQuery.fn.awShowcase = function(options); //slider $.fn.preloader = function(options); // preloader </code></pre> <p>They don't work on the same page because the function is the same?</p>
jquery
[5]
1,935,278
1,935,279
Help! Error: The local variable transactionType may not have been initialized
<p>I get this Error: The local variable transactionType may not have been initialized</p> <p>but the thing is it is initialized in my if statement! </p> <pre><code>if (transactionChar == 'w') transactionType = "Withdrawal"; else if (transactionChar == 'd') transactionType = "Deposit" ; </code></pre> <p>then ...
java
[1]
4,910,607
4,910,608
Why is this python operation returning a tuple?
<pre><code>from datetime import date from datetime import timedelta a = date.today() - timedelta(1) # a above is a tuple and not datetime # Since I am a C programmer, I would expect python to cast back to datetime # but it is casting it to a tuple </code></pre> <p>Can you please tell me why this is happening? and als...
python
[7]
791,562
791,563
Line 6 of this Javascript program is confusing me
<p>In the function <code>takeNormal()</code> below, there is a line that I don't understand at all. It is: </p> <pre><code>var end = reduce(Math.min, text.length, map(indexOrEnd, ["*", "{"])); </code></pre> <p>Specifically, in this function reduce, it has all these different arguments (are they arguments?). How are t...
javascript
[3]
836,166
836,167
How to get ArrayList shuffle to produce more than one not all the same
<p>Hi complete novice with Java, this is my second assignment. I have written a method for a lottery code using array list, I have two issues:</p> <ul> <li>The same shuffled list is produced for every line requested.</li> <li>The lines print down not across.</li> </ul> <hr> <pre><code>public static void irishLottery...
java
[1]
1,952,354
1,952,355
Using AppDomain in C# to dynamically load and unload dll
<p>In one of my application, which is related to system diagnostics, the related DLL is to be loaded and unloaded dynamically in C#. After some search I found that a separate DLL cannot be loaded dynamically its the complete AppDomain. So I have to create an AppDomain and use that DLL to be loaded unloaded dynamically....
c#
[0]
4,291,582
4,291,583
Set of all subsets
<p>In Python2 I could use</p> <pre><code>def subsets(mySet): return reduce(lambda z, x: z + [y + [x] for y in z], mySet, [[]]) </code></pre> <p>to find all subsets of <code>mySet</code>. Python 3 has removed <code>reduce</code>.</p> <p>What would be an equally concise rewrite of this for Python3?</p>
python
[7]
772,657
772,658
Better way to do this in PHP
<p>I currently have my htaccess file set to remove the file type so</p> <pre><code>www.example.com/home.php </code></pre> <p>would become,</p> <pre><code>www.example.com/home </code></pre> <p>I need to compare the url with one that I have saved in the database, I do this by,</p> <pre><code>if ($_SERVER['QUERY_STRI...
php
[2]
384,102
384,103
using python to encapsulate part of a string after 3 commas
<p>I am trying to create a python script that adds quotations around part of a string, after 3 commas</p> <p>So if the input data looks like this:</p> <pre><code>1234,1,1/1/2010,This is a test. One, two, three. </code></pre> <p>I want python to convert the string to:</p> <pre><code>1234,1,1/1/2010,"This is a test. ...
python
[7]
4,219,325
4,219,326
Why would you choose the Java programming language over others?
<p>Why would you choose java over others? Why did you choose java to program your application?</p> <p>Please include what you are using java for (desktop application/ web application/ mobile).</p>
java
[1]
4,464,339
4,464,340
C++: is instance descendant of class
<p>Assume we have three classes A, B and C. B is derived from A and C is derived from B. Now we have a pointer that points to an object of class A. Due to Polymorphism it can actually point to instances of all three classes.</p> <p>With typeid() i can check what type the pointer actually refers to. But I'm trying to d...
c++
[6]
2,337,323
2,337,324
How do I get the navigation bar in a UINavigationController to update its position when the status bar is hidden?
<p>I have a <code>UINavigationController</code> with a visible Navigation Bar. I have one particular <code>UIViewController</code> which I'd like to hide the status bar when pushed into the navigation stack. Once this viewController is popped I'd like to show the status bar again.</p> <p>I'm hiding the bar in the <cod...
iphone
[8]
2,371,843
2,371,844
How to prevent events from being bound multiple times
<pre><code> $('.ajax').click ( function() { // If been bound then we need to return here. alert(':D'); } ) $('.ajax').click ( function() { // If been bound then we need to return here. alert(':D'); } ) </code></pre> <p>In this case, I have called du...
jquery
[5]
5,306,879
5,306,880
Is there a way in asp.net that can prevent some users from registeration?
<p>I would like to know if I can block <strong>users from specific countries</strong> from being able to register in an asp.net website. So I want the website automatically recognise where the vistor is located, in which conuntry, then if the user from the alloed countries then he can register otherwise an error appear...
asp.net
[9]
4,884,736
4,884,737
Why the destructors in that instance’s inheritance chain are called, in order, from most derived to least derived?
<p>Base on the C# specification, 10.13 Destructors</p> <blockquote> <p>" When an instance is destructed, the destructors in that instance’s inheritance chain are called, in order, from most derived to least derived."</p> </blockquote> <p>My questions are:</p> <p>why destructors are called, in order, from most de...
c#
[0]
3,800,450
3,800,451
specify callback on jquery bounce?
<pre><code>Data.BouncePrompt.effect("bounce", {times:3, mode:"hide"}, 300); </code></pre> <p>I want to let it continue displaying after the 3 bounces for like 2 seconds then hide it. Is that possible?</p>
jquery
[5]
189,874
189,875
Interface referencing another interface but class referencing another class in C#
<p>I have a very simple question, but I haven't had this problem before.</p> <p>Take a look at this code:</p> <pre><code>interface IFoo { IBar MyBar { get; } } interface IBar { String Test { get; } } class Foo : IFoo { public Bar MyBar { get; set; } } class Bar : IBar { public String Test { get; se...
c#
[0]
2,396,485
2,396,486
Date vs new Date in JavaScript
<p><code>new Date()</code> takes an ordinal and returns a <code>Date</code> object.<br> What does <code>Date()</code> do, and how come it gives a different time?</p> <pre><code>&gt;&gt;&gt; new Date(1329429600000) Date {Fri Feb 17 2012 00:00:00 GMT+0200 (Jerusalem Standard Time)} &gt;&gt;&gt; Date(1329429600000) "Tue ...
javascript
[3]
4,683,569
4,683,570
what does this prototype do?
<p>Is it making a new version of the Number function and calling it something else? Is there a better way to write this?</p> <pre><code>Number.prototype.clamp = function(min, max) { return Math.min(Math.max(this, min), max); }; </code></pre> <p>Is it the same as </p> <pre><code>Number.prototype.NumberToMystring ...
javascript
[3]
3,262,455
3,262,456
How do I create file on server?
<p>Let say I want create file call style.css in <code>/css/</code> folder.</p> <p>Example : When I click Save button script will create <code>style.css</code> with content</p> <pre><code> body {background:#fff;} a {color:#333; text-decoration:none; } </code></pre> <p>If server cannot write the file I want show erro...
php
[2]
4,233,433
4,233,434
ASP.net: dropdown opened for selection is displayed in front of/above Menu displayed by Mouse Hover
<p>We have a asp.net menu control placed on Master Page and and there is a DropDown on the Content Page, both these are asp.net server controls.</p> <p><b>On Master Page:</b></p> <pre><code>&lt;asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" &...
asp.net
[9]
88,694
88,695
Javascript basics: variable scope
<p>I am learning javascript and can someone please explain the following code snippet for me?</p> <pre> <code> var state=true; function bob(){ var state=false; } bob() </code> </pre> <p>What should be the state value and why?</p> <p>Many thanks, L</p>
javascript
[3]
335,408
335,409
tag cloud: load javascript after GetAllTagTerms
<p>On my master page i have a tag cloud web part.</p> <p>I use jquery to redirect tags to search center. I reference it in my master page:</p> <pre><code>&lt;script type="text/javascript" src="/_layouts/project/js/addons.js"&gt;&lt;/script&gt; </code></pre> <p>I tested the script with the console in firebug and it w...
javascript
[3]
3,686,769
3,686,770
Focus into a newly replaced text field using jQuery
<p>I am using jQuery to replace the HTML of a text field when it gets focus. My code looks like this: </p> <pre><code>&lt;div id="my_field"&gt; &lt;%= f.text_field :first_name, :value =&gt; "Enter Name" %&gt; &lt;/div&gt; </code></pre> <p>My jQuery used to replace the HTML inside my_field:</p> <pre><code>$("#my...
jquery
[5]
388,387
388,388
mouseover style change with JQuery
<p>taking the following html:</p> <pre><code> &lt;li&gt; &lt;p&gt; &lt;a href="#" class="link" &gt;&lt;img src="images/photo_cityguild_cropped.jpg" alt="Education" title="Education"&gt; &lt;span class="label"&gt;E D U C A T I O N&lt;/span&gt; &lt;/a&gt; &lt;/p&gt; &lt;/li&gt; </code></pre> ...
jquery
[5]
5,047,008
5,047,009
Use field values to populate another checkbox on submit.
<p>How would I go about writing a javascipt that On Submit, would check if two fields are blank, and if they are NOT blank, then it would automatically set another field to "TRUE"? Example: </p> <p>Invoice Table-- CustomerID, InvoiceID, Check, Cash#, Paid</p> <p>I want the function to check if there are any values in...
javascript
[3]
1,463,987
1,463,988
How to get the eq() value?
<p>Is this possible? For me to get the eq() value? for example, if I click the li:eq(2), var x will become '2'. Here's the code. Thank you.</p> <pre><code>$('#numbers ul li').click(function(){ x=$(this).eq().val(); alert(x); }); </code></pre>
jquery
[5]
5,521,317
5,521,318
Implement Per Property Change Tracking
<p>I am writing a C# app using the MVVM pattern and I was wondering what would be the best way to implement change tracking on a per property basis. I currently have INotofyPropertyChanged implemented and flag whether or not the whole object is dirty, but some of the requirements I have to implement is they want to be ...
c#
[0]
2,236,674
2,236,675
PHP when writing to file, How to prepend and append text to a file with existing text?
<p>I'm creating a xml file with PHP here is some sample code.</p> <pre><code> $myFile = "example_file.xml"; $fh = fopen($myFile, 'w'); while($row = mysql_fetch_array($result)) { $stringData = "&lt;field name=\"id\"&gt;$page_id&lt;/field&gt; &lt;field name=\"url\"&gt;http://myfu...
php
[2]
1,299,788
1,299,789
Creating menus by the normal user
<p>I have a problem, I need to create menu items but I want the user to be able to do that through a GUI where he/she enters the name of the menu item in an edit text and clicks a button to create it. How do I go about this. I will appreciate the help!</p>
android
[4]
5,791,800
5,791,801
Maybe This is dead-simple stupid question, but how PHP translate our code?
<p>i got this code</p> <p>` <pre><code> // // prints out "Hello World!" // hello_world(); //First call function hello_world() { echo "Hello World!&lt;br/&gt;\n"; } hello_world(); //second call ?&gt;` </code></pre> <p>Both of 'hello_world' call will print out the same result. It's easily to un...
php
[2]
5,489,386
5,489,387
Exit all functions from code in inner function
<p>If I have nested functions in C#, how to exit from both function at once when executing inner function code. (<code>Return;</code> only exits from executing function.)</p> <pre><code>public void Function1() { Function2(); } public void Function2() { if (1 == 1) { //Exit from both functio...
c#
[0]
4,649,393
4,649,394
What conditions will trigger popup blocker?
<p>I would like to know the conditions which will trigger popup blocker.<br> I know that window.open without user clicking the page will trigger the popup blocker.<br> But if the user clicks on the flash and then the flash calls the window.open js function, will this trigger the popup blocker?</p>
javascript
[3]
1,250,120
1,250,121
Entry to android programming
<p>In the following program , when i try to run its getting error </p> <pre><code>textOut = (TextView) findViewById(R.id.tvGetInput); </code></pre> <p>in this line. Its showing error in tvGetInput. How can i fix it ? </p> <pre><code>package was.thebasics; import android.app.Activity; import android.content.Intent; ...
android
[4]
3,945,891
3,945,892
What exactly does "unformatted input function" mean?
<p>After reading <a href="http://www.gamedev.net/topic/641136-stdifstreamread-failing-to-read-all-the-bytes/" rel="nofollow">this post</a> on GameDev.net, I decided to take a gander at the C++ standard. There are several <code>std::istream</code> functions that are described as "unformatted input functions" by the stan...
c++
[6]
5,880,281
5,880,282
display picture
<p>hi everybody i'm trying to get bmp file then display it and i should do this by get header information of bmp and load it pixel by pixel in to an array then set pixel to display bmp picture without using bitmap class.</p> <pre><code>enter code here enter code here public void display(String filename) { ...
c#
[0]
734,542
734,543
jquery select, create input boxes?
<p>I have a dropdown selection box with the following:</p> <pre><code>&lt;select name="type" id="speedB" style="width:324px;"&gt; &lt;option value=""&gt;Please Select&lt;/option&gt; &lt;option value="9.99"&gt;1 = $9.99&lt;/option&gt; &lt;option value="19.99"&gt;5 = $19.99&lt;/option&gt; &lt;option valu...
jquery
[5]
3,837,998
3,837,999
How to send a mail using xampp in windows XP?
<p><br/> I am using XAMPP for localdevelopment.And I am using the mail() function for sending the mail. But unfortunately it wont sent the mail.I am not using any SMTP server in local host.If I need to sent mail what can I do?Thanks in advance.</p>
php
[2]
1,265,892
1,265,893
Is there a way to see if a control is off screen and not drawn?
<p>I have a app where on very small screens the buttommost textview is not drawn (it's off the screen). Is there a way to see if it is off the screen?</p>
android
[4]
3,674,441
3,674,442
In ASP.NET, how do I convert ~/Application/Page.aspx to http://localhost:45/MyApp/Application/Page.aspx
<p>Basically I want to convert a virtual path to an absolute path. </p>
asp.net
[9]
6,015,438
6,015,439
Application Build not loaded on device
<p>When I tried to upload a build on device it give the following error. Your mobile device has encountered an unexpected error <code>(0xE8000001)</code></p> <p>I am unable to solve this problem. Can anyone tell me why this is happening?</p>
iphone
[8]
2,703,835
2,703,836
Return multiple values from a function in C# - which of these options is better?
<p>I want my function to accept one string (file name) as input and return 2 strings: temp file and new file name</p> <p>Which option is better:</p> <ol> <li>Class</li> <li>struct </li> <li>Use output parameters (using the out or ref keywords)</li> </ol>
c#
[0]
2,196,754
2,196,755
PHP include w/o echo
<p>I'm coding a web site and I have a php fonction called site_nav.php which first define a $list array and than echos it in a json form.</p> <p>This way, I can get my web site map with ajax.</p> <p>My problem is that now, I would like to get the $list object in php, without echoing the json object.</p> <p>My questi...
php
[2]
4,356,331
4,356,332
c# static variables
<p>Greetings!</p> <p>First let me explain my project in few words.I am using TouchServer which is a console application.TouchStation which is windows application.this does syncronization process.touchstation communicates with touchserver to create local database and load data from remote database.At the same time I ca...
c#
[0]
4,969,711
4,969,712
jQuery: renumber all rows by changing first column's values
<p>I'm trying to renumber my rows, starting with a given start index, after an event. Here's the HTML for my table:</p> <pre><code>&lt;table id="table4"&gt; &lt;tr&gt; &lt;td&gt;&lt;span class='col1'&gt;6&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Score&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&...
jquery
[5]
2,354,979
2,354,980
Sending MMS through Intents in android to a particular number
<p>I have code to send MMS through intents.</p> <pre><code>Intent sendIntent = new Intent(Intent.ACTION_SEND); if(filename != "") sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + Environment.getExternalStorageDirectory()+ "/"+filename+".jpg")); sendIntent...
android
[4]
5,036,024
5,036,025
dynamic tree creation using jquery
<p>i Want to create dynamuc dree using jquery at client side and java(jsp/servlet) at backend using mysql database.Please suggest me how can i implemet that.I want to add further functionality like add node,add child,add leaf node.</p>
jquery
[5]
1,023,685
1,023,686
How to update the right span?
<p>On my forum-based website, I have a link below every post for reporting spam or abuse. Whenever this link is clicked, a web service is called on the server, when the call returns, the span containing the link (see the code below) is updated with something like 'Post reported' or if an error occurs it shows something...
javascript
[3]
5,057,288
5,057,289
create edit text only accept or able to enter only alphabetical character from a-z only android
<p>i want to make a edit text in which can only be able to enter only alphabatical character means from a-z no other numeric or special charaacter are not allowed so how to do it?</p> <p>i had tried </p> <pre><code>&lt;EditText **android:inputType="text"** android:id="@+id/state" android:singleLine=...
android
[4]
5,383,459
5,383,460
Variables Variable (Creating variable with the name of another variable)
<p>i want to create a new variable with a variable name, for example:</p> <pre><code>function preloader(imglist) { var imgs = imglist.split("|"); for (i in imgs) { var img_{i} = new Image; //this is the line where i sucked in! img_{i}.src = imgs[i]; //another line where i sucked in! } } ...
javascript
[3]
2,096,285
2,096,286
Confirm message with javascript returns error
<p>I have problem with confirm message.... When I clicked the browser close button it shows confirm message with OK and CLOSE button....</p> <p>When I click ok button the browser get closed... If I click cancel it need to stay on the page...But when I click cancel button the browser get closed....</p> <p>MY CODE IS H...
javascript
[3]
2,691,132
2,691,133
Why does a function have the word constant at the end even though it does change a variable
<p>My understanding of the keyword 'const' is that it says to the compiler, that the function will not modify any of the variables but in the following example it changes <code>b.d</code>. why?</p> <pre><code>myClass operator + (myClass b) const { b.d += d; return b; } </code></pre>
c++
[6]
765,179
765,180
Why is context getting passed in to this method
<p>I can't figure out why the context is getting passed in to this method: <a href="http://code.google.com/p/cloud-tasks-io/source/browse/trunk/CloudTasks-Android/src/com/cloudtasks/Util.java#119" rel="nofollow">http://code.google.com/p/cloud-tasks-io/source/browse/trunk/CloudTasks-Android/src/com/cloudtasks/Util.java#...
android
[4]
5,786,957
5,786,958
function to get the name of any method?
<p>I would like to have a function called <strong>GetMethodName</strong> such that the following code would print "myMethod":</p> <pre><code>int myMethod(string foo, double bar) { // ... } Console.Out.WriteLine(GetMethodName(myMethod)); </code></pre> <p>This should work no matter what the method signature myMeth...
c#
[0]
221,452
221,453
javascript variable declarations after return statement
<p>I was looking at some minified javascript code (from github), and the code has a block that looks like</p> <pre><code>h = function(a, b, c, d) { var e, h, i, j, k, l, m = this; return i = $("#js-frame-loading-template").clone().show(), l = c === "back" ? 350 : 500, j = i.find(".js-frame-loading-spin...
javascript
[3]
4,338,209
4,338,210
PHP register clicks to callto: link
<p>Is there any way of registering clicks to a callto: link with the use of PHP? I've set up a site for a friend of mine and what I would like to do is to create a log of some sort to show who called who eg. if the current user clicks the callto: link I'd like to add a row to the database like "userX called numberY at ...
php
[2]
3,356,041
3,356,042
trying to calculate an estimat of e^x, where x is an integer entered by the user
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/827706/calculating-ex-without-using-any-functions">Calculating e^x without using any functions</a> </p> </blockquote> <p>my attempt</p> <pre><code>#include &lt;iostream&gt; #include &lt;iomanip&gt; using namesp...
c++
[6]
2,749,973
2,749,974
Hiding graphics created by 'Graphics'
<p>I have not studied much of the Graphics class in C# but have found myself needing it for my day to day fun times (coding to pass time).</p> <p>I would just like to know if there is a way to store the graphics drawn (before they are visibly seen on a form) so that I may have the whole segment drawn at the same time ...
c#
[0]
3,370,428
3,370,429
Read all text files in a folder with StreamReader
<p>I am trying to read all <em>.txt</em> files in a folder using stream reader. I have this now and it works fine for one file but I need to read all files in the folder. This is what I have so far. Any suggestions would be greatly appreciated.</p> <pre><code>using (var reader = new StreamReader(File.OpenRead(@"C:\ftp...
c#
[0]
1,274,143
1,274,144
Adding an int, a byte, a long, and a float
<p>If you try to add an <code>int</code>, a <code>byte</code>, a <code>long</code>, and a <code>float</code>, what kind of data type is the result? (<code>float</code>, <code>long</code>, <code>byte</code>, <code>int</code> or is it even possible?)</p>
java
[1]
4,409,984
4,409,985
get text from textview .. by id that set programmatically
<p>I have 3 <strong>TextView</strong> objects, that I created programmatically</p> <p>Every <strong>TextView</strong> was repeated 7 times and <strong>ontouchlistener</strong> for the layer that contain them.</p> <p>When <strong>onTouch</strong> on the layer, I want to <strong>gettext</strong> from one of the <strong...
android
[4]
3,729,407
3,729,408
window.location affected by escape key?
<p>I have a timer to refresh the page, and it's working:</p> <pre><code>updateCountdown = function() { if (Variables.Seconds == Infinity) { } else if (Variables.Seconds == 0) { $countdown.text('Bam!'); window.location.replace(Variables.PageName); } else { $countdown.text(Variables.S...
javascript
[3]
3,434,907
3,434,908
Immutability in Java
<p>If my class is going to be an immutable one it has to be <code>final</code> and without any method that modifies its state and all properties must be private. But why should it have properties declared as <code>final</code> (for example, <code>private final int a</code>)?</p> <p><strong>Edit</strong></p> <p>Will t...
java
[1]
2,500,324
2,500,325
What does * mean in Python?
<p>Does * have a special meaning in Python as it does in C? I saw a function like this in the Python Cookbook:</p> <pre><code>def get(self, *a, **kw) </code></pre> <p>Would you please explain it to me or point out where I can find an answer (Google interprets the * as wild card character and thus I cannot find a sati...
python
[7]
275,291
275,292
Dynamic array in C# (vb.net snippet)
<pre><code>Private Function getFoo(ByVal _FileInfo As FileInfo) As foo() Dim provider As New ExcelStorage(GetType(foo)) provider.StartRow = 2 provider.StartColumn = 1 provider.FileName = _FileInfo.FullName Dim res() As foo = provider.ExtractRecords() Return res End Function </code></pre> <p>I h...
c#
[0]
4,941,191
4,941,192
Reload page in iframe using jQuery
<p>How can I reload an aspx page in an iframe using jquery?</p>
jquery
[5]
4,762,633
4,762,634
certain output of x numbers
<p>i would like to make a program that takes an integer and gives a string of the amount of numbers of that integer. For example, if the integer is 7, it gives 7777777, or if its 3, it give 333. Thank you</p>
python
[7]
2,951,444
2,951,445
How to Send JSON String to server side in Android
<p>I creats one apps in android.I have fetch data from server side useing json but i have proble how to send json string or jso to server</p>
android
[4]
5,274,827
5,274,828
JQuery: html() is not working as expected
<p>I have a <strong>div</strong>:</p> <pre><code>&lt;div id="pageMessagesBox"&gt;&lt;/div&gt; </code></pre> <p>In a java script function I am trying to add some items inside my <strong>div</strong>:</p> <pre><code>$("#pageMessagesBox").html("&lt;a id='id'&gt;&lt;/a&gt;"); </code></pre> <p>But I've got the following...
jquery
[5]
2,858,340
2,858,341
Java Heap Memory error from socket
<p>I am trying to open a socket and listen. Clients written in PHP will then send XML requests. At the moment I am just send the string "test" to it and I am getting a Memory Heap Error. </p> <p>Here is my java code for the server:</p> <pre><code>import java.io.DataInputStream; import java.io.IOException; import java...
java
[1]
3,206,012
3,206,013
C++ Access violation when passing variable
<p>Heres my problem, if I pass a variable from class A to class B via function, then in class B pass that variable to other functions for testing then it works fine. But if I pass the variable from A to B then try assigning it to a variable in class B, it gives the error for no reason</p> <pre><code>//Globals.h enum ...
c++
[6]
1,037,932
1,037,933
$ not defined using jQuery in Wordpress
<p>I know that jQuery is loaded, because I can switch out the $ for 'jQuery' and everything behaves as expected, but this will be a messy script if I can't fix this</p> <p>This script:</p> <pre><code>jQuery(document).ready(function(){ $("ul.vimeo_desc_feed li a").click(function(){ alert($(this).attr('href...
jquery
[5]
3,287,285
3,287,286
jQuery No Conflict Mode for extra functions
<p>I'm sure this is a simple question, just can't seem to get it to work right.</p> <p>I was having some conflicts with jQuery, so I used the aliasing feature mentioned in the official documentation.</p> <pre><code>jQuery(document).ready(function($){ $('.loadmore').addClass('hidden'); // works fine! loadmore(); ...
jquery
[5]
5,212,596
5,212,597
How to get rad text box value length throw javascript
<p>I am using <code>radcontrols</code> in my project. How do I get rad text box value's length. If I entered <code>12345</code>, the length should be <code>5</code>. </p>
javascript
[3]
376,599
376,600
is it necessary to set up all banking account info in the iphone dev account before submitting a paid app
<p>I just wanted to know if its necessary to set up all the banking info before proceeding with submission of the actual paid app for the binary.</p> <p>Thanks and Regards, Harikant Jammi</p>
iphone
[8]
4,083,306
4,083,307
How to shuffle and display cards so that it is only displayed once
<p>How do I shuffle and display cards in Java so that they are only displayed once?</p> <p><code>Math.random()</code> has a chance of being shown twice.</p>
java
[1]
3,797,517
3,797,518
What is the best way to copy a folder and all subfolders and files using c#
<p>I need to copy a Folder from one drive to a removable Hard disk. The Folder which needs to be copied will have many sub folders and files in it. The input will be Source Path and Target Path.</p> <p>Like..</p> <p>Source Path : "C:\SourceFolder" </p> <p>Target Path : "E:\"</p> <p>After copying is done, i shud be ...
c#
[0]
2,607,700
2,607,701
Application pause/resume state
<p>My question is can i get to know when the entire application gets paused/resumed start/stop etc. For example if i have 5 activities in my application. Whenever any activity gets paused/resumed android notify the activity by calling the onPause/onResume methods.</p> <p>So there are two possible scenarios when my act...
android
[4]
5,770,831
5,770,832
jQuery select all link but exclude the link inside an iframe
<p>Suppose I have many links inside the the body, and many links inside an iframe, something likes:</p> <pre><code>&lt;div&gt; &lt;a herf=xxxxxxx&gt;...&lt;/a&gt; &lt;a herf=xxxxxxx&gt;...&lt;/a&gt; &lt;a herf=xxxxxxx&gt;...&lt;/a&gt; ... &lt;a herf=xxxxxxx&gt;...&lt;/a&gt; &lt;/div&gt; &lt;iframe src=xxx&gt; &lt;html...
jquery
[5]
3,374,192
3,374,193
force get/set access of private variables for private properties
<p>If I have a private variable that I want to have some internal validation on, and I want to keep that validation in one place, I put it behind a getter/setter and only access it thorugh that getter/setter. That's useful when dealing with public properties, because the other code cannot access the private variable, b...
c#
[0]
5,854,447
5,854,448
Download apk expansion file and move files into directory on sd card
<p>I'm looking into creating an apk expansion file for my application that would include files that i want to download and then move into an already existing directory in the external storage directory(SD card). But i cant find any information anywhere on how to do this or test that its working before i publish my app....
android
[4]
3,955,149
3,955,150
Rowfilter in Asp.net?
<p>In Web application, [asp.net] i am using rowfileter, can i write two columns like...</p> <pre><code>dataView.RowFilter = "Name='sasi' and lastname='surya'"; </code></pre> <p>is this possible, can you help me.</p>
asp.net
[9]