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
3,686,628
3,686,629
javascript-Detect double tap on ipad or iphone screen
<p>I'd like to detect if a user has double tapped on an ipad or iphone. Does a javascript-event exist that would provide this functionality?</p> <p>Thanks in advance,</p> <p>enne</p>
javascript
[3]
2,757,115
2,757,116
Detecting computer/program shutdown in Python?
<p>I have a Python script that runs in a loop regularly making adjustments to my lighting system. When I shut down my computer, I'd like my script to detect that, and turn off the lights altogether.</p> <p>How do I detect my computer beginning to shut down in Python?</p> <p>Or, assuming Windows sends Python a "time ...
python
[7]
2,527,695
2,527,696
Add/delete controls on button click
<p>I am new to android development. I am working on a sample application. I need to add a button with context menu, edit text and delete button for each click of a button. and delete all when I click on delete button for adding contact. I have searched a lot and still didn't get any idea. Please help me.</p>
android
[4]
1,026,260
1,026,261
jquery faq for table
<p>when i pressed a link all the td's are shown. how can i hide and show each td when pressed?</p> <pre><code> &lt;head&gt; &lt;style type="text/css"&gt; .details{display:none;} &lt;/style&gt; &lt;script type="text/javascript"&gt; $().ready(function() { $('a.buy').click(function() { $('.details').slide...
jquery
[5]
1,377,111
1,377,112
how to delete row from tableview without using editmode?
<p>hi to all i am new to iphone,in tableview displayed data access from database and provide delete data option when button clicked,my problem is when i clicked that button data delete from database at that time row is not delete from tableview after rerun the program deleteed data don't display it worked correctly but...
iphone
[8]
5,447,230
5,447,231
Remapping key names in a list of dictionaries
<p>What is a pythonic way to remap each dictionary key in a list of identically-keyed dictionaries to different key names? E.g., </p> <pre><code>[{'type_id': 6, 'type_name': 'Type 1'}, {'type_id': 12, 'type_name': 'Type 2'}] </code></pre> <p>must transform into</p> <pre><code>[{'type': 6, 'name': 'Type 1'}, {'type'...
python
[7]
4,851,686
4,851,687
Video frame capture
<p>Is it possible to capture a frame from a video in android and save it or use it in any way in the application?</p>
android
[4]
363,236
363,237
PHP Temporarily Banning An IP
<p>I'm creating a contact form for my company and I want to make it as spam-proof as possible. I've created a honey pot + session checking, but I also want to make it so that it's only possible to submit the form once every x minutes. In other words, banning the IP from using the form for x amount of time.</p> <p>What...
php
[2]
3,741,660
3,741,661
Android get Image source from an https url?
<p>i am trying to get an image from a https url but it doesnt seem to display and get the image correctly but works fine on my computer browser.</p> <p>i have tested out a http url pointing to a different image and it works fine.</p> <p>my code is below:</p> <pre><code>public Bitmap getContactPhoto(String url) { ...
android
[4]
4,946,327
4,946,328
stack view - explanation
<p>I'm developing something with the ffmpeg lib and x264. Actually, I'm debugging x264 lib for Windows.</p> <p>Debug version doesn't work good. It creates video with gray frames. The same release build crashes. What you see below is the stack view from the Eclipse - Indigo. I didn't strip the simbols... But, I have to...
c++
[6]
2,394,443
2,394,444
Javascript - Why is alert() ignored in my program
<p>I'm just learning javascript using a book and they give this example:</p> <pre><code>&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt; &lt;html xmlns=”http://www.w3.org/1999/xhtml”&gt; &lt;body&gt; &lt;script language=”JavaScript” type=”t...
javascript
[3]
2,144,939
2,144,940
Append to the python's dictionary key:value
<p>I have a question about the dictionary in python, in the reference page: <a href="http://docs.python.org/tutorial/datastructures.html#dictionaries" rel="nofollow">http://docs.python.org/tutorial/datastructures.html#dictionaries</a> . </p> <blockquote> <p>"You can’t use lists as keys, since lists can be modified i...
python
[7]
965,658
965,659
Getting a value from a different class
<p>I have a main class named <code>main.java</code> and 3 classes in a package <code>f.java</code>, <code>graphics.java</code> and <code>image.java</code></p> <p>I have a private int R in f.java, with <code>setR()</code> and <code>getR()</code> there</p> <p>Now i need to get that value (from getR()) in <code>graphics...
java
[1]
3,154,910
3,154,911
Compiling and Executing Java Remotely
<p>In my company I have many guys who want to learn Java. They don't have the admin rights to install anything. They don't even have the JRE.</p> <p>Is it possible for them to compile and execute their Java programs from a PC which has the JDK and JRE?</p> <p>Thanks a bunch in advance!</p>
java
[1]
554,988
554,989
Array count Should be Show in table view
<p>i want show my NSMutableArray Count in a UILabel ,,,,,,,,,,</p> <p>can any one help me</p>
iphone
[8]
3,250,579
3,250,580
JQuery .html vs .attr('innerHTML')
<p>If i am setting the contents of a DIV element in my dom:</p> <pre><code>$("#myE").html(contents); </code></pre> <p>Is there ANY difference at all between the above and:</p> <pre><code>$("#myE").attr('innerHTML', contents); </code></pre> <p>? Thanks!</p>
jquery
[5]
722,673
722,674
How Awful is My Decorator?
<p>I recently created a @sequenceable decorator, that can be applied to any function that takes one argument, and causes it to automatically be applicable to any sequence. This is the code (Python 2.5):</p> <pre><code>def sequenceable(func): def newfunc(arg): if hasattr(arg, '__iter__'): if isi...
python
[7]
1,431,834
1,431,835
Set Focus at end of text in textbox
<p>Hey, Is it possible with easy options in ASP.NET to set the focus at end of text in a textbox-element ? Without JavaScript ?</p>
asp.net
[9]
2,615,344
2,615,345
Coud I pass a StringIO object as a "file" argument to a Linux command line?
<p>Some commands on Linux receive a file as an argument. (cat, grep, sed, awk,...) How can i pass a StringIO object as a "file" argument? (because i don't want to write it to file on disk, then explicitly pass to these commands) Or i need other kind of "in-memory file" object?</p> <p>Thanks you!</p>
python
[7]
5,062,207
5,062,208
Why are instance methods defined in the prototype but instance fields are defined in the constructor?
<p>When doing inheritance in JavaScript, the pattern that I always see defines instance methods in the prototype, but instance fields in the constructor (see example below). What is the motivation for this? Why not be consistent and define both in the prototype?</p> <pre><code>function MyClass() { this.myField = 0...
javascript
[3]
1,381,513
1,381,514
Issue with textfields and scrollview
<p>I am observing a weird behavior in my app: My app contains multiple textfields in a scrollview. Now when I click on one textfield to modify it, my "textFieldDidBeginEditing" is called and if I click on Return key of my keyboard "textFieldDidEndEditing" is called and during these operations I am getting my full view ...
iphone
[8]
783,538
783,539
How to get the particular values in php form using get method
<pre><code>&lt;i&gt;function myFunction() { var name=document.myform.name.value; var color=document.myform.color.value; var made=document.myform.made.value; // alert('example.com/search.php?name='+name+'&amp;color='+color+'&amp;made='+made); alert('http://www.example.com/search.php?name='+name+'&amp;col...
php
[2]
2,680,501
2,680,502
Difference between if statement ways...?
<p>I am trying to use the shorthand notation for an if statement to shorten the following:</p> <pre><code>if (DCC.systemFlags[1]) { sf0CheckBox.Checked = true; } else { sf0CheckBox.Checked = false; } </code></pre> <p>And to use the following instead:</p> <pre><code>DCC.systemFlags[1] ? sf1CheckBox.Checked = true : s...
c#
[0]
2,557,282
2,557,283
execute addObject, but NSMutableArray has no object
<p>I try to use to codes below to add object to <code>NSMutableArray</code></p> <pre><code>NSMutableArray* multipartData; - (void)processDataChunk:(NSData *)postDataChunk { if (!postHeaderOK) { UInt16 separatorBytes = 0x0A0D; NSData* separatorData = [NSData dataWithBytes:&amp;separatorBytes len...
iphone
[8]
1,936,266
1,936,267
Javascript hex_md5 pin number
<p>I have the following script which ask's for a pin number, it is encrypted as md5, but when i type in any value it validates, it should only do it for 1234 or 4321,i have to run 2 different if statements as im getting the pin number from the database and using a PHP foreach statement to echo them out.</p> <pre><code...
javascript
[3]
732,268
732,269
Need to display streaming video occupying the fullscreen
<p>I am using <strong>VideoView component for streaming video in Android</strong> , but the streaming video is <strong>occupying only a part of the screen of the mobile device both in portrait/landscape mode</strong>.</p> <p>Kindly provide the code to so that the <strong>streaming video is displayed covering the full ...
android
[4]
487,580
487,581
Need to show and hide a div by clicking the same button in jquery
<p>I'm new at query and this is probably really simple : ) Right now it's setup to show a popup div when you click on the details button, which works fine. Now I'm trying to figure out how I can hide that popup div if the user clicks again on that same details button. Any help would be appreciated!</p> <pre><code> ...
jquery
[5]
323,835
323,836
Ways to improve foll. Java code
<p>Any ways to improve the foll. code block :</p> <pre><code>public class MyUnits { public static String MILLSECONDS = "milliseconds"; public static String SECONDS = "seconds"; public static String MINUTES = "minutes"; public static String HOURS = "hours"; public int quantity; public String un...
java
[1]
1,500,786
1,500,787
Is there a simple way to generate a un-duplicate string?
<p>I know I can use GUID to generate a unique string, but it's too long. Now I only need generate un-duplicate string within an website, how can I do? Thanks!</p> <p>For example: In the website <a href="http://mathurl.com/" rel="nofollow">http://mathurl.com/</a>, you can generate a permanent URL, such as <a href="htt...
asp.net
[9]
140,462
140,463
C# storing updated values in datatable so that it can also be stored in datagridview
<p>How to update datatable values through datagridview which will be stored in excel sheet... so that the changes will updated in datagridview when loading excel file next time</p>
c#
[0]
5,068,202
5,068,203
Implementation of the board in an Android board game
<ol> <li>How can I implement a board for a board game on Android, with the board having clickable cells and movable pieces in it? </li> <li>Can I use map editors like TiLed? How?</li> </ol>
android
[4]
4,468,205
4,468,206
Is there a more pythonic way of storing parameters so they can be used in a function call?
<p>I'm currently writing a small script using pygame, but I don't believe this question to be related strictly to pygame.</p> <p>I have a class that holds a dictionary of function parameters contained in tuples:</p> <pre><code>self.stim = {1:(firstParam, secondparam, thirdparam), 2:(firstParam2, secondpar...
python
[7]
5,791,683
5,791,684
How to pass a dynamic number of arguments to a function?
<p>I have a dictionary that could have a varying number of keys. The value of the keys is a list of numbers. I want to compare each of these lists and get the list that is the maximum of all of the items in the list.</p> <p>built in max() function will give me the maximum of all the items if I passed it in the way bel...
python
[7]
5,251,052
5,251,053
Eclipse's Android 'hover assist' not always working
<p>I apologise if if 'hover assist' isn't the right terminology but I'm referring to the feature in Eclipse where if the use hovers the pointer over a method, a popup box appears with javadoc type information and invites the user to press F2 for focus. I see inconsistent behaviour for different methods, in that sometim...
android
[4]
3,389,743
3,389,744
Android issue: how to turn webview to an other Activity by js code
<p>I have a problem. In my webview, there is a html file. A button binds with js code to trigger the java code.</p> <pre><code>&lt;img src="start.png" id="pic1" onClick="window.intent.clickOnAndroid()"/&gt; </code></pre> <p>In my java file.</p> <pre><code>webview.addJavascriptInterface(new Object(){ publ...
android
[4]
5,618,714
5,618,715
c# easiest way to extract substring
<p>i have a string:</p> <pre><code>string somestring = "\\\\Tecan1\\tecan #1 output\\15939-E.ESY" </code></pre> <p>i need to extract <code>15939</code></p> <p>it will always be a 5 digit number, always preceeded by '\' and it will always "-" after it</p>
c#
[0]
2,277,713
2,277,714
what is appvars.php?
<p>I was writing some php code with a couple friends of mine a while back. I decided to look at some of the code we had written and noticed that almost all the php documents had the line: <code>require_once('appvars.php');</code> at the top. I know that this isn't a built in php file, but one that they had created. ...
php
[2]
988,086
988,087
options[Text] is null or not an object in javascript
<p>I am getting options[text] is null or not an object error. What i am trying to do here is i am checking what all multi select lookup column values are selected , comparing them with the value in an array and then removing them</p> <pre><code> var responsibleselected = returntags("select","Responsibility selected v...
javascript
[3]
4,335,089
4,335,090
Comparing Dates on Java
<p>could everyone help me with if statement below so that it will be true when the date in the GregorianCalendar instance myGC1 is not later than the date of the GregorianCalendar instance myGC2: </p> <pre><code>if ( ) { ... } </code></pre>
java
[1]
5,144,541
5,144,542
How to make InfoButton Bordered
<p>How to make infobutton bordered? </p> <pre><code>UIButton *button = [UIButton buttonWithType:UIButtonTypeInfoLight]; UIBarButtonItem *infoItem = [[UIBarButtonItem alloc] initWithCustomView:button]; [button addTarget:self action:@selector(infoPressed:) forControlEvents:UIControlEventTouchUpInside]; </code></pre> ...
iphone
[8]
3,363,644
3,363,645
Javascript Focus Is Not Working on Aspx Page
<p>Hy Guys,</p> <p>Please Look at the code and Try to Help Out. The function ive written is not working but its RUNNING properly. Its about To set focus on next content on page im using it on an ASPX page. Heres my code Below :</p> <pre><code>function SetFocusOnSave(CTag,NTag) { alert('Running'+CTag+NTag); v...
javascript
[3]
251,013
251,014
Time divided by hours/minutes
<p>How can I divide time by using intervals?</p> <p>like 01:00 divided by 20 mins = 3?</p> <p>06:00 divided by 2 hours = 3?</p> <p>/M</p>
c#
[0]
3,183,928
3,183,929
Multiple PHP file read to produce alternating rows for html table
<p>I have to create a multiple alternating rows that contain different sets of data from different text documents. I can read text files okay I just cant figure out how I would do the alternating rows using the different queries in one html table.</p> <p>I have thought about storing the data in a database, might this...
php
[2]
5,202,161
5,202,162
Retrieve Files from remote server based on yesterday's date
<p>I need to modify this script to retrieve only the files with yesterday's date. Here is what I have:</p> <pre><code>&lt;?php $username = 'XXXXXX'; $password = 'XXXXXX'; $ftp_server = 'data.mywebsite.com'; $conn = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server"); if(ftp_login($conn, $username, $pa...
php
[2]
324,586
324,587
Javascript setTimeout function
<p>I am calling this function</p> <pre><code>function drawLayers() { //setTimeout(drawBlueSky,500); //setTimeout(drawCircle1,1250); setTimeout(drawMoon,800); setTimeout(drawCircle1,2300); setTimeout(drawCircle2,2700); setTimeout(drawCircle3,3100); setTimeout(drawCircle4,3500); setTimeo...
javascript
[3]
2,437,883
2,437,884
Change default java installation
<p>I have many Java versions installed on a Windows 7 machine. Some of them are 32 bits, some are 64 bits. Now as default it starts one of those last versions (1.7 64 bits). How do I tell my Windows 7 machine to use another version of Java? One of the reasons is that I'm developing a JNI project from Microsoft Visual ...
java
[1]
5,606,392
5,606,393
Remove and add specific classes - Jquery
<p>I need to remove existing class of an element and add another class...or shortly I want to replace a specific class having letters 'border' as substring by another class with letters 'border' as substring. I have to toggle among 8 classes. I tried to select previous class like strClass=$("#"+styleTarget[class*='bord...
jquery
[5]
5,297,759
5,297,760
iPhone, how to fire a button event in programmatically
<p>I want fire a button event(or maybe method) in code,the button was generate by iPhone SDK , I can not update it, so I add the action to the button, the code likes as follows:</p> <pre><code>[theButton addTarget:self action:@selector(onButtonEvent:) forControlEvents:UIControlEventAllTouchEvents]; -(void) ...
iphone
[8]
536,427
536,428
static method cannot implement interface method, why?
<pre><code>interface IXXX { void Foo(); } class XXX : IXXX { public static void Foo() { Console.WriteLine("From XXX"); } } class Program { static void Main(string[] args) { XXX.Foo(); } } </code></pre> <p>Compiler error: XXX.Foo() cannot implement an interface member be...
c#
[0]
1,058,844
1,058,845
PHP "You have () new comments on your clip", how?
<p>I want to do a function to my users, so on index.php there is e.g: </p> <p>You have 2 new comments on your clip</p> <p>How should i do this? I mean i want ideas to do this the easiest way. Table for the videos is member_videos, and tables for the comment is member_videocomments, a comment inside the table is conne...
php
[2]
2,331,111
2,331,112
Why display UIAlertView must be at the end of Thread
<p>Hi everybody I'm confused, I want to popup a UIAlertView on the screen. But I find UIAlertView popup just after the whole codes complete or I invoke NSTimer. I want to know the reason about it. Is there anyway let me to control the view visiblility?</p>
iphone
[8]
725,389
725,390
Is it OK to define constants on the fly?
<p>In php, is it ok to define constants on the go. All these years, I used them only to store database login information. They were set in a file that was never touched.</p> <p>But is it ok if I do:</p> <pre><code>if ($userName == $dbUserName) { define('userName', 'myUserNameHere'); } </code></pre> <p>then:</p> <pr...
php
[2]
4,563,499
4,563,500
How to convert an unsigned int value into an IP address like 255.255.255.255?
<p>I'm working with an API that returns a server's IP address as an <code>unsigned int</code> value. What's the simplest way to generate an <code>NSString</code> from this that displays the IP address in the format "255.255.255.255"?</p>
iphone
[8]
2,623,620
2,623,621
Using a variable as part of a javascript array
<p>I have an object (that I can change!) that looks like this:</p> <pre><code>var pageContent = { "contact_us":[{ "content":"&lt;p&gt;Lots of content here.&lt;/p&gt;", "title":"Contact Us" }], "index":[{ "content":"&lt;p&gt;Some other content here.&lt;/p&gt;", "title":"Home...
javascript
[3]
3,167,495
3,167,496
EditView in ListView row: focus lost when soft keyboard shows
<p>I have some EditViews in the rows of a ListView. This works just fine except when the soft keyboard raises and lowers.</p> <p>When I touch the EditView within the ListView with the soft keyboard down, focus jumps to the EditView, then the keyboard comes up, removes focus from the EditView and sets focus to the Lis...
android
[4]
3,367,241
3,367,242
How do you fade in/out a background color using jquery?
<p>You know how some sites fade in /out color on a error message, how can you dothat with jquery?</p> <p>The point is to draw attention to the user about the message.</p>
jquery
[5]
5,932,276
5,932,277
Searching for childNodes returns undefined
<p>I have this in my html page:</p> <pre><code>&lt;nav&gt; &lt;a&gt;&lt;/a&gt; &lt;a&gt;&lt;/a&gt; &lt;/nav&gt; </code></pre> <p>but when I run <code>var menuitem = document.getElementsByTagName('nav').childNodes;</code> it returns "undefined".</p> <p>Here is the entire javascript file with the relevant part...
javascript
[3]
5,272,039
5,272,040
Iphone SDK UITextView text length
<p>How can I know that the text is out of fit (that the text is need to be scrolled)? Does it have any methods or something to do this?</p> <p>Thanks.</p>
iphone
[8]
4,966,466
4,966,467
Showing tabbar on next screen in Android
<p>Initially I have 3 screens in a tab bar...but when I navigate from any of these activities to any other activity the tab bar disappears...I want this tab bar to appear even on that screen...How to do that??</p>
android
[4]
4,404,457
4,404,458
How to simplify this mass of similar ifs
<p>I am trying to figure out how to simplify this piece of code. The logic for every if condition is basically the same so I want to get rid of the duplicate ifs:</p> <pre><code> if "video_codec" in profile: self.video_codec = profile["video_codec"] if "resolution_width" in profile: self...
python
[7]
1,707,400
1,707,401
PHP beginner design patterns and frameworks
<p>I am planning to start learning PHP and MySQL for developing e-commerce type websites. I have 3 months of free time to start doing this, and a programming background of Java and javascript of 1 year of practical experience. </p> <p>I have already selected 2 books that will get me started and get me on an intermedia...
php
[2]
1,733,566
1,733,567
Fit UITableview within Scrollview
<p>I created an application using a <code>UITableview</code>.</p> <p>But when I scroll the table view, I see a white space view before and after the table view.</p> <p>How can I fit the <code>UITableview</code> so it doesn't show that empty view?</p> <p>Here's an image of what happens when I scroll the UITableview.<...
iphone
[8]
5,579,608
5,579,609
Hindi Font Support
<p>I am developing an android application that is in Hindi. </p> <p>The major issue with that application is that it is working on Samsung devices, but fails to work on Motorola devices. </p> <p>Please suggest me solution for this issue.</p>
android
[4]
2,321,237
2,321,238
How to store the ID of the object being hovered
<p>I have this bit of code:</p> <pre><code>$('.div').mouseover(function() { alert(this.id); }); </code></pre> <p>This gets me the ID of the object that I'm hovering, but I'd like to store it in a variable. I'm not sure how to do this; I know this is probably overly simple, but can someone help? Thanks! </p>
jquery
[5]
1,495,329
1,495,330
If my struct implements IDisposable will it be boxed when used in a using statement?
<p>If my struct implements IDisposable will it be boxed when used in a using statement?</p> <p>Thanks</p> <p>Edit: this timedlock is a struct and implements Idisposable. <a href="http://www.interact-sw.co.uk/iangblog/2004/04/26/yetmoretimedlocking" rel="nofollow">http://www.interact-sw.co.uk/iangblog/2004/04/26/yetmo...
c#
[0]
2,247,697
2,247,698
file shredder in android
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4448772/safely-wipe-file-content">Safely wipe file content</a> </p> </blockquote> <p>hi group, please tell me which algorithm use for file shredding.</p>
android
[4]
4,491,953
4,491,954
Compling a c# application : an error : Identifier expected
<p>Can anyone please tell me why compiling a C# application with a .cs file containing the following piece of code is giving me an error . See below.</p> <pre><code>namespace defintions { unsafe public struct name { char* firstname; char* lastname; } ; class Functions { [DllImp...
c#
[0]
4,517,615
4,517,616
how to check image is visible or not?
<p>The code below can checks if the image is visible or not.</p> <pre><code>$('#div1 img:visible') </code></pre> <p>Which selects all image descendants and:</p> <pre><code>$('#div1 &gt; img:visible') </code></pre> <p>I just need to know that when I iterate over every image in a container like dgImages <code>$("#dgI...
jquery
[5]
1,229,736
1,229,737
Which Internet places are popular for commercial Java product announcements?
<p>For Java libraries (which I wrote in the past years) I found not so many places iin the Internet where developers could announce new releases. So I use paid advertising (banner campaigns) at the moment.</p> <p>Are there known and popular online forums or newsgroups which welcome advertising for product for the Java...
java
[1]
3,039,859
3,039,860
printing out an array alphabetically
<p>hi i have the following code from a template. </p> <pre><code>&lt;ul class="sub-categories"&gt; &lt;?php foreach ($category-&gt;getChildren() as $child) { if (!$child-&gt;totalItemCount()) continue; $link = $this-&gt;app-&gt;route-&gt;category($child); $item_count = ...
php
[2]
4,752,970
4,752,971
Why is 'int i = i;' legal?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3173462/int-var-1-void-main-int-i-i">int var = 1; void main() { int i = i; }</a> </p> </blockquote> <p>The following code can pass compiling under both g++ and Visual C++. Why is it legal? It looks unreasonabl...
c++
[6]
5,683,396
5,683,397
Diary API or source code
<p>I want to develop an application that creates a customized diary, with graphical events in it. Something like a calendar of the past, that should be browsable with daily, weekly, monthly or yearly formats. Before programming every detail of something I suppose that must already exist, as you know, is there some api ...
android
[4]
3,509,376
3,509,377
Buttons appear transparent when I set a background image. I want Solid buttons
<p>When using a small gif to be used as a background tile for a layout, I have found that my buttons appear transparent which is NOT what I want and I have not set any transparency parameters either (unless the background gif is transparent?)</p> <p>My XML is:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&g...
android
[4]
5,847,646
5,847,647
Upgrading PHP 5.2.17 to 5.3
<p>Our server currently runs PHP installed as CGI in Apache on Cent-OS.</p> <p>What are the advantages/possible problems with upgrading from 5.2.17 to 5.3? My dedi host says that it will most likely break my sites, but hasn't given any actual things that could break.</p> <p>Our server is 98% WordPress with a bunch of...
php
[2]
2,213,772
2,213,773
Creating objects in for loop. I missing the mark a bit
<p>I would like to have a for loop create objects as the children of a parent object. Usually, I would declare the object without using the for loop like this:</p> <pre><code> var mObj = {}; mObj.obj1 = {}; mObj.obj2 = {}; mObj.obj3 = {}; mObj.obj3.firstname = "john"; mObj.obj3.lastname = "superfly"; </code></pre...
javascript
[3]
5,127,758
5,127,759
How do I dynamically create properties in Python?
<p>Suppose I have a class like this:</p> <pre><code>class Alphabet(object): __init__(self): self.__dict = {'a': 1, 'b': 2, ... 'z': 26} @property def a(self): return self.__dict['a'] @property def b(self): return self.__dict['b'] ... @property def ...
python
[7]
1,720,626
1,720,627
How to use WebClient.UploadFileAsync to upload files and POST Params as well?
<p>I am using <code>WebClient.UploadFileAsync</code> to upload local files to a web server and I would also like to pass some parameters with the post as well. I would like to send a few fields that will tell the PHP code on the server specific locations on where to save the uploaded files.</p> <p>I tried to put the f...
c#
[0]
839,099
839,100
C++: Problem with overloading mathematical operators
<p>I am looking to overload, let's say, the addition operator and have it add two objects of the same class. When I declare this "operator+" prototype function in the class declaration in the header file, I pass in both objects as parameters. I get a compiler error saying that "binary 'operator +' has too many parame...
c++
[6]
3,958,492
3,958,493
conversion - ASCII hex to float in c++
<p>I have a string containing, for example "3F800000".</p> <p>This is a hexadecimal representation of the float 1.0 Only I can't seem to find any convenient way of making this conversion in C++. Suggestions?</p>
c++
[6]
4,327,447
4,327,448
Selector drawable in ImageSpan does not work?
<p>Is it possible to use <code>selector</code> drawable in <code>ImageSpan</code>?</p> <p>I have <code>TextView</code> with selector text color, and add ImageSpan with selector resource. Text color change works fine, and image does not changes. Is it a bug or there is a way to make selector spans?</p> <p>My <code>Tex...
android
[4]
2,800,431
2,800,432
Can we call method that exist on aspx page through web service
<p>Can we call a Method that exist on a aspx page through Web Services.</p> <p>It is like Reflection that method exists in dll form , but is it possible to call method from Aspx page if yes then please tell me how is it?:confused:</p>
asp.net
[9]
5,704,340
5,704,341
2d games in openGL
<p>hai I am new to iphone development. I used NSTimer scheduledTimerWithTimeInterval 0.01 seconds for game loop. The game consists drawscreen function inwhich I use CGContextClipToRect to clip the large images for animation. But the speed 0.01 seconds is working in simulator only not in the iphone(device). How can i ov...
iphone
[8]
1,738,450
1,738,451
Can I run Android App on PC with Android OS?
<p>I am working on an application where I am replying people using SMS facility. Application consumes web service as well.</p> <p>I want to install Android OS on my Windows PC and run this app on it so that it will use PC hardware and its performance can be increased. </p> <p>I have goggled and found that Android OS ...
android
[4]
4,358,416
4,358,417
Generated web services client classes with no setters
<p>I've created a client for SOAP web service, but in the generated code some classes miss setter methods. </p> <p>WSDL for the objects looks like: </p> <pre><code>&lt;xsd:complexType name="UserDefinedFieldArray"&gt; &lt;xsd:sequence&gt; &lt;xsd:element name="userDefinedField" minOccurs="0" maxOccurs="unbounded" ...
java
[1]
641,600
641,601
How to read Varian hnd files using java
<p>I have these "Varian hnd" files in my computer and I want to know if there is a way that I can open these files using eclipse or netbeans in java?. I think that these files have some images and I want to show them on my computer but I have no idea how to proceed. Also, can anyone explain to me about the format/exten...
java
[1]
1,107,146
1,107,147
Access "th" in Listview
<p>Is there a way to access the "th", in the code behind. I would like to add padding to the header depending on the item value.</p> <pre><code>&lt;LayoutTemplate&gt; &lt;table runat="server" &gt; &lt;tr runat="server"&gt; &lt;td runat="server"&gt; &lt;table ID="...
asp.net
[9]
458,136
458,137
How to show random images on Android?
<p>I have a number of images in my directory. I want to show random images in ANDROID. Please anyone provide me with an example.</p>
android
[4]
4,608,834
4,608,835
external sorting of 2GB file using merge sort
<p>I am trying to write a program to create a 2gb (approximately) sized file of English words. And from this 2gb file trying to print the frequency of words using external sorting. After external sorting it can just print the count(frequency) How to do external sorting in python</p>
python
[7]
2,449,556
2,449,557
Getting element node based on Javascript element based on position
<p>I am experimenting with a Javascript function which stuffs nodes into a position. Something like <code>appendChild(document.getElementById("foo"))</code> . However, I do not have full control over the surrounding code and it is likely that some elements will have identical IDs. Consider the following:</p> <pre><...
javascript
[3]
5,198,820
5,198,821
Is there a way I can perform one PHP function first and then execute another function after the first function?
<p>Is there a way I can perform one PHP function first and then execute another function after the first function?</p>
php
[2]
2,591,187
2,591,188
Attempting to swap my tr tags with the prev sibling
<pre><code>$("tr #contactus_"+id).before($("tr #contactus_"+id).prev()); </code></pre> <p>I know you can swap the position of the tr tags using this method, however I don't know the id name of the previous tr tag. What is the proper way of identifying the prev or next sibling?</p>
jquery
[5]
1,612,291
1,612,292
Android update ONE marker ONLY in Mapview, how?
<p>Is there a way to update one of my marker's position on a mapview?</p> <p>How?</p> <p>thanks, Leslie</p>
android
[4]
5,216,283
5,216,284
bitmap compression
<p>hi programmers i'm trying to send a bitmap screenshot over network , so i need to compress it before sending it, so if anyone have a librery or methode just tell me , thanx a lot </p>
c#
[0]
5,344,532
5,344,533
How to determine file kind effectively?
<p>The program i am working on looks at various ASCII text files and does some processing. In order to know how to handle things, it needs to know whether file </p> <pre><code>- IS_EMPTY // done - IS_JSON // done via parsing, using gson - IS_XML // done via parsing, using dom4j - IS_PROPERTI...
java
[1]
4,724,363
4,724,364
Why doesn't line 4 generate an unchecked exception?
<pre><code>/*1.*/ List l = new ArrayList&lt;Number&gt;(); /*2.*/ List&lt;String&gt; ls = l; // unchecked warning /*3.*/ l.add(0, new Integer(42)); // another unchecked warning /*4.*/ String s = ls.get(0); </code></pre> <p>If the lines 2 and 3 produce an unchecked warning then why doesn't the 4th line generate a ...
java
[1]
606,216
606,217
Are Python inner functions compiled?
<p>So AFAIK in CPython, function definitions are compiled into function objects when executed at parse time. But what about inner functions? Do they get compiled into function objects at parse time or do they get compiled (or interpreted) every single time the function is called? Do inner functions incur any performanc...
python
[7]
1,668,852
1,668,853
animationDrawable is not playing in Actionbar?
<p>I am using the developer guide(<a href="http://developer.android.com/guide/topics/graphics/drawable-animation.html" rel="nofollow">http://developer.android.com/guide/topics/graphics/drawable-animation.html</a>) to create a animating record button, Making minor changes to accomadate an actionbar menuitem instead of a...
android
[4]
2,182,104
2,182,105
Gyroscope gives differents values on differents devices
<p>I have strange gyroscope behavior:</p> <p>I have values[0] from gyroscope sensor: Angular speed around the x-axis. On Samsung Galaxy Nexus this value is from -10 to 10. In Samsung Galaxy Tab(old) - from -100 to 100.</p> <p>So, why? I can't understand. I write application which use gyroscope. On Galaxy Nexus everyt...
android
[4]
5,220,982
5,220,983
How does "if(new Integer(1) == new Integer(1))" work in Java?
<pre><code>if(new Integer(1) == new Integer(1)) return true; </code></pre> <p>I need to code/implement this so that this test:</p> <pre><code>//door is a class and the constructor takes length, breadth, width if(new Door(10,10,10) == new Door(10,10,10)) </code></pre> <p>will return true.</p> <p>Does the Java compil...
java
[1]
2,853,530
2,853,531
read google spreadsheet in python using key, without sign-in
<p>i have used the gspread lib to read the csv file from the google docs but it first requires to login.</p> <pre><code>gc = gspread.login('email','password') sheetData = gc.open("NSEport").sheet1 </code></pre> <p>I want to directly open a spreadsheet using the key generated when we share the spreadsheet. without lo...
python
[7]