Unnamed: 0
int64
65
6.03M
Id
int64
66
6.03M
Title
stringlengths
10
191
input
stringlengths
23
4.18k
output
stringclasses
10 values
Tag_Number
stringclasses
10 values
1,184,258
1,184,259
FOSS java library to generate *.mobi ebooks?
<p>Firstly there is an almost identical question but the answer is not really satisfactory.</p> <p><a href="http://stackoverflow.com/questions/5032131/is-there-a-java-or-ruby-library-for-generating-mobi-ebook-documents">Is there a Java or Ruby library for generating MOBI ebook documents?</a></p> <p>The answer basical...
java
[1]
4,424,783
4,424,784
iPhone:Tabbar item actions are not happening
<p>I created a window application, which has a tabbar controller with four tabbar items. Each tabbar items are linked with a tableview. I have also set Navigation bar for each tabbar items. I have appdelegate file, which calls the first tableview controller of which is set for first tabbar item. I am trying to retrie...
iphone
[8]
3,350,383
3,350,384
How can I popup when no connection the default Connection Failed dialog?
<p>Whenever a application needs internet and connection fails, I get a message dialog </p> <p><code>Connection failed<br> This application requires network access. Enable mobile network or Wi-Fi to download data.</code></p> <p>and two buttons, Settings, Cancel.</p> <p>How do I detect there is no internet connection?...
android
[4]
1,733,460
1,733,461
How to add corners to a view
<p>I added a full border around a view but I need to add just the corner as shown image below :</p> <p><img src="http://i.stack.imgur.com/UAnOZ.png" alt="enter image description here"></p> <p><strong>I mean the red corner only .</strong></p> <p>I tried to adjust the below border xml , but it didn't work :</p> <pre>...
android
[4]
5,007,540
5,007,541
jquery global animation duration
<p>I have a page with many jQuery animations, each has it's own duration defined individually. </p> <p>I want to disable all the animations on mobile devices by setting the duration to 0.</p> <p>Is there a way to overwrite all the animation durations globally?</p> <p>something like this:</p> <pre><code> if (isM...
jquery
[5]
3,838,405
3,838,406
Android: Handler for AsyncTask
<p>I use AsyncTask in combination with a ProgressDialog. See my code, I have a problem in onPostExecute. If the task is running for the first time it get a Null Poiter Exception for progressDialog in handleMessage but calling dismiss() direct would work. When I turn the phone before onPostExecute is reached, progressDi...
android
[4]
1,566,607
1,566,608
How to overload methods with variable number of arguments?
<p>I have a class that holds a mysqli instance (this to avoid spreading database settings all over the source code).</p> <p>The class DB looks like:</p> <pre><code>class DB { private $mysqli; public function connect() { $this-&gt;mysqli = new mysqli("localhost", "user", "pwd", "db-name"); } ...
php
[2]
609,601
609,602
Fetch the data in dropdownlist from table using web service in android
<p>I want to display data in dropdown list from the table using of web service in android.i am not getting any idea can u help me.</p>
android
[4]
1,351,975
1,351,976
Pointer to lowest address in memory
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1001307/detecting-endianness-programmatically-in-a-c-program">Detecting endianness programmatically in a C++ program</a> </p> </blockquote> <p>I'm trying to check if I'm running a little or big endian OS.</p> <...
c++
[6]
1,044,663
1,044,664
Incorrect UUID format in component c#
<p>I need help with the next code, that throws the exception Error emitting 'System.Runtime.InteropServices.GuidAttribute' attribute -- 'Incorrect UUID format.'</p> <pre><code>[GuidAttribute(Discover.CLASS_DiscoverPlugin)] public class Discover : TCustomDiscoverPlugin { public const string CLASS_TenderDialogePlug...
c#
[0]
1,322,748
1,322,749
Emulator Not Working in Eclispe
<p>Hello everyone I can't seem to figure out why my emulator isn't working and I don't get the error in the console </p> <p>Here is what it says in the console </p> <pre><code>[2011-08-24 16:28:59 - MePlayer] Android Launch! [2011-08-24 16:28:59 - MePlayer] adb is running normally. [2011-08-24 16:28:59 - MePlayer] Pe...
android
[4]
2,144,805
2,144,806
Importing modules to a package
<p>Is there anyway I can import modules to a package level?</p> <p>for example, consider the following package:</p> <pre><code>- conf - __init__.py - general.py </code></pre> <p>Now I have another package:</p> <pre><code>- conf2 - __init__.py </code></pre> <p>I would like to be able to use <code>import conf2...
python
[7]
4,628,022
4,628,023
What is the equivalent of top.location in php?
<p>I am using javascript <code>top.location</code> to retrieve parent location through javascript</p> <p>What i wanted to know is there any way to get parent url through php? </p> <p>I have tried <code>$_SERVER</code> with different parameters but i am getting the child window url.</p>
php
[2]
1,266,971
1,266,972
Is this piece of Javascript inefficient?
<p>I was just wondering whether this snippet of Javascript is going to slow down my site:</p> <pre><code>$(function(){ var realLink = location.href; $( "#nav a" ).each( function( intIndex ){ String.prototype.startsWith = function(str){ return (this.indexOf(str) === 0); } var pageLink = $(this).attr("h...
javascript
[3]
242,760
242,761
What is the fastest/preferred way to store static data in android?
<p>I want to store around a thousand strings (like some quotes) and populate a <code>ListView</code> or <code>ListFragment</code> using them. These strings are static and not likely to change once loaded. </p> <p>It is a read-only data and user should not be allowed to manipulate it.</p> <p>Should i store them using ...
android
[4]
4,643,679
4,643,680
jQuery - Can't stop getting old submit values from a previous successful form submit
<p>Lets say I have a form:</p> <pre><code>&lt;form id="form1" method="post"&gt; &lt;ul&gt; &lt;li class="button"&gt; Button 1! &lt;input name="some_input" type="hidden" value="Number 1" /&gt; &lt;/li&gt; &lt;li class="button"&gt; Button 2! &lt...
jquery
[5]
5,867,600
5,867,601
When do I need to use the global keyword in python
<p>Okay, so I've had this really annoying problem where a variable got set locally but then outside of that function reverted to it's old self (in this case None), but at the same time I could manipulate other variables and still can without using the "global" keyword.</p> <p>I can't provide the real code for this but...
python
[7]
4,337,334
4,337,335
How can I pass a value as class private property
<p>is it possible for a class to accept a dynamic value and make it its private variable?</p> <p>example:</p> <pre><code>class test{ private $var = $x; private function fromUser($var){ //code here } } </code></pre> <p>i want <code>$x</code> to be dynamic like coming from a user input.</p>
php
[2]
3,548,045
3,548,046
How can I retrieve the name of the user's current city?
<p>I would like to retrieve an iPhoneOS user's current city. How can I do that?</p>
iphone
[8]
5,187,772
5,187,773
Javascript setTimeout
<p>Can you tell me why this works:</p> <pre><code>PageMethods.UpdateForcedDisposition(forcedDisposition, a.value, SucceededCallback, FailedCallback); </code></pre> <p>When this doesn’t?</p> <pre><code>setTimeout("PageMethods.UpdateForcedDisposition(" + forcedDisposition + "," + a.value + ", SucceededCallback, Failed...
javascript
[3]
5,260,647
5,260,648
Global keyboard input listener on Android
<p>I was wondering if it is possible to intercept keyboard input on a global level on Android. For example a user types in text into an edittext (does not matter which application) I would like to access said text to check for certain words. Is this even possible with Android's security model (yes I am aware this kind ...
android
[4]
1,321,237
1,321,238
How to make a C++ class compatible with stringstream objects?
<p>I would like to be able to serialize my C++ classes using standard techniques like std::stringstream or boost::lexical_cast.</p> <p>For example if I have a Point object (2, 4) then I would like to serialize it to "(2, 4)", and also be able to construct a Point object from this string.</p> <p>I have some code alrea...
c++
[6]
5,308,789
5,308,790
How to change String value after 5 sec?
<p>I'm willing to write program that after 5 sec shows text that was hidden and after another 5 sec changes both. Example: - program start: TEXT 1 - after 5 sec: TEXT 1 TEXT 2 - after 5 sec: TEXT 3 - after 5 sec: TEXT 3 TEXT 4 ...</p> <p>How I can in C# count those seconds? </p>
c#
[0]
3,524,472
3,524,473
Query about temporary objects
<p>In Exceptional C++, item 10, its talking about use of a temporary (if you have the book, top of page 35 "... namely, the copy of the returned temporary into the destination").</p> <p>The code is</p> <pre><code>template&lt;class T&gt; T Stack::&lt;T&gt;::Pop() { ... T result = ... return result; } ... string s1(...
c++
[6]
5,239,533
5,239,534
How to toggle GPS from an Android appwidget?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4721449/enable-gps-programatically-like-tasker">Enable GPS programatically like Tasker</a> </p> </blockquote> <p>I am making an app that shows gps icon as widget on home-screen. Now, i want to toggle GPS on or o...
android
[4]
3,627,808
3,627,809
Call java class method from jar (not main)
<p>I need to call specific <code>class</code> <code>method</code> from Jar. Is it possible ?</p>
java
[1]
2,480,078
2,480,079
Can you separate python projects logically into separate files/classes like in C#/Java?
<p>I'm looking to develop a project in python and all of the python I have done is minor scripting with no regard to classes or structure. I haven't seen much about this, so is this how larger python projects are done? </p> <p>Also, do things like "namespaces" and "projects" exist in this realm? As well as object o...
python
[7]
5,626,951
5,626,952
Select2 doesn't show selected value
<p>Select2 loads all items from my list successful, the issue I found when try to select a specific value when page loads. Example:</p> <p>:: put select2 in a specific html element, no value is selected even all items are loaded.</p> <pre><code>$('#my_id').select2(); </code></pre> <p>:: When the page is loaded I'm t...
jquery
[5]
6,007,153
6,007,154
adding incorrectly displaying
<p>Fixed my code up. However, now the alert pops up saying your value is NaN. However, it is a number. The parseInt, helped a little bit. I am most likely missing something. Right now my code looks like this:</p> <pre><code> &lt;input id="a" type="text"&gt; &lt;script&gt; function myFunction() ...
javascript
[3]
3,060,658
3,060,659
global space function inside a namespace
<p>How can I declare the bellow function in the global space?</p> <pre><code>namespace something\else; function example() { #some code here } </code></pre>
php
[2]
2,081,510
2,081,511
how to replace substring with particular value dynamically?
<p>I have values in my properties file like,</p> <blockquote> <p>bloodpressure.properties :<br> (key,value) : (bloodpressure,your blood pressure was <strong><em>B6</em></strong>, this is high)</p> </blockquote> <p>In My java class, i am reading values from properties file but i want to replace values with cal...
java
[1]
4,272,188
4,272,189
Change in converted time using TimeZone
<p>I have problem with the date time conversion the code is given below</p> <pre><code>DateTime indianStd = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow, "India Standard Time"); DateTime MyanmarStd = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow, "Myanmar Standard Time"); DateTime SEAsia = ...
c#
[0]
5,225,407
5,225,408
When to use on("selector") and when on("selector", "selector")
<p>Using jQuery <code>on()</code> version 1.7. I bind my events usually like this:</p> <pre><code>$(".foo").on("click", function() { console.log("foo clicked"); }) </code></pre> <p>Now after seeing someone elses code, I seen you also can bind like this, specifying a secondary parameter for a specific element (Not...
jquery
[5]
2,120,906
2,120,907
Jquery - Access DIV inside a td tag
<p>I am having trouble accessing a div element within a table. </p> <pre><code>// All within document ready ... $('.ChangeStatus').click(function() { $('#status_display:100').html('Updated'); }); </code></pre> <p>Here is the HTML</p> <pre><code>&lt;td&gt; &lt;div class="status_display" id="status_disp...
jquery
[5]
4,336,630
4,336,631
Instantiating a nib object to present in a view
<p>I have a LegendViewController that shows a legend. Originally, I just plopped an UIImageView in there. However now, we need a few legends and I want to reuse the LegendViewController. So I created a new initializer:</p> <pre><code>- (id)initWithView:(UIView *)view withNibName:(NSString *)nibNameOrNil bundle:(NSB...
iphone
[8]
4,538,660
4,538,661
Do I need to declare the iterator inside a for loop?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/790558/variable-scope-in-javascript-for-loop">Variable scope in Javascript for loop</a> </p> </blockquote> <pre><code>for(i=0;i&lt;4;i++){ } </code></pre> <p>Do I need to say:</p> <p><code>for(var i=0;i&lt;4;...
javascript
[3]
4,651,189
4,651,190
In Android, What is the x y origin value of Touch/click on app screen?
<p>When I develop a app, I click at the up-left corner, I got x=0 y=59 or something. How do I determine the y value? There are two rows above my Touchable screen in my app: 1 first line/row is a tool/status bar which I don't know how to access it 2. next line is my app name like "Hello World". I think this two play a r...
android
[4]
1,759,639
1,759,640
Java switch (use values in a case calculated in another case)
<p>I'm making a program that has menus and I'm using switch to navigate between the menus.</p> <p>I have something like this:</p> <pre><code>switch (pick) { case 1: // Here the program ask the user to input some data related with students (lets say // name and dob). Student is a class and the students dat...
java
[1]
1,415,107
1,415,108
C# How do I make a switch ignore invalid input?
<p>I am trying to make a simple console game that starts with a title screen. The user inputs 'N' for a new game, 'L' to load a game, or 'E' to exit. I have this set up as a switch, but I need to know how to make the program ignore any input other than the aforementioned keys. I've Googled this question but didn't find...
c#
[0]
600,814
600,815
Increasing maximum execution time
<p>My code reads from xml file and saves data in mysql database. Through the code it iterates around 8000 times. In the localhost i added the following code in index.php: </p> <pre><code> ini_set('max_execution_time', 8000); ini_set('memory_limit','512M'); </code></pre> <p>But its not working in the server. Wh...
php
[2]
1,645,575
1,645,576
chain functions directly to newly created object instance in Javascript
<p>In my ongoing saga to understand more about Object Oriented Javascript - I came across a question about creating a class to respond to the following API:</p> <pre><code>var foo = new bar().delay(750).start().then(onComplete); var bar = function() { this.delay(function(per) { //... }; } </code></pre> ...
javascript
[3]
4,388,345
4,388,346
JavaScript how to get tomorrows date in format dd-mm-yy
<p>I am trying to get JavaScript to display tomorrows date in format (dd-mm-yyyy)</p> <p>I have got this script which displays todays date in format (dd-mm-yyyy)</p> <pre><code>var currentDate = new Date() var day = currentDate.getDate() var month = currentDate.getMonth() + 1 var year = currentDate.getFullYear() docu...
javascript
[3]
5,218,087
5,218,088
How do I support my iOS 3.1.2 users now that I've upgraded to Xcode 3.2.3?
<p>I recently released a new version of my iPhone app that was built for iOS 3.1.2. Now I want to release a very small bugfix update, but in the time between my last release and now, I've upgraded Xcode to 3.2.3 and upgraded my test iPhone to 4.0.</p> <p>Since these are very simple changes, I want my iOS 3.1.2 users ...
iphone
[8]
396,530
396,531
"Select / Unselect" multiple select fields
<p>I have a multiple select fields defined in a table column, </p> <pre><code>&lt;table border=1&gt; &lt;tr&gt; &lt;td&gt;THIS IS THE PLACE TO SELECT THE PROJECTS&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td id="select_project"&gt; &lt;select class="projects" id="projects" multiple="multiple"...
jquery
[5]
3,365,584
3,365,585
how to read a file from a Jar file located on remote server
<p>I want to read and copy file from jar file(for eg. application.xml from EAR )located on remote server to local machine. when i search on net for this, i found java.util.jar.JarFile API. This API read jar only from local machine as it takes only string as input and not URL for jar location in constructor. I know ...
java
[1]
1,197,289
1,197,290
how to display 2011-01-27-123907 instead of 20110127123907 (php)
<p>what is the easiest way of </p> <p>displaying string <strong>2011-01-27-123907</strong> instead of <strong>20110127123907</strong> </p> <p>without writing special function for it?</p>
php
[2]
1,582,782
1,582,783
Java unknown output
<p>Soo this problem involves me rolling a pair of dice and estimate the probability that the first roll is a losing roll (2, 3, or 12). </p> <p>output is the count of rolls that were losers (2,3, or 12) and calculated probability (count/N) </p> <pre><code> public static void main(String [] args){ int N1 = (in...
java
[1]
1,194,622
1,194,623
Asign click handler to newly appended elements
<p>How does one go about adding a click handler in the following example? I need to assign it to the newly appended anchor element.</p> <pre><code>$.each(regions1, function(key, value) { var coords = regions1[key].rel.split('-'); $("#map").append("&lt;a href='javascript:void(0)' id='"+ regions1[key].id +"' c...
jquery
[5]
1,337,801
1,337,802
How can I multiply a value from a radio button by a number in Javascript and have the answer display in a textstring inside a textarea?
<p>I need to have the user_input from the radio button multiplied by an integer. The user_input is either 1,2, or 3. I can get the radio button value pulled through into the textarea, but how do I take that number and multiply it by something? Ideally, I need textstring += 'Fee (£): ' + (user_input) * '5' + '\n';</p> ...
javascript
[3]
3,250,453
3,250,454
How do I cut out the middle area of ​​the bitmap?
<p>How do I cut out the middle area of ​​the bitmap? it's my sample code:</p> <pre><code> public void onPictureTaken(byte[] paramArrayOfByte, Camera paramCamera) </code></pre> <p>{</p> <pre><code> FileOutputStream fileOutputStream = null; try { File saveDir = new File("/sdcard/CameraExample/"); if (!sa...
android
[4]
2,857,881
2,857,882
With root access, how do I access the OS-level notification system?
<p>I am using a phone without LED notifications. I would like to dev an app to simulate that, however first, with root, I would like to get access to the notifications system on the OS level (so it can be app-agnostic), to get the notifications.</p> <p>How can I do so, or where can I read up more about this?</p> <p>T...
android
[4]
3,702,068
3,702,069
Pause opening div onmouseover
<p>I am wondering how to open a hidden div with javascript but after a user has hovered over a link for one second rather than immediately. I want to do this, as right now you sweep the mouse across the page and these divs open even though I haven't purposely hovered over them. I <strong>dont</strong> want to use jQue...
javascript
[3]
1,692,354
1,692,355
Class A not visible in class C but visible in main. Why?
<pre><code>class A {}; class B : private A { }; class C : public B { public: void f() { A a; // This line causes error, but works when it is in main() function } }; int main() { C c; // A a; --&gt; This line works return 0; } </code></pre> <p>I am guessing this has something to do with...
c++
[6]
72,188
72,189
self.close() is not working
<p>self.close() is not working in a screen of my application. In other screens it is working fine.But in a particular screen some times it is working and some times not.i couldn't find out in what occasions/scenario it is not working.</p> <p>Following is code which is not working?</p> <pre><code>&lt;logic:equal name=...
javascript
[3]
3,769,657
3,769,658
work sun.misc.BASE64Encoder/Decoder for getting byte[]
<p>I am trying to use sun.misc.BASE64Encoder/Decoder, but this code:</p> <pre><code>(new sun.misc BASE64Encoder()).encode(new sun.misc.BASE64Decoder().decodeBuffer("test string XML:")) </code></pre> <p>returns "test/string/XML/" I am embarrassed</p>
java
[1]
1,487,617
1,487,618
Loop from x1,y1 to x2,y2, no matter in which order they are
<p>I want to be able to select part of an image via two Points (p1,p2). My problem is that I want to use the same loop regardless in which order they are.</p> <p>right now I have this:</p> <pre><code>for (int x = p1.X; x != p2.X; x += Math.Sign(p2.X - p1.X)) { for (int y = p1.Y; y != p2.Y; y += Ma...
c#
[0]
5,408,882
5,408,883
Android: AsyncTask vs Service
<p>Why do I read in the answer to most questions here a lot about <a href="http://developer.android.com/reference/android/os/AsyncTask.html"><code>AsyncTask</code></a> and Loaders but nothing about <a href="http://developer.android.com/guide/topics/fundamentals/services.html">Services</a>? Are Services just not known v...
android
[4]
4,512,153
4,512,154
Datepicker inside sj:dialog is not showing a the top of the page
<p>I'm using the struts2 jquery plugin to show a dialog box. It contains a datepicker element that shows behind the &lt; sj:dialog >. Obviously that's a problem.</p> <p>One problem i noticed is that the element datepicker doesn't append to the dialog element and that the z-index of the dialog is updated dinamically.</...
jquery
[5]
4,146,121
4,146,122
IP-addresses stored as int results in overflow?
<p>I'm writing a chat-server in node.js, and I want to store connected users IP-addresses in a mysql database as (unsigned) integers. I have written a javascript method to convert an ip-address as string to an integer. I get some strange results however.</p> <p>Here is my code:</p> <pre><code>function ipToInt(ip) { ...
javascript
[3]
5,016,559
5,016,560
if ArrayList contains doesn't work
<p>i'm curently developing app which has lots of ArraYlists and it needs to compare them with nonlist data. When i try this method <code>fdata.contains(data2)</code> it always returns false. ArayLists contains class named 'favdat' which looks like this:`</p> <pre><code>public class favdat { public String product,t...
android
[4]
2,679,265
2,679,266
php not working on my VPS
<p>This is my phptest.php file:</p> <pre><code>&lt;?php echo "Hello"; ?&gt; </code></pre> <p>But when I try 'http://serveraddress/phptest.php'on my browser,it does not work properly and shows the whole php file on my browser.</p> <p>I am using CentOS 5 and PHP version is 5.2.5. When a type 'php phptest.php' on the...
php
[2]
3,458,004
3,458,005
Is there any advantage of of using comma over + to concatenate primitive types in Javascript?
<p>I have seen commas to concatenate primitive data types in Javascript and was wondering whether there was any difference in using a comma over say the <code>+</code> operator as well as the .concat() function?</p> <p>So an example the following statement gives me abc</p> <pre><code>var value1 = a, value2 = b, value...
javascript
[3]
1,638,428
1,638,429
Converting from Editable to int in android
<p>I want to convert the type <code>Editable</code> from an android <code>EditText</code> to the type integer to do maths operations on a user input number</p> <p>I tried the following:</p> <pre><code>int x=(int)R2.getText().toString(); </code></pre> <p>but it gives me an error of cannot convert a string to int.</p>...
android
[4]
1,801,962
1,801,963
Is there a binary difference and patch algorithm (library) for buffers not files?
<p>Is there an algorithm for getting the difference between two buffers in run time (not two files) and applying patch also on a buffer ?</p>
c++
[6]
1,018,363
1,018,364
What does "variable = variable || {}" mean in JavaScript
<p>What does this initialization of a variable stand for:</p> <pre><code>var variable = variable || {} ; </code></pre> <p>How and when should it be used?</p>
javascript
[3]
5,476,808
5,476,809
jquery datepicker refresh method is not working
<p>I am highlighting some days in a month depending on the data coming from backend . When i cahnge month or year , again am calling ajax call . But datepicker shows only previous dates . My code is as follows,</p> <pre><code>$("input.dC").live('click',function() { $(this).datepicker({ showOn:'focus', changeMonth:'tru...
jquery
[5]
3,722,099
3,722,100
Modern C++ Game Programming Examples
<p>To what extent are modern C++ features like:</p> <ol> <li>polymorphism, </li> <li>STL, </li> <li>exception safety/handling, </li> <li>templates with policy-based class design, </li> <li>smart pointers</li> <li>new/delete, placement new/delete</li> </ol> <p>used in game studios? I would be interested to know the na...
c++
[6]
2,689,656
2,689,657
Message Format using C#
<p>I was trying to convert a sample win form app to console application.I just stuck when am trying to convert to message format.</p> <p>Here is the below original code from winform</p> <pre><code>private void PutMessage(StringBuilder message, string mediaType, string filename) { message.AppendFormat(messageForm...
c#
[0]
2,285,131
2,285,132
What is the differnce between "!" and "!!"
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/784929/what-is-the-not-not-operator-in-javascript">What is the !! (not not) operator in JavaScript?</a> </p> </blockquote> <p>I removed !! and put in ! and it broke my code...googled javascript !! and got nothin...
javascript
[3]
873,923
873,924
event.srcelement || event.target dosent work in ff
<p>hi my code dosent work in ff ... event.target and event.srcelement and </p> <p>window.event.srcElement; dosent work in firefox ... please help me </p> <p>my version of fire fox is : 15.01</p>
javascript
[3]
5,133,436
5,133,437
How to get the id of an anchor tag in jQuery?
<p>How to get the id of an anchor tag in jQuery? This is the tag.</p> <pre><code> &lt;ul class="formfield"&gt; &lt;li class="selected"&gt;&lt;a href="" id="text"&gt;Text&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="" id="textarea"&gt;Textarea&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>I need to get th...
jquery
[5]
3,035,741
3,035,742
ASP.Net not populating Request.Files on receiving multipart data
<p>I'm sending files from an android app to a asp.net webform using multipart/form-data as the content type. However the Request.files property does not get populated. Reading the Request object I get the following</p> <p>Request.Params("ALL_HTTP")</p> <p>"HTTP_CONNECTION:Keep-Alive HTTP_CONTENT_LENGTH:8913 HTTP_CO...
asp.net
[9]
1,001,774
1,001,775
Invoking a method in all class's objects simultaneously in java
<p>I have a problem in java programming , how can i make all objects of a class invoke a method of themselves simultaneously in java ?</p> <p>thank in advance.</p>
java
[1]
3,017,644
3,017,645
Browse a Windows directory GUI using Python 2.7
<p>I'm using Windows XP with Python 2.7.2 &amp; Tkinter GUI kit. I want to build a simple GUI that has a text field and "Browse" button that will select a file through directories such as C:\ (Just like Windows Explorer). That file selected will be displayed in the text field in the GUI. Hope this is descriptive eno...
python
[7]
2,157,554
2,157,555
aliasing basic types and constants in C#
<p>We have a C++ code that defines a unified naming convention (majorly for multiplatform reasons).<br> For example:</p> <p><code>#define FOO_UINT32 unsigned long</code><br> and <code>#define FOO_TRUE true</code> </p> <p>now, we want to port some of this code to C#.<br> For the first define in the example I figured ...
c#
[0]
2,235,912
2,235,913
getPreferences(MODE_PRIVATE) is undefined in BroadcastReceiver
<p>I have application with an activity and a service, I need to save some value in the activity and retrieve in the service.</p> <p>i could save the value using SharedPreferences in the activity, however, when I try to retrieve the value in the BroadcastReceiver, it says <strong>getPreferences is undefined for serv...
android
[4]
5,077,138
5,077,139
Difference between: $_SERVER['SCRIPT_NAME'] and $_SERVER['PHP_SELF']
<p>What is the difference between:</p> <pre><code>$_SERVER['SCRIPT_NAME'] </code></pre> <p>and</p> <pre><code>$_SERVER['PHP_SELF'] </code></pre> <p>Thank you.</p>
php
[2]
3,259,960
3,259,961
Android: Example for using a cookie from HttpPost for HttpGet
<p>I am able to use the example here: <a href="http://www.androidsnippets.org/snippets/36/index.html" rel="nofollow">http://www.androidsnippets.org/snippets/36/index.html</a> and successfully get the "HTTP/1.1 OK" response for a webesite I am sending the HttpPost along with the user credentials. However, I am unable to...
android
[4]
366,287
366,288
Style a certain character in a string
<p>I want to style a certain character in a string via jQuery, but have no clue how to approach that. I have the following situation</p> <p><pre><code>&lt;a href="" accesskey="i">Link&lt;/a></pre></code></p> <p>Now i want to underline the character in the <code>accesskey</code> (so the <em>'i'</em> in this case) in t...
jquery
[5]
5,764,853
5,764,854
Jquery: Return the value of a ajax call to caller function?
<p>Im trying to return the value that a $ajax call returns, from a function but it only returns "undefined". If a alert the "reponse" from the ajax call it returns the rigth value. Here is the code, what am i doing wrong?:</p> <pre><code>$(".insertCandidate").live("click", (function(e) { var ids = this.id....
jquery
[5]
1,166,817
1,166,818
How to check email id existance in java script?
<p>I am taking emails id's on input form along with other details like name, address,contact no etc. Now, User can enter any email id's.</p> <p>e.g. abc@abc.com</p> <p>I can do check for standard domain whether is it present or not. but Is there any way available to check that email id exist or not?</p> <p>Is there ...
javascript
[3]
361,461
361,462
c# Short cut for enumerable list
<p>I have the following C# list code,</p> <pre><code>globalFaiths.AddAll( IEnumerable&lt;Religion&gt; religions ) </code></pre> <p>I call it like this</p> <pre><code>globalFaiths.AddAll(new Religion[]{Bahai,Christian,Islam}); </code></pre> <p>Is there a shoter way to send in <code>Bahai,Christian,Islam</code> to th...
c#
[0]
2,516,479
2,516,480
XCode 3.2 version: now I can't compile
<p>I have this IPhone app underway that was working fine, then I installed OS 10.6 and the shiny new XCode.</p> <p>It's not compiling, instead coming up with the single error,</p> <pre><code>"There is no SDK with the name or path 'iphoneos3.0'" </code></pre> <p>I can't find such a file or folder on my hard drive.</p...
iphone
[8]
211,316
211,317
What does "->" mean in php?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3737139/reference-what-does-this-symbol-mean-in-php">Reference - What does this symbol mean in PHP?</a> </p> </blockquote> <p>What exactly does -> do in php? </p> <p>I have a good understanding of the basics of...
php
[2]
761,527
761,528
How to create an executable jar with dependancy jars
<p>Hi I have created a java application which depends upon some external jars. Now I want to create an executable jar for my project. Means if i double click the project then it should execute.</p> <p>Thanks Sunil Kumar Sahoo</p>
java
[1]
477,393
477,394
Generate max 'N' values from javascript array
<pre><code>var arr = new Array(2, 4, 9, 1, 5, 7, 10) </code></pre> <p>I want function that gets max value, than takes it out of an array and gets another max value.</p>
javascript
[3]
4,467,276
4,467,277
Is it possible to make the execution of a program skip fprintf-statements/How to create my own fprintf-function?
<p>In my C++-code there are several fprintf-statements, which I have used for debugging. Since I might need them again, I would prefer not to comment them out for the moment. However, I need the execution of the program to be fast, so I would like to avoid them being printed out, as they are for the moment (I redirecte...
c++
[6]
791,540
791,541
How to get Android rich text editor to compile correctly?
<p>I downloaded the source code for a rich text editor from:</p> <p><a href="http://code.google.com/p/android-richtexteditor/" rel="nofollow">http://code.google.com/p/android-richtexteditor/</a></p> <p>and the code will not compile correctly. The errors I get are: </p> <pre><code>"Unable to resolve target 'android-4...
android
[4]
4,433,894
4,433,895
Loading all objects with class into an array using jQuery
<p>I have a bunch of div's on my page with class testClass.</p> <p>I want to load them into an array and then check the array's size.</p> <p>But its not working?</p> <pre><code>myArray = $('testClass'); alert(myArray.count); </code></pre> <p>What's wrong?</p>
jquery
[5]
1,100,495
1,100,496
Java : Why exception is not being caught inside the Second Method catch block
<p>I have this method calling the below method , i am purposufully providing a wrong port number for the URL to be connected . But to my surprise , the exception produced is being caught in first Method catch block Why it is not being handled inside the executeData Method's catch block ??</p> <pre><code>**1st M...
java
[1]
3,320,044
3,320,045
jQuery - Why won't select box info duplicate but the rest will
<p>I'm using the code below to try and duplicate information from one set of address fields to another set when a checkbox is checked. All of it works except for the state select box (drop down box). It's driving me crazy. </p> <pre><code> //on page load $(document).ready(function() { //when the checkbox is checked ...
jquery
[5]
4,548,479
4,548,480
How can I get files from the iDisk programmatically?
<p>I need to write an iPhone app that allows the user to download and use files (more specifiably, video files) that are on the Mobile Me iDisk. Is this possible? I was not able to find an iDisk API for Objective-C.</p>
iphone
[8]
505,340
505,341
Opening a "Print Preview" for a PDF
<p>How do I open a <em>Print Preview</em> dialog for a PDF file using jQuery?</p>
jquery
[5]
363,166
363,167
How to shutdown an android mobile programatically?
<p>Is it possible to shutdown the mobile programatically. that is with out using su commands..</p>
android
[4]
1,461,353
1,461,354
iPhone Optimal Stack Data Storage
<p>I have a set of data that I need accessible insdie my iPhone app. The data is constant and currently in a simple CSV format. One of the columns could easily be used as a key in a dictionary but what is the most efficient way to have this const data accessible inside the app? I'm thinking instantiating and populating...
iphone
[8]
3,510,463
3,510,464
Problem When Using More Than Two Wildcards
<p>I am trying to write a program that will take specified letters and wildcard characters(<code>'*'</code>) and check them against words in a list to print all available matches. I have written the below code which will work when two wildcard characters are used:</p> <pre><code>def wildcard_search(letters, count): ...
python
[7]
2,797,901
2,797,902
What is the use of @property (nonatomic, retain) statement in the application ?
<p>i m a beginner iphone developer and i want to know about what is the use of @property (nonatomic, retain) statement with example , any body can give me any answer ?</p>
iphone
[8]
4,964,162
4,964,163
Google SafeBrowsing Lookup API - PHP
<p>I'm trying to request information about a domain without success; code:</p> <pre><code>&lt;?php echo file_get_contents('https://sb-ssl.google.com/safebrowsing/api/lookup?client=asasd&amp;apikey=MYKEY&amp;appver=1.5.2&amp;pver=3.0&amp;url=http%3A%2F%2Fwww.onet.pl%2F'); ?&gt; </code></pre> <p>Why isn'tit working?<...
php
[2]
3,289,795
3,289,796
Java garbage collection mechanism
<p>When we write like this: { new A().test(); } The memory of A will be collected by gc after this function return(I knew that it's possible for collection, not be collected right now). The question is, how does the jvm make sure the memory of A won't be realise during the test() excuting(I assume the gc is...
java
[1]
1,757,349
1,757,350
simple intro java game programming
<p>My question is where did i go wrong. it is supposed to make a frame where i can control an oval, move it around back forth left and right, and then make it move with the arrows. but right now i cant even make the oval, or even insert a word into it.</p> <pre><code>import java.awt.Graphics; import java.awt.event.Key...
java
[1]