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 |
|---|---|---|---|---|---|
1,211,075 | 1,211,076 | Insert spaces based on words/dictionary | <p>I'm looking for a way to take phrases with no spaces in (such as a trending topic on twitter) and put spaces in where appropriate based on the words in the phrase. Presumably some sort of comparison with a dictionary would work?</p>
<p>For example: I'd have a function that took the phrase 'septemberwish' (current t... | php | [2] |
1,290,571 | 1,290,572 | error while adding new value for dropdownlist in javascript | <p>i need to add same value for two dropdowns in js
code is as follows</p>
<pre><code> var opt1 = new Option("All", 0);
document.getElementById('ddlfromGroupCountry').optons[0] = opt1;
document.getElementById('ddlFromCountry').optons[0] = opt1;
</code></pre>
<p>i am using same Option variable i.e opt1 for adding va... | javascript | [3] |
4,133,130 | 4,133,131 | On limiting JavaScript global variables | <p>I am reading a book that encourages the reader for a few reasons, to limit global variables. The technique they recommend is to define a global object variable, like the following:</p>
<pre><code>var myapp = {};
var myapp.another_stooge = {
'first-name': 'Lenny',
'last-name': 'George'
};
var myapp.propertie... | javascript | [3] |
2,390,854 | 2,390,855 | Waiting for a response in a thread | <p>I want to recycle my image , but since another thread is rendering them, I need to be sure that the rendering has stopped:</p>
<pre><code> private void unload() {
System.out.println("Unloading menu...");
loaded = false;
while(rendering) {
//wait
}
background.r... | android | [4] |
2,801,094 | 2,801,095 | asp.net inline versus codebehind which do you use and why? | <p>I've done it both ways, and to be honest other than the ability to give the code and webform to two different people (which doesn't happen where I work), I see very little advantage of one method over the other. I can understand how it is nice to have your code in one file, and markup in the other, but I can also un... | asp.net | [9] |
5,235,133 | 5,235,134 | How to setup ptp data transfer between android device and device such as camera? | <p>i would like to setup a connection between a android phone device and a external camera device. i would need to send and receive ptp data between these two devices.</p>
<p>do i use android mtp or use open accessory to achieve this? can anyone guide me in more details?</p>
<p>looking forward for any guides and sugg... | android | [4] |
5,521,694 | 5,521,695 | How to find the number of declared functions in a Java program | <p>I am doing project in Core Java which identifies the similarity between two files, in that one part is to identify the declared functions length. I have tried the following code to find the declared methods in a given class.</p>
<pre><code>import java.lang.reflect.*;
import java.io.*;
import java.lang.String.*;
pub... | java | [1] |
3,674,885 | 3,674,886 | Use jQuery to show/hide input based on another input's value | <p>I want to hide a specific input on a page unless a user types a Hotmail address into a different input. Whenever the user types in a hotmail address, I want to show the input. If the address is removed, I'd like it to disappear. How can this be accomplished with jQuery?</p>
<p>I know I'm going about this incorrectl... | jquery | [5] |
1,344,216 | 1,344,217 | saving recent searches to cookie | <p>I initially was saving the user's recent searches to a sessions array (php) which works but i am having a hard time getting around the (shared) server settings - to make it last 30 days. Since it's not sensitive data i thought I would retry this with jstorage/jquery instead. Is that possible across multiple pages? ... | jquery | [5] |
3,392,592 | 3,392,593 | how to hide a div on focus-out of child elements of that div(in java script) | <p>I want to hide a div on focusout of its child elements.say,</p>
<p>lets have username and password field in a div,it will be minimized initially, user will clicks opens the div then if user click anywhere outside the div should close the <code>mydiv</code> </p>
<pre><code><body>
<div id="mydiv" onblur="a... | javascript | [3] |
4,187,203 | 4,187,204 | Multiple Text Box Validation | <p>I need to validate multiple text-boxes, which share a common name</p>
<p>Example</p>
<pre><code><input type="text" name="value[]" />
<input type="text" name="value[]" />
<input type="text" name="value[]" />
</code></pre>
<p>How can I validate each and every text box, using jQuery? I am using jQu... | jquery | [5] |
3,877,890 | 3,877,891 | adding a picture to the middle of a drawn rectangle [iPhone] | <p>I have the following code that I am using to draw a simple rectangle inside the middle of a drawn circle, however I would like to be able to replace this rectangle with an UIImage, does anyone know how this can be done?</p>
<pre><code>CGContextSetRGBStrokeColor(context, 255.0/255.0, 255.0/255.0, 255.0/255.0, 1.0);
... | iphone | [8] |
5,366,899 | 5,366,900 | Check if an array contains an invalid value and return false? | <p>This is probably very simple but I guess I haven't had enough of coffee yet.</p>
<p>I have an array with four values and I want to check if any of them is invalid and then set a boolean value to false, else to true.</p>
<pre><code>bool validDecoding = false;
foreach (string decodedValue in arrayOfvalues)
{
if ... | c# | [0] |
228,381 | 228,382 | unterminated string literal | <p>The following code:</p>
<pre><code>var str= "<strong>English Comprehension<\/strong>
<br\/>
<ul>
<li> Synonyms/Antonyms/Word Meaning (Vocabulary)<\/li>
<li> Complete the Sentence (Grammar)<... | javascript | [3] |
4,205,227 | 4,205,228 | How to append and uniqify a tuple | <pre><code>d1 = ({'x':1, 'y':2}, {'x':3, 'y':4})
d2 = ({'x':1, 'y':2}, {'x':5, 'y':6}, {'x':1, 'y':6, 'z':7})
</code></pre>
<p>I have two tuple <code>d1</code> and <code>d2</code>. I know tuples are <code>immutable</code>. So I have to append another tuple using list. Is there any better solution.</p>
<p>Next questio... | python | [7] |
4,595,467 | 4,595,468 | How do you organize your Javascript code? | <p>When I first started with Javascript, I usually just put whatever I needed into functions and called them when I needed them. That was then. </p>
<p>Now, as I am building more and more complex web applications with Javascript; taking advantage of its more responsive user interaction, I am realizing that I need to... | javascript | [3] |
794,043 | 794,044 | Solving a linear equation with jQuery | <p>I don't know how to solve the following linear equation with jQuery.</p>
<p>12.5x = 20 + x + (20 + x)/10
(Note that 12.5, 20, and 10 are numbers provided by user)</p>
<p>Is there a way in jQuery to get x?
Thank you very much</p>
| javascript | [3] |
2,538,867 | 2,538,868 | Jquery paralax effect functions | <p>Basically, what I'm asking for is opinions on the best way to do the following;</p>
<p>I basically have this already: <a href="http://jsfiddle.net/BnJ3G/1/" rel="nofollow">http://jsfiddle.net/BnJ3G/1/</a> which is more or less a background animation depending on the scroll event. Similar to a paralax type function.... | jquery | [5] |
3,723,901 | 3,723,902 | benchmarking code in php | <p>I have some php code,</p>
<p>Something in the code (a large portion of code) is causing the page to take upwards of 30 seconds to load,</p>
<p>Is there an easy way to find out what part of the code is doing this?</p>
| php | [2] |
283,809 | 283,810 | Open Add Contact Screen with names already set | <p>I'm trying to open the 'Add Contact' screen via intent, and I want it with the names alread set, I mean, the first name and the family name.</p>
<p>For that, I'm trying to do this:</p>
<pre><code> Intent intent = new Intent(Intent.ACTION_INSERT);
intent.setType(ContactsContract.Contacts.CONTENT_TYPE... | android | [4] |
5,248,928 | 5,248,929 | destructor is never called | <p>sorry for my inattension, in short the <code>~CSArray()</code> is work, but interface and implementation of the class there was in different files, so mistake is here </p>
| c++ | [6] |
4,162,605 | 4,162,606 | How to draw a dynamic line graph in Android ? | <p>I've got a requirement for my application is to draw a line graph that can be changed on the fly. Eg. A heartbeat graph, a graph that represents the temperature etc..</p>
<p>How can I achieve this in a non-JS way on android?</p>
| android | [4] |
5,534,409 | 5,534,410 | How to get Interent speed in android? | <p>I am using SOAP Parser in my programme.But some time is Internet very slow.So i need to check the internet speed . Please can give me some code. Even i was use 2G and 3G and wifi also.</p>
| android | [4] |
1,730,727 | 1,730,728 | What does this Javascript code mean? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2851404/what-does-options-options-mean-in-javascript">What does “options = options || {}” mean in Javascript?</a> </p>
</blockquote>
<p>Looking at the YouTube source...</p>
<pre><code>var yt = yt ||... | javascript | [3] |
2,198,169 | 2,198,170 | What am I doing wrong with this simple javascript? | <p>I have the following code: <a href="http://jsfiddle.net/LvdcU/3/" rel="nofollow">http://jsfiddle.net/LvdcU/3/</a></p>
<p>I don't understand why I keep getting the following error:</p>
<blockquote>
<p>Uncaught ReferenceError: updatetotalorderCals is not defined</p>
</blockquote>
<p>I'm sure this has everything t... | javascript | [3] |
1,622,889 | 1,622,890 | Function gets defined although code block is not executed | <p>I use the following code to use <a href="http://jsgettext.berlios.de/" rel="nofollow">JS Gettext</a> if the language is German.</p>
<pre><code>if (lang == "de") {
var gt = new Gettext({"domain": "tag_cloud", "locale_data": json_de_data});
function _(ident) {
console.debug('gt.gettext("'+ident+'")');... | javascript | [3] |
4,562,325 | 4,562,326 | android string gallery can't display from beginning of the screen | <p>i had creating string gallery but android string gallery can't display from beginning of the screen. it displayed. any solution?? </p>
<p>thanks inn advance.</p>
<pre><code>private Context cont;
private String [] stringid=new String[]{"Index-Nifty","Positional calls","Intraday calls","InvestmentIdea","Optional cal... | android | [4] |
5,475,233 | 5,475,234 | Is this illegal syntax? | <pre><code><script type="text/javascript" language="JavaScript">
<!--
alert('foo');
//-->
</script>
</code></pre>
<p>It's used all over in my company's grails app, but I know <code><</code> is an illegal javascript character...</p>
<p>Should the <code><!--</code> be like <code>//<!-... | javascript | [3] |
2,325,509 | 2,325,510 | Fill ComboBox Dynamically in asp.net.. help required | <p>The Scenario which i have thought and which i want to do is that I have 2 combo boxes.. One of Country and One of Cities.. On Page Load, Country Combo box must be filled with the corresponding values present in the Database and at that time My Cities Combo box should be hidden.. By selecting the Country from the Fil... | asp.net | [9] |
4,236,660 | 4,236,661 | Strang behavior with Android ListView footer click - delayed and or misordered firing | <p>The click event associated with the ListView footer sometimes takes a long time to fire, especially after extensive scrolling has taken place. The regular list item clicks always fire immediately. Stranger still, when a regular item is clicked while the footer click is still waiting to process, it will fire immediat... | android | [4] |
1,366,314 | 1,366,315 | Keeping only a certain line and deleting the rest in C# | <p>I was wondering if anyone could give me a quick example of how to do this. What I want to do is parse a .txt file and delete everything but lines containing "Type: Whisper", is there any way to achieve this with relative ease?</p>
| c# | [0] |
2,002,602 | 2,002,603 | Chat app vs REST app - use a thread in an Activity or a thread in a Service? | <p>In Virgil Dobjanschi's talk, "Developing Android REST client applications" (link <a href="http://code.google.com/events/io/2010/sessions/developing-RESTful-android-apps.html#" rel="nofollow">here</a>), he said a few things that took me by surprise. Including:</p>
<ul>
<li><p>Don't run http queries in threads spawne... | android | [4] |
2,752,145 | 2,752,146 | grouped table view like iphone contacts | <p>I'm new to Xcode and I'm trying to create an app which has a tableview. Ideally it should look pretty similar to the standard contacts app on iphone/ipod touch. So the tableview should show the names of my friends, and the detail view should show address, email, phone number and a picture etc. The only difference is... | iphone | [8] |
4,699,561 | 4,699,562 | JQuery Qtip not working in IE | <p>I am using the QTIP plugin to create a tool tip over some text. It works great in firefox but not in IE. my code for the page looks like this</p>
<pre><code><script type="text/javascript">
$(document).ready( function() {
$("#label_PERSONAL").qtip({
content: 'this is a test!',
... | jquery | [5] |
2,264,554 | 2,264,555 | How can I create online support like this link (in Persian sayed سایت همسریابی)? | <p>How can I create online support like that of <a href="http://www.hamsaronline.com/contactus/default.aspx" rel="nofollow">this site</a>?</p>
| asp.net | [9] |
2,901,789 | 2,901,790 | How do I make a draggable appear in a div after some event? | <p>i am making a game like monopoly, there are some chess which are draggables on the game board,</p>
<p>when some event happens, they will be prisoners and needed to go to a div as jail.</p>
<p>Does anyone have an idea of how to do it? Sorry for my English.</p>
| jquery | [5] |
4,325,407 | 4,325,408 | When creating a model in Django why does the class inherit models.Model instead of just Model? | <p>I am having trouble understanding inheritance in django models</p>
<p>If I create a model in django:</p>
<pre><code>from django.db import models
class Person(models.Model):
name = models.CharField(max_length=200)
</code></pre>
<p>Can't I just I write</p>
<pre><code>class Person(Model):
</code></pre>
<p>Sinc... | python | [7] |
5,082,513 | 5,082,514 | Which is the first method called when Java executes a program? | <p>I am learning core Java and I have one question, "Which is the first method called when the program is executed?"</p>
| java | [1] |
1,261,066 | 1,261,067 | To return first on error or on success | <p>Every day I always come across this dilemma - is it best practice to check for an undesired state at the start of a function and return straight away or, is it best practice to check for a desired condition and continue else return false.</p>
<p>I understand that there wont be a 1 fits all solution and that this is... | php | [2] |
4,701,697 | 4,701,698 | Graphics on Android: path with smooth curves? | <p>I want to draw a chart for a function y=x^2 as follows:</p>
<p><img src="http://i.stack.imgur.com/c8fVa.png" alt="enter image description here"></p>
<p>but the curve is not smooth as it is a set of connected lines.</p>
<p>how can I make the curve smoother ?</p>
<p>thanks</p>
| android | [4] |
1,410,251 | 1,410,252 | Pass string value from broadcast receiver to a service | <p>I want to pass a string value from broadcast receiver to a service.If someone could please illustrate with an example.
thanks</p>
| android | [4] |
511,046 | 511,047 | assigning variables from $key and $value for all objects in the array | <p>I have a function that I need to pass 4 distinct variables to, and these variables values come from an array:</p>
<pre><code>$pagesArray = array(
'pre-file1.html' => 'blahblah1',
'post-file1.html' => 'blahblah2'
);
$file1 = 'blahblah1';
$file2 = 'bla... | php | [2] |
1,293,261 | 1,293,262 | jQuery how to select children elements the proper way | <p>If I have the following html</p>
<pre><code><div id="parent">
<div id="item1"></div>
<div id="item2"></div>
<div id="item3"></div>
</div>
</code></pre>
<p>What would be the proper way to select children of the parent div.</p>
<p>I have the following:</p>... | jquery | [5] |
4,637,033 | 4,637,034 | SharedPreferences from different activity | <p>I load from activity A the SharedPreferences in following way:</p>
<pre><code>private void SavePreferences(String key, String value){
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putString(k... | android | [4] |
2,413,594 | 2,413,595 | Tracking mouse motion during click with JQuery | <p>How do you track mouse motion after mousedown until mouseup using JQuery? Tracking should start when some target element is clicked and continue to mouseup, even when the mouse moves out of the target element.</p>
<pre><code><div id="some_elt">
<div id="target">
</div>
</div>
</code></... | jquery | [5] |
5,348,821 | 5,348,822 | Zipping a byte[] from a txt file | <p>I need to read a txt file, convert it from UTF8 to ISO8859-1 and store the textfile into a zip.</p>
<p>This is what i got so far:</p>
<pre><code>Charset utf8charset = Charset.forName("UTF-8");
Charset iso88591charset = Charset.forName("ISO-8859-1");
File file_in = new File("Input/file1.txt");
File file_out = new ... | java | [1] |
5,678,060 | 5,678,061 | Python:: Turn string into operator | <p>How can I turn a string such as "+" into the operator plus? Thanks!</p>
| python | [7] |
3,213,202 | 3,213,203 | Data Sharing between android and personal computer | <p>I like to make an android app which helps the user to share and send data from application to pc. How i can start doing this. Please help</p>
<p>Regards
Mohammed Suhail.</p>
| android | [4] |
4,134,088 | 4,134,089 | iPhone - custom UIImagePickerController | <p>I am showing a UIImagePickerController in an app that just works with videos. So, it is nonsense to show pictures to users.</p>
<p>I have changed all properties I see on the controller but the picker shows like the next picture.</p>
<p>Two questions:</p>
<ol>
<li>How do I get rid of this choice and show just the ... | iphone | [8] |
5,395,934 | 5,395,935 | in which file can i change the value of magic_quotes_gpc = 0 in PHP | <p>In which file can I change the value of </p>
<pre><code>magic_quotes_gpc = 0
</code></pre>
<p>in PHP?</p>
<p>Thanks in advance.</p>
| php | [2] |
4,562,221 | 4,562,222 | Position views at specific location? | <p>Is there a way to place widgets / views on the screen at any specific position required?</p>
<p>Something like a calendar with daily events that could overlap.
e.g. if every hour in a day is represented by 1 hour and there are 2 appointments that overlap partially (say 12:00 - 12:30 and 12:20 - 01:00) this would be... | android | [4] |
877,407 | 877,408 | Removing/Adding Querystring in Window.Location.Href using JQuery | <p>I am using JQuery and stuck with one issue and need your help and guidance.</p>
<p>I want to do below three points in my current <code>window.location.href</code>:</p>
<ol>
<li><p>I want to add <code>?mode=ssl</code>, if we don't have any querystring in my <code>window.location.href</code></p></li>
<li><p>I want t... | jquery | [5] |
1,350,329 | 1,350,330 | Is there any online python exercise? | <p>I am teaching a colleague Python and I think he should do some exercises.</p>
<p>Is there any online available other than python challenge? I feel that python challenge is puzzles, not exercises.</p>
| python | [7] |
1,801,161 | 1,801,162 | Why doesn't this throw a SyntaxError instead of silently interpreting it wrong? | <p>There is supposed to be a comma between these two strings</p>
<pre><code>foo = ['dumb'
'error']
</code></pre>
<p>But if you forget the comma, it just merges the strings together instead of producing a syntax error. Your result will be </p>
<pre><code>['dumberror']
</code></pre>
<p>I spent hours tracking this dow... | python | [7] |
3,120,752 | 3,120,753 | Append hidden type of input tag within ASPX? | <p>I want to have a hidden <code>input</code> tag in my HTML page , so i tried the following:</p>
<p><code><input type=hidden runat=server id=currentItem value="runtime_determinted" /></code></p>
<p>But it won't got displayed on client , so I can't find it with javascript.</p>
<p>If the the tag isn't run at se... | asp.net | [9] |
173,485 | 173,486 | jquery wait till previous function call ends | <p>Please refer the below called function in our project.</p>
<pre><code> var obj; // this will modified in A() function
function c()
{
A();
B(obj);
}
function A()
{
for(i=0;i < object.length; i++)
{
if(object.data.toString()=="remote data")
processRemoteData();
else
processDa... | jquery | [5] |
4,229,454 | 4,229,455 | format-bar for UITextView | <p><img src="http://i.stack.imgur.com/AlVFp.jpg" alt=""></p>
<p>how can i add or program this format bar or kind of similar thing my code?? any one have idea about this?? </p>
| iphone | [8] |
5,898,084 | 5,898,085 | Remember me checkbox dont save the username and pass when open the app again | <p>remembered password means if i enter the username and password then enabled the remember password checkbox means it is successfully login.then i clicked logout means it is loggedout.
but again i open app the username and password is displayed on d edittext know...
but when i loggedout on my app is loggedout after... | android | [4] |
5,551,386 | 5,551,387 | Redundant thumbnails are loaded when a video doesnt has a thumbnail using async tasks | <p>I am using async task for loading thumbnails. For videos which have thumbnails in database are loaded properly. But the video which doesnt have thumbnail are loaded with random thumbnails (the previous video thumbnail). </p>
<pre><code> final Bitmap immutableBMap =
MediaStore.Video.Thumbnails... | android | [4] |
386,668 | 386,669 | JQuery: tying to use .html() but the new content takes on link characteristics of the original selector/element | <p>I have four links and I would like content to appear in a div(.contentcont [name of div]) below the list of links for that particular link that was clicked. </p>
<pre><code>$('.link1').click(function(e){
$(this).clone().html('<h1>Text appear</h1>')
.appendTo('.contentcont')
e.preventDefau... | jquery | [5] |
3,632,324 | 3,632,325 | I want my app to be installed only in tablet | <p>I have an android application. I need to upload in the android market. I have developed this app in "Honeycomb".This app is only for android tablets. <em>I designed the layouts for tablets only (600x1024).</em> I want this app to install only in tablets from android market and not in android phones. I really don't ... | android | [4] |
5,420,507 | 5,420,508 | Nested quotes and variable concatenation | <p>I'm struggling with a complex nested quotes statement here :</p>
<pre><code>var name = "foo";
$("#list").append("<li data-theme='c'><a href='#details' onclick='sessionStorage.name=PRINT_VAR_NAME_HERE;' data-transition='slide'>PRINT_VAR_NAME_HERE</a></li>");
</code></pre>
<p>I am able to pri... | javascript | [3] |
4,573,309 | 4,573,310 | Encoding Bytes in Python3 | <p>What type of codec is the best to encode binary files what are upload to an app write in Python 3?</p>
| python | [7] |
3,640,174 | 3,640,175 | The call sequence of the Constructors between Derived Class and base class | <p>I've known that if B is derived from A, then when I create a new object of B, for example b, the constructor of A will call first. When I destroy the object b, The destructor of B will call first. Then I have a question here, if there're more than one constructor in the Base class, which constructor will call ? and ... | c++ | [6] |
1,714,301 | 1,714,302 | Enter Event to move to another textbox | <p>how I can move cursor from textbox to another when I press Enter key.</p>
<p>I know how to do that by tab key.</p>
<p>I wish if someone help me.</p>
| c# | [0] |
3,056,210 | 3,056,211 | To get the index of the TR | <p>I need to find out the position of the TR.</p>
<p>actually i got the index of the TD which is 291,
But i need to get the index of the TR contains the TD.</p>
<p>We can get the innerHTML by document.getElementsByTagName("td")[291].parentNode.innerHTML..</p>
<p>How to get the index of that parentNode i mean the TR... | javascript | [3] |
2,640,393 | 2,640,394 | How do I write my script for each link I want to redirect | <p>So I'm trying to redirect users from html links and element id tags, to other pages with javascript. I've figured out how to do one singular redirect but having trouble writing the code for multiple links heres what I have so far:</p>
<p>HTML:
</p>
<pre><code><head>
<script type = "text/javascrip... | javascript | [3] |
5,698,274 | 5,698,275 | Get Substring - everything before certain char | <p>I'm trying to figure out the best way to get everything before the - character in a string. Some example strings are below. The length of the string before - varies and can be any length</p>
<pre><code>223232-1.jpg
443-2.jpg
34443553-5.jpg
</code></pre>
<p>so I need the value that's from the start index of 0 to ... | c# | [0] |
5,097,558 | 5,097,559 | how to make a drawing buffer in java | <p>I'm new to java. and I want to create a game like snake. How can I make a drawing buffer java, where I can draw all the images? Like the background images, the objects such as the snake, etc.</p>
<p>Please advise.</p>
<p>Many thanks.</p>
| java | [1] |
628,811 | 628,812 | Java DecimalFormat.format does not format the number? | <p>I have the method below, but for some reason it is not formatting the area to have only one decimal. All help is appreciated.</p>
<pre><code>public double beraknaArea()
{
DecimalFormat formatter = new DecimalFormat("#0.0");
double area = 0;
area = radie*radie*3.14;
formatter.format(a... | java | [1] |
1,070,552 | 1,070,553 | Simple PHP help needed | <p>This is so simple, yet I cannot get my head into the logic.</p>
<p>Have a simple online form. Want to be able to adjust a variable after submitting. </p>
<p>If anyone can shed light on this one, would be really super appreciative!</p>
<pre><code>$chocolatebar = $HTTP_POST_VARS['chocolatebar'];
if $chocolatebar =... | php | [2] |
1,679,453 | 1,679,454 | boost::static_visitor with multiple arguments | <pre><code>typedef boost::variant<int, double> Type;
class Append: public boost::static_visitor<>
{
public:
void operator()(int)
{}
void operator()(double)
{}
};
Type type(1.2);
Visitor visitor;
boost::apply_visitor(visitor, type);
</code></pre>
<p>Is it possible to change the visitor su... | c++ | [6] |
746,756 | 746,757 | How to write a AVI decoder in a windows dialog using OpenGL,C++? | <p>How to show AVI files in a windows dialog using OpenGL,C++?</p>
| c++ | [6] |
361,501 | 361,502 | Last tweets within android activity | <p>I'm fairly new to android development and need to create an android app where in the bottom half of the screen it will be in list view displaying the last 2 tweets of a user.</p>
<p>As I'm new to android and API's I've looked everywhere for an easy to follow tutorial but none really do what I need. Any ideas?</p>
... | android | [4] |
3,264,066 | 3,264,067 | localscroll: How to fire event after scroll | <p>Hi I am using localscroll and it has an option to fire a function before the scroll takes place by using the onBefore parameter but there doesn't seem to be one for after the animation. Does anyone know how you can do it?</p>
| jquery | [5] |
3,150,489 | 3,150,490 | Add the elements of $b to the end of array $a in php | <p>I have 2 arrays.
I want to add the elements of $b to the end of $a. I checked google, nothing.</p>
<pre><code>$a=array(1,2,3);
$b=array(4,5,6);
array_push($a,$b);
print_r($a);
</code></pre>
<p>My goal is to make $a=(1,2,3,4,5,6) but the above doesn't work correctly...any ideas?</p>
| php | [2] |
1,769,900 | 1,769,901 | When I recieve a multipart data consisting of more than one image in HttpWebresponse. How do I parse the data to get the images? | <p>The data looks like --myboundary
Content-Type:image/jpeg
X-Status: 100
X-Timestamp: 1309285690
Content-Transfer-Encoding: BASE64
Content-length:25900</p>
<p>/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE... | c# | [0] |
1,661,700 | 1,661,701 | JavaScript function keyword appears to be preparsed when used declaratively? | <p>I just discovered that the following code executes without error (Chrome):</p>
<pre><code>console.log(fa);
function fa(){}
</code></pre>
<p>I was under the impression that:</p>
<pre><code>function fa(){}
</code></pre>
<p>was identical to:</p>
<pre><code>var fa = function(){};
</code></pre>
<p>My assumption had... | javascript | [3] |
662,845 | 662,846 | How do I round 4.3 to 4.5 | <p>Given a value that has 1 decimal place, how do I round that decimal place up a half step? </p>
<p>If I have a value of, say, <code>4.3</code>, how do I round that in PHP to <code>4.5</code>?</p>
<p>Other examples would be:</p>
<pre><code>3.8 >> 4.0
2.1 >> 2.5
0.9 >> 1.0
</code></pre>
<p>Also I ... | php | [2] |
4,555,845 | 4,555,846 | getting error for ambiguous symbol and need help to remove it | <p>i am getting this error which i unable to remove in visual studio 2010. i am using one third party library which uses its own definition for "string" Also visual studio's xstring file is there in the folder where it gets installed. now when i am trying to compile code i am getting following error</p>
<p>1>...\xyz.c... | c++ | [6] |
65,766 | 65,767 | C#, Component class | <p>In my current project I have been provided with a solution that contains 3 simple classes and 1 component class. There is some code in component class that i need to access in one of my simple class. I am trying to create an instance of component class but there is error that Component class does not exist. Please g... | c# | [0] |
1,531,735 | 1,531,736 | What is the best way to get an image from URL to ImageView in Android | <p>I am using a method to get the Image from URL when a button is clicked but it gets too much time, about 4-5 seconds to show an image sized only 6 kb using 3G not wi-fi. </p>
<p>My method is this;</p>
<pre><code>public static Bitmap getBitmapFromURL(String src) {
try {
Log.e("src",src);
URL url ... | android | [4] |
3,806,695 | 3,806,696 | How to assign velocities using a maxwell-boltzmann distribution in Java | <p>I am currently working on a model of gas particles in a container. When I initialise the particles I am currently giving them all the same magnitude of velocity (Varying +/- directions).. I need to find a way to change this so that the velocities follow a maxwell boltzmann distribution.</p>
<p>Does anyone have any ... | java | [1] |
2,814,325 | 2,814,326 | add something to nametuple | <p>I build</p>
<pre><code>Corpus = collections.namedtuple('Corpus', 'a, b, c, d')
</code></pre>
<p>Read all the files in the corpus and save the data,</p>
<pre><code>def compute(counters, tokens, catergory)
...
counters.stats[tokens][catergory] = Corpus(a, b, c, d)
</code></pre>
<p>Both tokens and catergory... | python | [7] |
196,462 | 196,463 | How to get the checkboxes dynamically in android? | <p>In my project I need to <strong>display questions and its options</strong>. <strong>Here the options are at max 20 with multiple answers.</strong> The options are not fixed for each question. That means for each question the options may be 2 or 3 or 6 or 18 or 2o. <strong>Since the question contains multiple answers... | android | [4] |
5,771,504 | 5,771,505 | Can't send attachments from application | <p>I am trying to send a PDF from my application but when I tap "Send" it does not get attached it seems. I can see the icon for the file in the mail application though.</p>
<pre><code>Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("message/rfc822");
intent.putExtra(Intent.EXTRA_SUBJECT, mailSubject);
... | android | [4] |
2,321,868 | 2,321,869 | whats is happen to the number of comparisons for selection, insertion, bubble and quick algorithms if the list is already sorted | <p>whats is happen to the number of comparisons for selection, insertion, bubble and quick algorithms if the list is already sorted</p>
| java | [1] |
605,475 | 605,476 | Unsatisfied Link Error when using System.loadLibrary()? | <p>For some reason, I'm getting a pesky Unsatisfied Link Error in my java app.</p>
<p>This is the offender in question:</p>
<pre><code>System.loadLibrary("psjw");
</code></pre>
<p>Despite the library psjw.dll clearly being in the same source package as this class.</p>
<p>Please help.</p>
| java | [1] |
5,745,136 | 5,745,137 | How to return String in anonymous class for a method returning void | <p>I'm bit confused. I have the following:</p>
<pre><code>public static String showInputDialog() {
Form frm = new Form();
final Command cmd = new Command("Ok");
final TextField txt = new TextField("Enter the text", null, 1024, 0);
frm.addCommand(cmd);
frm.append(txt);
frm.setCommandListener(new Comma... | java | [1] |
2,914,062 | 2,914,063 | jQuery If DIV Doesn't Have Class "x" | <p>In jQuery I need to do an if statement to see if $this doesn't contain the class '.selected'.</p>
<pre><code>$(".thumbs").hover(function(){
$(this).stop().fadeTo("normal", 1.0);
},function(){
$(this).stop().fadeTo("slow", 0.3);
});
</code></pre>
<p>Basically when this function is run (on hover) I don't want to p... | jquery | [5] |
1,910,763 | 1,910,764 | Terminate child processes spawned by a ProcessBuilder on *nix | <p>I'm executing a shell pipeline from a java program - it'll be something like</p>
<pre><code>ProcessBuilder builder = new ProcessBuilder(
"sh", "-c", "program1 | program2 | program3");
builder.start();
</code></pre>
<p>In some cases this unit might need to be terminated. However</p>
<pre><... | java | [1] |
295,865 | 295,866 | Storing all JS/CSS in PHP? | <p><strong>Background:</strong> I'm working on a single page web app that loads everything through AJAX and so started learning php a few days ago. I immediately thought of putting everything (html, css, javascript) in php files so that there is only one html file and one sprite request. For instance, external javascri... | php | [2] |
118,354 | 118,355 | Directory junction in PHP | <p>I am trying to create a hard-link with PHP. I know there are three kinds of links: Symlinks, hard-links, and directory junctions (hard-links for directories).</p>
<p>In PHP a symlink is the <code>symlink()</code> function, a hard-link is <code>link()</code>, but what for a directory junction?</p>
<p>I need to use... | php | [2] |
3,687,077 | 3,687,078 | how to display my hidden submit button below softkeyboard android | <p>I have two <code>EditText</code>s and one submit button but when I enter text in the EditText then my submit button hides below the soft keyboard so how to make it above keyboard when the keyboard appears, i.e., The Button should be visible. I have set a background image in the layout and stuck only two TextBoxs and... | android | [4] |
605,168 | 605,169 | How to uncheck checkbox before change() event is triggered | <p>I have lots of input fields in my form and on every field change serialized form data is sent to the server.</p>
<p>Now I need to prevent some check-boxes to be selected (can't use <code>"disabled"</code> attribute, <code>alert()</code> has to be triggered when clicked on these check-boxes). </p>
<p>I tried it wit... | jquery | [5] |
1,874,602 | 1,874,603 | Accessing DOM elements outside of $(this).each function() | <p>I have a div on a JSP that I want to populate when I mouse over items associated
with a particular css class but it looks like I'm hitting a scope issue. Any idea
what I'm doing wrong?</p>
<p>JSP:
$('.hoverTrigger').myFunc();</p>
Text goes here
<p>
<p>JavaScript .js file referenced by JSP:</p>
<pre><code>$.f... | jquery | [5] |
4,221,019 | 4,221,020 | Getting iteration counter in nested for loop | <p>I want a counter to keep count how many iterations in total I have done.
I do:</p>
<pre><code>counter = 0;
for i, item in enumerate(items):
for j, anotheritem in enumerate(anotheritems):
counter += 1;
</code></pre>
<p>But I can't help asking is there a more pythonic way?</p>
| python | [7] |
2,208,153 | 2,208,154 | JavaScript syntax | <p>I keep finding some JavaScript that looks like the example below. Can someone explain this as I have not seen JavaScript written like this before.</p>
<p>What is "SomethingHere" and the colon represent? I'm used to seeing function myFunction() but not what is shown below.</p>
<pre><code> SomethingHere: function ... | javascript | [3] |
1,591,605 | 1,591,606 | How accurate is the reading for GPS in iPhone's SDK? | <p>Using iPhone's SDK GPS API, how accurate can I get? Is it within a few meters or kilometers? I'm interested in the accuracy when it is indoor. <strong>My software will only be used in door.</strong></p>
| iphone | [8] |
4,411,046 | 4,411,047 | Can we customize the camera activity which opens by default in android..? | <p>Can we customize the camera activity which opens by default in android..?e.g apply overlay on this ..without using surface view</p>
| android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.