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,769,280
1,769,281
What is usage of parameter tag used in TabHost.newTabSpec
<p>May I know, for the following code.</p> <pre><code>// Initialize a TabSpec for each tab and add it to the TabHost spec = tabHost.newTabSpec("artists").setIndicator("The Artists", res.getDrawable(R.drawable.ic_tab_artists)) .setContent(intent); </code></pre> <p>What is the purpose of...
android
[4]
5,575,459
5,575,460
adding scoring feature on android app
<p>Hi I have a spelling game application and it has 10 stages on it. There is a category assigned on each stages for example Stage 1 Animal, Stage 2 Things etc. and there are few questions per stages as well. Now I want to add scoring feature on it that will increment for every correct answer and deduct for every wrong...
android
[4]
2,557,826
2,557,827
Jquery remove form tag, not content
<p>Hello i need to remove a form tag but non the content:</p> <pre><code>&lt;form id="form"&gt; &lt;div&gt; not remove this only the form tag&lt;/div&gt; &lt;/form&gt; </code></pre>
jquery
[5]
5,359,380
5,359,381
Iphone Undocumented/Private API vs. Toolchain
<p>Excuse me if this is a "sparse" question but, I'm somehow confused wit the terms of "Undocumented API call" and "Toolchain" (of Saurik). </p> <p>Are they same? Or toolchain is "yet another wrapper" for Undoc. APIs? Or entirely different things? </p> <p>And what place does Erica Sadun's work sit in these definition...
iphone
[8]
4,821,607
4,821,608
Check for IE compatibility jquery
<p>To check if user is using IE should this work : </p> <pre><code>if( $.browser.msie) alert('in IE'); </code></pre> <p>Is this applicable to all versions of IE ?</p>
jquery
[5]
4,916,368
4,916,369
Android: how to show a toast before forcing the closure of the app?
<p>i've to show a toast and after to force the closure of the app if there isn't an internet connection, but if i show only the toast everything is ok:</p> <pre><code>Toast.makeText(getApplicationContext(), "Nessuna connessione", Toast.LENGTH_LONG).show(); </code></pre> <p>if i make this:</p> <pre><code>Toast.makeTe...
android
[4]
4,352,725
4,352,726
loop through two sql queries php
<p>Hi I have two tables (users &amp; friends) I need to connect to the friend table to bring all the friends for a user id, then connect to the user table and bring the information for that user, using the friend id. I have the code below but this only brings one user.</p> <p>It needs to count the number of users onli...
php
[2]
1,843,725
1,843,726
How to upgrade android x86 image over USB?
<p>I wanted to upgrade X86 image over USB.How this can be done? Which files in source tree is responsible for that? Thanks in advance.</p> <p>Note:- Suggestion for any android release is ok</p>
android
[4]
3,362,807
3,362,808
Stopping action if requirements are not met
<p>I want to check the validation of two text boxs if either one is empty. It showed show an error as an innerHTML and if they are both filled in. It will then continue to action. Here is my code:</p> <pre><code>function go() { var toCheck = document.getElementById('myAnchor'); if (toCheck != '') { return tru...
javascript
[3]
1,609,327
1,609,328
CodeIgniter - Combine form validation and file upload
<p>I would like to create file upload with some fields for title and summary of upload file. I have also looked at <a href="http://stackoverflow.com/questions/5177421/codeigniter-form-validation-and-file-upload-data">this</a> question, but I don't understand it completly.</p> <pre><code>function someform() { // som...
php
[2]
1,193,190
1,193,191
Debug: find the middle word(s) in a list of words
<p>Purpose: find the middle word(s) in a list of words</p> <p>Attempt: </p> <pre><code>words = ['Baa', 'Baa', 'black', 'sheep', 'have', 'you', 'any', 'wool'] s=words.split('') length = len(words) if length % 2 == 1: print s(length/2) else: print s((length/2) + ((length/2) +1)) </code></pre> <hr> <pre><code>Er...
python
[7]
647,097
647,098
Convert a negative number to a positive one in JavaScript
<p>Is there a math function in JavaScript that converts numbers to positive value?</p>
javascript
[3]
6,007,830
6,007,831
what is the function to get pixel information in opengl es 1.1
<p>can anyone tell me which function to use in order to get pixel information</p>
iphone
[8]
1,310,481
1,310,482
Best way to learn PHP
<p>I learned a little bit of C, C++ and Java in highschool.I haven't really done much of that since then. Its been like 3 years. I can write simple programs that uses loops, switches and simple functions in C and C++ but don't really know much about Structure, Pointers, Array, Class etc. I now run a web development com...
php
[2]
1,792,104
1,792,105
How to get the rotation of image then assign to listview in Android
<p>I'm trying to load all the records in my database then assign them to my listview. But there are some photos will not be loaded in the right rotation. All I want to do is check the rotation of the photos before assigning them to the list view. But I don't know how to do it. Please help me out. Thank you very much. ...
android
[4]
2,979,773
2,979,774
How to force Scrollable Fragments that each take up the width of the screen to only show one at a time?
<p>Hopefully what I am asking makes sense. Lets assume I want to use, say a HorizontalView, and add 3 Fragments to it. Normally it would scroll, but you could end up with half of two views showing. I want to force the Fragments to automatically fall into place to show only one. I would also not mind another implementat...
android
[4]
4,925,018
4,925,019
How to post data in part of a form using jquery
<p>I have a form like this:</p> <pre><code>&lt;form id="abc"&gt; &lt;div id="xyz" &gt; //some elements &lt;/div&gt; &lt;/form&gt; </code></pre> <p>I have bound the submit event like this:</p> <pre><code>$(function(){ $('#abc').submit(function(event){ //I want to post the data (form fields stored in element 'xy...
jquery
[5]
2,758,877
2,758,878
"&" meaning after variable type
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/57483/what-are-the-differences-between-pointer-variable-and-reference-variable-in-c">What are the differences between pointer variable and reference variable in C++?</a><br> <a href="http://stackoverflow.com/quest...
c++
[6]
4,936,359
4,936,360
Do ECHO and PRINT automatically escape single quotes?
<p>I'm just working my way through PHP from ASP, so seeing a few irregular things happening (irregular to me only of course).</p> <p>I have a search textbox, when somebody makes a search I'd like to keep the current search term in the textbox. I have done this by storing the term in a SESSION and echoing it in the tex...
php
[2]
5,590,987
5,590,988
for a server with potentially long execution time, how to return result to a user timely and do not overload the server with excessive requests?
<p>I have a server with a web interface, through which a task is submitted to the server and the result is returned to the user as a web page. Sometimes the result is generated on the fly, sometimes it may take several hours. The result is written on disk and <code>check_status</code> function periodically checks wheth...
php
[2]
4,720,829
4,720,830
java.nio.channels.ClosedChannelException
<p>How can i solve this problem. I got following error:</p> <p>java.nio.channels.ClosedChannelException </p> <p>This is coding:</p> <pre><code> public void run() { try { SocketChannel socketChannel = (SocketChannel) key.channel(); ByteBuffer buffer = ByteBuffer.allocate(512); int i1...
java
[1]
1,423,724
1,423,725
Implementing Webview to get text wrapping around an imageview
<p>I've been researching and was surprised to find out that there was no text wrapping feature. However, I did see many suggest that webview might be an option to display such a thing. I've used webview to load a url, but how would I use it to display a body of text and image that is retrieved from a web service from w...
android
[4]
5,907,770
5,907,771
Python programming - Windows focus and program process
<p>I'm working on a python program that will automatically combine sets of files based on their names. </p> <p>Being a newbie, I wasn't quite sure how to go about it, so I decided to just brute force it with the win32api. </p> <p>So I'm attempting to do everything with virtual keys. So I run the script, it selects th...
python
[7]
4,376,583
4,376,584
Is there a way to skin an extender on top of a control?
<p>I have a project where i want (almost) all controls of the same type to also have an extender set with the SAME properties - is there some way to skin the existence of that extender instead of placing it on each and every control?</p>
asp.net
[9]
5,172,614
5,172,615
Compilation Error on #include <algorithm> Algorithm:No such file or Directory
<p>I want to use OpenCV and Open SURF libraries in one project along with ARToolKitPluas then it gives me error <strong>"Algorithm:No such file or Directory"</strong> which i tried my best to fix but can't. Please Help me. Really i am in trouble and need your help.</p> <p>Thanks</p>
iphone
[8]
3,717,911
3,717,912
Fetching the value from textField
<p>how to fetch value from TextField dynamically in iphone xcode</p>
iphone
[8]
5,858,682
5,858,683
Is there a way to check how much of the picture has been loaded, in pixels, from the top?
<p>The heading sums is all. Though, the case is where I have a long (20x2000px) picture as a sprite for thumbnails. It would be nice if I could start showing the sprite only for the thumbnails that already have required-part of the sprite loaded, and show loader in the meantime.</p> <p>All I need is to know how much o...
javascript
[3]
3,791,423
3,791,424
Android animation moves the Layout, but not the buttons
<p>Say I have a "main screen" Layout which has to move up, to reveal a "history bar".</p> <pre><code>if ( HistoryBar == false ) { HistoryBar = true; TranslateAnimation MainScreenPullUp = new TranslateAnimation(0, 0, 0, -200 ); ...
android
[4]
3,263,050
3,263,051
How do you implement the factorial function in C++ with proper error handling?
<p>I asked this before but it was closed by people who didn't understand the question. I'm not looking for just a loop, I am looking for how you would do it for production code with stuff like error handling for arguments and overflows.</p> <p>And please don't just say "use library X" unless you can link to the code f...
c++
[6]
4,086,053
4,086,054
Combine multiple selector with filter
<p>Is there a way to combine a multiple selector and a basic filter within a single query? </p> <p>For example...</p> <pre><code>var jq = $(someElement); // Want to find the first following sibling node which has either classA or classB. // This imaginary jquery does not quite work. jq.nextAll("(.classA, .classB):...
jquery
[5]
2,604,203
2,604,204
Position control and label horizontally
<p>I am asking myself why this is showing the TextBox and the Label horizontally:</p> <pre><code>&lt;tr&gt; &lt;td&gt; &lt;asp:TextBox ID="txtDateFrom" onkeypress="return CheckValid();" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;asp:Label ID="lblErrorBirthDay" runat="server" ForeColor="Red" Text="...
asp.net
[9]
4,610,783
4,610,784
Wizard with jQuery accordion, previous / next buttons
<p>I'm trying to make a wizard inside a accordion. Look at my code:</p> <p><a href="http://jsfiddle.net/NDncE/2/" rel="nofollow">http://jsfiddle.net/NDncE/2/</a></p> <p>What am I doing wrong, I want the previous and next button on each accordion element.</p>
jquery
[5]
5,831,984
5,831,985
bufferedReader for URL throws IOException
<p>I got my code to connect to my computers php file and output the correct text in a java program. When I tried to add it to my android project inorder to display high scores It always throws an IOException and I can't figure out why. Here is my code. Any help would be appreciated.</p> <pre> package com.enophz.sp...
android
[4]
2,138,521
2,138,522
div container fading out does not work
<p>I want that the content goes to 50% when I hover over the menu bar. For whatever reasons I don't get it done. I get it doen on a testing page where I just have 2 divs. As soon as I have more divs it does not work. Why not??? The page I am referring to is <a href="http://www.guntmarwolff.com/eigenschaftenv.php" rel=...
jquery
[5]
5,469,568
5,469,569
how to convert string to datetime.timedelta()?
<p>how can i convert my string of date to a datetime.timedelta() in python?</p> <p>I have this code :</p> <pre><code>import datetime date_select = '2011-12-1' delta = datetime.timedelta(days=1) target_date = date_select + delta print target_date </code></pre> <p>thanks in advance ...</p>
python
[7]
1,891,959
1,891,960
How to convert longitude and Latitude into xy location on a 2d world map
<p>I need to mark an object on a 2d map using c#. The first thing I need to resolve is converting the latitude and longitude of that object into xy location on the map. Does anyone knows how to do that and what's the logic behind the algorithm? How can we make sure a point on the 2d world map is corresponding to a real...
c#
[0]
4,547,213
4,547,214
How to know me screen is visible or not when iI repalced with image?
<p>Iam working with grphics,when I touch the screen at that point screen will be replaced by Image. when my entire screen is covered by images, then a button has to come for refreshing the screen. How i can do this?</p>
android
[4]
4,842,115
4,842,116
how to programmatically hide a button in android sdk
<p>i have a relative layout which contains two buttons.which are overlapped on each other.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:lay...
android
[4]
1,313,099
1,313,100
How to identify an imageview drawable?
<p>There's an <code>ImageView</code> in my app with a drawable that can be changed by the user and a black <code>TextView</code> over it. If the user changes this image to one with a black background, he won't be able to see the text.</p> <p>How can I identify if the image resource is <code>R.drawable.imageA</code> so...
android
[4]
978,875
978,876
when a form is set as topmost detecting desktop or other windows show?
<p>I have noticed however that a form that is set as Topmost does not actually stay displayed when the show desktop button is pressed! I want to detect other form over the topmost event.</p>
c#
[0]
1,257,222
1,257,223
Question about android's time and date format
<p>There is some source code in android about the Time and Date Format, I need the lock screen will show time and date format when I set them in system. Can the code achieve it ?</p> <pre><code>public void onTimeChanged() { refreshTimeAndDateDisplay();} private void refreshTimeAndDateDisplay() { mTim...
android
[4]
65,775
65,776
question regarding UIDeviceRGB
<p><em>*</em> -[UIDeviceRGBColor size]: unrecognized selector sent to instance 0x3467e0</p> <p>I don't know what to do for this error plz tell me how to resolve this exception I even do not understand the meaning of UIDeviceRGBColour</p>
iphone
[8]
5,686,138
5,686,139
How can I use the string "watch" as a key in a JavaScript associative array?
<p>I have an array declared like this:</p> <pre><code>var dict = []; </code></pre> <p>When I do this:</p> <pre><code>dict["watch"] = 0; </code></pre> <p>this expression alerts <code>NaN</code></p> <pre><code>alert (dict["watch"]); </code></pre> <p>I know this is because <code>watch()</code> is a function that is ...
javascript
[3]
5,812,382
5,812,383
Android: show white background when search button pressed
<p>When I press the search key on my device, I want it to show a white background. However, when I press the back button, I want the previous activity's background to be restored. <code>ivBackground</code> is a variable I added to my relativelayout which I turn VISIBLE to show the white background.</p> <pre><code> pub...
android
[4]
2,503,134
2,503,135
Adding element before a div with title attribute containing content of the div using JQuery
<p>I have:</p> <pre><code>&lt;li class="ingredient"&gt; &lt;div&gt; &lt;span class="amount"&gt;1 lb&lt;/span&gt; &lt;span class="name"&gt;asparagus&lt;/span&gt; &lt;/div&gt; </code></pre> <p>i want to use jQuery to get:</p> <pre><code>&lt;li class="ingredient"&gt; &lt;img class="myImage" title="Yes!!! asparagus" src...
jquery
[5]
546,599
546,600
How to do relative imports in Python?
<p>Imagine this directory structure:</p> <pre><code>app/ __init__.py sub1/ __init__.py mod1.py sub2/ __init__.py mod2.py </code></pre> <p>I'm coding <code>mod1</code>, and I need to import something from <code>mod2</code>. How should I do it? </p> <p>I tried <code>from ..sub2 import...
python
[7]
623,182
623,183
ArrayIndexOutofBounds -- help?
<p>The problem is at <code>int [][]tam = new int [a][b]</code>. It's only that line. I am new to Java and coming from a C++ background.</p> <pre><code>//"Exercitiul" 3 Scanner input = new Scanner(System.in);//instructiune scanner DataInputStream dis4 = new DataInputStream(System.in); DataInputStream dis5 = new DataInp...
java
[1]
3,329,605
3,329,606
Color Change Event For Asp Using Javascript?
<p>I wrote a javascrpit Code for Changing Color. It's working Properly.</p> <p>Whenever I click on the File Upload Control Button, Textboxes looses their Focus and get back to the Previous State. </p> <p>Can Any One Help For This Situation.</p> <p>My Code IS:</p> <pre><code>&lt;script language="javascript"&gt; func...
asp.net
[9]
5,913,643
5,913,644
Would you prefer using del or reassigning to None (garbage collecting)
<p>Consider following code:</p> <pre><code>if value and self.fps_display is None: self.fps_display = clock.ClockDisplay() elif not value and self.fps_display is not None: self.fps_display.unschedule() # Do this del self.fps_display # or this self.fps_display = None # or leave both in ? </co...
python
[7]
2,711,453
2,711,454
Asynchronous call in javascript
<p>I am executing a function and i want to pause execution for some time.</p> <pre><code>function a(){ } //here some code --- I am using result of a function here... </code></pre> <p>Can anyone help me... how to use asynchronous call??</p>
javascript
[3]
170,753
170,754
Gesture (swipe) listener won't work for any widget but a Button
<p>I've got a swipe listener, based on SimpleOnGestureListener that works very well, as long as I attach it to a button like so:</p> <pre><code>final GestureDetector detector = new GestureDetector(MyGestureListener()); View.OnTouchListener listener = new View.OnTouchListener() { public boolean onTouch(View v, Moti...
android
[4]
5,314,082
5,314,083
Android Phrase o-matic
<p>I'd like to port this little program to Android, thing is that im level basic -1 at android, what the program does is that it randomly creates a phrase taken from strings in an array. I know how to make a button to show me an xml from the layout resources but thatjust works with textviews that do not change, Could y...
android
[4]
5,995,129
5,995,130
eight queens problem in Python
<p>8-queens problem in Python.</p> <p>Hi! I only start teaching Python, so could someone explain the code written below (found in the Internet)? Some pieces of the code are complicated for me. Please, explain them. Thank you. Questions are near the code.</p> <pre><code>BOARD_SIZE = 8 def under_attack(col, queens): #...
python
[7]
5,318,474
5,318,475
send message if user is in the database, reject if not
<pre><code>if (isset($submit)) { $getusers = mysql_query("SELECT * FROM register"); while($getrows = mysql_fetch_array($getusers)) { $users = $getrows['username']; if ($touser == $users) { echo "$users"; $send = $_GET['send']; if ($send == $one) { $query = mysql_query( ...
php
[2]
279,941
279,942
Converting Java 1.5 compatible code to Java 1.4
<p>Is there any tool that might help in converting the Java code written using 1.5 to 1.4. This is required because i need to reverse engineer my project using STAR UML. and Star UML is Java 1.4 compatible.</p> <p>Please Help</p>
java
[1]
5,772,490
5,772,491
get the data from the database and display in the UITextField
<p>how to i connect to mysql database and execute my query and display in iphone application may be in tabular view ..but not in any webview (safari)</p>
iphone
[8]
3,139,548
3,139,549
PHP Ajax adjustments
<p>My Website is Structured like:</p> <p><code>index.php</code> which includes a <code>router.php</code> and <code>router.php</code> calls required <code>controller</code>.</p> <p>for example if I call a list page like <code>http://example.com/index.php?list</code></p> <p>the <code>router</code> will call the <code>...
php
[2]
3,548,686
3,548,687
Starting a process fails in OnStart code block of a service
<p>I only would like to call</p> <pre><code>Process.Start("notepad.exe"); </code></pre> <p>when the service starts; But it doesn't work at all. No notepad is called right after I chose to start the service in the windows service manager.</p> <p>Thank you a lot.</p> <p>[<strong>UPDATE</strong>]</p> <p>I made it wor...
c#
[0]
1,307,667
1,307,668
jQuery: Select a href containing colon
<p>My anchor links should be animated, so that they do not jump immediate to the link but rather scroll in a smooth fashion. This should work in both directions, i.e. when clicking on the link containing the <code>footnote</code> and the <code>reversefootnote</code> class.</p> <h2>Structure</h2> <p>HTML</p> <pre><c...
jquery
[5]
255,545
255,546
General Solution for Iterating Through PHP SimpleXMLElementObject
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/11137204/parse-xml-sequentially-in-php">Parse XML sequentially in PHP</a> </p> </blockquote> <p>I want to be able to iterate through a SimpleXMLElementObject using PHP. However, I want to be able to do it <em>wi...
php
[2]
3,964,965
3,964,966
Get temperature of battery on android
<p>How do I get the temperature of the battery in android?</p>
android
[4]
5,020,732
5,020,733
javascript call() function this context
<p>In the following code, </p> <pre><code>var toString = Object.prototype.toString; toString.call(new Date); // [object Date] toString.call(new String); // [object String] toString.call(Math); // [object Math] </code></pre> <p>in the call the current object is passed like ( <code>toString.call(new Date)</code>) , b...
javascript
[3]
3,556,130
3,556,131
Adding fadein() effect handlers to a switch background-image function in Jquery
<pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ setInterval(spinna, 3000); var index = 0, imgs = ['bg2.jpg', 'scrib.jpg']; function spinna(){ console.log(imgs[index]); $('#header_bg').fadeIn('slow',function(){ $('#header_bg').css({ 'background-image'...
jquery
[5]
5,468,343
5,468,344
How do I list occurrences of certian values found in a dictionary in a list in python?
<pre><code>dave = [{'date':'12/10/12','time':'09:12','created_by':'adam','text':'this'}, {'date':'28/09/11','time':'15:58','created_by':'admin','text':'that'}, {'date':'03/01/10','time':'12:34','created_by':'admin','text':'this and that'}] </code></pre> <p>How to I get a list of the values found in <co...
python
[7]
999,694
999,695
Save Spinner state between actions
<p>I'm trying to design an application that saves the selection I made on a Spinner even if the application changes (I launch a different one) or I simply navigate between it's differents Activities, including pressing "Back" on my application.</p> <pre><code>int ALARM_REPEAT = 7; ArrayAdapter myAdap = (ArrayAdapter) ...
android
[4]
282,111
282,112
I want to know about the MKMapView?
<p>I am fresher.I don't have any idea how to use MKMapView in my application? Can anybody give me any beginner source code which can give me an idea about the MKMapView.I am trying MKMapView from last 1 hour but my application is suddenly quitted. </p>
iphone
[8]
5,562,799
5,562,800
Raise the Event for object Collection
<p>How to raise the event if a Collection is modified. Type is object like:</p> <pre><code>public object Source { get; set; } </code></pre> <p>I want to raise the NotifyCollectionChangedEvent for Source in OnPropertyChanged</p>
c#
[0]
4,844,270
4,844,271
How do I compare one index to the previous index within the same list?
<p>I'm trying to make this program look at each previous number in a list, and determine if that number is bigger than it. If it is, it should record how many times bigger, and return it at the end. i.e. the count (I'm using num as the variable) starts at 0. But 10 is bigger than 7 so num becomes 1. Now 7 isn't bigger ...
python
[7]
4,093,866
4,093,867
How to take M things N at a time
<p>I have a list of 46 items. Each has a number associated with it. I want to pair these items up in a set of 23 pairs. I want to evaluate a function over each set. How do I generate such a set?</p> <p>I can use the combinations function from itertools to produce all the 2-ples but I don't see how to generate all ...
python
[7]
2,770,850
2,770,851
Long press Android
<p>I have problems with detecting long press in my custom view.</p> <p>Here's the code related to this issue</p> <pre><code>final GestureDetector gestureDetector = new GestureDetector(new GestureDetector.SimpleOnGestureListener() { public void onLongPress(MotionEvent e) { Log.e("dbg_msg", "onLongPress"); ...
android
[4]
3,247,964
3,247,965
function mail()
<p>Look this code:</p> <pre><code>$to="$email"; $sub="Hi"; $mex="hi &lt;br /&gt; \"&lt;a href='http://exemple.com/ver.php?id=$cod'&lt;/a&gt;"\"; $int = "From:h@h.com"; $int .= "Reply-To:try@try.com"; $int .= "X-Mailer: PHP/".phpversion(); mail($to, $sub, $mex, $int); </code></pre> <p>The error is on $mex, I think i...
php
[2]
5,664,832
5,664,833
Android docs is very slow in ADT r20
<p>I updated my ADT to r20. It becomes very slow to open the docs when I have internet connection. But it works well in offline mode.</p> <p>It is very slow to open xxx.html in the docs directory by clicking them directly. </p> <p>why? And how to fix it?</p> <hr> <p>I found the problem. The url is something wrong w...
android
[4]
1,766,974
1,766,975
xxx not identified as internal or external command
<p>Sry for bringing this question again as its most common solution would be to include path.. I am trying to implement a class and after implementation it displays the following </p> <pre><code>java -classpath java-getopt-1.0.8.jar;3dm-0.1.0.jar;xerces.jar tdm. tool.TreeDiffMerge 3DM XML Tree Differencing and Merging...
java
[1]
5,688,909
5,688,910
Resolving a JavaScript conflict
<p>On a website, <a href="http://imgthis.com/blog/?p=34" rel="nofollow">http://imgthis.com/blog/?p=34</a>, I have two JavaScripts that load inside an iframe with an image gallery, one is lytebox which is a Light Box 2 slimmed down clone for image gallery pop ups and the other is a show only one div in a stack of divs. ...
javascript
[3]
2,185,109
2,185,110
Redirecting From One Page to Another After Sending Login Credentials
<p>While I'm logged into a web application 1, I would like to navigate to web application 2 without explicitly logging on manually. </p> <p>In application 1 I have an OnClick that gathers up my current login credentials and attempts to POST them to applications 2:</p> <pre><code> long timestamp = DateTime.Now....
asp.net
[9]
4,672,223
4,672,224
ASP.NET Page Base Class with OnLoad event not allowing Derived Class to fire OnLoad
<p>I have a custom PageBase class that I am using for all of the pages in my project. In my BaseClass I have a <code>protected override void OnLoad(EventArgs e)</code> method declared. This method seems to make my derived classes unable to throw their own OnLoad event. What is the preferred way of making both OnLoad...
asp.net
[9]
1,415,894
1,415,895
Create Method that has dynamic number of parametr
<p>Is possible to create method with dynamic number of parameter in C#?</p> <p>For example</p> <pre><code>Public void sum(dynamic arguments//like JavaScript) { //loop at run-time on arguments and sum } </code></pre> <blockquote> <p>Can I use Dynamic Object?</p> </blockquote>
c#
[0]
538,905
538,906
Event Handling in Chaco
<p>When hovering over a data point in Chaco, I would like a small text box to appear, with the text I desire. Also, when I click on a data point (or close enough), I would like my program to take a certain action. I have seen relevant parts of the Chaco documentation, but implementing them has proved difficult. Any hel...
python
[7]
548,178
548,179
PHP - Loading a different file if exists
<p>For a while I've had a website, that grew and grew for years into several hundred individual php files. About 2 years ago I made a mobile version of the same website. I decided to do this by copying only the main files, and adjusting the header and the footer for mobile friendly. The rest worked as expected; I'd say...
php
[2]
867,347
867,348
Extensionless URL rewriting in web.config ASP.NET
<p>I have a page with URL mysite.com/mypage.aspx and I want visitors to be redirected to this page if they go to mysite.com/mypage. It is only for this page and I wonder if this is possible to achieve in web.config. I do not have access to any source code, only to web.config (via FTP). I tried to log in to our web host...
asp.net
[9]
1,204,569
1,204,570
JQuery not sliding folder
<p>I am trying to get a iPhone looking folder menu bar. When i click each item (info tab_(number), it should open the appropriate "infotab_(number)_s" div. _s standing for "show". When one is open and the user click another item on the menu bar, it should close and open the one they clicked. My script doesn't open them...
jquery
[5]
5,088,818
5,088,819
How does Javascript react to errors?
<p>I have been quite curious about how javascript reacts to errors(like ReferenceError, for example). When it encounters a runtime error, it seems to return from the function that it is called in which, in turn, fails the function it was called in.</p> <p>Does it consequently fail all the functions in the frame stack?...
javascript
[3]
5,008,705
5,008,706
JavaScript, innerHTML not being recognised by javascript
<p>I have the following code for my website:-</p> <pre><code>function HCreateWindow(top,left,width,height,zindex,parent) { var handle = Math.floor(Math.random()*10000000000); if(parent==null) { document.write("&lt;div id=\"HWINDOW" + handle + "\"style=\"top: " + top + "px; left: " + left + "px;width: " + width + "px;...
javascript
[3]
1,150,828
1,150,829
PHP - How to start my count from 5000
<p>How can i start the count from 5000 and count from there in my following code.</p> <p>here is my code.</p> <pre><code>$i=1; while($i&lt;=19000){ $i++; } </code></pre>
php
[2]
2,242,255
2,242,256
Progressbar with Handler is not working when Default Back button is pressed
<p>I have a problem that I have an activity, when I pressed android default back button I want to do some task on the same which needs progress bar therefore I implemented progressbar with Handler in the same method, but Progress Bar doesn't work for me. I don't know why? Please suggest me the right solution regarding ...
android
[4]
5,838,239
5,838,240
Joomla component function depricated
<p>I am using a Joomla component <code>com_fabrik</code> but though its install successfully. As I try to create form I am getting following error.</p> <pre><code>Fatal error: Call to a member function setId() on a non-object in C:\xampp\htdocs\sankalpJoomla\administrator\components\com_fabrik\models\form.php on line ...
php
[2]
902,669
902,670
Javascript Image object without instantiating
<p>This question is about javascript performance. Consider 3 examples for illustration:</p> <pre><code>function loadImgA() { new Image().src="http://example.com/image.gif" } function loadImgA1() { Image().src="http://example.com/image.gif" } function loadImgB() { var testImg = new Image(); testImg.sr...
javascript
[3]
4,689,770
4,689,771
Paragraph separator as line terminator
<p>The Javascript specification specifies four kinds of line terminators. </p> <p><code>LF</code>, <code>CR</code>, <code>line separator</code> and <code>paragraph separator</code>. </p> <p><a href="http://es5.github.com/#x7.3" rel="nofollow">http://es5.github.com/#x7.3</a></p> <p>Which of the above best describes t...
javascript
[3]
618,961
618,962
Is it possible to completely prevent a user form leaving a webpage, (for a net sec course)
<p>My network security professor want's us to create a web page that a user can't navigate away from using the URL bar, or bookmarks.</p> <p>His hints were to use <code>onbeforeunload</code> and <code>onunload</code>.</p> <p>Target browser is Firefox.</p>
javascript
[3]
5,389,467
5,389,468
What does % mean and do?
<p>This is my first question here (yay!). This may seem like a silly question but in a if statement like the one below what does % mean?</p> <pre><code> if n % i == 0: print("hi") </code></pre>
python
[7]
1,144,952
1,144,953
Javascript quirks
<p>I was playing around with Chrome's Javascript console recently, and I discovered this oddity: </p> <pre><code>[] == true false [0] == true false [0] == [] false </code></pre> <p>This doesn't seem to make any sense at first glance (false != false), but I think the real reasoning lies in the polymorphism of the == o...
javascript
[3]
5,168,345
5,168,346
how to get an element before its added to the DOM?
<p>How can you get an element before its added to the DOM (before append())</p> <pre><code>$('#enclosure_balance'+id).css({background:'red'}) </code></pre>
jquery
[5]
3,315,409
3,315,410
Most elegant way to count integers in a list
<p>I am looking for the most elegant way to do the following:</p> <p>Let's say that I want to count number of times each integer appears in a list; I could do it this way:</p> <pre><code>x = [1,2,3,2,4,1,2,5,7,2] dicto = {} for num in x: try: dicto[num] = dicto[num] + 1 except KeyError: dict...
python
[7]
5,487,458
5,487,459
How Android app can initiate Bluetooth HFP and A2DP connection to Bluetooth Headset?
<p>In my understand, Anroid app supports only SPP connection not HFP and A2DP.</p> <p>However, I want to initiate HFP and A2DP connection in Android app just like selecting Bluetooth device in Bluetooth Settings menu. I'm not sure it is possible to use a intent including BluetothDevice object, so the intent receiver c...
android
[4]
1,042,641
1,042,642
JavaScript time independent of client PC's time
<p>Is there a way to get the current UTC time without relying on the time and timezone of the client's pc? I am not allowed to use PHP or anything from the server side for this (Using a hosted service and they only allow changing of HTML and addition of JavaScript. Not allowed to change PHP on the server.). Must be onl...
javascript
[3]
2,153,302
2,153,303
Set an element as percentage width using a variable?
<p>How do you set an element as percentage width using a variable?</p> <pre><code>var progBarValue = $('.days-due').text(); $('.bar').width(progBarValue%); </code></pre>
jquery
[5]
3,283,332
3,283,333
Set a directory path for my entire site
<p>On the website I'm administrating, I use several <code>include</code> and <code>require</code>. I would like to define the entire structure of the website in some config-file that is included on each page so I don't have to worry about paths any more and no matter where the file is located, <code>include('any_filena...
php
[2]
2,918,359
2,918,360
Can we able to assign the returning data to a variable , which is getting through ajax function?
<p>Following is the function that i am using.</p> <p>Can we able to assign like this?</p> <pre><code>&lt;script language="javascript" type="text/javascript"&gt; function validation(){ var flag $.ajax({ url: 'ajax/test.php', success: function(data) { flag =data; } }); ...
jquery
[5]
4,370,159
4,370,160
Data presentation
<p>This is an off the wall question but I have always gotten great support here so maybe you can offer me some ideas.</p> <p>I have a web app that is going to present data in a geographical fashion. Some people have expressed a favorable impression of using a map which I have implemented while others want to find the...
asp.net
[9]
696,520
696,521
Don't print space after last number
<p><strong>LANGUAGE: C++</strong> Hello, in the following function (code block) i have written a line to print an space between characters but <strong>i don't want print spaces after last characters</strong>. How can i solve this problem?</p> <pre><code>bool perfecto(int n) { int suma, i; suma = 0; for (i ...
c++
[6]