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
2,414,471
2,414,472
PHP select closest to variable
<p>Just wondering how I would select the closest variable. I have a set list of military times, i.e: 0030 0100 0130 0200 etc...</p> <p>All in half hour increments. How would I select the closest time to now. For example. User clicks on the button, php gets the time it is now, and selects the closest time variable. So ...
php
[2]
4,059,949
4,059,950
Confused about activity lifecycle usage in the notepad example
<p>I am confused about activity lifecycle usage in the notepad example,notepad example use "edit in place" user model,inserting new record in onCreate method, saving persistent state in onPause method,and save away the original text in onSaveInstanceState method. I am a J2EE programer,I can not understand the logic des...
android
[4]
5,506,655
5,506,656
onKeyDown() or onBackPressed()
<p>Hello every one i am new in android and i want to implement the back button functionality in my application because in application whenever i am clicking on back button in middle my control is going to login page directly ,so can any body tell me where to override <code>onKeyDown()</code> or <code>onBackPressed()</...
android
[4]
4,695,523
4,695,524
Filter elements that has ul not only with specific children
<p>How do I write jQuery selector to test if li has ul that has at least one li that is not .disabled (may be other classes or without class at all).</p> <p>Yes sounds complex but it's simple - I need to know if there're uls that do not have "disabled" class on inner lis.</p> <p>Something like </p> <pre><code>$("li"...
jquery
[5]
2,688,705
2,688,706
Back button works like home
<p>This is possible to do in this code:</p> <pre><code>@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { } return super.onKeyDown(keyCode, event); } </code></pre> <p>to when I click on back button he work like home button?</p>
android
[4]
4,174,226
4,174,227
ServletContext and Session object
<p>Is the ServletContext and Session object which we get from request object (HttpServletRequest) behave the same ?</p>
java
[1]
6,011,684
6,011,685
Display Image in Visual c++ windows application
<p>I am a beginner to visual c++ Windows application programming and I want to display an image on the screen but I don't know how. Can anyone help me? </p> <p>Most of the stuff I found on the net was about MFC application which I'm not interested in. I want this application to be as simple as possible so it's not sur...
c++
[6]
2,745,933
2,745,934
How to use the toString method in Java?
<p>Can anybody explain to me the concept of the <code>toString()</code> method? How is it used, and what is its purpose? <code>toString()</code> method define in the Object class this method is in java when get data and print data. this methodcall by default. the purpose of this method convert primitive data into objec...
java
[1]
5,073,988
5,073,989
Accessing a service/thread from different activities
<p>I'm writing a Bluetooth remote control application to control my Bluetooth enabled robot, but I have a hard time understanding the workflow of an Android application. I know what I want, but it's not very easy to do. Other responses haven't been satisfactory.</p> <p>Here's a rough application layout I want:</p> <p...
android
[4]
4,764,865
4,764,866
Resetting animation in Android without starting it
<p>I have an <code>AnimationDrawable</code> that is running. How to stop &amp; reset it so that it does not start again until <code>start()</code> is called? Calling <code>setVisible(true, true)</code> resets it, but also immediately starts animation, and I'd like to avoid it.</p>
android
[4]
2,924,616
2,924,617
How to find the object a function belongs to?
<p>Given a function, is there a way to find out the object that holds it?</p> <pre><code>var dog = { bark: function() { alert('dfd') }, name: 'Bill' } function getNameFromBark(barkFunc){ //How to implement this method? } getNameFromBack(dog.bark); //I would like this to return Bill. </code></pre>
javascript
[3]
2,183,494
2,183,495
How to add DataRow in string of arrray
<p>In the DataTable i have n number rows want add those rows in array?</p>
c#
[0]
4,187,101
4,187,102
Php Magic Methods and Empty
<p>Having the following code</p> <pre><code>class test { private $name; public function __get($name){ return $name; } public function __set($name,$value){ $this-&gt;name = $value; } } $obj = new test(); $obj-&gt;a = 2; if (!empty($obj-&gt;a)) { echo 'not empty'; } </code></pre>...
php
[2]
5,576,366
5,576,367
how would you implement an interface in java example calculator
<p>I've got a Calculator interface that contains</p> <pre><code>public interface Calculator { public void setOperator(char operator); public void setOperand (double operand); public double getResult(); } </code></pre> <p>How would i implement this in another class, for a basic calculator???</p...
java
[1]
4,057,648
4,057,649
javascript - set speed / pace
<p>I have a script which loops through an array of words, but how do I add a speed element to this?</p> <pre><code>words = ["Doe", "Ray", "Mee"]; count = words.length; currentWord = random(0, parseInt(count)); words[parseInt(currentWord)]; </code></pre>
javascript
[3]
690,885
690,886
Need help display indian city's current time using android
<p>Dear Friends,</p> <p>I am developing on android application for one Indian city,In my application contain information about some Indian city like weather,some place and current time. I need solution for wherever user launch my application ,my application will display Indian city's current time.How is possible to a...
android
[4]
2,247,145
2,247,146
Update WallPaper with text using c#
<p>I am doing an application that runs in background. Since there are no forms, I need to show some info on the desktop wallpaper. how can i achieve this ? The application need to update the info on wallpaper.</p>
c#
[0]
1,420,624
1,420,625
How to make recursive call (getTotalFiles) thread-safe?
<p>Im making a recursive file checking, the problem is i cant have counter inside the method itself, so that i declared it outside. But the problem is, this isnt thread safe.</p> <pre><code>private int countFiles = 0; private int getTotalFiles(String path) { File file = new File(path); File listFile[] = file....
java
[1]
5,306,065
5,306,066
how do you remove the navigation bar on Android?
<p>When I listen to a YouTube video fullscreen in landscape on my Galaxy Nexus, the navigation bar on the right disapear after a few seconds (the bar which contains the "back", "home" and "recent apps" buttons ). </p> <p>I want to do the same thing when a user watch a video in my app. What is the code to hide the navi...
android
[4]
4,349,465
4,349,466
Is it possible to upload Image to a website from Safari on iPhone?
<p>I'm trying to upload a photo from my iPhone to a website. However, the browse button to display the select file dialog is disabled. Normally this works fine on my HTC Mobile and all Android Mobiles. Should I be able to select image files to upload from Safari on iPhone?</p>
iphone
[8]
4,005,062
4,005,063
Alternative to Html.EditorFor in MVC 1
<p>I am following the mvcMusicStore tutorial and it is very good but the problem is that it asks me to include a html helper known as "<code>Html.EditorFor</code>". This html helper is not in MVC 1 which is what I am using. What else can I use to go around this? This helper is suppose to allow me to link the Edit View ...
c#
[0]
2,097,103
2,097,104
Why my .NET error log file is showing lots of NUL characters in it
<p>I am using c#, and I have got Logging in my project.</p> <p>When I see my log file, it is showing lots of <strong>'NUL'</strong> characters, just to correct you <strong>it is not 'NULL'</strong>.</p> <p>Please suggest what could be the reason of showing 'NUL' characters.</p> <p>Thanks.</p>
c#
[0]
2,122,681
2,122,682
Problem with my Javascript Code
<p>Could anyone tell me why this code doesn't work? I can't even get the alert(); in init() to work right...</p> <pre><code>window.onload = init; var downloadedstuff; function init() { alert(); $.get('example.php' + '?v=' + Math.random(), success: function (data) { downloadedstuff = data; }); doTimer(); }...
javascript
[3]
313,824
313,825
Pass variables with PHP that have '&' on them
<p>I'm passing this URL with Ajax to a PHP file: <code>amazon.com/?ie=UTF8&amp;showViewpo</code></p> <p>My problem is with the '&amp;' on the URL.</p> <p><code>$_POST['site']</code> will echo <code>amazon.com/</code></p> <p>How can I pass the variable so as to be able to get it whole on my PHP file?</p>
php
[2]
4,365,069
4,365,070
Using jQuery, how do I create a clone of a record sent to a database and apend it to a dom object?
<p>So, I have an "add item" script that creates an object in a database. Works great.</p> <p>I'd like to, once the object is successfully saved to the database, create a clone of that object in the view that will append to the list view. It will receive the id form the DB so it can be edited, but the rest can just be ...
jquery
[5]
1,712,409
1,712,410
PHP teaching supplements?
<p>I have a friend who has wanted to learn PHP for a while. She is very bright and picks things up quickly, so what I have been able to show her has helped quite a bit.</p> <p>I have been coding in PHP for ten years or so. The problem is that I can answer most any questions she has, but I do not have time to sit down ...
php
[2]
1,751,166
1,751,167
Android TabActivity and setContent(int idView) ---> RuntimeException
<p>I have created this little testcase:</p> <pre><code>public class MainActivity extends TabActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TabHost tabHost = getTabHost(); TabSpec spec; spec = tabHost.newTab...
android
[4]
295,411
295,412
How to store an array in a javascript cookie?
<p>Does anyone have a piece of javascript code that creates a cookie and stores an array in it? If you also have the code to read through through cookie and delete it, that would be great as well. Thanks!</p>
javascript
[3]
2,489,350
2,489,351
Select Different Div on JFlow Load
<p>I am using JFlow for my content slider and would like to select one particular slide on page load. It can be the 5th slide or the second one but I don't want to re-order the slides.</p> <p>Any ideas? <a href="http://www.webdesignbooth.com/step-by-step-to-create-content-slider-using-jflow-a-minimalist-jquery-plugin/...
javascript
[3]
918,272
918,273
meaning of error message
<p>what does this error message mean? destination of memory copy is too small</p>
c++
[6]
3,730,746
3,730,747
Inject New Methods and Properties into Classes During Runtime
<p>Is there any way we can inject new methods and properties into classes during run-time.</p> <p><a href="http://nurkiewicz.blogspot.com/2009/09/injecting-methods-at-runtime-to-java.html" rel="nofollow">http://nurkiewicz.blogspot.com/2009/09/injecting-methods-at-runtime-to-java.html</a> states we may do that by using...
java
[1]
3,718,499
3,718,500
Android 2.1GuessContentTypeFromName not working
<pre><code>String filename = Environment.getExternalStorageDirectory()+"/word.docx"; try{ File file = new File(filename); Uri path = Uri.fromFile(file); Intent viewDoc = new Intent(Intent.ACTION_VIEW); Log.i(TAG, "mime type "+URLConnection.guessContentTypeFromName(filename).toString()); viewDoc....
android
[4]
2,865,817
2,865,818
restaring slide show
<p>can anyone know stop and restating slideshow created using jquery. the following code makes problem while random selection. </p> <p>$('#left_actual').cycle('stop'); //slide show 1</p> <p>$('#right_col').cycle('stop'); //slide show 2</p> <p>$('#left_actual').cycle({ fx: 'all',</p> <pre><code> ...
jquery
[5]
2,124,450
2,124,451
How to get the value from a form in php
<pre><code>&lt;? if('POST' == $_SERVER['REQUEST_METHOD'] { $_SESSION['update'] = trim($_POST("wasUpdateClicked")_; } $wasUpdatedClicked = $_SESSION['wasUpdatedClicked']; if(isset($wasUpdateClicked)) { ..do something here like an update method } ?&gt; &lt;form name="x" method="post" ac...
php
[2]
4,832,682
4,832,683
Google.visualization.DataTable filtering not working
<p>I have a <a href="http://code.google.com/apis/visualization/documentation/reference.html#DataTable" rel="nofollow">DataTable</a> with 3 columns.<br> The method <a href="http://code.google.com/apis/visualization/documentation/reference.html#DataTable_getFilteredRows" rel="nofollow"><code>getFilteredRows</code></a> is...
javascript
[3]
5,804,657
5,804,658
Code Vs. Interface Builder Iphone
<p>I'm going through the Beginning Iphone Development Apress book and I'm constantly getting problems when building my NIB files. My practice apps crash because of the NIBS. I now this because I'll just trade out mine for the sample ones and the app will work. I'll look at the sample nib and all of my connections will ...
iphone
[8]
1,636,033
1,636,034
String difference with new additions and deletions
<p>I want to find the difference between two strings in java. The difference should be close to any file comparison tools. I have used longest common subsequence algorithm but still it is not pointing the exact expected difference. Any help with this regard will be much appreciated.</p>
java
[1]
3,644,891
3,644,892
Mapkit Array of Pins with Custom images and Details?
<p>Hello i have been trying to find a tutorial that show how to setup an array of locations with details and images and drop the array of pins on the map. </p> <p>would someone have a simple way of doing this this? links would be helpful.</p>
iphone
[8]
3,071,536
3,071,537
How to get position of a certain element in strings vector, to use it as an index in ints vector?
<p>I am trying to get the index of an element in a vector of strings, to use it as an index in another vector of int type, is this possible ?</p> <p>example: </p> <pre><code>vector &lt;string&gt; Names; vector &lt;int&gt; Numbers; .. if(( find(Names.begin(), Names.end(), old_name_)) != Names.end()) // condition t...
c++
[6]
717,473
717,474
Can one autoscroll NiceScroll JQuery Plugin?
<p>I have the <a href="http://areaaperta.com/nicescroll/" rel="nofollow">nicescroll</a> plugin working perfect, but what I need it to do is scroll to the BOTTOM of the latest update automatically. I don't need a <code>resize()</code> lesson, that works fine. It appears the plugin has no methods. </p> <p>Is there is a ...
jquery
[5]
4,100,932
4,100,933
Android Assetmanager string parsing
<p>I am attempting to parse an xml file referenced by a string using assetmanager, I have had a lot of help thanks to SO and this is what I have so far. </p> <pre><code>Document doc = db.parse(assetManager.open(Resources.getSystem().getString(R.string.FileName))); </code></pre> <p>String filename is my questions.xml ...
android
[4]
3,275,801
3,275,802
Adding a color filter to a Drawable changes all Buttons using the same Drawable
<p>I have a screen where multiple Buttons use the same background Drawable. I have reusable code I use in various projects to add an OnTouch listener that adds a gray color filter while a button is being touched. That usually works fine, but in this case ALL the buttons are tinted when any of them is pressed.</p> <p>I...
android
[4]
5,418,148
5,418,149
Can someone give me an overview of ASP.net and how it's different from technologies such as php?
<p>I've been doing the html and css for a site, sending it off to a guy to implement in a web server. I get a call from the designer freaking out about the progress, saying the clients aren't happy. He wants me to personally integrate my css with what's on the site. The site is done in ASP.net, time is short, and I'm a...
asp.net
[9]
5,023,132
5,023,133
Can I add parameters to a python property to reduce code duplication?
<p>I have a the following class:</p> <pre><code> class Vector(object): def __init__(self, x=0, y=0, z=0): self.x = x self.y = y self.z = z def _getx(self): return self._x def _setx(self, value): self._x = float(value) x = property(_getx, _setx) def _gety(se...
python
[7]
1,644,564
1,644,565
Android:How to move Ball on maze using accelerometer?
<p>Am developing game in android i did maze and ball is moving on maze using keyboard but am tryng to move ball by using Accelerometer please help me.........</p> <p>Thank You</p>
android
[4]
4,891,144
4,891,145
URL as a Variable in PHP
<p>I have a cool project where I need to upload an image via php/my_sql. That I can handle, but the images need to be linking to a certain url out of 100. In php can I save a url as a variable, then allow a drop-down menu of the 100 choices which point to a variable with a url?</p>
php
[2]
4,890,088
4,890,089
cannot define constructor as protected or private! why?
<pre><code>--- A.php ---- require_once 'B.php'; class A { public function __constructor($x){...} public function foo() { $b = B::getInstance(); ... } } --- B.php ---- require_once 'A.php'; class B extends A { protected static $_instance = null; protected function __construct...
php
[2]
1,628,108
1,628,109
Need Help Parsing Text Between HTML Tags
<p>Ok, the problem it's that i have string with HTML. I need to find an specific format like this: </p> <p><code>&lt;span class="fieldText"&gt;some text&lt;/span&gt;</code></p> <p>of that HTML, I need to extract <code>some text</code> and save it into a list. How can accomplish my goal.</p> <p>note that the text can...
c#
[0]
4,435,468
4,435,469
Determining the favicon file (.ico extension) on the client side?
<p>I know this is possible because this is how bookmarklets work for social bookmarking sites like delicious.</p> <p>1.) Google has an API that will pull it for you but it only works about 80% of the time.</p> <p>2.) Checking the default location host.com/favicon.ico does not work very often, maybe 50%.</p> <p>The l...
javascript
[3]
5,191,873
5,191,874
jQuery alert/output out elements help
<p>I need some help understanding how jQuery stores elements. Please have a look at this link: <a href="http://jsfiddle.net/NubWC/" rel="nofollow">http://jsfiddle.net/NubWC/</a></p> <p>I am trying to get the element id from all the heading tags that have a specific class and put that into an array so I can do somethi...
jquery
[5]
2,263,275
2,263,276
JavaScript, getting value of a td with id name
<p>Originally I was using input with an id and grabbing it's value with getElementById. Currently, I'm playing with <code>&lt;td&gt;</code>s. How can I grab the values of the <code>&lt;td&gt;</code>?</p> <p>Originally I used:</p> <pre><code>&lt;input id="hello"&gt; document.getElementById("hello").value; </code></pre...
javascript
[3]
3,893,306
3,893,307
Creating a javascript object with initial values, how?
<pre><code> objCar = function(values){ this = values; race = function(){ alert('car model:'+this.model+' car brand: '+this.brand+' was joined the race'); }; }; car = new objCar({'brand':'ford','model':'fiesta'}); car.race; </code></pre> <p>I want to objCar be started with a json va...
javascript
[3]
4,314,738
4,314,739
Get a vaule by key from nested hashtable
<p>I have a nested Hashtable that looks like this.</p> <pre><code> Hashtable table = new Hashtable(); Hashtable subtable = new Hashtable(); Hashtable options = new Hashtable(); options.Add("file","foo"); subtable.Add("post_option",options); table.Add(0,subtable); //foreach here </code></pre> <p>This is...
c#
[0]
1,411,445
1,411,446
Can an EditText be focused without having the cursor in it?
<p>When an EditText is focused, the cursor is visible in the text box. Can I make it disappear?</p>
android
[4]
5,188,136
5,188,137
What will this method return, true or false?
<pre><code>bool isValid = false; string username = "someadmin"; If( !String.IsNullOrEmpty(username) &amp;&amp; !( username.IndexOf("admin") != -1) isValid = true; </code></pre> <p>The second part with the double negatives is crossing me up!</p>
c#
[0]
5,372,233
5,372,234
run from a separate class
<p>So i need to run this class from a second class. How do I do that? Here's the code I want to run from a separate class: </p> <pre><code>import java.util.*; public class Numbers { int min(int a, int b, int c, int d, int e) { int min1 = Math.min(a, b); int min2 = Math.min(c, d); int min3...
java
[1]
4,517,264
4,517,265
Difference between the use of double quote and quotes in python
<p>Is there any difference between the use of double quotes to single quotes in Python? </p> <pre><code>"A string with double quotes" 'A string with single quotes' </code></pre> <p>Are they identical? Are there differences in how python interprets these strings?</p>
python
[7]
3,334,484
3,334,485
why it can add active to the a label?
<pre><code>&lt;ul id="nav"&gt; &lt;li&gt;&lt;a href="/about/"&gt;About Us&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/contact/"&gt;Contact Us&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/archives/"&gt;Our Archives&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/free/"&gt;Free Stuff&lt;/a&gt;&lt;/li&gt; &lt;/...
javascript
[3]
5,033,363
5,033,364
jQuery - how to simplify the code
<pre><code>&lt;script&gt; $(document).ready(function () { var lnkAgreement = $('#lnk-agreement'); if ($('#IsConsultant').attr('checked')) { lnkAgreement.attr('href', '@Url.Action("ServiceProviderAgreement", "Home")'); lnkAgreement.text('service provider agreement'); ...
jquery
[5]
2,313,888
2,313,889
const int = int const?
<p>For example, is</p> <pre><code>int const x = 3; </code></pre> <p>valid code?</p> <p>If so, does it mean the same as</p> <pre><code>const int x = 3; </code></pre> <p>?</p>
c++
[6]
5,360,883
5,360,884
C# Could not find file (any file) Windows 7 64bit
<pre><code>string[] targetFile = File.ReadAllLines(@"C:\d.txt"); </code></pre> <p>I get "Could not find file".</p> <p>I'm sure there is a d.txt at the root of C, any suggestions? i made a subdirectory called apples so c:\apples\d.txt i could still not read it.</p> <p>this guy had the same exact problem <a href="ht...
c#
[0]
2,400,963
2,400,964
TextBox text, into html page using asp.net?
<p>In webapplication, I am trying to convert the text in textbox to html page and it save in my solution explore. can you help me. Thank you.</p>
asp.net
[9]
3,240,035
3,240,036
QList<double> in QT with Visual Studio add in
<p>I am working on creating a simple List Widget that displays "double" values when a "run" button is clicked. The widget contains 20 rows and 6 columns. Right now, I would just like for the values to all be the same number. I have the widget displaying how I want it, however, I am new to C++ and am not sure how to g...
c++
[6]
121,051
121,052
Java Covariants
<pre><code>public class CovariantTest { public A getObj() { return new A(); } public static void main(String[] args) { CovariantTest c = new SubCovariantTest(); System.out.println(c.getObj().x); } } class SubCovariantTest extends CovariantTest { public B getObj() { ...
java
[1]
1,304,675
1,304,676
How to execute the "if" and "else" at the same time?
<p>Interesting problem:</p> <p>Change if statement and print out "Hello World" </p> <pre><code> public static void main(String[] args) { if(){ System.out.println("Hello"); }else{ System.out.println("World"); } } </code></pre> <p>My solution is to add "!System.ou...
java
[1]
4,496,974
4,496,975
Grab Text-Node after find()-usage
<p>I am using JQuery to show a tooltip-Box after clicking an image. So far, I can select the correct div(s) and then I can identify the correct sub-div which contains the text-node as well. Unfortunately I am not able to get the text node of the sub-div. What is wrong - I am getting 'null' after calling html() on curre...
jquery
[5]
5,962,143
5,962,144
Can I Use C++ vector insted of queue for FIFO order
<p>Hi all Can I use vector instead of queue ?. I just want to push and pop to and from memory using different thread . And also I need to delete data after pop. Is there any advantage using vector over queue ?</p> <p>Thanks in advance.... </p>
c++
[6]
4,475,714
4,475,715
JQuery clickin' buttons
<p>I'm making a small game for a school project, and basically there are 20 boxes. 10 boxes have a value of -2, 5 boxes have a value of 2, 3 boxes have a value of 0, and 2 boxes have a value of -5 and 5. So my question is, how can I determine which box was clicked with which value?</p> <p>Code to initialize my boxes:<...
jquery
[5]
5,375,025
5,375,026
C# for loop with already defined iterator
<p>I want to make a loop using an already-defined iterator. </p> <p>At present I am using </p> <pre><code>int i; while (i&lt;10) { Console.Writeline(i); i++; } </code></pre> <p>This is ugly because someone else might later remove the i++. If it is separated from the while statement by a large block of code, ...
c#
[0]
1,089,832
1,089,833
Do I have to re-query the DOM to get the jQuery selector within .blur()?
<p>I've searched a bit, but I'm not sure how to write the question to find the answer I want. </p> <p>Given the following jQuery snippet:</p> <pre><code>$('input').blur(function(e){ //can i get $('input') from within e? $('input').val(''); }); </code></pre> <p>How can I re-use the <code>$('input')</code> selecto...
jquery
[5]
1,298,087
1,298,088
ASP.net : What is the interest of <asp:?
<p>I have a very simple question for which I can't seem to find an explicit answer : What is the purpose of the <code>&lt;asp:</code> tag ?</p> <p>I mean, if I am building a form for example, what will be the difference between a <code>&lt;label&gt;</code> (html tag) and a <code>&lt;asp:label&gt;</code> (asp tag I gue...
asp.net
[9]
1,766,985
1,766,986
Adding Background image to UILabel
<p>How can i add a background image to a UILabel in an iPhone Application. I've tried to do it through IB but with no result.</p> <p>Can anybody help me..</p> <p>Looking forward to your reply.</p>
iphone
[8]
6,006,124
6,006,125
jQuery multiply and addition not adding total value
<p>Please take a look at the following URL: <a href="http://jsfiddle.net/XBtgD/2/" rel="nofollow">http://jsfiddle.net/XBtgD/2/</a>.</p> <p>The additions are working fine, however the multiplication part doesn't add up at all.</p> <p>Any ideas on how to get the multiplication working along with the additions?</p> <p>...
jquery
[5]
5,706,717
5,706,718
Duplicate iframe: Copy head and body from 1 iframe to another
<p>Simple question which I can't seem to find an answer of: I have two iframes on a page and I'd like to copy the content of the first one to the second. But I can't do it by just copying the url of the first iframe to the second since the containing page is a dynamic one.</p> <p>This code does do it, but a lot of the...
javascript
[3]
3,822,606
3,822,607
first row only from multiple rows - form
<p>Using the following code I am only getting the first row into the database. Looked at many examples but I still cannot see where I am going wrong.</p> <pre><code>// one box for each // &lt;input class="bginput" name="album_name[]" size="30" type="text"&gt; &lt;imput type="submit" Value="submit"&gt; &lt;?PHP fo...
php
[2]
5,359,316
5,359,317
How to write a Loop
<p>I am working on something and I am stumped with 2 things. </p> <p>The first is, I am trying to make a sort of counter that uses <code>PostMessage</code> to type from 0000 to 3600. I need it to stop every few times it PostMessage the number and execute another part of the code, then after that code is done continu...
c#
[0]
4,265,185
4,265,186
How to retweet a specific tweet?
<p>I wanna make a simple software that does the following:</p> <ol> <li>I tweet from a twitter account (eg 5 times a day)</li> <li>The software should retweet my tweets from the accounts that I am following my primary account</li> </ol> <p>This is all.</p> <p>What I did:</p> <p>I made a software to tweet from it. B...
c#
[0]
1,993,769
1,993,770
Finding a list item within a list item
<p>I'm a bit confused on how this works.</p> <pre><code>class TestClass { public int ID {get;set;} public List&lt;Stuff&gt; StuffList {get; set;} } class Stuff { public int ID {get;set;} public string Description {get;set;} } </code></pre> <p>So each <code>TestClass</code> has a list of <code>Stuff</c...
c#
[0]
1,938,398
1,938,399
jquery toggle between inputs
<p>I need to find a way to switch between four text inputs.</p> <p>Example Usage: </p> <p>Input Names:</p> <pre><code>input1a input1b input2a input2b </code></pre> <p>A user can only enter text in either inputs a or inputs b. </p> <p>If user clicks on input1a then he can only enter text in input1a and input2a. Inp...
jquery
[5]
4,555,824
4,555,825
jQuery mouseenter mouseleave animation queue
<p>So I have a problem with a mouseenter mouseleave animation. Basicly it just builds up and acts all weird.</p> <p>I know that with .animate to solve this problem you have to use a .stop() before hand, I have tried this on the mouseenter mouseleave and the fadein fadeout, but it doesn't work correctly.</p> <p>Here i...
jquery
[5]
1,289,119
1,289,120
Enable Media Volume Slider in Android application
<p>Some Android programs trigger the "media volume" slider when the hardware volume up/down buttons are pressed. My application seems to set the ringer volume when the hardware buttons are pressed.</p> <p>How would I enable the media volume slider? </p> <p>I would hate for users to have to go into their settings to c...
android
[4]
2,078,702
2,078,703
Decoding of QR code using Google Chart API
<p>I am making an app in which i have to encode and decode text into QR code. I have encoded the text using google chart API <a href="http://chart.apis.google.com/chart?chs=50x50&amp;cht=qr&amp;chl=abcdef" rel="nofollow">http://chart.apis.google.com/chart?chs=50x50&amp;cht=qr&amp;chl=abcdef</a>".</p> <p>If someone can...
android
[4]
3,603,663
3,603,664
return in jQuery.each
<p>can i have the implmentation for jQuery.each wherein if i find any match within the array which is been processed in jQuery.each, then i can break / return without further process the remaining elements.</p> <pre><code>&lt;ul&gt; &lt;li&gt;foo&lt;/li&gt; &lt;li&gt;bar&lt;/li&gt; </code></pre> <p> You can select th...
jquery
[5]
83,048
83,049
pass reference to array in C++
<p>Can any one help me understand the following code</p> <pre><code>#include &lt;iostream&gt; void foo(const char * c) { std::cout &lt;&lt; "const char *" &lt;&lt; std::endl; } template &lt;size_t N&gt; void foo(const char (&amp;t) [N]) { std::cout &lt;&lt; "array ref" &lt;&lt; std::endl; std::cout &lt;&lt;...
c++
[6]
3,997,440
3,997,441
How to use special characters in PHP in a command shell?
<p>For school we are forced to write a small program in BASIC or "any other language" so I will be doing it in PHP.</p> <p>I have to run it through command prompt, so thought I'd make a few improvements to the "UI" of the shell with lines etc. I used ALT+nnn to insert them into my code, but when I execute it in the sh...
php
[2]
1,924,736
1,924,737
Android Keystore Rebuild? is it possible
<p>Actually, I have lost my keystore of some of my apps. But I know the exact information which was into that keystore, I used same info written in .txt file for every keystore.</p> <p>Is there any way to restore, rebuild by using the info were into that keystore?</p> <p>Any ways to recover keystore?</p> <p>You help...
android
[4]
3,241,034
3,241,035
unable to connect to https site on via both code and native browser
<p>I have an android application that makes a https connection to a backend. I have successfully added the required certificate (obtained from the backend and converted to bks format) and the app can connect when running on 2.2, 2.3 and 4.0.2 emulators. However on my huawei u8860 (honor) with ics 4.0.3, the app doesn't...
android
[4]
4,633,124
4,633,125
flajaxian FileUpload triggered from the server side?
<p>In my asp.net webpage, it is required to view the progress of the uploading process. After some research, I found <a href="http://www.flajaxian.com/" rel="nofollow">http://www.flajaxian.com/</a> - a free asp.net with progress tool. </p> <p>However, If I have to specify different files to upload:</p> <pre><code>&lt...
asp.net
[9]
1,386,998
1,386,999
accordian menu slideToggle not sliding up
<p>I have created a super simple accordian menu. But I have run into a problem. The slideToggle is not working. I am not sure if it is because I am hiding the element on click and that is creating the confusion. If anyone could take a look, I woiuld greatly appreciate it. But I really am trying yo keep the code as SIMP...
jquery
[5]
1,090,643
1,090,644
use microphone to receive an inaudible tone?
<p>I am doing a project. I want to use the speaker of computer to generate an inaudible tone and microphone on smartphone to receive this tone. </p> <p>1.what software that can generate the inaudible tone (18- 20 Khz) through the speaker in PC ?</p> <p>2.A code android to receive and analyse some features (frequency,...
android
[4]
4,503,223
4,503,224
conditional functionality for ie7 in javascript
<p>There is anyway to find write a function that should work only for iexplorer7 and not for the other browser using javascript.</p>
javascript
[3]
4,714,156
4,714,157
custom windows form properties
<p>I have created a customize windows form and I just don't know how should I set properties to it.</p> <p>for example I've created a form with a progress bar, button, and a label and want to set the text of the label, the value of the progress bar, <strong>and to get access to the buttonClick Event method</strong> fo...
c#
[0]
5,045,778
5,045,779
jquery animate function option with opacity,height,width,left and top together
<p>can we use opacity,height,width,left and top together with jquery animate function</p> <pre><code>$('#div').animate({ opacity : 1, height : 300, // You desired height. width : 400 }); $('#div').animate({ opacity : 1, height : 0, width : 0 }); </code></pre> <p>if anyone has any idea then please share with me...
jquery
[5]
2,013,493
2,013,494
copy a 2d array in java
<p>i have a 2d array called matrix of type int that i want to copy to a local variable in a method so i can edit it </p> <p>whats the best way to copy the array, i am having some troubles</p> <p>for example</p> <pre><code> int [][] myInt; for(int i = 0; i&lt; matrix.length; i++){ for (int j = 0; j &lt...
java
[1]
955,793
955,794
iPhone problem with loading view with button
<p>In one of my classes I have a button that when pressed loads another view controller and view. This is what I use:</p> <pre><code>FormController *formController1=[[FormController alloc]initWithNibName:nil bundle:nil]; [self presentModalViewController:formController1 animated:YES]; </code></pre> <p>The problem is t...
iphone
[8]
2,959,929
2,959,930
Avoid Tabs from disappearing when searching
<p>i've got a tabbed layout, and on one of the tabs i have a search functionality. When the user makes a new search, i need to show the results. However, doing so involves starting another <code>activity</code> to handle the search results. </p> <p>this causes the tabs at the bottom to disappear. The user can get the ...
android
[4]
354,966
354,967
How to drag multiple images in android
<p>I can drag one image on canvas.Now I want to drag more than one image. Is there any possibility to do that?</p>
android
[4]
4,520,414
4,520,415
singleton config file
<p>Hey Guys I have a problem with a class and singleton method: I make this class whith the intention of use config values inside others class:</p> <pre><code>&lt;? class Config { public $values=array(); protected static $_instance = null; //Getters function __get($prop) { return $this-&gt;v...
php
[2]
2,441,798
2,441,799
python writing to a file
<p>I keep getting this "writing to a closed file error" while trying to compile the following code:</p> <pre><code>fout = open('markov_output.txt', 'w') for i in range( MAXGEN ) : # get our hands on the list key = (w1,w2) sufList = table[key] # choose a suffix from the list suf =...
python
[7]
5,601,724
5,601,725
PHP Date not calculating properly
<p>I have this code, and it prints out as '01/01/1970'</p> <pre><code>$dob = mktime(0, 0, 0, date("m"), date("d")-1, date("y")-18); echo "DOB is ".date("d/m/y", $dob); </code></pre> <p>Why is the year not 18 years less than today?</p>
php
[2]