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,301,996 | 2,301,997 | Android implicit intents VS explicit intents | <p>Working with android I realized that implicit intents are good choice in most of cases due to their's flexibility. But what's about explicit intents?
What are benefits of using them? What are common cases when it's a good practice to use them?</p>
| android | [4] |
1,945,255 | 1,945,256 | Writing char array to file, with escape characters written with their corresponding literals | <p>I'm trying to write a char array to file, the the escaped characters should be written with their equivalent literals (for example newline should be written as '\n' instead of actual line break in the file).</p>
<p>if the array is <code>char *arr = "hello world\n";</code>
my code should write</p>
<pre><code>char t... | c++ | [6] |
5,072,687 | 5,072,688 | Defining "templated class" functions outside of a class | <p>I have this class</p>
<pre><code>template <class T> class dynamic_array
{
</code></pre>
<p>and this function:</p>
<pre><code>void dynamic_array::randorder()
{
srand(time(NULL));
int *ap;
for(ap=array;k!=array+size;++k){*k=rand();}
}
</code></pre>
<p>The compiler is complaining about my functio... | c++ | [6] |
1,778,421 | 1,778,422 | Javascript -- Date Time picker | <p>I have problem with a javascript date script.</p>
<p>Scripts is that;</p>
<p><img src="http://i.stack.imgur.com/OQ49M.png" alt="enter image description here">
Choose a time and when you selected</p>
<p><img src="http://i.stack.imgur.com/wuA5w.png" alt="enter image description here"></p>
<p>and print the date. Ho... | javascript | [3] |
5,963,518 | 5,963,519 | actual objects and its references in python | <p>I'm a bit confused about actual object and its reference in python.Googled a lot but didn't get what I need. </p>
<p>Does object creation also returns a reference to that object? Why i'm asking this is because I'm able to use actual object with <code>.</code> delimiter to call its methods.We usually use reference o... | python | [7] |
3,580,403 | 3,580,404 | Android database conectivity problem | <p>i am trying to make android (2.3) connection with mysql the code is given below:</p>
<pre><code>public class ConnectionClass {
static String user = "root";
public static void main() {
String url = "jdbc:mysql://127.0.0.1:3306/mydatabase";
// String url = "jdbc:mysql://10.2.5.69:3306/test";
try {
... | android | [4] |
79,357 | 79,358 | How do I do this in Python? List to function | <pre><code>def getStuff(x):
return 'stuff'+x
def getData(x):
return 'data'+x
thefunctions = []
thefunctions.append("getStuff")
thefunctions.append("getData")
for i in thefunctions:
print i('abc')
</code></pre>
<p>Is this possible? Thank you.</p>
| python | [7] |
561,766 | 561,767 | Passing a bound object method in JavaScript | <p>For a Firefox extension, I'm trying to do the following:</p>
<ol>
<li>Setup an object with two methods and a field/property/attribute</li>
<li>One of the methods has to be able to call the other method and access the attribute</li>
<li>I want to register that method as an event listener.</li>
</ol>
<p>Right now, I... | javascript | [3] |
5,267,897 | 5,267,898 | How to disable onChange for a number of elements, change then, then enable onChange in jQuery | <p>I have a bunch of input elements on a page. Each input element has an onchange event that triggers an ajax call to the server. I want to disable all these onchanges then make some programatic changes to the elements (reset them), then re-enable these onchange events. I want only one ajax call to happen as a result ... | jquery | [5] |
2,246,162 | 2,246,163 | Nested if..else... breaking parental flow? | <p>I'm running through a few scenarios with some IFs and I'm running into something that defies my logic/understanding.</p>
<p>Yes, I'm very low-level with programming, so maybe I'm royally screwing up something very rudimentary.</p>
<p>Anyway, I have something like so:</p>
<pre><code>if(condition==1) {
if(conditi... | php | [2] |
2,927,576 | 2,927,577 | Saving Images in to local folder in android | <p>I created android app which reads images from url. Now I want to store those images in local file structure or SD Card. so i created a folder names "images" in my android project and added image xyz.png manually to test reading of images. </p>
<p>and wrote below code to read.</p>
<pre><code> Bitmap bMap = BitmapF... | android | [4] |
896,896 | 896,897 | PHP: create POSTER like Firefox plugin | <p>I would like to create a PHP application like FIREFOX "Poster" plug-in <a href="https://addons.mozilla.org/en-US/firefox/addon/2691/" rel="nofollow">thisone</a> </p>
<p>basically , I want to make a call to a url with post data, that will be the body of the URL.
(I want to send the contain of the body)</p>
| php | [2] |
4,537,153 | 4,537,154 | With jquery moving one table column to a new table | <p>What I am trying to do is take the last colomn in a table placed into a new table altogether. I got this working the problem is I want this to work for multiple tables with the same class names. Right now it only takes the first tables cols and repeats them. I have an idea of why but I am not sure how to target each... | jquery | [5] |
663,023 | 663,024 | Getting the names of files in the folder | <p>Decided to put the question differently, suppose we have a file-test, there is a lot of different files, some of this type indeks.html, kiki.tht, lololo.bin and so on, to get the names of all files in a folder, you can use this code:</p>
<pre><code>File folder = new File("C:\\test\\");
File[] listOfFiles = folder.l... | java | [1] |
2,934,246 | 2,934,247 | Help to identify python module (preprocessor?) "python -m dg" | <p>On the background of this image <img src="http://i.stack.imgur.com/PgPcR.jpg" alt="image"> you can find some code, that looks like written in extended python dialect, which have to be processed with “python -m dg” to get “normal” python code.
Google has no results for “python -m dg” query, and yandex.ru has only one... | python | [7] |
687,063 | 687,064 | How to log each application activity in android? | <p>Hello I want to log application activity information on my android phone, I just need 2 things, the start time of the application and the end time of the application.</p>
<p>I just want to know for how much time a particular application/activity was running. </p>
<p>Say for example a user launched music player and... | android | [4] |
3,562,307 | 3,562,308 | Javascript: arguments change with further apply processing | <pre><code> function Foo(){
}
Foo.prototype={
method1:function(o){
console.log(o);
}
,shorthand:function(){
if(!arguments.length || typeof arguments[0]=='undefined') {
arguments[0]={};
}
arguments[0].bar='test';
... | javascript | [3] |
4,361,104 | 4,361,105 | how to add session cart table in database and give all ordered items one unique orderid? | <pre><code>ProductName price brand Quantity Net AmountNet Amount Update
</code></pre>
<p>I have the above table in which I have to insert the products which users have added to their cart.
Users can add multiple products to their cart.
I have that table of user added products in the session and I am ... | c# | [0] |
230,624 | 230,625 | jQuery: Radio button selected & <span> updates | <p>I have a DIV with a list of radio buttons and a 'selected search' area (a < span >). When clicking on the 'selected search' area, a drop down layer comes out and has the DIV with the list of radio buttons. When a radio button is selected, the 'selected search' area is updated with that radio button's text and the... | jquery | [5] |
4,217,268 | 4,217,269 | Random background color from array - PHP | <p>I am a beginner when it comes to programming so I wanted to see if this would be the right way to code this. I was trying to generate a random background color from an array. If there is something im missing or there is something I could do better please let me know.</p>
<pre><code><?php
$background_colors = ar... | php | [2] |
3,340,576 | 3,340,577 | How to deploy java app for Windows pc | <p>I have studied Java Web Start and found it complex and clumsy for my purposes. In addition, my app needs to access the PC resources, which causes more hoops to be jumped through with Java Web Start. To add to the difficulties I need to access a 32-bit native library (libvlc) so I need to insure that my app runs un... | java | [1] |
639,927 | 639,928 | problems in using cin | <p>The program is to copy the first element of 'marks' vector into the 'all_marks' vector.Note that marks vector will be changed dynamically.</p>
<pre><code>#include <iostream>
#include <vector>
using namespace std;
istream& read_info(istream& in,vector<double>& vec);
int main(int argc, c... | c++ | [6] |
5,450,110 | 5,450,111 | How to Use JQuery to Find All Readonly Text Boxes on a Web Page | <p>I have been asked to identify all read only text boxes in an Asp.Net page and assign a particular style. I'm pretty sure I could iterate over all of the inputs to see if they were inputs that were text boxes with the readonly attribute but I just KNOW there's a one liner.</p>
<p>Any thoughts?</p>
| jquery | [5] |
4,527,171 | 4,527,172 | Generating a unique id of std::string | <p>I want to generate any limited std::string size unique id (i.e of size 6) in 32 bit application. what would be the best and quick way to do this?</p>
| c++ | [6] |
5,306,075 | 5,306,076 | excelApp.CreateDispatch() returns a zero value : failure | <p>I have the following piece of code in Visual C++ 2005 : : </p>
<p>class _Application:public COleDispatchDriver {....};</p>
<p>_Application excelApp;</p>
<p>excelApp.CreateDispatch((LPCTSTR)_T("Excel.Application")))</p>
<p>But the call to excelApp.CreateDispatch((LPCTSTR)_T("Excel.Application"))) returns a zero ... | c++ | [6] |
1,916,068 | 1,916,069 | Use jQuery to hide a DIV when the user clicks outside of it | <p>I am using this code:</p>
<pre><code>$('body').click(function() {
$('.form_wrapper').hide();
});
$('.form_wrapper').click(function(event){
event.stopPropagation();
});
</code></pre>
<p>And this HTML:</p>
<pre><code><div class="form_wrapper">
<a class="agree" href="javascript:;">I Agree</a... | jquery | [5] |
5,975,368 | 5,975,369 | Broadcast receiver at a specific Time | <p>I want to create a broadcast receiver which will be invoking at the specific time say 9'o clock in morning.Is it possible in android,If yes Somebody please help me to do it</p>
| android | [4] |
5,849,329 | 5,849,330 | C# ReceiveAsync Error | <p>Im currently developing an appserver. I would like to use AcceptAsync method. I got error "Object reference not set to instance of object." when calling ReceiveAsync method. If there any come up with this problem and got the solution to it?</p>
<pre><code>public class AppServer
{
public void Start()
{
... | c# | [0] |
1,967,414 | 1,967,415 | Generating satellite assembly externally | <p>I have an third party application in which there are satellite assemblies.
This application is strong name signed.
I am externally creating new satellite assembly which is not included by the third party application.
But since the main assembly is strongly signed, my newly created assembly is not been recognized ... | c# | [0] |
5,590,561 | 5,590,562 | Forcing Download of file using php script on CentOs 5.6 | <p>I need to authenticate user to view/download some of the files in my site. My files are located in a folder say A inside <code>public_html/mySiteName/FoldesName(A)/subFolder/sample.(*.*)</code>. I used <code>.htaccess</code> to check that the user is authenticated or not.</p>
<hr>
<p>MY <code>.htaccess</code> code... | php | [2] |
5,048,694 | 5,048,695 | Socket.Close() | <p>as i understand it in C# u pass a copy of the reference by default,
no for my Example </p>
<p>iv'e got 2 Forms witch in the first a Socket connects and then is being passed in the constractor to the other form </p>
<p>now as i understand it they both have a reference to the same place in memory ,
now in the second... | c# | [0] |
685,498 | 685,499 | running java on linux server | <p>I would like to run a jar file extracted from my java project to be run on a Linux server I connect through SSH Tunneling. There are few problems, first there is something wrong with the Display: I get the error </p>
<pre><code>No X11 DISPLAY variable was set, but this program performed an operation which requires ... | java | [1] |
5,222,209 | 5,222,210 | Difference between '$("#foo")' and 'jQuery("#foo")' | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6608002/jquery-selecter-whats-difference-between-jqueryelement-and-element">jQuery selecter whats difference between jQuery(“element”) and $(“element”)?</a> </p>
</blockquote>
<p>Just a l... | jquery | [5] |
3,938,044 | 3,938,045 | for loop finding the prime numbers | <p>I am trying to run this code to print the sum of all the prime numbers less than 2 million. This loop is never ending. Can anyone tell me what is wrong with the code? It seems to work with smaller numbers though.</p>
<pre><code>public static void main(String[] args) {
long result = 1;
for(int i=0;... | java | [1] |
2,264,523 | 2,264,524 | PHP: moving form $_FILES to $_GET | <p>I have one old function that i need to edit</p>
<pre><code>doSome($_FILES['image']);
</code></pre>
<p>my quesiton is how can i use the same function in order to get a file form GET instead of uploading it?</p>
<p>if i change to</p>
<pre><code>doSome($_GET['image']);
</code></pre>
<p>it doesn't sound to work...<... | php | [2] |
1,416,986 | 1,416,987 | How to reboot android phone from kernel code | <p>Is it possible to reboot by calling <code>SYSCALL(sys_reboot,sys_reboot,sys32_reboot_wrapper)</code>?</p>
| android | [4] |
2,167,102 | 2,167,103 | Unable to load default.aspx, 'App_Web_XXXX' | <p>I have done a project and it is working fine for me in local system but when i publish the website and uploaded through our site and checking the page i am getting the error as follows</p>
<p><code>unable to load default.aspx, 'App_Web_XXXX'</code></p>
<p>Can any one tell what the problem was</p>
| asp.net | [9] |
4,039,468 | 4,039,469 | PHP How to find a line begining with a word from a text file | <p>I have a text file with following lines</p>
<blockquote>
<p>Manifest-Version: 1.0<br>
MIDlet-Vendor: Croco Gamez<br>
MIDlet-Version: 1.0.0<br>
MIDlet-1: Quan, /icon.png, CGTQ<br>
MicroEdition-Configuration: CLDC-1.0<br>
Created-By: 1.4.2 (Sun Microsystems Inc.)<br>
MIDlet-Icon: /icon.png<br>
MIDlet-... | php | [2] |
2,765,330 | 2,765,331 | Regarding using android ksoap2 web servies | <p>am trying do one example in android ksoap2 web services.i tried one example in below url</p>
<p><a href="http://naveenbalani.com/index.php/2011/01/invoke-webservices-from-android/" rel="nofollow">http://naveenbalani.com/index.php/2011/01/invoke-webservices-from-android/</a></p>
<p>now am getting java.net.sockettim... | android | [4] |
511,149 | 511,150 | Why does sometimes DateTime.TryParse work and other time only DateTime.ParseExact work? | <p>I have two laptops both with windows xp sp3, vs 2010 and target framework .Net 3.5. When processing DateTime variable, I found that with laptop1 </p>
<pre><code>DateTime oldOrderDate;
string strnewdate = string.Empty;
CultureInfo provider = CultureInfo.InvariantCulture;
if (DateTime.TryParse(items[1], out oldOrder... | c# | [0] |
201,542 | 201,543 | How can I create directories recursively? | <p>Is there a Python method to create directories recursively? I have this path:</p>
<pre><code>/home/dail/
</code></pre>
<p>I would like to create</p>
<pre><code>/home/dail/first/second/third
</code></pre>
<p>Can I do it recursively or I have to create one directory after the other?</p>
<p>The same thing for:</p>... | python | [7] |
1,825,768 | 1,825,769 | Iphone-SDK "unable to read symbols error" when linking to IBOutlet in tab based app | <p>I built a very simple tab based app with 2 tabs, each tab tied to its own view controller. </p>
<p>Straightforward so far. I then create a simple IBOutlet on my 2nd view controller like so</p>
<pre><code>#import <UIKit/UIKit.h>
@interface bViewController : UIViewController {
IBOutlet UITextField *aF... | iphone | [8] |
1,455,951 | 1,455,952 | how to display the tamil content website in default browser | <p>how to show tamil language characters in android ,i have simple webview apllication ,it loads the url of tamil news site which contains tamil characters ,but its showing [][][][ at place of those characters ,even the default android browser shows the same (not showing the hindi or tamil characters ) the android ver... | android | [4] |
5,271,418 | 5,271,419 | Python - call until I get a return value? | <p>I am calling a function to get the file a user selects in a simple gui. I am trying to determine the proper way to continue prompting the user until they select a file. Right now my call is:</p>
<pre><code> file_path = None
while file_path is None:
file_path = input_text_file() # calls function ... | python | [7] |
5,752,531 | 5,752,532 | Clone of jQuery Ui is not work | <p>I have jquery program to do for drag the clone of the element. When user drag the elements it make clone of it and dragged. But when another time trying to drag it did not work.<br>
Here is the code....<br>
for drag...</p>
<pre><code> jQuery('.item-art').draggable({
helper: function () {
return jQuery(t... | jquery | [5] |
5,280,536 | 5,280,537 | how to remove the exception, System.InvalidOperationException? | <p>code is given below </p>
<pre><code>Queue<int> queXpTrackerX = new Queue<int>(10);
Queue<int> queXpTrackerY = new Queue<int>(10);
if (iCounterForXpTrack < 10)
{
queXpTrackerX.Enqueue(X);
queXpTrackerY.Enqueue(Y);
iCounterForXpTrack++;
}//End IF
else
{
queXpTrackerX... | c# | [0] |
161,965 | 161,966 | php in body -- missing something obvious | <p>My PHP is not PHPing, so made simple test... must be missing something obvious.</p>
<pre><code><html>
<head>
</head>
<body>
<?php echo '<script language=\"javascript\">confirm("Do you see this?")</script>;'; ?>
</body>
</html>
</code></pre>
<p>In code body, I ... | php | [2] |
4,910,781 | 4,910,782 | Obtaining Coordinates from "Share this place" in Google Maps | <p>When viewing the details of any location in Google Maps, there's an option for "Share this place". I have successfully added myself to the list of receivers by adding this intent-filter to my application in the manifest:</p>
<pre><code><intent-filter>
<action android:name="android.intent.action.SEND" /... | android | [4] |
4,470,116 | 4,470,117 | How to disable USB MTP-connection (Honeycomb) | <p>I'm using Samsung Galaxy tab 10.1. After connecting it to PC, I always get message "USB MTP-connection", when I connect it to AC to fill the battery. </p>
<p>I can only charge the battery if tablet is tuned off.</p>
<p>Any good solution how to turn this USB MTP connection off so I could normally charge battery.</p... | android | [4] |
36,757 | 36,758 | Turn ISO 8601 date/time into "x minutes ago" type of string | <p>So I have an ISO 8601 date/time stamp like "2011-04-21T17:07:50-07:00", and I would like to convert it to say something like "23 minutes ago" or something of that sort. Is there a small bit of Java code or a library that would be able to do something like that easily?</p>
<p>Thanks!</p>
| java | [1] |
4,233,077 | 4,233,078 | Jquery how to get a hiddeninput given a data attribute | <p>I have some checkboxes with class mycheckbox and a html5 attribute position.</p>
<p>For every checkbox of this class that is checked I want to get the related hidden input with class header that has the same html5 attribute value for data-position. I want to make a list of the values of the hiddenfields.</p>
<p>So... | jquery | [5] |
2,043,859 | 2,043,860 | java.nio.channels.NonWritableChannelException when try to get backup apk file | <p>I want to get backup installed apk. by using H<a href="http://stackoverflow.com/questions/8307034/how-to-get-the-apk-file-of-an-application-programatically">ow to get the .apk file of an application programatically</a> and I get the apk File. and when I try to take backup to another file I get</p>
<pre><code>Caused... | android | [4] |
5,619,096 | 5,619,097 | Does setInterval leak? | <p>i'm doing some javascript, where I repeadetly click a button, using </p>
<pre><code>setInterval(function(){
clickmyButton()
}, 500);
</code></pre>
<p>Eventually clickmyButton will send the user to another page (via window.location.href="Other page"). I was wondering, since I never called clearInterval within t... | javascript | [3] |
3,913,361 | 3,913,362 | Voice to text conversion : Help on opening a file through converted text and minimizing and maximizing an application | <p>The project is in c#</p>
<p>Process.Start(@"D:\Documents and Settings\All Users\Desktop\"+textBox1.Text+".exe");
It displays "cannot find the path specified.</p>
<p>Actually i am working on a project that converts voice to text and executes the applications through the converted text..</p>
<p>I am not able to fin... | c# | [0] |
4,603,382 | 4,603,383 | How to best UNLOAD content in a DIV using LOAD or HTML to manage resources? | <p>I am using jQuery 1.6.2.</p>
<p>In a master page, I open up several divs that will later be populated with info through the use of buttons:</p>
<pre><code><input type="button" id="ButtonOne">
<input type="button" id="ButtonTwo">
<input type="button" id="ButtonThree">
<div class="SectionDiv" id... | jquery | [5] |
4,174,373 | 4,174,374 | How can you read and write to a MySQL database starting at a JavaScript web game? | <p>First of all, I'm not much of a programmer if at all. This question may seem silly but I would honestly like some advice from real programmers. </p>
<p>I'd like to make a bit of an adventure game on a webpage. </p>
<p>Could I make it by having a MySQL database setup to store variables while JavaScript, HTML and CS... | javascript | [3] |
496,431 | 496,432 | Hello, I want to translate my web from spanish to english and to use only english, this website is in making in php , how to do this? | <p>My website is: https:\literion.com , I use a php script what is in spanish and I want to make this website in english, but I am a really noob in php and I don't know how to make this easy, I don't want a auto-translation if is not possible but i want to know what need to modify or exist some plugins or something lik... | php | [2] |
4,276,913 | 4,276,914 | how to launch my application in iphone? | <p>I have build one of my application on iphone but refuse to build that on m iphone .</p>
<p>Can u tell me the proper steps for launching my application on my iphone and step by step procedure for setting the project settings.</p>
| iphone | [8] |
3,321,676 | 3,321,677 | programming g-adic expansion in c++ | <p>I want to program the g-adic expansion in the c++ language, but whatever I try, the output is still wrong. Let me first explain what the g-adic expansion is. The g-adic expansion is a way to represent numbers. For example, binary numbers, this is the 2-adic expansion of numbers. And hexadecimal is 16-adic expansion.... | c++ | [6] |
3,928,656 | 3,928,657 | What is _tmain at all? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/895827/what-is-the-difference-between-tmain-and-main-in-c">What is the difference between _tmain() and main() in C++?</a> </p>
</blockquote>
<p>I found it in <a href="http://msdn.microsoft.com/en-us/library/aa3... | c++ | [6] |
5,357,723 | 5,357,724 | Alarm keeps triggering after set time | <p>could you please have a look at this</p>
<pre><code>if(current.getTimeInMillis() < cal.getTimeInMillis()){
//current.add(Calendar.MINUTE, 15);
alarms.setRepeating(AlarmManager.RTC_WAKEUP, current.getTimeInMillis(), AlarmManager.INTERVAL_FIFTEEN_MINUTES, alarmIntent);
Toast.makeText(this, "Alarm... | android | [4] |
1,032,608 | 1,032,609 | How to implement event listener in background of the main program in java? | <p>Hi im a beginner so sorry for my question if it sounds naive.</p>
<p>I want to implement a thread that runs in the background and listens all the time. By listening i mean, say it keeps check on a value returned from main thread and if the vaue exceeds certain figure, it executes some method, or say exits the progr... | java | [1] |
2,357,008 | 2,357,009 | Legal use of countdown timer? | <p>I am using a countdown timer to perform a repeating task. I want to be sure what I'm doing is valid since I'm not sure if the countdown timer object gets destroyed when it times out. Same question applies if I call the cancel method. Here is my code:</p>
<pre><code> public class MyCount extends CountDownTimer
... | android | [4] |
3,827,274 | 3,827,275 | ASP.NET [How to check if SqlDataSource1 is empty] | <p>I make SqlDataSource1.DataBind(); with some parameters on button click,</p>
<p>then I'm working with a Grid onDataBound();</p>
<p>but if my SqlDataSource1 returns empty data I've got an error even if I'm trying to check if (GridView2.HeaderRow.Cells.Count != 0) so I guess I need to check it on SqlDataSource1 somew... | asp.net | [9] |
970,787 | 970,788 | How to record video in iphone | <p>HI,</p>
<p>I need to record video using iPhone. To do that i used UIImagePickerController. I have an iPhone 3G, with me. when i run my code to check if source type available it says device not supported. My OS is 3.2.1, where i am wrong, can some one tell me what i need to change. </p>
<p>Also is there some other ... | iphone | [8] |
4,601,397 | 4,601,398 | c++ bitset questions | <p>I want to ask two C++ bitset questions.</p>
<p>(1) How to create a bitset with a specified length from a function argument? I mean, for example, I have a function </p>
<pre><code>void f(int n)
</code></pre>
<p>And inside <code>f</code>, I need to create <code>bitset<n> bs;</code> Is this something doable?</... | c++ | [6] |
1,687,817 | 1,687,818 | Avoid Race Conditions in PHP on Submit: Please do not click submit more than once! | <p>A while back, online apps used to say, "do not click submit more than once." That's gone now, right? How do you guard against that in, say, PHP?</p>
<p>One solution I'm using involves putting a variable in the Session, so you cannot submit to a page more than once every 10 seconds. That way the database work will h... | php | [2] |
1,804,052 | 1,804,053 | maemo or android | <p>Which one is better to use maemo or android!!as both of them are linux based ????</p>
| android | [4] |
2,255,555 | 2,255,556 | richtextbox dosn't support arabic | <p>hi all
when i replace english characters in richtextbox with arabic characters, it appears to be question marks instead of the arabic characters.
but when i try to write in the richtextbox directly with arabic, it accepts
is there is any solution for the problem of replacing?
thanks in advance.</p>
| c# | [0] |
4,527,145 | 4,527,146 | php if to include html | <p>PHP isn't really my language of choice, that being said I remember seeing a php <code>if</code> being used something like this:</p>
<pre><code><?php
if (blah) {
?>
// loads of html and js that doesn't need to be escaped since we closed
// the php already with "?>"
<?php
}
?>... | php | [2] |
3,692,893 | 3,692,894 | Javascript: generate random nice saturated colors (selected palette) | <p>i saw a lot of Js example but none fit my needs:</p>
<p>I'd like to have a script to generate colros, but if I use the common solution</p>
<pre><code>color = '#'+Math.floor(Math.random()*16777215).toString(16);
</code></pre>
<p>it generates pastel colors, where I'd like better more saturated colors...or more amb... | javascript | [3] |
4,595,112 | 4,595,113 | ThreadLocal Initialization in Java? | <p>I'm building a singleton that has a ThreadLocal as an instance variable, this singleton has a method that may be accessed by multiple threads and it is lazily instantiated. Right now I'm thinking on something like this:</p>
<pre><code>static final ThreadLocal<HashMap> bindingContext = new ThreadLocal<HashM... | java | [1] |
2,268,328 | 2,268,329 | VM Limit in Android 2.0 | <p>Is there a way to expand the VM limit in Android 2.0 on an actual device? Using <code>java.lang.Runtime.maxMem()</code> on a Droid reveals a limit of 24MB, and I've written some code that incrementally allocates memory until failure to verify that figure. You can set the VM size in the emulator, but I haven't yet ... | android | [4] |
3,060,737 | 3,060,738 | How do I properly dereference a buffer? | <p>I am having some memory problems with a project of mine. After a bit of tracing memory on several positions in my program, I retraced the problem to this line:</p>
<pre><code>(FloatBuffer)lightBuffer.asFloatBuffer().put(lightAmbient).flip()
</code></pre>
<p>I am using the resultant buffer in a function straight aw... | java | [1] |
5,832,499 | 5,832,500 | PHP - extracting words from a list in a text | <p>I have a list of whitelisted words: <code>kitchen chair table</code>;</p>
<p>Given a text, I would like to know which of those white-listed words are in it.</p>
<p>What would be a <em>good</em> way to achieve this? I mean, easy to understand, with good performances?</p>
| php | [2] |
2,228,044 | 2,228,045 | Implied string comparison, 0='', but 1='1' | <p>I was debugging something and discovered some strangeness in JavaScript:</p>
<pre><code>alert(1=='') ==> false
alert(0=='') ==> true
alert(-1=='') ==> false
</code></pre>
<p>It would make sense that an implied string comparison that 0 should = '0'. This is true for all non-zero values, but why not for zer... | javascript | [3] |
5,324,826 | 5,324,827 | Youtube video play with android player | <p>How will we play youtube video with android media player???</p>
<p>Anybody has idea then please explain me.</p>
<p>I have to play the URL:"http://www.youtube.com/embed/bIPcobKMB94?autoplay=1" with android default media player.</p>
<p>When i played this url with android media player, i got MediaPlayer error (1, -... | android | [4] |
5,576,137 | 5,576,138 | char and int in Java | <p>I was surprised to see this code work. I thought that char and int were two distinct data types in Java and that I would have had to cast the char to an int for this to give the ascii equivelent. Why does this work?</p>
<pre><code>String s = "hello";
int x = s.charAt(1);
System.out.println(x);
</code></pre>
| java | [1] |
1,272,430 | 1,272,431 | How do I set an empty list of a certain type | <p>We have <code>Collections.EMPTY_LIST</code> but it is not typed, which shows an eclipse warning. How do I set an empty list of a certain type.</p>
| java | [1] |
74,763 | 74,764 | JavaScript external file does not show variables | <p>Well I am pretty new at javascript. Problem is
when I write stuff , for example a variable or array in an external js file, and embed it with , VStudio 2008 intellisense does not show any of the variables ... is it because I cannot access to variables in one script tag from another? if so How do I use jQuery like s... | javascript | [3] |
398,126 | 398,127 | C++ Convert Binary File to Image | <p>I'm trying to make a C++ console app that can convert binary(mp3) files to images. How can I read every binary character in the file, convert to hex, and then save it as an image. <a href="http://stackoverflow.com/questions/3408864/how-can-i-convert-a-binary-file-to-another-binary-representation-like-an-image/340899... | c++ | [6] |
3,145,972 | 3,145,973 | Reset JavaScript Counter? | <p>I am trying to program a counter into a website via JavaScript and have found exactly what I need here:
<a href="http://www.w3schools.com/js/js_timing.asp" rel="nofollow">http://www.w3schools.com/js/js_timing.asp</a></p>
<p>What I am trying to do is count down from 30 to 0. Once the counter reaches zero I want to d... | javascript | [3] |
4,603,255 | 4,603,256 | What is a log file and how can we create a log file in android? | <p>I don't have any knowledge about the log files. what are log files and how can we create a log in android? Please help me out in creating log files. </p>
| android | [4] |
2,315,754 | 2,315,755 | Saving and retrieving values with SharedPreferences | <p>I want to save two values using shared preferences and get those values in other classes. Can any one please give me information about how to set shared preferences and getting value from shared preferences.</p>
<p>I am using following code:</p>
<pre><code>SharedPreferences settings =
getSharedPreference... | android | [4] |
808,361 | 808,362 | Why python has limit for count of file handles? | <p>I writed simple code for test, how much files may be open in python script:</p>
<pre><code>for i in xrange(2000):
fp = open('files/file_%d' % i, 'w')
fp.write(str(i))
fp.close()
fps = []
for x in xrange(2000):
h = open('files/file_%d' % x, 'r')
print h.read()
fps.append(h)
</code></pre>
<p... | python | [7] |
2,342,149 | 2,342,150 | Validate that a string is a positive integer | <p>I would like the simplest, failsafe test to check that a string in JavaScript is a positive integer.</p>
<p><code>isNan(str)</code> returns true for all sorts of non-integer values and <code>parseInt(str)</code> is returning integers for float strings, like "2.5". And I don't want to have to use some jQuery plugin ... | javascript | [3] |
3,303,860 | 3,303,861 | Delphi's like decision cube for c# | <p>I'm looking for a pivot table like component for winforms and c#, like the good-old decision cubes that came with Delphi decades ago. Any pointers?</p>
<p>I need one able to be used independently of the underlying database, so capable of getting data programatically and not restricted to sqlserver olap or similar</... | c# | [0] |
4,763,855 | 4,763,856 | Getting the wrong count? | <p>I am getting the wrong count error and I can't figure out why.</p>
<p>In my database serverId = 1/2/3 has only one started value and 3 notstarted value for each server.</p>
<pre><code>painfo = (from paes in server.AppPM_Paes
where (paes.PaStatus == "Started" || paes.PaStatus == "NotStarted" ) &&... | c# | [0] |
2,201,371 | 2,201,372 | how to make asp.net v1.1 validation control compatible with IE9 | <p>How to make ASP.net v1.1 compatible with IE9? I have tried all the options available in the forums but nothing seems to work. As soon as i am launching the application its Login page appears with no image displayed (image should come), cross mark is coming for the image and after entering username and password the s... | asp.net | [9] |
4,789,102 | 4,789,103 | What C++ string classes/systems exist that have good unicode support and a decent interface? | <p>Using strings in C++ development is always a bit more complicated than in languages like Java or scripting languages. I think some of the complexity comes from a performance focus in C++ and some is just historical.</p>
<p>I know of the following major string systems and would like to find out if there are others a... | c++ | [6] |
2,236,844 | 2,236,845 | Python internals | <p>Can anyone please direct me to an online document or books where I can find and learn about the Python implementation in C, like this one for Perl: <a href="http://perldoc.perl.org/index-internals.html" rel="nofollow">http://perldoc.perl.org/index-internals.html</a>
or this book: <em>Extending and Embedding Perl by... | python | [7] |
4,111,134 | 4,111,135 | Reading other's code | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2429979/how-do-i-begin-reading-source-code">How do I begin reading source code?</a> </p>
</blockquote>
<p>I've been studying C++ and Lisp for a while now..</p>
<p>Bur, everytime I try getting others code to rea... | c++ | [6] |
5,615,681 | 5,615,682 | document.body.clientHeight not working? (JavaScript) | <p>document.body.clientHeight not returning correct values (in below code return 0 onload and 20 onresize )</p>
<pre><code><html>
<head>
<title>Untitled</title>
<script type="text/javascript" >
function height1()
{
document.getElementById("viewheight").innerHTML = document.body.client... | javascript | [3] |
3,576,163 | 3,576,164 | How can I get next week dates? | <p><strong>Problem</strong></p>
<p>I'm using the below code to get the next week's date and second week's date. It works fine for first few records but later it starts giving year <strong>1970</strong>.</p>
<p>If the start date is <strong>12/01/2013</strong> it shows me coorect result that is:</p>
<p>Next week: <str... | php | [2] |
5,470,366 | 5,470,367 | when download an image, does urllib have a return code if its sucessful or not? | <p>I want to download an image file from potentially 5 sites.</p>
<p>Meaning that if the image wasn't found in site#1, try site#2, etc.</p>
<p>How can I test if the file was downloaded?</p>
| python | [7] |
1,006,633 | 1,006,634 | This pointer and performance penalty | <pre><code>void do_something() {....}
struct dummy
{
//even I dont call this, compiler will call it fall me, they need it
void call_do_something() { this->do_something_member(); }
void do_something() {....}
};
</code></pre>
<p>According what I know, every class or struct in C++ will implicity call
this p... | c++ | [6] |
3,560,219 | 3,560,220 | slide down effect with jquery | <p>suppose i have one div which has data. i want when i will click on a button then a new div will be created and which will cover the actual div like shutter down. here is sample code i got from a site which is very close but not the way i want.</p>
<pre><code> $(document).ready(function() {
var $box = $('#box')... | jquery | [5] |
6,023,118 | 6,023,119 | Can iphone app be developed in any other language? | <p>I was wondering if iphone apps can be developed in any other programming languages like java or C#?</p>
<p>Regards,
Arvind</p>
| iphone | [8] |
2,802,258 | 2,802,259 | string to int use parseInt or Number? | <p>As the title already says, what should I prefer when converting a string to an int? Is there any performance gain when using one over the other?</p>
| javascript | [3] |
3,486,989 | 3,486,990 | jquery weekcalender render events for single event source | <p>I am working with <a href="http://themouette.github.com/jquery-week-calendar/weekcalendar_demo_3.html" rel="nofollow">jQuery week calender</a>.</p>
<p>In "Event Data Source:" I am showing users list. My question is how can I render events only for particular user, also render the tables header listing the users to ... | jquery | [5] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.