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
275,971
275,972
$.ajax - dataType
<p>what is the difference between </p> <pre><code>contentType: "application/json; charset=utf-8", dataType: "json", </code></pre> <p>vs.</p> <pre><code>contentType: "application/json", dataType: "text", </code></pre>
jquery
[5]
928,039
928,040
How to use date event in week calendar
<p>I'm looking at the documentation for the <a href="https://github.com/robmonie/jquery-week-calendar/wiki" rel="nofollow">week calendar plugin</a></p> <p>And unfortunately, some of the configurations are unclear to me and I can't seem to figure out how to use the Date function. So basically, I need to know, how can y...
jquery
[5]
1,376,501
1,376,502
Can you solve this in brief code?
<p>there are 10 variables. say <code>$var1, $var2, $var3, $var4,....$var10</code></p> <p>and a <code>$count</code> variable. what I am looking for is if all variables are set then <code>$count = 10+1</code> or if 9 variables only set then <code>$count=9+1</code> or if 8 variables only set then <code>$count=8+1</code> ...
php
[2]
717,176
717,177
check terminal if open
<p>I am using Ubuntu right now and I am able to open a terminal through Java code. But my problem is that when I close my program after the terminal has been opened, I will see a message saying that the terminal I opened has been closed?</p> <p>Here is my code for opening the terminal:</p> <pre><code>String command =...
java
[1]
4,649,979
4,649,980
how do I write a `is_a_last_of_b(a, b)` to check whether `a` is the last child of `b`
<pre><code>a = $('div:first'); b = $('div'); </code></pre> <p><code>b</code> may contain multiple DOM elements.</p> <p>But <code>a</code> only contains 1 element.</p> <p>How do I know if <code>a</code> is the last element of <code>b</code>?</p> <p>I tried <code>a == $('div:last')</code>,but it's wrong after my test...
jquery
[5]
2,425,618
2,425,619
checking if form inputs are empty with jquery
<p>There are some other threads which ask this question, but I think I think I have a slightly different issue.</p> <p>I am trying to make a form where the submit button initially is disabled, and when the form is complete the button will become enabled. After struggling for a while, I found a post which I modeled the...
jquery
[5]
1,080,472
1,080,473
JQuery - how do I exit user defined function?
<p>I have a function that runs on document load:</p> <pre><code> function animateText() { $('.block') .css("background-image", "url(images/text-4-line-1.png)") .animate({left: "526"}, 1, "linear" ) .delay(2200).fadeIn(1000) .delay( 3000) .fadeOut(1000) $('.block2') ...
jquery
[5]
3,821,914
3,821,915
Faster loading times for activities in android app
<p>The way I have my app set up now the initial activity that launches displays an options screen which has 4 buttons. Each button when clicked.launches its own activity and layout that goes with it. But when the user clicks a button it takes almost 3-5 seconds.for the activity to open the new screen. Is there a better...
android
[4]
4,265,480
4,265,481
Why my code is getting NZEC run time error?
<p><a href="https://www.spoj.pl/problems/ORDERS/" rel="nofollow">Question source: SPOJ.. ORDERS</a></p> <pre><code>def swap(ary,idx1,idx2): tmp = ary[idx1] ary[idx1] = ary[idx2] ary[idx2] = tmp def mkranks(size): tmp = [] for i in range(1, size + 1): tmp = tmp + [i] return tmp def per...
python
[7]
4,822,483
4,822,484
Wrong input field is removed by button click
<p>I'm having an issue with some jQuery code I've written.</p> <p>It seems that the input field on <strong>Page 2</strong> is being deleted by a button meant to remove input fields on <strong>Page 1</strong>. How can I go about sorting this out? Here is <a href="http://jsfiddle.net/psL2s/" rel="nofollow">my code</a> o...
jquery
[5]
3,012,847
3,012,848
Missing Return Statement
<p>I am Trying to read an Excel file using and finding the Start position for my another for loop.</p> <p>This is my code.</p> <pre><code>public static int CheckStartPosition(String filename,int Colno,String StartChar, int sheetno,int startpos) { try { Workbook workbook = new Workbook(); workbook.open(filename)...
java
[1]
2,377,251
2,377,252
boolean in if statement
<p>If I want to execute code only if a variable is <code>true</code>, should I have:</p> <pre><code>if ($option) { /* code */ } </code></pre> <p>or</p> <pre><code>if ($option == TRUE) { /* code */ } </code></pre> <p>Doesn't the first one imply that also values like 1, 2, 3 etc. will execute the code.</p> <p>Is the...
php
[2]
4,524,612
4,524,613
Read newer files first from a directory - C++
<p>Lets say I have a directory which has the files with the following names:</p> <p>00 01 02 03 04 05 ...</p> <p>The higher the number, the newer the file. I want to read say the 2 newest files but in descending order. So I want to read the 05 file first, then 04 file.</p> <p>How can I achieve this efficiently? This...
c++
[6]
472,901
472,902
Inserting contact to Samsung I9000 Galaxy S returns an exception
<p>I have this code for inserting contacts tested on all HTC devices and it seems to be working fine until I tried it on a Samsung I9000 Galaxy S which gives me a java.lang.NullPointerException on this particular line of code </p> <pre><code>String strDisplayName = "First Name" + " " + "LastName"; values.put(ContactsC...
android
[4]
1,813,116
1,813,117
Escaping quotation marks in PHP
<p>I am getting Parse error, i think its because of the quotation marks over "time". How can I make it treat as a whole string.</p> <p><img src="http://localhostr.com/files/bhe8AmV/capture.png" alt="enter image description here"></p> <p>The problem is that I cant manually add \ before every quotation mark. This is th...
php
[2]
76,426
76,427
Regarding methods were not overridden in StringBuffer and StringBuilder?
<p><code>hashCode()</code> and <code>equals()</code> methods were not overridden in <code>StringBuffer</code> and <code>StringBuilder</code> , I was trying this piece of code below..</p> <pre><code> //StringBuffer does not override equals &amp; hashCode //StringBuffer s = new StringBuffer("saral"); ...
java
[1]
5,737,410
5,737,411
Convert Date MMDDYY to Date for database Insert
<p>I got an array with a date set as <code>071712</code> . no / slash characters for the date, no dash. nothing, just plain <code>071712</code> (coming from a text file).</p> <p>I need to convert the date so I can include it in a SqlServer insert statement. I'm calling a stored procedure for the insert. So far I hav...
c#
[0]
1,046,605
1,046,606
How to get the path of a URL
<p>Have a URL, how to retrieve its path part?</p> <p><a href="http://www.costo.com/test1/test2" rel="nofollow">http://www.costo.com/test1/test2</a></p> <p>How to get "test1/test2"</p>
java
[1]
2,400,288
2,400,289
How to implement "Send Feedback" feature in Android?
<p><img src="http://i.stack.imgur.com/LkBBc.png" alt="enter image description here">I would like this to behave just like the "Send Feedback" behaves when you click on the Menu item in the Google+ Android app.</p>
android
[4]
4,300,867
4,300,868
error in exporting textbox text to excel sheet
<p>I'm trying to export some values in textboxes to several columns (Date, Temperature) in an excel sheet (.xlsx file). But it generates an error called "the INSERT INTO statement contains the following unknown field name: 'Temperature'". And when i remove the Temperature column from INSERT INTO statement, it works. Pl...
c#
[0]
822,151
822,152
Adding "Open With..." Functionality c#
<p>I am working on a program that can read, write, and export files, these functions all work fine and are almost perfected. What I would like to do now is to be able to choose a file and tell it to "Open With" (In the Right-Click Context Menu on Windows XP) and have my application be able to handle the file given. I h...
c#
[0]
4,124,392
4,124,393
C# code to pick the values in one record
<p>My query is this. I have two records with all values are identical, except the value of the amount. I wish to frame the c# code to pick the first record with the values alone, the second record should not be considered &amp; value of the amount alone should be the combined value of the first &amp; the second reco...
c#
[0]
419,011
419,012
store "N" number of records within an array of a fixed size
<p>Is it possible to store within an array a rolling set of values without exceeding the set index?</p> <p>For example I put together a basic console example at as follows: </p> <pre><code>static void Main(string[] args) { int[] myvalue; myvalue = new int[10]; for (int i = 0; i &lt; 20; i++) { ...
c#
[0]
3,911,873
3,911,874
Is there a simple way in Python to create a file which can be written to in one thread and read in a different one?
<p>In the python program I'm writing, I've got a thread which iterates over a large structure in memory and writes it incrementally into a file-like object. I've got another thread which takes a file-like object and writes it to disk. Is there an easy way to connect the two, such that any data input from the first th...
python
[7]
2,308,763
2,308,764
Setting variable as returned list, doesn't seem to be doing anything
<p>Setting variables as returned lists from functions that contain variables as a returned list doesn't seem to give me any output:</p> <pre><code>def get_wordlist(num, s): items_in_wordlist = database_get(num) print "Trying to get wordlist..." print items_in_wordlist items = [] if s == 0: ...
python
[7]
1,792,264
1,792,265
RegEx - find and replace content between two tag which is at multiple location in same file
<p>I have a java file having @Start, @End tag multiple places. looking for Regex which can replace the code between these two tag (including tag)</p> <pre><code>public class MyClass{ private String name; private String age; @Start private String address; private String phoneNumber; @End ---...
java
[1]
4,857,408
4,857,409
Calling a function inside the body, from an external JS file which is dynamically loading
<p>I have an external JS file:</p> <pre><code>console.log("DEBUG1"); function Function1() { console.log("DEBUG2"); } function Function2() { console.log("DEBUG3"); } </code></pre> <p>I want to load this JS file dinamically in the head and then call the function Function1() inside the body, before the body on...
javascript
[3]
2,193,594
2,193,595
raw escape in python except last char
<p>Why in python I can't use:</p> <pre><code>r"c:\" </code></pre>
python
[7]
2,075,264
2,075,265
how to implement search function in android
<p>hi i am new to android what i did is creating a list with strings and implementing the search using edit text,my code for this is as fallows</p> <pre><code> ((EditText)findViewById(R.id.EditText01)).setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { String e...
android
[4]
1,411,991
1,411,992
Incrementing hexa strings in Python
<p>I'm trying in python to increment hexa decimal values that are represented in strings like <code>'84B8042100FE'</code>, how can i increment this value with 1 to have <code>'84B8042100FF'</code> ?</p> <p>thank you.</p>
python
[7]
4,081,597
4,081,598
How to fix a variable on a page
<p>I am getting a variable from another page but when I click on faculty link the get variable destroy. How I fix the variable on this page?</p> <pre><code>&lt;ul&gt; &lt;?php if(isset($_GET['a'])){$var=$_GET['a'];};?&gt; &lt;li&gt;&lt;a href='&lt;?php if(isset($var)){echo $var;} ?&gt;.php'&gt;&lt;span&gt;&lt;?php if(...
php
[2]
640,421
640,422
Operations with structures, code not working?
<p>Assume you are given three variables, revenue, expenses, and profit, all of type Money (a structured type with two int fields, dollars and cents). Assign to profit the result of subtracting expenses from revenue. Let's make the happy assumption that revenue exceeds expenses. However you still may find that the cents...
c++
[6]
5,452,798
5,452,799
SyntaxError: missing : after property id
<pre><code>$('.pagination ul li').each({ if( $(this).index(this) &gt; 2 ) { $(this).hide(); } }); </code></pre> <p>SyntaxError: missing : after property id whats the problem?</p>
javascript
[3]
4,504,740
4,504,741
How to auto-detect devices connected to COM ports
<p>I want to auto detect devices connected to the COM ports of my computer. Being able to use the SerialPort class allows me to get the list of available COM ports easily.</p> <p>I want to iterate through them and poll(send a command) to each port and wait for a response. However it seems that most tutorials suggested...
c#
[0]
1,402,544
1,402,545
Pass the parameter Object
<p>I have this test method:</p> <pre><code>public void load(Class&lt;? extends Object&gt; className, XXXX) { Criteria criteria = session.createCriteria(className); List&lt;Object&gt; list = criteria.list(); for (Object item : list) { list.add(new Object(item.getId, item.getCode); /* Object doesn't know ge...
java
[1]
2,164,985
2,164,986
how to implement protocol buffering in android
<p>Currently we have the requirement to implement the protocol buffering for server communication. Can somebody provide me any input if , they have regarding this.</p>
android
[4]
5,938,165
5,938,166
Add content if element is not empty
<p>HTML:</p> <pre><code>&lt;div id="parent"&gt; &lt;div class="child"&gt;&lt;/div&gt; &lt;div class="child"&gt;&lt;p&gt;Div with content&lt;p&gt;&lt;/div&gt; &lt;div class="child"&gt;&lt;img scr="pic.png" alt="Div with picture" /&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>Result I want: </p> <pre><code>&...
jquery
[5]
1,069,792
1,069,793
Empty() function might not be working with Constants in PHP
<p>I've been looking at it for a while and cannot figure out what the problem might be:</p> <p>My Code:</p> <pre><code>&lt;?php session_start(); require "includes/config.php"; require "includes/database.php"; require "twitteroauth/twitteroauth.php"; if(empty(CONSUMER_KEY) &amp;&amp; empty(CONSU...
php
[2]
1,865,769
1,865,770
Extension Methods - Changing the Namespace
<p>I'm using a third party library which contains a bunch of extension methods on top of IQueryable. To use these extension methods i don't wish to have my application littered with using statements to the third party namespace in which the extension method resides in.</p> <p>This is so that i can switch it out the li...
c#
[0]
3,721,358
3,721,359
automatic object naming java
<p>I new to java and I have been trying to code a method that allow me to create and declare an object and add it to my array list automatically.</p> <pre><code>public static void public static int objectCreate(String a, ArrayList&lt;pet&gt; list,int x) { pet pets= new pet ("pet"+ x); pet pets.getName() = new pet("d...
java
[1]
5,928,319
5,928,320
Override a method at instance level
<p>Is there a way in Python to override a class method at instance level? For example:</p> <pre><code>class Dog: def bark(self): print "WOOF" boby = Dog() boby.bark() # WOOF # METHOD OVERRIDE boby.bark() # WoOoOoF!! </code></pre> <p>Thanks</p>
python
[7]
5,762,909
5,762,910
How do you play sound in C#?
<p>I've tried this but I'm interested in playing sound from where my program starts. Such I have the .wav file inside of the project folder.</p> <pre><code> SoundPlayer simpleSound = new SoundPlayer(@"/yay.wav"); simpleSound.Play(); </code></pre> <p>Thank you</p>
c#
[0]
2,579,527
2,579,528
Root Path Problem in asp.net?
<p>in my application a link button is there when i click on it it redirect to another page. But when i click on that page it is giving error like this...</p> <p>Cannot use a leading .. to exit above the top directory. Description: An unhandled exception occurred during the execution of the current web request. Please...
asp.net
[9]
3,968,872
3,968,873
Is there a way to kill all the visible dialog as an activity is destroyed?
<p>I am asking this because I am always getting the Activity has leaked window.. error</p> <p>Couldn't figure out a way to destroy some of the dialogs on activity destroy since these dialogs are dynamically generated outside the activity(on some listener). </p> <p>So is there a way for android to detect and kill all ...
android
[4]
4,976,752
4,976,753
Java >>> Operator
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2811319/difference-between-and">Difference between &gt;&gt;&gt; and &gt;&gt;</a> </p> </blockquote> <p>Could someone explain what the <code>&gt;&gt;&gt;</code> operator does in in Java. I encountered it in this ...
java
[1]
4,209,836
4,209,837
JavaScript issue in IE when adding numbers
<p>I have a simple form, with 5 textboxes and 3 answers (also textboxes). The form calculates a result for the user with number inputs. My problem is my calculation does not work in IE, but works fine in both Chrome and Firefox. </p> <p>What's wrong?</p> <p>Here is my function: </p> <pre><code>function addNumbers() ...
javascript
[3]
1,824,049
1,824,050
PHP 6 - Roadmap?
<p>Has anyone found a roadmap for PHP version 6?</p> <p>Also, any very rough ETA on the release date (please don't answer "when it's ready", I'm just trying to get a sense of if it's first half of 2010, second half, etc)</p>
php
[2]
3,722,743
3,722,744
Learning Java public static main method
<p>I am learning java and I have come across the following problem: write the code for a single file that implements a public static void main(String[]) method when called with any array of strings, can anyone explain how I do this, it to used with an immutable abstract data type of a list of string?</p> <p>Thanks</p>...
java
[1]
2,702,999
2,703,000
what is the code return val + '' === numVal + '' for?
<p>I am reading a book and saw a function, but I could not understand the lines <strong>var numVal = +val; return val + '' === numVal + '';</strong>. Can anyone help explaining it a bit? Thanks in advance!</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;script&gt; function isNumeric(val) { var ...
javascript
[3]
2,324,987
2,324,988
Why command doesn't executes if contains Russian letters?
<p>I tried to disconnect/connect my modem adapter, named as "конект", but it doesn't work, because adapter's name contains Russian letters. How to force it to work? Please help.</p> <blockquote> <p>Connect("конект", "", "", true);</p> </blockquote> <pre><code> public static void Connect(string adapter, string lo...
c#
[0]
1,689,077
1,689,078
strip <script> tags from a text using php + security problems?
<p>I want to use php in order to strip only the tags. I have other tags like images and links. After some search I did I found strip tags function in php but it seems to strip all tags and that is not going to work in my case. By striping tags from text is that enough to prevent any security problems ?</p>
php
[2]
3,890,324
3,890,325
Trouble deleting directory, Java
<p>In my <code>jUnit</code>, i have a following snippet:</p> <pre><code>private String session = "/tmp/session/"; private File f; @Before public void setUp() { f = new File(session); f.mkdir(); } @After public void tearDown() { System.out.println("Directory deleted: " + f.delete()); // always false...
java
[1]
2,878,791
2,878,792
How to delete all numbers after point in PHP
<p>example: 1.123 =>1 1.999 => 1 </p> <p>thanks.</p>
php
[2]
3,768,579
3,768,580
c# multi structured classes
<p>I'm new to C# and have a question regarding classes. At the moment I use simple classes for example:</p> <pre><code>public class Core { public double Parameter1; public double Parameter2; public double Calc1() { return(Parameter1 * Paramater2); } } </code></pre> <p>In my main code I then cre...
c#
[0]
160,245
160,246
to show an error message while entering duplicates when column is primary key
<p>As in table named Emp i have Name Column is Primary key,when i add duplicate name like (Bharat Mali) which is already present in database,this record is not get added in database,but showing me this message( employee added successfully) i want to show a message to user like(duplicate values can't be stored). I am u...
c#
[0]
5,603,112
5,603,113
Python OOO coding with parent child relationship
<p>I have a parent and child class. Parent class has 2 attributes x,y. Y can be set to private variable with __(double underscore) but I can't expose it to the child class, so I have given it as a _(single underscore) exposing it to the child class.</p> <p>But I don't want it to be exposed other than the child class.....
python
[7]
2,430,766
2,430,767
A different Approach for anti-virus . Am I going in the right direction?
<p>I'm currently conceiving a system that works like an anti-virus, but also uses the White Listing i.e </p> <p>Preventing Viruses from Running by having a database of Known legitimate Programs</p> <p>Yes , there is the Windows UAC, but still many viruses "work around" it. I'm planning on a more reliable system.</p> ...
c#
[0]
5,695,136
5,695,137
Starting an external activity, getting permission error
<p>I'm trying to start the preferences activity in the native messenger client from my application. in AOSP Mms.apk does not have an intent filter setup on that activity. Regardless I'm trying to find a work around to launch the user into that screen.</p> <pre><code> Intent intent = new Intent(Intent.ACTION_MAIN)...
android
[4]
1,024,587
1,024,588
get value from css using document.getElementById().style.height javascript
<p>Please offer insight into this mystery.</p> <p>I am trying to get the height value from a div box by </p> <pre><code>var high = document.getElementById("hintdiv").style.height; alert(high); </code></pre> <p>I can get this value just fine if the attribute is contained within the div tag, but it returns a blank va...
javascript
[3]
1,227,787
1,227,788
I want to create a horizontal menus in ASP.NET project
<p>How to create menu lists in ASP.NET. Can any one help me to build that? </p>
asp.net
[9]
4,558,558
4,558,559
Getting the text which are in labels at particular cells
<p>I am new to iphone .I have small doubt that is,</p> <p>first of all showing my output screen is below <img src="http://i.stack.imgur.com/wqcXy.png" alt="this is my output which is in simulator"></p> <p>Here When i click DownloadAll button in navigationbar.I have to get the names which are in the cells which is hav...
iphone
[8]
5,949,606
5,949,607
Using ObjectBindingDatasource to bind to object exposing Lists, cant drag and drop fields onto report designer
<p>Hey Guys Ive used the ObjectBindingDatasource to bind to a class Ive called "ReportViewModel" which contains properties such as </p> <p>List Companies {get; set;} List Managers {get; set;}</p> <p>in its constructor Im just calling a method to populate with dummy data</p> <p>Managers = new ReportDataRepository().G...
c#
[0]
945,209
945,210
Add content if element is not empty
<p>HTML:</p> <pre><code>&lt;div id="parent"&gt; &lt;div class="child"&gt;&lt;/div&gt; &lt;div class="child"&gt;&lt;p&gt;Div with content&lt;p&gt;&lt;/div&gt; &lt;div class="child"&gt;&lt;img scr="pic.png" alt="Div with picture" /&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>Result I want: </p> <pre><code>&...
jquery
[5]
666,373
666,374
What does really happen when you do GetType()?
<p>As we know, C# objects have a pointer to their type, so when you call <code>GetType()</code> it checks that pointer and returns the real type of an object. But if I do this:</p> <pre><code>A objA = new A(); object obj = (object)objA; if (obj.GetType() == typeof(object)) ; // this is true </code></pre> <p>But what ...
c#
[0]
5,366,162
5,366,163
Convert string to char
<p>I get from another class string that must be converted to char. It usually contains only one char and that's not a problem. But control chars i receive like '\\n' or '\\t'. Is there standard methods to convert this to endline or tab char or i need to parse it myself?</p> <p>edit: Sorry, parser eat one slash. I rec...
c#
[0]
3,871,916
3,871,917
dropdown selection click function only works once
<p>I'm trying to use jquery to narrow down my selections of towns when the user selects a county. The following only works once:</p> <pre><code>$('#county &gt; option').live("click",function(){ var clicked_county = $(this).val(); $('#town &gt; option').not("."+clicked_county).hide(); }); &lt;select name="co...
jquery
[5]
629,956
629,957
What is an efficient "contains this element" list?
<p>Ok, here's my problem: I download a list of items from the net and I store them in a db. Across successive downloads an item could not be present anymore so, for example:</p> <p>first download: item1 item2 item3</p> <p>second download: item1 item3</p> <p>in this case I have to detect that item2 is not present any...
java
[1]
3,819,508
3,819,509
Android skiller SDK with separate database
<p>I am developing a multiplayer android card game with a cloud database that holds all the cards. I want to use the skiller SDK, however it can only hold 1 KB of data in the database. Is it possible to use the skiller SDK for the multiplayer functionality while using a separate cloud database to store the cards? </p>...
android
[4]
2,275,662
2,275,663
PHP file upload affected or not by max_input_time?
<p>I'm looking into what is the best value to set for defaults in PHP. I've seen many contradicting points about <code>max_input_time</code>. </p> <p>This answer says that he believes file uploading is not counted towards timers: <a href="http://stackoverflow.com/a/3758522/518169">http://stackoverflow.com/a/3758522/51...
php
[2]
1,233,272
1,233,273
how to communicate from PC to Android device?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3803871/android-apps-communicating-with-a-device-plugged-in-the-usb-port">Android apps, communicating with a device plugged in the USB port</a> </p> </blockquote> <p>We can access the android device from PC thro...
android
[4]
5,785,260
5,785,261
jQuery Highlight Effect with no fade away
<p>I want to highlight a <code>&lt;span&gt;</code> using jQuery.effect('highlight'), but it fades out after a period of time.</p> <p>How can I get the highlight to be persistent?</p> <p>My code is:</p> <pre><code> $('span').live('click', function () { $(this).effect("highlight", { color: "#ff3fff"}); });...
jquery
[5]
4,678,647
4,678,648
android designing badge for tab to fit all the screens
<p>I am using badgeViewer library to add badge icon. But, when i use the</p> <p>setHeight(), setWidth() properties it fits one device but not a different type of device.</p> <p>Can anyone suggest which are the methods that can be used to resolve this mentioned issue.</p> <p>I used the following properties to add bad...
android
[4]
5,850,607
5,850,608
How can I get jquery to clear a table cell?
<p>My table looks like this:<img src="http://i.stack.imgur.com/c2Edj.png" alt="my table"></p> <p>How can I get jquery to remove the dropdown or clear the contents from the last cell if my first cell has a value in it? The dropdown should only appear if the first two cells are blank.</p> <pre><code>&lt;table&gt; &lt;t...
jquery
[5]
3,541,168
3,541,169
Extracting zip file into a folder throws "Invalid entry size (expected 46284 but got 46285 bytes)" for one of the entry
<p>When I am trying to extract the zip file into a folder as per the below code, for one of the entry (A text File) getting an error as "Invalid entry size (expected 46284 but got 46285 bytes)" and my extraction is stopping abruptly. My zip file contains around 12 text files and 20 TIF files. It is encountering the pro...
java
[1]
4,233,336
4,233,337
How to list all the files of a directory which is on a remote machine in java?
<p>I have a c code.I need to write a java code which i would then have to convert into a jar file and run from my c code.The purpose of the jar file would be to log into a remote machine and then navigate to a defined path and then list all the files in the specific directory in string format.That is i want to obtain s...
java
[1]
4,767,970
4,767,971
rotate a video on iPhone using MPMoviePlayerController
<p>I'm using a MPMoviePlayerController to play a video on iPhone, I added its view to the app's window, but I rotate the simulator the video does not rotate. What did I miss?</p>
iphone
[8]
2,504,550
2,504,551
algorithm for alphabetical insert - special case
<p>I was getting an error of d.tagName is undefined in the code below. This would happen when I inserted a new element into a list in alphabetical order and it was greater then the last element in the list. In this case it should be inserted at the end of the list. e and b are the elements to be inserted and d is th...
javascript
[3]
1,842,505
1,842,506
php writing text file creation format
<p>I need to store some data in a text file. The data is in my mysql as latin1 to use as few bytes as possible. How can I make a text file for php to write to in latin1 format please?</p>
php
[2]
2,286,065
2,286,066
Android TabView
<p>My project consists of one TabView ,in this TabView we have 3 tabs i.e. (HOME, SEARCH, BACK).</p> <p>There is some problem in back button, in HOME tab we use a TabGroupActivity. </p> <p>When i press the BACK tab then we can go to last activity, and also set tab at the 0 position means(Home) when we press BACK ta...
android
[4]
4,612,411
4,612,412
System.Web.HttpContext.Current.Request.UserHostAddress;
<p>I am using the following code to obtain the user I.P. address but something strange is happening. I am, receiving the same ip address every time no matter if I am on my desktop or on my iPhone. I am on our network where the web servers live when I hit the page from my desktop but on my iPhone I was not even in the b...
c#
[0]
3,456,198
3,456,199
C# roll dice minimize number of dice every round
<p>i need help please anyone. I did an array and a loop that stops when a number is identified. Its not suppose to happen that way.</p> <p>It rolls 5 dice but when a number is identified, it should lessen the number of dice for the next round. It plays 3 rounds altogether until that number is identified. It should ide...
c#
[0]
5,926,875
5,926,876
unspecified error in C#
<p>i wrote a program that writes data to 2003 access database every 1 minute, after 20 minutes an unspecified error occurs. Any ideas?</p> <p>Here's the code</p> <pre><code>private void timer1_Tick(object sender, EventArgs e) { try { OleDbConnection con = new OleDbConnection("Provider=Microso...
c#
[0]
554,310
554,311
To get information about the App just installed
<p>My Requirement is to manage the applications operations(install, update, remove) happens in any android device in the cloud. I could get the list all installed app in my deice through PackageManager Class. Also i am able to notified whenever any operations takes place in my device through intents filters like 'ACTIO...
android
[4]
4,966,293
4,966,294
Access denied error on window.moveTo()
<p>I have a window that is composed of a frameset. When I launch it, I have to resize it, thus:</p> <pre><code>&lt;script language="javascript"&gt; window.onload = function(){window.moveTo(0,0); window.resizeTo(400,500); }&lt;/script&gt; </code></pre> <p>but then when I ran it in IE 8, it gives me the "Access denied...
javascript
[3]
3,957,622
3,957,623
How to hide a table row in jQuery?
<p>I have a table such as this</p> <pre><code> &lt;table class="headerTable" id="headerTable"&gt; &lt;tbody&gt; &lt;tr class="hh"&gt; &lt;td&gt;test1&lt;/td&gt; &lt;td&gt;18,164&lt;/td&gt; &lt;/tr&gt; ...
jquery
[5]
3,871,607
3,871,608
Dynamically adding a Button to a PlaceHolder in a DataGrid
<p>I have basically something like this:</p> <pre><code>&lt;asp:datagrid id="DGrid" runat="server" AutoGenerateColumns="false"&gt; &lt;asp:TemplateColumn HeaderText="Stuff"&gt; &lt;ItemTemplate&gt; &lt;asp:PlaceHolder id="PH" runat="server" /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateColumn&gt; &lt...
asp.net
[9]
4,808,813
4,808,814
Getting Deleted character
<p>in in Input field, if the user presses Backspace or Delete key, is there a way to get the deleted character.</p> <p>I need to check it against a RegExp.</p>
javascript
[3]
929,306
929,307
C++: How is static class member implemented?
<p>Where are static data members stored? Is there some kind of static members table (as in "virtual methods table")? I've performed an experiment - seems like static members don't affect <code>sizeof()</code> at all. Does it mean all references to static members are converted to a fixed address?</p>
c++
[6]
1,046,905
1,046,906
How can I run IPA file on non-jail break iphone
<p>I am using IPA file for testing purposes ,but some times it gives following error "Signer not valid error" is it due to non jail break? or i have to use UDID</p>
iphone
[8]
3,372,499
3,372,500
Non static method cannot be referenced from a static context for eeyore?
<p>I have a class called <code>ChristopherRobin</code> (sub class of <code>HundredAcreWoodsCharacter</code>) in which there is a method called <code>FindTail()</code>.</p> <p>In another class, <code>Eeyore</code> (sub class of <code>HundredAcreWoodsCharacter</code> also), I want to try and use the method <code>FindTai...
java
[1]
1,028,769
1,028,770
double exclamation on a return value in javascript
<p>I'm looking over a book for html 5 and it includes this tid bit of js. What does double exclamation mean?</p> <pre><code>return ! ! document.createElement('video').canPlayType; </code></pre>
javascript
[3]
4,173,443
4,173,444
Passing Parameters to a Mail Script
<p>I want to send an email from python using the below codes i wrote/reffered</p> <pre><code>&lt;script&gt; $(document).ready(function() { $("#form1").submit(function(){ $("#form1").validationEngine(); if($('div input[type=text]').val() != "") { var textfield2=document.getElementById("...
python
[7]
2,837,668
2,837,669
Constructing Objects and Calling Member functions
<p>Here is my code</p> <pre><code>#include &lt;iostream&gt; using namespace std; class MyTestClass { int MyTestIVar; public: MyTestClass(void); int firstCallMethod(void); int secondCallMethod(void); }; MyTestClass::MyTestClass(void) { MyTestIVar = 4; } int MyTestClass::firstCal...
c++
[6]
3,046,118
3,046,119
How can I hide a date value if it is less than current date?
<p>I have the following date dropdownlist options:</p> <pre><code>&lt;asp:DropDownList id="eventsDate" runat="server"&gt; &lt;asp:ListItem Value="04/31/2012"&gt;Apr 31, 2012&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="05/21/2012"&gt;May 21, 2012&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="07/22/2012"&gt;Jul...
asp.net
[9]
3,180,175
3,180,176
Fetching data from server
<p>i can use https to post data to apache2 server, is there any way of using https to retrieve some data from the server, running php script or something to return</p> <p>Thanks</p>
php
[2]
1,227,392
1,227,393
Converting strings to integers then ordering them in an list with strings
<p>I have the following list and I need to order them from biggest to smallest names and numbers. </p> <pre><code>['joe: 5', 'ed: 9', 'joe: 7', 'ed: 8'] </code></pre> <p>I'm having the following problems:</p> <ol> <li>Converting the numbers from strings to integers to order it.</li> <li>Ordering them with the co...
python
[7]
5,629,939
5,629,940
Debugging PHP application after exit is called
<p>I have a PHP application that is using a very modest amount of memory until exit is called; at which point the memory usage spikes dramatically causing a fatal error due to exceeding the memory limit.</p> <p>Is there any way to debug what the application/PHP is doing after exit is called? Alternatively, are there a...
php
[2]
5,448,896
5,448,897
Running a C# program from SD-card but shows it ran from temp directory
<p>I have come across a strange problem which I would like to get your help about. </p> <p>In my mobile app the program writes a windows C# program (and dependencies) on SD-card so that user can run it on his PC when SD-card is mounted on PC. The program and dependencies are copied at root level like this.</p> <ul> ...
c#
[0]
2,427,146
2,427,147
c# "\xC0\x80" sent as C0 3f ... Odd problem cant figure out the solution
<p>I have a very interesting problem. One to which i have yet to be able to find an answer. the code as follows</p> <pre><code>Console.WriteLine("\xc0\x80"); Console.WriteLine(Encoding.GetEncoding(1252).GetString(new byte[] { 0xC0, 0x80 })); Console.WriteLine( Encoding.GetEncoding(1252).GetString(Encoding.GetEncoding(...
c#
[0]
3,379,250
3,379,251
How to find the object a function belongs to?
<p>Given a function, is there a way to find out the object that holds it?</p> <pre><code>var dog = { bark: function() { alert('dfd') }, name: 'Bill' } function getNameFromBark(barkFunc){ //How to implement this method? } getNameFromBack(dog.bark); //I would like this to return Bill. </code></pre>
javascript
[3]