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,080,391
2,080,392
Where online can I find a good practice test on Java
<p>Hello I have a test on Java next week , and i'm looking for a practice test to try out. For example <a href="http://www.proprofs.com/quiz-school/story.php?title=csci-1302-final-demo" rel="nofollow">http://www.proprofs.com/quiz-school/story.php?title=csci-1302-final-demo</a></p> <p>If you know any good Java practice...
java
[1]
1,331,577
1,331,578
PHP Parser for HTML File
<p>I want a PHP Function which parse the html tags and insert into my db..</p> <p>and in html page their are link with in link means 1 link have sublink and they crawl the data in the sublink also and insert into my database.</p> <p>Please code some function how would i do that i am new on that</p>
php
[2]
5,948,856
5,948,857
Convert const char* to wstring
<p>I'm working on a native extension for a zinc based flash application and I need to convert a <code>const char*</code> to a <code>wstring</code>.</p> <p>This is my code:</p> <pre><code>mdmVariant_t* appendHexDataToFile(const zinc4CallInfo_t *pCallInfo, int paramCount, mdmVariant_t **params) { if(paramCount &gt...
c++
[6]
1,174,734
1,174,735
Android: Internet Accesing Application
<p>I am making an application that fetches data from internet like web service,so it requires internet connection.</p> <p>So when i first click on my application, If internet connection is not available it should show me dialog that Internet connection not available get it connected.And if connection is available then...
android
[4]
469,881
469,882
code problem finding id and index
<p>new to programming and android, so I really have no idea what im doing. can anyone tell me why this code returns incorrect values of -1 for index and a 10 digit number for id, when I clearly assign an id and the index should not be -1 because its 0 based??</p> <p>I would think that the problem is somewhere in the c...
android
[4]
2,054,811
2,054,812
How to replace the image of the back button entirely with different image?
<p>Below is my coding </p> <pre><code>// Navigation logic may go here -- for example, create and push another view controller. NextViewController *nextViewController = [[NextViewController alloc] initWithNibName:@"NextViewController" bundle:nil]; [self.navigationController pushViewController:nextViewController animat...
iphone
[8]
4,300,131
4,300,132
How to reload a java application?
<p>I want to have a button in my application that simply reloads the application. </p> <p>Essentially, I just want to re-run the JAR and System.exit() - but I don't want to do this using Runtime.exec() because I need it to work on multiple OS.</p> <p>I can't really come up with anything.</p>
java
[1]
32,296
32,297
How to get application name and package name?
<p>i wand to get application name which is stored into SD card or phone only thanks in advance....</p>
android
[4]
5,300,886
5,300,887
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,294,348
3,294,349
Does PHP evaluate variables when a function is defined?
<p>I am creating a multipage form in PHP, using a session. The <code>$stage</code> variable tracks the user's progress in filling out the form, <strong>(UPDATE) and is normally set in $_POST at each stage of the form.</strong></p> <p>On the second page (stage 2), the form's submit button gets its value like this:</p> ...
php
[2]
5,475,235
5,475,236
Extention method for a Page control - error
<p>I've written a small extention method for a page control, to recursively search for a control. But I get the "Object reference not set to an instance of an object" exception.</p> <p>And it seems page.Controls only has 1 control and on this control I et this exception.</p> <p>Anyone has any idea?</p> <p>Here is th...
c#
[0]
2,974,649
2,974,650
Problems in svn log command in python script
<p>I am executing an "svn log" command using os.popen3 in python as follows: stdin,stdout,stderr = os.popen3('svn log -r ' + txnNo) I am able to retrieve the commit log message if I commit via cmdline. But if I commit from tortoiseSVN from windows Explorer I get an empty commit log message.</p> <p>any help would be ap...
python
[7]
3,577,131
3,577,132
discover path of python module
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/247770/retrieving-python-module-path">Retrieving python module path</a> </p> </blockquote> <p>Suppose I have code in 3 python files. x.py, y.py, z.py. </p> <p>x calls y and y calls z. In the code in z.py, I w...
python
[7]
1,453,464
1,453,465
how to modify the document selection in javascript?
<p>I wanna modify the document selection (user currently selected by mouse or keyboard), how to do it in a cross browser way?</p>
javascript
[3]
1,371,907
1,371,908
explain pattern of rebinding globals to locals in javascript
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2716069/how-does-this-javascript-jquery-syntax-work-function-window-undefined">How does this JavaScript/JQuery Syntax work: (function( window, undefined ) { })(window)?</a> </p> </blockquote> <p>i see this patte...
javascript
[3]
441,870
441,871
Using jQuery, show a div if only two or more checkboxes are checked
<p>I need to show a div if two or more checkboxes are checked using JQuery only.</p> <p>How can I achieve this?</p>
jquery
[5]
5,253,106
5,253,107
C# Method Overloading Issue, string string[] conversion
<p>I'm trying to get the below to work as follows. name(something) adds something to the list. and then name() retrieves the values. But I'm having some problems and was hoping one of you guys knows what's up.</p> <pre><code>public class PlayerSettings { public List&lt;string[]&gt; Players = new List&lt;string[]&g...
c#
[0]
5,962,763
5,962,764
Accurate trig in python
<p>Straight to the chase I want to create a function which calculates the length of a step.</p> <p>This is what I have:</p> <pre><code>def humanstep(angle): global human human[1]+=math.sin(math.radians(angle))*0.06 human[2]+=math.cos(math.radians(angle))*0.06 </code></pre> <p>So if the angle is 90 then t...
python
[7]
5,066,056
5,066,057
Am I missing something? I keep outputting "No file found!"
<pre><code>void getBookData(bookType books[], int&amp; noOfBooks) { ifstream infile; string file = "bookData.txt"; infile.open(file.c_str()); if (infile.fail()) { cout &lt;&lt; "No file found!" &lt;&lt; endl; infile.clear(); } while (true) { string line; getline(i...
c++
[6]
934,328
934,329
Data capture from optical mark reader in java
<p>i need to develop software for data capture optical mark reader sheet .please suggest me how to develop and if any third party jar is available help me </p> <p>Thanks in advance</p> <p>Aswan</p>
java
[1]
1,436,450
1,436,451
better performance for algorithm
<p>I have something like this:</p> <pre><code>using (SqlDataAdapter a = new SqlDataAdapter(query, c)) { // 3 // Use DataAdapter to fill DataTable DataTable t = new DataTable(); a.Fill(t); string txt = ""; for (...
c#
[0]
2,686,397
2,686,398
C++ no match for operator<< Error
<p>I'm nearing the end of an intro class and I cannot for the life of me figure out what's going on here. First, the code:</p> <pre><code>#include &lt;iostream&gt; #include &lt;fstream&gt; using namespace std; int main( ) { double id = 0.0; double rate = 0.0; double hours = 0.0; double gross = 0.0; ...
c++
[6]
657,537
657,538
Active data copying
<p>Is this expression correct?</p> <pre><code>{ char a; char *temp; for(int j = 0; j &lt; len; j++) { strcpy(&amp;temp[j], (char*)a); } } </code></pre> <p>in this code <code>a</code> gets updated externally by the user input/key stroke. I want to copy all incoming/updated <code>a</code> to...
c++
[6]
3,331,545
3,331,546
what is the best way to maintain a 3 level hierarchy?
<p>How can I maintain a 3 level hierarchy by using a gridview?</p>
asp.net
[9]
832,303
832,304
How to Calculate Percentage for Profile Compltance
<p>I have Create Many tables For User Registration Like Naukri... When i finished registration i have to show user the profile completance ,exactly like naukri way .how can i do it in asp.net?</p>
asp.net
[9]
6,006,474
6,006,475
Add name in the ordered list
<p>Goal:<br> Add the name (the name that has even number in the <code>arraylist</code>) in the ordered list.</p> <p>Problem:<br> How should I do it with jQuery's <code>each</code> syntax? you also need to take account to even number.</p> <p>The array list also can be increased in the future.</p> <hr> <pre><code>var...
jquery
[5]
4,425,531
4,425,532
IntPtr vs ref C#
<p>i have to import unmanaged dll into my C# application, I want to know what is the diferent between IntPtr and ref, and what you recommnded me to use and why? Note that both ways are working to me. For example:</p> <pre><code>[DllImport("mydll.dll", CallingConvention=CallingConvention.Cdecl)] static extern Result In...
c#
[0]
5,654,803
5,654,804
javascript dynamic prototype
<p>I want extend a new JS object while creation with other object passing a parameter. This code does not work, because I only can extend object without dynamic parameter.</p> <pre><code>otherObject = function(id1){ this.id = id1; }; otherObject.prototype.test =function(){ alert(this.id); }; testObject = fun...
javascript
[3]
4,857,462
4,857,463
User Events - eg Check Box
<p>Is there a way the CheckedChanged event (or any other C# event) to be declared as User event? The problem is that if the property Checked is changed by code the Event is called and this is a thing that I would not want (for example in MFC the events are user events as opposed to property events). I by pass it with b...
c#
[0]
3,350,063
3,350,064
How can I choose if I want to append text or html to a div generically?
<p>I'm writing a javascript library and I need to use jquery's append method to add content to a div. I thought that append() treats <code>"straight strings"</code> as text and <code>$("&lt;div&gt;html objects&lt;/div&gt;")</code> as html but apparently if you use <code>append("&lt;p&gt;")</code> then you will get the ...
jquery
[5]
1,115,359
1,115,360
null on json data
<p>I am trying to parse this json data from the url but i get NULL how do i fix this issue.</p> <pre><code>$source = file_get_contents('http://partners.socialvi.be/e414f702cf3db89a2fe58066bbab369d65b6a058/activities/available.json'); $json = json_decode($source); var_dump($json); </code></pre>
php
[2]
5,610,660
5,610,661
is there a dictionary i can download for java?
<p>is there a dictionary i can download for java? i want to have a program that takes a few random letters and sees if they can be rearanged into a real word by checking them against the dictionary </p>
java
[1]
2,858,246
2,858,247
Should I interfere the normal Python garbage collection process
<p>I have a large hierarchical data set in Python. After I am done with it, I need to get rid of it -- so I just do a <code>del</code> on the root node of the hierarchy.</p> <p>Would it be OK to manually do a <code>gc.collect()</code> -- is it a good practice to remove large data quickly or should I not do it and let ...
python
[7]
628,661
628,662
fetching and updating data from web service
<p>Data can be fetched into an application through web service can it be possible to update data in web service from our application ..</p>
asp.net
[9]
4,925,213
4,925,214
developing a game in android
<p>Hi I am new to android. I have done sample application availabe at android website. Now i want to develop an arkanoid game. I googled to know from where should i start but dun get any thing relevant. Any help will be highly appreciated, any detail in breif about from where i should start or what things i have to use...
android
[4]
3,608,816
3,608,817
Validate a path
<p>Is there any way of validating if a path can be correct in .net or do I need to write something myself?</p> <p>What I have is a string that is supposed to be a valid path such as:</p> <pre><code>\\server\shared\folder\file.ext c:\folder\file.ext .\folder\file.ext \folder\file.ext %appdata%\folder\file.ext </code><...
c#
[0]
2,638,736
2,638,737
Once I determine a var exist in PHP do I need to keep checking it in that page?
<p>I have a basic PHP question, take the code below for example, let's say I need to use this 10 times on a page, is there a better way to do it?</p> <ul> <li>I realize I could wrap it in a function and just keep calling that function but is there a better way then to keep on checking if the item is set and equals a a...
php
[2]
5,864,800
5,864,801
Android How to Unmount the Sd Card through Program..?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4632039/how-to-safely-remove-sd-card-programmatically-on-android">How to safely remove SD card programmatically on Android</a> </p> </blockquote> <p>Hi Everyone iam new to android and in my application i got one...
android
[4]
2,999,940
2,999,941
Add values from second array after array values?
<p>There are similar questions however none quite tackes the problem.</p> <pre><code>Array('1','2','3') Array('4','5','6') </code></pre> <p>Assuming they both have keys 0, 1, 2. Merging the two arrays doesn't allocate the second array values after the first's since it overwrites keys with the same name. Neither using...
php
[2]
1,546,317
1,546,318
jQuery - combine statements
<p>Could i trouble someone to help me combine these statements...everytime i do i get a script error, but am unable to debug what is exactly wrong...</p> <pre><code>&lt;script type="text/javascript"&gt; $(function() { $('.slideshow').after('&lt;div id="mininav" class="mininav"&gt;').cycle({ fx: ...
jquery
[5]
2,025,781
2,025,782
Using Fragments in android
<p>I have created application that supports API 10+. I have two classes in tabs Lets say class1 and class2. both extends activity. Now I would like to create swipes for API 14+. Seems like I have to create Fragments to use swipes. Can't I reused my old classes that extends Activity parent class to create Fragments? Or ...
android
[4]
5,263,313
5,263,314
How to read Unsigned integer from binary file?
<p>How to read "Unsigned 8/16/24/32/64-bit integer" from binary file ? ( big-endian byte order ) unpack ? any examples ?</p>
python
[7]
4,460,470
4,460,471
How to append a textbox to a table row with jQuery?
<p>How to append a textbox to a table row with jQuery?</p>
jquery
[5]
3,620,110
3,620,111
PHP: print '<meta http-equiv="refresh" content="0;url=' with URL parameters
<p>How do I create this string with URL parameters? What I want is something like:</p> <pre><code>print '&lt;meta http-equiv="refresh" content="0;url=http://domain.com?a=1&amp;b=2"&gt;'; </code></pre> <p>But that doesn't pass my second parameter correctly. I get a ")" instead of a b. What am I doing wrong?</p> <p...
php
[2]
940,953
940,954
EditText focusing Issue..!
<p>In my app, I am using the edit text(text box) which contains some text by default. The problem with the text box is that when the text box is focused the cursor appears at the starting of the string, It does not appear at the end of the string, This case is happening only in Nexus S device, I tried it in some oth...
android
[4]
5,699,038
5,699,039
how to make a Questionnaire iPhone app with sqlite
<p>I want to make an iPhone app just like a questionnaire/Quize, and want to store all questions in sqlite database , i need to have One question that can be a label and 4 radio buttons for answers, user will select the option and will go for the next question, questions and answers will be saved in sqlite and at the e...
iphone
[8]
2,570,555
2,570,556
how to play live streaming with mxplayer with rtmp url
<p>Hi I'm trying to make some live streams work with mxplayer but I'm confused can you guys help me how can I play a live sstreaming in mxplayer I have a app and I want to play it from there I got the rtmp URL but how can I play it ?</p>
android
[4]
5,744,722
5,744,723
how to combine 3 conditions by "OR" in jquery?
<p>Is there anyway to combine 3 conditions by "OR" in jquery? Eg, <code>$(t_obj).keyup(function(e) || $('#sendResp').click(function(e) || $('.emo').click(function(e) {</code> ? I have tested to combine them but I get error. How to combine them?</p>
jquery
[5]
214,948
214,949
Anything wrong with this code?
<p>I am using this to determine which view to go to next, from the result as input from UITableView. The following code isn't working, but I think it should be!</p> <p>Do you see anything wrong with it? </p> <pre><code>NSString *option = [menuArray objectAtIndex:indexPath.row]; if (option == @"New Transaction"){...
iphone
[8]
3,700,997
3,700,998
Accessing method and parameter history with Java
<p>I'm currently working in a project in Liferay in which i'd like to be able to access my method and parameters these methods were given, in the history. This is done in case there is an exception being thrown in certain blocks of code.</p> <p>I've already searched and it is easy to get the method name history (Threa...
java
[1]
2,667,169
2,667,170
Android- openCV on Android
<p>Im trying to use the library on Android. But there was an error that I dont understand. Here is the description on my eclipse.</p> <p>Description Resource Path Location Type <em>*</em> Android NDK: Please correct error. Aborting . Stop. OpenCV Sample - color-blob-detection line 23, external loca...
android
[4]
70,006
70,007
want to extract html and height & width of div
<p>my code is here which is not returning the result i want</p> <pre><code>var content = "&lt;div id='content_dv'&gt;"; content += "&lt;table border='1' style='height:auto;width:auto;'&gt;"; content += "&lt;tr&gt;"; content += "&lt;td&gt;"; content += "This is row 1"; conte...
jquery
[5]
913,644
913,645
Adding number of days to a previous date inside incrementing variable for loop
<p>I am working on a function which adds a number of days to a date inside an incrementing variable loop. I am having a problem getting the date from the previous loop to add the next 30 days to that date. This seems to be working for the first 2 loops then breaks and I cannot figure out the correct code to get the pre...
php
[2]
5,233,129
5,233,130
Unable to register on Google Play as a developer
<p>I am trying to register on android developer's console. But when I open the URL </p> <pre><code>https://play.google.com/apps/publish/signup?dev_acc=&lt;myaccno&gt; </code></pre> <p>The resulting page shows </p> <pre><code>404. That’s an error. The requested URL /about/developer-distribution-agreement.html was no...
android
[4]
1,622,277
1,622,278
submit() in Form Elements
<p>I noticed that you can call <code>submit()</code> in event handlers of form elements. For example, </p> <pre><code>&lt;input id="myInput" type="button" onclick="submit()" value="Test" /&gt; </code></pre> <p>clicking the button generated by the code above will submit the form. The funny thing is, I can't call <code...
javascript
[3]
5,789,317
5,789,318
passing a NULL as an argument in a function
<p>i created a book class which i having being working on as part of my assignment but its seems have being having one problem which i am failing to understand in my code below, this is my code</p> <pre><code>private: Book (string N = " ", int p = 100, string A = "", string P = "", string T = "", int Y = 2000)...
c++
[6]
4,258,177
4,258,178
Compiler Error: Invalid value in assignment when trying to change the origin of a UISwitch
<p>The following piece of code is giving me a compiler error: Invalid value in assignment, while changing the origin.</p> <p><code>CGPoint switchOrigin = CGPointMake(currentOrigin.x, currentOrigin.y + kTweenMargin); UISwitch *choiceSwitch = [UISwitch alloc]; **choiceSwitch.frame.origin = switchOrigin;**</code> </p> ...
iphone
[8]
530,353
530,354
Replacing the contents of a TD based on certain conditions using jQuery
<p>I need to accomplish the following:</p> <p>I have a table that holds data that I need to edit/format: </p> <pre><code>&lt;tr&gt;&lt;td&gt;Tools and Other: Hammers&lt;/td&gt;&lt;tr&gt; &lt;tr&gt;&lt;td&gt;Tools and Other: Wrenches&lt;/td&gt;&lt;tr&gt; </code></pre> <p>Based on conditions, I need to change the con...
jquery
[5]
1,082,675
1,082,676
Play audio and video at a same time in iPhone application
<p>Is it possible to play audio and video file at a same time? I want to play different audio file and video file at a same time and also want control for both, so is it possible?</p>
iphone
[8]
5,838,776
5,838,777
Working with OLEDB ? In Asp.net?
<p>In we application, i am trying to access the excel sheet, when i am accessing .xls it is fine, but when i am using .xlsx then it is giving error like: </p> <pre><code> Microsoft.ACE.OLEDB.12.0' provider is not registered </code></pre> <p>Can you help me to solve this problem. </p>
asp.net
[9]
4,884,470
4,884,471
Delete confirmation issue on iPhone
<p>Hi <img src="http://i.stack.imgur.com/w2iC9.png" alt="enter image description here"></p> <p>I have added a light white/gray color to the background to see what happens when the "Delete Confirmation" is on. My problem is that when the delete button animates on screen, it does not reposition the content of my cell so...
iphone
[8]
4,462,635
4,462,636
jQuery - Combining elements
<p>I'm trying to combine the location of my WordPress theme folder to a jQuery element. I haven't used jQuery much before and I've done a little research but haven't found anything of value.</p> <p>Here's my JavaScript variable</p> <pre><code>&lt;script type="text/javascript"&gt;var templateDir = "&lt;?php bloginfo('...
jquery
[5]
1,364,091
1,364,092
summing exponents in javascript
<pre><code>var total = 0; for (x = 1; x &lt; 16; x++) { var y = x + 1; var singleSum = Math.pow(x, y) + Math.pow(y, x); total = total + singleSum; document.write(total + "&lt;br&gt;"); } </code></pre> <p>I want to take <code>function(x,y) = x^y + y^x</code> where x starts at 1 and y starts at 2 then fi...
javascript
[3]
2,985,042
2,985,043
Retain IEnumerable<T> value during postback
<p>I have an IEnumerable&lt; T> which is declared on the page like this:</p> <p>IEnumerable&lt; Person> person;</p> <p>When the page postsback, the person list is null. How can I retain the values of person list without declaring it as static? Sr. devs in my company say that you should not declare the list as static....
asp.net
[9]
4,891,887
4,891,888
android connectivity check
<p>I am currently doing an android application that checks network availability(both wifi &amp; 3G). i have a code that perfectly working in activity . but i need it in broadcast receiver . i want to do some operations when the network is available . i have the permission </p> <p>plz help me.....</p> <p>The code is ...
android
[4]
313,328
313,329
PHP imgefilter parameter value IMG_FILTER_SMOOTH question
<p>I was wondering what does the following sentence mean in laymens terms about the value of the IMG_FILTER_SMOOTH parameter value.</p> <p><code>At about 10, the picture is almost normal, because the original pixel values are given more weight than the combined sum of its neighbors.</code></p>
php
[2]
3,647,969
3,647,970
'System.Configuration.ConfigurationManager.AppSettings' is a 'property' but is used like a 'method'
<p>Configuration File</p> <pre><code>&lt;add key="ObjConn" value="Provider=SQLOLEDB;Persist Security Info=True;User ID=OMembers;PWD=OMembers;Initial Catalog=Omnex2007;Data Source=192.168.100.131"/&gt; </code></pre> <p>C# Code</p> <pre><code>strconnection = System.Configuration.ConfigurationManager.AppSettings("ObjCo...
asp.net
[9]
1,386,959
1,386,960
Iphone - UIImageView not showing up
<p>I have created a UIImageView in Interface Builder. When I run the application on the simulator the image shows up, when I run the application on the device the image doesn't show up. Any help is welcome. Thank you!!!</p>
iphone
[8]
4,829,400
4,829,401
Making the first row of UITableView hidden until user scrolls up on iPhone
<p>For the Facebook and a few other iPhone apps, I've seen what looks like a UITableView with the top row out of view while the other rows are rendered. Then when the user scrolls up, the the very first row becomes visible. Typically, the top most row is the "load more ..." item.</p> <p>Is there a trick to having the ...
iphone
[8]
2,699,948
2,699,949
Slide an image by position using jquery
<p>I am trying to get the image to slide to its centre position on the respective li which is clicked. So for example if i click number 2 in the list it will slide to number 2. The issue is knowing where the user clicks next, how to figure the current position and which direction to slide.</p> <p>Here is my html</p>...
jquery
[5]
3,861,407
3,861,408
Can't switch between 2 fragments
<p>I'm building application with actionbar.Tab with 4 fragments. I want to replace one of the list-fragments with other fragments by clicking on the first item of the listView inside that listFragment.</p> <p>The xml contains only image and the list view:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &l...
android
[4]
3,570,461
3,570,462
Application crash due to ntdll.dll
<p>one of my C++ multi threaded Application crash due to ntdll.dll . my call stack looks as follows :- </p> <pre><code>#0 77452AB1 ntdll!RtlCopySid() (C:\Windows\system32\ntdll.dll:??) #1 00000000 0x777b3e14 in ??() (??:??) #2 00000000 0x00310000 in ??() (??:??) #3 00000000 0x00000000 in ??() (??:??) </code></...
c++
[6]
5,098,145
5,098,146
for loop breaking out for some reason after array comparison
<p>I have two arrays, and I'm comparing two values, and then setting a json object:</p> <pre><code>var compare = ["hh", "pictures", "videos", "aboutMe", "contactMe", "cat", "location"]; var data = ["pictures", "videos", "aboutMe", "contactMe", "cat", "location"]; for (var j=0; j&lt;compare.length; j++) { i...
javascript
[3]
145,224
145,225
Size of text file
<p>I have a text file in sd card , I want to get size of text file in mb programatically from my android application. How can I get size of text file in MB programatically?</p>
android
[4]
2,481,350
2,481,351
Android twitter tweet with image
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/7609656/can-we-post-image-on-twitter-using-twitter-api-in-android">Can we post image on twitter using twitter API in Android?</a> </p> </blockquote> <p>I am working in an android application and I want to tweet ...
android
[4]
5,082,664
5,082,665
Equivalent in C# of "Block values" in other languages
<p>In some languages, almost everything can be used as a value. For example, some languages let you treat a block of code as a unit which can return a value.</p> <p>In Scheme, a block of code wrapped in a <code>let</code> can return a value:</p> <pre><code>(define val (let () (define a 10) (define b 20) ...
c#
[0]
789,561
789,562
Declaring a string globally in C#
<p>In the below rough sample code of C# I have to declared a string in condition and I am unable to access it out of that brace</p> <pre><code>if(//some condition) { string value1 = "something"; } //push to database value1 </code></pre> <p>In the above code compiler says <code>The name 'value1' does not exists in the...
c#
[0]
2,522,797
2,522,798
How to define DO NOTHING in JavaScript
<p>I am displaying a confirm box in my app. When the user clicks on <code>Okay</code>, I close the window<br> when user clicks on <code>Cancel</code>, I want to do nothing but stay on the same page. </p> <p>What should I write in place of DO_NOTHING?</p> <pre><code> &lt;a href="#" onclick="confirm('Do you wan to ...
javascript
[3]
1,572,117
1,572,118
jquery .selectable checkboxes on change event
<p>im new here and i have a problem. i have a table of checkboxes 30x24. witch can be selected with a jquery widget selectable. but wen i use this widget on click event doesnt work anymore. </p> <p>this is my code:</p> <pre><code> $(function () { $("#selectable").selectable({ filter:'label', ...
jquery
[5]
2,388,757
2,388,758
Creation of a map from another map in Java
<p>I have to convert a Map- Map1 into Map2.</p> <p>Map1:</p> <pre><code>A.B.Key = "Key" A.B.Value = "Value" A.B.Key1 = "Key1" A.B.Value1 = "Value1" A.B.Key2 = "Key2" A.B.Value2 = "Value2" </code></pre> <p>Map2:</p> <pre><code>Key = Value Key1 = Value1 Key2 = Value2 </code></pre> <p>Map1 is created from th...
java
[1]
1,551,323
1,551,324
generics in java : identify Type of T
<p>I am writing some generic <code>DAO</code> as follows</p> <pre><code>public class MyGenericDAO&lt;T&gt; { Class&lt;T&gt; clazz; public void doSome(){ for(int =0 ;i&lt;14;i++){ //do something } } } </code></pre> <p>Now i want to initialize clazz based on Type of T?...
java
[1]
3,211,541
3,211,542
Can a class return a static instance of itself? (in c#)
<p>Right now my class is set up as:</p> <p><code>enum Unit{Inches,Centimeters};</code></p> <p>Later on I have a step that sets all of the properties of each of these units into my classes instance variables. For example:</p> <pre><code>int unitBase; //10 for metric, 16 for american int label; switch(unit) { cas...
c#
[0]
1,107,957
1,107,958
Packaging "visual studio c# windows application"project then setup on client without need to install Netframework
<p>I finished programming my project with Visual studio 2008 c# windows form application and I created setup project using plug-in (setup wizard) with visual studio 2008. but when I install my program after packaging with this plug-in there is wrong message appear on the screen:"this install want to install .Netframewo...
c#
[0]
4,518,411
4,518,412
jQuery animate height in different class
<p>Is it possible to have height of animate in different class as is in my case ".bar1"???</p> <p><code>$('.bar1').animate({'height':'58%'},1000);</code></p> <p>Just to get idea what I mean: <strong>'.bar_graf'</strong></p> <p><code>$('.bar1').animate({'.bar_graf'.'height':'58%'},1000);</code></p>
jquery
[5]
1,892,095
1,892,096
custom super global in PHP
<p>Is it possible to define a custom super global variable? (whether in code, or using php.ini)</p> <p>Example, for all projects I use a custom framework. The framework essentially stores all data about running instance of the script (template loaded, template variables, etc.) in a single variable. I'd like that varia...
php
[2]
2,376,594
2,376,595
Email parsing: TypeError: parse() takes at least 2 arguments (2 given)
<p>I am getting the following error while calling a built-in function to parse an email in Python.</p> <pre><code>txt = parser.Parser.parse(fd, headersonly=False) </code></pre> <p>And the error i got is </p> <pre><code>TypeError: parse() takes at least 2 arguments (2 given). </code></pre> <p>Can anybody tell me the...
python
[7]
4,551,255
4,551,256
Handle events of objective c/c++ for the iphone devlopment using xcode 3.2
<p>I am working as a developer for the iPhone applications, but i m stuck at certain point, can anyone tell me that how do i handle the events of C or C++ in Xcode 3.2 for the iPhone development?</p>
iphone
[8]
790,302
790,303
Change a Specific Color in an ImageIcon
<p>I am working with 24x24 pixel icons. And I would like to be able to change a specific color within this icon to a different color. For example turn the white areas to red.</p>
java
[1]
440,647
440,648
request sql of search in database sqlite
<p>I have an edit text where the user write the name I want the syntax of request "select name from table where name begin of the contain of the edit text"</p>
android
[4]
5,947,120
5,947,121
Pointers assignment
<p>What is the meaning of </p> <pre><code>*(int *)0 = 0; </code></pre> <p>It does compile successfully</p>
c++
[6]
3,929,662
3,929,663
Using structs in C# to read data
<p>Say I have a struct defined as such</p> <pre><code>struct Student { int age; int height; char[] name[12]; } </code></pre> <p>When I'm reading a binary file, it looks something like</p> <pre><code>List&lt;Student&gt; students = new List&lt;Student&gt;(); Student someStudent; int num_students = myFile.readUI...
c#
[0]
5,225,183
5,225,184
Finding free non-intersecting rectangle shaped areas between rectangles in C#
<p>I have a following problem. A large rectangle contains smaller non-intersecting rectangles (The black rectangles in the picture below) and I need to find an algorithm to fill remaining free area with non-intersecting rectangles(red ones in the picture below). Speed is not an issue for the algorithm. Also if someone ...
c#
[0]
2,922,902
2,922,903
How to strtotime date format like this
<p>I would like to strtotime dateformat like this - Fri Jun 15 05:38:11 +1000 2012 How could I do that? Basically I need to strtotime it, then do the following - <code>$ago = time()-strtotime(Fri Jun 15 05:38:11 +1000 2012);</code> and then do this - </p> <pre><code>$ago = $ago / (60*60*24); echo $ago.' days ago'; </c...
php
[2]
4,291,893
4,291,894
An automated algorithm tool for running time
<p>I am wondering if there is an open source project that can run the algorithm and tell us what the running time is (just need to know the Big-Oh running time). </p> <p>I know I can do this with hands, but a lot of algorithms are too long or too complex to actually trace the running time.</p> <p>Thanks.</p> <p>PS: ...
c++
[6]
75,414
75,415
PHP Write and Read from Text File
<p>I have an issue with writing and reading to text file.</p> <p>I have to first write from a text file to another text file some values which I need to read again. Below are the code snippets:</p> <p>Write to text file:</p> <pre><code>$fp = @fopen ("text1.txt", "r"); $fh = @fopen("text2.txt", 'a+'); if ($fp) { /...
php
[2]
1,288,682
1,288,683
How to send ">' string in a java code to server
<p>When i try to send a value "Login>Success" to server i get the value as Login%3ESuccess. How can i send the greater than symbol in the java string.</p>
java
[1]
1,015,073
1,015,074
Detect if a string is a link w/jQuery
<p>I need to be able to detect if a target string is a link or not. If yes, i need to grab the URL and place it into a var, do something with the string a (run through a plugin to truncate), and then wrap new string into the link again. I think i should be able to accomplish this with jQuery, right?</p> <pre><code>&lt...
jquery
[5]
3,585,734
3,585,735
Create Parent Thread in java
<p>Often I create Child threads within the main() as </p> <pre><code>Thread thread = new Thread(new Runnable(){public void run(){}}); </code></pre> <p>Likewise, is it also possible to create parent threads ?</p>
java
[1]
176,872
176,873
Simulate a 'Home Button' click
<p>After reading that <a href="http://stackoverflow.com/questions/355168/proper-way-to-exit-iphone-application">there is no proper way to exit an iPhone app</a>, is there a way to programmatically send a Home button click on the device, that would minimise the app?</p> <p>"Apple developers don't do this." is an accept...
iphone
[8]
4,695,296
4,695,297
Error on some device but run on emulator
<p>My app can run perfect on emulator and some device but another device can not run, i tested my app on HTC Wildfire S ,samsung S2, sony Arc and they can run but some phone like sony xperia play, arc S can not run ( they can install my app but get error force close when run inside . Im so sorry for my english is not g...
android
[4]