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
817,695
817,696
python bitwise operation
<p>hi i am new in python just started learning with python i got a task in which i need to store "1" byte of integer into different bits just like RGB the value are store in that can any one would write a small program for me and explain that ,please i need a help </p> <p>Thankyou</p>
python
[7]
3,403,522
3,403,523
Pointer to int array, passing and using it from another method
<p>I haven't cemented my learning of C++ arrays and have forgotten how to do this properly. I've done it with char array before but its not working as well for int array. </p> <p>I declare a new blank int array:</p> <pre><code>int myIntArray[10]; </code></pre> <p>So this should be an array of nulls for the moment co...
c++
[6]
3,991,930
3,991,931
What MUST go inside onDestroy()? (if anything at all)
<p>Right so here I am obsessing over memory leaks, and quite frankly not understanding what could really lead to one (and yes I've read the usual links such as <a href="http://kohlerm.blogspot.co.uk/2009/02/memory-leaks-are-easy-to-find.html" rel="nofollow">http://kohlerm.blogspot.co.uk/2009/02/memory-leaks-are-easy-to...
android
[4]
5,008,318
5,008,319
How can I call a javascript function and pass into it a row's object?
<p>I have the following jQuery:</p> <pre><code>$('#dataTable').on('click', 'tbody tr', clickHandler); </code></pre> <p>Here's the first few lines of my gridClickHander</p> <pre><code>function gridClickHandler(event) { $(oTable.fnSettings().aoData).each(function () { $(this.nTr).removeClass('row_selected'...
jquery
[5]
789,742
789,743
can the ui design for old iphone be used on iphone4?
<p>I'm developing my software, all the ui is drawn based on 480x320 size screen, can my software run on iphone4 without any modification?</p>
iphone
[8]
1,691,924
1,691,925
problem with encoding.utf8.getbytes in c#
<p>I am working on C#, trying below code</p> <pre><code>byte[] buffer = new byte[str.Length]; buffer = Encoding.UTF8.GetBytes(str); </code></pre> <p>In str I've got lengthy data but I've got problem in getting complete encoded bytes. Please tell me what's going wrong and how can I overcome this problem?</p>
c#
[0]
357,325
357,326
Unsupported action error on click of email link
<p>I have given email link to TextView in xml, but as I am clicking on the TextView its showing unsupported action error, How can I put the active link on email in textview?</p> <p>Here is my code of string.xml file:</p> <pre><code> &lt;resources&gt; &lt;string name="emailLink"&gt;&lt;a href="mailto:in...
android
[4]
3,595,749
3,595,750
use variable with "new" when creating object
<p>I am designing a virtual aquarium. I have a class: Fish which I inherit to create classes of different species. The user can select the species in a combo box and click a button to put the fish in the tank. I use the following code to create the fish:</p> <pre><code> switch(s){ case "Keegan" : ...
java
[1]
1,166,204
1,166,205
How to break an functional-style iteration?
<p>I'm experimenting with functional-style Javascript and have encountered an interesting situation. I have a foreach function that takes a collection and function object:</p> <pre><code>var Utils = {}; // Applies a functor to each item in a collection. Utils.foreach = function(collection, functor) { for (var i = 0...
javascript
[3]
4,023,611
4,023,612
run-time error and program crash
<p>How can I specify a separate function which will be called automatically at Run-Time error to prevent program crash?</p>
c++
[6]
5,498,850
5,498,851
What is the maximum storage limit for db that is specific to a single app?
<p>I need to know important limits in sqlite in the android. so my question is this:</p> <p>What is the maximum storage limit for db that is specific to a single app?</p>
android
[4]
1,942,478
1,942,479
Setting UINavigationbar properties in viewDidLoad does nothing
<p>I've tried setting the style of the UINavigationbar to be a translucent style in the viewDidLoad method of my controller. But nothing is changed. Why?</p> <p>I set the property using the standard code like</p> <pre><code>self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent; </code></pre>
iphone
[8]
4,126,182
4,126,183
Return None if Dictionary key is not available
<p>I need a way to get a dictionary value if its key exists, or simply return None, if it does not.</p> <p>However, Python returns a key_error if you search for a key that does not exist. I know that I can check for the key, but I am looking for something more explicit. Is there a way to just return None if the key do...
python
[7]
4,094,198
4,094,199
Struggling with pagination implementation
<p>I've partially developed my pagination implementation, but I have an issue.</p> <p>I want the pagination to look like this:</p> <pre><code>Page 3 | Page 4 | Page 5 </code></pre> <p>The middle link in the pagination is the currently selected page. If the page is 0 the currently selected page is the first link. If ...
php
[2]
4,380,438
4,380,439
can different types of objects be put in one array?
<p>Here is the thing, I have several <code>std::map</code>s, like this:</p> <pre><code>std::map&lt;int, std::set&gt; map_1; std::map&lt;int, std::string&gt; map_2; std::map&lt;int, long&gt; map_3; ... </code></pre> <p>And there are also several numbers, each of which relates to one map listed above, like</p> <pre><c...
c++
[6]
1,828,967
1,828,968
Different page titles with one header file?
<p>How do you do multiple page titles with on header file? Theres one thing though. For the index page, i've got</p> <pre><code>error_reporting(0); if ($_GET["error"]=="404") { include("forum/styles/art_air/web_template/overall_header.php"); include("include/404"); include("include/index"); include("...
php
[2]
1,534,677
1,534,678
How to draw path on google map as I am moving?
<p>I am trying to draw path in google map. I am able to draw a path between start point and end point but I want to draw path as I am moving. Please help me to draw path as I am moving on google map.</p> <p>Thanks Monali</p>
android
[4]
4,581,068
4,581,069
Java: Retrieve this for methods above in the stack
<p>How would you get a reference to an executing class several stack frames above the current one? For example, if you have:</p> <pre><code>Class a { foo() { new b().bar(); } } Class b { bar() { ... } } </code></pre> <p> Is there a way to get the value that would be retrieved by usi...
java
[1]
3,332,322
3,332,323
How can you get your code to wait for html() and append() functions to complete?
<p>I'm setting the html of the body element in an iframe to a string str, then I want to access that content on the next line (here just using an alert call to display the content) but the html and append functions haven't completed by the time the alert statement is called.</p> <pre><code>$(function(){ .... $("#notes...
jquery
[5]
2,853,420
2,853,421
How to change password field to diplay asterisks instead of dots
<p>I am working on the task that requires the password field (i.e.the Edit Text) to hide user input using asterisks(*) rather than dots(.). Currently it shows as dots. Kindly tell me the way to do it if its possible using android's native methods. Or please post the code to do it if anyone has already done that.</p> ...
android
[4]
3,043,892
3,043,893
Can the call log be closed programatically-android
<p>My app makes multiple calls programatically but to do that it needs to override / hide/ close the call log that is displayed at the end of one call. Is this possible? Can it be made to work using PhoneStateListener() type of functionalities ?</p>
android
[4]
1,350,552
1,350,553
Python: Automating Emails
<p>Here is what I want to achieve :</p> <p>1) An email should be sent to using <strong>"email address &amp; details"</strong> mentioned in a Google docs/excel file. 2) The email should also pick up some content from a web page .i.e <strong>Title, URL</strong> etc. &amp; include in the email sent. </p> <p>Do let me k...
python
[7]
1,200,718
1,200,719
Initializing inflate state
<p>Initializing inflate state am getting continously this in logcat any one help to figure from where am getting this and how to prevent this?</p>
android
[4]
5,808,094
5,808,095
How to change the Y axis on a Graidle chart
<p>I am using <a href="http://graidle.sourceforge.net/" rel="nofollow">Graidle</a> to drawn a line chart and have found that no matter what the series the Y axis always starts at zero, which makes little sense. I have looked at the documentation but cannot see any way to set what the axis should be.</p> <p>Do anyone k...
php
[2]
1,009,548
1,009,549
ImageView Drag/Select
<p>I'm using this code:</p> <pre><code>public class Card extends ImageView { public Card (Context context) { super (context); } @Override public boolean onTouchEvent(MotionEvent event) { int eventaction = event.getAction(); int X = (int)event.getX(); int Y = (int)event...
android
[4]
1,731,080
1,731,081
In JQuery is there way for slideDown() method to scroll the page down too?
<p>The slideDown applied to a div does the slideDown but doesn't scroll the page down and the div slided down div remains hidden from view. Is there a way to scroll the page down as well so the user can view the div?</p>
jquery
[5]
603,533
603,534
Is it possible to customize UIImagePickerController?
<p>When using UIImagePickerController to browse a folder, I hope to customize UIImagePickerController as below</p> <p>in thumbnails mode, place a customized subview (includes a Label and a button) under each thumbnail.</p> <p>Is it possible?</p> <p>If not, is there any other third party's free or comercial framework...
iphone
[8]
4,487,904
4,487,905
DRYout a class-based chainable API
<p>I have written a chainable API (in a similar style to jQuery) as follows:</p> <pre><code>class ChainableAPI: def show(self): self.visibility = 1 return self def goBlue(self): self.color = 'Blue' return self def die(self): self.life = 0 return self chainableAPI = ChainableAPI() (cha...
python
[7]
4,216,972
4,216,973
adding img in js
<p>I'm using javascript to create an image element like so:</p> <pre><code>var img = document.createElement('img'); </code></pre> <p>What would I do to give this img a width of 100%?</p>
javascript
[3]
188,933
188,934
How to reload the listView on click of a button in android?
<p>I have created a view in which i have 1 list view and 2 buttons. The first button is for deleting the selected list view and the 2nd button is for deleting the deleted the entire data from the table. I want that if I delete the entire data from the table the list view should get refreshed an it should get reloaded. ...
android
[4]
1,132,319
1,132,320
Unique, short filenames for pictures
<p>What would be the best way to rename my user uploaded images to fairly short, yet unique names?</p> <pre><code>uniqid() ? </code></pre>
php
[2]
4,854,486
4,854,487
Deleting records selected by Checkbox
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5752105/delete-values-selected-using-checkbox">Delete values selected using checkbox</a> </p> </blockquote> <p>I want to delete records that has been selected using Checkbox</p> <p>Checkbox code</p> <pre><code...
php
[2]
3,452,576
3,452,577
Help with layouting game scores in android
<p>I am still trying to understand now android layouts work. I am developing an application for displaying soccers results for a brazilian championship. I will have a list view for displaying the last game scores, like the image in the url below (extracted from an iphone aplication).</p> <p><a href="http://grem.io/ima...
android
[4]
4,512,817
4,512,818
Iterating over pattern
<p>Suppose you're dealing with data organized in the following format:</p> <pre><code>[123]="some string" [234]=999999999 [345]="some other string" </code></pre> <p>In Java, what would be the easiest way to split each by KV combination, where K is the tag (enclosed in <code>[ ]</code>).</p> <p>Is there a Utils (Apa...
java
[1]
3,688,854
3,688,855
How to set focus on button if clicked and buttons are made in xml
<p>I have created 3 buttons and i want to change focus of that button which is clicked by user using coding is there any way ?</p> <p>i have seen these links</p> <p><strong><a href="http://stackoverflow.com/questions/9750097/how-can-a-button-get-the-focus">link1</a></strong></p> <p><strong><a href="http://stackoverf...
android
[4]
189,098
189,099
JavaScript Regex question
<p>All,</p> <p>I have following function to check for invalid symbols entered in a text box and return true or false. How can I modify this function to also check for occurrences like http:// and https:// and ftp:// return false if encountered ?</p> <pre><code>function checkURL(textboxval) { return ! (/[&lt;&gt;()...
javascript
[3]
4,093,636
4,093,637
How does php execute a function assigned to variable?
<p>Ok, I didn't really know how to even phrase the question, but let me explain.</p> <p>Suppose I have a variable:</p> <pre><code>$file = dirname(__FILE__); </code></pre> <p>What happens if I assign <code>$file</code> to another variable?</p> <pre><code>$anotherVariable = $file; </code></pre> <p>Does the <code>dir...
php
[2]
5,903,347
5,903,348
Generating an ascending list of numbers of arbitrary length in python
<p>I've been looking at how to do this for a bit and there has to be a fast way, is there a function i can call that returns a list of ascending numbers? ie. function(10) would return [0,1,2,3,4,5,6,7,8,9]? Its probably something I'm overlooking.</p>
python
[7]
2,732,067
2,732,068
My Sales Order in C# not working properly
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4378196/qty-control-in-c">Qty Control in C#</a> </p> </blockquote> <p>I hope the mods don't mind reposting this again. The code below does not work the way it should. When the end user clicks the btQty button th...
c#
[0]
5,932,549
5,932,550
Adding classes to Zend_gateway.php
<pre><code>&lt;?php error_reporting(E_ALL | E_STRICT); //error reporting, not needed require_once "Zend/Amf/Server.php"; //the zendAMF server require_once "process.php"; //our test class $server = new Zend_Amf_Server(); //declare the server $server-&gt;setClass("process"); //load our test-clas...
php
[2]
3,190,418
3,190,419
C# Support for Simultaneous and Editable Languages
<p>I'm currently developing an application that needs the hability to simultaneously show messages in 2 different languages. (Eg:. User salutation would result in the following message to appear at the display: "Welcome to my app" "Bienvenue sur mon application")</p> <p>Disregarding character encoding issues, what ar...
c#
[0]
5,679,595
5,679,596
Is HttpContext.Current Ever Null in a Web Application?
<p>Is HttpContext.Current ever null in a web Application (assuming threads are not being used)? More specifically, would it ever be null in <code>void Application_OnError(object sender, EventArgs e)</code>?</p>
asp.net
[9]
5,705,221
5,705,222
Prime divisors of a number in C++
<p>This is my first question on Stackoverflow, so please excuse me if I'm doing something wrong. :) Can you help me with this code? Thank you! :)</p> <pre><code>#include &lt;iostream&gt; using namespace std; </code></pre> <p>1)</p> <pre><code>int divisor(int a) // function that checks the divisors of a number *) { i...
c++
[6]
5,436,415
5,436,416
prompt in spinner with drop down feature
<p>i have a spinner and i want the spinner to prompt as select class. as we have android:hint property for edit text in android. i dont want the spinner with the dialog box. i want the spinner prompting or hinting before the seletion is made in drop down. is it possible?? please help!!!! thank you</p> <p><img src="h...
android
[4]
800,397
800,398
Two Ajax timer cannot tick simultaneously?
<p>I have two ajax time for my aspx web page but while the one is ticking , the other stops running. How can i make it both timer run together like the windows form?</p>
asp.net
[9]
3,541,834
3,541,835
how to identify the dynamically created UIImageView by tag
<pre><code> if([imageview superview]) { [imageview removeFromSuperview]; [myView addSubview:imageview]; } else if([imageview superview]) { [imageview removeFromSuperview]; [myView addSubview:imageview]; } else if([imageview superview]) { [imageview removeFromSuperview]; [myView addSubview...
iphone
[8]
1,566,131
1,566,132
parse JSON response for javascript
<p>How to parse the following JSON Array using javascript??</p>
javascript
[3]
2,974,559
2,974,560
Release NSObject and stop all method calling
<p>So my menu calls a game with this piece of code:</p> <pre><code>game = [[Game alloc] init]; [self presentModalViewController:memoryTest animated:FALSE]; </code></pre> <p>A UIViewController then appears with a countdown. The player can go back to the menu DURING the countdown. However when I try this, the countdown...
iphone
[8]
3,104,010
3,104,011
How to detect when device has resumed from sleep mode
<p>Is there a way to detect when the android system has resumed from sleep mode, but has not turned on the screen? My service does not need to acquire any wake locks, but does need to know when the device has been woken up by another process.</p>
android
[4]
1,969,141
1,969,142
Function not repeating On Click?
<p>I'm trying to make a small Android game. My on click function however is not getting repeated... It adds one point the first time and then stops working. It looks correct to me.</p> <pre><code>addButton.setOnClickListener(new View.OnClickListener(){ public void onClick(View v) { playerScoreField = (TextView)...
android
[4]
1,583,975
1,583,976
hashtable values reordered
<p>I have a hashtable, which contains strings for example, when I use put method as below </p> <pre><code> hashtable.put("1","A"); hashtable.put("1","B"); hashtable.put("1","C"); hashtable.put("1","D"); hashtable.put("1","E"); </code></pre> <p>Then when I try to print it back it doesn't print in same order, Any o...
java
[1]
2,960,737
2,960,738
c# windows form program starts slow at first time
<p>I made a little windows form using .net2.0, but when first start exe file, the windows form shows up in about 10 seconds late, why is there always delay??</p> <p>does anyone know that? </p>
c#
[0]
1,642,659
1,642,660
concatenating tuple
<p>suppose i have a list </p> <pre><code>a=[1,2,3,4,5] </code></pre> <p>now i want to convert this int a tuple<br> i thought coding something like this will do </p> <pre><code>state=() for i in a: state=state+i </code></pre> <p>and it gave error(well its quite obvious) i am trying to concatinate int wit...
python
[7]
3,657,591
3,657,592
javascript click event queue
<p>I made a simple gallery where when you click on a image thumb nail, it will show the larger image with fade in fade out effect with jquery.</p> <pre><code>$('#thumnail').click(function(){ $('#piccontainer').fadeOut(function(){ $('#piccontainer').html('&lt;div&gt; &lt;img src="' + imgsource + '" /&gt; &lt;/...
javascript
[3]
1,902,060
1,902,061
How to add files recursively to a listbox by selecting a dir in C#
<p>I'm trying to add a list of files to a listbox which follows all sub-directories </p> <p>Currently I am using the following code however it only searches one directory and does not recurse into subdirectories. </p> <pre><code> FolderBrowserDialog odd = new FolderBrowserDialog(); private void button2_Click(objec...
c#
[0]
2,693,752
2,693,753
how to remove dynamically inflated views?
<p>In a simple card game that i want to develop, I have three buttons: button1,button2 and button3. button1 creates two imageviews in a tablerow and displays the image. When button2 and/or button3 is clicked, it dynamically adds imageview on the tablerow through layout inflater. When game is over, I want user to click ...
android
[4]
1,599,943
1,599,944
Android SSLPeerUnVerfiedException
<p>am working https webservice and the certificate is self signed, so import this into my project and create bks file for overriding the error , but still i get SSLPeerUnverfiedException . I had also check with following so question <a href="http://stackoverflow.com/questions/2308774/httpget-with-https-sslpeerunverifie...
android
[4]
4,563,145
4,563,146
I need to flip a div on hover
<p>I am using <a href="http://lab.smashup.it/flip" rel="nofollow">flip</a> plugin of jquery. I would like to flip a card(div), after it finished to flip, immediately to revertFlip it. That's what I tried</p> <pre><code> $("#flipbox").bind("hover",function(){ $(this).flip({ direction:'tb', onEnd: f...
jquery
[5]
3,444,116
3,444,117
Cannot change EditText in onCreateView
<p>I want to reset my textinput everytime my fragment gets invoked.</p> <p>This is the end of my onCreateView-method:</p> <pre><code> txtValue.setText(""); Log.d("debug", "Hello"); txtValue.addTextChangedListener(tx); tx.onTextChanged(txtValue.getText(), 0, 0, 0); InputMethodManager mgr = (...
android
[4]
1,680,157
1,680,158
Help with getParent() downcast
<p>I'm learning android/java and have this example code I can't get to work:</p> <pre><code>OnRatingBarChangeListener l = new OnRatingBarChangeListener() { public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromTouch) { Integer myPos=(Integer)ratingBar.getTag(); RowModel model=getModel(myPo...
android
[4]
4,917,328
4,917,329
Using PHP Tags in eval()
<p>I have a textarea where you can write PHP &amp; HTML (or technically anything else). You can preview your Code in the browser by submitting the form and what I wanna do is <code>eval()</code> the code (and thereby display) it. Now eval doesn't seem to accept PHP-Tags (<code>&lt;?php ?&gt;</code>) in the given st...
php
[2]
1,843,911
1,843,912
Android:How to custom the specific Seekbar like this?
<p>pic: </p> <p><img src="http://i.stack.imgur.com/uPZfG.jpg" alt="enter image description here"></p> <p>How should I do to custom the specific seekbar like the pic?</p> <p>I think the point is:</p> <ol> <li><p>When finger is moving on the seekbar, how to present a suspended view showing the progress.</p></li> <li>...
android
[4]
5,110,372
5,110,373
Why do I get 3 values inserted into my C# combo box instead of just 1?
<p>When reading the registry for file names I get 3 entries loading into my combo box for every 1 registry entry. If I have 1 file listed in the registry I would see :</p> <p>Combo box values:</p> <p>c:\file1.txt</p> <p>&lt;-----Blank here</p> <p>c:\file1.txt</p> <p>I have found the problem lies in this code, it h...
c#
[0]
1,589,790
1,589,791
How can you make a review copy of an Android app?
<p>I've been asked for some review copies of an Android app I've written, which is great, but I'm not willing to give out the full app to just anyone. I want to make a time-limited version (which works for about two weeks, then gives up the ghost).</p> <p>What is the easiest way to do this? I haven't tested this mys...
android
[4]
1,863,379
1,863,380
A pointer greater than zero in c++, what does mean?
<p>I encountered a problem in c++. I read some codes,but there was a very wired usage of pointer. The code is following:</p> <pre><code> double* marginalProbability = new double [10 * sizeof(marginalProbability[0])]; memset( marginalProbability, 0, 10 * sizeof(double) ); //................ //.....
c++
[6]
1,446,554
1,446,555
Not able to run a batch file from a java program
<p>I want to run a batch file from a Java program.</p> <p>This works:</p> <pre><code>runtime.getruntime().exec("cmd /c C:\\test.bat"); //Working </code></pre> <p>It is working very well, but if I give spaces in the path of the batch file, it is not working:</p> <pre><code>runtime.getruntime().exec("cmd /c C:\\Prog...
java
[1]
4,991,893
4,991,894
If constructor is a method, that doesnt return anything why is there no return type as void? C#
<p>In C#, if consturctors are basucally methods that dont return anything, why dont they have a return type as void? since void is a return type that denotes the same that nothing is returned.</p>
c#
[0]
2,185,281
2,185,282
Difference between declaration of function with extern and without it
<p>There is such code:</p> <pre><code>#include &lt;iostream&gt; extern void fun(); int main(){ fun(); return 0; } void fun(){ std::cout &lt;&lt; "Hello" &lt;&lt; std::endl; } </code></pre> <p>Is there some difference between declarations:</p> <pre><code>extern void fun(); void fun(); </code></pre> <p>? C...
c++
[6]
1,074,732
1,074,733
Jquery: calculate value on blur event
<p>I am trying to do some live calculation on my form, please have a look at form...</p> <pre><code>&lt;input type="text" value="0" name="product1" class="num"/&gt; &lt;input type="text" value="0" name="product2" class="num" /&gt; &lt;input type="text" value="0" name="product3" class="num"/&gt; &lt;input type="text" v...
jquery
[5]
5,453,743
5,453,744
How can i get this kind of window?
<p>In eclipse you can detach tabs and they will displayed in a special kind of window.</p> <p>Win7 with aero displays it as follows</p> <p><img src="http://www.oliholz.de/data/1.jpg"/><br></p> <p>How can i produce this frame? i have tried many styles of JFrame,JWindow,JDialog, ...</p>
java
[1]
4,306,433
4,306,434
How to check if given timestamp is 10 minutes old?
<p>I have a variable <code>$t1</code> which has a timestamp in the form <code>2013/04/08T09:00:00Z</code>.</p> <p>How can I compare this with the current time to check if it is 10 minutes old?</p>
php
[2]
1,553,318
1,553,319
query about pdf file
<p>hi How can i append 2nd page of a pdf file to the first page. in my case the page is getting overwritten..plz reply soon</p>
java
[1]
1,432,581
1,432,582
Uncommon shape buttons in ASP.NET
<p><strong>My example image</strong> : <a href="http://imageshack.us/photo/my-images/824/myimager.jpg/" rel="nofollow">http://imageshack.us/photo/my-images/824/myimager.jpg/</a></p> <p>Hi all, i am trying to create a web page which include a part like this image.In image every color area is a button and i will create ...
asp.net
[9]
3,260,051
3,260,052
Define jQuery "eq"
<p>I am having a difficult time wrapping my head around the <a href="http://docs.jquery.com/Core/eq" rel="nofollow">jQuery eq</a>. Can someone explain its use to me? What and how does it index?</p> <p>thanks.</p>
jquery
[5]
26,042
26,043
Get the next character after a certain characters position
<p>I am currently trying to read in a log file that consists of [content]. The message in between the brackets might not necessarily be the same length. </p> <p>I know that the content will start from character position 28 but I then need a way of doing a substring to only get the content upto the next ]. I.e. if I do...
c#
[0]
137,684
137,685
Open resource XML as String or InputString to give it to Xml.parse(...)
<p>I'm working in a little app that needs to parse an XML file. The "parsing part" it's working great, everything goes fine... </p> <p>But I'm having a little problem, I don't know how to open the resource that is under (res/xml/file.xml) to the Xml.parse(STRING, root.getContentHandler()); or Xml.parse (INPUTSTREAM......
android
[4]
5,667,749
5,667,750
how to convert pdf to image in android ? using pdfbox getting error to import java.awt and javax
<p>how to convert pdf to image in android ? using pdfbox getting error to <code>import java.awt</code> and <code>javax</code></p> <pre><code>imageType = BufferedImage.TYPE_INT_ARGB; //need to specifies java.awt String[] formats = ImageIO.getReaderFormatNames(); //need to specifies javax </code></pre>
android
[4]
142,080
142,081
tracking user logins per day
<p>hey guys i'm running a script on my site: as a user logs into my website i write this days date into a text file so i can know at witch days the user was active on my website. the thing is, if a user lets say didn't log out from the site for 2 days or more how can i check if he was on the site on those days? can som...
php
[2]
386,602
386,603
convert time to minute and second
<p>can anyway help me to generate a function in jquery that convert time() to seconds</p> <p>example: 1336333809 = 9 minutes and 23 seconds?</p> <p>like this function i found but whew it's seconds to hour</p> <pre><code>function secondsToTime(secs) { var hours = Math.floor(secs / (60 * 60)); var divisor_for...
javascript
[3]
4,078,892
4,078,893
Save web pages in mht with java
<p>I need a java class to download web pages in mht. I will integrate this in my software. I am looking for something like this (see links), but this two in particular give me some problems:</p> <p><a href="http://www.uplook.cn/blog/6/62956/" rel="nofollow">http://www.uplook.cn/blog/6/62956/</a></p> <p><a href="http:...
java
[1]
1,461,881
1,461,882
Fading all images with Jquery
<p>I am trying to fade out all my images within a table with Jquery.</p> <p>The following seems not to work.Maybe a syntax error?</p> <pre><code>$(function() { $('#myTable img').each(function(index) { $(this).fadeOut('slow', function() { // Animation complete. }); }); }); </code></pre>
jquery
[5]
4,935,422
4,935,423
How do I redirect to different pages from a drop down list in php?
<p>When users come to my home page I want them to select which page they want to go to. So, for instance sports, trivia, etc. from a drop down list. How would I get it to redirect to the specific page that is selected using php? This should be simple but I haven't found the solution by searching google.</p>
php
[2]
800,752
800,753
Starting a new activity inside a thread
<p>I have a question about threads. I'm not sure what is happening here. My understanding is that the progress dialog won't end until the long activity has finished, but that is not what is happening. I want the long activity to start, finish, dismiss the spinner, and then start the new activity with the intent.</p> <...
android
[4]
4,136,732
4,136,733
Android and XML Layout
<p>Is it possible to use Java code to write to the main.xml file? I want to make some changes to the layout but have it based from values received from Java?</p>
android
[4]
3,376,508
3,376,509
Save text file on client machine using javascript
<p>I want to create text file on client machine and then want to write in that file. And while saving that file i want to ask user where he want to save file i.e. want to ask by save dialog box....</p> <p>Thank in advance....</p>
javascript
[3]
3,036,429
3,036,430
How to infer a type in a base class dependant on the inheriting class at runtime without if statements?
<p>I have this little OO problem..</p> <pre><code>abstract class MyAbstractBaseClass { MyHelperClassBase myHelperBaseClass; protected method foo() { //QUESTION....... : when I am here I want to do this... myHelperBaseClass = new MyHelperSubClass(); //OR... myHelperBaseCla...
c#
[0]
2,129,275
2,129,276
Is there a way to get $.ajax's default object
<p>Is it possible to get all the defaults that are associcate with the <code>$.ajax</code> function. </p> <p>So it would return something like this:</p> <pre><code>{ global:true, headers:{}, ifModified:false, type:"GET", url:"the current page url", etc.... }</code></pre>
jquery
[5]
1,934,240
1,934,241
setContentView over and setting ImageView force close
<p>So basically the screen has a GridView with 9 images on it. When one of those images clicks I have it setContentView to open a layout of just an image view so it displays the chosen image. After they are done with that image they will click back and it gets rid of that contentView and displays the GridView again. Th...
android
[4]
5,182,480
5,182,481
I get syntax error and missing type
<pre><code> #include "MyArrayList.h" MyArrayList::MyArrayList() { size = 0; } NODE* MyArrayList::list_create(void *data) { NODE *node; if(!(node=malloc(sizeof(NODE)))) return (NODE*)NULL; node-&gt;data=data; node-&gt;next=NULL; return node; } NODE *MyArrayList::list_add(NODE *node, void *data) { NODE...
c++
[6]
3,749,142
3,749,143
syntax error in query
<p>I am new to programming and is developing a new desktop database applcation in Access, I am trying to insert data into a table. I had two datetime picker and I read the value from it as</p> <pre><code>jobcodedatabean.PaperRecievedate1 = dtpjobcodedate.Value.Date; jobcodedatabean.Shipmenentdate = dtpshipmentdate.Val...
c#
[0]
975,870
975,871
Sharing parameters between setting view and application view
<p>Simple question : I've got an iPhone app with 2 views with each a separated xib files. one view holds the settings of the app one view holds the app using the settings made in previous view.</p> <p>How should I implement the sharing of setup parameters between the 2 views ? should I manage those parameters in the ...
iphone
[8]
583,593
583,594
update statement getting an error
<p>Parse error: </p> <pre><code>syntax error, unexpected T_VARIABLE, expecting ',' or ';' in ds.php on line 6 </code></pre> <p>This is my code</p> <pre><code>include_once("db_conn.php"); $del=$_GET['head1']; $d=$_GET['msg1']; $dl=$_GET['ctdel'] $dl ="y"; mysql_query("UPDATE thirdpartycategorymaster SE...
php
[2]
1,892,315
1,892,316
setTimeout / setInterval mobile browser to calculate cpu efficiency
<p>The cpu efficiency of how to use setTimeout / setInterval to calculate mobile browser?</p> <pre><code>function fn() { var start = new Date(); setInterval(function () { var _s = new Date(); console.info(_s - start); start = _s; }, 1000/60) } fn() </code></pre>
javascript
[3]
5,580,055
5,580,056
How to make admin panel for my files
<p>Let say i've the follow files [index.php / admin.php / access.php]</p> <p><strong>1) File index.php is with login form</strong></p> <pre><code>&lt;form method="post" name="login" id="login" action="check.php"&gt; Username : &lt;input name="loginid" id="loginid" type="text"&gt; Password : &lt;input name="password" ...
php
[2]
910,959
910,960
about mb string and normal string in PHP
<p>How do I know the string is mb string? so we use mb_strlen instead of strlen ?</p>
php
[2]
5,696,005
5,696,006
Get the google import contacts
<p>How to get programatically the Google import contacts in android phone.please help me.Thanks in advance</p>
android
[4]
5,200,920
5,200,921
Wake On Lan using Unicast
<p>I am trying to implement Wake On Lan using unicast. I have the code for broadcast and it is working fine. But I want to make it work using Unicast and I tried a lot but couldn't achieve. </p> <p>Here is the broadcast code.</p> <pre><code>import java.io.*; import java.net.*; public class WakeOnLan { public static...
java
[1]
1,310,335
1,310,336
variable scope of __init__
<p>I just wonder, why variable defined by <code>__init__</code> is not accessible from class? Should its executed during instantiation, so that its accessible from outside?</p> <pre><code>&gt;&gt;&gt; class a: ... data = {} ... &gt;&gt;&gt; a.data {} &gt;&gt;&gt; class a: ... def __init__(self): ... ...
python
[7]
1,188,750
1,188,751
Python Server with multiple Sents
<p>How do i make a Server that sents multiple data (1.st file name, 2nd binary file data)?</p> <p>I only can send 1 data because the client stops the .recv() function only if connection is closed.</p> <p>Sorry i have no idea, i thougt the recieve function does automaticly know when the end is send.</p> <pre><code>""...
python
[7]
3,665,964
3,665,965
Sorting a vector of objects in C++
<p>say I have a class "Information" and it stores the Name and Age of people in a vector.</p> <p>so...</p> <pre><code>class Information { private: int age; string name; //etc, etc... }; </code></pre> <p>How would I sort the vector in either ascending/descending order with respect to age?</p> <p>I believe you use ...
c++
[6]