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
4,001,165
4,001,166
Returning an lvalue from a function in python
<p>[Sorry, I'm new in Python. Although it seems to be a very basic question, I did my share of due diligence before asking this audience, trying to avoid really stupid questions].</p> <p>I'm trying to figure out the correct idiom for returning an l-value from a function. Assume I've a container of 64 objects, and I wa...
python
[7]
502,951
502,952
how to rebind array to dataTables.net grid
<p>I am using dataTables.net jquery grid to display data in html table. I couldn't find a method to set the array as datasource dynamically and rebind the grid. </p> <p>Please let me know.</p>
jquery
[5]
2,820,513
2,820,514
C++: is instance descendant of class
<p>Assume we have three classes A, B and C. B is derived from A and C is derived from B. Now we have a pointer that points to an object of class A. Due to Polymorphism it can actually point to instances of all three classes.</p> <p>With typeid() i can check what type the pointer actually refers to. But I'm trying to d...
c++
[6]
2,095,268
2,095,269
Question related to current View
<p>Is there any way by which we can get the current view by specifying the position of the view?</p> <p>I have the view position with me and I need to get View. Is there any way?</p>
android
[4]
3,539,014
3,539,015
jquery select on form has to be reselected to work after each page load
<p>I am using the following jquery in order to disable text boxes on my page. The issue I am running into is that by default because its stored in the database it loads the page with "remote_server" set to 0. Even with this being set automatically the fields are still able to be modified. I must click on the selectio...
jquery
[5]
4,815,230
4,815,231
Undo general preventDefault on single element?
<p>In my mobile web app, I have this </p> <pre><code>//Prevent scrolling in entire document document.ontouchmove = function(e){ e.preventDefault(); } </code></pre> <p>..which makes it look a lot less 'webby' since the body can't be scrolled. </p> <p>Unfortunately, this is also stopping an input slider I have from wo...
javascript
[3]
5,009,692
5,009,693
Php Motion Detection
<p>Is it possible to achieve motion detection using php?</p> <p>I'm not a GD/Image library expert, but shouldn't it be possible to detect if there's a significant difference between two images and have that trigger a warning?</p>
php
[2]
2,621,574
2,621,575
Find the file type
<p>How can I find the type of the file from the directory C#? I am reading the files from the directory and would like to find out if the file type is an image. Please let me know.</p> <p>Thanks..</p>
c#
[0]
1,753,509
1,753,510
How to pass object data from one method to another
<p>I have a program in which the user inputs information into two separate text boxes and then clicks a button, at which time the program does some work and returns data to a third text box.</p> <p>Then the user enters data into another textbox and clicks a second button. The program takes the text box return data fr...
c#
[0]
5,714,175
5,714,176
understanding clicks behaviour
<p>I wrote this simple code to understand why if I click the "click me" text for the second time JQuery does not display the "second" text.</p> <pre><code>&lt;div id="clickme"&gt;Click me&lt;/div&gt; &lt;div id="sometext"&gt;This is text ZERO&lt;/div&gt; &lt;script type="text/javascript"&gt; $(document).ready(fu...
jquery
[5]
3,635,913
3,635,914
PHP read directory sorting?
<p>I have:</p> <pre><code>$directory='testdirectory/'; $handler = opendir($directory); while ($file = readdir($handler)) { ... } </code></pre> <p>What is the output of opendir/readdir like this sorted by? Is it date, alphabetical or something else because I cannot tell from the output.</p>
php
[2]
2,572,659
2,572,660
JavaScript: How to find out the position of the mouse in the div box?
<p>I know how to find out the position of the mouse relative to the top-left corner of the browser window, but I don't know how to do so relative to the top-left corner of the div box. </p>
javascript
[3]
2,328,232
2,328,233
How to work with virtual key board in android(catch event on keys which display Toast after press)
<p>i am doing R&amp;D on virtual key board (How to catch key event),but no more success found i got only few things about virtual key board</p> <p>we need to implements</p> <p><code>onKeyboradActionListener</code></p> <pre><code>/* and these override methode*/ public void onKey(int primaryCode, int[] keyCodes) { ...
android
[4]
2,501,908
2,501,909
Javascript in Machine Language
<p>Is it possible to convert javascript code to machine code or pure native binary?</p>
javascript
[3]
2,886,687
2,886,688
Why do tuples with only one element get converted to strings?
<p>In the below example I would expect all the elements to be tuples, why is a tuple converted to a string when it only contains a single string?</p> <pre><code>&gt;&gt;&gt; a = [('a'), ('b'), ('c', 'd')] &gt;&gt;&gt; a ['a', 'b', ('c', 'd')] &gt;&gt;&gt; &gt;&gt;&gt; for elem in a: ... print type(elem) ... &lt;...
python
[7]
5,881,798
5,881,799
var.replace is not a function
<p>I'm using the below code to try to trim the string in Javascript but am getting the error mentioned in the title:</p> <pre><code>function trim(str) { return str.replace(/^\s+|\s+$/g,''); } </code></pre> <p><strong>Edit:</strong></p> <p>I fixed the problem.... sorry I should have put the code on how I was call...
javascript
[3]
3,668,267
3,668,268
Call PHP files on Android application?
<p>I have made a web application and want to port it over to an Android APK file. However, none of my PHP files work. When I try and view one all I get is PHP code. This is what I have so far in my HTML file:</p> <pre><code>$(document).ready(function() { $('#submit').click(function() { var username = $('input[name=use...
android
[4]
2,433,500
2,433,501
Why can't I import a package installed with easy_install?
<p>I tried to install the <code>SimpleCV</code> package:</p> <pre><code>C:\&gt;easy_install C:\Python27\lib\site-packages\simplecv-1.2-py2.7.egg Processing simplecv-1.2-py2.7.egg simplecv 1.2 is already the active version in easy-install.pth Installed c:\python27\lib\site-packages\simplecv-1.2-py2.7.egg Processing de...
python
[7]
1,438,862
1,438,863
Why is this code to disable an HTML select box not working?
<pre><code>function abc() { document.form1.1.disabled=true; } </code></pre> <p>I have a select box whose id is <code>1</code> in my HTML page. I am using the JavaScript above but it is not disabling the select box.</p>
javascript
[3]
2,408,618
2,408,619
Store images in ICloud
<p>Hi guys first of all thanks for such a media which is helping all the developers allover globe.Now coming to my question,I want to Store images in icloud and retrive them in my application. I am able to store text in icloud but not able to store images here is the link which i followed: </p> <p><a href="http://www....
iphone
[8]
3,166,055
3,166,056
I want to stop the browser request, when user clicks on any button from UI, like stop button on browser
<p>I want to stop the browser request, when user clicks on any button from UI, like stop button on browser. I want to do it through javascript.</p>
javascript
[3]
838,324
838,325
android call Logs Date insertion
<p>I am trying to insert Call Logs in inbox programmatically but I am using getcontentresolver() for insertion. but when i am trying to insert date at that time exception is thrown. i have String variable "date" in which date is "2011-11-04". and i am passing it to values.put(CallLog.Calls.DATE, callDate);</p> <p>my ...
android
[4]
5,145,723
5,145,724
Python... Static variables?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2714573/instance-variables-vs-class-variables-in-python">Instance variables vs. class variables in Python</a> </p> </blockquote> <p>What is the difference between these two situations and how is it treated with ...
python
[7]
473,993
473,994
Iterate in page and find all checked checkbox by jquery
<p>suppose i have many checkbox in my page and i need to iterate in all checkbox and check is it checked or not.</p> <p>my html</p> <pre><code>&lt;div&gt; &lt;input type="checkbox" id="JqueryIdList1" value="1" /&gt; &lt;input type="checkbox" id="JqueryIdList2" value="2" /&gt; &lt;input type="checkbox" id="JqueryIdLi...
jquery
[5]
1,767,029
1,767,030
What's the simplest way to code up a C# switch with a fall through
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/174155/switch-statement-fallthrough-in-c">Switch statement fallthrough in C#?</a> </p> </blockquote> <p>I recently posted <a href="http://stackoverflow.com/questions/8628675/is-there-a-better-way-to-code-an-if-s...
c#
[0]
3,878,856
3,878,857
Java: Variable size array of int
<p>Hey guys I'm trying out arraylists and I need to make a variable sized array of integers. I don't know if I'm implementing it right. How do I go about doing this? Can someone help me out with the syntax?</p> <pre><code> Integer[] ints = new Integer[x]; static List&lt;Integer&gt; ints = new ArrayList&lt;Integ...
java
[1]
2,170,797
2,170,798
asp.net-javascript validation
<p>i have a button..and i want to use javascript to validate certain fields on the button click and if the validation has passed i need to then execute the code in the code behind..any suggestions please guys!</p> <p>Thanks in advance.</p> <p>here is my javascript:</p> <pre><code>function validateFields() { fun...
asp.net
[9]
1,803,673
1,803,674
NSString stringWithContentsOfURL encoding Problem
<p>my app downloads and parses an xml file that contains German Umlauts (ä, ö, ü) and other special character (&amp;, % etc). I seem to have a generall lack of understanding when it comes to encoding issues.</p> <p>so what i do at the moment is:</p> <ol> <li>try to locate if i allready cached the xml file in my apps ...
iphone
[8]
1,174,752
1,174,753
Histogram without plotting function
<p>I am trying to create a simple text based histogram using python but without importing any plotting functions such as matplot or gnuplot. I will be importing data from a csv file to create that histogram. </p>
python
[7]
4,292,343
4,292,344
How to draw circle when Tab event is fired
<p>I am learning android Live wallpaper development. I found an awesome template in the <a href="http://www.andengine.org/forums/tutorials/live-wallpaper-template-t258.html" rel="nofollow">AndEngine Forums</a> In this template I found an overridable method OnTab which provides 2 parameters i.e x coordintate &amp; y coo...
android
[4]
4,371,095
4,371,096
Assigning array parameter in constructor
<p>Now i am coming in a circumstance like, i need to pass a parameter for array in a function(So that i can override it in the function based on my needs). So how is that possible in PHP. For eg.,</p> <pre><code>class classname { function __construct() { $array['default'] = 'default value'; } ...
php
[2]
4,116,887
4,116,888
calculate days between dates
<p>I'm trying to calculate the days between 2 dates but just keep getting "NaN. I've looked at other posts but can't quite work it out :-S</p> <pre><code>function checkdate() { var currentTime = new Date() var month = currentTime.getMonth() + 1 var day = currentTime.getDate() var year = currentTime.getFullYear() var ...
javascript
[3]
2,212,027
2,212,028
removeClass and fade animation
<p>I have this code</p> <pre><code>&lt;ul class="nav sub_nav_home"&gt; &lt;li id="sub_nav_home1"&gt;&lt;a href="#"&gt;&lt;span&gt;LINK1&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li id="sub_nav_home2"&gt;&lt;a href="#"&gt;&lt;span&gt;LINK2&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li id="sub_nav_home3"&gt;&lt;a hre...
jquery
[5]
5,333,616
5,333,617
Go back to previous activity manually
<p>Here's my code: Activity1 (main): Checks if the db has any rows. If not, load the main view. If it has at least 1 start Activity2</p> <pre><code> int num = db.numOfRows(); if(num==0){ setContentView(R.layout.main); } else { startActivity(new Intent(this, Activity2.class)); } </code></...
android
[4]
2,832,041
2,832,042
What do dot and hash symbols mean in JQuery
<p>I feel confused of the dot and hash symbols in the following example:</p> <pre><code>&lt;DIV ID="row"&gt; &lt;DIV ID="c1"&gt; &lt;Input type="radio" name="testing" id="testing" VALUE="1"&gt;testing1 &lt;/DIV&gt; &lt;/DIV&gt; </code></pre> <p>Code 1:<br/></p> <pre><code> $('#row DIV').mouseover(func...
jquery
[5]
2,146,446
2,146,447
Javascript prototype inheritance issue
<p>I'm having an issue with prototype inheritance and I can't find out why it's not working properly.</p> <p>The snippet is this:</p> <pre><code>function Field(newKey, val) { this.key = newKey || ""; this.value = val || ""; } Field.prototype.isEmpty = function() { return this.value === undefined || this....
javascript
[3]
3,179,611
3,179,612
Remove onclick function call w/jQuery
<p>I have an icon on a page, what when clicked is calling a function from an external JS file.</p> <pre><code>&lt;input type="checkbox" checked="checked" id="myCheck"/&gt; &lt;img src="icon.png" id="myIcon" onclick="myFunction)(this,null,null)" /&gt; </code></pre> <p>I need to add a functionality to disable this cli...
jquery
[5]
4,585,045
4,585,046
TO initiate Python shell
<p>You can use subprocess.call("/usr/bin/python") to open Python shell within a piece of Python code. Now my question is is it possible to predefine some variables/functions before initialization of this shell? In other words, inside Python code, I can define a bunch of useful variables and functions and I want them to...
python
[7]
1,002,260
1,002,261
TableLayoutPanel Issue
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/8325193/tablelayoutpanel-row-and-column-resize-during-runtime">TableLayoutPanel row and column resize during runtime</a> </p> </blockquote> <pre><code>private void tableLayoutPanel1_MouseMove(object sender, Mous...
c#
[0]
5,325,401
5,325,402
clear an efficient Adapter at runtime in android
<p>I have a problem that I want to clear a list view with efficient adapter in android. How will I achieve this? Pease help me out.</p>
android
[4]
4,867,829
4,867,830
how to convert pdf to text file in iPhone?
<p>I am implementing one pdf reader applciation for iPhone in which I want to add one functionality which will conver pdf to text file.</p> <p>Is it possible? If possible then please give me idea about that.</p> <p>Thanks in advance</p>
iphone
[8]
232,598
232,599
Android async image load
<p>So I have an activity with an ImageView. My goal is to have the activity start and asynchronously fetch the image I need in there. While the image is being fetched, I'd like to display some sort of spinning loading symbol in place of the image. I've tried using AsyncTask as a separate class, but ran into issues rela...
android
[4]
2,610,414
2,610,415
Android onHoverEvent and onTouchEvent
<p>I have a class that is extending <code>View</code> and i want to use the stylus (galaxy note) for input as it has hovering capabilities. </p> <p>I have added listeners for both hover and touch events but i have this issue i can not get around nicely: when i touch the screen with the stylus i have a hover event gene...
android
[4]
2,665,512
2,665,513
WebView and Gallery in android
<p>I have a <code>Gallery</code> and a few images stored in it.</p> <p>On selecting the images i want some URL s to get opened on the top of this gallery(As a web view only). For example If i click on a particular image i need a url to get opened. I tried using <code>ViewSwitcher</code> and since I am a begginner i co...
android
[4]
4,122,674
4,122,675
Prevent malicious user from executing JavaScript
<p>In my JSP I have a function like <code>fnGetTicketDetails</code>: </p> <pre><code>function fnGetTicketDetails(record){ $("#TicketNumber").val(record); $("#TicketDetailsForm").submit(); return false; } </code></pre> <p>I have form like this:</p> <pre><code>&lt;form name="TicketDetailsForm" id="TicketDe...
javascript
[3]
5,143,824
5,143,825
UNITILS Error creating Tables from DDL File?
<p>I have problem with Ebean / Unitils 3.3, Junit and HSQLDB, Tables are not created from my DDL file.</p> <p>Two tables EMPLOYEES et DBMAINTAIN_SCRIPTS are not created. Le fichier "01_database_schema.ddl" se trouve dans le répertoire "src\main\resources".</p> <p>My DDL File</p> <pre><code>sET DATABASE COLLATION "Fr...
java
[1]
4,402,267
4,402,268
Javascript if else statement to hide and show div
<p>Please refer to the following codes :</p> <pre><code>&lt;div id="message-1" onclick="javascript:showresponddiv(this.id)&gt; &lt;/div&gt; &lt;div id="respond-1" style="display:none;"&gt; &lt;/div&gt; &lt;div id="message-2" onclick="javascript:showresponddiv(this.id)&gt; &lt;/div&gt; &lt;div id="respond-2" style="dis...
javascript
[3]
1,211,922
1,211,923
why does the this.ActiveMdiChild property return null?
<p>I have created an array of objects for a child form in C#.NET. Now i need to copy certain controls on the active child form. But the this.ActiveMdiChild property is returning null. Before adding the control the main form is disabled and another form pops up. On closing that form the main form and all its controls a...
c#
[0]
5,379,336
5,379,337
Javascript function fires twice on clicking 'Submit' button
<p>I'm trying to insert records into DB using AJAX. I'm not sure why, but it seems the javascript function referenced in the onclick tag of the submit button gets fired twice, and hence I get two records in my DB per click.</p> <p>Placing alerts in the JS, I have managed to figure out that the problem is in the JS fun...
javascript
[3]
4,480,167
4,480,168
Having the android resources online
<p>I am trying to build a generic app where I can load all the resources from online, so that depending on the input, certain resources should be loaded. Is it possible?</p>
android
[4]
3,462,900
3,462,901
`while y < x` loop never ends
<p>I'm trying out Python, and, in my very tired state, can't seem to find the problem with the code below:</p> <pre><code>import sys def printNum(x): y = 0 while y &lt; x: print "Number: ", y y = y + 1 printNum(sys.argv[1]) </code></pre> <p>So, I'm trying to get it to print out <code>y</code...
python
[7]
3,902,434
3,902,435
Why isn't this simple PHP expression working?
<pre><code> $links = array('https://google.com', 'http://aloe.com', 'http://foobar.org/image.jpg'); foreach ($links as $link) { $unacceptables = array('https:','.doc','.pdf', '.jpg', '.jpeg', '.gif', '.bmp', '.png'); foreach ($unacceptables as $unacceptable) { ...
php
[2]
2,708,837
2,708,838
length of audio file for playeffect in SimpleAudioEngine
<p>for play effect using <code>[[SimpleAudioEngine sharedEngine] playEffect:@"sound.mp3"];</code></p> <p>What is the limit length of used audio file?</p>
iphone
[8]
827,419
827,420
Can I put & in my String resource ?
<p>I try to write Confirm &amp; Close in my String resources but I receive the following errors The entity name must immediately follow the '&amp;' in the entity reference.</p> <p>how can I fix that ? </p>
android
[4]
125,566
125,567
Jquery Rebind function after Ajax call
<p>I have a problem. The click event that summons a greybox form is broken after a div is refreshed. How to I rebind the function to the refreshed content, that includes the links that will re-fire the greybox? I am assuming I have to re-initialize the functions after the click event. I am a newbie so thans for your he...
jquery
[5]
1,515,127
1,515,128
How to keep the radio button checked till its other radio button is checked in a radio group in android?
<p>I have a radio button group when am checking one of the button it will show as checked. But when I move to other screens and come back none of the buttons will be checked. What I have to do to check the radio button constantly in android.</p>
android
[4]
2,604,807
2,604,808
overuse of jQuery's on method?
<p>I am using Google Analytic's event tagging on a somewhat complicated code base. Instead of going through every file and finding where all of the necessary events are, I was thinking of creating new events using jQuery's on method to delegate them. Should I be concerned about any potential performance issues by going...
jquery
[5]
3,484,301
3,484,302
How to interact with a webpage with python?
<p>Basically, I want to be able to mimic the functions of an internet browser, but without having to actually graphically render it. My ideal scenario would be, for example, a script which opens a connection with a webpage, makes all the necessary calls and interactions, and can list what javascript went off (this is a...
python
[7]
4,056,366
4,056,367
Screen capture for TableView NOT only for visible cells but for all available cells
<p>I want to take screen shot of my tableview for all the number of cells NOT only for visible cells. number of rows are dynamic. </p> <p>If there are 30 Rows then I want all 30 rows in one screen shot. I have tried with using tableview's total height as</p> <pre><code>self.tblView.contentSize.height </code></pre> ...
iphone
[8]
619,997
619,998
Why does the setTimeout function execute forever?
<p>I read about the timing event. I am confused about <code>setTimeout</code>: I have an example on W3Schools where it is running every 500 milliseconds. I read about <code>setTimeout</code> that it works only once. <a href="http://www.w3schools.com/js/tryit.asp?filename=tryjs_timing_clock" rel="nofollow">link</a></p> ...
javascript
[3]
1,704,173
1,704,174
Hiding android notification bar in actity
<p>I need the code to show and hide the notification bar during an activity.</p> <p>I try this code:</p> <pre><code>public void goFullscreen() { getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); this.findViewById...
android
[4]
4,498,489
4,498,490
print number in reverse
<p>im simple asking if this is ok. i was asked to do the following. Write a program that will continuously ask the user for positive integers (until the user enters a negative integer at which the program will be terminated). Every time the user inputs a positive integer the program will print out this integer in rever...
c++
[6]
3,264,968
3,264,969
Run same method in base and derived class
<p>What do I need to do to first run the method in the base class then run the same method in the derived class? Is this a good idea?</p> <p>I want run common actions in base class and extend it in the derived class in the same method. Is this how it is usually done?</p> <pre><code>public abstract class MyBase { vo...
c#
[0]
2,423,834
2,423,835
Android page curl effect on layout/s
<p>I am working on a project where I have to curl entire view/layout where I've textview, edittexts, buttons, etc. The task is that I have to curl the entire layout along with those buttons and all. I am not able to understand how to do it in order to curl entire layout instead of just images.</p> <p>Please help</p>
android
[4]
3,686,795
3,686,796
error in using doc string example usage as given in book
<p>I am learning python by the examples given in a book here is an example which I typed on terminal </p> <pre><code>user@ubuntu:~$ python Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; def square(x): ... 'Cal...
python
[7]
5,121,183
5,121,184
Cut down a string in text area within particular limit in jquery
<p>I have a text area in my user description form . I need to cut down the string , if user enter more than 100 chars. <strong>I want to use jquery for this</strong></p>
jquery
[5]
4,094,405
4,094,406
How to verify city
<p>I would normally use:</p> <pre><code> if ($("#parkState").val() == "0") { alert("Please select a state."); } &lt;option&gt;Select a city&lt;/option&gt; &lt;option&gt;city1&lt;/option&gt; &lt;option&gt;city2&lt;/option&gt; &lt;option&gt;city3&lt;/option&gt; </code></pre> <p>But I have n...
jquery
[5]
88,994
88,995
PHP If / Elseif Statement Not Working Correctly
<p>I have a simple if statement that works on my local machine but when i uploaded it tom ypaid site i got an error on my home page.</p> <p>Error:</p> <pre><code>Warning: include(./pages/.php) [function.include]: failed to open stream: No such file or directory in /home/a5410474/public_html/index.php on line 33 Warni...
php
[2]
3,814,985
3,814,986
automatic examination paper generation
<p>Java-hello I am creating a project for educational purpose where i have to develop a module which creates a question paper from the list of questions in database with constraints that questions should be random in nature covering specified syllabus and marks without any repetition of questions</p>
java
[1]
964,800
964,801
How to use Google Drive api in Android?
<p>I Want to implement Google Drive api in my application but how to implement it in Android,</p> <p>I searched lot for sample code or way to implement in android &amp; finally i came back with question on Stackoverflow.</p> <p>I am hoping that developer who implemented Google drive api in their application they will...
android
[4]
836,575
836,576
List view with title, image and text?
<p>I need to make a list view with an image on left, a title floated right of that image and a description under that. I have checked out the list view in the docs but i cannot seem to find an example for this. I have a tab view as defined in XML (as per android example tabs1) with a list view as the first tab content....
android
[4]
5,123,363
5,123,364
Update selected values in Multi select with Jquery?
<p>This is my function to check which checkboxs are checked.</p> <pre><code>function updateTagChecked() { var list_tag_selected = [];//to store the value of checkboxs selected. $('input[name=tag]:checked').each(function() { list_tag_selected.push($(this).val()); }); $('#tag_checked'...
jquery
[5]
1,208,865
1,208,866
Retrieving ad URLs
<p>I'm looking for a way to retrieve the ad URLs for this website. <a href="http://www.quiltingboard.com/resources/" rel="nofollow">http://www.quiltingboard.com/resources/</a></p> <p>What I want to do is probably write a script to continuously refresh the page and grab the ad URLs.</p> <p>Any suggestion?</p>
python
[7]
1,168,262
1,168,263
Jquery UI Widget create and destroy
<p>In "learning Jquery Third Edition" I found these lines:</p> <blockquote> <p>Destroying widgets.... Calling .myWidget('destroy') will remove the myWidget widget from the page. The widget factory does most of the work, but if we have modified parts of the document inside _create (as we did here);so we need to...
jquery
[5]
607,289
607,290
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]
2,979,695
2,979,696
Load resource from anywhere in classpath
<p>I have a simple java application that loads a properties file from the current package.</p> <pre><code>this.getClass().getResourceAsStream("props.properties"); </code></pre> <p>This works fine when the property file I want is in the current package. However, I want to package this application as a JAR and define a...
java
[1]
5,152,247
5,152,248
Problem in detecting Internet Connection in Android
<p>I have created a Android application using Google Maps. Now I want to check whether an internet connection is available or not. I search in Google and finally I got solution through Stackoverflow:</p> <pre><code>boolean HaveConnectedWifi = false; boolean HaveConnectedMobile = false; ConnectivityManager cm = (Co...
android
[4]
1,971,675
1,971,676
Relation between android:minSdkVersion, android:targetSdkVersion and "target"
<p>So, I'm a little confused, I thought I understood the meaning of <code>android:minSdkVersion</code>, <code>android:targetSdkVersion</code> and <code>target</code> in project properties.</p> <p>Right now I got these set to:</p> <pre><code> android:minSdkVersion="7" android:targetSdkVersion="13" </code></pre...
android
[4]
2,550,455
2,550,456
Error using && operator
<pre><code>public boolean isRight() { if(xposition == ( (oposition-1) &amp;&amp; (oposition != (12 &amp;&amp; 8 &amp;&amp; 4))) { return true; } else { return false; } } </code></pre> <p>"xposition" and "oposition" are assigned values during the runtime of a program.</p> <p>The error is in ...
java
[1]
2,915,028
2,915,029
Create a application shortcut
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/234231/how-do-you-create-an-application-shortcut-lnk-file-in-c-or-net">How do you create an application shortcut (.lnk file) in C# or .Net</a> </p> </blockquote> <p>I guys I needed a help on how to create a appl...
c#
[0]
4,726,170
4,726,171
How do I allow my method to read my main
<pre><code>import java.util.Scanner; public class EP55Out { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("Please enter a grade: "); String letter = in.next(); // getNumericGrade(grade); } public static void getNumeri...
java
[1]
5,423,932
5,423,933
Merge object #1 to object #2 for all existing properties of object #2
<p>I have a rather verbose object with a lot of properties which I use to transport data to a SQL database. I would now like to provide a "light" version of this object that only uses some properties of the verbose one.</p> <p>I'm using the light objects to provide through a REST api, and the verbose ones to transport...
c#
[0]
430,461
430,462
Using jQuery to cache DOM elements
<p>I'm struggling with naming conventions, and I'd like to come up with a convention for any variables that are cache variables for DOM elements.</p> <p>So far, I've progressed to using this:</p> <pre><code>window.x = $('#x'); </code></pre> <p>Now of course, that puts it into the global scope, but according to my co...
jquery
[5]
285,333
285,334
Playing a video file from server in an Iphone app
<p>Basically , I get a url from webserver.I want to play a movie file from that url in an iPhone app.Please help! i mean to say my movie file is stored on webserver</p>
iphone
[8]
550,282
550,283
how to write the newline character as a string to a file java
<p>how can i write the newline character as a string to a file java. For example i want to write the string to the file "hello\nworld" as it is to a file.</p> <p>Thank you, Rana.</p>
java
[1]
2,547,792
2,547,793
Function scope & variables in/out of said function
<p>So im studying and just trying something out and well, the question is this</p> <p>i know that a variable defined outside of a function is avail to all while one set inside a function is not.</p> <p>that said when i do this</p> <p><strong>HTML</strong>: </p> <pre><code>&lt;input type="text" name="field" id="fie...
javascript
[3]
5,106,582
5,106,583
Download SEBI FII Data using WebClient
<p>I am developing a asp.net web application for downloading FII data from the website.It would be good if i myself create an application and use it.</p> <p>There is a datetime picker in the website in which I want to select the date programatically</p> <p>click the go button and later view in excel.when I click view...
c#
[0]
2,222,659
2,222,660
Logcat (Debugging ) Over Wifi in android
<p>Is there a way where i can see my logcat result if i connect my android device using Wifi (not a Usb data cable) basically to Debug my application.If yes how do i go about it.</p>
android
[4]
5,240,452
5,240,453
How to get some elements from html source and convert them to readable text?
<p>I have a page which displays "HeLLo 54292" in ASCII art, using <code>+</code> characters inside <code>&lt;table&gt;</code> tags to produce block letters. I'm generating this with PHP. <a href="http://cmaempreendimentos.com/test/" rel="nofollow">You can check out page's html source code</a>, and see how the ASCII art...
php
[2]
3,865,408
3,865,409
How can I add an element to a double linked list after inserting?
<p>How can I add elements in a node after inserting? It must to add to the first and the last list. The structure is DoubleLinked List. Have a class node:</p> <pre><code>class Node { Node next; Node prev; int data; void setData(int v) { data = v; } void setNext(Node n) { next = n...
java
[1]
126,568
126,569
Trouble creating assert function
<p>This is my assert function (it wont compile "error C2110: '+' : cannot add two pointers"):</p> <pre><code>#define CHAR(x) #x template&lt;typename T&gt; inline void ASSERT(T x) { if(!x) { std::string s("ERROR! Assert " + CHAR(x) + " failed. In file " + __FILE__ + " at line " + ...
c++
[6]
5,466,200
5,466,201
clearTimeout() Doesnt work
<p>When I double click, it seems that the <code>clearTimeout(timer)</code> doesnt work, and the code calls the <code>function activated(currentactiveid);</code> </p> <p>But also the function inside the <code>setTimeout("activated2('" + currentactiveid + "')", 2000);</code> references <code>timer</code>. So at the end...
javascript
[3]
4,464,348
4,464,349
boosting performance in android
<p>i've done an android app that retrieves data from the interent , format it and display it in a customized rows . However the performance is slow. So , is there any general guidelines or checklist to boost up the performance on android app. </p>
android
[4]
4,310,941
4,310,942
New to PHP/MySQL
<p>I'm a recent CS graduate and have learned very little on 'web 2.0' type stuff, we mainly focused on Java and C. I want to get into PHP, what would you guys recommend as the best book/website to get started with? There are a lot of them out there, and I don't want to drop 50 bucks on something that will finish with a...
php
[2]
4,124,521
4,124,522
adjacency matrix with List<List<T>>
<p>Please how to implement the adjacency matrix with <code>List&lt;List&lt;T&gt;&gt;</code>? search for edges, nodes, adding and removing nodes and edges</p>
c#
[0]
303,592
303,593
Vertical accordion menu
<p>I'm working on one site and I need vertical accordion menu the same like on <a href="http://www.thearchitecturestudio.net/" rel="nofollow">http://www.thearchitecturestudio.net/</a>. Does anybody have some advice how to do that in JQuery or code that he/she wrote ?</p>
jquery
[5]
1,040,212
1,040,213
jQuery function is affecting all buttons on my site
<p>I recently asked my frontend designer to setup buttons in my account management page to send the request in the background to a processing page. He supplied me with this code:</p> <pre><code> //Account $('button#changeemail').click(function(){ var newEmail = $('input[name*=newEmail]').serialize(); ...
jquery
[5]
5,205,973
5,205,974
How to simulate Func<T1, T2, TResult> in C++?
<p>In C#, I use Func to replace Factories. For example:</p> <pre><code>class SqlDataFetcher { public Func&lt;IConnection&gt; CreateConnectionFunc; public void DoRead() { IConnection conn = CreateConnectionFunc(); // call the Func to retrieve a connection } } class Program { public...
c++
[6]
5,061,431
5,061,432
Java HashMap "put" method in a for loop
<p>I am facing an issue while using <code>HashMap</code> in a for loop. Am I doing anything wrong? Is there any change I have to make? Below is the code and its output.</p> <p><strong>Code:</strong></p> <pre><code>public static void main(String[] args) { ArrayList&lt;Double&gt; arrBuckets = new ArrayList&lt;Doub...
java
[1]
4,789,947
4,789,948
how to place one activity on another activity
<p>friend's, i have an task to set horizontal swipe tabs below the header,how can i set an activity on another activity.</p>
android
[4]