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,262,780 | 2,262,781 | list.find question | <p>I am trying to run this code, but <code>a</code> is always <code>null</code>. I made sure that there's a <code>Name</code>, why does it always return null?</p>
<pre><code> public Animal FindAnimal(string Name)
{
Animal a = Animals.Find(
delegate(Animal bk)
{
r... | c# | [0] |
916,912 | 916,913 | Running jQuery code before the DOM is ready? | <p>Is there a way to execute jQuery code before the DOM is ready ?</p>
| jquery | [5] |
3,535,755 | 3,535,756 | how to write a static class that has an id with a string in it | <p>I want to write a static class customer ID that begins with C1000, and for each new customer object created it will add +1, C1001, C1002, C1003, and so on. How is it done if there is a string?</p>
<pre><code>public class Customer
{
private static int customerID = 1000;
public Customer()
{
cust... | java | [1] |
1,207,261 | 1,207,262 | Java, nested class: how to access 'higher' level variable? | <p>i've this code</p>
<pre><code>public class MasterClass {
private String myVariable;
private ValuesClass objectA;
class ValuesClass {
public void method() {
myVariable = 1; // I can't access myVariable
}
}
}
</code></pre>
<p>How to access m... | java | [1] |
3,416,341 | 3,416,342 | Using JavaScript to control sections in select list | <p>I have this html code but if i have a list item like all,a,b,c,d. if i click all means it should not allow to choose other items, if i am not choosing all means it should allow to choose mulitle item from list</p>
<pre><code><html>
<body>
<select id="mySelect" size="5" multiple="select-multiple">
... | javascript | [3] |
4,881,825 | 4,881,826 | Iphone file I/O operation and file structure | <p>I want to write a iphone SDK program to download and upload files from server. Server application is written in php.
But I m confusing following points in client application.</p>
<p>1) How can I download the file from server
2) How can I store it in iphone (accessing iphone file system)
3) How can I display all fil... | iphone | [8] |
2,269,577 | 2,269,578 | Pythonic way to access arbitrary element from dictionary | <p>I have a dictionary, full of items. I want to peek at a single, arbitrary item:</p>
<pre><code>print "Amongst our dictionary's items are such diverse elements as: %s" % arb(dictionary)
</code></pre>
<p>I don't care which item. It doesn't need to be <em>random</em>.</p>
<p>I can think of many ways of implementing ... | python | [7] |
2,976,164 | 2,976,165 | How to Dynamically change the Nivo Slider Size | <p>Can anyone let me know how I can use jquery to dynamically change the size of Nivo Slider plug-in and change the size of all existing images and slider, based on parent element and browser size(windows)?
As you can see from the following example link I am trying to render the Nivo slider inside a parent div (#con... | jquery | [5] |
3,357,292 | 3,357,293 | Insertion in linked list creating loop | <p>So, I am trying to implement a simple linked list in C++, but I am having a problem with the push method of my class. Basically, when I add the first node to a list, everything goes fine; but, when I add a second node, it ends up pointing to itself (ie, secondNode.next == &secondNode).</p>
<pre><code>class link... | c++ | [6] |
3,041,535 | 3,041,536 | How to build a web site which gives a sub-domain dynamically to every registered user? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1841006/create-subdomain-upon-user-registration">Create subdomain upon user registration</a> </p>
</blockquote>
<p>Suppose I have a site, and I wish to give a sub-domain for each registered users.
Like my site, ... | php | [2] |
2,385,835 | 2,385,836 | php read web page contents | <p>i want to create a server for push notifications (ios) .this server every 1 minute read the contents of a web page and check for changes of matches results,if changes was found then send alerts to apple push notification server (apns) with the name of the clubs an scors.</p>
<p>Example can someone check this <a hre... | php | [2] |
3,394,217 | 3,394,218 | List of core classes available by php5+? | <p>Are there any other classes provided by php5+ such as the mysqli() class? </p>
<p>for example, I use this class to connect to the mysql database. Are there any other classes provided by php?</p>
<p><code>$db = new mysqli('localhost','username','','mysql');</code></p>
| php | [2] |
483,553 | 483,554 | private code-behind methods ignored by the compiler - ASP.NET | <p>When declaring a code-behind method as private (such as an event handler), the compiler ignores it and outputs: </p>
<p>"Compiler Error Message: CS1061: 'ASP.default_aspx' does not contain a definition for 'OnLoginUser' and no extension method 'OnLoginUser' accepting a first argument of type 'ASP.default_aspx' coul... | asp.net | [9] |
5,148,523 | 5,148,524 | How to organize C# classes | <p>Is there a general practice when it comes to how to organize your classes in C#? Should there only be one generic class per .cs file? I see that I have Form1.cs which includes all of the classes relevant to "Form1". However I could create a file named Misc.cs which includes all misc classes. Not sure which way t... | c# | [0] |
1,002,766 | 1,002,767 | What is beneficial about this program?? When using Pointer to Setter and Getters | <pre><code>class Animal
{
public:
void setName(string *Animal_Name);
void setAge(int *Animal_Age);
string getName();
int getAge();
private:
string Name;
int Age;
};
</code></pre>
| c++ | [6] |
5,536,317 | 5,536,318 | How to populate google charts using ASP.NET Dataset/Datatable? | <p>How to populate google charts using ASP.NET Dataset/Datatable ?</p>
| asp.net | [9] |
1,611,847 | 1,611,848 | What's wrong with virtual function calls in constructor | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/496440/c-virtual-function-from-constructor">C++ virtual function from constructor</a> </p>
</blockquote>
<p>I'm using a static code analyzer and it keeps warning me when I call a virtual function in a subclass's... | c++ | [6] |
2,408,690 | 2,408,691 | Why does the class get reloaded? | <p>I am creating an android app that will send a SMS to another SIM connected to an electrical circuit. When the receiving SIM gets the message with a particular text, the electrical circuit will be closed and a motor will start running. Here is the program</p>
<pre><code>public class SendSMSActivity extends Activity ... | android | [4] |
5,447,093 | 5,447,094 | Accordion Menu issues | <p>I have created a simple accordion menu.My problem is when i click "Folder1" it expands but when i click it back again it should collapse .. i'm stuck with that and not able to proceed any help..</p>
<p>JsFiddle - <a href="http://jsfiddle.net/nY2t7/" rel="nofollow">http://jsfiddle.net/nY2t7/</a></p>
<pre><code>$(do... | jquery | [5] |
4,765,930 | 4,765,931 | Remove top level UL | <pre><code><li> </li>
<li class="wordwrap"></li>
</code></pre>
<p>i want to remove <code>li</code> on top level .ie <code>li</code> without a class which resides just on top of <code>li</code> with class .i don't want to remove any other <code>li</code> ? How can we do this with Jquery</p>
| jquery | [5] |
3,536,522 | 3,536,523 | calling activity | <p>i am new to android development and i am confused about activities (not even sure if they are called activities lol)
how would i go about starting another activity from within one?</p>
<pre><code>public void work(View v) {
//does quite a bit of stuff in here
//then goes back to csend() to check if this ne... | android | [4] |
4,724,052 | 4,724,053 | Android - View be shrink when load from memory | <p>Hi
<br/>
I have a list view with difference item layouts.
<br/>
First I inflated the view and store it memory.
When the list view get the child view (from getChildView function)) I will return the in-memory object. Everything seems ok except when I scroll the list, the view is shrink to 2/3 original size and after t... | android | [4] |
1,130,647 | 1,130,648 | how to change Dictionary's value when enumerate it? | <p>how to change Dictionary's value when enumerate it?
the following code doesn't work, because we can not change dictionary's value when enumerating it. Is there any way to get around it? Or NO WAY? Thanks</p>
<pre><code>foreach (KeyValuePair<string, int> kvp in mydictionary)
{
if (otherdic... | c# | [0] |
3,555,581 | 3,555,582 | sqldatareader error "Invalid attempt to call Read when reader is closed." | <p>when I am reading data from sqldatareader I am getting error "Invalid attempt to call Read when reader is closed."
My code is below</p>
<p>obviously this is getting closed by the using statement in the ExecSqlDataReader</p>
<p>I would like to be able to call this method and then use the reader in another class, i... | c# | [0] |
5,341,139 | 5,341,140 | click event to fire just once | <p>i want the click() event to fire just once.
I can use the removeClass() but doesnt sounds good if i need it again for smthing else.</p>
<p>Any ideas?</p>
| jquery | [5] |
2,056,335 | 2,056,336 | Help with String parsing | <p>I am trying to parse the string and see if the value after ":" is Integer. If it is not integer then remove "Test:M" from string. </p>
<p>Here is the example string I have.</p>
<pre><code>string testString = "Test:34,Test:M";
</code></pre>
<p>The result I need <code>testString = "Test:34"</code></p>
<pre><code>s... | c# | [0] |
1,340,458 | 1,340,459 | Getting screen pixel data in an iphone application | <p>Is there a way to get the pixel data for what is currently displayed on the iphone screen (like accessing the back buffer or something like that) ?</p>
<p>Thx </p>
| iphone | [8] |
2,119,218 | 2,119,219 | Android Adding OnClickListener to listview | <p>I have been trying to create a settings app for my new rom called "ProtoType" and i am trying to add an OnClickListener to my listview but i cant find the appropriate way to do so and as a result i have turned to here for help and i was wondering if anybody can show me how i'll post my activity below and thanks.</p>... | android | [4] |
5,919,991 | 5,919,992 | Android Custom Surface View graph is going behind the grid | <p>In the code below when I remove canvas.drawColor(0, PorterDuff.Mode.CLEAR) the graph starts flickering up and down on the grid. Does anyone know what might cause this?</p>
<pre><code> public void drawScan()
{
DrawTask = new TimerTask()
{
public void run()
{
Canvas... | android | [4] |
4,060,379 | 4,060,380 | Java integer list | <p>I am trying to make java go trough a list of numbers.
It chooses the first one, gives this as output, waits/sleeps like 2000 milliseconds and then give the next one as output, waits 2000 milliseconds, etc.</p>
<p>They should not be listed behind eachother so when my list is:
10
20
30
40
50</p>
<p>It should not giv... | java | [1] |
1,313,600 | 1,313,601 | Custom DatePicker | <p>I have two queries...
I am about to write a custom DatePicker where in could control the number of components as well. Like Date and Month only and no Year.</p>
<p>Q1) Do you have any custom code already available which takes care of leap year logic?
Q2) I thought of writing separate arrays of days... but writing n... | iphone | [8] |
4,324,926 | 4,324,927 | Dynamically import a package from a directory | <p>I am making a server that listens on a socket. Whenever a new request comes in, the server spawns a new instance of handle_request. Each instance of handle_request.py <strong>imports the relevant handler</strong> from request_handlers.</p>
<pre><code>server.py
handle_request.py
request_handlers
|_handler_beta
|_han... | python | [7] |
1,777,799 | 1,777,800 | How could I replace '$uid=*any digit*' using preg_replace function? | <p>Basically, I need to replace the text inside a php file in-order to slightly change a mysqli query.</p>
<p>I'm using this function:</p>
<pre><code>file_put_contents($file,preg_replace('/^($uid=)[\d]/', '$uid=' . $uid, file_get_contents($file)));
</code></pre>
<p>to replace </p>
<pre><code>$uid=*any digit*
</code... | php | [2] |
191,350 | 191,351 | getline() a string giving difficulty | <p>i am doing a task where i am inputting ist no of times you want to have input and then i am inputting a full line by the use of getline but sime how i am not able to do that.</p>
<p>here when i try to input '1' as my no. of test cases it instantly gives '0' as answer and out of the loop why is not this cin>> test; ... | c++ | [6] |
4,556,536 | 4,556,537 | Using setProperty to set value of a Class Variable | <p>Why do i need to use setProperty to be able to set the value of a variable in my java class</p>
<p>When i can just create the instance of the variable and use the intance to access my variable and assign a value.</p>
| java | [1] |
6,027,553 | 6,027,554 | Can I reliably unimport a Python module if I import it in a namespace? | <p>Basically, I have a long running process where I would like to be able to unimport modules and recover memory via the gc. I've read about deleting modules <a href="http://stackoverflow.com/questions/437589/how-do-i-unload-reload-a-python-module">How do I unload (reload) a Python module?</a> and it seems like there a... | python | [7] |
3,897,526 | 3,897,527 | How to share resources between activities/services | <p>I wanted to know what is the best approach for sharing singleton in my android app.
I have a few activities that does not rely on each other, but I want them to have a singleton that they can all read/write.</p>
<p>Where should I place it?</p>
<p>Thanks</p>
| android | [4] |
1,447,892 | 1,447,893 | questions on static import on java | <pre><code>import static java.lang.System.out;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
public class ShadowingByImporting
{
public static void main(String[] args)throws FileNotFoundException
{
out.println("Calling println() in java.lang.System.out");
PrintWriter pw=new ... | java | [1] |
1,516,507 | 1,516,508 | Null Pointer Exception | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/218384/what-is-a-null-pointer-exception">What is a Null Pointer Exception?</a> </p>
</blockquote>
<p>Duplicate of <a href="http://stackoverflow.com/questions/218384/what-is-a-null-pointer-exception">http://stack... | java | [1] |
3,152,188 | 3,152,189 | ASP.Net radio button list | <p>im trying to create a feedback form, i have a some mock code which looks similar to this</p>
<pre><code> for (int i = 1; i < 3; i++)
{
TableRow tr = new TableRow();
Table1.Rows.Add(tr);
TableCell QuestionCell = new TableCell();
// get the text for the question and stick it... | asp.net | [9] |
2,883,622 | 2,883,623 | Stopping a widget's service when not in use | <p>I'm having trouble getting my widget to stop hogging so many resources.</p>
<p>I setRepeating on the AlarmManager to update. When the widget is deleted (onDisabled()), I call .cancel() on the service, but the service still shows up in the android "running processes" making me believe I'm doing something wrong. Any ... | android | [4] |
2,158,547 | 2,158,548 | How can I make my own android lockscreen? | <p>As of now I have created an app that preforms all the functionality of a lockscreen aside from opening when the phone is turned on. How can I do this? </p>
<p>I know this is possible as I have seen lockscreen apps on the market but after hours of searching the internet I have found nothing. I have heard that you mu... | android | [4] |
5,124,514 | 5,124,515 | Typedef for reference types in C#? | <p>Does C# have a typedef for reference types? I know that there's a <code>using TypeName = RealType</code>, but does that take effect across multiple files, or just the local scope?</p>
<p><strong>Edit</strong>: If it's just in the current file, is there a way to make it global?</p>
| c# | [0] |
5,883,019 | 5,883,020 | Javascript Precedence of Parenthesis | <p>I'm playing with Rhino and noticed this strange behavior in what appears to be operator precedence:</p>
<pre><code>js> {}+{}
NaN
js> ''+{}+{}
[object Object][object Object]
js> ''+({}+{})
[object Object][object Object]
</code></pre>
<p>I would expect the expression <code>''+({}+{})</code> to evaluate to <... | javascript | [3] |
1,847,634 | 1,847,635 | UIButton flickers when pressed | <p>I have several UIButtons in my app with different graphics for their On/Off states. The smaller buttons all display correctly without any flickering, but the larger button (320x90px) will flicker a black color over the button when pressed up to 75% of the time. This is on the iPhone, not the Simulator. I've set diff... | iphone | [8] |
3,978,878 | 3,978,879 | Is there a quasi-standard set of attributes to annotate thread safety, immutability etc.? | <p>Except for a blog post here and there, describing the custom attributes someone created, but that do not seem to get any traction - like one describing how to <a href="http://blogs.msdn.com/b/kevinpilchbisson/archive/2007/11/20/enforcing-immutability-in-code.aspx">enforce immutability</a>, another one on <a href="ht... | c# | [0] |
5,773,512 | 5,773,513 | Compare Date & Time Javascript | <p>Ok I cant get my head round this, ive looked at so many posts on SF but cant figure it out.</p>
<p>I need to compare two dates & times, start and end.
If end is great then alert();</p>
<p>Works in Chrome but not IE(9)
(format is: 01-Jan-2013 10:00)</p>
<pre><code>var stDate = new Date(date +" "+ start);
var e... | javascript | [3] |
5,833,687 | 5,833,688 | Get PageCount through filtering decorators | <p>I would like to add paging functionality to a website (running ASP.NET MVC).
A heavy use of decorators is making it difficult for me to implement a GetPageCount method on a class.</p>
<p>Currently i have something like this:</p>
<pre><code>class ProductRepository {
private DataContext _db;
public IQueryab... | c# | [0] |
2,592,376 | 2,592,377 | How to extract an instance of ObjectTypeA encapsulted in an general object? - screenshot attached | <p>I am implementing an eventhandler for ObservableCollection of Product. </p>
<p>I have a NotifyCollectionChangedEventArgs e. e.NewItems[0] returns the first object that has been changed. But this is an object, meaning it is not a Product, the Product is encapsulated in the object somehow, but I am not sure how to ex... | c# | [0] |
1,385,563 | 1,385,564 | how can we convert word document into pdf by asp.net | <p>how can we convert word document into pdf by asp.net. I browse a ms-word file by FileUpload & when i click on OK, it automatically convert that file into PDF. Can anybody guide me how can be it possible. I got some code by google but thats are incomplete. If Anybody know the solution kindly share with me.</p>
| asp.net | [9] |
3,460,795 | 3,460,796 | How to fix Errors in IE | <p>I am uisng IE 6 . </p>
<p>My page is working fine under Mozilla , but when i try to open the page from IE it shows an Error as </p>
<pre><code>LINE : 553
Char :82
Error: Expected identifier , String or number
code :0
</code></pre>
<p>please advice</p>
| javascript | [3] |
4,182,627 | 4,182,628 | Segmentation fault,C++,g++, | <p>I have this simple program, when I run this program, I get segmentation fault, I can not
recognize where is my mistake. any help welcomed.(segmentation fault for Di>=27). The point
is that when I remove function immediately segmentation fault disappears. Or when I transform the function to a void function. I know t... | c++ | [6] |
127,937 | 127,938 | Get data from table celle | <p>i have a table and i want the data from the cells to be printed onto a input field when i click the a specific table cell using the "onclick" command. i was thinking about getdocumentbyid or something like that</p>
<p>greet</p>
| javascript | [3] |
4,090,358 | 4,090,359 | Windows Event Viewer and log4net | <p>I have idea to write errors from my application to the <strong>Windows Event Viewer</strong> using <strong>log4net</strong>. Can I do it or not? And if I can, how :).
Thank you.</p>
| c# | [0] |
1,025,172 | 1,025,173 | How to refer to the true 'body' of a page? [NOT iFrame body] | <p>I have a script that create a new div element. Then, I want to append the div to the body of the page using appendChild method. </p>
<p>The script is look like this :</p>
<pre><code>var div = document.createElement('div');
div.id = 'newdiv';
document.body.appendChild(div);
</code></pre>
<p>Unfortunately, the div ... | javascript | [3] |
2,920,992 | 2,920,993 | Variables in python os.path | <p>I am new to python and I'm trying to create a program that creates a directory with todays date, create a sandbox into that directory and run the make file in the sandbox. I am having trouble getting the variables to be picked up in the os.path lines. The code is posted below:</p>
<pre><code>#!/usr/bin/python
imp... | python | [7] |
2,787,871 | 2,787,872 | Do methods in class instances take a place in memory? | <p>When I have a class like this:</p>
<pre><code>class test {
private int _id = 0 ; // 4 bytes
private int _age = 0 ; // 4 bytes
}
</code></pre>
<p>I'm sure that each instance of it, will take more than 8 bytes in memory because of the 2 integers.</p>
<p>But what about methods? If I have a class with a mill... | java | [1] |
2,741,051 | 2,741,052 | How can you make the pound sterling sign (£) show in the command prompt from a java program? | <p>I'm having trouble getting the £ sign to show properly in the command prompt after doing:</p>
<p>System.out.println("The price from x to y is £4");</p>
<p>When executed in the command prompt it reads : The price from x to y is ú4</p>
| java | [1] |
679,894 | 679,895 | PHP accessing String vars as Array and changing value | <p>Is it ok to do this please?</p>
<pre><code>for($i=0;$i<strlen($str);$i++)
{
if(!in_array($str[$i],$arAllowedCharset)){$str[$i]='';}
}
return $str;
</code></pre>
<p>It works, but I am unsure if I am "allowed" to do that, i.e. <code>$str[$i]='';</code>.<br/>
Note: <code>$str</code> is a string variable, <code... | php | [2] |
4,578,239 | 4,578,240 | $object->($string) | <p>I am dealing with an object of a class that I did not write and cannot change.This class has a very large number of attributes. I want to cycle trough about half of these attributes (a select group). I put the names of the nescessary attributes into an array and would like to cycle through them. Is this possibl... | php | [2] |
4,729,421 | 4,729,422 | setting typeface globally Android | <p>Hi i have a global Actions class that i am importing into my activities what i'm trying to do is to change the type face to any text within that activity. </p>
<p>heres my global Actions
public final static void setTypeFace(Context someContext){</p>
<pre><code> Typeface face =Typeface.createFromAsset(getAs... | android | [4] |
3,655,918 | 3,655,919 | How to pause program mid loop to wait for a button press java - action listener | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1641209/how-can-i-wait-for-a-button-press-in-a-loop">How can I wait for a button press in a loop?</a> </p>
</blockquote>
<p>I think this question has been asked before however I have not found a response that so... | java | [1] |
1,249,864 | 1,249,865 | Migrate from fluxBB to PHP-Fusion | <p>Is there a way to migrate a forum from fluxBB to PHP-Fusion?</p>
| php | [2] |
3,128,274 | 3,128,275 | Java - Package woes | <p>I'm not new to Java but I never learned Packages. Anyways, let's say I create a folder called <code>maina</code>.</p>
<p>I put in file <code>main.java</code> in folder <code>maina</code>:</p>
<pre><code>package maina;
import other.Dice;
public class main
{
public static void main(String[] args)
{
... | java | [1] |
1,597,249 | 1,597,250 | Unable to restore state in android application | <p>I have an application which works with services and activities.</p>
<ol>
<li>Called service from first activity and then second activity is called from service.</li>
<li>Pressed Home button and opened the same application again.</li>
<li>Now, I can see first activity but i am expecting to see second activity.</li>
... | android | [4] |
227,344 | 227,345 | Xerces on Android | <p>I found several references in the mailinglist archive about Xerces, but it is still not clear to me if it is possible use Xerces succesfully in Android. Could you please provide me this information?</p>
<p>If the answer is Yes, could you please give me some tips or references on how use Xerces instead of default An... | android | [4] |
1,521,096 | 1,521,097 | How can I split / trim Videos with Android SDK / NDK? | <p>Is there a way to Split Videos with Android?</p>
<p>I want to give the user a chance to cut a video bevore uploading.</p>
<p>Best,</p>
<p>Simon</p>
| android | [4] |
4,810,902 | 4,810,903 | very interesting use of return keyword in php | <p>as we know, <strong>return</strong> keyword will RETURN some value and exit current function. Mean, that this one used only inside some functions.</p>
<p><b>BUT,</b> I saw some php-dev's use return keyword outside functions, even in index.php file (in root of web server). What is that mean???? By the way, maybe it'... | php | [2] |
3,305,582 | 3,305,583 | Overriding Browser's Keyboard Shortcuts | <p>I'd like to add support for keyboard shortcuts to a couple of pages in my web application by intercepting the keypress event handler of the document object, not the accesskey attribute.</p>
<p>The problem is that every browser has its own keyboard combinations, so it's impossible to come up with a set of keyboard c... | javascript | [3] |
1,538,476 | 1,538,477 | what are the different software using in android game developer? | <p>In the android game developer what are the software using and the android game is design in the basic platform.just beginning of android game in the basic tools liKe Java application and SDK? please help me in this?</p>
| android | [4] |
4,621,761 | 4,621,762 | How to construct a pattern that escapes all metacharacters in java? | <p>I want to match pair of words where one of them changes constantly (loop over an array of strings). The problem is that this word may contain metacharacters and I don't know which ones, so escaping them manually is a bit problem. Is there a way to construct a pattern of a string that already escapes all its metachar... | java | [1] |
3,999,870 | 3,999,871 | PHP: Split header into spans | <p>I have a simple content rotator that displays text like so:</p>
<pre><code><h4><span>Featured Article</span></h4>
<h2><span>Lorem ipsum dolor sit amet,</span> <span>consectetur adipisicing elit</span></h2>
... | php | [2] |
1,798,723 | 1,798,724 | How to bulk select <td> using jQuery | <p>I am having a HTML table with many rows. I have seven columns in it. Each cell (<code><td></code>) in the table has an ID attribute with grid[x][y] with x and y representing columns and rows respectively.</p>
<p>Example <code><td></code>s are</p>
<pre><code><td id="grid[2][2]" class="available"...&g... | jquery | [5] |
6,026,137 | 6,026,138 | InputStream Cannot Be Null / Can't Access File Inside Another Package | <p>I'm trying to access a file from one class inside another package inside a JAR file. To be more specific, the class in which I'm creating the inputstream is named ClassA.class and is located in the package: com.something.somethingelse while the file I'm trying to open with inputstream is located in the package com.s... | java | [1] |
5,125,667 | 5,125,668 | How can I not repeat this code in jquery? | <p>I am repeating an IF ELSE statement like so</p>
<pre><code> $('#accountLoginButton').click(function() {
if($('#topSubscribe').is(":visible")) {
$('#topSubscribe').slideUp(function(){
if ($('#topLogin').is(":hidden"))
{
$('#topLogin').slideDown("fast");
} else {
$('#topLogin').slideUp(... | jquery | [5] |
2,735,618 | 2,735,619 | Java making a txt file | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4362456/how-to-write-content-on-a-text-file-using-java">How to write content on a text file using java?</a> </p>
</blockquote>
<p>Is it possible to make use java to save text in a textfield as plain text, if so ... | java | [1] |
1,196,344 | 1,196,345 | Pass a delegate itself as a parameter | <p>Is it possible in C# to pass a delegate or event to a method so that the method can assign a new event handler to that delegate with <code>+=</code> (and not so that the method can call the delegate)?</p>
<p>Lets say I can mix C++ with C#. This would be what I'm looking for:</p>
<pre><code>public class MyClass
{
... | c# | [0] |
3,513,778 | 3,513,779 | Context and Memory leaks | <p>In my application I have a thread and a corresponding handler to update the UI. This thread will be started from my main activity, and the Thread takes several parameters, including a context. This context is used this way:</p>
<pre><code>Context c;
MessageHandler handler;
public BluetoothCommunicator(Context c) {... | android | [4] |
4,348,403 | 4,348,404 | Simplify this PHP? | <p>I was copy/pasting some PHP to get the outcome I wanted but I believe this could be simplified in a much better way. Could any developers help a designer out?</p>
<pre><code><?php
$url = dirname(__FILE__);
$id = substr( $url, strrpos( $url, '/' )+1 );
echo '<img src="../i/';
echo $id;
echo '.png" alt="';
echo... | php | [2] |
2,695,678 | 2,695,679 | Why should multidimensional arrays be constructed with for loops? | <pre><code>def make_set(rad):
y = []
for i in range(0, rad):
x = []
for j in range(0, rad):
x.append(0)
y.append(x)
return y
def make_set_basic(rad):
z = [[0] * rad] * rad
return z
</code></pre>
<p>What is problematic about the latter implementation (make_set_ba... | python | [7] |
2,479,233 | 2,479,234 | Triggering jquery event function at page load | <p>Here's a little jQuery function that does what I want when a checkbox is clicked, but I have a basic gap in my knowledge: </p>
<p>How to register this so that it deals with checkboxes that are already clicked when the page loads? </p>
<p>(<strong>Edit:</strong> Sorry, to those who already answered the question, bu... | jquery | [5] |
1,573,682 | 1,573,683 | what shoud be difference between "NativeHeapAllocatedSize" and "Runtime totalMemory" in Android to prevent from "OutOfmemory Exception"? | <p>hello i m doing some runtime calculation for getting NativeHeap memory and allocated memory at runtime, so any one can suggest me</p>
<p>what should be the difference between "Debug.getNativeHeapAllocatedSize()" and "Runtime.getRuntime().totalMemory()"</p>
<p>so can prevent app by OutOf Memory Exception.</p>
<p>T... | android | [4] |
5,343,993 | 5,343,994 | HTTP Connection in Iphone | <p>since m new in iphone i need you guys to help me in learning about http Connections in Iphone..
guys please guide me to some tutorials so that i could learn some http connections tricks in iphone and coudl communicate with WebSites</p>
<p>also please guide me through some Sample code for the following problem:
i w... | iphone | [8] |
4,899,024 | 4,899,025 | Remove Same Element from Array in C# | <p>How can i remove the same element from Array in C#.
e.g. array{0,2,2,8,4,6,1,0,4}
and output will be array{0,2,8,4,6,1}
plz help me out...</p>
| c# | [0] |
1,297,901 | 1,297,902 | Regular expression for date format- dd-mm-yyyy in Javascript | <p>I need a regular expression for date format: dd-mm-yyyy in Javascript.</p>
| javascript | [3] |
2,142,144 | 2,142,145 | Android app gets stuck when I turn tablet - first timer | <p>I'm first time developer for these types of devices, and UI in general, so I could be missing something basic and obvious.</p>
<p>Everything seems to work fine in the emulator, but I don't know how to simulate turning it.
So I tried running the app on my pandigital (white model - lowest of the low it seems), and ea... | android | [4] |
3,205,105 | 3,205,106 | Store data in the internal memory not on the sd card? | <p>I've been developing a content-based app for Android and I have over 120 MB of data that i need to store on the phone. I download this data from a server when the user first runs the app. My <strong>first question</strong> is, is it ok if I store this data on the internal memory of the app using Context.getDir() met... | android | [4] |
3,923,975 | 3,923,976 | Including If In Arrays Formed Using For | <p>In Python I have this statement:</p>
<pre><code>blog_ids = [c.blog_id for c in connections]
</code></pre>
<p>Which basically tells Python to create an array of all the blog IDs in the connections. Unfortunately, if the <code>connections</code> object has some <code>None</code> types, <code>c.blog_id</code> would c... | python | [7] |
5,362,236 | 5,362,237 | c++ using "indexing" over a 2D matrix, under this structure | <p>don't know why but i get an error: after this structure i can't index the matrix, so i cant use the "indexing method" over the defined matrix.Can anyone tell me why? or how to fix it?</p>
<pre><code>Header:
const int days=31;
const int exp=6;
struct Array{
int days;
int exp;
int **M;
};
</code></pre>
<p>Constucto... | c++ | [6] |
4,328,124 | 4,328,125 | dragable without jQuery ui | <p>I am sorry if this question is a duplicate but I want to ask how to make a element draggable without using jQuery UI?</p>
<p>I have this code -</p>
<pre><code><script type="text/javascript">
function show_coords(event)
{
var x=event.clientX;
var y=event.clientY;
var drag=docum... | javascript | [3] |
3,244,114 | 3,244,115 | write pointer array to a file | <p>I would like to know how can I write a pointer array:</p>
<pre><code>short* myArray
</code></pre>
<p>and a pointer </p>
<pre><code>short[] myArray
</code></pre>
<p>to a file in C++?</p>
| c++ | [6] |
2,214,735 | 2,214,736 | Good article on GDI+ | <p>Actually, I have never before use GDI+, Can anybody suggest me some good articles on this. I am trying to create custom controls.</p>
| c# | [0] |
3,740,017 | 3,740,018 | Calculate sin(x) as the form of series in c++ | <p>We know that
sin(x)=x-x^3/3!+x^5/5!-x^7/7!+x^9/9! and so on. I have written this code:</p>
<pre><code>#include <iostream>
#include <math.h>
using namespace std;
const int m=19;
int factorial(int n) {
if (n==0){ return 1;}
return n*factorial(n-1);
}
int main() {
float x;
cin >>... | c++ | [6] |
1,395,361 | 1,395,362 | How do I modify this code to allow a different element to trigger the event? | <h3>HTML</h3>
<pre><code><div id="sidebar">
<ul>
<li>
<h2>
HEADER
</h2>
<ul>
<li><a href="#">li3</a></li>
<li><a href="#">li2</a></li>
<li><a href="#"... | jquery | [5] |
4,086,226 | 4,086,227 | Characters preceding the cursor | <p>Is it possible to retrieve the index into a text area that the cursor is at using the keydown event?</p>
| javascript | [3] |
5,554,760 | 5,554,761 | what is an immutable reference? | <p>hi i have found Uri as immutable reference i dont know what it is the exact meaning of immutable reference... can anyone help me?</p>
| android | [4] |
2,935,107 | 2,935,108 | disable direct child handler of SlidingDrawer and use it via button that not it's direct child | <p>I want to use SlidingDrawer but I need to open it from button which not the child of the SlidingDrawer, can I disable the handler and open the drawer via a button that outside the FrameLayout that wraps the drawer object, or maybe I need to use other object that performs like the SlidingDrawer?
Thank's</p>
| android | [4] |
2,964,596 | 2,964,597 | how to get the previous 3 months in php | <p>how to get the previous 3 months in php ex(If i say DEC.. It should display the previous 3 months i.e., OCT NOV DEC)</p>
| php | [2] |
5,266,089 | 5,266,090 | A project with an Output Type of Class Library cannot be started directly | <p>Please can someone could explain why I get this error and what to do to fix it (or what I'm doing wrong!). The steps I have taken are</p>
<ol>
<li>Download Source code from <a href="http://www.codeproject.com/Articles/16859/AForge-NET-open-source-framework" rel="nofollow">http://www.codeproject.com/Articles/16859/A... | c# | [0] |
5,628,782 | 5,628,783 | programmatically finding the size of float | <p>Disclaimer: this question may not have practical value, it's more of a puzzle/curiosity question.</p>
<p>In Java I can write the following code to programmatically find the size of int:</p>
<pre><code>public static void main(String[] args)
{
int x = 1;
int count = 1;
while((x = x << 1) != 0)
... | java | [1] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.