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,010,913 | 3,010,914 | How to determine if an activity within the same process is the current activity from background thread? | <p>Is there a way for a background thread to determine if an activity
within the same process is the current activity?</p>
<p>Any pointer will be useful.</p>
| android | [4] |
3,895,588 | 3,895,589 | Android:When does the .APK file gets generated? | <p>When we click on run and the emulator is not online (or not open) will the .apk file get generated or not?or it only gets generated when the emulator is online?Just for knowledge!!</p>
| android | [4] |
4,395,053 | 4,395,054 | Is there a C# equivalent of VB6's Choose() function? | <p>Is there a C# equivalent of VB6's Choose() function?</p>
<pre><code>day = Choose(month,31,28,30)
</code></pre>
| c# | [0] |
5,667,938 | 5,667,939 | Built in Emulator WXGA800 7inch (4.1.1) Not selecting correct resources | <p>I am testing on the Android 4.1.1 emulator with the WXGA800 - 7inch version. This has a resolution of 800x1280 with density of 213dpi. I have the following folders</p>
<p>drawable
drawable-h1200dp
drawable-xhdpi
drawable-hdpi
drawable-mdpi
drawable-ldpi</p>
<p>I have the same directory structure for 'layout'</p>
... | android | [4] |
4,982,726 | 4,982,727 | Creating an array of other objects in javascript? | <p>Is something like this possible:</p>
<pre><code>function FooClass()
{
var barsArray=new Array();
var index=0;
function addBar()
{
barsArray[index]=new BarClass(index);
}
}
function BarClass()
{
var myIndex;
function BarClass(index)
{
myIndex=index;
}
}
</code></pre>
| javascript | [3] |
396,718 | 396,719 | define a struct inside a class in C++ | <p>Can someone give me a example about how to define a new type of struct in a class in C++.Thanks.</p>
| c++ | [6] |
3,772,875 | 3,772,876 | Using $this when not in object context--i am using the latest version of php and mysql | <p>This is user.php:
<pre><code> include("databse.php");//retrieving successfully first name and lastname from databse file into user.php
class user
{
public $first_name;
public $last_name;
public static function full_name()
{
if(isset($this->first_name) && ... | php | [2] |
586,928 | 586,929 | Creating and saving a text file for a Battleship Game in Python | <p>I have been working on the same battleship game for quite a while now and am getting to the end stages. Now i need to have the game save the top five scores in a text file using the function def saveScore. I then need it to read the file that i just created and print the scores onto the python code using try and exc... | python | [7] |
1,965,715 | 1,965,716 | Exception for java Swing application? | <p>For some reason this is locking up the java application. Did I handle the exception correctly?</p>
<pre><code>private void submitButtonActionPerformed(java.awt.event.ActionEvent evt) {
double amount, interest,rateCalc, a, b, c, payment;
int years, months;
... | java | [1] |
2,286,692 | 2,286,693 | C++ What is wrong with this Vector Splitting in While Loop | <p>This is my partial code:</p>
<pre><code>if(action=="auth")
{
myfile.open("account.txt");
while(!myfile.eof())
{
getline(myfile,sline);
vector<string> y = split(sline, ':');
logincheck = "";
logincheck = y[0] + ":" + y[3];
if (sline==actionvalue)
{
sendClient = ... | c++ | [6] |
1,446,801 | 1,446,802 | how to perform action for list view in android | <p>in my app i use list view. in the list view i have three image buttons(play,detail,buy). each image button has individual actions. how can i perform onclick action for each image button in list view.</p>
<p>my code:</p>
<pre><code>public class AndroidThumbnailList extends ListActivity{
..........
public c... | android | [4] |
3,844,357 | 3,844,358 | How to make the code more simple, if i need to click a eq(0) show b eq(0) hide others, a eq(1) show b eq(1) hide others..? | <p>How to make below code more simple and less?</p>
<p>Thanks.</p>
<pre><code><div class="btn"><div>0</div><div>1</div><div>2</div></div>
<div class="content"><div>0</div><div>1</div><div>2</div></div>
$('.btn div:eq(0)')... | jquery | [5] |
2,876,654 | 2,876,655 | Open the Phone (Call) with a button and a Text field/View (iPhone) and come back to the application back | <p>Hello, I have successfully developed an application in which clicking on UIButton the Mobile no in UITextField dialled.</p>
<p>But I am not able to come back in my application. Is it possible to come back on the page from which I have dialled the Mobile number.</p>
<pre><code>-(void)newuser:(id)sender;
{
NSStr... | iphone | [8] |
3,076,570 | 3,076,571 | Create multiple .apk | <p>I am working on one android project. I need to launch multiple .apk for various locations. I would require an ant or build script so that i can pass the latitude and longitude of particular location or .csv of all the location and it will generate multiple .apk's for one project. is it possible?</p>
<p>Thanks</p>
| android | [4] |
2,580,591 | 2,580,592 | Is there a standalone interpreter for windows? | <p>Is there a standalone interpreter for windows? I don't want to install the entire PHP installation at my work place computer. I don't want my boss know I'm learning php at work</p>
<p>The standalone php interpreter should fit on a removable usb drive.</p>
| php | [2] |
3,565,410 | 3,565,411 | Return multiple functions | <p>I am new to javascript, so I apologize if this is all totally wrong, but I'm trying to validate a form right now, and I have the simple functions for testing. I want the function validateForm() to return all three of the functions checkName(), checkEmail, and checkMessage(). The way I have the validateForm() functio... | javascript | [3] |
219,276 | 219,277 | Hover effect jquery not working | <p>I trying to do hover effect using following code. But its not working please help me </p>
<p>Script</p>
<pre><code>$('.sha').hover(
function () {
$(this).next().children('div').css('display','block');
},
function () {
$(this).next().children('div').css('display','none');
})
</code></pre>
<p>HTML<... | jquery | [5] |
3,128,314 | 3,128,315 | How to draw a png image in php? | <pre><code>$image = imagecreatetruecolor(538,616);
$black = imagecolorallocate($image,0,0,0);
imagefill($image,0,0,$black);
</code></pre>
<p>I have already draw a black image i want draw a file suppose 3.png on it ..
How to do that ?</p>
| php | [2] |
3,672,782 | 3,672,783 | Can I do this with PHP? | <p>Consider,</p>
<pre><code> <html>
<head>
<title>txt with js eff</title>
</head>
<body>
<script type = "text/javascript">
function transfer(which) {
document.getElementById("temp_name").value = which;
... | php | [2] |
2,433,027 | 2,433,028 | How can i access specific value in a HashMap? | <p>This simple game asks for the number of the players and their names and counts their score.How can i get the player with the highest score?</p>
<p><strong>main:</strong></p>
<pre><code> public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
HashMap<String,Integer> playe... | java | [1] |
5,690,679 | 5,690,680 | NSMutableArray Memory Leak Issue | <p>There are multiple memory leaks in this section of my code. Specifically with these arrays: PlaylistItem, PlaylistItemID and PlaylistItemLength. The problem is that I can't successfully release the arrays. When I attempt to use insert [xxxx release]; anywhere in this code, the app locks up. It's driving me absolutel... | iphone | [8] |
5,114,215 | 5,114,216 | Function is not defined though js file reference is in header | <p>I am working on a page on a website (see <a href="http://www.quick-conversions.com/currency" rel="nofollow">http://www.quick-conversions.com/currency</a>).</p>
<p>I am attaching a <code>onkeyup="doConversion('...')</code> on each input field. The corresponding function is defined in a javascript file available at: ... | javascript | [3] |
5,930,921 | 5,930,922 | Why are these ASP variables not displaying right? | <pre><code><%
Dim myNext
Dim myPrev
myNext = cat.QSPage+1
myPrev = cat.QSPage-1
%>
<% if cat.QSPage=1 then %>
<link rel='next' href="/example_<%=myNext%>.htm" />
<% else %>
<link rel='prev' href="/example_<%=myPrev%>.htm" />
<link rel='next' href="/example_<%... | asp.net | [9] |
954,503 | 954,504 | Hide elements for current visit only | <p>I need to display a banner that sticks to the bottom of the browser. So I used these codes:</p>
<pre><code>$(document).ready(function(){
$('#footie').css('display','block');
$('#footie').hide().slideDown('slow');
$('#footie_close').click(function(){
$('#footie_close').hide();
$('#footie').slideUp('slo... | jquery | [5] |
4,358,561 | 4,358,562 | Why or why not should I use 'UL' to specify unsigned long? | <pre><code>ulong foo = 0;
ulong bar = 0UL;//this seems redundant and unnecessary. but I see it a lot.
</code></pre>
<p>I also see this in referencing the first element of arrays a good amount</p>
<pre><code>blah = arr[0UL];//this seems silly since I don't expect the compiler to magically
//turn '0' in... | c++ | [6] |
920,240 | 920,241 | Parse error: syntax error, unexpected T_VARIABLE in C:\Program Files (x86)\EasyPHP-5.3.9\www\Inventory\addavaya.php on line 20 | <p>I'm new to PHP and get the message Parse error: syntax error, unexpected T_VARIABLE in .. on line 20. I would be ever so grateful if someone could help me with this error as it's really started to stress me out. Been on dreamweaver and it says error where it says $Username=... But I just can't seem to fix it <... | php | [2] |
4,943,183 | 4,943,184 | How to transmit and receive the data through wifi in android? | <p>I am new for android. In one of my application, i want to transmit and receive the data to my WiFi enabled micro controller device from the android device .How can i do it?kindly assist me .Thanks in advance.</p>
| android | [4] |
3,341,226 | 3,341,227 | echo json_encode() is returning NULL | <p>I am trying to pass data to a php page via ajax, the data gets inserted to the database, then I need to pick up the last insert and pass the back to update a select menu with that last insert selected. The database gets updated correctly, but Im getting a NULL return for the echo json_echo($data);</p>
<p>Been stuc... | php | [2] |
1,273,519 | 1,273,520 | Problem with parsing String convertion to int in java | <p><strong>Please help me for conversion my line of codes are mention below:</strong></p>
<pre><code>String deptName = "IT";
String dept_test = request.getParameter("deptName").trim();
System.out.println("Dept name vlue is"+dept_test);
// problem here for casting...
int dept_id = Integer.parseInt(dept_test);
</code></... | java | [1] |
5,862,238 | 5,862,239 | unable to fetch the id of dynamically generated button in jquery | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/9484295/jquery-click-not-working-for-dynamically-created-items">jQuery click not working for dynamically created items</a> </p>
</blockquote>
<pre><code> $(document).ready(function(){
$('#btn'... | jquery | [5] |
994,576 | 994,577 | Can i query a List? Java | <p>Say i have </p>
<pre><code>List<SomeObject> objList = new ArrayList<SomeObject>();
</code></pre>
<p>If someObject contains a field named id. Can we find it through some query like</p>
<p><code>objList.filter('id=2');</code> </p>
<p>wihout looping through the list? If not, then why? This can be so use... | java | [1] |
2,519,590 | 2,519,591 | setting pop up div at the center of the screen | <p>i am creating a pop-up div</p>
<p>its size is 521px, and height 400px</p>
<p>now i want to set it get displayed at the center of the screen or browser window irrespective of the size of the browser window..</p>
<p>heres my javascripe code...</p>
<pre><code><script type="text/javascript">
function show_upda... | javascript | [3] |
2,635,698 | 2,635,699 | ListView's onScroll event spamming | <p>I've attached an AbsListView.OnScrollListener to a ListView, and whenever there's only one item in the ListView (or at least - I can see the end of the list without scrolling), Android spams out with onScroll events even without the screen being touched.</p>
<p>Has anyone encountered this?</p>
| android | [4] |
970,373 | 970,374 | Java: Why doesn't my string comparison work? | <p>Ok, this is stupid, but wtf is going on?</p>
<p>I have a String variable in a servlet, which takes the value of a parameter and based on that value I make a test to do something, but the <code>if</code> is not working. What is the problem?</p>
<pre><code> String action = request.getParameter("action");
System.... | java | [1] |
3,441,056 | 3,441,057 | SyncTask in seperate class, reach my views | <p>I have Asynch in a seperate class, and I need to change setText on some of the TextViews</p>
<p>How this possible?
OR should I keep AsyncTask inside my Class? </p>
<pre><code>private class DownloadImageTask extends AsyncTask<Object, Void, AdModel> {
@Override
protected AdModel doInBackground(Object.... | android | [4] |
2,240,708 | 2,240,709 | How to write this if conditional in PHP? | <p>My variables, <code>$current</code> and <code>$row['start']</code> are in the format of <strong>2012-07-24 18:00:00</strong></p>
<p>How should I write the following ?</p>
<p><code>if ($row['start'] - $current < 2 hours) echo 'starts soon'</code></p>
<p>Additionally is there a way to combine it with the below ?... | php | [2] |
3,801,349 | 3,801,350 | What to do with AsyncTask in onPause()? | <p>I'm using an AsyncTask in my activity. Looks like:</p>
<pre><code>public class MyActivity {
private AsyncTask mTask;
private void doSomethingCool() {
mTask = new AsyncTask(...);
mTask.execute();
}
@Override
protected void onPause() {
super.onPause();
// How do... | android | [4] |
3,475,580 | 3,475,581 | Synchronization with databases | <p>Quick question about "best practices" in Java. Suppose you have a database object, with the primary data structure for the database as a map. Further, suppose you wanted to synchronize any getting/setting info for the map. Is it better to synchronize every method that accesses/modifies the map, or do you want to cre... | java | [1] |
3,249,655 | 3,249,656 | Stop Developer to user same Session name in multi-developer environment | <p>I am handling a team of 10-15 developer of ASP.NET (4.0), how could i stop them to use same Session name in their code?
or
in other words, how could a developer come to know that Session name is already exist so that he should use some other name.
In my case every developer is using Session["ID"], i want, if Sessio... | asp.net | [9] |
3,862,181 | 3,862,182 | I need an Arabic keyboard on iPhone without installing anything? | <p>There are already inbuilt fonts for Arabic</p>
<p>I need to use Arabic keyboard - without installing any software.</p>
<p>I don't want internal - keyboard.</p>
<p>That is => if I change my setting to iPhone =>keyboard arab & english on.</p>
<p>In textField I will have option to switch on both language.</p>
... | iphone | [8] |
3,144,551 | 3,144,552 | How to create object of class | <p>I think this explains my question well enough:</p>
<pre><code>public class Model {
public static Model [] findAllBySQL(String SQL){
//this is simplified. It should really query the DB and then fill model(s) with the DB values, and return the model(s). sql query can return more than one row
ret... | java | [1] |
529,086 | 529,087 | How to check in an object whether its has the key or not? | <pre><code>var object = [{key1:'value',key2:'value2'},{'key1:'value',key2:'value2}]
for (var key in object)
{
if(!object.hasOwnProperty(key)){continue;}
</code></pre>
<p>Why do we get error? Am i checking the right way. </p>
<p>I get an <code>error cannot call hasOwnProperty in an Object - TypeError</code... | javascript | [3] |
1,683,237 | 1,683,238 | Using CMD Module with a Socket | <p>I've been having a hard time getting the CMD module to use a socket for stdin. Here is what I have :</p>
<pre><code>class Server(cmd.Cmd):
use_rawinput = False
def __init__(self, port):
self.port = port
self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self.sock.bind(("... | python | [7] |
7,721 | 7,722 | check to see if first element is <h3>, if so addClass. if not, do nothing | <p>I would like to add an if statement to the below code that checks to see if the first element within the div (#content) is a H3 tag. </p>
<ul>
<li>If so, add the class (removeline) to the first H3 within the div. </li>
<li>If not, do nothing.</li>
</ul>
<p>How would I got about adding this if statement to the foll... | jquery | [5] |
1,381,386 | 1,381,387 | Java - calculating the sum of a series of numbers | <p>i am trying to calculate the sum of the first 16 elements of the series 1, 3, 9, 27, 81.... The code does so by first CREATING a suitable instance of Geometric that will be of TYPE Seq.</p>
<pre><code>public class Geometric implements Seq {
private double b;
public Seq s;
public double sum;
public Geometric(doubl... | java | [1] |
513,886 | 513,887 | remove an overlay in map | <p>I am showing current location using a red marker and some other set of location using a blue marker. After an operation, I have to remove some of the locations indicated using blue marker. Rest should be shown in the map itself. How will I do it?</p>
| android | [4] |
4,989,562 | 4,989,563 | Use jquery to display div based on radio button selected | <p>Here's the code for a simple page I have that is not working:</p>
<pre><code> <head>
<script src="js/jquery-1.7.min.js"></script>
<script type="text/javascript">
<!--
$("input[type=radio]").on('click', function(){
if ($('#radio1').is(':checked')){
$("#grid_9.omega").slideD... | jquery | [5] |
4,643,402 | 4,643,403 | this-> to reference everything | <p>I've recently spent a lot of time with javascript and am now coming back to C++. When I'm accessing a class member from a method I feed inclined to prefix it with <code>this-></code>. </p>
<pre><code>class Foo {
int _bar;
public:
/* ... */
void setBar(int bar) {
this->_bar = bar;
// as oppo... | c++ | [6] |
3,751,152 | 3,751,153 | FLAG_TOUCHABLE_WHEN_WAKING | <p>I'm trying to recieve touch notification after the screen goes to sleep in my app. However, I cannot receive the first touch event, only the consecutive ones.</p>
<pre><code>WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager... | android | [4] |
3,638,944 | 3,638,945 | How can I merge properties of two JavaScript objects dynamically? | <p>I need to be able to merge two (very simple) JavaScript objects at runtime. For example I'd like to:</p>
<pre><code>var obj1 = { food: 'pizza', car: 'ford' }
var obj2 = { animal: 'dog' }
obj1.merge(obj2);
//obj1 now has three properties: food, car, and animal
</code></pre>
<p>Does anyone have a script for this ... | javascript | [3] |
1,893,592 | 1,893,593 | Best way to update android Gallery View only when backend hosting server add's image | <p>I get the set of image Url's from back end service calls ,after parsing them, i download the images and display in a gallery view .I have written an Asynctask to get the response from the server in onCreate method ,my requirement is that whenever my server team add's an image in the service call, i need to update my... | android | [4] |
4,208,903 | 4,208,904 | C# Return private objects | <p>Are there any guidelines to return an object of a class? I have a class which has a List and a method which do something with the list and returns that list:</p>
<pre><code>public class Foo
{
private List<Bar> _myList = new List<Bar>();
public List<Bar> DoSomething()
{
// Add items to t... | c# | [0] |
3,297,379 | 3,297,380 | Marshaling incorrect integer value | <p>I'm trying to develop a program to parse any string as given fixed character length. </p>
<p>Instead of writing my own parser class, I decided use marshaling. As below I defined a structure:</p>
<pre><code>[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MyStruct
{
[MarshalAs(Unma... | c# | [0] |
5,971,765 | 5,971,766 | difference between define(...) and @define(...) | <p>Quick question, what is the difference between the following two declarations:</p>
<pre><code>define('I_LIKE_AT_SIGNS', false);
</code></pre>
<p>and </p>
<pre><code>@define('I_LIKE_AT_SIGNS', true);
</code></pre>
<p>I.e. what does the <code>@</code>-sign do?</p>
| php | [2] |
2,654,846 | 2,654,847 | Python: Map list of two-entry-dicts to dict with first entry as key and second as value | <p>I have something like this:</p>
<pre><code>[{'date': 1, 'value':5}, {'date':2,'value':3}, ...]
</code></pre>
<p>and want to map the values this two keys to this:</p>
<pre><code>{1:5, 2:3, ...}
</code></pre>
<p>How can I do this in a nice way?</p>
| python | [7] |
1,859,699 | 1,859,700 | Setting displays force close error in texter application | <p>How can I set the settings configurations for android application for a text er application. When I run the application, and click on menu in emulator, in the bottom of the screen I get settings tab. When I select that settings tab, I get force close error. What is the problem behind this error.</p>
<p>I have added... | android | [4] |
1,606,254 | 1,606,255 | Fastest way to convert file from latin1 to utf-8 in python | <p>I need fastest way to convert files from latin1 to utf-8 in python. The files are large ~ 2G. ( I am moving DB data ). So far I have</p>
<pre><code>import codecs
infile = codecs.open(tmpfile, 'r', encoding='latin1')
outfile = codecs.open(tmpfile1, 'w', encoding='utf-8')
for line in infile:
outfile.write(line)
... | python | [7] |
1,727,066 | 1,727,067 | can't import android.os.SystemProperties in Camera app | <p>In camera.java, I need to get property in system. However, I can't import android.os.SystemProperties, compile camera always complains:</p>
<pre><code>packages/apps/Camera/src/com/android/camera/Camera.java:53: cannot find symbol
symbol : class SystemProperties
location: package android.os
import android.os.System... | android | [4] |
5,107,720 | 5,107,721 | How do I change the $ function in jquery for another word for make it compatible with other framworks | <p>How do I change the $ function in jquery for another word for make it compatible with other framworks</p>
| jquery | [5] |
4,216,504 | 4,216,505 | Ambiguous FunctionOverloading in C++? | <p>I have a class A and it has two method foo which are actually overloaded. The class somewhat look like this </p>
<pre><code>class A
{
public:
bool foo(int& a);
bool foo(size_t& a);
};
bool A::foo(int& a)
{
return true;
}
bool A::foo(size_t& a)
{
int new_a = a;
return foo(new_a)... | c++ | [6] |
552,575 | 552,576 | Python _winreg library | <p>I am trying to play around with the _winreg library to access and modify windows registry keys.</p>
<p>The problem I am facing is that _winreg doesn't show all the subkeys.
For eg, I am trying to print all the subkeys of : <strong>HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft</strong> using:</p>
<pre><code>import _winreg
p... | python | [7] |
2,528,840 | 2,528,841 | OnClickListener on scrollView | <p>I have a scrollView with lot of elements </p>
<pre><code>ScrollView scroller = (ScrollView)findViewById(R.id.scrollView);
</code></pre>
<p>I need to attach an onClickListener to the scrollview so I do</p>
<pre><code>scroller.setOnClickListener(new OnClickListener() {
@Override
public void... | android | [4] |
5,617,070 | 5,617,071 | Please explain what this jquery code is doing | <p>Html looks like:</p>
<pre><code><div class="ticker">
<div class="news-heading">Latest News:</div>
<span class="active_ticker"><a href="#"> 1] Lorem ipsum dolor sit amet, consectetur adipiscing elit.</a></span>
<span><... | jquery | [5] |
4,060,371 | 4,060,372 | what is the difference between & and &&? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4014535/vs-and-vs">& vs && and | vs ||</a> </p>
</blockquote>
<p>what is the difference between <code>&</code> and <code>&&</code>?</p>
<p>I am getting same output for both <code>&</... | java | [1] |
3,167,383 | 3,167,384 | Convert string to file and send this image through email attachment | <p>I get an image from a PHP server as a string (<a href="http://www.buzzmob.com/api/upload/buzz/12022107323422653000_Art_Nature.jpg" rel="nofollow">this image</a>), and I want to send this image by e-mail as a attachment.</p>
<p>When I try to send e-mail, then the attachment is papers but only plain text is displayin... | android | [4] |
2,525,280 | 2,525,281 | Converting an ArrayList<HashMap> into a multidimensional List | <p>I have an ArrayList of HashMap elements that has a format of Category, Activity and Time. I.E.</p>
<pre><code>{CATEGORY=Planning, ACTIVITY=Bills, TIME=5}
{CATEGORY=Planning, ACTIVITY=Bills, TIME=7}
{CATEGORY=Planning, ACTIVITY=Meetings, TIME=10}
{CATEGORY=Resources, ACTIVITY=Room1, TIME=15}
....
</code></pre>
<p>... | java | [1] |
1,761,396 | 1,761,397 | Push notification is not working for iphone | <p>Push notification for iphone is not working on GoDaddy server for development provisioning profile. </p>
| iphone | [8] |
5,111,756 | 5,111,757 | jquery widget help | <p>given:
jquery 1.3.2
jquery ui 1.7.2</p>
<p>I found the following jquery snippet but am having problems with it.</p>
<pre><code> $(document).ready(function() {
$.widget("ui.hello", {
options: {
foo: "bar",
baz: "quux"
},
_init: function(... | jquery | [5] |
4,774,967 | 4,774,968 | JavasScript ping to top of page? | <p>Is there a way to push the browser back to the top of the page when a link is clicked? I am dynamically changing some content but the project needs the user to start at the top of the page when the new content is loaded.</p>
<p>I am already using the url hash tag to keep track of the history. Just looking for some ... | javascript | [3] |
1,091,324 | 1,091,325 | java issue creating float[] | <p>I am trying to create a <code>float[]</code> depending on the user selection. In the code below, the variable <code>widths</code> is not recognized outside the <code>if</code> block. How can I dynamically create a <code>float[]</code> or append a <code>float[]</code>? </p>
<pre><code>if(!dangerCheckBox.isSelected()... | java | [1] |
3,660,857 | 3,660,858 | Sorting a 2 dimensional array in PHP | <p>wonder if anyone can help;</p>
<p>I have an a two dimensional array which I need to group by any common "job number" element;
Here's an example - I'm just playing with the idea at the moment, The $i is just a counter that iterates through the array results;</p>
<pre><code>$galleryItems[$i][0] = 'example title';//t... | php | [2] |
2,400,845 | 2,400,846 | Debugging on Android device (samsung gt15503) using eclipse | <p>Hi i have a Android Samsung gt 15503. I'm trying to connect this device to eclipse. but in the ddms my device is not detected. Instead when i run my application the same emulator is launched. I can connect my handset to my computer and perform other operations like transfer of files etc.. but when i enable usb debug... | android | [4] |
2,710,072 | 2,710,073 | How can I update some jQuery from a text input elsewhere on the page? | <p>I am working on little project to learn jQuery, and I have a twitter plugin which you enter a username to see the tweets of that user. Elsewhere on the site I have a simple text input field which I'm hoping can take an entry and append it to where the username is in the existing code... Is this possible? Maybe using... | jquery | [5] |
1,996,987 | 1,996,988 | Non-CDN hosted jQuery caused some strange behaviour | <p>I was using JQuery in this download link, and included it in the head tag of a HTML web page:</p>
<pre><code><script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
</code></pre>
<p>In a php web page, I got these few lines of codes:</p>
<pre><code> $.ajax({
url: 'h... | jquery | [5] |
5,951,941 | 5,951,942 | Exception "java.lang.IllegalArgumentException: interface javax.persistence.Id is not visible from class loader" | <p>What is this error?
how can i fix this?
This is the error shown in apache log file after i deploy the war file and start the tomcat server..</p>
| java | [1] |
4,700,607 | 4,700,608 | jQuery: hidden elements are considered "visible", why? | <p>I've made a working example of what I want:</p>
<p><a href="http://jsfiddle.net/uRhuK/" rel="nofollow">http://jsfiddle.net/uRhuK/</a></p>
<p>Try to click on one line:</p>
<ul>
<li>Aujourd'hui (lundi 5 mars)</li>
<li>Demain (mardi 6 mars)</li>
<li>Après demain (mercredi 7 mars)</li>
<li>Vendredi 8 mars</li>
<li>Un... | jquery | [5] |
3,278,385 | 3,278,386 | How to get text from programmatic textbox when text changes? | <p>I am creating several text boxes depending on user choice (1-5).How can I access value of programmatic textbox when text changes.</p>
<pre><code>class starts{
int i=0;
.....
TextBox txtb4 = new TextBox();
txtb4.Name = "textname" + Convert.ToString(i);
ArrayText.Add(txtb4);
System.Drawing.P... | c# | [0] |
5,728,172 | 5,728,173 | Why the result of Integer.toBinaryString for short type argument includes 32 bits? | <p>I learned a short type variable is a 16-bit signed integer, but</p>
<pre><code> short n = -1;
System.out.println(Integer.toBinaryString(n));
</code></pre>
<p>outputs:</p>
<pre><code>11111111111111111111111111111111
</code></pre>
<p>The result includes 32 bits, why?</p>
| java | [1] |
5,915,704 | 5,915,705 | Flurry Error Reporting for Android | <p>Is there anyone using Flurry to generate reports for uncaught exceptions that could post some sample code on how to do this?</p>
<p>I don't see any example via Flurry themselves, and though I've seen code samples of custom exception reporters, I haven't seen a simple example of how to implement the basic error repo... | android | [4] |
5,647,973 | 5,647,974 | saving html tags and and reproducing properly | <p>i am using mysql db and php code.</p>
<p>i store value like this in db <code><u><strike><i><b>Opinion</b></i></strike></u></code></p>
<p>that is with some editor. so how do i display it so that, it takes all the tags given to it.??? </p>
| php | [2] |
623,939 | 623,940 | .animation is not a function | <p><strong>Here is my code <a href="http://jsfiddle.net/seejee/sYFR9/7/" rel="nofollow">http://jsfiddle.net/seejee/sYFR9/7/</a></strong>, </p>
<p>I'm using drupal and jquery says .animation is not a function....</p>
<pre><code>(function($){
var cg_parent = "#block-views-content_gallery-cg_block";
... | jquery | [5] |
4,695,967 | 4,695,968 | How i can lock Orientation of a device by code | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3611457/android-temporarily-disable-orientation-changes-in-an-activity">Android: Temporarily disable orientation changes in an Activity</a> </p>
</blockquote>
<p>Me testing in Samsung Galaxy tab. In that i have ... | android | [4] |
1,142,297 | 1,142,298 | how to post data to particular url? | <p>I want to <code>post some data</code> in the particular url say <code>http://localhost:8000/postme/</code>. But I have know form yet. So, I want to test it without any form. So, How can I post data to the url without any form? I want to see the response to the web browser.</p>
| python | [7] |
1,241,262 | 1,241,263 | access the dynamic buttons with tag | <p>Hello I have some codes to create dynamic button as below:</p>
<pre><code>- (void)viewDidLoad {
for (int i = 0; i < 9; i++)
for (int j = 0; j < 8; j++) {
forControlEvents:UIControlEventTouchDown];
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
... | iphone | [8] |
4,368,651 | 4,368,652 | prevent all elements within a div from being selected. \ | <p>i am trying to prevent all elements within a div from being selected. this is not working. </p>
<p><code>$('*').not('#someid > *')</code></p>
| jquery | [5] |
225,330 | 225,331 | java method local inner class | <p>i am trying to pass method local inner class object as an argument to some other function either in the scope of outside class or out of that class</p>
<pre><code>public class MethodClass {
public void p(){
class h{
public void h1(){
System.out.print("Java Inner class");
}
}
... | java | [1] |
4,662,871 | 4,662,872 | How to adjust trailing whitespace? | <p>I am writing to a file in java but the strings that are input into the file are different, how do i adjust the trailing whitespace depending on the length of the string.</p>
<p>for example</p>
<pre><code>First Name Last Name Address
---------- --------- -------
Michael Jordan 23 E. Ju... | java | [1] |
5,139,431 | 5,139,432 | Overloading str in Python | <p>I have code that looks like the following:</p>
<pre><code>class C(str):
def __init__(self, a, b):
print('init was called!')
super().__init__(b)
self.a = a
c = C(12, 'c')
</code></pre>
<p>When I try to run it, it gives me the following error:</p>
<pre><code>Traceback (most recent cal... | python | [7] |
3,130,975 | 3,130,976 | Installing Poster(Streaming HTTP uploads and multipart/form-data encoding) | <p>Ive been searching the net for instructions how to install Poster(Streaming HTTP uploads and multipart/form-data encoding) for various OSes (esp Ubuntu and Windows).The official website <a href="http://atlee.ca/software/poster/" rel="nofollow">http://atlee.ca/software/poster/</a> has awesome sample scripts and examp... | python | [7] |
5,684,291 | 5,684,292 | How to tell a View subclass to load its own layout | <p>I have a custom View subclass which I am calling <code>ListItem</code> which has a layout (<code>res/layout/list_item.xml</code>). I cannot get my <code>ListItem</code> class to load the layout xml file.</p>
<pre><code>public class ListItem extends View{
private TextView title, subtitle;
public ListItem(C... | android | [4] |
4,568,792 | 4,568,793 | simple question about define a path | <p>im very sorry to ask a very simple question, its seems im not understanding define path properly</p>
<p>as you can see</p>
<pre><code>i put this at D:\Project Storage\wnmp\www\folder\scriptfolder
example D:\Project Storage\wnmp\www\folder
define('SAMPLE1', realpath(dirname(__FILE__).'/..'));
example D:\Project St... | php | [2] |
2,960,313 | 2,960,314 | add headers to file_get_contents in php | <p>I am completely new PHP and want a client program to call an URL web service.I am using file_get_content to get the data.How do add additional headers to the request made using file_get_content.</p>
<p>I also was thinking of using cURL. I wanted to know how cURL can be used to do a GET request.</p>
| php | [2] |
4,650,873 | 4,650,874 | Prevent a multiline TextView from unnecessarily expanding to it's maximum width | <p>A TextView that expands to multiple lines seems to automatically expand to fit it's maximum possible width. How can I prevent that from happening?</p>
<p>Here is an example layout (test.xml)</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/ap... | android | [4] |
2,827,420 | 2,827,421 | "Benefits Of Using 'Partial' Class In C#"? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1057851/what-are-the-benefits-to-using-a-partial-class-as-opposed-to-an-abstract-one">What are the benefits to using a partial class as opposed to an abstract one?</a> </p>
</blockquote>
<p>what is the use of cr... | c# | [0] |
1,593,766 | 1,593,767 | Indeterminate spinner not the same size as id.menu_refresh? | <p>I'm trying to transition over to ActionBar. I need an indeterminate spinner as well as a refresh button. If I use Window.FEATURE_INDETERMINATE_PROGRESS with my activity, I will get an indeterminate spinner ok on ICS, but it's way bigger than the refresh asset. Is there any way to make it smaller? Below is a screensh... | android | [4] |
3,303,462 | 3,303,463 | How to detech FIN (Close) in TCP connection | <p>I'm just now learning how to use the Android/Java Socket class and I need to respond in a particular way to a Close (FIN, really) sent by the remote computer. </p>
<p>The Socket class does not seem to be event-driven (<a href="http://developer.android.com/reference/java/net/Socket.html" rel="nofollow">http://deve... | android | [4] |
4,227,010 | 4,227,011 | php - send and receive xml documents | <p>I am trying to get a xml document back from the webserver that also supports php.
It's something similar to what the traditional web services do but i want to achieve it in php. Is this even possible?</p>
<p>To be more specific about my needs -
I want to send a xml document as a request to the server, have PHP do ... | php | [2] |
1,957,753 | 1,957,754 | Hiding Rows Via Drop Down Lists | <p>I have this weird issue with hiding/showing rows of a table via jQuery and drop down lists. Instead of posting back data based on the filters I just want to hide the data not relevant to what's selected in the drop down lists. Here's the snippet:</p>
<pre><code>$().ready(function() {
$("#SupplierID").change(cha... | jquery | [5] |
4,857,587 | 4,857,588 | Javascript + dynamic folders | <p>So I have a Javascript function. It is passed a folder name, say "A".
This folder contains 5 images which will be picked randomly.</p>
<p>It works well on the page load, as 1 random image appears. But I want it so that
when the image is clicked, it is randomized again with an image from the same folder. I tried to ... | javascript | [3] |
2,480,245 | 2,480,246 | PHP : Post get method, need some advice | <p>I am new to php and need to understand how post get method could be useful for my code. My scenario is, I have 3 webpages, 1st webpage is an html form , I am using post method here then I take firstname and last name from form and enter in a sql query(for e.g. <code>$_POST[firstname]</code>) on 2nd webpage which gen... | php | [2] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.