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
5,698,888
5,698,889
object HTMLSelectElement accessing value through this keyword
<p>The below code doesn't it print the value. </p> <pre><code>function go(x) { alert(x.options.selectedIndex.value); //location=document.menu.student.options[document.menu.student.selectedIndex].value } </code></pre> <p>this is the html code</p> <pre><code>&lt;select name="student" onChange="go(this)"&gt; ...
javascript
[3]
2,078,694
2,078,695
android.app.Application subclass, onTerminate is not being called
<p>From the documentation for android.app.Application:</p> <p>"Base class for those who need to maintain global application state"</p> <p>I am using my own subclass to maintain an object that I'm using to query a server. Also from the documentation:</p> <p>"onTerminate() Called when the application is stopping."</p...
android
[4]
4,459,663
4,459,664
How to do a 'hot folder' in Python
<p>I have a directory called <code>input_files</code>. I would like a script to be triggered every time a new <code>xls</code> file is dropped into it. How would I trigger a python script whenever this happens? (currently I am using cron as a substitute)</p>
python
[7]
2,509,219
2,509,220
Java app 'steals' stdin from cmd.exe console
<p>I am trying to run a java app as a spawned child process under Windows 7. The command I am using is in the lines of: <code>java -cp ...list of libs...</code> The problem is that once the application loads, it doesn't have its own stdin stream but try to uses its parent's stdin, which results in that commands can no...
java
[1]
5,996,186
5,996,187
get line of a predefined sentence that in a txt file line?
<p>so i have this code:</p> <pre><code>for line in open('music.txt'): if 'file : "' in line: c = line.split('file : "') del c[0] d="".join(c) a=re.sub('"','',d) e=re.sub(',','',a) urls.append(e) </code></pre> <p>Is there a way to do this but without a file...
python
[7]
2,246,791
2,246,792
How do I "require" a neighbour class in Java?
<p>In Ruby I have often written a number of small classes, and had a main class organize the little guys to get work done. I do this by writing </p> <pre><code>require "converter.rb" require "screenFixer.rb" . . . </code></pre> <p>at the top of the main class. How do I do this in Java? Is it "import?"</p> <p>Also, c...
java
[1]
5,227,979
5,227,980
Parametrised and Conversion Constructors
<p>Is there any difference between parametrised constructor and conversion constructor. If so what is it?</p>
c++
[6]
419,174
419,175
How can I detect when rows are added to a MySQL database?
<p>I have a c# application that picks up files from an ftp server, gets the text out of the file and inserts it into a mysql database. From there it takes the data and ftp's it to another server within our organization.</p> <p>What I'm looking to do is create a monitoring program that a user can load on their pc that...
c#
[0]
2,532,494
2,532,495
Getting error "uid 1000 not allowed to su" on RunTime.exec(“su”)
<p>When I try to run a su command from my program, which has system rights, I got this error returned on stderr:</p> <blockquote> <p>uid 1000 not allowed to su</p> </blockquote> <p>I'm setting shared uid to android.uid.system or android.uid.shell but it does not change a thing. The device is supposedely rooted. I r...
android
[4]
5,849,584
5,849,585
javascript alert is not working for some particular text
<pre><code>&lt;a href="term_1.html" onClick="alert('A caldera is a circular shaped landform depression caused by the eruption of a large, near surface body of magma.'); return false"&gt;caldera&lt;/a&gt; </code></pre> <p>I try to run this block but it is not working. When I write some other message in the <code>alert<...
javascript
[3]
2,856,170
2,856,171
Java arrays in methods
<p>I'm making a method that take a list of arrays and finds the average of the numbers. I know that my method works since I just moved it from my main method to the "average" method. I'm just having problems getting the array to work with the method. </p> <p>I'm not sure if I'm wrong by calling the method by <code>ave...
java
[1]
3,627,466
3,627,467
How to programmatically enable assert?
<p>How can I programmatically enable assert for particular classes, instead of specifying command line param "-ea"?</p> <pre><code>public class TestAssert { private static final int foo[] = new int[]{4,5,67}; public static void main(String []args) { assert foo.length == 10; } } </code></pre>
java
[1]
3,380,791
3,380,792
Does Python's os.system() wait for an end of the process?
<p>The <a href="http://docs.python.org/library/os.html#os.system" rel="nofollow">Python manual</a> says nothing about whether <code>os.system("cmd")</code> waits or not for a process to end:</p> <p>To quote the manual:</p> <blockquote> <p>Execute the command (a string) in a subshell.</p> </blockquote> <p>It looks ...
python
[7]
4,354,554
4,354,555
how to close an application in android
<p>Is there any proper way as suggested by google or android official documentation to close an application in android with out using any task killer tools .... </p> <p>I ask this question as a android use not as developer..... </p>
android
[4]
2,809,178
2,809,179
Get count of inner objects
<p>How would you get the count of the objects inside of this object. We only want to count the two inner objects <code>Count This</code> <code>And This</code>. So our answer will be two.</p> <p>Here is the object</p> <blockquote> <p>stdClass Object (</p> <pre><code>[Count This] =&gt; stdClass Object ( ...
php
[2]
4,055,210
4,055,211
String variable interpolation Java
<p>String building in Java confounds me. I abhore doing things like:</p> <pre><code>url += "u1=" + u1 + ";u2=" + u2 + ";u3=" + u3 + ";u4=" + u4 + ";"; url += "x=" + u1 + ";y=" + u2 + ";z=" + u3 + ";da1=" + u4 + ";"; url += "qty=1;cost=" + orderTotal + ";ord=" + orderId + "?"; </code></pre> <p>Or, using StringBuilder,...
java
[1]
5,578,620
5,578,621
Determining whether an value is a whole number in Python
<p>I would like to determine if a numeric value in Python is a whole number. For example, given: </p> <pre><code>y = x / 3 </code></pre> <p>I want to distinguish between values of <code>x</code> which are evenly divisible by 3 those which are not.</p>
python
[7]
2,489,918
2,489,919
OOP - creating class adding to list then deleting
<p>I have to create a program that will ask user to input details of a student including their ID number (which is to be saved to a global list). Then the user will be returned to the main menu where they are asked to view add or delete. </p> <p>I can do the adding a student, I have done view , I have created the clas...
python
[7]
2,437,826
2,437,827
How best to share an IDisposable object like SqlConnection with several methods in a class?
<p>Sometimes I have several methods all of which connect to SQL Server. This means that all methods contain local variables of IDisposable types like SqlConnection.</p> <p>What is the best way to reuse one sqlconnection object? Would it be to pass it in as a reference and have it as a class-level variable? Also, if I ...
c#
[0]
4,514,961
4,514,962
Link to load external content into DIV
<p><a href="http://jsfiddle.net/9BCrs/5/" rel="nofollow">http://jsfiddle.net/9BCrs/5/</a></p> <p>I have this set up to load a file into a DIV using the two links in the left DIV but it requires a unique copy of the same JQuery code each time there is a new link.</p> <p>Is there a way of connecting the file being call...
jquery
[5]
4,812,848
4,812,849
Registration form - Checking if data entered ($_SERVER['PHP_SELFf'])
<p>What I want to do is,</p> <ol> <li>User comes to registration form.</li> <li>Fills it , press enter, registration goes on.</li> <li>If he doesnt fill it, echo Data Missing.</li> </ol> <p>Where I am stuck,</p> <ol> <li>Using isset, it echos Data Missing at the first visit itself which shouldnt happen.</li> </ol> ...
php
[2]
594,548
594,549
How do I make Java ignore the number of spaces in a string when splitting?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/225337/how-do-i-split-a-string-with-any-whitespace-chars-as-delimiters">How do I split a string with any whitespace chars as delimiters?</a> </p> </blockquote> <p>Both of these Python lines gives me exactly the ...
java
[1]
2,351,791
2,351,792
Is there a way to assign an object property to an array?
<p>Pretty sure there is a way to do this but what I tried so far does not work</p> <p>Consider we have an object $localDB with some properties, I was looking for a clean way to build the $connexionInfo array without casting $localDB or using a foreach loop.</p> <pre><code>// This would be too easy if it worked $conn...
php
[2]
4,446,312
4,446,313
converting php to assembly/machine
<p>i heard someone say that the purpose of scripting languages it to abastract out the low-level stuff...also if you look at how sites are developed you see that when sites want efficiency they switch from php to C++, C# or similar. </p> <p>PHP is written in C. C compiles to assembly/machine code...so theoretically ...
php
[2]
5,384,121
5,384,122
PHP: Parse error: syntax error, unexpected T_VARIABLE When calling variables
<p>Why would I be getting <code>Parse error: syntax error, unexpected T_VARIABLE</code> on this line? </p> <p><code>$fieldLabel = '&lt;label for=".'$fieldNameStripped'."&gt;.'$fieldName'.&lt;/label&gt;';</code></p>
php
[2]
5,070,444
5,070,445
Configuration Error
<p>I have created a basic ASP.NET membership application, whereby users can login to view certain pages or create a new account. The problem is whenever I upload this to the server I am getting a configuration error (see below) Any ideas as to how I could fix this would be greatly appreciated.</p> <blockquote> <p>Co...
asp.net
[9]
2,397,441
2,397,442
Creating multilanguage homepage
<p>so im making homepage with three languages. I am using switch method, here is code - </p> <pre><code> public function languages() { if (isset($_GET['lang']) &amp;&amp; $_GET['lang'] != '') { $_SESSION['lang'] = $_GET['lang']; } else { $_SESSION['lang'] = 'en_EN'; } switch($_SESSION['lang']) { case 'en_EN': r...
php
[2]
3,088,974
3,088,975
JS File Not Being Executed
<pre><code>&lt;script type="test/javascript" src="/js/something.js"&gt;&lt;/script&gt; </code></pre> <p>Nothing looks out of place there, right? Then what's going on that, in Firefox, Chrome, Steel, Android Browser, and IE 6, the page loads and does not execute anything in schedulegrid.js? Even if it is just a single ...
javascript
[3]
1,539,972
1,539,973
Jquery: how to release all event handlers, dom changes?
<p>Is there a way to reset the current page ? free all event handlers, remove any CSS toggled by Jquery, in simpler words, restoring the page to the original state without refreshing ?</p>
jquery
[5]
1,120,559
1,120,560
Assigning in Java?
<p>Say I set int A = int B. When I change A after, it will not change the value of B. But when I set a SomeClass A = SomeClass B, and I change A's contents (like a.cost), it changes B.cost as well. Can someone explain this to me?</p> <p>I thought Java is assigned by value, not reference?</p>
java
[1]
4,596,880
4,596,881
How to get data back from BroadcastReciever to Activity?
<p>I wrote sms application for which I wrote BroadcastReceiver.I want to get data from BroadcastReceiver into my activity ,so how do I get it.Please help me ,Please.</p> <p>My Broadcast Reciever code is below:</p> <pre><code>public class SmsReceiver extends BroadcastReceiver { @Override public void onReceive(...
android
[4]
3,263,589
3,263,590
Adding serial number to listview control
<p>My listview having 3 columns: <strong>SI.No</strong>, <strong>HallticketNo</strong>, <strong>Name</strong>.</p> <p>I bind data to listview but the <em>SI.No</em> column in listview showing empty data.</p> <p>So,how to generate serial number in listview ?</p> <p> ...
asp.net
[9]
1,619,850
1,619,851
Download previous JDK version from Oracle site
<p>How may I download a specific JDK version, 1.6.0_04? On the Oracle site I see only how to load the latest version. In the <a href="http://www.oracle.com/technetwork/java/javase/downloads/previous-jsp-138793.html" rel="nofollow">previous version section</a> of the Oracle site, I don’t see this version available.</p>...
java
[1]
2,247,827
2,247,828
searching for jquery
<p>The site for the extruder jquery has another function on their side that is not provided by their jquery: <a href="http://pupunzi.com/#mb.components/mb.extruder/extruder.html" rel="nofollow">http://pupunzi.com/#mb.components/mb.extruder/extruder.html</a> I've been searching for a way to create the sliding image they...
jquery
[5]
753,247
753,248
Javascript match part of url, if statement based on result
<p>Here is an example of the url i'm trying to match: <a href="http://store.mywebsite.com/folder-1/folder-2/item3423434.aspx" rel="nofollow">http://store.mywebsite.com/folder-1/folder-2/item3423434.aspx</a></p> <p>What im trying to match is http: //store.mywebsite.com/folder-1 except that "folder-1" will always be a d...
javascript
[3]
1,965,852
1,965,853
how to override compareTo method
<p>here is my compareTo method, but im still getting "missing return statement" warning. can anyone tell me what is wrong with my code?</p> <pre><code> public int compareTo(Flows other) { if(this.srcAddr.equals(other.srcAddr)){ if(this.dstAddr.equals(other.dstAddr)){ if(this.srcPort.equ...
java
[1]
3,489,177
3,489,178
Can we open dialog within a dialog?
<p>I have a button which on clicking opens jquery dialog. Inside that jquery dialog i have another button which on clicking should open yet another dialog. The 1st dialog is open correctly but the 2nd dialog is not opening. Can anybody tell me what can be the problem?</p> <p>Both the dialogs are non modal. Still, the ...
jquery
[5]
3,138,395
3,138,396
why is this namespace added by default "System.Collections.Generic"?
<p>Just a general curiosity question. Why is this namespace "System.Collections.Generic" added by default in Visual Studio when we create the project instead of let's say "System.Collections"?</p> <p>Is Collection Classes under generics is most preferred way than the Collection Classes in the System.Collections?</p> ...
c#
[0]
3,186,398
3,186,399
cut html content and keep the format?
<pre><code>$str = "&lt;div&gt;blahblahblah&lt;b&gt;foofoo&lt;/b&gt;&lt;i&gt;barbar&lt;/i&gt;&lt;/div&gt;"; </code></pre> <p>I separate two part </p> <pre><code>1-presentation_text 2-full content when click on read more. $presentation = substr($str,0,23); &lt;div&gt;blahblahblah&lt;b&gt;foo $detail = substr($st...
php
[2]
4,496,258
4,496,259
Getting the full path of current active file (not a Java application, e.g. pdf) in Java
<p>(Active - the file whose window is in the foreground.)</p> <p>I am working on a problem which is to extract the text in the current active pdf (.pdf), word (.doc, .docx), or notepad (.txt) file in real time. I have tried JNA, and got the active file name (e.g., a.pdf) and exe name, but not the file path (e.g., C:/D...
java
[1]
4,446,076
4,446,077
declare multiple class using Eclipse
<p>is there a way to declare 2 classes on the same .java file using Eclipse - also how the compiler will distinguish the .class for each declare class.</p> <p>example</p> <pre><code>public class ThisTest { public static void main(String[] args) { } } class SimpleArray { } </code></pre> <p>thank you for...
java
[1]
4,426,263
4,426,264
opposite of jQuery find() that isn't not()?
<p>Given the following HTML, what jQuery selector would select the last 'blah blah' <code>span</code> but not the first?</p> <pre><code>&lt;div class='d1'&gt; &lt;span&gt; &lt;a&gt;blee &lt;span&gt; &lt;!-- don't select this span --&gt; &lt;span&gt;blah&lt;/span&gt; blah &lt;/span&gt; &lt...
jquery
[5]
4,656,362
4,656,363
New Email Verification/No Access To Old Email Account
<p>I have a program for a client I'm building and I've a system that initially verify their email by sending them a hash and if they send a correct hash they get entered. What I'm wanting to do is have users be able to update their email to a new email address and I'm wondering what is the best way to do it.</p> <p>Wh...
php
[2]
1,293,701
1,293,702
Is it good practice to separate code into blocks?
<p>If I have a method that does multiple, related things, is it good practice to stick each "thing" that the method does into a seperate block?</p> <p>Ex.</p> <pre><code>{ int var //Code } { int var //More Code } </code></pre> <p>It would help reduce the number of local variables, and make the code more readable, b...
c++
[6]
5,972,171
5,972,172
ASP.NET - how to change requested page names transparently?
<p>Very new to this subject and under the gun to come up with a solution. The problem is how I could load one of several versions of the same ASPX page, for any given page. E.g. unknown to the unsuspecting user who requests catalog.aspx, I would actually serve one of catalog_1.aspx, catalog_2.aspx, or catalog_3.aspx, e...
asp.net
[9]
2,531,801
2,531,802
Special box -activated when clicked, deactivated when clicked another places
<p>I wonder how can i do div box, which when it is clicked then something will happen to the time when we click in some other place. Notice that when we click more than one time in our box nothing special will heppen.</p>
jquery
[5]
3,767,454
3,767,455
min value of float in java is positive why?
<p>when we use MIN_VALUE function on either of primitive types in java it give us minimum value possible for that type. BUT in case of float and double it returned minimum positive value though float and double can have negative values also.</p>
java
[1]
3,867,178
3,867,179
How take html structure beetween tags
<p>Site have this kind of structure</p> <pre><code>&lt;div class="main"&gt; hello world&lt;br /&gt; againg hello world&lt;br /&gt; &lt;h3&gt;some text&lt;/h3&gt; &lt;ul&gt; &lt;li&gt;again text&lt;/li&gt; &lt;li&gt;again text&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>Now, i want take tex...
jquery
[5]
1,102,200
1,102,201
Object Reference not set to an instance or Index out of range error while adding values to lists
<p>Below is my class file which have different names than the one that is used in the project.</p> <pre><code>public partial class College { public List&lt;Students&gt; Students; } public partial class Students { public List&lt;Activity&gt; Activity; } public partial class Activity{ public List&lt;string&gt; Name; } <...
asp.net
[9]
1,201,659
1,201,660
Correct implementation of hashcode/equals
<p>I have a class</p> <pre><code>class Pair&lt;T&gt;{ private T data; private T alternative; } </code></pre> <p>Two pair objects would be equal if</p> <pre><code>this.data.equals(that.data) &amp;&amp; this.alternative.equals(that.alternative) || this.data.equals(that.alternative) &amp;&amp; this.alternative...
java
[1]
1,474,739
1,474,740
javascript for to while statement
<p>How would I turn these for statements into a while statement in javascript:</p> <pre><code> for (left = gridPlace; left &lt;= gridLastPlace; left++){ for (right = gridOtherPlace; right &lt;= gridLastOtherPlace; right++) } </code></pre> <p>Thanks</p>
javascript
[3]
1,100,380
1,100,381
/.ssh/Authorized_keys is public php
<p>When I open <code>http://mysite.com/.ssh/authorized_keys</code> a page opens and has the following information: </p> <blockquote> <p>ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAvz7xl5Q7X+uobuGs9TMWh41A2icZNY2KLNgOHdsDl6E3kfxQhVxXCxBOl0QejWUeJatp0SU3y7//P5E35qDIMdEw8w7W2fpDdnKtmH...
php
[2]
2,875,091
2,875,092
change class B method variables through class A. can it Possible?
<pre><code>class A { public void methodcall() { String s="Google"; } } class B { //defination } </code></pre> <p>now inside class B i call methods...etc class A ---methodCall's local variable s value need to change to Yahoo</p> <p>answer: I got to know it is wrong question, we can't change the class definition ...
java
[1]
1,654,884
1,654,885
problem with getting photo content of contacts
<p>I am using below code to get the photo from my contacts.. but this is throwing exception..</p> <p>android.database.sqlite.SQLiteException: unknown error: INTEGER data in getBlob_native.</p> <p>please help me if I miss something. </p> <p>int idx = cursor.getColumnIndex(ContactsContract.Contacts.PHOTO_ID);</p> <...
android
[4]
3,436,174
3,436,175
Convention for instance variable
<p>I want to know whether </p> <pre><code>NSString *valueString; NSString *urlString; </code></pre> <p>I want to know the convention for apple standard where NSString variable name ends with String. Is it correct or Not</p>
iphone
[8]
1,053,416
1,053,417
Gridview Pop Up
<p>I have a Gridview and Receive a record from webservice display the record on gridview.i need to know how to pop up window using jquery if mouse goes near the first record it want to show as a pop up windows the first record information </p> <p>any body help</p> <p>thanks Deepan</p>
c#
[0]
915,379
915,380
how to display dialog on top of screen when user get call in android?
<p>thanks i want to display caller information when user get call,for that i write the code from <a href="http://stackoverflow.com/questions/7121508/android-taking-complete-control-of-phone-is-it-possible-how/7121586#7121586">here</a></p> <p>i test in real device,but when any one call me, the dialog wan not open why?...
android
[4]
588,617
588,618
Can Javascript somehow spy my website?
<p>If I were malicious (or malicious and thoughtless) I could add some PHP to websites I'm working (or back-end web applications I'm building) that can send some data I'm not authorised to have to my remote server. There are numerous ways to achieve that.</p> <p>I was wondering: <strong>can Javascript do something sim...
javascript
[3]
3,202,563
3,202,564
Need to integrate Google Authentication in my web application
<p>I am having a web application in .net (3.5) and MySQL Server. I need to add google authentication in my application in which, user is authenticated at google with his username and password, and if authenticated, i will be able to get email, firstname and lastname of that google user. </p>
c#
[0]
2,565,010
2,565,011
Weird PHP Behaviour or Stupid Mistake?
<p>I've written some pretty complex PHP apps using this feature, so I'm not sure what's happening here.</p> <p>I'm currently writing an app that uses an online history to save content (via ajax get). The API I wrote to store the user's history to a file is extremely simple:</p> <pre><code>$myFile = "./snhistory/".$_G...
php
[2]
2,062,530
2,062,531
manipulation with radio input in jquery
<p>hey guys i made a form with jquery and the only problem is in slideToggle function </p> <p>jquery</p> <pre><code> $(".ChoosePayMethod").click(function(){ var ID = $(this).attr("id"); if ($('input[name=ChoosePayMethod]:checked')) { $("#PayMethod_"+ID).slideToggle("slow"); } </code></pre> ...
jquery
[5]
2,698,395
2,698,396
combining text and image in android
<p><img src="http://i.stack.imgur.com/6ggFZ.png" alt="enter image description here">hie all,</p> <p>i was trying to implement the home screen in carousel view, and i am stuck in combining the application icon and the title with respect to it. i am able to show the applications icons but merging with the title is to be...
android
[4]
5,655,689
5,655,690
How to parse a String of xml in Java?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1522874/best-way-to-parse-an-xml-string-in-java">Best way to parse an XML String in Java?</a> </p> </blockquote> <p>I have a String value which is actually an xml data. I have to parse the String of xml data and...
java
[1]
3,566,996
3,566,997
send users to another page if landed on wrong one
<p>I rewrote my search url from this </p> <pre><code>domain.com/search.php?q=query&amp;search=1 </code></pre> <p>to </p> <pre><code>domain.com/search.php?q=query&amp;select=all </code></pre> <p>"query = search term". How can I send someone to the select=all page if they landed on search=1? I have a ton of google l...
php
[2]
5,882,506
5,882,507
tableHeaderView tableFooterView
<p>i want to create a table view with contacts as in native contacts app of iPhone i have an array of name and i want to show the tableHeaderView and tableFooterView like the native contacts screen of iPhone for eg a b c how can we do it in our app</p>
iphone
[8]
2,096,891
2,096,892
Enable and disable click on element
<p>After clicking an element, I would like to disable <code>click()</code> on that element until the user performs some other task. I've seen posts where people say to add the disabled attribute to the element, but that doesn't seem to work for me.</p> <p>I've seen other posts where they recommend unbinding <code>cli...
jquery
[5]
5,126,149
5,126,150
Calculate Hours Between 2 Times
<p>I need a way of calculating how many hours are between 2 times.</p> <p>Wouldn't be a problem if I was using <strong>unix timestamp</strong> but I need to work for a "24 hour clock".</p> <p><em>For example, work out how many hours are between:</em></p> <p><strong>01:00 and 16:30</strong></p> <p>Any thoughtd would...
php
[2]
2,638,070
2,638,071
Segmentation Fault with delete even using virtual destructor
<p>I am getting segmentation fault while deleting an objected, being referenced by the pointer of the base class, even when I have declared the destructor virtual!</p> <p>here is my Code</p> <pre><code>class Shape { public: virtual ~Shape() { cout&lt;&lt;"Shape destructor is called!"&l...
c++
[6]
5,987,246
5,987,247
ifstream, bytes read?
<p>How do you get how many bytes were read with the ifstream::read function?</p> <p>Tell is saying the file is 10 bytes and windows says it is 10 bytes too but there are only 8 bytes in the file so when I read it, it is only reading the 8 bytes so I end up with too large of a buffer.</p>
c++
[6]
2,397,382
2,397,383
Changing the user language in an asp.net application based on user choice
<p>I have web application which supports globalization. So i need to provide user a choice to select a language one he/she logs in. Now the problem is where do i have to make changes to set the user's preferred language.</p>
c#
[0]
5,212,901
5,212,902
onKeydown not responding on third try
<p>I'm adding a onKeyDown on almost every layout of my app, cuz i'm adding a custom menú, and i want to call it using the menu key, but i found something funny</p> <p>In the constructor for my options layout i set <code>setFocusable(true)</code> and <code>setFocusableInTouchMode(true)</code> so the actions on <code>on...
android
[4]
1,059,452
1,059,453
unable to remove title bar?
<p>i have a layout ,i want layout to be displayed on whole screen without title bar. onCreate method of my activity :</p> <pre><code>public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowMa...
android
[4]
3,332,503
3,332,504
Python Flushing and Already Closed File
<p>How do I add a check to avoid flushing a file f with f.flush() when some function has already done f.close()?</p> <p>I can't seem to figure out how to do so :/</p>
python
[7]
5,972,261
5,972,262
How to show image programatically
<p>I want to show image with text.</p> <pre><code>t_s.setText("You will be shown a picture like this"+R.drawable.myimage); </code></pre> <p>Thats my code, but not work, it show not image, but number.. Please help me.. Thanks..</p>
android
[4]
1,135,223
1,135,224
Deletion of this pointer
<p>This is regarding deletion of this pointer for an object allocated on heap.Program is as follows,</p> <pre><code>class Sample{ private: int m_value1; int m_value2; public: Sample(); void setValues(int m_value1, int m_value2); void displ...
c++
[6]
3,580,736
3,580,737
jQuery Facebox Parent Element
<p>I am trying to change the <code>src</code> attribute of an element in the parent window just before I trigger Facebox close.</p> <p>I have tried:</p> <pre><code>window.parent.$("#elementID").attr("src", "no-image.png"); $("#elementID").attr("src", "no-image.png"); </code></pre> <p>But these dont work and I couldn...
jquery
[5]
3,935,498
3,935,499
note pad/ leave comment widget
<p>I am looking for a widget that I can use. What am after is when a user hits my tab button a activity start and this activity is for users to leave a comment or tip for what there looking for. I want the users to have something like 100 word limit. Is there anything that I can use to do this.</p>
android
[4]
168,333
168,334
ffmpeg addsubtitle
<pre><code>/usr/bin/mencoder -sub /var/www/html/webservice/addsubtitle/subtitle.srt -utf8 -subfont-text-scale 4 -oac mp3lame -lameopts cbr=128 -ovc lavc -lavcopts vcodec=mpeg4 -ffourcc xvid -o /var/www/html/webservice/upload/videoxplode_rt17ah2ce.mov /var/www/html/webservice/upload/e111105_022234.mov </code></pre> <p...
php
[2]
4,940,020
4,940,021
python - nested try/except question
<pre><code>try: for i in list: try: #python code... except Exception,e: #error handler except Exception, e: #error handler </code></pre> <p>If in the nested try/except it errors out, does the loop continue running?</p>
python
[7]
5,389,626
5,389,627
When should i use @android:id/?
<p>i've found some code examples with the @android:id/xyz attribute set instead of @+id/xyz. When and why is it necessary to use Android ids instead of user's id? </p> <p>thanks and greetings c.</p>
android
[4]
2,966,072
2,966,073
Changing the background of a <td> by firing a click event is not working
<p>I have a requirement hope i can get answer here.<br> I am using a theme in my web application. That will style the Table as By the default table rows will have colors alternatively as shown below. </p> <p><img src="http://i.stack.imgur.com/Nz5Lr.png" alt="enter image description here"><br> The color will be change...
jquery
[5]
381,966
381,967
Different location of assemblies stoped the type casting
<p>I am writing a custom Control class in C# for my main project. </p> <p>There're 2 projects, one for my Control and one for my main project. These 2 projects are in the same solution. I add a reference from my main project to my Control project. I notice that the first time after I drag my Control from the Tool Pane...
c#
[0]
1,257,010
1,257,011
Memory leak loading thumbnail image
<p>using sdk 4.1. I'm getting growing memory footprint followed by crash (observed in Instruments) when loading a thumbnail image into imageview in table view cell. In addition scrolling is very jerky even with just 7-8 cells</p> <pre><code> - (UITableViewCell *)tableView:(UITableView *)tableView cel...
iphone
[8]
4,120,687
4,120,688
remove last digits from float value,iPhone
<p>I have a float value say 28.980000. I want something like that 28.98, only 2 values after decimal. How can i do this ?</p> <p>Regards</p>
iphone
[8]
1,590,729
1,590,730
setting up JSON format link
<p>I'm trying to setup a json format link so I can parse. does this format look right to you guys?</p> <pre><code>{"suspended": "false","firstName": "John","lastName": "Smith","checkedin": 0,"checkindatetime": 0,"address": {"streetAddress": "21 2nd Street","city": "New York","state": "NY","postalCode": "10021"},"phone...
android
[4]
5,932,811
5,932,812
prevention of exe file upload in a website
<p>Can somebody tell me how to prevent exe file from being uploaded in a website , even if exe file is inside zip file( exe file in a new folder and new folder is then zipped and uploaded)?</p>
asp.net
[9]
4,471,405
4,471,406
HashSet & List for storing Strings
<p>Good night,</p> <p>I was trying to benchmark the performance of HashSet and List datatypes in C# to check which one performs best when a lot of insertions/deletes need to be done. The code I am using is roughly the following.</p> <pre><code>public static Func&lt;String, HashSet&lt;String&gt;&gt; ListaPossiveisCorr...
c#
[0]
2,616,569
2,616,570
Android and HTML5 CACHE.MANIFEST
<p>I have searched with google, and can't find out how much of CACHE.MANIFEST android supports, and what versions of android that supports it.</p> <p>Anyone out there that have more knowledge on the subject???</p>
android
[4]
2,850,793
2,850,794
Tell if a Javascript function is defined by looking at self[name] - is this a good way?
<p>This is a follow up question to <a href="http://stackoverflow.com/questions/85815/how-to-tell-if-a-javascript-function-is-defined">This Question</a>. </p> <p>I like (and understand) the solution there. However, in the code I am working in, another way to solve the same problem is used:</p> <pre><code>function exis...
javascript
[3]
2,870,267
2,870,268
string interning - should this code only create 10 strings in memory?
<p>Seems to create a lot more. Please advice why or how to intern correctly here.</p> <p>Thanks</p> <pre><code> IList&lt;string&gt; list = new List&lt;string&gt;(10000); for (int i = 0; i &lt; 10000; i++) { for (int k = 0; k &lt; 10; k++) { list.Add(stri...
c#
[0]
3,592,868
3,592,869
UIViewController loaded from nib: -viewDidLoad not being called
<p>Is there anything special I need to do when adding a UIViewController into a nib? My -viewDidLoad method is not being called, even though the nib is being loaded and its subclass is set in IB to my view controller class.</p> <p><a href="http://dl.dropbox.com/u/448021/Test.zip" rel="nofollow">http://dl.dropbox.com/u...
iphone
[8]
4,633,122
4,633,123
rows are interchanging in uitableview in iphone?
<p>In my application i need to add contacts of users, for that i am using UITableview with sections. Each section may contains 2 or 3 rows. while the editing was completed and scrolling the table view to top, the rows are interchanging in between sections. Actually In design part i have placed FirstName and LastName i...
iphone
[8]
4,429,720
4,429,721
Getting null before each line while scanning txt file
<p>I'm having a problem reading a txt file and find a word/pattern using java's scanner.util. Currently testing out the reading and I'm getting null infront of each line. After that problem, I'm still not sure how to search for the pattern/word in the txt file. I also have to display the line which contains the patter...
java
[1]
5,156,121
5,156,122
What is the most efficient way of merging [1,2] and [7,8] into [[1,7], [2,8]]
<p>Given 2 arrays [1,2] and [7,8] what is the most efficient way of merging that to form [[1,7], [2,8]]. I know we can do this:</p> <pre><code>a1 = [1,2], a2 = [7,8], a3=[]; for (var i=0; i&lt;a1.length; i++) { a3.push([a1[i], a2[i]]); } </code></pre> <p>I am dealing with a large array. So I want to see if there is...
javascript
[3]
2,252,015
2,252,016
How to select closest hidden div in jquery?
<p>I'm trying to perform a keypress event the divs inside the bus_lines div.</p> <pre><code>$('#bus_lines').keypress(function(e){ var box = $(this).closest("div:hidden").attr("id"); console.log(box); }); </code></pre> <p>Here's what it looks like in firebug:</p> <p><img src="http://i.stack.imgur.com/w2t2V.p...
jquery
[5]
3,698,432
3,698,433
Background mail (message)
<p>I want to do message (Background mail without open up the MFMailComposerSheet) of the data came after JSON parsing.</p> <p>in this message i have to set </p> <p>From:--> (from where this mail / message is sent). /// this can have (1,2,3,....n)numbers of mail id.</p> <p>To :--> (To the recepients). /// this can...
iphone
[8]
906,171
906,172
how to dynamically generate page numbers and only load the corresponding page in the grid?
<p>I need to load data in the gridview dynamically. That is when the user clicks the page number 2 then those records only has to be displayed.. I made a stored proc to return only those records whose page number is sent.. It will also return me the number of records too.. Now i want to create a placeholder which will ...
asp.net
[9]
969,407
969,408
Removing paths/points from MapView
<p>I have drawn something like this:</p> <p><a href="http://i43.tinypic.com/b7ayit.jpg" rel="nofollow">http://i43.tinypic.com/b7ayit.jpg</a></p> <p>How to remove the paths and points?</p>
android
[4]
3,795,964
3,795,965
php - why won't my data show up in firefox
<p>I'm using the following code in an index.php page to display content from one page on another domain. However, it works fine in IE, but when I load the page in Firefox, its missing php data.</p> <p>Am I doing something wrong or does firefox not allow this? Any help appreciated.</p> <pre><code>$domain = $_SERVER['H...
php
[2]
9,737
9,738
How to snooze the alarm in iPhone
<p>I am developing an app which will ring alarm at a particular time. How can I snooze that alarm. If any of u have sample code or link to that then it will be helpful.</p>
iphone
[8]