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 |
|---|---|---|---|---|---|
2,900,507 | 2,900,508 | javap doesn't show the type of the Collection | <pre><code>public static java.util.List getFoo(java.lang.String)
</code></pre>
<p>The above method returns a <code>List<String></code>, but the <code>javap</code> command returns the above (it doesn't show that the <code>List</code> is of type <code>String</code>). Is there a way to show the real type?</p>
| java | [1] |
5,716,405 | 5,716,406 | How to find the Dominant color in image? | <p>i want to find the dominant color in image,
how can i do it ?</p>
<p>it would be great if i can get this in HEX code (exm: #eeeeee)</p>
| php | [2] |
4,492,638 | 4,492,639 | check box not working | <p>I need your assistance in my following scenario.</p>
<p>I have three checkboxes A, B and C and variables a. If I click on Checkbox B, the value of a should be kept 2 and if I check A then this should be changed to 3 and if I deselect it should go back to 2.</p>
<p>How to obtain this dynamically?</p>
<p>I am using... | android | [4] |
2,253,496 | 2,253,497 | java.sql.SQLException: Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections | <p>Encountering this error with our J2EE application. How to know how much connection the application is currently using and what should be the optimal connection pool settings for a heavily traffic applicaiton</p>
| java | [1] |
2,804,528 | 2,804,529 | Clear referer of query string before POST of form | <p>I have a form that POSTs to a 3rd-party service for validation and information capture. In the 3rd-party back end, you can specify a URL for errors, and one option is "referring URL".</p>
<p>That's seemingly perfect. User POSTs an invalid form, and the page they are on "reloads" (not really, but that's the impressi... | javascript | [3] |
5,866,342 | 5,866,343 | How do check if a php session is empty? | <p>Is this bad practice?</p>
<pre><code>if($_SESSION['something'] == '') {
echo 'the session is empty';
}
</code></pre>
<p>Is there a way to check if a its empty or b it is not set? e.g something better than...</p>
<pre><code>if( $_SESSION['something'] == '' || !isset($_SESSION['something']) ) {
... | php | [2] |
4,350,970 | 4,350,971 | How can one avoid DatabaseObjectNotClosedException | <p>How one we avoid this exception??</p>
<pre>
01-19 17:16:16.024: WARN/SQLiteCompiledSql(477): Releasing statement in a finalizer. Please ensure that you explicitly call close() on your cursor: SELECT * FROM test
01-19 17:16:16.024: WARN/SQLiteCompiledSql(477): android.database.sqlite.DatabaseObjectNotClosedExcep... | android | [4] |
3,812,498 | 3,812,499 | Drawing on a textBox in C# with mouse | <p>I have an assignment to write a program in C# that uses a panel for scroll bars (which I have accomplished) and adding a picture box on top of that to allow drawing with a mouse. The program is also supposed to allow the user to choose different options from the menustrip. These include saving, saving as, resizing ... | c# | [0] |
5,856,136 | 5,856,137 | Helper class: Static or non-static functions | <p>When creating a helper class that has methods like stripping whitespace from a string, do you create the methods as <code>static</code> or non-<code>static</code> functions?</p>
<p>Also if the static method wants to call another function <code>do_magic()</code> in the class, how should the function be defined as (s... | php | [2] |
1,563,060 | 1,563,061 | Delete Certain String in Text Files Using PHP | <pre><code><?php
//reference text
foreach (glob("file1.txt") as $filename1) {
$file1 = $filename1;
$line1 = rtrim($file1, "\n");
$contents1 = file($line1, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$string1 = implode($contents1); // file_put_contents('google.txt',implode('',$c... | php | [2] |
667,935 | 667,936 | Primitive value vs Reference value | <p>I read a book called "Professional Javascript for web developer" and it says: "Variable is assigned by Reference value or Primitive Value. Reference values are objects stored in memory". And then it says nothing about how Primitive value is stored. So I guess it isn't stored in memory. Based on that, when I have a s... | javascript | [3] |
4,134,555 | 4,134,556 | Python List comprehension one declaration and 2 Comprehensions | <p>How can I combine this:</p>
<pre><code>ipaddresses = [ipadr['ip'] for ipadr in hosts]
for ipadr in ipaddresses:
ips = '.'.join(str(i) for i in ipadr)
</code></pre>
<p>Into One declaration with 2 list comprehensions? I just don't get it. Thanks</p>
<p>ipaddresses will print something like this:</p>
<blockquo... | python | [7] |
2,729,782 | 2,729,783 | Screen on/off detection | <p>here i am trying to determine whether the screen is on or not but it doesn't seems to be working when press power lock/unlock button. Application works with no error but the code in if-else doesnt seems to have effect.
<strong>Edited</strong>
now the code work(thanks <strong>Olgun</strong>) but the mediaplayer play... | android | [4] |
2,139,868 | 2,139,869 | Need Help- Switch statement | <p>Hello I'm new to programming and I need help figuring out what is wrong with my code.</p>
<p>Basically I need to take a letter A-Z and convert it to Leek(a combo of sign,#,letter that look like the A-Z characters. I'm only allow to use switch statements (switch,case,breaks) also I have to use the .next().charAt(0) ... | java | [1] |
978,284 | 978,285 | Dynamically creating textbox and a button | <p>In my application I am using the following lines of code to displaying textbox and a button dynamically when the user select <strong>NS</strong> option in the select option to enter the comments. There are more than 50 select option are there.</p>
<pre><code><select name="fieldname" id="crm_Communications" onch... | jquery | [5] |
3,949,252 | 3,949,253 | Run an external command and get the amount of CPU it consumed | <p>Pretty simple, I'd like to run an external command/program from within a Python script, once it is finished I would also want to know how much CPU time it consumed.</p>
<p>Hard mode: running multiple commands in parallel won't cause inaccuracies in the CPU consumed result.</p>
| python | [7] |
5,372,023 | 5,372,024 | how to set high light to text in java | <p>i need componant , tool or another way to hight light text in java </p>
| java | [1] |
3,248,438 | 3,248,439 | Confused about onTap | <p>I'm a bit confused about the onTap method(s) and how they work with ItemizedOverlay. I want the user to tap on the map and then I place an OverlayItem (icon) where they tapped. Then I want them to tap that OverlayItem again to confirm the location.</p>
<p>I can add the OverlayItem to the map no problems by overridi... | android | [4] |
732,600 | 732,601 | UUID of Obex Push Profile | <p>I try to open a socket for listening for incomming connection from a non-android device.</p>
<pre><code> Parcelable[] uuidExtra = device.getUuids();
String t = uuidExtra[0].toString();
t = t.toUpperCase();
Log.i("UUID: ", t);
</code></pre>
<p>This codesnippet will give me the UUID of the service provided by m... | android | [4] |
2,139,672 | 2,139,673 | How to add TextViews to a ListView | <p>I have a list and I would like to dynamically add rows to this list, but I want every row to be a TextView. Is this possible?</p>
<p>The following code doesn't work because it tells me that the method addView(TextView) is undefined for the type ArrayList (listItems):</p>
<pre><code>TextView textView = new TextView... | android | [4] |
5,786,299 | 5,786,300 | Automate Screenshots on iPhone Simulator? | <p>I'm tired of taking new screenshots everytime I change my UI for my iPhone application. I would like to be able to run a script/program/whatever to load my binary on the simulator and then take a few screenshots. </p>
<p>The solution can be in any language... it doesn't matter to me.</p>
<p>Thanks!</p>
| iphone | [8] |
4,716,539 | 4,716,540 | In PHP what does |= mean, That is pipe equals (not exclamation) | <p>I just found this in some code and I can't find anything on the web or php manual. Most likely since its an irregular character.</p>
<p>Here is one of the lines that uses it.</p>
<pre><code>$showPlayer |= isset($params['node']) && $params['node'];
</code></pre>
| php | [2] |
4,641,709 | 4,641,710 | PHP trigonometry TAN | <p>I try to figure out an angle of a triangle.</p>
<p>If one side of the triangle is 100 and the other side is 100.</p>
<p>How do I get that to be 45 degrees.</p>
<p>If I run tan<sup>-1</sup>(100/100) on my calculator i get 45. How do I do this in PHP?</p>
| php | [2] |
1,986,175 | 1,986,176 | Custon UISlider with non rectangular area | <p>I would like to customize my UISlider like this screenshot :</p>
<p><img src="http://img3.imageshack.us/img3/7707/sliderp.png" alt="alt text"></p>
<p>I'm using setMinimumTrackImage and setMaximumTrackImage method with a non strechable image but it doesn't work. </p>
<p>The image is stretched and proportion are ke... | iphone | [8] |
3,530,796 | 3,530,797 | Problem running compiled Python script | <p>So I have compiled a python script with py2exe according to <a href="http://stackoverflow.com/questions/4158369/can-i-somehow-compile-a-python-script-to-work-on-pc-without-python-installed">this answer</a>. There were no errors during compilation, everything went fine.</p>
<p>When I run the script from a cmd like t... | python | [7] |
5,049,009 | 5,049,010 | Intent putExtra() causes null pointer exception | <p>Hi I am trying to run simple activity my button on click looks like this</p>
<pre><code>public void onClick(View view){
Intent intent = new Intent(this,SecondActivity.class);
intent.putExtra("TextToGive", "Hello second activity");
startActivityForResult(intent, 1);
}
</code></pre>
<p>When I click th... | android | [4] |
3,976,475 | 3,976,476 | addslashes() example with NULL byte? | <p>What is NUL or NULL byte and how escaping works with NULL byte?</p>
<p>Can someone please give example?</p>
<p>single quote and double quote is very obvious but i am not clear about NULL byte.</p>
<p>Documentation from PHP.net.</p>
<p>addslashes() returns a string with backslashes before characters that need to ... | php | [2] |
2,683,061 | 2,683,062 | How can I see if a child exists in Python? | <p>I have an <code>lxml</code> object called <code>item</code> and it may have a child called <code>item.brand</code>, however it's possible that there is none as this is returned from an API. How can I check this in Python?</p>
| python | [7] |
4,934,602 | 4,934,603 | c# file handling problem | <p>In my c# window application. I have 2 folders in the same path where exe is exist. One is Input folder where we put all files for process and second is processed folder where after processing files are moved. </p>
<p>Let say we have file name 1.txt at input folder after processing the file is cut from input and mov... | c# | [0] |
848,812 | 848,813 | difference between call by value and call by reference in php and also $$ means? | <p>(1) I want to know what is the difference between call by value and call by reference in <code>php</code>. PHP works on call by value or call by reference?</p>
<p>(2) And also i want to know that do you mean by $$ sign in php</p>
<p>For example:-</p>
<pre><code>$a = 'name';
$$a = "Paul";
echo $name;
output is ... | php | [2] |
2,880,985 | 2,880,986 | Method that accept n Number of Parameters in C # | <p>I am Developing an windows Application, oftentimes I need to clear the Textboxes whenever the user save the Record or click on clear button.
Currently i am using this code txtboxname.text=string.empty; for each textbox</p>
<p>So can it be possible to write a method that accept the n number of parameter
like readin... | c# | [0] |
812,444 | 812,445 | JS newbie needs help with Jquery | <p>I am trying to write a jquery function but am brand new to jquery. Here is my very simple function, which I want to clear all of the links to the unselected class, except for the selected link:</p>
<pre><code>$(function()
{
$('li a').click(function()
{
$('li a').addClass('unselected');
$(this)... | jquery | [5] |
573,939 | 573,940 | why am I getting a java.lang.NullPointerException error? | <p>I have been trying to solve a java.lang.NullPointerException for the past hour. This error occurs when I invoke the play() method and input no. I have commented where the error points to down below. I would appreciate some assistance. Thanks.</p>
<pre><code>import java.util.ArrayList;
public class Game
{
private ... | java | [1] |
2,343,211 | 2,343,212 | jquery get selected dropdownlist text | <p>Hi How can i get the selected text on a dropdowm, ive seen examples of how to do eg
$('select option:selected').text() </p>
<p>but looking at my code below, how can i modify it to work as the line</p>
<pre><code> alert($(this).parent().text());
</code></pre>
<p>gets all the list items as opposed to selected t... | jquery | [5] |
2,145,538 | 2,145,539 | jQuery slideUp() only 'this' div | <p>I have this markup x 3:</p>
<pre><code> <div class="features">
<span class="overlay"><img src="img/webdesign.png" /></span>
<h2>Web Design</h2>
<p>Cow pig turkey, chuck sausage pork loin venison biltong shoulder. Shoulder pancetta ... | jquery | [5] |
2,110,792 | 2,110,793 | PHP send mail from addresses in database | <p>I've read & tried a few posts but can't get this problem solved. I'm trying to send mail to addresses in a database, but get the following error: <strong>Warning: mail() expects parameter 3 to be string, array given ...</strong> </p>
<pre><code>include 'datalogin.php';
$sql10 = "SELECT * FROM ex_usrs_admin_de... | php | [2] |
786,891 | 786,892 | Create Forum Threads by sending SMS | <p>Maybe there is ready solution for any Forum where people can make Theread's in forum by sending sms.
User send sms-get code-make a forum thread.</p>
| php | [2] |
2,004,370 | 2,004,371 | php abstract class extending another abstract class | <p>Is it possible in PHP, that an abstract class inherits from an abstract class?</p>
<p>For example, </p>
<pre><code>abstract class Generic {
abstract public function a();
abstract public function b();
}
abstract class MoreConcrete extends Generic {
public function a() { do_stuff(); }
abstract publi... | php | [2] |
2,672,404 | 2,672,405 | bitmap interpolation c# | <p>Grid size : 160*160
No of row* columns = 16*16</p>
<p>I have created a bitmap for this. Each cell of the grid is filled with different colors. I need to perform color interpolation. </p>
| c# | [0] |
5,469,202 | 5,469,203 | What is wrong with this c# syntax? | <pre><code>using System;
public class Test
{
public static void Main()
{
int n = 600851475143;
int x = 1;
While (x<n)
{
if(n%x==0)
{
Console.WriteLine(x);
}
x++;
}
}
}
</code></pre>
<p>Give... | c# | [0] |
2,425,995 | 2,425,996 | add server side validation using jQuery | <p>I have added the client side validations on a form using jQuery's validate() function and assigned rules and it shows the error messages in Red color below the respected fields. I want to show same error messages after performing server side validations done in PHP. Please help. </p>
| jquery | [5] |
1,028,529 | 1,028,530 | Block JS from loading on certain domains | <p>I have a web service that works through giving users javascript to embed in their code. Users can also place that code on other sites to make it work there. However I also need to allow users to create a blacklist of sites that the JS should not function on. For example, a competitor or an inappropriate site. </p>
... | javascript | [3] |
4,279,337 | 4,279,338 | Syntax error,I do not know how to correct C++ code. (homework project) | <pre><code>#include <iostream>
using namespace std;
int main()
{
// prototypes:
float add_and_div(float, float, float);
// variables:
float x, y, z;
float result;
cout << "Enter three floats: ";
cin >> x >> y >> z;
// continue the program here
add_and_div(x,y,z,);
... | c++ | [6] |
1,033,392 | 1,033,393 | Unexpected output in my function | <pre><code>public class Backhand {
int state = 0;
Backhand(int s) {
state = s;
}
public static void main(String... hi) {
Backhand b1 = new Backhand(1);
Backhand b2 = new Backhand(2);
System.out.println( b2.go(b2));
}
int go(Backhand b) {
if(this.state =... | java | [1] |
350,804 | 350,805 | Downaload a file programatically on android | <p>i am downloading files from web server programatically. after download is complete, i checked the file.the size ,extension and all other parameters are correct but i when i try to play that file in media player it is showing that it is corrupt.</p>
<p>plz help..</p>
<p>code:</p>
<pre><code> byte[] b = null;
... | android | [4] |
5,267,321 | 5,267,322 | PHP function __autoload($class_name) how to Load two class path directories | <p>I am using following function to autoload classes, it works fine if i am using only one directory called 'classes' however when i try to use Smarty lib also it fails and give me the error</p>
<pre><code>Fatal error: Class 'Database' not found in /home/...
</code></pre>
<p>for ex:</p>
<pre><code>require_once(DOC_R... | php | [2] |
4,924,596 | 4,924,597 | jquery cycling through images | <p>I have a page where I cycle through the images on the page using this code: </p>
<pre><code>$('#summaryContainer img:gt(0)').hide();
setInterval(function(){
$('#summaryContainer :first-child').fadeOut(summary.speed)
.next('img').fadeIn(summary.speed)
.end().appendTo('#summaryCont... | jquery | [5] |
3,918,858 | 3,918,859 | iphone where to go forward from learning cocos 2d by ray wenderlich | <p>my question is about the ray wenderlich's book
Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk</p>
<p>a very good book, now my question is that after studied it and implemented it, now when want to move forward for some more advanced game programing, what should be the wa... | iphone | [8] |
2,834,732 | 2,834,733 | Java: how to store data triple in a list? | <p>What's the best way in java to store data triple in a list ?</p>
<pre><code>[a, b, c]
[a, b, c]
...
</code></pre>
<p>I usually use HashMap for couples of data key + value.. should I go for HashMap + Arraylist ? or ArrayList + ArrayList ?</p>
<p>thanks </p>
| java | [1] |
2,205,851 | 2,205,852 | Best tool - Show source codes - Web | <p>What is the best tool for showing source codes on the Web ?</p>
<p>with Syntax highlighting , in color - Line-Numbers
Asp.Net</p>
| asp.net | [9] |
719,361 | 719,362 | "Glooming" effect layer on the bottom of ListView | <p>Currently, I have an <code>Activity</code>, with a <code>ListView</code> on the top, and <code>LinearLayout</code> on the bottom.</p>
<p><img src="http://i.stack.imgur.com/ne5fi.jpg" alt="enter image description here"></p>
<p>When a row in my <code>ListView</code> is scrolled and the row is partially shown, it loo... | android | [4] |
1,798,094 | 1,798,095 | I need to improve a function that selects all text in a table | <p>I have this function which selects all text in an element (table in this case)</p>
<pre><code>function SelectText(element) {
var text = document.getElementById(element);
var range = document.body.createTextRange();
range.moveToElementText(text);
range.select();
}
</code></pre>
<p>I n... | javascript | [3] |
1,841,810 | 1,841,811 | What does crockford mean when he says that undefined cannot be a property value? | <p>In the book Javascript the good parts, on the opening page of Ch3 on objects, it states:</p>
<blockquote>
<p>An object is a container of properties, where a property has a name and a value. A property name can be any string, including the empty string. A property value can be any Javascript value except for undef... | javascript | [3] |
3,402,790 | 3,402,791 | chart drawing in Java | <p>I draw a chart using Java, but I don't use anything like JChart2D etc.
I opened wolframalpha and draw a plot eg: plot[100*(x^2)] and then when you put a cursor on a plot you will see two crossing lines, which help you specify points. Can i make something like this using Java in jPanel?</p>
| java | [1] |
1,286,027 | 1,286,028 | Passing the address of an object causes parent class constructor to be called | <p>main.cpp:</p>
<pre><code>options my_options;
tree my_trees;
CODON_alphabet my_alphabet(1);
likelihood_engine my_likelihood(&my_options, &my_trees, &my_sites);
CODON_M0 m0(&my_trees, &my_alphabet, &my_likelihood);
</code></pre>
<p>The class CODON_alphabet has as a parent the class alphabet. ... | c++ | [6] |
3,895,185 | 3,895,186 | Replace common text with hex digits | <p>I have the user typing a string of 32 characters which are supposed to be hex digits.
But it would be nice if the program "auto-fixes" the string instead preventing him typing values outside of the hex digits with RegeX.
For example if user typed O that would be converted to 0 , or maybe even 8 to B
I know that the... | c# | [0] |
4,626,629 | 4,626,630 | jquery ajax call in confirm button | <p>Hi I written the ajax call inside if(confirm.... condition but it is not going to my ajax page. If i write $.get outside of if(confirm(.... then it is working fine.</p>
<p>What is the problem. please tell me some one.</p>
<pre><code>function ConfirmSave() {
if (confirm("Do You Want to Save the test?"))
... | jquery | [5] |
2,466,960 | 2,466,961 | Validate an image in PHP | <p>I'm using GD to create jpegs from files that a user uploads.</p>
<p>What is the best way to validate that the image the user has uploaded is valid?</p>
<p>By valid I mean that the file is not a corrupt image that GD won't like, I do extension testing client side so they can only upload jpegs/gifs/pngs.</p>
<p>Tha... | php | [2] |
5,072,384 | 5,072,385 | Scrollable Bar Chart in Achart engine in android | <p>I want to make scrollable bar chart as x-axis value is to large, my layout is</p>
<pre><code><ScrollView android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:id="@+id/chart1"
android:orientation="horizontal" android:layout_width="fill_par... | android | [4] |
1,567,428 | 1,567,429 | What's that feature of PHP with a section of html/text closed off with start/end functions? | <p>What's that feature of PHP where you have, say a "start" bit of code, then some html or text that would normally send to the browser, then a bit of code to "end" it?</p>
<p>For example,</p>
<pre><code><? start_something(); ?>
<html>some html</html>
<? end_something(); ?>
</code></pre>
<p... | php | [2] |
2,523,976 | 2,523,977 | What's a good place to unregister an observer from the notification center? | <p>When I add an observer to the default notification center, where would I unregister that?</p>
<p>Example: I have a UIView subclass which lives inside a view controller. That subclass is an observer for the FooBarNotification. If this notification is posted, that view will get it. But now, the view controller decide... | iphone | [8] |
1,904,140 | 1,904,141 | Extract attributes from NSManagedObject array | <pre><code>NSFetchRequest *req = [NSFetchRequest init];
NSEntityDescription *descr = [NSEntityDescription entityForName:@"City" inManagedObjectContext:context];
[req setEntity:descr];
NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"streetName" ascending:YES];
[req setSortDescriptors:[NSArray arrayWit... | iphone | [8] |
376,291 | 376,292 | Is mscorlib.dll/mscoree.dll loaded when .NET application runs | <p>I am trying to get something clarified.</p>
<ol>
<li><p>When a .NET console application is run, does mscorlib.dll/mscoree.dll get loaded in the process's virtual address space? </p></li>
<li><p>mscorlib.dll and mscoree.dll (CLR) are <strong>not</strong> managed dlls. Is that correct?</p></li>
</ol>
<p>Also, what i... | c# | [0] |
3,472,677 | 3,472,678 | How to check whether video gets finished playing or not? | <p>I have a problem that I want to check whether a video gets all finished playing or not. Means we want a state where video gets all finished playing means it reached to the end of the video.</p>
<p>Give me any suggestion related to this problem.</p>
<p>Thanks in advance.</p>
| android | [4] |
3,326,898 | 3,326,899 | App not supported in Android Market for x-large tablets | <p>I am creating an application only for tablets (7 and 10.1 inch). I put below the code in my android manifest file:</p>
<pre><code><uses-sdk android:minSdkVersion="8" />
<supports-screens android:xlargeScreens="true"
android:largeScreens="true"
android:small... | android | [4] |
5,082,100 | 5,082,101 | Only finding the next element | <p>ok i have this jquery </p>
<pre><code> $('.make_request').ajaxForm(function() {
// $('.band_notice').show();
$(this).parents('.accordionContent').find('.band_notice').show();
});
</code></pre>
<p>I am using this <a href="http://www.malsup.com/jquery/form/" rel="nofollow">plugin</a> </p>
<p>I need to ... | jquery | [5] |
241,332 | 241,333 | Is there any difference between cpython and python | <p>I want to know the difference between CPython and Python because I have heard Python is developed in C - then what is the use of CPython?</p>
| python | [7] |
112,724 | 112,725 | Object Reference not set to an instance or Index out of range error while adding values to lists | <p>Below is my class file which have different names than the one that is used in the project.</p>
<pre><code>public partial class College
{
public List<Students> Students;
}
public partial class Students
{
public List<Activity> Activity;
}
public partial class Activity{
public List<string> Name;
}
<... | asp.net | [9] |
93,789 | 93,790 | Inserting words between strings | <p>I am working on a PHP form that involves a multiselect checkbox. I want to load the options that were selected by the user into a string and echo it. I want to separate the options with commas and the word "and".</p>
<p>For example:<br>
If a user selects just Option 1, I want to echo "opt1".<br>
If a user selects O... | php | [2] |
5,551,517 | 5,551,518 | To assign javascript value to a php variable in the same page | <p>I have a page with php and javascript. In the php section i need to call a function with an argument $arg, Now $arg is the problem, $arg is actually value of a dropdown option in the same page . Here is what i am trying to accomplish.</p>
<pre><code> <?php include("aclass.php")?>
<script language="javascri... | php | [2] |
3,057,709 | 3,057,710 | android location update problem | <p>I have an activity that needs to display an alert to user when location is updated,
but i need first to get current location (update last known location) and then start a location update listener to display alert in this activity.
<br/>
Basically what i need is to display an alert if location changed from time activ... | android | [4] |
4,905,833 | 4,905,834 | jqModal skipping to top of page when triggered so not in view | <p>I'm using jqModal for a popup however I have a slight issue on the ipad. The popup works great, however once I close it and refresh my page (the page refreshes and skips to the point of the page I was last looking at) and click the popup again, it fixes itself to the top of the browser rather than displaying in the ... | jquery | [5] |
4,122,012 | 4,122,013 | Learning PHP - can someone explain this if statement? | <p>So I'm learning PHP, well I'm learning more complex standards of php as per phpfox.
An issue I'm having is with a few lines of code - I get what they 'do'. But I don't understand why they are structured that way. Could someone explain?</p>
<p>In the following line of code the if statements are cornered by {} and no... | php | [2] |
3,096,125 | 3,096,126 | directory and __autoload function | <pre><code>$name = 'Model_Two';
str_replace('_','/',$name);
</code></pre>
<p>I need replace in __autoload function Model_Two to Two/Model_Two.class.php but i dont want using in autoload implode and explode how it work ? My functions have name Model_Two, Controller_Two and this is good. But my directory tree in framewo... | php | [2] |
4,994,289 | 4,994,290 | Animation on showing up in android | <p>I am trying to perform animation on 4 png images.
I have <code>drawable</code> folder in <code>res</code> folder,containing the images to be animated and one <code>animation.xml</code></p>
<p>Now my problem is that:when I say <code>animation.start</code>
I cannot see anything on the emulator</p>
<p><strong>my code... | android | [4] |
3,536,214 | 3,536,215 | android: when does onCreate get called when navigating through activities and how to use a service with them? | <p>suppose that you have two activities A(which is the main activity) and B</p>
<p>when you initially start the application the onCreate of A is being called since that's the main activity</p>
<p>now from A you can go again to B</p>
<p>if you go to B then onCreate of B will be called</p>
<p>if you go back to A what... | android | [4] |
4,990,729 | 4,990,730 | C++ function return reference | <p>Here goes another n00b question:</p>
<p>Why is it that I cannot/shouldn't return the referece to a local variable to a function? Is it because the temporary variable is automatically destroyed after the function finishes executing?</p>
<pre><code>const string & wrap(string & s1, const string & s2){
... | c++ | [6] |
2,119,069 | 2,119,070 | Jquery: Give each Div an individual ID | <p>I have a set of divs with the same class. I need to give each one an individual ID. And then apply that ID to the href of a link. </p>
<p>Here is the HTMl:</p>
<pre><code><div class="person-promo">
<a href="***#ID-OF-SIBLING-DIV***" class="action">&gt; Read More</a>
<div class="hide"&g... | jquery | [5] |
3,637,690 | 3,637,691 | PHP - Break up word into array | <p>i've done plenty of googling and whatnot and can't find quite what i'm looking for...</p>
<p>I am working on tightening up the authentication for my website. I decided to take the user's credentials, and hash/salt the heck out of them. Then store these values in the DB and in user cookies. I modified a script I fou... | php | [2] |
4,530,216 | 4,530,217 | Why I can call Array.prototype.filter() on a object which is not an array? | <pre><code>filter Creates a new array with all elements that pass
the test implemented by the provided function.
</code></pre>
<hr>
<pre><code>>>> 'abc'.filter(function(e){return e!='b'})
TypeError: "abc".filter is not a function
>>> Array.prototype.filter.call('abc', function(e){retur... | javascript | [3] |
1,972,123 | 1,972,124 | Intranet web applications that use the local windows username and password to authenticate using PHP & LDAP | <p>We are trying to modify our intranet web applications, Every individual user to be use their own & only one username and password log-in authentication to log-in to all intranet web applications.</p>
<p>For that we try to use their local windows /linux system username and password .</p>
<p>Once user logged in ... | php | [2] |
4,396,743 | 4,396,744 | Displaying a sequence of images with a time delay | <p>I wanted to display 9 images one after the other. I have included the 9 images as an array:</p>
<pre><code>imageHolders = new ArrayList<ImageView>();
imageHolders.add((ImageView) view.findViewById(R.id.imgOne));
imageHolders.add((ImageView) view.findViewById(R.id.imgTwo));
imageHolders.add((ImageV... | android | [4] |
649,858 | 649,859 | PHP dump variable as PHP code | <p>I'm looking for a function to dump a multi-dimension array so that the output is valid php code.</p>
<p>Suppose I have the following array:</p>
<pre><code>$person = array();
$person['first'] = 'Joe';
$person['last'] = 'Smith';
$person['siblings'] = array('Jane' => 'sister', 'Dan' => 'brother', 'Paul' => '... | php | [2] |
3,873,270 | 3,873,271 | Is it possible to block a certain character or group of characters from entering into text box or any input field using JQUERY? | <p>I have a text input field like text box or text area.
I want to prevent the user from entering certain character or a group of characters.
That is for example if I dont want # * @ and numbers from 0-9 these characters.
So Whenever user press any of the above character key then that character should not appear in to... | jquery | [5] |
5,686,009 | 5,686,010 | How to get method argument names when invoke a method in Java | <p>For example:</p>
<p>I have a method defined like these:</p>
<pre><code>class MyController extends Controller {
public void index() {
String aa = "1111";
int bb = 122;
render("index.html", aa, bb);
}
}
</code></pre>
<p>Now, I want to get the argument names: aa and bb to build a HashMap... | java | [1] |
793,312 | 793,313 | How i am able to use string without #include<string>? | <p>It is given in the STL reference that string class is in string header,then without including the header how the following program is running without an error??</p>
<pre><code>#include<iostream>
using namespace std;
int main() {
string s;
cin>>s;
cout<<"string entered is : "<<s;
}
</... | c++ | [6] |
4,207,231 | 4,207,232 | Dynamic Iframe printing | <p>I want to dynamically set the content of an iframe to that of an html document I have. It is in the form of a string in memory in javascript.</p>
<p>Then i want to print that iframe.</p>
<p>Ideas?</p>
| javascript | [3] |
3,653,299 | 3,653,300 | how to execute javascript on server-side? | <p>is there a php library or something?</p>
| javascript | [3] |
3,969,875 | 3,969,876 | Send mail From Localhost using PHP | <p>how to send Mail from localhost using PHP?</p>
<p>sending mail from localhost to remote server</p>
<p>i am using wamp server,OS windows Xp.</p>
<p>can anyone tell me about this issue</p>
<p>thank u in advance</p>
| php | [2] |
3,211,707 | 3,211,708 | Relative path from a root operator ("~") address in code behind | <p>Server controls like Image.ImageUrl make this very easy, but trying to achieve the same thing in code behind to an IMG html control is not that straightforward. </p>
<p>For example using an Asp:Image server control and setting ImageUrl property to "~/Images/Test.jpg" works fine no matter what directory i place the ... | asp.net | [9] |
2,327,705 | 2,327,706 | Jquery issue in ie7 and ie8 | <p>I have a problem in jQuery in IE7 and IE8. In all other browsers the script is working fine.</p>
<p>When I copy to clipword I found this error:</p>
<blockquote>
<p><strong>Webpage error details</strong></p>
<p><strong>User Agent</strong>: <code>Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0;... | jquery | [5] |
5,345,723 | 5,345,724 | jquery bubbling issue | <p>i am doing a slide show. and the slide show contain a image. while the user over on the image, a span (which contain a link) should display. as well if the user move out from the image, the span need to hide. </p>
<p>This works fine. the issue is, while mouseenter the span shows. but i need to click on the link ins... | jquery | [5] |
1,753,240 | 1,753,241 | Kindly provide the source code to determine the last item in the ListView | <p>I am trying to implementing pagination in Android.
Currently I am displaying in ListView , a list of 10 items where the data for the list items exist in the database.</p>
<p>Each list item contains an thumbnail Image Url , a text data</p>
<p>I have the following requirement.
i> When the user scrolls to the 10 th... | android | [4] |
4,093,697 | 4,093,698 | Can I control my ID and Name tags in asp. Net 4.0? | <p>When I use asp.net controls, (like inputs), I specify an ID in the markup; however, when I deploy the solution it's been prefixed with some automatically generated ASP.net identifiers with my original ID appended on the end. </p>
<p>I don't want to use the server side tag workaround present in other SO questions to... | asp.net | [9] |
4,942,718 | 4,942,719 | Permission denial: Can't access the SurfaceFlinger | <p>I included the permission: </p>
<pre><code><uses-permission android:name="android.permission.ACCESS_SURFACE_FLINGER"/>
</code></pre>
<p>But still it gives the error. </p>
<p>Somebody help me, how to access the <code>SurfaceFlinger</code>.</p>
| android | [4] |
4,577,828 | 4,577,829 | error :: UnicodeDecodeError | <p>I am getting </p>
<pre><code>UnicodeDecodeError: 'ascii' codec can't decode byte 0xb0 in position 104: ordinal not in range(128)
</code></pre>
<p>I am using <code>intgereproparty</code>, <code>stringproparty</code>, <code>datetimeproparty</code></p>
| python | [7] |
3,346,406 | 3,346,407 | Loop through all elements with class 'blah' and find the highest id value | <p>I have a bunch of elements like:</p>
<pre><code><div id="car-123" class="blah">..</div>
</code></pre>
<p>I want to loop through all of them and get the highest ID i.e. 123</p>
<p>how to do this?</p>
<p>Is below correct and the best way?</p>
<pre><code>$(".blah").each(function() {
var id = $(this... | jquery | [5] |
5,938,090 | 5,938,091 | PHP code not creating new line in rtf template | <p>I reduced a php script to the exact code necessary to solve a perplexing problem (at least to me!). All the script below is supposed to do is replace '++name' in an rtf template with a hard coded variable that will print 'me' on one line, and 'you' on the next line. Besides trying "\r\n" to create the new line, I'... | php | [2] |
874,893 | 874,894 | How to close JFrame followed by another JFrame? | <p>I have a JFrame panel. It opens several times. However, I want the previous one to close, right before the new one opens. </p>
<p>So is there a way to add some code implying "Close this JFrame when there is a trigger to execute the same JFrame."</p>
<p>It is the same JFrame but the information (JTextFields) change... | java | [1] |
3,274,378 | 3,274,379 | Using resource values as layout attributes (config.xml) | <p>Looking in the android sdk folders, I've found a file called <code>values/config.xml</code>. This seems to be somewhere that you can define values for later use in layouts and animations.</p>
<p>Given the config.xml:</p>
<pre><code><resources>
<string name="config_somePadding">50dip</string>... | android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.