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,749,793 | 1,749,794 | How to disable a form used in php? | <p>I have two forms named form1 and form2 in a php page. I have to disable the form2 on page load and enable it after clicked the submit button of form1.. please help me.. </p>
" method="post">
Enter Students Register Number:
" method="post" >
"text box to show details"
| php | [2] |
4,412,351 | 4,412,352 | C#: Shorten Code (Nullable Object, Return Property or String.Empty) | <p>I wondered if anybody can come up with a shortened version for this code:</p>
<p><code></p>
<pre><code>MyObject theObject = ObjectCollection.GrabAnObject();
if (theObject == null) return String.Empty;
else return theObject.myProperty;
</code></pre>
<p></code></p>
<p>Thank you!</p>
| c# | [0] |
2,206,822 | 2,206,823 | Check series of checkboxes according to string | <p>I have group of checkboxes nearly equals to 100 all are with name checkbox1...checkbox1oo. I am getting a string from database in the bit format. Now I need to check checkboxes using for loop according to everyposition for string..</p>
<p>just taking example. String is 10010. that means I have to select checkbox 1s... | javascript | [3] |
2,631,445 | 2,631,446 | json data repeat itself 2 times | <pre><code>$(document).ready(function() {
$("button").click(getir);
});
function getir() {
$.ajax({
dataType: "json",
url:"get.php",
success: function(datacall) {
$.each(datacall,function(index,vals) {
$("span... | jquery | [5] |
1,845,617 | 1,845,618 | Questions about what professional C++ programming is like | <p>I currently program professionally in C#, and since I started in 2008 I've been curious about what unmanaged, C++ programming is like. I've looked at the obvious answer -to look at the job descriptions online - but they're high-level descriptions and job requirements that don't really go into the details of what pro... | c++ | [6] |
3,959,358 | 3,959,359 | problem with step by step debugging in android | <p>i fairly new to android.
i mostly use Logcat for debugging but some times when the problem gets to evading i use breakpoints.</p>
<p>when i do so, i encounter the following problem:</p>
<p>if i find the mistake and change the mistake while debugging i get a warning message that the vm may not be able to include my... | android | [4] |
3,469,020 | 3,469,021 | Strange Multiple Definitions Error | <p>I have something like this in my code:</p>
<pre><code>namespace A {
namespace B {
void
GetLine(std::istream& stream, std::string& line)
{
line.clear();
while (stream.good()) {
std::getline(stream, line);
boost::trim(line);
if (not line.empty()) break;
}
boost::to_upp... | c++ | [6] |
1,598,097 | 1,598,098 | Need help about android mounting Sdcard | <p>Im working on "mount ntfs sdcard"
That is problem:
- If i mount sdcard to <strong>another folder</strong> than <strong>/mtn/sdcard</strong> then my sdcard working find
- If i mount it to <strong>/mnt/sdcard</strong> then android not except it : " The SDcard is not currently mounted"
In <strong>adb shell</strong> ... | android | [4] |
4,657,703 | 4,657,704 | Address a generated button for clickevent | <p>I have a class that creates panels with controls based on my database. It creates a panel with a button on each panel, per row in DB. How do I address one specific button to make a click event?</p>
<p>I'm a rookie, and maybe abit over my head, but you don't learn to swim in shallow water ;)
Any help appreciated!</p... | c# | [0] |
2,250,141 | 2,250,142 | How to run math action/function from a list in a specific order at any called time, one by one | <p>I'm trying to build an algorithm in java, which in ugly way looks like this:</p>
<pre><code>while (true) {
Point p; //a point given in the class constuctor.
p.x+=1*factor;
checkColor(p); // a function that returns true or false for a pixel color.
p.y+=1*factor;
checkColor(p);
p.x-=2*factor;
... | java | [1] |
353,614 | 353,615 | Pause your application | <p>I am developing an Android application. I want to quit my application but application should be in running state in background. Whenever I click on application application should start from last quit point. I dont want to login again.</p>
<p>The same thing is happening when I press home button. But I want to implem... | android | [4] |
3,873,766 | 3,873,767 | how do I pass date value from codebehind to markup page? | <p>I have this bit on codebehind:</p>
<pre><code>txtDBirth.Text = DateTime.Now.ToString("Mon dd yyyy")
</code></pre>
<p>We would like the date to appear in the format of Month Day Year as in Oct 07 2011</p>
<p>Then on the markup, I have this:</p>
<pre><code><asp:TextBox runat="server" ID="txtDBirth" CssClass="Te... | asp.net | [9] |
5,964,145 | 5,964,146 | how to create live obect using jquery | <p>There is Json array and i am using it to display my error messages.</p>
<pre><code>var errorMessages {
"E1":"Error Occured During Request Processing...",
"E2":"&nbsp;Enter User Name"
}
</code></pre>
<p>Next i want to display error messages base on error id </p>
<pre><code>function showMessage(errorId){
... | jquery | [5] |
18,500 | 18,501 | Game engines for Android | <p>After working on applications, I have now decided to start game development on Android. But I have no idea where to start with. I have worked on games in IPhone where I used <strong>Cocos2D</strong> and <strong>Box2D</strong> for developing the same. I am afraid can we use them in Android too? Also which game engine... | android | [4] |
4,900,610 | 4,900,611 | Events on dynamic created elements | <p>Please anyone who knows about the ThreeDubMedia jquery.event.drop. I am using code from the selection demo. Here's the link <a href="http://threedubmedia.com/code/event/drop#demos" rel="nofollow">ThreeDubMedia</a></p>
<p>I need the same drag-to-select functionality on dynamic elements.
For click events I just use j... | jquery | [5] |
2,746,765 | 2,746,766 | methods in Java | <p>Should a method be public or private?</p>
<p>To ensure encapsulation variables should be private and methods public..is that correct?</p>
<p>Declared variables in a method are they private ...?</p>
<p>If I have a method which is private (also the variables are private if my reasoning is correct) , is that an exam... | java | [1] |
1,549,291 | 1,549,292 | How to manipulate tcp sent packets and received packets in a certain application | <p>I would like to know what should I learn /what should I do because I want to do make a c# application to achieve the followings:</p>
<ul>
<li>How to intercept tcp packets sent by a certain application and how to view information from packets.
<ul>
<li>packets received ( the same thing)</li>
</ul></li>
</ul>
| c# | [0] |
592,724 | 592,725 | Java double URL Reader? | <p>Can anyone help me with the Java URL reader? </p>
<p>I have created an URL reader in Java that reads the link and sends it to a specific file.
How can I make the code read from two URL's and save it into a specific file ?</p>
<p>Here is my code :</p>
<pre><code>import java.net.*;
import java.io.*;
public class ... | java | [1] |
4,031,718 | 4,031,719 | Finish activity so counters reset | <p>I'm trying to make a game with score counters, round counters, etc, but what I find is that when I finish the game activity with the <code>finish()</code> method, the <code>ints</code> still have the same numbers as before, is there a way to get things to no longer persist in memory when the activity has been closed... | android | [4] |
739,429 | 739,430 | How to find element which caused event because of jquery .live | <p>How can I find ID of the element which caused an event as a consequence of .live (jQuery method) ?</p>
<p>The following is an example :</p>
<pre><code>$("form[data-f=true]").live("submit", function (evt) {
/*
If I have <input type="submit" name="Submit1" data-f="true" /> and this button is clicked... | jquery | [5] |
5,172,498 | 5,172,499 | How to show progressdialog in video view in android | <p>In my activity I have webview and video both are loading from webservice .first i have to show progress dialog for activty after webview loaded.i have to show progress dialog for video view upto video is started </p>
<p>thanks</p>
| android | [4] |
602,590 | 602,591 | bind method of javascript | <p>what is the use of bind() in javascript??</p>
| javascript | [3] |
920,166 | 920,167 | Time For iPhone, is there a cmos in iPhone to get time and date? | <p>I am trying to work on an app that requires time from the iPhone, but not from the iphone clock where user can modify it, is it possible?</p>
| iphone | [8] |
4,268,750 | 4,268,751 | Sorting Date and Time | <p>Am trying to write a console application to sort my date and time by ascending order based on start date, here is an example of I'm trying to do.</p>
<p>My input:</p>
<pre>
break Start1 = 15/02/12 12.30PM
break End1= 15/02/12 01.30PM
break Start2 = 15/02/12 11.00AM
break End2= 15/02/12 12.00PM
break Start3 = 15/02... | c# | [0] |
3,952,495 | 3,952,496 | Adding/removing items from JSON data with JQuery | <p>I have a JSON object as follows:</p>
<pre><code>var data = {items: [
{id: "1", name: "Snatch", type: "crime"},
{id: "2", name: "Witches of Eastwick", type: "comedy"},
{id: "3", name: "X-Men", type: "action"},
{id: "4", name: "Ordinary People", type: "drama"},
{id: "5", name: "Billy Elliot", type... | jquery | [5] |
1,332,837 | 1,332,838 | How does Python interpret this conditional? | <p>The problem I am working on is explained below:</p>
<blockquote>
<blockquote>
<p>2.1) Write a program that asks a user to input a color.
If the color is black or white, output "The color was black or white".
If it starts with a letter that comes after "k" in the alphabet,
output "The color starts... | python | [7] |
4,357,954 | 4,357,955 | jQuery. Get tag + class name | <p>I've got that html</p>
<pre><code><table>
<tbody>
<tr>
<td>
<input name="price" class="chrome-input" />
</td>
<td>
<button name="sellButton" class="chrome-button">
</button>
... | jquery | [5] |
4,739,308 | 4,739,309 | getting rel attr of link and using as text recurring | <p>I'm trying to get the rel attr from a set of links in a slider, to then use as the text for the control. I've got it working except it only lists the first rel multiple times, instead of multiple rels once. </p>
<p>My jQuery is</p>
<pre><code>jQuery("#slider li a").each(function() {
var yearValue = $(this).a... | jquery | [5] |
3,588,011 | 3,588,012 | Where Cache stored in asp.net | <p>I'm using the Cache object to store the Datatable.
like as below</p>
<pre><code>Cache["dt"]=dtsum;
</code></pre>
<p>If I store like this where cahce will store either at client side or serverside.
Previoulsy I was storing in Viewstate. But I was thinking of Viewstate that store data in page itself. so I'm storing ... | asp.net | [9] |
4,609,388 | 4,609,389 | jQuery build a form that submits w/o causing the browser to resubmit on back | <p>When you visit google.com and submit a search query. The form does not post but somehow the q param ends up in the URL allowing google to know what you're searching for. What's nice about this is that if you go back the browser doesn't ask if you want to repost.</p>
<p>What's a good way with jQuery to build a form ... | jquery | [5] |
2,246,040 | 2,246,041 | Strip specific spans tags using PHP | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1392346/php-strip-tags-for-div-with-a-specific-id">PHP Strip_tags for div with a specific ID?</a> </p>
</blockquote>
<p>I have a string that contains two types of span tags. One type has an id that starts with t... | php | [2] |
3,582,308 | 3,582,309 | removing string based on start index and end index | <p>So, I have bunch of long strings hence thinking of an efficient way to do this operation
Suppose I have a string something like</p>
<pre><code> "< stuff to remove> get this stuff <stuff to remove>
</code></pre>
<p>So, I am trying to extract "get this stuff"</p>
<p>So I am writing something like this.<... | python | [7] |
2,476,870 | 2,476,871 | Issues with inheritance (java) | <p>I was reading about how java avoids the deadly diamond of death, but i still have some questions. What if a class inherits a class and implements an interface and they each have a method with the same prototype? Or a method with the same name, same arguments, but different return types?</p>
<p>Thank you!</p>
| java | [1] |
351,669 | 351,670 | string to char to string to int | <p>Basically, what this code does is getting a number in any length from the user and sends it back to the user in a digit per digit form plus the sum of all the digits on the given number(e.g. 1234= 1, 2, 3, 4. sum=10). However, I can't make it work on a negative number. </p>
<pre><code> Scanner s= new Scanner(Sys... | java | [1] |
2,159,012 | 2,159,013 | Please help me in understanding Class in Python | <p>I am newbie and finding it very hard to grasp the syntax of Class in python. I have a background of C/C++, java and objective C. A very big difference which i am noticing in python is that you don't explicitly declare the "data members" in the class and you just randomly add them? And it leads to quite big confusion... | python | [7] |
1,539,020 | 1,539,021 | uilocalnotification problem | <p>I am working with uilocalnotifications.I have a problem with it.When i run it on simulator it is making sound.but when i run on device it is not making any sound.Tell me why?.Thanks in advance</p>
| iphone | [8] |
4,534,866 | 4,534,867 | Searching for strings and locating the line numbers that strings are located in [PYTHON] | <p>How can I search for strings and locate the line numbers that strings are located in?</p>
<p>For example</p>
<pre><code>>>> findlinenb('example.txt', ['desktop', 'connection', 'processor'])
desktop in 23
connection in 35, 38, 35
processor in 4, 5, 6, 8
</code></pre>
<p>My code:</p>
<pre><code>def findli... | python | [7] |
2,671,968 | 2,671,969 | Publish/Subscribe with different delegate types | <p>I'm using a simple sort of message broker in my app, where plugins can register to be notified for custom events. Uhm.. like this :</p>
<pre><code>class MessageBroker
{
Dictionary<string,List<Delegate>> SubscribersToEvent;
void SubscribeToEvent(string eventName, Delegate callback);
object R... | c# | [0] |
5,946,195 | 5,946,196 | How could i pass the text from div to Noty jQuery plugin | <p>I really like <a href="http://needim.github.com/noty/" rel="nofollow">Noty plugin</a> but i can`t understand how could i pass some text to it.</p>
<p>I`ve got the following flash messages markup: </p>
<pre><code><div class="flash-messages">
<div class="flash-message notice">Signed out successfully.&... | jquery | [5] |
4,348,757 | 4,348,758 | Is Android 2.0 backward compatible | <p>I have a CLIQ 1.5 and a Droid 2.0 each wired to my PC via USB. I have written an application that simply reads contacts from the device (not some linked account) and they show up fine on the CLIQ but an empty list appears on the Droid. Don't tell me I need two versions of this app??? My manifest is targeting the ... | android | [4] |
749,418 | 749,419 | android: radiobuttons aligned vertical and horizontal in same radiogroup | <p>I would like to have radiobuttons in one radiogroup divided into 2 columns and several rows. So far i have been able to divide them in a way that i put LinearLayouts inside radiogroup. Problem is they are not exclusive when I click on them (I can check all of them at the same time). Is there a way to make them exclu... | android | [4] |
3,370,532 | 3,370,533 | encoding from any language to utf in php | <p>I insert from csv characters from different languages.. </p>
<p>I apply this to every set of characters:</p>
<pre><code> private function process_elements($element){
utf8_encode($element);
return $element;
}
</code></pre>
<p>The problem is when they go into the database, they go like this:</p>
<p... | php | [2] |
3,098,902 | 3,098,903 | Dynamic alignment of a toggle button | <p>I have been working with android over past few months, but am still not sure of how to align a button dynamically. I did it using xml but then it becomes strongly typed ... which in my case is not required. So anyone please help me n tell me how to place a toggle button with the help of java code and not with xml.
F... | android | [4] |
2,715,132 | 2,715,133 | How to Open specific application using intent in android? | <p>I want to open an .ics file & i want to make sure that particular app should do that using intent</p>
| android | [4] |
5,623,366 | 5,623,367 | In my version of the game "hangman" i am getting an error in a function | <pre><code>#include <iostream>
#include "randword.h"
#include <fstream>
#include <time.h>
#include <cstdlib>
using namespace std;
bool hangmachine(char a[],string randi,char v){ //the Problem is in this function
bool retus=0;
for (int cc=0;cc<randi.length();cc++){
if(v==randi[cc]){
retus... | c++ | [6] |
1,137,960 | 1,137,961 | Android, trying to have a button on my app to allow user to give my app a review | <p>I have seen other apps have a button that allows the person to give the app a reviews from the app.</p>
<p>I cannot figure out how to do this, </p>
| android | [4] |
837,462 | 837,463 | Do not allow multiple instances of an activity of an Android app | <p>I'm trying to create a really simple application for Android that will play a music file (I'm really only just starting to get into Android). I have only one Activity that starts when the application starts, and it starts playing the music file. What I need is that the activity always runs (plays the music), whether... | android | [4] |
2,105,100 | 2,105,101 | CalCalendarStore not found | <p>I need to use CalCalendarStore but i'm not finding the header file or framework for it. I tried to find in /System/Library/Frameworks/CalendarStore.framework, but there's no framework with this name. What should I do?</p>
<p>regards!</p>
| iphone | [8] |
1,606,018 | 1,606,019 | Converting a String Operation to Short (JAVA) | <p>If the string is: </p>
<pre><code>String common_mpCon = "20+5*Math.ceil(2/7)"; //(equals 200 btw)
</code></pre>
<p>I'm trying to make the String do all the operations inside while it gets converted into a short. Is it possible? Using <code>Short.parseShort(common_mpCon)</code>, I get an exception thrown, with goog... | java | [1] |
4,445,477 | 4,445,478 | SMS Read/Write/Delete/Insert Android Application | <p>At the moment I am trying to create an android application that would allow me to view the sms sqlite database and delete,insert, edit and view records.</p>
<p>Currently I have only found information regarding developing a sending and receiving sms application. Has anyone created similar applications?</p>
<p>Any a... | android | [4] |
3,645,977 | 3,645,978 | Why is PHP $_FILES always null | <p>I have HTML like</p>
<pre><code><form action="send.php" method="post" enctype="multipart/form-data">
<div>
<label for="subject">Subject</label>
<input type="text" name="subject" />
</div>
<div>
<label for="image">Image</label>... | php | [2] |
5,315,287 | 5,315,288 | C++ (or maybe Java/C#) books for understanding 'under the hood'? | <p>what are the best c++ books for learning the very advanced concepts? I know about OO programming, i dont need to know about classes but i'd like to know about how casting works, how the various memory data structures differ in their actual implementation (big O notation etc), deep and shallow copying, garbage collec... | c++ | [6] |
5,679,552 | 5,679,553 | Adding New Properties to a Function Object | <p>I am trying to understand the following pattern:</p>
<pre><code>// https://github.com/twitter/bootstrap/blob/master/js/bootstrap-collapse.js
$.fn.collapse = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('collapse')
, options = typeof option =... | javascript | [3] |
4,869,788 | 4,869,789 | Best method for dividing list into equal parts | <blockquote>
<p><strong>Possible Duplicate:</strong><br />
<a href="http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python">How do you split a list into evenly sized chunks in Python?</a> </p>
</blockquote>
<p>I have a list more than 500 elements long.</p>
<p>I want ... | python | [7] |
5,222,880 | 5,222,881 | How to call a method in java? | <p>How to call a method, which is in <strong>another class of same package</strong> in java?
What i know is, using an object we can call a method from a different class.
Is there any other way to call a method of different class?</p>
| java | [1] |
3,288,702 | 3,288,703 | String to Date Conversion Issue | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1576753/parse-datetime-string-in-javascript">Parse DateTime string in JavaScript</a> </p>
</blockquote>
<p>How do I convert this string "09-20-2011::20:00:00" to the seconds from 1st jan, 1970. aka Unix epoch t... | javascript | [3] |
5,583,305 | 5,583,306 | how to get content news like Safari's “Reader Mode” | <p>Safari has a <strong>"Reader Mode"</strong> which removes everything from a website with an article but the text.
<br/><br/>
Now I need to get HTML source from site and then get real content news like Safari's “Reader Mode” with <strong>PHP</strong>!
can you help me?? :S</p>
| php | [2] |
2,039,567 | 2,039,568 | How to check a HashMap for unique variables? | <p>I have written code to find unique variables in a HashMap but it doesn't appear to work? I would like to be able to print the frequencies of each sausage type.</p>
<pre><code> if(sausagesEaten.isEmpty()) { //if the HashMap is empty
System.out.println("No sausages have been eaten");
System.out.pri... | java | [1] |
3,055,821 | 3,055,822 | jQuery multiple event handler | <p>What does the keyup() at the end of it mean?</p>
<pre><code>$("input").keyup(function () {
var value = $(this).val();
$("p").text(value);
}).keyup();
</code></pre>
| jquery | [5] |
1,708,736 | 1,708,737 | Submit form when onUnload fired | <p>Simple question (probably), but I'm buggered if I can find an answer...</p>
<p>I have a back-end CGI application and a number of dynamically-created webpages (plain ol' HTML+JS+CSS), each with a single form. In every form, in addition to a number of other submit buttons, there is a closeApplication button, which, w... | javascript | [3] |
2,643,745 | 2,643,746 | Reporting how many times the client application was used | <p>I am making an application in C# in which i would like to know everytime a user runs the application. I want to implement a hidden ping to server on startup kinda thing. i have got some server space on a free host. Not really sure how this can be implemented. I think there should be a script on the server which regi... | c# | [0] |
528,895 | 528,896 | How do i make that only if the user entered any text to textBox so the button1 will be enabled? | <pre><code>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace GatherLinks
{
public partial class CrawlLocaly : Form
{
public CrawlLocaly()
{
... | c# | [0] |
2,088,189 | 2,088,190 | Detect pic taken in Android using Tasker app | <p>I am trying to detect when a picture is taken, as a trigger (to also make a picture of the photographer)</p>
<p>Tasker has a trigger for the Hardware Camera button, but my phone (Galaxy Nexus) has only software buttons.</p>
<p>Any ideas? I was thinking of using the trigger Action -> File modified, and then point t... | android | [4] |
1,637,045 | 1,637,046 | Cant understand scope issue here | <p>I dont understand why/ how to accomplish this fairly simple thing. If someone could explain it that would be great.</p>
<pre><code>function Module(config) {
this.host = {Collapse: $('<a href="#" class="collapse">C</a>')};
function EnableCollapse() {
//I need to access host.Collapse here
thi... | javascript | [3] |
4,791,876 | 4,791,877 | attach bullets to slider images | <p>I have set up a jsfiddle</p>
<p><a href="http://jsfiddle.net/K8aex/" rel="nofollow">http://jsfiddle.net/K8aex/</a></p>
<p>I need the bullets to move the slides also
I am trying to attach the click of the bullet to the index of the relevant slide
How would I do this? find the index of the bullet the find the index... | jquery | [5] |
4,561,201 | 4,561,202 | Preg_match_all with s pattern modifier doesn't work properly | <p>I'm trying to match all content between <code><!-- and --></code></p>
<p>My php code:</p>
<pre><code><?php
$html = <<< HTML
<!-- content
content content
content -->
<!-- dd dsd sdsd s -->
<!-- dsajda2i -->
HTML;
preg_match_all('#<!-- (.*) -->#si',$html,$out,PREG_SET_ORD... | php | [2] |
5,324,963 | 5,324,964 | PHP pathinfo gets fooled by url in quert string. Any workaround? | <p>I am working on a small function to take in a url and return a relative path based on where it resides itself.</p>
<p>If the url contains a path in the query string, <code>pathinfo</code> returns incorrect results. This is demonstrated by the code below:</p>
<pre><code>$p = 'http://localhost/demos/image_editor/dir... | php | [2] |
4,353,571 | 4,353,572 | How to calculate the width of the string | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3630086/how-to-get-string-width-on-android">How to get string width on Android?</a> </p>
</blockquote>
<p>I use the following code to calculate the width of the string, but the result of the width is considerabl... | android | [4] |
1,768,016 | 1,768,017 | zipping a python dict of lists | <p>I have a python dictionary of type defaultdict(list)
This dictionary is something like this:</p>
<pre><code>a = {1:[1,2,3,4],2:[5,6,7,8]....n:[some 4 elements]}
</code></pre>
<p>So basically it has n keys which has a list as values and all the list are of same lenght.
Now, i want to build a list which has somethin... | python | [7] |
2,656,494 | 2,656,495 | Check/uncheck click handler only toggles first time | <p>I have this code.</p>
<pre><code> var check = true;
$('#selectall').click(function () {
$("form input[type='checkbox']").attr ("checked", true);
if (check){
check = false;
$('#checktodos').attr("src", "check_off.png");
}
... | jquery | [5] |
3,371,869 | 3,371,870 | Mimicking behaviour of Mayhem in Python | <p>I have just been reading about Mayhem: "The key to Mayhem is that it only supports a single programming construct – when an event happens, do a reaction." (http://mayhem.codeplex.com/)</p>
<p>Forgetting about the UI what would you say are the essentials of what Mayhem is doing, and how would you do it in an up-to-d... | python | [7] |
3,802,772 | 3,802,773 | PHP - auto detect when/if files have been updated | <p>Is there a way in PHP to detect when a file is updated and saved?</p>
<p>If not what would be the best method 'faking' this.</p>
<p>I.e. before a certain action if executed, check the last saved date of the file?</p>
| php | [2] |
3,256,731 | 3,256,732 | Deriving a pointer type to the non-pointer class member | <p>In book named "Using C++" by Rob McGregor there is following example of using pointer-to-member operator</p>
<pre><code>class mycls
{
public:
int member;
int *ptr;
};
void main()
{
mycls MyClass;
// Derive a pointer type to the non-pointer class member
int mycls::*member = &mycls::member;
... | c++ | [6] |
3,417,192 | 3,417,193 | Suggestive Spelling Checker based on edit distance and lcs? | <p>How can i implement a simple spell checker that accepts a misspelled word and an edit distance threshold then produce a list of suggested correct words .
That is wanted to be achieved using an algorithm that
1-use both edit distance and longest common subsequence
2-don't calculate the edit distance for each word in ... | c# | [0] |
5,843,303 | 5,843,304 | error: Super must be first statement in constructor | <p>cannot figure out why i am getting this error. Working in Notepad, running javac through cmd (obviously more to the file). If you need me to link more i can.
My error is happening at "setCruiseShip" where i am trying to link the current to the super class.
error: Call to super must be first statement in constructor.... | java | [1] |
4,879,568 | 4,879,569 | What does this do in C#? | <p>I'm newbie at C# and couldn't find anything about this:</p>
<pre><code>public bool HasUPedidos { get { return upedidos > 0; } }
</code></pre>
<p>What does this expression does?
Thank you.</p>
| c# | [0] |
4,022,760 | 4,022,761 | Open Application from URL | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/389204/how-do-i-create-my-own-url-protocol-e-g-so">how do I create my own URL protocol? (e.g. so://…)</a> </p>
</blockquote>
<p>How could I go around typing into my browser, for example "assembly://update... | c# | [0] |
5,018,594 | 5,018,595 | Cycle class on group of element with a link | <p>How do I cycle a class on set of elements on clicking a link.
Here's what the HTML looks like:</p>
<pre><code><section class="container">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</se... | jquery | [5] |
2,783,792 | 2,783,793 | copy/deepcopy and variable scope | <p>I'm having problems using copy.copy() and copy.deepcopy() and Python's scope. I call a function and a dictionary is passed as an argument. The dictionary copies a local dictionary but the dictionary does not retain the values that were copied.</p>
<pre><code>def foo (A, B):
localDict = {}
localDict['name'... | python | [7] |
439,976 | 439,977 | How to not put self. when initalizing every attribute in a Python class? | <p>Greetings.<br />
I searched for a long time, and found many related questions with no answer for me. Despite mine seems to be a simple beginner doubt.</p>
<p>We have a (I guess) typical class definition:</p>
<pre><code>class Town:
def __init__(self, Name, Ruler = "Spanish Inquisition"):
self.Name = Nam... | python | [7] |
1,780,886 | 1,780,887 | C# where keyword | <p>Our Indian overseas developers have written the following piece of code (C# 2.0): </p>
<pre><code>public abstract class ObjectMapperBase<T> where T : new()
{
internal abstract bool UpdateObject(T plainObjectOrginal, T plainObjectNew, WebMethod fwm, IDbTransaction transaction);
}
</cod... | c# | [0] |
5,213,298 | 5,213,299 | What is the unit of sound when measuring by an Android smartphone? | <p>Here is my code</p>
<pre><code> private static int Fs = 44100;
private byte recorderAudiobuffer[] = new byte [1024];
AudioRecord recorder = new AudioRecord(AudioSource.MIC, Fs, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT, 4096);
//start recorder
recorder.startRecording();
</code... | android | [4] |
793,577 | 793,578 | server error when reading in an xml file | <p>I have some xml files which contain the source data for populating dropdown lists in my pages. These dropdowns are re-populated based on selected items from other dropdwons. I am getting a server error</p>
<blockquote>
<p>Could not find a part of the path
X:\ASP.Net\CommodDisplay\DataFiles\dataXML.xml'.</p>
</b... | asp.net | [9] |
1,188,733 | 1,188,734 | Service created each time I'm binding to it - but I want a singlton service | <p>I'm trying to create a service that should be a singleton - I need one of it for the entire application.</p>
<p>I tried to implement this using a START_STICKY flag, but each time I bind to the service from an activity its onCreate is called and the activity is stopped, the service's onDestroy is called. </p>
<p>Wh... | android | [4] |
676,788 | 676,789 | Java Dialog Box Answer with two decimal points | <p>I am trying to write this so that the last dialog box answer in pounds is given with two decimal place holders. For example <code>23.56</code> or <code>245.32</code></p>
<p>For the life of me I can't get it.</p>
<p>Here is the code</p>
<pre><code>package weightconversion;
import javax.swing.JOptionPane;
public ... | java | [1] |
3,333,471 | 3,333,472 | what is this update panel error? | <p>I am using the model poop up in my below code i am getting the following error what may be the reason?</p>
<pre><code>Cannot unregister UpdatePanel with ID 'updatePnl' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, whi... | asp.net | [9] |
5,880,175 | 5,880,176 | Taking over the volume key on Android | <p>I want to take overinput over the Volume Up and Down. At the moment my code is:</p>
<pre><code>@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
Log.v(TAG, event.toString());
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN){
mLamp.moveBackward();
return false;
}
else if... | android | [4] |
3,820,869 | 3,820,870 | how to create a license for my java project? | <p>I developed a java project. I want to create a license key for my project.
for example if 12345 is the license key, then when a user enters that license key then the software should activate and should be ready to use.
but the problem is that the license key should be limited. If the key is entered and activated i... | java | [1] |
1,083,650 | 1,083,651 | Multiple Animations to a Sprite | <p>How to Add Multiple Animations to a Sprite, (i.e) one animation after another finished.
Also how to remove the old animation from the sprite.</p>
<p>Thank You.</p>
| iphone | [8] |
3,815,921 | 3,815,922 | Java: Is there a shortcut for doing this (simple accessors/getters stuff) | <p>Suppose I have a class called Person:</p>
<pre><code>public class Person
{
private String name, ID, location;
}
</code></pre>
<p>Instead of writing individual accessors for name, ID, and location, is there anyway to do something like this:</p>
<pre><code>public String get%s
{
return this.%s
}
</code></p... | java | [1] |
5,360,330 | 5,360,331 | PHP interaction with command line program | <p>I have a certain command line program which takes in input from the stream and not as command line arguments.(For example, a C program that takes input using scanf.) How can I interact with this app using PHP? exec(), shell_exec() wont help here since input is not through command line arguments. I need a constant in... | php | [2] |
4,717,626 | 4,717,627 | How to integrate audio recording in my PHP application or give me any idea regarding that type of application? | <p>I want to integrate voice recording in my PHP application?</p>
<p>Can anybody help me regarding this?</p>
<p>Thanks in advance.</p>
<p>Kanji</p>
| php | [2] |
1,000,488 | 1,000,489 | Can I pass a div and its contents to another page | <p>I have a clickable div generated from a loop. I am trying to set it up so that onclick it appends itself to another div on a different page. Is this possible. Here is what I have tried.</p>
<pre><code> userDiv.addEventListener("click",
function () {
var one = document.getElementById(... | javascript | [3] |
4,421,652 | 4,421,653 | Can't obtain div style width or height | <p>I don't know why but I can't set the canvas width and height, and am not sure what I am doing wrong.</p>
<p>I create the page like this:</p>
<pre><code>//create div
var d = document.createElement('div');
d.id = 'G';
d.className = 'GameOuput';
document.getElementById('E').appendChild(d);
var i = 1;
var c = ... | javascript | [3] |
715,496 | 715,497 | Rewriting HTML code using javascript | <p>I have some markup here that I need to reformat using javascript. Basically, I have this code:</p>
<pre><code> <div id="images">
<img src="01.jpg">
<img src="02.jpg">
<img src="03.jpg">
<img src="04.jpg">
<a id="src" href="01.jpg"></a>
... | javascript | [3] |
5,712,193 | 5,712,194 | Running shell scripts as root in php? | <p>I am trying to write a php script to add users to an LDAP. To this end I have a shell script, aptly titled "addldapuser.sh", that will take in user/screenname/password combinations and add them to the LDAP. This script works properly. We would like users to be able to enter their information on a web form, which wil... | php | [2] |
1,523,124 | 1,523,125 | C++: Problem in finding code execution time | <p>To find the execution time of my code as given below, I have written a <code>Timer</code> class.</p>
<pre><code>Timer::StartTimer();
DoOperation();
cout<<"Time elapsed: "<<Timer::GetTime();
</code></pre>
<p>I get error that startTime and endTime are undefined. I couldn't quite get the problem. Can you ... | c++ | [6] |
3,584,492 | 3,584,493 | android: default language set to asian | <p>why is the default language set in my android emulator some asian language?
where can i set the keyboard to english?</p>
<p>thanks!</p>
| android | [4] |
4,460,893 | 4,460,894 | Howto develope and distribute for OS3.0 with iPhone running iOS4 | <p>i'm a little bit confused about the current iOS4 update.
I developed a little App, und wanted to do some improvment.
Today i updated my iPhone to iOS4.</p>
<p>When i use Xcode 3.2 i couldn't use my iPhone for testing, its not supported.</p>
<p>When i use Xcode 3.2.3 i can use my iPhone, but no testing with OS3.0.<... | iphone | [8] |
4,158,957 | 4,158,958 | manage image with Pop up | <p>I had image for Products and i want user when click on image appear image as popup with big size and save it </p>
<p>as
<a href="http://www.istockphoto.com/file_browse.php?exu=1&action=abstracttype&value=15&page=4" rel="nofollow">http://www.istockphoto.com/file_browse.php?exu=1&action=abstracttype&... | c# | [0] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.