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,485,527 | 2,485,528 | Javascript var name counting variable | <p>I have the following bit of code: </p>
<pre><code>function finalCheck(theForm) {
var z = 0;
for(var i=0;i<15;i++){
var _i = theForm.elements[i].value;
if(_i == ""){
theForm.elements[i].style.background = '#FFD6D6';
z = 1;
}
}
if(z == 1){
alert("Please correct the fields highlighte... | javascript | [3] |
5,508,257 | 5,508,258 | Warning: compile with -Xlint:unchecked pops on this code! | <pre><code>import java.lang.reflect.Method;
public class ClassLoadingTester
{
public static void main(String a[]){
try{
ClassLoader loader=new CustomClassLoader();
Class c=loader.loadClass("AddClass");
loader=null;
Object o=c.newInstance();
Method... | java | [1] |
2,493,438 | 2,493,439 | FileSystemObject | <p>My script fly with IE8 when I instantiate the file system object:</p>
<pre><code>var fso = new ActiveXObject("Scripting.FileSystemObject");
alert("does not reach this point");
</code></pre>
<p>Any ideas?</p>
| javascript | [3] |
1,064,118 | 1,064,119 | Doing math on character array is having unexpected results | <p>The characters print out as expected individually but the math does not make sense: 5*6=2862. Why am I not getting the expected result 30?</p>
<pre><code>String thousand = "567893342234";
char[] numberArray = thousand.toCharArray();
System.out.println(numberArray[0]);
System.out.println(numberArray[1]);
int a = nu... | java | [1] |
3,297,414 | 3,297,415 | Select table cells w/ jQuery | <p>How do I select all but the first TDs? I don't know how many columns there could be in the table, so I can't really use :nth-child(2) etc...</p>
<pre><code><table>
<tr>
<td>do not select</td>
<td>select</td>
<td>select</td>
<td>select</td>
... | jquery | [5] |
1,884,568 | 1,884,569 | Doubt in android Activity navigation | <p>In my application, the first activity takes care of the splash screen/loader and onces it completes the load, a second activity comes up or starts.. Now when a person clicks on back or navigates back, it is supposed to exit the application but it goes tthe loader or splash activity..how can i avoid this ?? Hope my q... | android | [4] |
2,179,608 | 2,179,609 | How to set a javascript variable or reuse one from another function | <p>I have a problem going on here and without going into a lot of detail and confusing everyone, let me just ask the simple question.</p>
<p>Here are two functions. I need to use the "id" variable in the SubmitForm() function as well. Can someone please tell me how to do this? This is how new I am to js. :)</p>
<p>Th... | javascript | [3] |
5,764,787 | 5,764,788 | How to get numeric position of alphabets in java? | <p>How to get numeric position of alphabets in java ?</p>
<p>Suppose through command prompt i have entered abc then as a output i need to get 123 how can i get the numeric position of alphabets in java?</p>
<p>Thanks in advance.</p>
| java | [1] |
5,001,275 | 5,001,276 | How do I remove tooltip when 2 are assigned to the identifier? | <p><strong>EDIT</strong>
<em>I should say I am calling the method twice that is why there are 2 messages but I'd like to be able to check if there are any esiting messages assigned and then delete them before assigning the new ones</em></p>
<p>Hi I am using the qtip plugin and I have 2 tips assigned to the one div. I ... | jquery | [5] |
428,764 | 428,765 | insert line break in a cell of a grid view | <p>whenever there is two or more digit in a grid view each digit should be displayed in new row
eg if 111 then<br>
1<br>
1<br>
1 </p>
| asp.net | [9] |
1,040,999 | 1,041,000 | How to create a javascript plugin like the Facebook live stream? | <p>I am looking to create an easy java script plugin for my site that can be placed in other sites to pull info from my site. The Facebook live stream plugin allows you to select a couple options and it will spit out a line of code to place in your site to have the Facebook live stream. Can someone point me in the righ... | javascript | [3] |
4,904,223 | 4,904,224 | Weird behaviour with XSLT and javascript when a DOCTYPE is defined | <p>In my XLST, we use "vanilla" javascript to manipulate some divs that are in our reports. One of them goes above everything else in the center of the screen, and I was calling it like so when the page loads:</p>
<pre><code>var overlayObj = document.getElementById('theoverlay');
overlayObj.style.left = Math.max(0, ((... | javascript | [3] |
2,677,357 | 2,677,358 | out of memory for Java application | <p>I'm creating a Java application for image processing , and after a while of working on this program I got Out of memory exception because I think the Image objects taking a lot of memory space ,I can save the images as files to hard disk and read them when i need but that may took milli-seconds vs Nano-seconds if I ... | java | [1] |
2,748,240 | 2,748,241 | What is the point of a private pure virtual function? | <p>I came across the following code in a header file:</p>
<pre><code>class Engine
{
public:
void SetState( int var, bool val );
{ SetStateBool( int var, bool val ); }
void SetState( int var, int val );
{ SetStateInt( int var, int val ); }
private:
virtual void SetStateBool(int var, bool val ) ... | c++ | [6] |
2,649,174 | 2,649,175 | JavaScript take part of an array | <p>How can I create a new array that contains all elements numbered nth to (n+k)th from an old array?</p>
| javascript | [3] |
581,294 | 581,295 | Hoe to show page is loading in Javascript | <p>I am working on Cordys tool which uses Javascript. I am converting text file into PDF format and till that I want to show the message or image "please wait while converting...". Please guide me. It is not possible to use any tags of HTML in Cordys tool. Please suggest me some functions in Javascript.
Thanks</p>
| javascript | [3] |
5,368,614 | 5,368,615 | jQuery addition error | <p>I have a strange error going on. This is the jQuery function </p>
<pre><code>jQuery(document).ready(function(){
jQuery("#new_customer").delegate(".kool", "keyup", function(event) {
var SelectProd = jQuery('.price, .qty',this);
var price = jQuery('.price', this).val();
var qty = jQuery ('.qty', thi... | jquery | [5] |
6,011,895 | 6,011,896 | How to print PDF or an image from a page | <p>I have an ASP.NET app (it uses DevExpress v 10.2). There is a button called PRINT on a page. When the button is clicked the application should:
1. extract a file from its DB. The file is either PDF or JPEG (the application knows its type in runtime only)
2. TO PRINT OUT the file. Some ‘preview’ should be shown to u... | asp.net | [9] |
220,611 | 220,612 | jQuery UI Slider issues | <p><strong>Resolved</strong></p>
<p>I've got jQuery slider on my new website build, but I think it's conflicting with other scripts that I am using.</p>
<p>Here is the code I'm using to activate it.</p>
<pre><code> $( "#range" ).slider({
value:1,
min: 1,
max: 20,
step: 5,
s... | jquery | [5] |
697,417 | 697,418 | How can i run the iphone 3gs app in iphone 4s | <p>i am developing one application for iphone 3gs with screen size 320X480.But i want to run that application in iphone 4s.But iphone 4s screen size is 960X640.And the iphone 5 screen size is 1136 x 640.So how can i run in iphone 5.If i run my application in iphone 4s or iphone 5 may i get any ui errors.Please tell me<... | iphone | [8] |
5,911,983 | 5,911,984 | open listview when click button | <p>i want to do something that when i click on button he will openfor me something like listview with the name of all the contacts in my phone...how can i do it?
i know how to get the names of all the contacts in my phone and put them into string array,however how can i open a new windows with a listview of all the con... | android | [4] |
5,163,240 | 5,163,241 | Difference between "instantiated" and "subclass" | <p>I was reading a Java tutorial and it said:</p>
<p>Abstract classes cannot be instantiated, but they can be subclassed.</p>
<p>what does this mean? I thought one had to instantiate in order to create a subclass? This line has really confused me, any and all help is much appreciated.</p>
| java | [1] |
5,215,142 | 5,215,143 | Turn a panel into a circle in C# Visual Studio 2010 | <p>I'm trying to make a basic soccer game in C#, and ive almost completed the field except for the various arcs and circles that are fairly important in the game, especially to set the bounds the computer's players cannot pass while their teammate/opponent is lining up for the kick.
So, all the methods I've tried haven... | c# | [0] |
2,079,091 | 2,079,092 | How to draw an CGImage with some alpha transparency? | <p>Want to draw an UIImageView which has an CGImage, and the UIImageView has alpha 0.5f. But this CGContextDrawImage function doesnt take an transparency value. So how could I draw an image slightly transparent?</p>
<p>To be clear: The image itself is not transparent, but I want it to be "dimmed" a little bit. Just li... | iphone | [8] |
4,274,912 | 4,274,913 | jQuery: Post form to a modal window for previewing the entered data | <p>I am looking for a way to use jQuery to allow a user to look at a modal window "preview" of a form before they submit the form to be saved. </p>
<p>I have this working with javascript, the form is posted to a file named preview.php that iterates through the posted information. The script currently opens a new windo... | jquery | [5] |
1,704,104 | 1,704,105 | How to get the return array back from an ajax function call using jquery? | <pre><code>var testFile = $("#selection").val(),
testData = getTestData(testFile);
// not working during the first time I run the function, empty
alert(testData);
function getTestData(testF) {
$.getJSON("test.php", {
fileTest: testF
}, function (data) {
$.each(data, function (index, valu... | jquery | [5] |
3,083,478 | 3,083,479 | Content Type when serving a file in a generic handler | <p>I'm busy writing a handler to serve various documents for download or presentation in web forms pages. The documents range from various image formats, to PDF, to MS Office documents, to generic binaries. My basic draft of the download process is as below:</p>
<pre><code>public void ProcessRequest(HttpContext cont... | asp.net | [9] |
78,188 | 78,189 | Issues with opening a socket on ICS | <p>So I'm having a problem making a new socket. I had this program that worked perfectly on gingerbread, but since my HTC sensation xe updated to ICS the program crashes each time I try to open a socket. I had a program sending gyro data to a server on my local network. Since this problem came up I've reduced my code d... | android | [4] |
1,530,359 | 1,530,360 | Choose correct UIButton on dynamiclly created buttons without tags | <p>I am loading up a plist file and creating buttons based on this file. These buttons can change at any point during the application running (which will trigger an update of all the buttons etc).</p>
<p>One set of buttons represents a list of categories. So I may have a house button, car button, etc. No matter wha... | iphone | [8] |
1,758,085 | 1,758,086 | How to force install of Android App in Development Environment? | <p>I'm tired of uninstalling and than reinstalling in development.<br/>
Is there a way to do adb -force install some.apk ? I mean this would save a lot of time. Each time going to system ->apps->uninstall every time a signature is different. </p>
<p>Obviously debug is a dev setting so I don't see why one constantly ne... | android | [4] |
4,561,692 | 4,561,693 | Json access error | <pre><code>var markers3 = [];
for (var i = 0; i < 1964; i++) {
var dataPhoto = data8.weblandmarks8[i];
if(data8.weblandmarks8[i].ip2==data8.weblandmarks8[i+1].ip2 )
{
var k=i+2;
while(1)
{
if((data8.weblandmarks8[k].ip2) == (data8.weblandmar... | javascript | [3] |
2,932,755 | 2,932,756 | Excel PMT function in Java | <p>I want to implement PMT function (from Excel) in Java. The formula of the PMT function is:</p>
<pre><code>(D7*D9/12)/(1-(1+D9/12)^(-(D11/12)*12))
</code></pre>
<p>where:</p>
<ul>
<li>D7 = Finance Amount</li>
<li>D9 = Rate</li>
<li>D11 = Term</li>
</ul>
<p>For example</p>
<pre><code>D7 = $1,00,000,
D9 = 10%,
D11... | java | [1] |
1,722,740 | 1,722,741 | C++ Undefined Type Error | <p>Dear all, i have two classes which are computer and floppy disk. </p>
<p>When i put </p>
<pre><code>#include "FloppyDisk.h"
#include "Computer.h"
</code></pre>
<p>in main, then compiler generates error of computer undeclared</p>
<p>When i </p>
<pre><code>#include "Computer.h"
#include "FloppyDisk.h"
</code></pr... | c++ | [6] |
3,162,744 | 3,162,745 | Mono.CSharp.dll doesn't work with MessageBox.Show("");? | <p>this code:<br></p>
<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mono.CSharp;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string init = "using System;using System.Collections.Generic;u... | c# | [0] |
5,263,420 | 5,263,421 | when to throw exception if illegal argument passed to an API method? | <p>See the two examples below. Assume both classes contains public methods belonging to a widely used API library. </p>
<p><code>AClass.java</code> is easier to write (maybe easier to read due to less noise), but when error is detected, the first method in stack trace is an internal method (<code>nullCheck(...)</code>... | java | [1] |
3,892,254 | 3,892,255 | What should I study to be able to join a C++ open source project? | <p>I am learning C/C++/Oracle/Unix.</p>
<p>I am thinking of developing some application on my own, but I have no Idea what else is required.</p>
<p>If you take an example of C++. I have very basic knowledge of it (data types, OOP concepts, vectors, file handling, exception handling, etc). I am not an expert though. I... | c++ | [6] |
130,883 | 130,884 | Debug why does size_t not work as a data member? | <p>Can somebody tell me why the first program crashes, yet the second one doesn't?
First one (crashes):</p>
<pre><code>#include <cstdlib>
class test
{
public:
test(const char *cstr)
{
size_t j=0;
while(cstr[n++])
;
//n = j;
}
private:
size_t n;
};
int main()
{... | c++ | [6] |
2,163,511 | 2,163,512 | how can I assign a variable to hold an image in php | <p>I was just wondering if I could have a variable to hold an image, I'm using phpmailer to send email and I need an image to be attached to it,</p>
<p>so I was wondering if I could put the image in a variable and use </p>
<pre><code>$mailer->AddAttachment($image);
</code></pre>
<p>to send the email with attachme... | php | [2] |
4,610,085 | 4,610,086 | allow_url_open needs to be on | <p>i need to change the configuration of php.ini on server side (parameter is allow_url_fopen) from off to on but i donot have access to the php.ini file and i want to do it through php code but i dont know wat to do how to do and where to paste that code(should i place it before the headers i am using for downloading ... | php | [2] |
5,994,778 | 5,994,779 | how to pass array of strings from one class to other class with in same project in java | <p>how to pass array of strings from one class to other class with in same project in java</p>
| java | [1] |
5,105,054 | 5,105,055 | make first alphabet after space to Upper in text on textBox1_TextChanged event | <p>I have a query regarding with TextBox.
When I type in the text box the words automatically changes. for example: "my name is kumar" to "My Name Is Kumar" and should be done on textBox1_TextChanged event.</p>
<p>currently i am doing this on Leave event</p>
<pre><code>private void textBox1_Leave(object sender, Event... | c# | [0] |
3,769,370 | 3,769,371 | Custom implementation of bin2hex | <p>While looking over some code, I found a function that seems to do exactly what <a href="http://de.php.net/manual/en/function.bin2hex.php" rel="nofollow"><code>bin2hex</code></a> does. I tested on large sets of randomly generated input and they were identical. What I would like to know is if anyone can see any differ... | php | [2] |
3,696,793 | 3,696,794 | update textview in oncreate android | <p>hi frnds i have a button and a textview in a whole view,when i click the button then all contact are sved in csv file but i wnt when these contact are going to csv file it update text as "exporting 3 (this count is changingmeans 1 2 3 4 5....till total no of contacts) contcts " means text view is changing when i cl... | android | [4] |
2,774,131 | 2,774,132 | $.post not working in firefox | <p>Here's my code it works fine in IE and Chrome, but not in FF</p>
<pre><code><script type="text/javascript">
function get() {
$.post(
'regAuth.php',
{usrName: login.usrName.value, password: login.password.value},
function (output) {
$('#error').h... | jquery | [5] |
4,960,200 | 4,960,201 | assign function to class method | <p>Is it possible to create a function out of a class method?</p>
<p>ie.</p>
<pre><code>class Test {
public function __construct()
{
if ( ! function_exists('foo') ) {
function foo ()
{
return $this->foo();
}
}
}
private function... | php | [2] |
1,298,915 | 1,298,916 | PHP nth foreach record | <p>I am looking for a way to do slightly more complicated nth record adjudtments, similar to jQuery's / CSS3 <code>nth-child(3n-1)</code> in PHP, so there are three cols per row and the mid one needs to have the class "mid" added. I preferably don't want to use jQuery as there always seems to be a lag from the page loa... | php | [2] |
3,320,554 | 3,320,555 | How to convert 12 hours time to 24 hours time in PHP | <p>I want to convert 12 hours time to 24 hours time in php.please help</p>
| php | [2] |
2,487,801 | 2,487,802 | Android Send mail Application | <pre><code> I use the following send mail application in android from
</code></pre>
<p><a href="http://stackoverflow.com/questions/2020088/sending-email-in-android-using-javamail-api-without-using-the-default-android-ap/2033124#2033124">http://stackoverflow.com/questions/2020088/sending-email-in-androi... | android | [4] |
1,746,172 | 1,746,173 | Pass objects or values to functions | <p><em>This question has been edited to ask about a specific example as the original question was deemed unanswerable.</em></p>
<p>Given an application that needs to display information about various objects (including similar and inherited objects) would it be better to pass in base class objects to the display funct... | c# | [0] |
2,246,965 | 2,246,966 | jnativehook build failed jni.h not found | <p>I have been trying to build jnativehook from source. I am using windows 7. I went through all the stages described on the website. Including change the environment variables Currently I am getting a build failed from the command prompt.
I have pasted it below. </p>
<p>Im not sure where the jnativehook files where ... | java | [1] |
3,109,958 | 3,109,959 | how we can convert text file into xml format in c# | <p>how we can convert text file into xml format in c#</p>
| c# | [0] |
5,724,930 | 5,724,931 | Check if file exists without creating it | <p>If I do this:</p>
<pre><code> File f = new File("c:\\text.txt");
if(f.exists()){
System.out.println("File exists");
}else{
System.out.println("File not found!");
}
</code></pre>
<p>Then the file gets created and always returns "File exists". Is it possible to check if a file... | java | [1] |
218,232 | 218,233 | intiate function using jquery | <p>i want to call two function automaticaaly when that page loaded.
how to do it with jquery</p>
<pre><code>suppose my funtion is getData();
how do i intitiate this via jQuery
</code></pre>
| jquery | [5] |
3,979,193 | 3,979,194 | How can I query the number of album in gallery | <p>In android 2.1 sdk, how can I query the number and the name of each album in the gallery?
And is there an way to launch an intent to allow user to see all pictures of a particular album in the gallery?</p>
<p>Thank you.</p>
| android | [4] |
1,346,488 | 1,346,489 | how to use a database for " sign in" in android | <p>i have created a main screen with a "sign in" field.there ,the user must enter his username and his password.i would like to create a database with the user data and check if they are correct.if yes,the user will go to the home page,else it will print an error data message.My problem is that i dont know how to do it... | android | [4] |
4,562,307 | 4,562,308 | In ListView Which function is called while scrolling | <pre><code>public class SynchronisedScrollView extends ListView {
private ScrollViewListener scrollViewListener = null;
public SynchronisedScrollView(Context context) {
super(context);
}
public SynchronisedScrollView(Context context, AttributeSet attrs,
int defStyle) {
sup... | android | [4] |
5,904,345 | 5,904,346 | get dynamic link with JQuery | <p>I am creating a div dynamically. In that div, i have table. Table contains link in each 1st td of row.</p>
<p>My link id looks like</p>
<p>id="ac2dc332-fa95-4e59-a3ad-83ffa91d3f4d#Apple#APPLCCompanies" </p>
<p>Now, depending on some condition, i need to change color of this link.</p>
<p>i tried to get it through... | jquery | [5] |
3,678,081 | 3,678,082 | Jquery document.on event | <p>What is the difference between these event handling</p>
<pre><code> $(document).on("click","selector",function(event){
});
</code></pre>
<p>and </p>
<pre><code> $("selector").live("click",function(event){
});
</code></pre>
| jquery | [5] |
5,701,417 | 5,701,418 | PHP Parse Error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING | <p>I've been trying to debug this for the past five minutes, I just don't get what the problem is:</p>
<p>Here's my code, lines 33 - 37:</p>
<pre><code>for($i = 0; $i < 5; $i++) {
$followers_change[$i] = $en_array1[$i]['followers']-$en_array2[$i]['followers'];
$rank_change[$i] = $en_array1[$i]['rank']-$en_... | php | [2] |
2,770,262 | 2,770,263 | table cell content | <p>my goal is to make a javascript that i will run using my browser (on someone elses site, not mine) that will take a number from thar site and wait some time depending on the number on the site before clicking a button.</p>
<p>the number is kind of hard to find: in this site there is a table in this table there is a... | javascript | [3] |
2,328,620 | 2,328,621 | How can the landscape screen orientation be restricted in android? | <p>How can the landscape screen orientation be restricted in android?</p>
| android | [4] |
3,579,324 | 3,579,325 | Validate Boolean Query - java | <p>I need the java code snippet for the below logic:</p>
<p>Following is a string and I need to validate the string based on the below condition :</p>
<p>"<strong>100</strong> or <strong>200</strong> and <strong>345</strong> not <strong>550</strong> " - Valid string </p>
<p>"<strong>abc</strong> or <strong>200</stro... | java | [1] |
4,164,887 | 4,164,888 | Is writing dead code useful? | <p>Do you find writing dead code useful?</p>
<p>Some says "If you have 2 logic to do some operation then instead of making other logic code commented or removing code make it dead code as it will not affect the operation."</p>
<p>Example:-</p>
<pre><code>if(true){
// logic - 1
} else {
// logic - 2 // dead ... | java | [1] |
4,926,632 | 4,926,633 | Functional append/extend | <p>The methods <code>append</code> and <code>extend</code> in Python are not functional by nature, they modify the callee and return <code>None</code>.</p>
<p>Is there an alternative way to do what these methods do and get a new list as a returned value?</p>
<p>Consider this example:</p>
<pre><code>def myfun(first, ... | python | [7] |
378,682 | 378,683 | Python trying to write string to file then read string and eval, but something went wrong | <p>I am trying to write a very simple script that would simulate a pocket secretary for my homework, but I have a small issue.
I want all my data to be saved in a file (abstract form) each time I exit the program and then when i boot it up I want to read that file, eval(stack) (basically load the data into memory) the... | python | [7] |
3,528,624 | 3,528,625 | Check if this Monday is last Monday in a month | <p>I use this code from another question:</p>
<pre><code>private bool NthDayOfMonth(DateTime date, DayOfWeek dow, int n){
int d = date.Day;
return date.DayOfWeek == dow && (d-1)/7 == (n-1);
}
</code></pre>
<p>It works fine. But it not checks a last day ( for me it's when n = 5). How to modify it?<br>
Th... | c# | [0] |
2,934,738 | 2,934,739 | Trouble with python while loop | <p>I'm sorry if this is a ridiculous question but I'm just learning python and I can't figure this out. :)</p>
<p>My program is supposed to print the capital of any state that the user inputs. Sometimes it will work ten times in a row, other times it will work three times in a row, and then it will just stop after you... | python | [7] |
3,517,637 | 3,517,638 | How to draw a rectangle from UIViewCotroller in iPhone sdk | <p>I am having a UIView and a UIViewContorller to that. I want to draw a rectangle in the view through my controller. So how to do that.</p>
| iphone | [8] |
212,363 | 212,364 | Validate paths using javascript | <p>I am asking users to enter path to controller files like </p>
<pre><code>abc/cab
cde/ter/tyu
</code></pre>
<p>I am unable to validate it using </p>
<pre><code>var regexString =/^([a-zA-Z\]+)*$/;
</code></pre>
<p>Can you please help me correct this. text like <code>abc//text</code> and <code>abc/text/</code> and ... | javascript | [3] |
3,010,788 | 3,010,789 | PHP: black image when cropping using php | <p>i set up a scritp that upload an jpeg and then crop it in a thumbnail, but some users experiences a black image, and honestly i dont know what they are uploading, maybe a jpeg with a compresison format not compatible with php libraries??</p>
<p>this is my simple code...eveything works fine when i try with my photos... | php | [2] |
4,575,354 | 4,575,355 | Good example of asp.net application? | <p>I'm looking for source code of small projects in asp.net probably asp.net MVC and ado.net
Most interested in web-applications which uses asp.net controls and database. Just need to see how good programmers write code using asp.net</p>
| asp.net | [9] |
177,127 | 177,128 | How do I check if user logged in everyday php | <p>I am developing a reward points website.</p>
<p>So How do I give 1 point to a user if he logs in <strong>that day</strong>?</p>
| php | [2] |
5,435,663 | 5,435,664 | Replace occurence of string with url in string | <p>Hi i have some text which is meant to be displayed within a label.</p>
<p>"Hey @ronald and @tom where are we going this weekend"</p>
<p>What i need to do is change it to this instead</p>
<p>"Hey www.domain.com/ronald and www.domain.com/tom where are we going this weekend"</p>
<p>Now i have this code which someon... | c# | [0] |
3,574,472 | 3,574,473 | bitmap size exceeds VM budget in android | <p>Getting this </p>
<pre><code>05-25 23:55:59.145: ERROR/AndroidRuntime(3257): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
</code></pre>
<p>at this code of mine - </p>
<pre><code>Bitmap cs = null;
cs = Bitmap.createBitmap(frameImg.getWidth(), frameImg.getHeight(), Bitmap.Config.ARGB_8888);
</code... | android | [4] |
5,684,605 | 5,684,606 | Path to web development | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2930331/where-can-i-learn-web-programming-from-start-to-mastery">Where can I learn web programming from start to mastery?</a> </p>
</blockquote>
<p>I want to be able to make websites like facebook, youtube and g... | php | [2] |
2,840,443 | 2,840,444 | foreach loop and array values | <p>I am writing a simple foreach loop to read key values from appconfig file. For some reason the array string called server looses previous values each time the foreach loop increments. Once the program runs to completion I see values as (server[0] = null, server[1]=null, server[2] = ). Only the last array pointer s... | c# | [0] |
5,172,609 | 5,172,610 | How to get a reference to the module of a class | <p>You can get the name of the module a class belongs to as follows:</p>
<pre><code>myClass.__module__
</code></pre>
<p>How do I get a reference to the module instead? More specifically, I want to access the doc-string of the module an arbitrary class is part of. Something similar to:</p>
<pre><code>mod = myClass.ge... | python | [7] |
3,070,713 | 3,070,714 | C++ dynamic binding | <p>How can C++ achieve dynamic binding yet also static typing?</p>
| c++ | [6] |
2,385,676 | 2,385,677 | Add two variables using JavaScript | <pre><code>var a = 1;
var b = 2;
var c = a+b;
</code></pre>
<p>c will show as 12; but I need 3</p>
<p>How do I do it using JavaScript?</p>
<p>Thanks
Jean</p>
| javascript | [3] |
340,000 | 340,001 | Cross-thread operation not valid in C#? | <p>I am creating a background worker thread and Loading data in it and showing in UI.
I know the problem is while showing the data in UI(because it is a UI thread)
But i get the data from server in form of blocks .
Suppose for the first time receive 10 records then i have to update the Ui and then call the next records... | c# | [0] |
3,316,212 | 3,316,213 | Get parsed PHP file | <p>I'm trying to get the contents of a PHP file after it is parsed, and then store it in a variable.
I couldn't get any useful information via Google, except for this one example:</p>
<pre><code>ob_start();
include $file;
$content = ob_get_clean();
</code></pre>
<p>But this returns the contents as plain text, i.e.: T... | php | [2] |
5,129,674 | 5,129,675 | Basic PHP Object Oriented MYSQL Query | <p>So I've been learning for about 3 months now and am currently using very old procedural techniques and the deprecated mysql extension in my code. So time to take a step forward, ditch my procedural ways and get into object oriented / prepared statements...</p>
<p>This is very basic but I guess everyone has to lear... | php | [2] |
412,870 | 412,871 | javascript splice | <p>I have an array MyArray and I want to remove one element at position i.</p>
<p>I tried:</p>
<pre><code>MyArray = MyArray.splice(i, 1);
</code></pre>
<p>but it's returning the element I want to remove, instead of the array without the element I want to remove.</p>
<p>I''m sure it's a simple fix, thanks anyway.</... | javascript | [3] |
5,471,811 | 5,471,812 | Data Structure for storing X days of history of a variable | <p>I have a variable that has a current value but when I change the value it first needs to store the past value in some data structure that will show me the past X many values. </p>
<p>This is to do all kinds of calculations on past values like an average of the most recent values and such. </p>
<p>My only idea was ... | c# | [0] |
2,601,873 | 2,601,874 | Activities enter onCreate all the time | <p>I am getting crazy with a problem...</p>
<p>The point is, I have an Activity called LogIn. This is how it is declared on the manifest:</p>
<pre><code><activity
android:name=".LogIn"
android:windowSoftInputMode="stateHidden"
android:configChanges="keyboardHidden|orientation"
andro... | android | [4] |
498,736 | 498,737 | javascript window.location gives me a wrong url path when checking firebug | <p>I have a sample url website: <a href="http://mysite.com/" rel="nofollow">http://mysite.com/</a></p>
<pre><code> var host = window.location.protocol+"//"+window.location.hostname;
$.ajax({
type:"POST",
data: params,
url : host+'/forms/get_data.php',
success:function(data){
...othercodeblahblah
... | javascript | [3] |
3,918,119 | 3,918,120 | Java Android Application | <p>I want to one Simple UI Design in Andriod Emulator.</p>
<p>Whats Needed:</p>
<p>Java Eclipse,then any SDK Pls Suggest</p>
| android | [4] |
4,218,523 | 4,218,524 | how to deal with a class by string in PHP | <p>I have a call lets assume its called A</p>
<pre><code>public class A{
...
}
</code></pre>
<p>how can I access the members of this class while I have the name of the class</p>
<p>what I need is something like this </p>
<pre><code>{"A"}::x=5;
</code></pre>
<p>instead of </p>
<pre><code>A::x=5;
</code></pre>
| php | [2] |
5,950,695 | 5,950,696 | How to get current date in DDMMYY format and split them into DD, MM and YY using C#? | <p>This is what i could write?</p>
<pre><code>string text = string.Format("{0:d/MM/yy}", DateTime.Now.Date);
text = text.Replace("-", "");
char[] cString = text.ToCharArray();
string year = text.Substring(text.Length - 2);
string month = cString[2].ToString() + cString[3].ToString();
string day = cString[0].ToString()... | c# | [0] |
265,625 | 265,626 | Install the proper bitness Visual C++ Runtime Library via a Setup project | <p>The context:
I have a solution that contains amongh other C# projects, a VC++ project that suports compiling only as x64 or Win32 (but not Any CPU). In order for the application (which in fact is a macro for a third party application) to run, it requires Visual C++ Runtime libraries (x86) or (x64) (The macro will r... | c++ | [6] |
2,628,006 | 2,628,007 | what is the difference between iphone device UDID , iphone device ID and iphone device Token? | <p>what is the difference between iphone device UDID , iphone device ID and iphone device Token ??</p>
<p>Normally iphone device token is used when we are using apple push notification service.</p>
<p>But my goal is to just identify unique iphone device ? So which of the above 3 is unique for iphone device ??</p>
| iphone | [8] |
3,192,352 | 3,192,353 | Can I throw an exception in Javascript, that stops Javascript execution? | <p>I try to simulate a problem where a script that is loaded from an external url stops execution of any more scripts on my site.</p>
<p>I tried to simulate such a problem by calling a function that does not exits. I can see the error in firebug but different scripts on the page are still executed.</p>
<p>Are there d... | javascript | [3] |
954,919 | 954,920 | Count the number of times a variable's value is added | <p>So the question asks me to do the following: </p>
<pre><code>public boolean addRating(int rating)
</code></pre>
<blockquote>
<p>Add a rating for the video. If rating is between 1-5 inclusive, then
update the ratings for this video, keeping track of how many ratings
for it have been received, and return true.... | java | [1] |
2,043,075 | 2,043,076 | Call a function after a first function is ran | <p>I want to hide a div by clicking somewhere on the page but only if the div was first displayed by clicking on the preview.</p>
<p>I have this : </p>
<pre><code>$(function() {
$("#videopreview").click(function() {
$("#videolarge").css({ display: 'block' });
$("#videopreview").css({ display: 'none' });... | jquery | [5] |
3,088,359 | 3,088,360 | Rewrite a Bash script to php? | <p>how would I rewrite this as a php script. also if anyone knows of a better way other than LAME please let me know.</p>
<pre><code>for i in *.wav; do
lame -h -b 192 "$i" "${i%.wav}.mp3"
done
</code></pre>
| php | [2] |
2,659,166 | 2,659,167 | How can I find a GPS location using services? | <p>I'm new to Android and I'm not sure how to find a current GPS location using services. How would I do this?</p>
| android | [4] |
2,271,773 | 2,271,774 | Automatically authenticate a user if they exist in an email distribution list? | <p>I have an asp.net web application. I want to auto log in a user based on whether the user is in a email distribution list. Is it possible? If not what’s the best way to go about this?</p>
<p>Thanks :)</p>
| asp.net | [9] |
2,007,207 | 2,007,208 | cant grap img src and assign it to a div as BG in jquery? | <p>hi this is the jquery code :</p>
<pre><code>$(".c").mouseover(function() {
var colorbg = $(".c").attr("src");
$(".colortip").fadeIn(function() {
$(this).html('<img src="' + colorbg + '"/>');
return false;
});`enter code here`
});
</code></pre>
<p>and HTML is as follows : </p>
<pre><code>img ...1
img....2
im... | jquery | [5] |
746,318 | 746,319 | The connection was not closed the connection's current state is open | <p>How to fix this problem; connection already closed in my function:</p>
<pre><code>SqlConnection con=new SqlConnection(@"Here is My Connection");
public void run_runcommand(string query)
{
try
{
con.Open();
SqlCommand cmd1 = new SqlCommand(query, con);
cmd1.Execut... | c# | [0] |
2,685,824 | 2,685,825 | jcoverflip customisation | <p>i just found jcoverflip
it's a great script but i'd like to customise it.
instead of this scrollbar i'd like to use simple left/right arrows
what function do i have to call?
i found functions called next and previous but i don't know how to call them properly.
the js is here -> <a href="http://www.jcoverflip.com/fil... | jquery | [5] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.