Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
1,175,408 | 1,175,409 | Read Value from URL in PHP | <p>I have a link on Home Page say for eg </p>
<pre><code><a href="count.php?id=<?php echo $row['ID']; ?>&desc=<?php echo $row['PRO']; ?>" name="abc<?php $i; ?>">**Home**</a></li>
</code></pre>
<p>Once click on Home Link provided above it goes to next page that is </p>
<p><code... | php | [2] |
2,753,903 | 2,753,904 | How to get list of drives on local system using ASP.Net | <p>I am going to develope a module in ASP.Net. In this module I want to get the list of drives of the <strong><em>local system</em></strong> where this page is displaying. I have already tring with System.IO.... etc. but it gives me the server drives. </p>
<p>I want to get the list of <strong><em>LOCAL drive</em></str... | asp.net | [9] |
5,234,418 | 5,234,419 | user contol textbox value to datagrid | <p>there are two usercontrol in my form as <strong>label textbox datepicker</strong>
1st label=From date
2nd label=TO date
there is also one data grid and one button
now i wnt <strong>data between two dates in datagrid as from two textboxes in user control</strong>
i m trying this code but it is not working:</p>
<pre>... | c# | [0] |
3,416,322 | 3,416,323 | m getting an error at default and switch (value),,what is the error? | <pre><code> import javax.swing.*;
import java.util.Random;
import java.util.Scanner;
class Fifie
{
public static void main (String [] args)
{
String Iplay;//A ke rock, B ke skere, c is paper
String PCplay;
int value;
Scanner scan = new Scanner(System.in);
Random num ... | java | [1] |
5,622,413 | 5,622,414 | get_object_vars() for non-OOP class | <p>In OOP where there's classes and objects, I can use <code>get_object_vars()</code> to get a list of all properties/vars in that class. </p>
<p>In this case, I'm not using OOP. I have some functions and some vars declared outside the functions. When I need to access some of these vars inside a function, I re-declare... | php | [2] |
5,664,244 | 5,664,245 | Why does this global Javascript variable behave differently inside and outside of a function? | <p>I'm trying to understand why my global variable 'imageUrl' behaves differently inside and outside of the function 'genericOnClick()'</p>
<pre><code>var imageUrl
var id = chrome.contextMenus.create({
"title": "Add to JC Queue",
"contexts": ["image"],
"onclick": genericOnClick
});
function genericOnClic... | javascript | [3] |
5,423,492 | 5,423,493 | Javascript Date() to calculate age not working by the days | <p>Here is my code, as taken from here: <a href="http://stackoverflow.com/questions/4060004/calculate-age-in-javascript">Calculate age in JavaScript</a></p>
<pre><code> var today = new Date();
birthday_val = $(".datepicker").val().split('/'); // input value
birthday = new Date(birthday_val[2],bi... | javascript | [3] |
3,839,451 | 3,839,452 | why move up one level while compiling different files of same package | <p>Thanks to stackoverflow i finally understood that i need to compile from the source directory when m trying to compile a file which has a object of another class of the same package declared in one of its method. ex- </p>
<pre><code>package p1;
public class accesslevel
{
int n=2;
private int pri_n=3;
p... | java | [1] |
4,320,832 | 4,320,833 | killing process java.exe | <p>I launch some batch file from my C# app via Process class. This file started java app. I cant recognize which process called java.exe must be kill to stop this application. Is there some more elegant way than kill them all, hope that i end the right one and dont kill some other important java app? Thanks for any h... | c# | [0] |
5,410,242 | 5,410,243 | help with accessing an array/object | <p>i have printed out the contents of an array/object (named 'document') with print_r. it looks like this:</p>
<pre><code>Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [id] => 7006276 ) [name] => Arnessysla [type] => region [latitude] => 64.5833 [longitude] => -21.8833 [entitie... | php | [2] |
1,593,982 | 1,593,983 | Initializing a List<string> in C# | <p>how to make the items in a List to zero</p>
<p>I've a list List< String> sampleList which contains 10 items.</p>
<p>eg: </p>
<pre><code>1
2
3
4
5
6
7
8
9
0
</code></pre>
<p>how to make the list contents into zero like</p>
<pre><code>0
0
0
0
0
0
0
0
0
0
</code></pre>
<p>Thanks in advance...</p>
| c# | [0] |
82,378 | 82,379 | Problem with Synchronization | <p>I have the following sample piece of code,</p>
<pre><code>public class test implements Runnable{
public void run()
{
synchronized(this)
{
for(int i=0;i<10000;i++)
System.out.println(i);
}
}
public static void main(String args[]) throws Exception
{
Thread t=new Threa... | java | [1] |
100,366 | 100,367 | Greek letters in a GUI - PYTHON | <p>I don't know how to write Greek letters in a GUI. I am working on a Physics program and I need to show units on the GUI. </p>
<p>Do I have to download any extra libraries? Is there a module I have to use? What is the easiest way to write the letters in the GUI? </p>
<p>I read a lot about UTF8 but didn't figure out... | python | [7] |
213,529 | 213,530 | Variation on Javascript Function.prototype.bind I want to make sure I understand | <p>I am going through some code left behind by some long-gone developers and came across this:</p>
<pre><code>Function.prototype.binding = function ()
{
if(arguments.length < 2 && typeof arguments[0] == "undefined") return this;
var __method = this, args = jQuery.makeArray(arguments), object = args.shif... | javascript | [3] |
2,698,073 | 2,698,074 | Create dynamic properties and bind hashtable in c# | <p>I am trying to bind Row to gridview which will not only contain fields of Category table but other tables as well. So I had properties set for all those fields. But since the columns in the table could change frequently I need to dynamically change the properties as well. I found the following one way to do it (usin... | c# | [0] |
2,004,866 | 2,004,867 | Android IntentService | <p>From the AsyncTask documentation i have read that once an Application is taken into the background, it is liable to be cancelled. Does the same hold for an IntentService. Once an application is in the background, will be cancelled by the OS, or are we guaranteed that this will run to completion. </p>
<p>Kind Regar... | android | [4] |
4,263,524 | 4,263,525 | Android - TextView dynamic height issue | <p>I have a RelativeLayout whose layout_height is set to "wrap_content" and inside that I have a TextView whose <strong>text</strong> is set at <strong>runtime</strong>. I have set android:layout_height="wrap_content" to my TextView, but it doesn't seems to change the height of the Textview even if the content is large... | android | [4] |
3,803,641 | 3,803,642 | PHP Check if page contains | <p>I'm looking for a quick code/function that will detect if a page contains a certain thing.</p>
<p>It's for a new project I'm working on.</p>
<p>Basically, the user will paste a simple javascript code into their pages, but I need to make sure they do.</p>
<p>I need a code that will scan through a specific webpage ... | php | [2] |
1,199,747 | 1,199,748 | search and replace using regular expressions in java | <p>I need to find and replace all dates present inside a document(basically bring it to present date). The problem in using regex is if the date is in this format</p>
<pre><code>CreationDatetime="2012/07/24 10:00:19 649 GMT"
</code></pre>
<p>the regex will not find this entry as the date is attached to another string... | java | [1] |
5,360,090 | 5,360,091 | Get all RSS links on a website | <p>I'm currently writing a very basic program that'll firstly go through the html code of a website to find all RSS Links, and thereafter put the RSS Links into an array and parse each content of the links into an existing XML file.</p>
<p>However, I'm still learning C# and I'm not that familiar with all the classes y... | c# | [0] |
5,665,562 | 5,665,563 | Breakpoint do not hitting during debugging | <p>I am new to Android development. I am using NetBeans(android 1.5).So during Debugging my application, breakpoint do not hit.</p>
| android | [4] |
5,637,672 | 5,637,673 | Trying to delay an animation on startup | <p>I have:</p>
<pre><code>$(window).one('load',function() {
setTimeout(function() {
$('.slider').slideToggle('slow'),
15000
});
});
</code></pre>
<p>I'm trying to limit the animation to only once so as not to get annoying.
The problem is: it's not waiting 15 seconds. It animates immediately... | jquery | [5] |
3,342,805 | 3,342,806 | android single activity multiple ListView scroll issue | <p>Unfortunately i have used multiple ListView in single activity. At the moment i am not able to scroll till last ListView as screen height is completely occupied by other ListView's.</p>
<p>Is there any workaround to solve this scroll issue without much code change?.</p>
<p>Please help me solve this problem.</p>
<... | android | [4] |
4,361,462 | 4,361,463 | Java Challenge: While Loop | <blockquote>
<p>Write a <code>while</code> loop that generates random numbers between 1 and 100 and
stops looping after it generates the same number twice.</p>
</blockquote>
<p>This challenge taken from chapter 4 <a href="http://rads.stackoverflow.com/amzn/click/0761535225" rel="nofollow">"Java Programming For Abs... | java | [1] |
5,095,628 | 5,095,629 | How to implement multi language support in android | <p>I display set of string from rss feed in textview formate. in case if feed displays different language i cant get the exact language. is it possible to display the multi language in textview. pls guide me.</p>
| android | [4] |
3,891,140 | 3,891,141 | Why does animating a subview cause its parent view's layoutSubviews method to be called? | <p>I'm doing UIView animation on individual subviews that have a number of sibling views that I don't want affected by the single-view animation. However <code>layoutSubviews</code> is being called on the containing superview when I do the animation, causing the other siblings to be rearranged as well. </p>
<p>(I shou... | iphone | [8] |
5,623,405 | 5,623,406 | .toggle() only hiding it's target element, not toggling states on alternate clicks | <p>I'm trying to create a button which toggles the visibility of the two elements on every other click...this working fine up to a few days ago but now on page load it hides the button. I found that .toggle also works to show/hide elements but how do you use it to toggle between functions on alternate clicks?</p>
<p>J... | jquery | [5] |
4,507,971 | 4,507,972 | ASP.NET Page does't show code behind code when clicking on Design code | <p>Page does't show code behind code when clicking on Design code and also code behind code display error as control not found</p>
<p>Below code display error : System Error </p>
<pre><code><%@Page Language="C#" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Register" %>
</code></pre>
<p>I don't... | asp.net | [9] |
930,747 | 930,748 | PHP If statement problem | <p>For the code below, I am trying to use the IF statement </p>
<blockquote>
<p>if(mysql_num_rows($resA)>0)</p>
</blockquote>
<p>to avoid running the foreach loop if $entry is not in the "site" column in any table in my database. However, if $entry does not exist in the "site" column in any table in my database, I... | php | [2] |
4,794,853 | 4,794,854 | Why does this Javascript code inside a non-Javascript browser have extra commenting? | <p>On the <a href="http://www.w3schools.com/js/js_howto.asp" rel="nofollow">W3 tutorial</a>, it shows htis code:</p>
<pre><code><html>
<body>
<script type="text/javascript">
<!--
document.getElementById("demo").innerHTML=Date();
//-->
</script>
</body>
</html>
</code></pre>
<... | javascript | [3] |
2,802,438 | 2,802,439 | Android:: Blocking main thread for worker thread to finish before executing other tasks in main thread | <p>I am executing some task in the UI thread and created a worker thread that does the networking stuff for me. However, I have something important that needs to be executed once the worker thread finishes. Could anybody please suggest me a solution?</p>
<pre><code>{
Main thread...
worker thread created..and e... | android | [4] |
1,127,384 | 1,127,385 | Drawing a 9-patch image on a canvas with drawBitmap | <p>What is the proper way to use a 9-patch image resource on a custom view?</p>
<p>I'm doing this:</p>
<pre><code>background = BitmapFactory.decodeResource(getResources(), R.drawable.fundo_bookshelf);
canvas.drawBitmap(background, null, new Rect(0, y, width, y+backgroundHeight), null);
</code></pre>
<p>fundo_bookshe... | android | [4] |
1,354,513 | 1,354,514 | Multiple threads and garbage collection in Java | <p>Can someone give me some advice on this? I am reading that when using multiple
threads it's necessary to write a special program for garbage collection. This is from
an old text. </p>
<p>Does this still apply in SE6 and above and if so is there a standard way to do this.</p>
| java | [1] |
5,898,653 | 5,898,654 | Hash a string to several (100-200) unsigned ints | <p>I am trying to implement the logic defined on <a href="http://www.lastfm.de/user/RJ/journal/2007/04/10/rz_libketama_-_a_consistent_hashing_algo_for_memcache_clients" rel="nofollow">this website</a>. One of the steps is:</p>
<blockquote>
<ul>
<li>Hash each server string to several (100-200) unsigned ints</li>
... | java | [1] |
416,257 | 416,258 | Advise on effectively re-entering CPP world | <p>I am getting back into C++ world after nearly a decade. Apparently, there has been a world of development. Would like to get the developer community's advice as to what would be a good approach to have a smooth take-off.</p>
<p>To start with, I have done the following:</p>
<ol>
<li>Read up (very briefly) on C++ 11... | c++ | [6] |
3,457,116 | 3,457,117 | Behavior of C++ after destruction | <p>I have an object that reads from a socket continuously like below:</p>
<pre><code>void CSocketReader::ReadComplete ( )
{
messageProcessor->ResponseReceived ( response );
read ();
}
void CSocketReader::read()
{
socket.read(response);
}
</code></pre>
<p>My problem is, depending on the response and on the prot... | c++ | [6] |
4,578,360 | 4,578,361 | program throws IllegalThreadStateException | <p>In my pong game every object(ball and two paddles) is running in the independent thread.</p>
<pre><code>static Ball b = new Ball(195, 145);
Thread ball = new Thread(b);
Thread paddle1 = new Thread(b.paddle1);
Thread paddle2 = new Thread(b.paddle2);
public void startGame(){
gameStarted = true;
ball.start();... | java | [1] |
3,040,947 | 3,040,948 | How to call void function in other class? | <p>I want to call one void function into many view controllers so how can i do it? please suggest me some idea. </p>
| iphone | [8] |
2,119,951 | 2,119,952 | Class related error in python : level BASIC | <pre><code>from __future__ import print_function
import pysolr
class SolrFunc:
def __init__(self,urlx,timex=60):
self.url=urlx
self.timer = timex
def filter_add(self,fill):
self.filterx = []
self.filterx.append(fill)
def filter_adds(self,fills):
self.filtery= []
... | python | [7] |
2,038,937 | 2,038,938 | How shall I print caller object name inside a class member function? | <p>See the example</p>
<pre><code> class MyClass {
public:
void fn() {
// Here I want to print caller object name,( here it is ***it1***)
}
};
int main() {
MyClass it1;
it1.fn();
return 0;
}
</code></pre>
| c++ | [6] |
6,014,656 | 6,014,657 | How to manually read from iPhone preferences? | <p>I just wrote a few values to my user preferences using <code>NSUserDefaults</code>. Is there a way I can go in and examine the persisted preferences file manually (when running on the simulator) to make sure they were written properly?</p>
| iphone | [8] |
2,801,311 | 2,801,312 | Converting a dictionary into a list | <p>Example:</p>
<pre><code>something = {
"1": {
"2": {
"3": {
"4": {},
"5": {},
"7": {},
},
"8": {
"9": {},
"10": {}
},
"11": {
"12": {
... | python | [7] |
2,472,436 | 2,472,437 | Table with varying column count and auto column widths | <p>I want to draw a table/grid by specifying the column count for each row and draw some cells in different colors.
A row should span over the whole screen. The column-widths should be the same for the columns for each row.
I tried using TableLayout with View or Textviews, but I couldn't figure out how I can distribute... | android | [4] |
743,626 | 743,627 | Default Map in Generics in jdk 1.5 | <p>I want default Map to use all HashMaps.
key can be String, integer or any data type
Value can be String, Integer ..any data type.</p>
<p>How to use Map in jdk1.5. </p>
| java | [1] |
5,672,362 | 5,672,363 | why i can't update my param in ie<7 with js file load? | <p>i load a js file use script tag in html ,the response content is 'window.paramname = {...}',
paramname's content will changed every request by url param,so i want the paramname to be changed too.</p>
<pre><code> var callback = params.callback || function() {};
if (_script.readyState) { //IE
_script.onreadyst... | javascript | [3] |
2,776,646 | 2,776,647 | jquery resizing of a div when clicking a link | <p>Can someone explain how I can resize a div using jquery when someone clicks on a link.</p>
<p>This code isn't working:</p>
<pre><code>$(".a_link").click(function() {
$("#insur_main").css("width","800px");
});
</code></pre>
| jquery | [5] |
4,212,396 | 4,212,397 | Getting yesterdays date with time zone | <p>Hi I was able to find the answer to this question but now with the timezone included (http://stackoverflow.com/questions/1712116/formatting-yesterdays-date-in-python)</p>
<p>This is working fine for me:</p>
<pre><code>>>> import time
>>> time.strftime('/%Z/%Y/%m/%d')
'/EST/2013/01/18'
</code></pr... | python | [7] |
2,007,132 | 2,007,133 | Callback functionality in jQuery components | <p>I am going through jQuery tutorials, and I got a query with jQuery callback functions. The below is a very good example of jQuery callback function.</p>
<pre><code>$("p").hide(1000,function(){
alert("The paragraph is now hidden");
});
</code></pre>
<p>It works fine, but how can we know that to what function do... | jquery | [5] |
5,146,137 | 5,146,138 | android not able to locte IDs | <p>I had a fully working app, but today when I opened it in eclipse it could not find any of my resource ids(Buttons, EditTexts, TextViews, and layouts). I have no clue why this is happening. It is as though I forgot to give my buttons an id in XML, but when I go to the files they are still there.
Has anyone else had t... | android | [4] |
2,645,590 | 2,645,591 | Things to consider when calculating efforts required to port an application to another Handset | <p>I have a G1 and an HTC Hero handset. All the applications that I've written were tested only on these devices; come new SDK and Android handsets with (support for) different screen resolutions, densities and capabilities I have been asked to estimate the efforts required to port some of the application to new Androi... | android | [4] |
3,594,064 | 3,594,065 | How can I multiply a value from a radio button by a number in Javascript and have the answer display in a textstring inside a textarea? | <p>I need to have the user_input from the radio button multiplied by an integer. The user_input is either 1,2, or 3. I can get the radio button value pulled through into the textarea, but how do I take that number and multiply it by something? Ideally, I need textstring += 'Fee (£): ' + (user_input) * '5' + '\n';</p>
... | javascript | [3] |
882,266 | 882,267 | Unable to have signed .apk file from Eclipse | <p>I am trying to upload my app in market place. for this i have tried to generate signed .apk file.
I have followed these step:
project>android tools> export signed application package
a window appears i have created new keystore in a new folder by giving location and password. keystore is successfully saved then i mo... | android | [4] |
225,966 | 225,967 | sending sms to cell phone using some java program | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2570410/how-to-send-sms">How to send sms</a> </p>
</blockquote>
<p>I need to send some sms to my customers regarding my site ..how can i achieve this ...</p>
| java | [1] |
3,518,649 | 3,518,650 | Using a UIWebView as a way to update our business app quickly | <p>We are looking at building a b2b application for the iPhone. A major concern is the possible delay in publishing updates to the applications. I would like to believe that all updates will be orderly, but the reality of a newly found bug for a client or an upcoming trade show could mean that updating the application ... | iphone | [8] |
5,091,402 | 5,091,403 | Installation of android ADT in myeclipse | <p>I am using Myeclipse 6.0.1. I am trying to configure it for android application development. While trying to install the android ADT I am getting the following error message:</p>
<pre><code>Requested operation cannot be performed because it would invalidate the current configuration. See details for more informatio... | android | [4] |
4,047,099 | 4,047,100 | how to add javascript file only one time | <p>I am working on MVC appliction .I have a masterpage which is calling external javascript file and sometimes child page also calling the javascript file. i want if one time it is added by child page or masterpage it should not again add that Javascript file. please help me this i have done but is not working
enter c... | javascript | [3] |
2,021,274 | 2,021,275 | Find different characters in two strings | <p>How can i find different characters in the strings at same positions? Ex:</p>
<pre><code>String string1 = "Anand has 2 bags and 4 apples";
String n = /* ??? */;
String n2 = /* ??? */;
String string2 = "Anand has " + n + " bags and " + n2 + " apples";
</code></pre>
<p>I want <code>n = "2"</code> and <code>n1 = "4"<... | java | [1] |
3,971,650 | 3,971,651 | Anyone try playing animated gifs manually? | <p>I need to display a simple animation (about 20 frames, each frame being about 40 x 40 pixels in size).</p>
<p>Ideally I would use an animated gif for this, but android < 2.2 does not support it, amazingly.</p>
<p>I'm wondering if anyone has experience composing the individual frames into a manual animation. Thi... | android | [4] |
1,991,662 | 1,991,663 | How to validate PDF content which opened in new window using java script | <p>I am opening PDF document in new window by using Java script as like below</p>
<pre><code>widow.open("myPDFUrl")
</code></pre>
<p>How can I detect if Acrobat Reader was successfully opened without lossing its content in the new browser window?</p>
| javascript | [3] |
882,662 | 882,663 | C++ Reading bytes Problem | <p>I have this issue, I don't know if is expected, here is the thing:</p>
<p>I'm trying to load bytes from a file to an structure like this:</p>
<pre><code>struct
{
char
char
char
char
unsigned int
}
</code></pre>
<p>but the problem is when the unsigned int is filled, it seems like in the reading... | c++ | [6] |
1,327,842 | 1,327,843 | iphone - debugging on device crashes immediately | <p>When I try to debug my app on the iphone device, the splash screen shows and then the app crashes immediately. If I run the app in the simulator or on the device (not from XCode) it runs fine. I tried putting a breakpoint in the main method and it doesn't seem to hit it. There are no logs generated. ideas? sugg... | iphone | [8] |
2,865,684 | 2,865,685 | searching text files | <p>I’m desperately searching for some simple app that searches for text strings in a specified directory of about 1000 text files. Does anyone know if such a thing exists, or has anyone ever programmed such an app?</p>
<p>Thanks
Pankaj</p>
| iphone | [8] |
5,616,122 | 5,616,123 | how to split this string[LECT-3A,instr01,Instructor 01,teacher,instr1@learnet.com,,,,male,phone,,] as my requirement in java | <p>hello every one i got a string from csv file like this </p>
<pre><code>LECT-3A,instr01,Instructor 01,teacher,instr1@learnet.com,,,,male,phone,,
</code></pre>
<p>how to split this string with comma i want the array like this</p>
<pre><code> s[0]=LECT-3A,s[1]=instr01,s[2]=Instructor 01,s[3]=teacher,s[4]=instr1@le... | java | [1] |
1,391,018 | 1,391,019 | How I handle returned data from $.ajax()? | <p>I am trying to configure returned data from $.ajax() by jQuery...</p>
<p>My example is like that:</p>
<p>First of all I'm using codeigniter framework (just for attention)</p>
<p>Now by ajax I am calling function which returned group of divs</p>
<p>exp:</p>
<pre><code>function my_function() {
for($i = 0; $i ... | jquery | [5] |
2,703,596 | 2,703,597 | How to delete all blank lines in the file with the help of python? | <p>For example, we have some file like that:</p>
<blockquote>
<p>first line<br>
second line
<br><br>
third line</p>
</blockquote>
<p>And in result we have to get:</p>
<blockquote>
<p>first line<br>
second line<br>
third line</p>
</blockquote>
<p>Use ONLY python</p>
| python | [7] |
2,228,524 | 2,228,525 | AttributeError: 'str' object has no attribute 'append' | <pre><code>>>> myList[1]
'from form'
>>> myList[1].append(s)
Traceback (most recent call last):
File "<pyshell#144>", line 1, in <module>
myList[1].append(s)
AttributeError: 'str' object has no attribute 'append'
>>>
</code></pre>
<p>Why <code>myList[1]</code> is considere... | python | [7] |
360,417 | 360,418 | Android fragment menu options being rendered too slow on ViewPager swipe | <p>While working with the ActionBar tabs (being fragments) that can be swiped with a ViewPager I recognized that the custom menu options for each fragment are added pretty lately to the ActionBar. </p>
<p>This is the behavior I recognized: </p>
<ol>
<li>Swipe to the next tab </li>
<li>Tab reached</li>
<li>~ 10ms with... | android | [4] |
4,711,232 | 4,711,233 | not supported character in php | <p>I'm having a problem in inserting data in php. It sometimes create a character like a black diamond with a question mark.
<img src="http://i.stack.imgur.com/CqcYf.png" alt="enter image description here"></p>
<p>do you have any idea how can i fix it?</p>
| php | [2] |
3,304,216 | 3,304,217 | Using the name of a variable and then defining a function for the variable | <p>I've seen this hovering around some javascript for a while now and was wondering what it meant.</p>
<p>In this code:</p>
<pre><code>var topics = {};
jQuery.Topic = function( id ) {
var callbacks,
topic = id && topics[ id ];
if ( !topic ) {
callbacks = jQuery.Callbacks();
t... | javascript | [3] |
1,233,928 | 1,233,929 | Detect property change | <p>Is there a way in which I can detect if a property value has changed but not when the object is initialized? </p>
<pre><code>public string Foo
{
set
{
// Register property has changed
// but not on initialization
}
}
</code></pre>
| c# | [0] |
2,351,305 | 2,351,306 | jQuery rule for removing all elements, if any of its child element at any depth has a specific class | <p>What's the simplest rule which takes this DOM:</p>
<pre><code><div>
<ul>
<li>
<div>
<a href="#" class="remove">link</a>
</div>
</li>
<li>
<div>
<span cla... | jquery | [5] |
2,210,623 | 2,210,624 | why am I getting format exception in this code? It has one argument only | <pre><code>public override string ToString()
{
string val;
if (blower)
val = "Yes";
else
val = "No";
return string.Format(
"With Blower \t:\t {0} \n" +
val);
}
</code></pre>
<p>I am getting an exception in these lines:-</p>
<pre><code> return strin... | c# | [0] |
4,124,605 | 4,124,606 | What tools should I have as my core set for developing javascript? | <p>I have been developing <strong>ASP.Net</strong> applications for quite a few years, and I have always avoided learning <strong>JavaScript</strong>. Now I have been diving in and trying to learn as much as possible. </p>
<p>As a <strong>.Net</strong> developer I rely on <strong>Visual Studio</strong> heavily. What I... | javascript | [3] |
1,095,583 | 1,095,584 | A function with non keyword arguments and keyword arguments | <p>If I declare a function with non keyword arguments such as a tuple and keyword arguments such as a dictionary, are they declared?</p>
<p>For example:</p>
<pre><code>def someFunc(a, *nkw, **kwa):
nkwList = []
kwList = []
for i in nkw:
nkwList.append(i)
for j in kwa:
kwList.append(j)... | python | [7] |
5,688,215 | 5,688,216 | C# Loop Scope and Memory Issue | <p>Let's say I have the following code...</p>
<pre><code>StringBuilder sb = new StringBuilder();
for (int i = 0; i &lt; 10000; i++)
{
MyCustomClass myObj = new MyCustomClass();
sb.Append(myObj.RenderShortString());
}
Console.Write(sb.ToString());
</code></pre>
<p>And assume that MyCustomClass is a very large ... | c# | [0] |
4,370,459 | 4,370,460 | How to create Yahoo Messenger Client in Android? | <p>Hi
I am trying to create Yahoo messenger client in Android, and i got Openymsg api to implement that.This is small snippet of my code</p>
<pre><code> Session session=new Session();
session.login("Email Id", "password");
</code></pre>
<p>But this code is throwing UnknownHost Exception in "scs.msg.y... | android | [4] |
4,641,357 | 4,641,358 | Generate an array of char* pointers from a function | <p>I have a C++ function to which I have to pass <code>char* arguments[]</code>. The prototype of this function is as follows:
<code>void somefunc(char* arguments[])</code></p>
<p>To pass the above array to this function, I am generating this array from another function which can return me this <code>char* array</code... | c++ | [6] |
3,951,709 | 3,951,710 | jquery sorting plugins similar to big.dk? | <p>Ive been googling around for a plugin that would sort images similar to <a href="http://big.dk/#projects" rel="nofollow">http://big.dk/#projects</a>, but without success. Does anyone know if a similar plugin exists? Or do i need to start from scratch? Didnt feel like re-inventing the wheel :)</p>
| jquery | [5] |
465,222 | 465,223 | Trouble playing audio files in javascript array | <p>I'm trying to create a button which when clicked plays an audio file and then when it's clicked again plays the next file in my array. I get it to play but when I click it the second time it plays both the first file AND the second. When I press it the third time it plays the first, second and third. Seems like I ne... | javascript | [3] |
3,278,594 | 3,278,595 | On moving/copying c++ object instances | <p>I'm attempting to create a type-agnostic vector in C++ that is distinguished by two things. First, it allocates the memory in the object itself, at least until a certain point, rather than maintaining the actual array of objects on the heap. Secondly, it can't use C++'s copy/assign constructors, which appears to slo... | c++ | [6] |
1,711,781 | 1,711,782 | how to make text view clickable in android? | <p>is it possible in android to make text view clickable if yes then how ??and if not then what will be the way for make a label clickable??i want to implement a call activity using this</p>
<pre><code>private void call() {
try {
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.s... | android | [4] |
4,329,887 | 4,329,888 | how to make directory through php? | <p>I am trying to create a directory in php, but it not works.</p>
<p>the code is</p>
<pre><code><?php
$dirPath = "images/new_images";
$result = mkdir($dirPath, 0755);
if ($result == 1) {
echo $dirPath . " has been created"; } else {
echo $dirPath . " has NOT been created"; } ?>
</code></pre>
<p>please... | php | [2] |
3,784,534 | 3,784,535 | How do I change a property of a control several times during a loop in C# | <p>I'm trying to do something like this:</p>
<pre><code>int i;
while(true)
{
label1.Text = i.ToString();
i++;
Thread.Sleep(500);
}
</code></pre>
<p>(in reality I'm trying to do something more complex and that makes more sense but this is a simple example of my problem)
I'm expecting that the text of the l... | c# | [0] |
5,939,292 | 5,939,293 | JQuery invalid argument post | <p>I have this code:</p>
<pre><code><script type="text/javascript">
var loader = "#loader";
$(function() {
$("#selUsers").change(function() {
if ($(this).val() != "") {
$(loader).show();
$.ajax({
type: "POST",
u... | jquery | [5] |
594,532 | 594,533 | Codeigniter using routes isn't working? | <p>How to use this things, the routes ?</p>
<p>For example, i my page is</p>
<ul>
<li>controller/function</li>
</ul>
<p>and i want the controller part and the function part to become </p>
<ul>
<li>name</li>
<li>$route['controller/function'] =
"name";</li>
</ul>
<p>and i tryed like that, but nothing happens, still ... | php | [2] |
1,400,533 | 1,400,534 | Programmatically searching and choosing a network provider | <p>I'm currently developping an application that resets your connection when your signal strength is too low.</p>
<p>I'm trying to do this by searching and choosing your network operator (settings-> wireless and networks -> Mobile networks -> Network operators).
I noticed this way has a few advantages over switching ... | android | [4] |
2,961,989 | 2,961,990 | :last isn't working | <p><code>jQuery(".xg_module_body .postbody a:last").addClass("continue");</code></p>
<p>Is there something wrong w/ that code? The class doesn't get added for some reason.</p>
<p>I'm trying to add a link to just the last <code>a</code> in <code>.postbody</code>. I've tried <code>:last-child</code> and it adds a class... | jquery | [5] |
505,071 | 505,072 | on open window browser | <p>is it possible to default a window size to 1280 width on websites not full screen?</p>
<p>If we can default it to that size would it be a problem for people who only has their resolution set on 1024?</p>
| javascript | [3] |
4,863,810 | 4,863,811 | Is this a sign of heap fragmentation? | <p>To test if my object had a memory leak, I instanced it 10000 times and deleted it 10000 times. After, my program was using about 500kb more. I do not think my object is leaking though.</p>
<p>Thanks</p>
| c++ | [6] |
2,226,791 | 2,226,792 | Utilising cssText to set styles with JavaScript | <p>I was going through Nicholas Zakas presentation on JavaScript here : <a href="http://www.slideshare.net/nzakas/writing-efficient-javascript" rel="nofollow">http://www.slideshare.net/nzakas/writing-efficient-javascript</a> (slide number: 89/139)</p>
<p>He recommends using cssText property whenever you are setting a ... | javascript | [3] |
4,426,624 | 4,426,625 | how to share data between 2 activities where the first one called the second one | <p>sorry about the cryptic question i am not sure how to word it.</p>
<pre><code> Intent myIntent = new Intent(CurrentClass.this, ClassToCall.class);
myIntent.putExtra("name", "value");
Current.this.startActivity(myIntent);
</code></pre>
<p>i know the above code can be used to pass a me... | android | [4] |
1,029,999 | 1,030,000 | The most accurate way to check JS object type? | <p>as you know - the typeof operator doesnt really help us to find the real type of an object.</p>
<p>I met the following code : </p>
<pre><code>Object.prototype.toString.apply(t)
</code></pre>
<p>which tells me excatly whats the true type.</p>
<p>The question : is it the <strong>most</strong> accurate way ?</p>
... | javascript | [3] |
1,931,357 | 1,931,358 | Can not play video from my internal application directory | <p>It looks like I can not play videos stored in my internal application directory.</p>
<p>I have videos stored in <code>/data/data/my.package.org/files/</code></p>
<p>And I'm trying to play a file from there using</p>
<pre><code>String fpath = "/data/data/my.package.org/files/video.mpg"
Intent intent = new Intent(I... | android | [4] |
1,486,462 | 1,486,463 | Adding content from ViewPager adapter to an xml layout | <pre><code> public Object instantiateItem(View collection, int position) {
View v = collection;
if (v == null) {
LayoutInflater vi = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.gallery_layout, null);
... | android | [4] |
3,707,565 | 3,707,566 | opening link in same window using jquery | <p>.bind('click',function(){
window.open($(this).find('.pc_more').html());
});
});</p>
<p>is there something in this part of the code that tells it to open the link in a new page? can i put some code to open the link in the same window?</p>
| jquery | [5] |
2,079,669 | 2,079,670 | is it possible to develop live Streaming tv in Android? | <p>Is it possible to develop Google TV apps using a Mac and an actual Google TV device? (2 </p>
| android | [4] |
5,831,347 | 5,831,348 | What is this syntax used for: $('#myID,obj) | <p>I am not familiar with the below syntax. What is the purpose of adding the object?</p>
<pre><code>selectIt = $('<div />', {text : $this.attr('title')});
</code></pre>
| jquery | [5] |
3,261,359 | 3,261,360 | how can i stop service in activity | <p>*I am writing this code on button click .</p>
<pre><code>public void onstopServiceClickHandler(View view){
Intent intent=new Intent(DownloadQueueActivity.this, ProductDownloadService.class);
stopService(intent);
//lv_productList.setAdapter(downloadQueueAdapter);
//star... | android | [4] |
4,432,968 | 4,432,969 | I am having a lot of trouble finding good information on how to call? | <p>Android does not provide any sort of SOAP library. ... org.apache.http.</p>
| android | [4] |
2,872,178 | 2,872,179 | A question about IHttpModule!! Read ahead | <p>Lets Suppose that I have made a custom authentication module that inherits IHttpModule class.
Now the catch here is that how do I pass to this new module username and password which are in the form of textboxes placed on a page. For authentication module , I have never reaached to the stage where I can take user inp... | asp.net | [9] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.