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
3,221,087
3,221,088
How to operate jQuery object correctly?
<pre><code>$('table.diyform').children('tbody').children('tr').each(function() { var $tds = $(this).children('td'); var label = $tds[0].find('a').html(); var required = $tds[0].find('input').html(); }); </code></pre> <p>The problem lies in <code>$tds[0]</code> but I don't know the correct way to do it yet.</p>
jquery
[5]
2,710,672
2,710,673
JavaScript cleaner/purifier?
<p>Is there any way to cleanup JavaScript code? </p> <p>I want to enable users to post arbitrary JS but i want to filter some of it out, like eval and document.write. Do you know of any tool that can do this?</p>
javascript
[3]
3,348,561
3,348,562
If statement to control user input
<p>The code given works fine but not with the original code. I would like the code to offer a number 1 through 5 and only accept a number 1 through 5. The number choosen Within range would still return random integers.</p> <pre><code>import random user_input = raw_input("Enter a number between 1 and 5 : ") selected_...
python
[7]
1,402,571
1,402,572
sending a fax from Android with a call (not an online service)
<p>Is there a way to send a fax from an android phone using the phone (and not some fax server or service)? Is there a Java library that I could start with?</p>
android
[4]
538,365
538,366
Select throwing error WSAENOTSOCK
<p><strong>ISSUE THAT I AM FACING</strong>:-</p> <p>Select(..) API is throwing error when called with FD_SET set containing IPv6 and IPv4 sockets on Win7 Home premium but the same application is running fine on other win7 machine. But if i use only IPv6 or IPv4 socket in FD_SET then it runs fine. So i think, system s...
c++
[6]
1,192,279
1,192,280
meta tag in wordpress
<p>how can i get the information which i have stored in the wordpress pages using meta tag.</p>
php
[2]
4,657,863
4,657,864
jquery refreshing a div without using other files?
<p>Right now, i know if i want to reload a div every xx seconds, i must place the div in a separate file, and use the first file to load then every xx seconds, so use code like:</p> <pre><code>&lt;script&gt; $(document).ready(function(){ $('#chat_holder').load('file.page.php'); setInterval(function(){ $(...
jquery
[5]
3,908,309
3,908,310
how to make thumbnails with php
<p>I was just wondering how I can make thumbnails of images stored in hdd and use them in an html page, also I need the thumbnails to be able to enlarge (to their original size) if clicked on preferably inside a div tag on the same page, I would appreciate if anyone could put me in the right direction</p> <p>thanks</...
php
[2]
1,850,228
1,850,229
C# empty statement
<p>In C#, I can write something like:</p> <pre><code>using (new MyDisposableClass().MethodA()); </code></pre> <p>The semicolon causes a compiler warning to be shown which states possible mistaken empty statement. I haven't run the above code but won't the method still be called?</p> <p>What uses is there of this typ...
c#
[0]
3,636,880
3,636,881
What is the difference in the way static methods and instance methods are used in Java.
<p>While reading a book, i came across this statement: </p> <hr> <p><em>The methods of an object define its behaviour. These methods are called instance methods. It is important to note that these methods pertain to each object of the class. <strong>This should not be confused with the implementation of the methods w...
java
[1]
5,399,817
5,399,818
How can I get the last 12 months sales subtotals in a table?
<p>I have this code so far which gives me the subtotals for each product for a given month. </p> <pre><code> &lt;?php include("dbaseconn.php"); $query = "SELECT product, SUM(qty) FROM sh_orders GROUP BY product"; $result = mysql_query($query) or die(mysql_error()); // Print out result while...
php
[2]
2,650,944
2,650,945
Weekly event manager code not working in javascript
<p>I have create a weekly event manager in javascript . but something went wrong. the code is not working . Please someone solve the fault.Whats wrong in it ?????</p> <pre><code>var plan=prompt("Hello , Made a week plan. Type the week name to add a event"); var week = ["saturday" , "sunday" , "monday" , "tuesday"]; va...
javascript
[3]
5,633,710
5,633,711
Java codes for USB
<p>I want to create a program using Java for Automatically copied USB's data when it's insert to machine. How I do it? </p>
java
[1]
2,448,840
2,448,841
Scrape a number from separate spans
<p>I need to scrape the number 622104 from this html</p> <p>How can I get the number?</p> <pre><code>&lt;div class="numbersBackground"&gt; &lt;div id="ctl00_mainContent_playersOnlineNumberRepeater_ctl00_numberPanel" class="number"&gt; &lt;div class="numberWrapper"&gt;&lt;span&gt;6&lt;/span&gt;&lt;/div...
php
[2]
5,638,582
5,638,583
How to turn to US characters
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/158241/php-replace-umlauts-with-closest-7-bit-ascii-equivalent-in-an-utf-8-string">PHP: Replace umlauts with closest 7-bit ASCII equivalent in an UTF-8 string</a> </p> </blockquote> <p>I need to change strings t...
php
[2]
2,576,351
2,576,352
Method-Object pairs in Java
<p>I'd like to create a list of method-object pairs. Each method is a function returning a boolean. Then:</p> <pre><code>foreach(pair) { if method evaluates to true { do something with the object } } </code></pre> <p>One way of modelling this that I can think of is to have a class <code>Constraint</code> ...
java
[1]
4,128,930
4,128,931
Use jquery show() and animate() together?
<p>I have an issue getting jquery animate to fire after calling show or fadeIn on a hidden absolutely positioned div (display = none). The fadeIn/Show works fine, but the animate does nothing - and the logic function definitely evaluates to true after testing. I'm using IE9. Am I missing something?? Thanks.</p> <p...
jquery
[5]
326,390
326,391
Why can't i have classcastexception?
<p>Why can't i have classcastexception? E means C in the example, doesn't it? B is not C, I thought my cast must work only for compiler. Where is my mistake?</p> <pre><code>public class A{ public static void main(String...s){ Monitor&lt;C&gt; m = new Monitor&lt;C&gt;(); C arg2 = new C(); B d = m.f(arg2);...
java
[1]
162,061
162,062
My date function in PHP doesn't display the correct time
<p>Here's my PHP code:</p> <pre><code>echo date('M j y g:i:A'); </code></pre> <p>This doesn't display correct time. why?</p>
php
[2]
5,517,891
5,517,892
RemoteControlClient image brightness?
<p>I have the intention of allowing users to have pictures on their lock screen. The only way I could find do this easily is through a <code>RemoteControlClient</code>. My issue is the image is rather dim on the lock screen and I'm wondering if there is a setting to make it brighter. The code I set it up with is the fo...
android
[4]
2,954,232
2,954,233
Error: NetBeans 7.0 Android SDK 14
<p>I am getting the following error on NetBeans 7.0 trying to run a HelloAndroid application. The Android SDK as well as an Android device have already been detected by NetBeans, and I followed all the instructions given.</p> <blockquote> <p>C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:421: Android...
android
[4]
2,729,005
2,729,006
no way to change the large icon of my app
<p>I submitted an app to apple, they said my icon needs to change. I redesigned the icon but found that there is no way to change the icon. If I submitted a new app, the app name will duplicated and be refused</p> <p><img src="http://i.stack.imgur.com/AS5Gl.png" alt="enter image description here"></p> <p>Welcome any ...
iphone
[8]
5,287,866
5,287,867
Best Practice for JavaDocs - Interface,Implementation, or Both?
<p>I have a DAO interface and implementation of the DAO. The JavaDocs in the interface are what Netbeans displays to the client implementing the DAO methods.</p> <p>Obviously I will need to maintain the JavaDocs in the interface. But what about the implementation of it? On one hand, it is convenient to have them th...
java
[1]
4,706,871
4,706,872
How to put a date value as a number in a jscript array instead of using new Date(2008, 1 ,1)?
<p>I have an array of dates that I am populating adding the dates creating the types and calling their constructor like this: new Date(2008, 1, 1)</p> <p>I was wondering if there is a better way to do this? I am guessing that I can use the numeric representation of Date and put that into the array on the server side a...
javascript
[3]
3,208,501
3,208,502
jquery: how to remove the handler setup by .click()?
<p>I found sometimes I hook up 2 functions to the buttun, using .click(function(){}), is it possible for me to remove the prior attached function before I hook up new one?</p>
jquery
[5]
210,922
210,923
How should objects be in a Java game
<p>EDIT: i just deleted the entire post and reformulated the question to be more generic.</p> <p>I want to do a simple strategy game: map, units.</p> <p>Map: one class. Units: another class, self drawn.</p> <p>Simple questions:</p> <ol> <li>How does an unit should redraw itself on the map.</li> <li>A unit should be...
java
[1]
3,004,415
3,004,416
display ['name'] inside of a foreach loop coming from another loop
<p>is it possible to use the indexes values inside of a foreach loop that is contained inside a partent for each. Look at the script below and observe that in the child for each I use <code>echo'&lt;div&gt;' .$product['name'] . '&lt;/div&gt;';</code> When <code>$product[' name '];</code> belongs to the parent for each...
php
[2]
116,497
116,498
Accessing an object property without knowing the name?
<p>I'm writing a PHP script that accesses two different data objects - one is backed by a DB, the other contains session data. They both contain the same fields - i.e. the data that is in the session object will make its way into the DB once it is validated.</p> <p>I'm trying to write a function that will first check ...
php
[2]
1,781,183
1,781,184
Script for adding an image at the very end of the last paragraph for multiple blocks
<p>For each article on a page, I would like to insert an image at the very end of the last paragraph. My HTML looks like this: </p> <pre><code>&lt;div class="storycontent"&gt; &lt;p&gt;One&lt;/p&gt; &lt;p&gt;Two&lt;/p&gt; &lt;p&gt;Three&lt;/p&gt; &lt;/div&gt; </code></pre> <p>There may be several of those s...
jquery
[5]
3,426,412
3,426,413
Loading images one by one
<p>I want to load images one by one not all together.In the following code imagedata is the array containing urls from which i need to load images. Here is my code but no success.</p> <pre><code>-(void)loadSingleImage:(int)buttonTag { UIButton *buttonImage =(UIButton *) [self.view viewWithTag:buttonTag]; NSD...
iphone
[8]
2,402,425
2,402,426
Concept - Does a queue have direction?
<p>I called it a queue but according to <a href="http://en.wikipedia.org/wiki/Queue_%28data_structure%29" rel="nofollow">wikipedia</a> a queue is a first in first out data structure. </p> <p>You add to the "front". And you remove from the "end".</p> <p>I'm doing the opposite.</p> <p>I'm adding to the "end". And re...
javascript
[3]
1,009,641
1,009,642
Variable assignment with || in value
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2100758/javascript-or-variable-assignment-explanation">JavaScript OR (||) variable assignment explanation</a> </p> </blockquote> <p>Can someone help explain what this line does, and how?</p> <pre><code>var scro...
javascript
[3]
5,161,438
5,161,439
What is a PHP anonymous function?
<p>What is an anonymous function in PHP? Could you give me a simple example, please?</p>
php
[2]
488,074
488,075
How To Set Browser Cookies With Curl
<p>I have a curl function as shown below. To load this function i use this <code>&lt;img src="http://site.com/pxl.php?i=1.jpg" height="1" width="1" /&gt;</code> but when i do that cookies dont get added to my browser. Is there a way so that when the curl run on the url i collect the cookies from the url and set it to t...
php
[2]
4,493,327
4,493,328
IndexOutOfBoundsException in ArrayAdapter
<p>I got a trivial code involving a <code>ListView</code> and a <code>ArrayAdapter</code> which throws a IndexOutOfBoundsException on some devices. The problem is: I do not know how this Exception occurs, I only get the stacktraces from the Developer Console of Android.</p> <p>The reduced code example is shown below. ...
android
[4]
851,323
851,324
automatically choose video file without using openfiledialog
<p>I am using AForge code to play video in my program using c# and it works well. here is the code:</p> <pre><code>private void loadButton_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == DialogResult.OK) { FileVideoSource fileSource = new FileVideoSource(openFileDialog1.FileName...
c#
[0]
4,120,443
4,120,444
Unable to pass string parameter to a simple Javascript function being invoked when a hyperlink is clicked
<p>It's a very simple question but I couldn't figure it out. I'm trying to pass parameters to a Javascript function which is invoked when a hyper link is clicked. </p> <p>It works just fine when the parameters are number but doesn't work when one of them is of type string. I even tried to escape them but unfortunately...
javascript
[3]
3,964,427
3,964,428
Emulator comes up, but is very unstable
<p>The emulator comes up but its very unstable. It keeps giving me the window that asks to send data to microsoft. The it becomes not responding and freezes up. Sometimes I might keep it up for a while and am not doing anything to it and all of a sudden it pops up the debug window. Is there something I can do to make i...
android
[4]
2,888,514
2,888,515
I want to remove the row if that row's <td> contains only B in my below code?
<p>Please check the below code. Here i'm deleting the row, if that row td contains the value "B". But bellow code is removing all rows.</p> <p>jQuery</p> <pre><code>$(document).ready(function() { $("#mytable tr td:contains('B')").parent().remove(); }); </code></pre> <p>HTML</p> <pre><code>&lt;table border="0" a...
jquery
[5]
2,892,051
2,892,052
Iterating through a list based on the value of an Id element inside the list in c#
<p>I have another question that's connected with my class:</p> <pre><code>public class Parent { public IList&lt;ParentDetail&gt; ParentDetails { get { return _ParentDetails; } } private List&lt;ParentDetail&gt; _ParentDetails = new List&lt;ParentDetail&gt;(); public Parent()...
c#
[0]
981,709
981,710
What is the meaning of this?
<p>Code:</p> <pre><code>void *buff; char *r_buff = (char *)buff; </code></pre> <p>I can't understand the type casting of <code>buff</code>. Please help.</p> <p>Thank you.</p>
c++
[6]
4,437,711
4,437,712
navigation bar Android
<p>how do I make a navigation bar like this?</p> <p><a href="http://www.freeimagehosting.net/uploads/8aa355f9ef.png" rel="nofollow">http://www.freeimagehosting.net/uploads/8aa355f9ef.png</a></p>
android
[4]
3,499,500
3,499,501
Casting and ArrayList
<p>I have an ArrayList that contains a number of songs objects.</p> <pre><code>ArrayList&lt;Song&gt; aSong = new ArrayList&lt;Song&gt;(); </code></pre> <p>The Song class looks like this:</p> <pre><code>public class Song { private String sName; private String sLength; public Song(String name, String length){ sNa...
java
[1]
4,050,368
4,050,369
qtip - distinct results on distinct table rows
<p>I have table with few rows, after use hover mouse over row I want to display qtip ( <a href="http://craigsworks.com/projects/qtip/docs/#create" rel="nofollow">http://craigsworks.com/projects/qtip/docs/#create</a> ) tooltip. How can I refer to some row id in function, where I define displayed content:</p> <pre><code...
jquery
[5]
76,280
76,281
SharedPreferences TextView
<p>I have button, after I click button it will list to the ListView, choose ListView item and this item will display to left of the button, I want after I restart the program the listItem was choosed is display. If anybody know this, please help me? Thanks</p>
android
[4]
4,610,983
4,610,984
How can I define this value(s) in a good and easy way?
<p>I am stuck in a conversion / definition of a function parameter and would very much appreciate some help. I am sure it's an easy one for any experienced c/c++ guy, but not for me, not right now.</p> <p><strong>Problem:</strong></p> <p>creating the right paramter to use with <code>myCommmand(uint8 *pAddr)</code>, w...
c++
[6]
2,190,765
2,190,766
C# Foreach usercontrols I added to a page
<p>I've got this code:</p> <pre><code> protected void ddlTemplate_SelectedIndexChanged(object sender, EventArgs e) { Template t = new Template(); t.LoadById(Convert.ToInt32(ddlTemplate.SelectedItem.Value)); foreach (Widget w in t.TemplateWidgets) { UserControls_Widget ucWidget = (UserControl...
c#
[0]
700,941
700,942
How to shield the home key if my app is active? (Screensaver, Lockscreen)
<p>If I want to write a Screensaver or Lockscreen. Is there a way to prevent the home key from going back to the launcher?</p>
android
[4]
3,920,594
3,920,595
Get sum of the same class
<p>I have</p> <pre><code>&lt;div id="english"&gt; &lt;ul&gt; &lt;li&gt;English&lt;/li&gt; &lt;li&gt;Instructor Name&lt;/li&gt; &lt;li class="grade"&gt;85&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div id="math"&gt; &lt;ul&gt; &lt;li&gt;Math&lt;/li&gt; &lt;li&gt;Instructo...
jquery
[5]
3,339,065
3,339,066
keeping a division visible in the screen
<p>I am creating a web page in which when user hovers on an image it displays a paragraph which is enclosed in a division under it. When the user moves the cursur out of the image the division disappears.</p> <p>My problem is that when the user clicks the image which is in the bottom of the screen.. i want the page to...
javascript
[3]
1,775,062
1,775,063
Inserting and removing commas from integers in c++
<p>Very much a noob here, so it's best to assume I know nothing in any answers.</p> <p>I've been writing a little app, and it's working well, but readability is a nightmare with my numbers.</p> <p>Essentially, all I want to do is to add commas into the numbers displayed on the screen to make it easier to read. Is the...
c++
[6]
95,895
95,896
Performing periodic audits and best practice
<p>I'm doing a windows form and would like an audit task to happen every 30 seconds. This audit is essentially checking a series of services on remote computers and reporting back into a richtextbox the status.</p> <p>Current I have this running in an endless background thread and using an invoker to update the richt...
c#
[0]
2,414,449
2,414,450
Is there jQuery plugin for displaying tooltips with content of some other page?
<p>Are there any jquery tooltips that could display a content of a provided url? I need it urgently and I've searched and searched and to no avail. I have a page that displays contact information of a certain person (provided in query string) and some other page that displays a list of users. i would like to display th...
jquery
[5]
2,661,115
2,661,116
write cell data to a html table using innerHTML
<p>having trouble putting together the final function displayLetter(a,b,c,d,e,f,g) and writing to table with innerHTML with array element and variables in variableTest() I know I need to use .length and to determine how many cells I need. W3C only gets me so far. Thanks for the help!</p> <pre><code> &lt;html&gt; &lt;...
javascript
[3]
3,269,310
3,269,311
3ds rendering problem
<p>I'm trying to load a 3ds file using TAO framework, and I finally found a 3ds loader that is written in C#. The loader works fine when I call the rendering Method after setting the matrix as GL_PROJECTION. But when I try to draw the object after setting GL_MODELVIEW matrix, it turns white .. and the colors can slight...
c#
[0]
1,311,167
1,311,168
How do i change everything behind a certain point in a Jagged array?
<p>Say I have a jagged array, and position 2,3 is taken by int 3. Every other spot is filled with int 0. How would I fill all the positions behind 2,3 with a 4?</p> <pre><code>0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 </code></pre> <p>to this:</p> <pre><code>4 4 4 4 4 4 4 4 4 4 4 4 4 3 0 0 0 0 0 0 0 </code><...
c#
[0]
5,448,180
5,448,181
Extending the DOM
<p>I've recently read that extending the DOM on the whole is bad, because of reasons listed <a href="http://www.nczonline.net/blog/2010/03/02/maintainable-javascript-dont-modify-objects-you-down-own/" rel="nofollow">here</a> and <a href="http://perfectionkills.com/whats-wrong-with-extending-the-dom/" rel="nofollow">her...
javascript
[3]
4,523,020
4,523,021
running a while loop on an interval
<p>I am building a game with a good emphasis on physics. Therefore I need the game to run on a very specific interval. Current code:</p> <pre><code>public double period = .02; //this is the run interval in seconds //main gameLoop public void gameLoop(){ long startTime; long sleep; while(running){ ...
java
[1]
5,734,992
5,734,993
connect to the wifi point with 802.1xEAP
<p>I am trying to connect a wifi access point with security type 802.1xEAP. I know how can I connect a wifi point with WPA and WEP. However, I could not find the way how I can connect to the wifi point with 802.1xEAP. Can you help me how I can do ?</p>
android
[4]
2,534,520
2,534,521
"self" instead of traditional "this" keyword?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1079983/why-do-pythonistas-call-the-current-reference-self-and-not-this">Why do pythonistas call the current reference &ldquo;self&rdquo; and not &ldquo;this&rdquo;?</a> </p> </blockquote> <p>I am wondering why ...
python
[7]
4,054,184
4,054,185
Why should the interface for a Java class be prefered?
<p><a href="http://pmd.sourceforge.net/">PMD</a> would report a violation for:</p> <pre><code>ArrayList&lt;Object&gt; list = new ArrayList&lt;Object&gt;(); </code></pre> <p>The violation was "Avoid using implementation types like 'ArrayList'; use the interface instead".</p> <p>The following line would correct the vi...
java
[1]
3,084,018
3,084,019
PHP Random M or F
<p>I would like to create a function to random between <code>M</code> or <code>F</code> characters. How could I create an function to do that?</p>
php
[2]
3,364,584
3,364,585
How do I calculate the visitors for the last 24 hours?
<p>I have the following code:</p> <pre><code>$ips = file_get_contents($_SERVER['DOCUMENT_ROOT']."/visitors.txt"); $arr = explode(",",$ips); $today = strtotime(date('Y-m-d H:i:s')); for ($n = 0, $max = count($arr); $n &lt;= $max; $n++) { $visArr = explode("#",$arr[$n]); $visDate = strtotime($visArr[1]); //$visArr[1]...
php
[2]
1,551,474
1,551,475
How is cURL related to web services?
<p>well...just about all I needed to say...lookie here, I'm a total noob in web programming so go easy on me..and oh...if ever it is...could you point me to a simple example? i've worked wiht cURL on a payment API (Authorize.net) but I can't seem to get the picture of how it applies to web services</p>
php
[2]
1,441,259
1,441,260
retrieve image from data base and display it in grid view as a link
<p>I want to retrieve images from the database and display it in grid view as link. When I click on it, it should work as a link and go to another page. And I want the grid view itself to be three columns, all of them have images. Only that means that I want to display images in three columns in the grid view using asp...
asp.net
[9]
1,322,520
1,322,521
Wrapper objects and equality
<p>Why is it the case that if I run the .equals method on two wrapper objects it will return true as per the WrapperEqualsEquals Class below <strong>but</strong> (and I stress the but) why do we need to override the equals method in the Blob Class below in order for it to return true. Basically why do the wrapper objec...
java
[1]
2,590,515
2,590,516
What is the purpose of Session Data?
<p>I have searched many questions regarding <code>session_destroy</code> and the often response from the answerers involve quoting directly from the <a href="http://us.php.net/session_destroy" rel="nofollow">PHP manual</a> which states the following:</p> <blockquote> <p>session_destroy() destroys all of the data ass...
php
[2]
355,044
355,045
What is the best way to do a reference to a function in PHP?
<p>Let's say I can call a method like this: <code>core::get()</code>. What is the best way to reference to this method? Everytime I call a function called <code>get</code> it should call <code>core::get()</code> and pass the same parameters.</p> <p>All I could come up with was this:</p> <pre><code>function get(){ ...
php
[2]
4,076,372
4,076,373
Difference between string.Empty and ""
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/263191/in-c-should-i-use-string-empty-or-string-empty-or">In C#, should I use string.Empty or String.Empty or &ldquo;&rdquo; ?</a> </p> </blockquote> <p>Is there any difference in c# between the following declar...
c#
[0]
948,702
948,703
how to get a if else to operate based on the char i entered
<p>am trying to get an if else if statement to operate but am getting an error when using it please see the program below thanks</p> <pre><code>public class Info { public static void main(String [] args){ Scanner input=new Scanner(System.in); System.out.print("Enter employee num"); int e_num=input.nextI...
java
[1]
3,908,311
3,908,312
Wrap three repeating div groups into one using jQuery
<p>I have another problem here. I have few repeating groups of divs. There is 3 divs with different classes in one group.</p> <p>What I need to do is wrap the into one 'container'. When I'm using wrapAll it wraps all into one div.</p> <p>And this is my html:</p> <pre><code>&lt;div class="bb_box_tl"&gt;&lt;/div&gt; &...
jquery
[5]
2,979,840
2,979,841
C++ method only visible when object cast to base class?
<p>It must be something specific in my code, which I can't post. But maybe someone can suggest possible causes.</p> <p>Basically I have:</p> <pre><code>class CParent { public: void doIt(int x); }; class CChild : public CParent { public: void doIt(int x,int y,int z); }; CChild *pChild = ... pChild-&gt;doIt(123)...
c++
[6]
3,958,859
3,958,860
Is there a case for a String.IsNullOrEmpty operator?
<p><code>String.IsNullOrEmpty()</code> appears to be an extremely well used method and I find myself wishing there were some shorthand for it. Something like <code>???</code> as it would be used in a similar context to the null coalesce operator but be extended to test for empty as well as null strings. I.e.</p> <pre>...
c#
[0]
5,341,326
5,341,327
How do I pass a jQuery value to a text box?
<p>I have a function <br></p> <pre><code>$(function(){ $("#divcalendarcolor a").click(function(){ var key = $(this).attr("key"); alert(key); //$('input:textbox').val(key); //$('input[id=RemainderColor').val($('#divcalendarcolor a').val()); }) }); </code></pre> <p>I want to pa...
jquery
[5]
3,686,460
3,686,461
Function calls and arrays in PHP
<p>Question 1: What is meaning of <code>expr</code> in the following code?</p> <pre><code> public function getProblem($id) { DB::update($this-&gt;_table_name) -&gt;set(array('views' =&gt; DB::expr('views + 1'))) -&gt;where('id', '=', $id) -&gt;execute(); $res = ...
php
[2]
2,583,307
2,583,308
relative mouse coordinates in a DIV - javascript
<p>I'm moving the mouse over a div and I want to know the mouse coordinates with respect to the div origin. (upper left corner)</p> <p>I expected the mousemove event to contain the relative (client?) coordinates of the mouse, but apparently it doesn't.</p> <p>In firefox for instance, none of the event properties* co...
javascript
[3]
5,843,733
5,843,734
problem in improving two galleries
<p><strong>Here is my code:</strong> </p> <pre><code> gallery = (Gallery) findViewById(R.id.gallery1); gallery = (Gallery)findViewById(R.id.gallery2); imgView = (ImageView)findViewById(R.id.ImageView01); imgView.setImageResource(Imgid[0]); final ArrayList&lt;search...
android
[4]
1,196,753
1,196,754
Replacing all occurrences of a string in javascript?
<p>Say I have this string:</p> <pre><code>Test abc test test abc test test test abc test test abc </code></pre> <p>Doing</p> <pre><code>str=str.replace('abc',''); </code></pre> <p>Seems only to remove the first occurrence of <code>abc</code> in the string above. How can I replace ALL occurrences of it?</p>
javascript
[3]
5,075,240
5,075,241
jQuery BLUR - determine what the ID of the clicked item that triggered the blur is?
<p>Given a live('blur', function(e) {} how can you get the attr('id') of the clicked item that triggered the blur?</p>
jquery
[5]
5,327,699
5,327,700
Put a picture(logo) in UITableView in the bottom of a scrollable View which won`t be scrollable
<p>As the title says im searching for an solution for my problem.</p> <p>I tried everything, with the footer section even i tried to put an non funtional Button in the Footer of the UITableView.</p> <p>But it scolls up and down if there are not so many items to show.</p> <p>How can I put an Image in the buttom which...
iphone
[8]
6,015,014
6,015,015
How to check which side of an element has more room, display a div on that side, Lea Verou "animatable" example page
<p><a href="http://leaverou.github.com/animatable/" rel="nofollow">http://leaverou.github.com/animatable/</a></p> <p>On this page, click a block and see the black box that appears. The black box will appear on either the left or the right of the numbered blocks, depending on which side of the block has more room. You ...
jquery
[5]
5,981,663
5,981,664
iphone force portrait mode from landscape?
<p>I have a complicated structure where I have a custom tab-bar controller that houses multiple navigation controllers. Some of these sub-navigation controllers only support portrait mode so I just turn off rotation when I get to them. When I come into the new navigation controller and it is in landscape is there a way...
iphone
[8]
5,203,303
5,203,304
what is the difference of thread.sleep and systemclock.sleep. and which one should be used in AsyncTask?
<p>I figured out if I exit an activity while is running the AsyncTask in the middle, and when I try to start that activity again, I will have to wait until the previous AsyncTask to finish before the new AsynTask starts. I tried both thread.sleep and systemclock.sleep and it gives me the same result. Which make sense b...
android
[4]
3,918,423
3,918,424
Getting and using values obtained from multiple text boxes via JQuery
<p>I'm trying to get the values from multiple textboxes using JQuery.</p> <p>I'm a bit of a newbie with Javascript in general. I have a form with the following input element: </p> <pre><code>&lt;input name="milkman" value="jessie"/&gt; &lt;input name="letterman2" value="jim" /&gt; &lt;input name="newmilk" /&gt; </cod...
jquery
[5]
2,402,138
2,402,139
postback in asp doesn't refresh control value
<p>I have a div(runat=server) that contain repeater,this repeater is getting is value from datatable</p> <p>when the datatable is empty I do this line of code in asp .net function</p> <pre><code>divname.innerHTML="&lt;img src="...&gt;" </code></pre> <p>on this page there is also a asp:button that fill the datatable ...
asp.net
[9]
998,700
998,701
how to have multiple headers for different users of wishlist members (three different)
<p>I’ve a created wordpress membership site using wishlist member plugin. But I want to have different header.php based on different logins.</p> <p>Eg: Users are: Print, Web and Free</p> <pre><code>When Free user logs in – I want header1.php to load and stay till he logs out When Print user logs in – I want header2.p...
php
[2]
5,442,195
5,442,196
spinner and onItemSelected
<p>If I have 2 spinner depended with type ArrayList></p> <pre><code> spinner2.setOnItemSelectedListener(new OnItemSelectedListener() { @Override public void onItemSelected(AdapterView&lt;?&gt; adapterView, View view, int position, long id) { ArrayList&...
android
[4]
2,260,985
2,260,986
Scrolling to a specific position
<p>I currently have a map for the game I run, the map is already <a href="http://woarl.com/map/turn_26_normal.html" rel="nofollow">quite big</a> and I'd like to make it possible to scroll to a position with Javascript. I have jQuery in use should that be helpful.</p> <p>Thanks</p>
javascript
[3]
4,029,559
4,029,560
Dynamically insert script and execute immediately
<p>I'm building a webservice that automatically combines and minifies a website's javascript. The web owner would just include the following js snippet in the website head, and it creates the minified file and appends it to the head element.</p> <p>The issue I'm seeing is that when a script is dynamically appended it ...
javascript
[3]
4,605,843
4,605,844
characters display of a text file in java
<p>I have a text file which contains a line as a,b,a,b,a,b and I want to display the line as b,b,b,a,a,a </p> <p>any assistance would be appreciated</p>
java
[1]
5,571,967
5,571,968
how to set the background color of selected row in a custom list?
<p>i am trying to change the background color of the selected row in a listview and i am able to do it. But when i am clicking on another row then the background color of the previously selectedrow remains unchanged. I have the position of the previously selected row, Can anybody help me that how can change the bac...
android
[4]
324,678
324,679
Switch color of title bar programmatically?
<p>I have gone through <a href="http://stackoverflow.com/a/2285722/599116">this</a> to change the color of my title bar. I'm trying to figure out how I would switch that programmatically? Say if a user clicks a button, I want to switch to another predefined color. How might I do that?</p>
android
[4]
1,916,107
1,916,108
Android Karaoke Text?
<p>I have been scratching my head for the past week to do this effect on the text. <a href="http://www.youtube.com/watch?v=gB2PL33DMFs&amp;feature=related" rel="nofollow">http://www.youtube.com/watch?v=gB2PL33DMFs&amp;feature=related</a> Would be great if someone can give me some tips or guidance or tutorial on how to ...
android
[4]
4,872,211
4,872,212
Better way to get where a request actually came from
<p>I am aware that <code>$_SERVER[REFERRER]</code> can be used to detect where a request comes from however it turned out that it can be fooled or even a browser might not send it as part of the request.</p> <p>Could anyone suggest a better way to detect or rather allow requests from own domain only to avoid spoofing,...
php
[2]
5,824,474
5,824,475
How to connect android market in an application?
<p>I m developing android apps.</p> <p>I have to connect android market in my application.</p> <p>So ,kindly suggest me how to connect android market.</p> <p>Thanks in adv.</p>
android
[4]
5,308,603
5,308,604
C++ include header problem
<p>I am new to c/c++, I am confused about followings:</p> <ol> <li>Whether I should put class declarations in its own header file, and actual implementation in another file?</li> <li>Whether I should put headers like <code>&lt;iostream&gt;</code> in the example.h file or in example.cpp file?</li> <li>If all the classe...
c++
[6]
5,420,433
5,420,434
using dbus on Android
<p>I would like to know if it is possible to use DBUS on Android using Java. From what I have been searching till now it appears like there is no DBUS programming support on Android. But then bluetooth on Android uses DBUS. I would like to confirm if it is actually the case. If so, is there a possibility that DBUS woul...
android
[4]
3,165,589
3,165,590
Python - Is there a way around 'os.listdir()' returning gibberish for bad folder name?
<p>I have a simple script written in Python:</p> <pre><code>import os def Path(SourcePath): for Folder in os.listdir(SourcePath): print "TESTING: %s" % Folder Path("\\\\192.168.0.36\\PDFs") </code></pre> <p>When i run this it recurses through a remote share on the LAN and just simply displays the names of ...
python
[7]
785,050
785,051
PHP tag closing-- when is needed?
<p><a href="http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html" rel="nofollow">It's recommended</a> that one should not put a PHP closing tag at the end of the file to avoid all sorts of untoward error. But is there any circumstances when PHP tag closing is needed?</p>
php
[2]
5,896,710
5,896,711
how can I change en.jscript file to farsi.jscript?
<p>I use processmaker software and I want change english language to persian.</p>
javascript
[3]