Unnamed: 0
int64
65
6.03M
Id
int64
66
6.03M
Title
stringlengths
10
191
input
stringlengths
23
4.18k
output
stringclasses
10 values
Tag_Number
stringclasses
10 values
1,892,511
1,892,512
How to make my app support for multiple screen with unique alignment of all elements present on screen?
<p>i am doing a android application that having the table layout and buttons i want to support my app to multiple screens what is the precautions i have to take any help,thanks in advance</p>
android
[4]
2,338,784
2,338,785
Downloading Android source code
<p>I am new to Android. I wanted take a look at the Andriod source and started the download process. I am having a problem in initialising the repo. I am getting a below error:</p> <pre><code>$ repo init -u https://android.googlesource.com/platform/manifest Traceback (most recent call last): File "/bin/repo", line 6...
android
[4]
758,972
758,973
Redefine a method
<p>I have a class A which holds a collection of objects. Every instance of the class fills the collection according a different logic. From time to time I need to update all the collections. I was thinking this could be done maybe if the class has a method that holds the logic for filling the collection and I can set ...
c#
[0]
657,911
657,912
Optimizing the load time of presentModalViewController:
<p>In my NiB, I have several View controllers. When the app launches, all their corresponding ViewDidLoad() calls are called.</p> <p>in ViewControllerA, I have ViewA that contains a UiScrollView with 100 pictures. In initalize these pictures in ViewdidLoad. So on app launch, all pictures are initalized.</p> <p>In my ...
iphone
[8]
3,482,240
3,482,241
Working with Bundles in Android
<p>I have an app containing many functions, of course. On of my functions is returning two variables, one <code>int</code> and one <code>String</code>. I've figured out that the easiest way to return this variables is to put them in a <code>Bundle</code>, e.g like this:</p> <pre><code>private Bundle returnInfo() { ...
android
[4]
1,010,371
1,010,372
threads reagarding notification
<p>I was going through threads and I read that ..The notify() method is used to send a signal to one and only one of the threads that are waiting in that same object's waiting pool. The method notifyAll() works in the same way as notify(), only it sends the signal to all of the threads waiting on the object.</p> <p>No...
java
[1]
704,999
705,000
Alarm Not Working
<p>I write the following code. I declared BroadcastReciever in manifest still it is not working. I am a begginer and stucked for 2 hours. What problems could be here?</p> <pre><code>// My launcher activity public class AlarmMainActivity extends Activity { /** Called when the activity is first created. */ @Over...
android
[4]
3,765,593
3,765,594
I need a correction for my php codings of the following?
<pre><code>&lt;?php $ip = $_SERVER['REMOTE_ADDR']; $isptc = gethostbyaddr($ip); $ispoh = preg_split("/./", $isptc); $xy = count($ispoh); $x = $xy - 1; $y = $xy - 2; $i = $xy - 3; $ispp = $ispoh[$i]; $isp = $ispoh[$y] . "." . $ispoh[$x]; echo"&lt;b&gt;ip: $ip&lt;/b&gt;&lt;br&gt;"; echo"&lt;b&gt;isp: $ispp$isp&lt;/b&gt;"...
php
[2]
3,651,610
3,651,611
time difference count in javascript
<p>Does anyone how can I do a time difference count in Javascript?</p> <p>Example:</p> <p>If I have the following time (24H format)</p> <pre><code>startTime = 0615 endTime = 1530 breakTime = 0030 </code></pre> <p>how can I get the following output?</p> <pre><code>diffB4Break = 7.15 hours afterBreak = 6.45 hours </...
javascript
[3]
2,091,691
2,091,692
Nested C++ class outer members' access
<p>This code does not work (MS VS 2005),</p> <pre><code>b-&gt;funcA(); B::iterator iter; </code></pre> <p>cant access protected members declared in class A.</p> <p>If I remove class D, everything compiles nicely.</p> <p>I wonder if it's just a bug or standard?</p> <pre><code>class A { protected: void funcA() {...
c++
[6]
2,478,278
2,478,279
How to detect whether the phone is in sleep mode in the code?
<p>Is there any way to detect whether an android phone is in sleep mode (screen is black) in the code? I wrote a home screen widget. I don't want the widget gets updated when the screen is black to save the battery consumption.</p> <p>Thanks.</p>
android
[4]
6,029,120
6,029,121
How to convert an array to a double so big array?
<p>I have an element type:</p> <pre><code>public class FieldInfo { public string Label { get; set; } public string Value { get; set; } } </code></pre> <p>And I have an array filled with <code>FieldInfo</code> objects.</p> <pre><code>FieldInfo[] infos = new FieldInfo[] { ...
c#
[0]
4,665,365
4,665,366
how to Typecast File object into InputStream
<p>How to Typecast File object into InputStream.</p> <pre><code>File file=new File("c:\\abc.txt"); </code></pre> <p>Thanks</p>
java
[1]
3,309,280
3,309,281
registered user area package
<p>I want to create a new service which needs a registered user area. I need to customize the fields and look of this rua. I am writing cause I don't want to reinvent the wheel. Is there an opensource php script I can use in a project that simply handles the security issues which I can access with something like: </p> ...
php
[2]
3,897,263
3,897,264
Substitute multiple whitespace with single whitespace in Python
<p>I have this string:</p> <pre><code>mystring = 'Here is some text I wrote ' </code></pre> <p>How can I substituate the double, triple (...) whitespaces to just one whitespace so that I get:</p> <pre><code>mystring = 'Here is some text I wrote' </code></pre> <p>Thanks.</p>
python
[7]
3,720,011
3,720,012
javascript true and true returning false in if statement?
<p>In the plain javascript function. Both the values, min_chk and max_chk are true, but the if function still shows the alert. not able to figure why?</p> <pre><code>function Checkit(m,n){ return m&gt;n; } var min_chk = Checkit(a,X); var max_chk = Checkit(b,Y); if ((min_chk === 'true') &amp;&amp; (max_chk === 'true')...
javascript
[3]
5,664,265
5,664,266
Is it possible to get an xpath element using javascript, without using document.evaluate()?
<p>The reason I wish to do this is because document.evaluate() does not work in IE. Is there an alternative?</p>
javascript
[3]
5,985,882
5,985,883
NSString scanning?
<p>i am having NSString* str = @"1223.2212311"; i want to convert it as 1223.22(after floating point two chars),is it possible through NSString?i have to use NSScanner? any help please?</p>
iphone
[8]
5,490,359
5,490,360
Jquery, Onclick, and Ajax
<p>I have fiddled with this with absolutely no progress or luck. If I take out the .ajax it works fine but with the .ajax nothing fires, not even the random testing alerts. Can you see what I have done wrong with this? I have tried to follow the Jquery doc's. The PHP works. </p> <pre><code>&lt;script type="text/javasc...
jquery
[5]
4,297,699
4,297,700
Why the Allocation of an array with int.MaxValue fails and the allocation of two arrays with the size int.MaxValue / 2 does not?
<p>Why the allocation of a byte array with the size <code>int.MaxValue</code> fails </p> <pre><code> byte[] array1 = new byte[int.MaxValue]; // throws an OutOfMemoryException </code></pre> <p>and the allocation of two arrays with the size <code>int.MaxValue / 2</code> does not?</p> <pre><code> byte[] array2 ...
c#
[0]
2,279,320
2,279,321
Javascript displaying dynamic content
<p>I wanted to display a different message in the same <code>&lt;div&gt;</code> when the user makes a selection from a radio button. It works, but it's not as clean as I'd like. Here's the code:</p> <pre><code>&lt;script type="text/javascript"&gt; function showhide(t) { var target = document.getElementById...
javascript
[3]
1,294,675
1,294,676
Android mediaplayer play a Songs as orderly
<p>I am new to Android. In my app MediaPlayer plays groups of songs in order. The songs are stored in one arraylist and the song names are stored in another arraylist.. </p> <pre><code>for(i=0;i&lt; songarray.sizeof();i++) { mp=MediaPlayer.create(this,(Integer) songarray.get(i)); sname.setText(songname.get(i)); ...
android
[4]
3,224,554
3,224,555
Get all child div values in jquery AJAX response
<p>I need to get all child div values from the AJAX response which contains the following format.</p> <pre><code>var jqxhr = $.post('&lt;%= url_for :action =&gt; :friend_list %&gt;', { id: fid }, function(data){ var stripped_data = $(data).html().trim(); var top_name = $(stripped_data).find('div.t...
jquery
[5]
68,932
68,933
Checking if sys.argv[x] is defined
<p>Dear All What would be the best way to check if a variable was passed along for the script:</p> <pre><code>try: sys.argv[1] except NameError: startingpoint = 'blah' else: startingpoint = sys.argv[1] </code></pre> <p>Thanks!</p>
python
[7]
5,438,379
5,438,380
using jquery to dynamically create div
<p>I am trying to add a background image to a dynamically generated div. When I add the CSS property for the background, like below, it breaks my plugin:</p> <pre><code>$("&lt;div&gt;", { 'class': "iviewer_image_mask", css: "background: url('http://somesite.com/path/to/image.jpg');" }).appendTo(this.container...
jquery
[5]
5,889,010
5,889,011
jQuery fadeTo delay in Webkit browsers
<p>I've implemented what I feel is a rather simple script on my menu. It works in Firefox and IE, but in Chrome and Safari, there is a delay of about a half-second. All it is doing is setting the opacity 60%, and then 100% on hover. Here's the code:</p> <pre><code> $(document).ready(function() { $(".NavMen...
jquery
[5]
5,379,782
5,379,783
How to remove all whitespace and newlines?
<p>Assuming I have a file that contains the following:</p> <p>Assume <code>&lt;tab&gt;</code> is actually a tab and <code>&lt;space&gt;</code> is actually a space. (ignore quotes)</p> <pre><code>" &lt;tab&gt;&lt;tab&gt; &lt;space&gt; &lt;tab&gt; The clothes at the superstore are at a discoun...
python
[7]
2,132,275
2,132,276
java builds with different JDK versions : same artifacts?
<p>here is my scenario:</p> <ul> <li>workstation A : Sun JDK 1.6</li> <li>workstation B : Sun JDK 1.5</li> </ul> <p>I build on A and B with Ant 1.7 </p> <pre><code>&lt;javac srcdir="${foo}" destdir="${bar}" source="1.5" target="1.5"&gt; &lt;include name="**/*.java"/&gt; &lt;exclude name="**/test/**/*.java"/&gt; ...
java
[1]
4,834,455
4,834,456
iOS 5 keyboardWasShown
<p>I add a negative and a period button through the code to the basic numeric keyboard for text fields that accept decimal values. i call this code from the keyboardWasShown method and it seems to add these two keys to the keyboard in iOS 4 series, but does nothing in iOS 5. The code is called and the method is execute...
iphone
[8]
3,803,093
3,803,094
how to hide selection on UITableview?
<p>i want to disable click on particular Cell.it means, <strong>i want not to show highlight color(selection indication) when we touch on particular cell?</strong> any help please?</p>
iphone
[8]
3,234,838
3,234,839
IE8 write during a loop
<p>My cgt prog on www.stonebanks.co.uk displays the output on Opera as the javascript program runs. IE8 appears to have stopped until all the calcs are done then displays the lot.</p> <p>I added a textbox to show progress. It works fine with Opera (I don't need it there), but only writes the progress report when IE8 h...
javascript
[3]
1,535,552
1,535,553
jQuery and reference to js and vsdoc.js files
<p>Within vs.net I need to set references to both js and vsdoc.js files for jQuery. Things work great if the script files are within the project HOWEVER I really want to reference a standard folder on our server i.e. <a href="http://www.domain.com/script/jQuery" rel="nofollow">http://www.domain.com/script/jQuery</a> f...
jquery
[5]
3,967,128
3,967,129
Why getHeight() of a Viewgroup does not change
<p>I have a LinearLayout (ViewGroup). And in my code, I have added a child view (another linear layout) to the LinearLayout. My question is why the LinearLayout 's getHeight() return the SAME value? On the phone, I do see my child linear layout is visible and is displayed correctly. But why the getHeight() does not r...
android
[4]
638,005
638,006
how to use javascript to open only ie window
<p>I want a java script or j query script that opens internet explorer window. with a new page. that page from which we call this script running on any browser.</p>
javascript
[3]
769,862
769,863
open new page in new window in gridview buttonfield
<p>i have gridview in my asp.net page.</p> <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="true" CssClass="Gridview" OnRowCommand="GridView1_RowCommand"&gt; &lt;Columns&gt; &lt;asp:ButtonField Text="VIEW" ButtonType="link" C...
asp.net
[9]
4,548,858
4,548,859
'repo' is not recognized as an internal or external command
<p>whenever i try to execute "$ repo init -u git://git.android-x86.org/manifest.git -b $branch" command on cmd it gives an error that 'repo' is not recognized as an internal or external command, operable program or batch file.</p> <p>how do i fix that problem?</p> <p>for more information go to this site: <a href="htt...
android
[4]
2,786,910
2,786,911
Which jQuery function is there to hide an element by making it transparent?
<p>Which jQuery function is there to hide an element by making it transparent instead of drawing it out (which is provided in <a href="http://api.jquery.com/show/" rel="nofollow">show</a>/<a href="http://api.jquery.com/hide" rel="nofollow">hide</a> jQuery functions).</p>
jquery
[5]
627,970
627,971
flash mode torch not found in motorola fire xt-530
<p>I am trying to create a flash torch app for my motorola fire xt-530. check this code which responds to a toggle button.</p> <pre><code>public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (isChecked) { if (getApplicationContext().getPackageManager().hasSystemFeature( ...
android
[4]
4,581,534
4,581,535
Fix Javascript Value to 0 decimals
<p>I have this script which is working in formatting my currency but now its not fixing my value to 0 decimal places, Im new to javascript so could anybody explain where and hwo I'd do this? Thanks</p> <pre><code>function FormatNumberBy3(num, decpoint, sep) { // check for missing parameters and use defaults if so ...
javascript
[3]
1,332,127
1,332,128
How to activate functionality only in developer mode
<p>I have application with in app billing. I'm using the <a href="https://github.com/robotmedia/AndroidBillingLibrary" rel="nofollow">AndroidBillingLibrary</a> to manage the purchase.</p> <p>I would like to be able to have access to all the buyable option when i run the app in debug mode.</p> <p>Currently when i need...
android
[4]
509,805
509,806
updating the gridview with the button on the same gridview
<p>I want to develop a book store Application in Asp.Net. For that one of my page contains a text box and search button, if you write some book name and search for it , it will show result(title,author,no.of copies,button"add to cart") in gridview , i have button on each row as Add to cart. if we click on it ,it will ...
c#
[0]
1,237,592
1,237,593
Mixing inline attributes with an attribute object
<p>I should get 3 images here but I get 2. The last one fails:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $().ready(function() { var img = $('&...
jquery
[5]
5,692,702
5,692,703
android Not allowed to load local resource:file:///android_asset
<p>i come across a strange issue that when load html page from server, in the page contains a script that links to android sdcard js file. and it fails.</p> <p>code like below :</p> <p>java part code :</p> <pre><code>String url ="http://192.168.84.86:8080/test/maw/js_load_test.html"; this.loadUrl(url); </code></pre>...
android
[4]
4,624,906
4,624,907
Check if all List Items have the same member value in C#
<p>I'm searching for a simple and fast way to check if all my Listitems have the same value for a member.</p> <pre><code>foreach (Item item in MyList) { Item.MyMember = &lt;like all other&gt;; } </code></pre> <p><strong>EDIT:</strong> I forgot one thing: If one of this members (its a string) is String.Empty and a...
c#
[0]
2,859,435
2,859,436
printf function in PHP
<p>I'm from a C background and understand basics of printf function. </p> <p>I came across the follwing code </p> <pre><code>&lt;?php printf('%4$d %2$s code for %3$3.2f %1$s', "hours", "coders", 9, 99); ?&gt; </code></pre> <p>which prints:</p> <pre><code>99 coders code for 9.00 hours </code></pre> <p>Can anyone he...
php
[2]
773,417
773,418
is it possible to use html code in android?
<p>i would like to add a widget that i found from a website into my android app.is that possible?this is the code,as i get it from the site:</p> <pre><code>&lt;iframe src="http://www.mykosmos.gr/loc_mk/wforecast_widget.asp?city_code=0032&amp;bcolor=F0F0F0&amp;fcolor=000000&amp;font=Trebuchet MS&amp;pos=hor" frameborde...
android
[4]
2,991,952
2,991,953
segmentation fault in while loop
<p>I have a program takes inputs from 2 files in c++. Then identify Is the second input file is topological sort? but somehow if i use the list.empty() in a while loop statement, it gives me a segmentation fault, but the for loop doesnt give me any error; however, the for loop only loop once, since i might need to go t...
c++
[6]
143,698
143,699
Android: extending PhoneBase?
<p>I know it is possible to use TelephonyManager to get information like: service state, device ID, Sim Operator, etc... Is it possible to edit some of this information?</p> <p>Couldn't find .set() functions on Android.com documentation but I've found the <a href="http://www.netmite.com/android/mydroid/frameworks/base...
android
[4]
4,758,943
4,758,944
fstream's getline() works for a little bit...and then breaks
<p>I have a text file with a bunch of numbers separated by newlines, like this: 123.25 95.12 114.12 etc...</p> <p>The problem is, when my program reads it, it only copies the number to the array up to the second number and then fills the rest of the elements with zeroes. I've tried using delimiters and ignore stateme...
c++
[6]
4,342,105
4,342,106
How can I get exception code in C#?
<p>Is there anything like exception code? that i can know that on different languages operation system i can recognize the same exception?</p> <p>I need to recognize 'Acces to the COMn Port is denied' and then do some action, is that possible? has this exception any specified type?</p>
c#
[0]
4,146,151
4,146,152
The correct way to modify an object that is being passed as a parameter into the modifying class
<p>What is the best way of the following 2 suggestions to modify a property on an object that is being modified by a class that accepts the object as a parameter?</p> <ol> <li>Have the class work on the object and a return a value which you then assign to the object</li> </ol> <p>or.</p> <ol> <li>Pass the object in ...
c#
[0]
193,615
193,616
Jquery's appendTo causes script blocks to be executed again
<p>If I use <strong>appendTo</strong> to move parts of the DOM tree around script blocks being moved are rerun, i.e. they run twice.</p> <p>Example: <a href="http://jsfiddle.net/EHDqE/" rel="nofollow">http://jsfiddle.net/EHDqE/</a></p> <p>Is there a better way to move DOM sections around without script blocks within ...
jquery
[5]
4,519,177
4,519,178
How do I make my program take 5 float values from a user and sort them in increasing order?
<p>What I exactly want my program to do is ask user to enter 5 values, output those 5 values to the screen, sort them from lowest to highest and output the sorted order to the screen. I have the following code: </p> <pre><code>void sort(float[], int); int main() { const int SIZE = 5; float a[SIZE]; cout...
c++
[6]
3,215,886
3,215,887
Private Set or Private member?
<p>I was wondering what's considered the C# best practice, private/protected members with public getters, or public getters with private/protected setters?</p> <pre><code> public int PublicGetPrivateSetter { get; private set; } </code></pre> <hr> <pre><code> privat...
c#
[0]
4,048,045
4,048,046
jquery append on muliply array
<p>this my code with in a array i supposed to make tree menu in a table</p> <pre><code>$myqueryPO-&gt;magGrp = array("[grp] =&gt; MAIN, [grp] =&gt; P1, [grp] =&gt; P3") foreach ( $myqueryPO-&gt;magGrp as $dataArray) { $myGroup = $dataArray[] = $dataArray['grp']; &lt;tr class="'.$myGroup.'"&gt; &lt;td&gt;&...
jquery
[5]
346,014
346,015
Get Cookie information of a url (when browsed)and display it on another aspx page
<p>I have a url which is when clicked and browsed,we set some lead capture cookie value.Now for this url,i want to get all the lead capture cookies and their values and display it on another aspx page in a tabular form,so as to get the information of all leads collected.How can i do this,Any help.</p>
asp.net
[9]
1,020,353
1,020,354
How do I make this only print the last value?
<p>I have the fallowing code to encrypt a massage:</p> <pre><code>massage= raw_input("Enter message to be encrypted: ") spec = chr(0b1010101) key = ord(spec) encrypt = "" for i in range(0, len(massage)): encrypt = encrypt + chr(ord(massage[i]) ^ key) print encrypt </code></pre> <p>say I give "yo...
python
[7]
4,474,013
4,474,014
how to get the Locale list in en_<COUNTRY> format
<p>I want to return a list of all the countries in <code>&lt;lang&gt;_&lt;Country&gt;</code> format where <code>&lt;lang&gt;</code> should be english, So I need a list like en_GB,en_US,en_JP etc. Looking at the Locale's api is returning <code>&lt;lang&gt;_&lt;Country&gt;</code> but it is not restricting it to language ...
java
[1]
6,019,777
6,019,778
Radio Buttons with javascript
<p>I have the following coded radio buttons, which retrieve value(s) in the code below. Is it possible to create hyperlink references from these retrieved values e.g., google.com and/or yahoo.com for the selected radio buttons?</p> <pre><code>&lt;script language="javascript"&gt; &lt;!-- function RadioCheck() { va...
javascript
[3]
1,041,339
1,041,340
jquery: strange behavior with contextmenu
<pre><code>$("b").bind("contextmenu",function(e){ thiselementselected = e.target $("#add").bind("click",function(e){ thiselementselected.css("font-color", "red"); return false }); $("#remove").bind("click",function(e){ thiselementselected.css("font-color", ""); return false }); return false }); </code></pre> <p>whe...
jquery
[5]
1,360,629
1,360,630
checking for some extension and it's not working
<p>So i have the following problem, this is not working:</p> <pre><code>if any(x in pageName for x in ('.jpg','.gif','.txt','pdf','.msi','print' '.ppt','.pptx','javascript:', '.xls','#','.xlsx','.doc', 'ftp' '.doc...
python
[7]
817,995
817,996
Using Mediaplayer to replay the same file
<p>Im hoping you can provide some guidance. I created a 'final' instance of a mediaplayer (mp1) and on a button click it plays a mp3 file. I then need to stop the file when I click a second button. This works fine until I try to play the file again - nothing happens. I think that because the mp1 instance is 'final', wh...
android
[4]
5,178,968
5,178,969
From month to month and year
<p>For example, I have the month 13 and I want to convert it to 1 year and 1 month with php. 26 - 2 years and 2 months. How to "convert" it?</p>
php
[2]
3,908,670
3,908,671
Android - Rotate image around center point?
<p>How can I rotate a bitmap (not a view or canvas) around its center point when the user touches it and drags it?</p> <p>I have tried loads of examples on stack overflow and none appear to work.</p> <p>So far I have:</p> <pre><code>double r = Math.atan2(posX - dial.getWidth() / 2, dial.getHeight() / 2 - posY); rota...
android
[4]
5,021,242
5,021,243
Can I change the temp folder path?
<p>I have an asp.net app that uses <code>System.IO.Path.GetTempFileName()</code> for temporary files. In the production IIS environment (W2K3), the temp folder (<code>System.IO.Path.GetTempPath()</code>) points to <code>C:\Windows\Temp</code>. But on my XP dev machine it's <code>C:\documents and settings\machinename\...
asp.net
[9]
1,947,966
1,947,967
Is there a way for my PHP code to be reviewed?
<p>I am new to the world of coding as well as PHP. As I am looking at putting together a minor web application for a small client, how do I get my code reviewed without giving away what the client considers to be private to them so that I know my code is well-written, adheres to standards and is secure?</p>
php
[2]
5,894,492
5,894,493
android programming question
<pre><code>dy_path = Environment.getExternalStorageDirectory() + "\5.jpg"; </code></pre> <p>Instead of that i want how to give dynamic path automatically picture saved based on current time.</p> <p>I am new to Android. Plz answer my question</p>
android
[4]
2,662,851
2,662,852
where to import the jquery.js file
<p>I was wondering where I should write the <code>&lt;script src="jquery.js"&gt;&lt;/script&gt;</code> in a php project. I wrote it in the main file menu.phpm in the head and I then include this file in other files but if I do that the jquery functions I use don't work in the other files while if I add again <code>&lt;...
jquery
[5]
2,553,095
2,553,096
jquery Have same div show on multiple hovers
<p>I have several divs of the same class that I want to show the same div whenever any of them are hovered over. I only want to create this second div once. I have tried creating it within the document and then cloning and appending it whenever I need it. This isn't working. In the example below, I main_item is the cla...
jquery
[5]
48,823
48,824
access android global setting via code
<p>i am working on a simple home launcher, but a cant find a way to access global android setting like wireless,application etc, i've alredy read <a href="http://developer.android.com/reference/android/provider/Settings.System.html" rel="nofollow">http://developer.android.com/reference/android/provider/Settings.System....
android
[4]
2,115,807
2,115,808
show linux process [Python]
<p>Guy how i can read all process work in my computer and print it</p> <p>i want process read then print ?</p>
python
[7]
718,855
718,856
How do I insert a new div before the last div using jQuery?
<pre><code>&lt;div id="one"&gt;test test&lt;/div&gt; &lt;div id="two"&gt;test test&lt;/div&gt; &lt;div id="three"&gt;test test&lt;/div&gt; &lt;div id="four"&gt;test test&lt;/div&gt; &lt;div id="five"&gt;test test&lt;/div&gt; </code></pre> <p>If I want to insert a div dynamically with jQuery in between divs "four" and ...
jquery
[5]
882,151
882,152
Converting from Structured English to Python
<p>It is easy, yes. But I'm stuck on a line which doesn't seem to work for what it should do. The structured English line is:</p> <pre><code>FOR NoOfGamesPlayed &lt;- 1 TO NoOfGamesInMatch Do </code></pre> <p>I know this should be a for loop but can't seem to make a valid one. Any help?</p> <p>This needs to be conve...
python
[7]
5,364,041
5,364,042
Test for empty nested array
<p>I have the following array:</p> <pre><code>array(4) { [29] =&gt; NULL [31] =&gt; NULL [33] =&gt; NULL [35] =&gt; NULL } </code></pre> <p>I would like to test all keys if all keys contain NULL values. </p>
php
[2]
4,045,883
4,045,884
Why are exceptions named checked and unchecked?
<p>Why is the two exception types in Java named "checked" and "unchecked"? What is the reason behind those names?</p>
java
[1]
2,586,235
2,586,236
how to post secure data via iPhone?
<p>For example, I want to sent information like credit card number, password etc so what's the best way to do the same?</p>
iphone
[8]
5,534,620
5,534,621
stand alone application unable to connect to database
<p>We have a web based application which has web services (say user.asmx) which communicate with application database using generic credentials. In order to provide access to a user, we have an automation tool which uses the above web services and uses same credentials (as web application is using) and insert/update re...
asp.net
[9]
4,271,856
4,271,857
jquery curvy corners not working in IE
<p>I have jquery cury corners working great in firefox, this includes on a div and table. The div content is empty, but has a height and width vaule...this causes problems in IE as only the top of the div tag is cornerd, the table isnt at all.</p> <pre><code> &lt;div id="content" class="content"&gt; &lt;table id="...
jquery
[5]
1,172,671
1,172,672
interface variables are final and static by default and methods are public and abstract
<p>The question is why it's been decided to have variable as final and static and methods as public and abstract by default.</p> <p>Is there any particular reason for making them implicit,variable as final and static and methods as public and abstract.</p> <p>Why they are not allowing static method but allowing stati...
java
[1]
3,875,222
3,875,223
NSString to NSArray
<p>i get the following value as a string format.</p> <pre><code> getcommands=( { "created_time" = "2011-01-18T10:44:14+0000"; from = { id = 100001511725982; name = "ABC Welcomes U"; }; id = "100001511725982_158433587542247_1658635"; message = Nice; }, { "creat...
iphone
[8]
2,808,217
2,808,218
Python: "TypeError: __str__ returned non-string" but still prints to output?
<p>I have this piece of code which creates a new note..WHen I try to print I get the following error even though it prints the output</p> <pre><code>Error: C:\Python27\Basics\OOP\formytesting&gt;python notebook.py Memo=This is my first memo, Tag=example Traceback (most recent call last): File "notebook.py", line 14,...
python
[7]
2,391,141
2,391,142
Can I make "not original looking" buttons for Android in Eclipse?
<p>I think, e.g. Curved buttons, or a circle button. If I can how? </p>
android
[4]
5,747,648
5,747,649
Better way to get Page Name
<p>I'm using this to get the current page name..so this returns for example MyPage.aspx</p> <pre><code>public string GetCurrentPageName() { string urlPath = Request.Url.AbsolutePath; FileInfo fileInfo = new FileInfo(urlPath); string pageName = fileInfo.Name; return pageName; } </code></pre> <p>There h...
asp.net
[9]
4,303,551
4,303,552
Email or Database?
<p>I`m making a site where users have to sign up. They will be contacted later once the site is ready.</p> <p>Right now, I have a simple plugin that creates a form and sends me the contact info via email of anyone who signs up. </p> <p>Is this a stupid plan? Should I have a form that submits the information to a data...
php
[2]
4,620,255
4,620,256
Android XML Composite View
<p>I'm new to Android development, and am having a tough time working something out. I want to make a composite view (called SkillDiceGroup) of a TextView, EditText, and SkillDiceButton (which is an extension of the Button class). I have it working when declaring my SkillDiceGroup as pure code, and putting this in my X...
android
[4]
2,113,364
2,113,365
Best Way to Avoid Errors due to Settings/Configuration BEFORE Runtime
<p>A common problem is that programs may compile ok, but external (user/environment) settings may cause applications to crash during runtime.</p> <p>Aside from performing checks all over the code, (alas actually performed during Runtime), I would like to have rule sets to assert <strong>during build</strong> that, at...
c#
[0]
2,736,909
2,736,910
Java simplify the syntax
<p>What would be the most terse way in Java to check for the following condition </p> <pre><code>int m, n; </code></pre> <p>The condition to check is whether either m or n are negative but both shouldn't be negative. I'm looking for a terse yet simple syntax</p>
java
[1]
4,438,576
4,438,577
Can't put hyperlink in PHP echo statement
<p>In the code below I'm adding <code>&lt;a href=\"member.php\"&gt;&lt;/a&gt;</code> in the echo statement. But, I'm getting a syntax error when I add any hyperlink in my PHP. Is there something I'm missing here? Thank you.</p> <pre><code>if ($username==$dbusername &amp;&amp; $password==$dbpassword) ...
php
[2]
3,582,731
3,582,732
Error with methods and while loop in java
<p>I have problem with "compareMethod" and with the while loop, so if anyone has any idead how to help me i would be grateful thank you. I am using Eclipse as an Ide.</p> <p>I want to enter three values and then to print the smallest one.</p> <p>Here is my code:</p> <pre><code>import java.util.Scanner; public class...
java
[1]
1,291,250
1,291,251
Why the use of cin,cout or %I64d is preferred over %lld specifier in C++?
<p>Why many of the Online Judges advises "do not use the %lld specifier to read or write 64-bit integers in С++. It is preferred to use the cin, cout streams or the %I64d specifier." ? </p>
c++
[6]
3,273,932
3,273,933
How can I solve a PHP syntax error that I receive when parsing html code?
<p>Trying to print out some html forms but I get a parsing syntax error. I believe it gets stuck on the SERVER[PHP_SELF] but I'm not sure. How can I get this to echo correctly?</p> <p>Error occurs on the SERVER[PHP_SELF] line</p> <p>Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING...
php
[2]
645,752
645,753
Cannot convert from View to Button
<p>Very frustrating problem I have here. I have this code:</p> <pre><code>Button b = findViewById(android.R.id.button1); </code></pre> <p>And I'm getting this error on it:</p> <blockquote> <p>Type mismatch: cannot convert form View to Button</p> </blockquote> <p>But button1 <strong>is</strong> a button!! In my XM...
android
[4]
2,251,436
2,251,437
In PHP, how do we return a large array?
<p>Say if this is the code:</p> <pre><code>function bar() { $result = array(); for ($i = 0; $i &lt; 1000; $i++) { $result[] = $i * 10; } return $result; } $ha = bar(); print_r($ha); </code></pre> <p>Is it not efficient to return a large array like that since it is "return by value"? (say if i...
php
[2]
5,080,536
5,080,537
asp.net controls for MAP based Applications
<p>I am new to stackoverflow, I am creating an .net web map applications similar to google maps. But my 1st requirement is to create my own map. please suggest tools to create shapefiles,index files and dbfiles.</p> <p>2nd requirement is that i need to know controls in asp.net for implementing it.</p> <p>I have a jpg...
asp.net
[9]
4,482,255
4,482,256
Can't be resolved to a type
<p>I have a service interface that reads thus</p> <pre><code>package services; import domain.Items; public interface IItemsService extends IService { public final String NAME = "IItemsService"; /** Places items into the database */ public void storeItem(Items items); /** Retrieves items from the database * ...
java
[1]
1,034,701
1,034,702
Passing String array between two class in android application
<p>I am new to android. i dont know how to pass string array between two class. I tried Intent, by sharing string array between the class, but i get only one string, the rest of the string will not displayed. Some of my friend said, using Bundle we can access string array between the class, but i dont know how to use t...
android
[4]
1,628,438
1,628,439
What is a pseudo-virtual function in C++?
<p>What is a pseudo-virtual function in C++?</p>
c++
[6]
959,866
959,867
setting the datetime in jquery datetime picker with database datetime
<p>i am developing a multi language site.My problem is i need to set the date and time in the datepicker from the database as the user may have choose the different timezone while registering in the site.At present i am getting the server time on my jquery datepicker.</p> <p>Thanks in advance.</p> <p>Technology used:...
jquery
[5]
784,747
784,748
CompleteWizardStep not working as should be - Why?
<p>I am trying to create a website which will allow users to register, log in, change password, etc.</p> <p>Currently i am creating the register process, and i am doing this by using a custom CreateUserWizard in order to avoid the default buttons that it inserts. I have successfully created the custom CreateUserWizard...
asp.net
[9]
5,401,635
5,401,636
Need Excel writer for php4
<p>can anyone tell me where to find an <strong>"excel writer"</strong> which supports <strong>"PHP4"</strong> . I have been searching on the web from the past few days and all I can get is Excel writer which supports PHP5 . </p> <p><strong>We need an excel writer which supports PHP4 as it is one of our clients require...
php
[2]