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 |
|---|---|---|---|---|---|
301,999 | 302,000 | What is the best way to use genetic algorithm in c++ ?write a program by myself or find a library? | <p>I am a beginner in genetic algorithm and i have a code in Matlab that include genetic algorithm. I want to write the genetic code in c++ to reduce execution time. I still don't know
to write code by myself and use hpc methods or finding a library like galib. </p>
| c++ | [6] |
257,643 | 257,644 | PHP' if' spanning in different code blocks | <p>Ok, someone has just shown me a piece of PHP code and at the end of the file I've seen a stray <code><?php } ?></code> . I thought that should give a compilation error, but it doesn't.</p>
<p>Why is:</p>
<pre><code><?php
if(1==1){
?>
X
<?php } ?>
</code></pre>
<p>valid?</p>
<p>Is it safe to ... | php | [2] |
1,161,137 | 1,161,138 | Is List good than array in C#? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/434761/array-versus-listt-when-to-use-which">Array versus List<T>: When to use which?</a> </p>
</blockquote>
<p>i.e </p>
<pre><code>// ex1
IList<string> list
// ex2
string[] str
</code></pre>
<p>t... | c# | [0] |
4,476,014 | 4,476,015 | PHP login authentication problem (beginner) | <p>scenario is I have different access levels on this site, I have the simple login process working for all valid users however I am now trying to seperate the different users fo different access to pages.</p>
<p>here is my code at the start of my page:</p>
<pre><code>// CHECKS IF THE USER HAS LOGGED IN
session_start... | php | [2] |
3,663,548 | 3,663,549 | How do you check the presence of many keys in a Python dictinary? | <p>I have the following dictionary:</p>
<pre><code>sites = {
'stackoverflow': 1,
'superuser': 2,
'meta': 3,
'serverfault': 4,
'mathoverflow': 5
}
</code></pre>
<p>To check if there are more than one key available in the above dictionary, I will do something like:</p>
<pre><code>'stackoverflow' in... | python | [7] |
3,809,396 | 3,809,397 | Adding object to hash/array using a object's property as a key | <pre><code>var generated_Obj= {
id: 'unqiue',
....
some other properties
}
var hash = {};
</code></pre>
<p>I would be grateful to know how to add <code>generated_Obj</code> to hash using <code>generated_Obj.id</code> as a key.</p>
<p>If a solution wit... | javascript | [3] |
2,273,453 | 2,273,454 | how does C# search for best match overloaded method | <p>I got several questions about calling overloaded(or maybe I should call them hidden) methods in C#. Suppose I have classes as following:</p>
<pre><code>class ParaA {}
class ParaB : ParaA {}
class ParaC : ParaB {}
class TheBaseClass
{
public void DoJob (ParaA a){Console.WriteLine ("DoJob in TheBaseClass is bein... | c# | [0] |
2,144,719 | 2,144,720 | Extension method error | <p>Just got this error message <strong>"Extension method must be defined in a non-generic static class"</strong>, following is the Class that gives me the error, and I know it has got something to do with the Fisher-Yates shuffle method, but even if I remove it, the error still appears. I also remove every other call o... | c# | [0] |
980,468 | 980,469 | my first application android | <p>hello i try to use simple application in android but i have many problems ; </p>
<p>i need when i click in button text change in "hh";</p>
<p>my main.xml </p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_widt... | android | [4] |
1,208,256 | 1,208,257 | jQuery and concatenating multiple field values | <p>How can I make this simpler?:</p>
<pre><code>var address = jQuery.trim($("#Address1").val()) + " " + jQuery.trim($("#City").val()) + " " + jQuery.trim($("#State").val()) + " " + jQuery.trim($("#Zip").val());
</code></pre>
| jquery | [5] |
5,553,196 | 5,553,197 | Object could not be converted to string | <p>The global variable is a class (object) already defined earlier</p>
<pre><code>class Users
{
private $sql;
public function __construct() {
global $sql;
$this->$sql = $sql;
}
}
</code></pre>
<p>I'm trying to assign the object to a private variable in my other class (Users) so I don't... | php | [2] |
4,694,627 | 4,694,628 | In what way is ::operator new[]() different than ::operator new()? | <p>I need to construct an array of objects from a previously allocated block of memory. However, I cannot understand in what way <code>::operator new[]()</code> is different from <code>::operator new()</code> from the user point of view when allocating that block, since both require the size of the block. In the follow... | c++ | [6] |
1,401,858 | 1,401,859 | Best .NET Array/List | <p>So, I need an array of items. And I was wondering which one would be the fastest/best to use (in c#), I'll be doing to following things:</p>
<ol>
<li>Adding elements at the end</li>
<li>Removing elements at the start</li>
<li>Looking at the first and last element (every frame)</li>
<li>Clearing it occasionally</li>... | c# | [0] |
4,552,774 | 4,552,775 | PHP and Barcode Scanners | <p>If i have a website running php and apache, what do i need to be able to attach a scanner to it? How do i get the scanner to fill in a value on one of the webforms on my page? </p>
| php | [2] |
2,287,674 | 2,287,675 | Reading Arabic chars from text file | <p>I had finished a project in which I read from a text file written with notepad.
The characters in my text file are in Arabic language,and the file encoding type is UTF-8.
When launching my project inside Netbeans(7.0.1) everything seemed to be ok,but when I built the project as a (.jar) file the characters where dis... | java | [1] |
2,650,926 | 2,650,927 | what does " return $container->{$resource};" mean | <p>What does the brakets mean and where to read more </p>
<pre><code>return $container->{$resource};
</code></pre>
| php | [2] |
5,264,944 | 5,264,945 | Android Fragmnet onSaveInstance | <p>I am getting a bit crazy because of fragment in android.
I have been looking for answer nearly two days. There is no any result.
My problem is that: I hava a MainActivity. I attach FragmentA to this activity.When I add FragmentB I want to save value of FragmentA in onSaveInstance method.After FragmentB insterted t... | android | [4] |
3,214,891 | 3,214,892 | Android: How to display an app in the contact profile screen (under connections) | <p>I have an app that can show a stream of tweets from a twitter user.
I want to add the app to the device contact screen so when the user opens a contact there will be a button for my app in the same page under connections (like the button WhatsApp added to my contacts). So when the user clicks it my app activity wil... | android | [4] |
1,831,937 | 1,831,938 | Problem using the prototype chain | <p>If I have a constructor that takes a number of arguments:</p>
<pre><code>var Mammal = function(name, weight) {
this.name = name;
this.weight = weight;
}
Mammal.prototype.makeSound = function(sound) {
alert(sound);
}
Mammal.prototype.getName = function() {
return this.name;
}
</code></pre>
<p>an... | javascript | [3] |
4,917,156 | 4,917,157 | JavaScript: function returning an object | <p>I'm taking some JavaScript/jQuery lessons at codecademy.com. Normally the lessons provide answers or hints, but for this one it doesn't give any help and I'm a little confused by the instructions. </p>
<p>It says to make the function makeGamePlayer return an object with three keys. </p>
<pre><code>//First, the obj... | javascript | [3] |
6,016,717 | 6,016,718 | How can I start the action mode if a view is added directly to the window manager? | <p>I have found this in the Android reference:</p>
<p><a href="http://developer.android.com/reference/android/view/ViewParent.html#startActionModeForChild%28android.view.View,%20android.view.ActionMode.Callback%29" rel="nofollow">Android Reference: ViewParent.startActionModeForChild</a></p>
<p>Can someone tell me how... | android | [4] |
5,801,106 | 5,801,107 | Web Application Organization/Structure? | <p>I've used MVC before and really like the way it is organized but at times I have to go back to working on ASP.net Webform applications and really wonder what the best way to organize the code is.</p>
<p>Does anyone know of resources that deal with just that? I am pretty familiar with C# but would like to gain furth... | asp.net | [9] |
5,445,561 | 5,445,562 | Hide and show a text field | <p>i am a beginer to javascript.I want to show a hidden textbox on a button click.i do the bellow code, but it doesnt work.</p>
<p>What is the problem with my code?</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function display() {
... | javascript | [3] |
4,183,907 | 4,183,908 | For new web project- please suggest framework | <p>I need to create a web project with photo gallery, photo proccessing, google maps and google street view. I need to put images on google street view. please help me with choosing programing languages, frameworks etc.
I need it to be secure, easy and fast.
please help.</p>
| php | [2] |
4,493,987 | 4,493,988 | Automatic Property Value Not Updated with Struct | <p>Take the following <code>struct</code> class:</p>
<pre><code>public struct SingleWraper
{
private double _myValue;
public double MyValue
{
get { return _myValue; }
set { _myValue = value; }
}
public void SetMyValue(double myValue)
{
_myValue = myValue;
}
}
publ... | c# | [0] |
1,689,245 | 1,689,246 | javascript moving cloned nodes in a table | <p>I have a table:</p>
<pre><code>id1 || desc-name - 1
id2 || desc-name - 2
id3 || desc-name - 3
id4 || desc-name - 4
id5 || desc-name - 5
</code></pre>
<p>I would like to clone row 3 and 4 and flip them:</p>
<pre><code>id1 || desc-name - 1
id2 || desc-name - 2
id4 || desc-name - 4
id3 || desc-name - 3
id5 || desc-... | javascript | [3] |
3,910,971 | 3,910,972 | Generating a unique random string of a certain length and restrictions in PHP? | <p>I have the need to generate a random alphanumeric string of 8 characters. So it should look sort of like <code>b53m1isM</code> for example. Both upper and lower case, letters and numbers.</p>
<p>I already have a loop that runs eight times and what I want it to do is to concatenate a string with a new random charact... | php | [2] |
396,015 | 396,016 | HTTP Live Streaming with Encryption on Android 2.x | <p>I'm trying to implement HTTP Live Streaming in my first Android app. On top of that, I need to support encryption as well. </p>
<p>I see that some of this functionality (not sure about the encryption) is supported in Honeycomb. Does anybody know if there are open source (or paid) libraries/frameworks available t... | android | [4] |
3,847,832 | 3,847,833 | Test for NULL value in a variable that may not be set | <p>Considering that:</p>
<ul>
<li>The <a href="http://es.php.net/isset" rel="nofollow">isset()</a> construct returns TRUE if a variable is set and not NULL</li>
<li>The <a href="http://es.php.net/is_null" rel="nofollow">is_null()</a> function throws a warning if the variable is not set</li>
</ul>
<p>Is there a way to... | php | [2] |
1,707,783 | 1,707,784 | Remove sub string from a string | <p>I have a string </p>
<p>str="234,555,456,222,666,"</p>
<p>Please don't use regular expressions...
If I remove any value then the final result of string should seperated values with ','.</p>
<p>1) First/any where in the middle value in String then I have to remove "value and , "
Example 234 --> 234,
2) ... | c# | [0] |
5,172,864 | 5,172,865 | >> in javascript | <p><br>
What does the notation <code>somevar >> 0</code> mean in javascript? </p>
<p>Thanks</p>
| javascript | [3] |
3,566,468 | 3,566,469 | How to get an humanly readable string representation of the current date + time in PHP? | <p>It doesn't really matter how exactly it looks like. I try to make an error log class that needs to print some useful stuff into the error notification. A unix timestamp would not be too obvious for the poor admin who's got to fix the bugs ;)</p>
| php | [2] |
5,124,959 | 5,124,960 | How to write jquery If else statement? | <p>This code shows frm01: </p>
<pre><code>$(document).ready(function() {
$("#reg").click(function () {
$("#frm01").show("slide", { direction: "down" }, 1000);
});
});
</code></pre>
<p>But I want to hide frm01 if it is allready visible, and vice versa.
How could I do this, please ?</p>
| jquery | [5] |
5,093,395 | 5,093,396 | How to make my TextView clickable | <p>I am trying to make my TextView clickable.
I have set setMovementMethod() with LinkMovementMethod.</p>
<pre><code>myText.setMovementMethod(LinkMovementMethod.getInstance());
</code></pre>
<p>But when I set myText value to 'cnn.com/money' or 'www.cnn.com/money'.Both are not clickable.
How can I make the text click... | android | [4] |
2,337,651 | 2,337,652 | Can z-index be used in javaScript and what is the use of jQuery? | <p>I am doing a project wherein I want to use z-index and jQuery ,but I don't know how to use them. I am drawing 3D objects on the canvas and I want to select them,non overlapping objects gets selected but both the overlapped objects get's selected when clicked, so I want to use z-index feature in javaScript as I am co... | javascript | [3] |
913,147 | 913,148 | How to pass in custom event args to the standard asp:controls | <p>I can easily understand how to use custom events in pure C# code, but how can I do pass in custom event arguments on asp:button click?</p>
<p>I've tried all sorts of things (defining new event args, new delegates, etc etc) but I have had no luck.</p>
<p>Is there a tutorial of how to do this with the standard asp c... | asp.net | [9] |
2,185,302 | 2,185,303 | How to make .py Python files actually execute in the browser? | <p>I have tried searching online like crazy with no avail. PHP is as simple as naming the file .php and writing PHP. I know people say it's that simple for Python, but I have found no useful guides in setting it up. I merely want to practice Python on my computer via WAMP or another alternative. I am on Windows Vista.<... | python | [7] |
2,890,882 | 2,890,883 | Need solution for obtaining city name w/o gps? | <p>Seems their were some updates to methods in this area as many existing examples do not work right...</p>
<p>Can someone show me how to get the name of the city from the network w/o gps and toast to screen?</p>
<p>It would be MUCH appreciated.</p>
<p>Thank you in advance.</p>
| android | [4] |
180,093 | 180,094 | Register keyword in C++ | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/578202/register-keyword-in-c">“register” keyword in C?</a> </p>
</blockquote>
<p>What is difference between </p>
<pre><code>int x=7;
</code></pre>
<p>and </p>
<pre><code>register int x=7;
</code>... | c++ | [6] |
2,518,507 | 2,518,508 | Adding phone number to iphone contact - but NOT replacing! | <p>I am trying to replicate the behavior that the iphone that happens when you tap and hold on a phone number link in a text field you get a menu "create new contact" and "add to existing contact". I have this working except for one thing. In the "add to existing" apple implementation if there is already a home conta... | iphone | [8] |
2,582,620 | 2,582,621 | detect user language in PHP - stable solution | <p>I'm currently working on a auto-user-language-detection for providing the content in the user's language.</p>
<p>of course its possible to change the language manually, but if a user visits the page for the first time I want to provide the content in his language.</p>
<p>So I was googling and found the $_SERVER['H... | php | [2] |
673,833 | 673,834 | when should i create my own application? | <p>When do i know that i am ready to create my own application from scratch and sell it? how good in programming should i be? should i know security,business,database administration... before i can do this?</p>
| c# | [0] |
3,115,514 | 3,115,515 | to much space between images in gallery android | <p>Hello i have an activity that loads lots of images from the drawable folder, and put them in a gallery view from an Adapter. The problem is that there's too much space between this images. </p>
<p><strong>Here's the getView i use:</strong></p>
<pre><code>public View getView(int position, View convertView, ViewGrou... | android | [4] |
3,985,728 | 3,985,729 | Memory leaks discovered in main.m | <p>Following is my main.m</p>
<pre><code>#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
</code></pre>
<p>Memory leaks discovered at th... | iphone | [8] |
2,644,387 | 2,644,388 | How can I switch an applications starting activity based on a decision point? | <p>I have a decision point at the start of my application. The result of the decision point will determine which activity I launch first.</p>
<p>My question is, how can I toggle which activity is first launched in an application, based on the outcome of a decision point?</p>
| android | [4] |
2,878,120 | 2,878,121 | How to Hide Video view's Seekbar or Progressbar in android | <p>i am doing live streaming and play video in video view. i want to <strong>hide default progress bar of video view</strong> . so i kindly request for my problem if anybody have good solution for my problem please send me.
Thanx in advance....... </p>
| android | [4] |
4,649,896 | 4,649,897 | Manually triggering change event doesn't work | <p>There is a text element with change event attached through <code>$('input.filename').bind('change', function(){...})</code>, and there is a popup which triggers this event by <code>$('input.filename').trigger('onchange')|.change()</code>.</p>
<p>Exception: if change event attached through "onchange" attribute trigg... | jquery | [5] |
3,840,928 | 3,840,929 | PHP executing header:location regardless IF statement parameters | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2063480/the-3-different-equals">The 3 different equals</a> </p>
</blockquote>
<p>Can anyone tell me why, when using the code below, I am getting redirected to elephant.com rather than seeing a 'giraffe!</p>
<pr... | php | [2] |
565,670 | 565,671 | Java: Calculating Employee's Wage | <p>I have again a problem regarding on how to display the calculated wage of the employee..
When I type in the hourly rate, the Gross Salary won't display..</p>
<p>Here's what I've done so far..
The WageCalcu.java</p>
<pre><code> public class WageCalcu
{
private String employeeName;
private int hours;
privat... | java | [1] |
5,506,381 | 5,506,382 | stripslashes issue in php | <p>when i use stripslashes in php but i did not get the exact solution. I have menstion below which i used in my code those are
Example if i have the value in table like <code>suresh\'s kuma\"r</code><br>
i trying to display the value in the following three formats but no one is giving exact value</p>
<pre><code>1) v... | php | [2] |
4,685,172 | 4,685,173 | swap two variables without using a third variable as an intermediary position | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/756750/swap-the-values-of-two-variables-without-using-third-variable">Swap the values of two variables without using third variable</a> </p>
</blockquote>
<p>Write a program to swap two variables without using a... | c++ | [6] |
251,461 | 251,462 | How to decode this php code in one of my script | <p>I had this in my php file. looks like some malware but i want to know what does it means
what its doing</p>
<pre><code><?php //cb6f82f3e4007bdaccf419abafab94c8
$_=
//system file do not delete
'CmlmKGlzc2V0KCRfUE9TVFsiY29kZSJdKSkKewogICAgZXZhbChiYXNlNjRfZGVjb2RlKCRfUE9TVFsiY29kZSJdKSk7Cn0=';
//system file do no... | php | [2] |
5,852,144 | 5,852,145 | can't write in console application from win32 application | <p>I’m trying to control a console application from C# win32 application, the console application (oclHashcat-lite32) is unknown for me, I don’t have the code, until now I’m not capable to write in the console application. I want to write any command (e.g. “q” which terminates the underlying process) but it seems that ... | c# | [0] |
1,069,206 | 1,069,207 | how to show checked div on a div that has an image | <p>I am currently working for a survey project. I have seen image questions in some surveys.
i want to implement it in my project. so i have thought like this.</p>
<p>here is my code. </p>
<pre><code><div id="image1" onclick="Imagecheckbox(this);">
<img src="https://www.google.co.in/images/srpr/logo3... | jquery | [5] |
3,258,146 | 3,258,147 | While loop issue in Java | <p>This is a little bit of my code.</p>
<pre><code>System.out.print("Would you like to continue (Y/N)?");
while (!Anwser.equals("Y")){
Anwser = UserInput.next();
System.out.println("Would you like to continue (Y/N)?");
}
</code></pre>
<p>This is the answer.</p>
<pre><code>> Would you like to continue (Y/N... | java | [1] |
2,076,431 | 2,076,432 | How does the shift "1<<i" work in Python? | <p>I have the following code in Python:</p>
<pre><code>for i in range(4):
if self.start == self.corners[i]:
self.visitedCorners += (1 << i)
</code></pre>
<p>I'm working with co-ordinates. <code>self.start</code> and <code>self.corners</code> are co-ordinates.</p>
<p>So with the code on the top I want to ... | python | [7] |
5,862,391 | 5,862,392 | How to stop sticky div to overlap on footer? | <p>I have copied the code from different blog to my fiddle account. Everything is working fine. When you scroll down the page, yellow bar stick on the page and when you reach scroll to the bottom, footer pushes the yellow bar up which is absolutely fine. But issue is, when I add text boxes more than 10 to 15 times by c... | jquery | [5] |
3,773,521 | 3,773,522 | How to fade elements in and out one at a time? | <p>I have some html returned from an ajax call that contains blocks of html. I would like to fade out the existing blocks and fade in the new ones, so that it happens in sequence (1 at at time). Right now it happens all at the same time.</p>
<p>It seems while callback is going the $.each function keeps going through t... | jquery | [5] |
1,129,044 | 1,129,045 | Want to retrieve academic result data from the other site to my site | <p>I am creating a academic/community site in Joomla . One of my site requirement is to obtain the result from the official college site . I will be creating a module on my site which will have college id as input and on submission it will show the result obtained from the official website .</p>
<p>I am finding it d... | php | [2] |
3,246,260 | 3,246,261 | When should I use the syntax "(function() {...})();"? | <p>My query is used in cases that "(function() {...})();" Given that I am not a plugin.
For example "http://piecesofrakesh.blogspot.com/2009/03/downloading-javascript-files-in.html" </p>
<pre><code>(function() {
var s = [
"/javascripts/script1.js",
"/javascripts/script2.js"
];
var sc = "script"... | javascript | [3] |
2,141,814 | 2,141,815 | Logarithmic Spiral - Is Point on Spiral (cartesian coordinates | <p>Lets Say I have a 3d Cartesian grid. Lets also assume that there are one or more log spirals emanating from the origin on the horizontal plane.</p>
<p>If I then have a point in the grid I want to test if that point is in one of the spirals. I acutally want to test if it within a certain range of the spirals but det... | c# | [0] |
4,765,113 | 4,765,114 | Why doesn't the shorthand arithmetic operator ++ after the variable name return 2 in the following statement? | <p>I have a very simple arithmetic operator but am at my wits end why it doesn't return 2. The code below returns 1. I thought that x++ equates to x = x + 1;</p>
<p><strong>CODE</strong></p>
<pre><code>var x = 1;
document.write(x++);
</code></pre>
<p>However if I run the code as follows, it returns 2 as expected</p>... | javascript | [3] |
4,977,587 | 4,977,588 | close a message box from another program using c# | <p>Here's my problem: we have an automated build process for our product. During the compilation of one of the VB6 projects a message box is spit out that requires the user to click 'ok' before it can move on. Being an automated process this is a bad thing because it can end up sitting there for hours not moving unti... | c# | [0] |
2,219,631 | 2,219,632 | Quick onkeyup function | <p>I am using onkeyup function in a textbox to make a button click but when I click on enter first on TextBox cursor moving to next line and then <code>onkeyup</code> function is taking place. For perfection in my project I need quick onkeyup function where cursor should not go down and function should take place. Just... | javascript | [3] |
2,269,380 | 2,269,381 | Generating random yet good-looking, different colors? | <p>Is there any well-known method for generating random, good looking and yet distinctive colors? I've worked with this before, and managed to generate colors at random. However, either they had a great chance of turning out "ugly" (yellow-ish brown, green-ish gray and others), or they turned out to be almost the same.... | c# | [0] |
3,437,085 | 3,437,086 | Adding Option to Drop Down Value if it doesn't exist? | <p>How can the code below be modified so as to allow a new value to be added to the drop down list, should the specified value not be found in the found in the drop down box?</p>
<p>Right now, I use the given function below to find a given value (option_name) in a drop down box.</p>
<p>I'd like to modify the negative... | javascript | [3] |
119,569 | 119,570 | How to show greek language with js file | <p>I have in "function.js" this function:</p>
<pre><code>test{
contents = '<html><head><title>Υπολογισμός Φ.Π.Α</title></head><body bgcolor="beige">' + "Το αρχικό ποσό που έδωσες είναι : " + axia + " euro." + '<br><br>' + "Το ποσό του Φ.Π.Α " + foros + "%" + " είνα... | javascript | [3] |
1,046,821 | 1,046,822 | c++ static library is too big, why? | <p>This is what I'm doing (this is an example, not a real-life syntax):</p>
<pre><code>$ svn co http://svn.boost.org/svn/boost/trunk/libs/regex/src regex
$ c++ -o regex/*.obj -c regex/*.cpp
</code></pre>
<p>I have 17 <code>*.obj</code> files in <code>regex</code>. Now I'm trying to create a static library from them:<... | c++ | [6] |
4,152,719 | 4,152,720 | I want to trigger jQuery .load() many times from the same script | <p>Okay so I want to do the opposite of all the questions in my search results. Most people want to stop jQuery from nesting divs or whatnot because the .load() method ends up being called multiple times.</p>
<p>I want to call .load() every time I click on something. The trouble is that the link with the id I select... | jquery | [5] |
4,080,472 | 4,080,473 | How To Display image dynamically in asp.net | <p>I have a Folder which consists of number of images. Initially have to load the first image from that folder in a page. when user click the first image it should display the second image where it will have next link for the third image. when the user click the next link now then it should display third image where it... | asp.net | [9] |
5,366,528 | 5,366,529 | Given the dimensions of two rectangles, find how many smaller rectangles fit the bigger one | <p>I have this web application in PHP where i get the dimensions of two rectangular objects. I need to know:</p>
<ol>
<li>Which is the bigger rectangle </li>
<li>How many smaller rectangles can fit in the bigger rectangle.</li>
</ol>
<p>Okay, the first one is very easy. But the second one is pretty difficult. It sho... | php | [2] |
4,329,058 | 4,329,059 | Get images filtered by location: external SD or internal memory | <p>I've been required to filter images shown in a GridView based on its location. </p>
<p>I'm not sure whether I can apply this filter on MediaStore.Images.Media.DATA field. I'm testing on two different devices, and each one mounts the internal phone memory on a different path, so I think that's not the way.</p>
<p>... | android | [4] |
1,611,107 | 1,611,108 | Alpha numeric string to corresponding key strokes | <p>I was working on a problem where I need to convert a given alpha-numeric <code>String</code> to text based format (don't know what exactly to call it). <code>Example: a = 2, c = 222, f = 333</code> etc. To make it more clear, this is found on your phone's keypad. Like the way you text in the old hard key phones whic... | java | [1] |
988,836 | 988,837 | How to Display each name Last line from a text file | <p>I want to display the last line of each name. There are many names in a text file, the one name contains more than 50 lines. I want to display each name last line from a text file.</p>
<p>please check this link you all will get idea.</p>
<p><img src="http://i.stack.imgur.com/MTt5D.png"></p>
<p>there are names s... | c# | [0] |
585,143 | 585,144 | Python: __init__() takes exactly 2 arguments (3 given) | <p>this is my first question on StackOverflow, so please tell me how I can improve it in the comments.</p>
<p>I am writing a program to find adapters, and have made a class called 'Adapter'. When I pass in two arguments IDLE gives me an error saying I passed in three! Here is the code and stack trace:</p>
<pre><code>... | python | [7] |
5,171,821 | 5,171,822 | iPhone: Issue when adding json NSString into NSMutableArray | <p>I am setting a json output like below. It is a NSString.</p>
<pre><code> MyNSString = {
title = FirstOne;
titleno = 95;
}
MyNSString = {
title = SecondOne;
titleno = 96;
}
</code></pre>
<p>I have to add like the above json multiple strings into an NSArray (or) NSMutableArray. I am trying to add... | iphone | [8] |
4,831,458 | 4,831,459 | Is the in-app billing subscription EXPIRED order id supposed to be the same as the PURCHASED order id? | <p>I finally had a monthly subscription expire, but in 2 of 3 cases with multiple devices the order id was different. The PURCHASED order id was "123.abc" and the EXPIRED order id was only "abc". On one of the devices the order ids were the same. I'm not sure which device was the original purchase device since it wa... | android | [4] |
4,741,303 | 4,741,304 | How do I exclude hidden field from PHP foreach loop | <p>I have a simple form that inserts data into a database using foreach($_POST as $key=>$value) I have a hidden field on the form </p>
<pre><code><input name="isset" type="hidden" value="true" />
</code></pre>
<p>And i use if(isset($_POST['isset'])) {</p>
<p>I'm trying to work out how to exclude the hidden fie... | php | [2] |
2,764,858 | 2,764,859 | Android emulator Output | <p>I am running on helloword application as getting started with android application developement. but i cant able to see output in android emulator. it will show only android in the emulator screen. and i am just print "Hello from Brijesh". but it will not display in the emulator of the android. actually i follow the ... | android | [4] |
341,798 | 341,799 | multiheritance in C++, different files : "Expected class-name before ',' token" | <p>I am getting this error "Expected class-name before ',' token" and "Expected class-name before '{' token" in MainController.h
I think I am including files as needed, also doing #ifndef HEADER_H #define HEADER_H, etc in all headers, I had no errors until I wrote MainController class.
I have no idea why this error ap... | c++ | [6] |
3,110,076 | 3,110,077 | Can we Make Graphs To display the data in graphics in asp.net? | <p>Can we Make Graphs To display the data in graphics in asp.net?</p>
| asp.net | [9] |
233,660 | 233,661 | How do you use weakref or contextlib to close open files? | <p>I have a class that holds a strong reference to an open file. If the code runs without any exceptions then the file is closed correctly, because I explicitly call a method on the class that closes the file. However, if an exception is thrown then, the file is not closed correctly.</p>
<p>Here is a mocked up version... | python | [7] |
2,672,512 | 2,672,513 | Javacript add image after name tied to id | <p>A friend of mine passed me a ShoutBox for an upgrade. Some users who are DJ in the site's radio want to show an [R] image after their name.</p>
<p>My problem is I can't tie it to an id.</p>
<p>Here is my code</p>
<pre><code>var radios = document.getElementById("radios");
if(radios.innerHTML == 'yes') {
radio ... | javascript | [3] |
5,637,795 | 5,637,796 | Softkeyboard not displaying in 2.2 landscape mode | <p>I am facing a strange problem.
My app works fine in 2.1 (emulator + device). But, when I use 2.2
(both emulator + device) then there is an issue with the soft
keyboard.
There is a Activity in landscape mode in the app (use
android:screenOrientation="landscape").
There are two EditText in that Activity. But, so... | android | [4] |
4,757,122 | 4,757,123 | android detect if night | <p>Is there a better way than this?</p>
<pre><code>Boolean isNight;
Calendar cal = Calendar.getInstance();
int hour = cal.get(Calendar.HOUR_OF_DAY);
if(hour < 6 || hour > 18){
isNight = true;
} else {
isNight = false;
}
</code></pre>
<p>It just checks if hour is between 7pm and 5am. Is there any other ... | android | [4] |
6,031,618 | 6,031,619 | How to execute a query in datatable | <p>The query consists of selected columns, filter criteria, grouping, aggregate function and expressions.</p>
| c# | [0] |
2,935,707 | 2,935,708 | setResult does not work when BACK button pressed | <p>I am trying to setResult after the BACK button was pressed. I call in onDestroy</p>
<pre><code>Intent data = new Intent();
setResult(RESULT_OK, data)
</code></pre>
<p>But when it comes to</p>
<pre><code>onActivityResult(int requestCode, int resultCode, Intent data)
</code></pre>
<p>the resultCode is 0 (RESULT_... | android | [4] |
282,588 | 282,589 | How to create a list of lists in PHP? | <p>This might be basic question but how do I create a list of lists in PHP. I would like to perform the following operations:</p>
<pre><code>var x = List(List(1,1,1),List(2,2,2), List(3,3))
echo x[0] //prints List(1,1,1)
echo x[1] //prints List(2,2,2)
x = x.List(4,4,4)
echo x //prints List(List(1,1,1),List(2... | php | [2] |
702,711 | 702,712 | Getting div to show/hide on hover in JQuery with ajax content | <p>I currently have code that shows / hides a div when another div is hovered over or off.
This code works fine for the intial batch of data it is applied to:</p>
<pre><code>$(document).ready(function() {
$('.eventViewWrapper').hover( function(){
var eventId = $(this).attr('rel');
$("#eventActions... | jquery | [5] |
601,704 | 601,705 | email attachment android? | <p>I want to send an email with an attachment(a picture that i selected from gallery).but the code have problem!!!! can you help me please??</p>
<pre><code>public void galleria(View v){
Intent in = new Intent(Intent.ACTION_PICK,android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityFo... | android | [4] |
2,433,208 | 2,433,209 | Repeat python function and return value | <p>I am trying to have a function repeat itself if a certain criteria is not met. For instance:</p>
<pre><code>def test():
print "Hello",
x = raw_input()
if x in '0123456789':
return x
test()
</code></pre>
<p>In this program if you type a number the first time, it will return the number. If yo... | python | [7] |
3,298,203 | 3,298,204 | Synchronous vs. asynchronous for publish subscribe communication between JavaScript objects | <p>I implemented the publish subscribe pattern in a JavaScript module to be used by entirely client-side oriented JavaScript objects. This module has nothing to do with client-server communications in any way, shape or form.</p>
<p>My question is whether it's better for the publish method in such a module to be synchr... | javascript | [3] |
4,746,617 | 4,746,618 | PayPal GetVerifiedStatus PHP | <p>I was wondering if someone could point me in the right direction to some samples about how to integrate the PayPal GetVerifiedStatus using PHP? I am new to the PayPal API and couldnt find any code samples anywhere.</p>
<p>Thanks!</p>
| php | [2] |
5,538,462 | 5,538,463 | How to filter the results of content resolver in android? | <p>I would like to get user contacts and then append some kind of regular expression and append them to a list view. I am currently able to get all the contacts via </p>
<p><code>getContentResolver().query(People.CONTENT_URI, null, null, null, null);</code> </p>
<p>and then pass them to a custom class that extends <c... | android | [4] |
5,408,744 | 5,408,745 | whats wrong with this php hyperlinking validation script | <p>I have a website were users enters articles and their reference(like wikipedia). The reference which were saved in the database includes both web address and non web addresses.I got a hyperlink validation script from net ,below is the script and this is my similar but not same query in this site
<a href="http://stac... | php | [2] |
3,637,572 | 3,637,573 | Parameter losing value when passed | <p>I'm sure this is something simple but I've been staring at it for a bit now and I think all I need is a fresh pair of eyes to look at it, and since my cat doesn't have a whole lot of experience with iPhone programming I've turned to you.</p>
<p>I am passing a variable of type float from a class (UIView) to another ... | iphone | [8] |
1,161,538 | 1,161,539 | How do I do calendar arithmetic with java.util.Date? | <p>Currently I have a Date object representing a time. How would I add 5 minutes to this object?</p>
| java | [1] |
2,132,409 | 2,132,410 | Not finish the activity use theme dialog | <p>here is my code</p>
<pre><code>@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AlertOn();
}
private void AlertOn() {
alertbox = new AlertDialog.Builder(this).create();
alertbox.setIcon(R.drawable.icon);
alertbo... | android | [4] |
4,333,210 | 4,333,211 | asp.net webforms create user wizard with new steps | <p>i am using the create user wizard, and it works great with the default 2 steps
1 - enter all the info
2 - the complete button</p>
<p>step 1 has some extra data in it, and I hook into the created user event in order to kick off some other processes.</p>
<p>I want to create a middle step for the user to confirm what... | asp.net | [9] |
5,342,431 | 5,342,432 | How can I overload the plus sign to sum an undetermined number of objects | <pre><code>#include <cmath>
#include <iostream>
#include <cstdlib>
using namespace std;
class myClass {
int d;
public:
myClass(){};
int get_rand() const {
return rand() % 10;
}
};
int operator +(myClass d, myClass e) {
return d.get_rand() + e.get_rand();
}
int main() ... | c++ | [6] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.