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 |
|---|---|---|---|---|---|
896,178 | 896,179 | how to write a program in C++ which receives 10 numbers from input and checks whether these numbers are in ascending order or not? | <p>I am a newbie. And I want to do this program without using array and only with 3 variables. Looking forward for your help. I stuck up here:</p>
<pre><code>#include<iostream>
#include <math.h>
using namespace std;
int main()
{
float a,b,c;
cout << "Please Enter the numbers: " << end... | c++ | [6] |
252,193 | 252,194 | Dalvik Debug Monitor not showing my phone | <p>I have downloaded and installed the SDK. But my phone is not getting shown in the Dalvik Debug monitor.</p>
<p>Please help me, what is going wrong? I have killed the server. And restarted. But adb devices is not listing my device. I know while development in eclipse, I cant get my application running on my phone ra... | android | [4] |
4,488,546 | 4,488,547 | How to remove all the view along with rootView from UINavigationController in iPhone | <p>I have an UIView added in the main window with a controller. On clik of a button on this view I want to load a UINavigationController which will migrate to multiple views pushing them one by one on stack. Now what I want to do is when user reaches at the end of views, in the last view I have a done button. ON clik o... | iphone | [8] |
4,892,109 | 4,892,110 | How to get the PHP Version? | <p>Is there a way to check the version of PHP that executed a particular script from within that script? So for example, the following snippet</p>
<pre><code>$version = way_to_get_version();
print $version;
</code></pre>
<p>would print 5.3.0 on one machine, and 5.3.1 on another machine.</p>
| php | [2] |
5,797,068 | 5,797,069 | how to create a xml file and write in android and put into raw folder | <p>can anybody tell how to create a xml file and write in android and where to put the file for aceess again is it possible to put into raw folder ?</p>
| android | [4] |
3,527,334 | 3,527,335 | passing blocks around in javascript without lengthy function syntax | <p>In my testing code, I'm getting a lot of things that look like this:</p>
<pre><code>test.truth(function(){return myTest.isDef('')});
</code></pre>
<p>Where a majority of the line there is just the function boilerplate. Is there a way to reduce that, so that I can have a syntax more like:</p>
<pre><code>test.truth... | javascript | [3] |
1,888,976 | 1,888,977 | How to center align text in a tab bar in Android | <p>I want to put only text in tab bar, no image... I want to center text in a tab bar, horizontally and vertically. Exactly in the center.</p>
| android | [4] |
3,517,929 | 3,517,930 | IE8 Slide Toggle Issue | <p>Im having some trouble with jQuery's slideToggle function in IE8 for some reason the DIV its opening closes immediately after its opened </p>
<p>heres the code im using</p>
<pre><code>$("h3 a").click(function(){
id = $(this).attr("href");
$(id).slideToggle("slow");
});
</code></pre>
<p>and the HTML<... | jquery | [5] |
1,281,252 | 1,281,253 | How to use HelloGallery Widget | <p>I am running the <a href="http://developer.android.com/resources/tutorials/views/hello-gallery.html" rel="nofollow">HelloGallery example</a> for Android (using the XML layout file below), and I am now wondering how I would use it in my app. </p>
<p>It is referred to as a "layout widget". Is this different than an ... | android | [4] |
4,573,471 | 4,573,472 | Soap query database | <p>I write a opration on java soap service to query the database and then show the data I have searched on client jsp page. However, I can't show it, the variable "rs" cannot change, I don't know why? could someone help me to find the troboule?
This is the opration i create on soap service:</p>
<pre><code> @WebMethod... | java | [1] |
877,083 | 877,084 | problem in coding | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3794856/sorting-in-arrays">Sorting in arrays</a> </p>
</blockquote>
<pre><code>int A[5]={1,5,3,2,4};
for(int i=0;i<5;i++){
for(int j=0;j<5;j++){
if(A[j]>A[j+1])
{
int t=A[... | c++ | [6] |
3,420,043 | 3,420,044 | jquery search GET anchor | <p>I need help getting hash search <em>bookmarkable</em>
So far I've got if I search something, it shows up <a href="http://site.com/" rel="nofollow">http://site.com/</a><strong>#searchedThing</strong>
but when I refresh or copy and paste the link to address bar, it wont show up that thing.</p>
<p><strong>index:</stro... | jquery | [5] |
960,213 | 960,214 | programatically off the sound on tapping mute button on iphone | <p>Can anyone tell how to progmatically Disable the sound when mute button of iphone pressed while playing audio file.
i'm using streamer for audio</p>
<p>Thanks in advance....</p>
| iphone | [8] |
5,838,392 | 5,838,393 | How to add multiple textbox controls using a loop and change ID | <pre><code><%
for(int i = 0 ; i < 10 ; i++) {
%>
<asp:CheckBox ID="CheckBox<%=i %>" runat="server" />
<%
}
%>
</code></pre>
<p>But this code is not working
How can I add multiple controls using loops by this method?</p>
| asp.net | [9] |
3,159,393 | 3,159,394 | Can we multiply two bytes directly by using * operator directly | <p>I need to perform the following operation on a byte <code> (2*x*x)+x </code> where x is a single byte. Can i perform that operation directly as we will do for int. If no how can we perform above operation.</p>
| java | [1] |
5,243,802 | 5,243,803 | android, Samsung 10.1, drawable image resizes | <p>I'm developing an app for Samsung 10.1.
Pictures are stored in drawable-hdpi folder.</p>
<p>when I use ImageView to show the picture, the image is somehow resized.
for example, 1280x60 size image is shown as a 853x43 image.</p>
<p>Any idea why the image is resized and how to prevent resizing?</p>
| android | [4] |
203,296 | 203,297 | How to navigate from one screen to another screen automatically? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1979524/android-splashscreen">Android SplashScreen</a> </p>
</blockquote>
<p>I am new to android application development.</p>
<p>I developed one android application using android sdk. i install .apk file in sam... | android | [4] |
2,209,151 | 2,209,152 | Determining the presence of a file with JavaScript? | <p>I have folder/file tree generated by JavaScript where the folder and files each have checkbox inputs with paths associated with them, like:</p>
<pre><code>/var/www/site/user/folder7/ or
/var/www/site/user/folder7/file.txt or
/var/www/site/user/folder7/file.? (? being any file extension)
</code></pre>
<p>In the cas... | javascript | [3] |
4,424,520 | 4,424,521 | Rectifying JScript runtime error | <p>When i am running the application,i got an error as follows:</p>
<p>Microsoft JScript runtime error:Sys.ArgumentTypeException:Object of type 'Sys._Application' cannot be converted to type 'Sys._Application'.Parameter name:instance</p>
| asp.net | [9] |
1,806,285 | 1,806,286 | Android: What is android.R.id.content used for? | <p>Anybody could explain the meaning of "android.R.id.content" ?</p>
<p>How is it being used ?</p>
<p><a href="http://developer.android.com">http://developer.android.com</a> does not have any explanation.</p>
<p>public static final int content
Since: API Level 1</p>
<p>Constant Value: 16908290 (0x01020002)</p>
| android | [4] |
400,378 | 400,379 | 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] |
5,558,901 | 5,558,902 | How can I extract specified information from a webpage by php? | <p>Is there any algorithm to extract specified information from a webpage by php?For example,I want to extract weather information in a webpage.But the position of the weather information is always chaning.How to do this?</p>
| php | [2] |
4,831,107 | 4,831,108 | How to create dialer style filter box in android custom title bar? | <p>Hello Guys can you help me for creating a TextView in title bar so that if we type
'a' in that TextView than all entries in the ListView starting with 'a' only will get displayed.</p>
<p>The TextView will be something of type filterBox in Contact list.</p>
<p>Thanks in advance.</p>
| android | [4] |
2,348,916 | 2,348,917 | android:layout_gravity="center_horizontal" in Java code | <p>I have added a Button to a view in java code. Basically I want to add the xml</p>
<pre><code>android:layout_gravity="center_horizontal"
</code></pre>
<p>to the Button but do this in Java code, how is this done?</p>
| android | [4] |
3,100,818 | 3,100,819 | Java chat client connecting to server | <p>I have created a chat server that works with telnet. Now, I am trying to write my own client. I need to be able to get an IP address from the user and a port number. I am trying to pass those variables through the ChatClient(). However, when I compile the following code, I receive the following error message: </p>
... | java | [1] |
3,840,209 | 3,840,210 | Get list of dictionary elements ordered by dictionary key | <p>I have a dictionary <code>d</code> for which the keys are all strings. Now when I do:</p>
<pre><code>for key in d:
print(d[key])
</code></pre>
<p>I get the elements of <code>d</code> is some "random" order. How can I force the element of <code>d</code> to come out sorted by the lexicographical order?</p>
| python | [7] |
3,337,943 | 3,337,944 | Click a button and it should load the content into the main content area | <p>I have create 3 buttons on the left menu for "Cars," "Music," and "Games"
When the user clicks one, it should load the appropriate contents into a DIV
in the main content area. Each button should replace the contents of anything
previously displayed in the div. I created my buttons, but I do not know how to
load... | javascript | [3] |
3,992,514 | 3,992,515 | Sorting nested JSON array | <p>I'm attempting to sort this JSON object:</p>
<pre><code>JSONObject = {
"command": [{
"geobox": [...],
"jobName": "...",
"keywords": ["..."],
"users": ["..."]
}, {
"geobox": [...],
"jobName": "...",
"keywords": ["...", "..."],
"users": ["...", "... | javascript | [3] |
2,657,508 | 2,657,509 | using regular expressions to highlight links in a text | <p>hi i am trying to highlight links in a text using RegEx ,For this I tried with match() method and replace() method,
but i didn't get it.plz any one can help me.</p>
<p></p>
<pre><code><head runat="server">
<title></title>
<script type="text/javascript" >
functi... | javascript | [3] |
4,930,100 | 4,930,101 | Android custom codec or encrypt media file? | <p>I want to create an application which permits to the user to download media files and play them, but only with my application. So first of all I thought that encrypting files will be a good solution, but it takes to much. Now I'm thinking to create a custom codec for my media files. I didn't work until now with code... | android | [4] |
5,999,854 | 5,999,855 | Calling onLocationChanged() function on Android | <p>I am using <code>locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);</code> in Android. </p>
<p>If I set minimum time = 120000 and distance = 10000, if user moves 11000 meter in 60000 millisecond, then location changed function will execute or not?</p>
<p>I want to kno... | android | [4] |
437,165 | 437,166 | breadcrumb does not display title of the nav in Php | <p>I recently started learning php and I'm not being able to understand why my code does not get the parent value <strong>("Clients")</strong> when I click on the sublink UX/UI.</p>
<p>$sel_subject is the Titles on the Navbar and $sel_page is the subpage titles
When I click on the Title it shows up on the breadcrumb b... | php | [2] |
4,017,316 | 4,017,317 | jQuery UI sortable - allow dropping to parent | <p>How can I make it so a jQuery UI sortable that allows dragging between different lists, will also accept being dropped on a parent?</p>
<p>See <a href="http://jsbin.com/odupi5/4" rel="nofollow">this example on JSBin</a>, where there are 3 lists, one of them empty. When dragging any list item, and dropping it on the... | jquery | [5] |
3,029,965 | 3,029,966 | changing the color of titleFor Header in section | <p>-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
hi
i am very new in objective c.......................through this method we can get the title for header section .but how to change the color of that string??can we do that........if any one knows that please tell me.</p>
... | iphone | [8] |
2,834,836 | 2,834,837 | How do I check if a process is running from c++ code? | <p>I'm writing a C++ app that will communicate with another process via boost::interprocess, however I need to check if the other process is actually running first - as the other process is responsible for creating the inter-process shared memory. How do I check if the other process is running ?</p>
<p>folks, I'm spec... | c++ | [6] |
5,471,396 | 5,471,397 | Input String was not in correct format in asp.net | <p>We've been facing an issue while saving our page. It throws "Input String was not in correct format". After trying so many time, we found there was no problem with the code, but with the "Cache (Temporary Internet File"). After Cache was cleared, it saved without any error. Does anyone knew the reason behind it?</p>... | asp.net | [9] |
379,565 | 379,566 | Maximum size of Stream/Bitmap in WallpaperManager | <p>I'm trying to set a resource/stream as Wallpaper in Android. I use the WallpaperManager class and its methods setResource/setStream to do this. I normally scale the images using BitmapFactory.Options before I set them as wallpaper. But this time I wanted to try the full image without any scaling. So I tried to set a... | android | [4] |
3,714,458 | 3,714,459 | what compiler does internally for initializing a variable and assigning a variable while constructing object? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/926752/why-should-i-prefer-to-use-member-initialization-list">Why should I prefer to use member initialization list?</a> </p>
</blockquote>
<p>Class A has a member variable i. i can be initialized or assigned ... | c++ | [6] |
5,749,398 | 5,749,399 | javascript removechild | <p>I am trying to delete a hidden element. I have tried the following codes but it always returns the parent as undefined.</p>
<p>attempt one</p>
<pre><code>var timeLeft = document.getElementById("time");
timeLeft.document.removeChild(timeLeft);
</code></pre>
<p>attempt two</p>
<pre><code>var timeLeftBody, timeLeft... | javascript | [3] |
3,504,313 | 3,504,314 | Why python does not allow hyphens | <p>I have always wondered why can't we use hyphens in between function names and variable names in python</p>
<p>Having tried functional programming languages like Lisp and Clojure, where hyphens are allowed. Why python doesn't do that.</p>
<pre><code># This won't work -- SyntaxError
def is-even(num):
return num ... | python | [7] |
529,369 | 529,370 | jQuery popup div fades out after fading in | <p>I have a DIV element right at the beginning of my HTML code</p>
<pre><code><div id="popup"></div>
</code></pre>
<p>Its CSS <code>display</code> property is set to <code>none</code> initially. Now when I click on specific HTML elements, the following happens:</p>
<pre><code>$('#popup-opener-button').cl... | jquery | [5] |
2,450,292 | 2,450,293 | function returning released objects | <p>I have made a custom singleton class with an nsmutabledictionary as a property.I set and retrieve values in this class through two methods </p>
<pre><code>-(void)setObject:(id)object forKey:(NSString*)key
{
if(!object||object==nil)
{
return;
}
[self.dict setObject:[object retain] forKey:key... | iphone | [8] |
4,960,253 | 4,960,254 | android Messagebox | <p>android Messagebox doesn't show because of <strong>finish</strong> call, how to make this function wait for ok and then close</p>
<pre><code>public void msbox(String str,String str2)
{
AlertDialog.Builder dlgAlert = new AlertDialog.Builder(this);
dlgAlert.setMessage(str2);
dlgAler... | android | [4] |
2,102,136 | 2,102,137 | Is there any way to get cookie response quickly? | <p>I have written a simple code in page <strong>test_cookie.php</strong> to work with cookies.</p>
<pre><code>if(isset($_GET['data'])) {
setcookie('test_cookie', $_GET['data'], time()+60*60*24*30);
}
echo 'Cookie name is: ' . $_COOKIE['test_cookie'];
</code></pre>
<p>Now once cookie is set to something, and I s... | php | [2] |
4,076,075 | 4,076,076 | Issue With Request.Form.Get | <p>I have a dropdown list which is autopostback enabled.it contains several values.On selected_Index change event of dropdown i'm loading a gridview and it works fine.I have a Button called clearall which is supposed to change the dropdown list index to 0 and reset the gridview but when i click on the Button it will ch... | asp.net | [9] |
5,328,395 | 5,328,396 | How to handle objects with length of one and greater than one in a method without redunancy | <p>I'm writing my own JavaScript bind method (for practice) and am having trouble letting go of the need to handle single objects vs multiple objects differently in this method, solely because I need to loop through objects with a length greater than one. (see obj vs obj[i] below)</p>
<p><strong>Is there any way I can... | javascript | [3] |
409,275 | 409,276 | Android EditText | <p>in my custom listview that Contain an image and EditText ,and in EditText i can comment the photo ,i can give text comment max length of 50 ,when i lost the focus in EditText i want to rearrange the text in EditText in following format</p>
<p>EG: suppose comment contain 40 char and user can at a time directly view ... | android | [4] |
4,380,350 | 4,380,351 | Notifiy the user in a Thread | <p>Hy!!</p>
<p>Code:</p>
<pre><code>final ProgressDialog pd = ProgressDialog.show(Main.this,"","Loading. Please wait...", true);
pd.show();
Thread t = new Thread() {
public void run(){
result = GetData("link", nameValuePairs);
pd.dismiss();
if(result.contains("Logge... | android | [4] |
5,683,417 | 5,683,418 | How to Download an image from FTP using FTPClient? | <p>I m using this code and try to download an png pic from server .this is code</p>
<pre><code>import java.awt.image.BufferedImage;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import javax.imageio.ImageIO;
import org.apache.commons.net.ftp.FTPCl... | java | [1] |
2,386,822 | 2,386,823 | php update password or save defualt if it is blank | <p>Can someone point me out how can I save the default password if it is blank?
Its an update issue. Im making an update page when the user update their profile.
Its a long profile info. I did not post it all here coz my only problem is the password field.
Even if it is leave as blank it still updating the field on the... | php | [2] |
923,484 | 923,485 | What are some of the more obscure parts of C++? | <p>I've read quite a few beginner's books on C++, and a little beyond that, but what are some of the more obscure aspects of C++, or where can I find information/tutorials on these?</p>
| c++ | [6] |
1,601,588 | 1,601,589 | In UIActionSheet UITextView disable copy, select, select all, define functionality | <p>In <strong>UIActionSheet</strong> used <strong>UITextView</strong> in that <strong>Copy, Cut, Select, Select All</strong> functionality shows. I don't require this functionality. Please tell me how to disable this functionality in <strong>UIActionsheet UITextView</strong>.</p>
<p>I used </p>
<pre><code>self.textVi... | iphone | [8] |
1,319,197 | 1,319,198 | get word document | <p>I have a directory which have a few word documents (.doc) files. I want to get each one from that directory and put them into a list so I can open them. How do I loop through to get them and once I get them how do I open them. </p>
| c# | [0] |
4,015,349 | 4,015,350 | Getting caller identification in Android | <p>I am making an application which can call the name of the person who is calling.</p>
<p>I work with a TTS library, but I am not able to get the caller identification. Where can I get it?</p>
| android | [4] |
739,802 | 739,803 | Is it possible to to declare variables within a condition? | <p>This is how I would do a while loop:</p>
<pre><code>boolean more = true;
while (more)
{
// do something
if (someTest())
{
more = false;
}
}
</code></pre>
<p>That's pretty standard. I'm curious to know if there's a way of doing something similar to the code below in Java: (I think I've seen something l... | java | [1] |
3,006,748 | 3,006,749 | when motorola milestone will get android 2.2? | <p>when motorola milestone will get android 2.2?</p>
| android | [4] |
2,121,364 | 2,121,365 | Covariant return type in Java | <p>The following code uses the concept of method overriding in Java.</p>
<pre><code>package pkg;
import java.util.ArrayList;
import java.util.List;
abstract class SuperClass
{
abstract public List<String>getList();
}
final class SubClass extends SuperClass
{
private List<String>list=null;
@... | java | [1] |
1,963,906 | 1,963,907 | How to delete end of a string in python | <p>I have a string looks like this</p>
<pre><code>urse/project/kb/use.js
</code></pre>
<p>from this string i need to get</p>
<pre><code>urse/project/kb/
</code></pre>
<p><code>use.js</code> the name will always change except <code>.js</code>.</p>
<p>Or delete the string till the first <code>/</code> from the end?<... | python | [7] |
490,894 | 490,895 | button click check? | <p>I WANT to find out if a there is a way
to check if a group of buttons are being clicked
for exp. if i have nine buttons and i want to check
to see if any of the nine is clicked like </p>
<pre><code>if(button1.text ==""
button2.text ==""
... | c# | [0] |
3,063,276 | 3,063,277 | can we get the list of all open urls in browser from java script | <p>Is it possible to get urls of all the tabs open in the browser from java script...Is it any browser dependent thing ?</p>
| javascript | [3] |
3,032,613 | 3,032,614 | Sharing an object between activities | <p>I have a Weather app with four Activities. The main/launcher activity is 'invisible' using...</p>
<p>android:theme="@android:style/Theme.Translucent.NoTitleBar"`</p>
<p>...and is simply used to do a few checks (whether this is a new install, whether a network connection is available etc) before firing off one of t... | android | [4] |
490,936 | 490,937 | Loop through database rows and create a single array | <p>I have nooby PHP question that I can't figure out!</p>
<p>I loop through rows from my database:</p>
<pre><code> $data = array();
while($row = sqlsrv_fetch_array($queryResult, SQLSRV_FETCH_ASSOC)){
$data[] = $row;
}
</code></pre>
<p><code>$data</code> now contains an array within an array how ... | php | [2] |
1,410,932 | 1,410,933 | getting java.lang.ClassFormatError if i use SMTP code | <p>I am trying to send a mail by SMTP from my code in java.
The problem occuring is quite unique and i am not sure if any of you guys have faced the same kind of issue.
I have already a bunch of existing code which runs fine without any error when i run if from Maven without the code for the SMTP in it.
But the moment ... | java | [1] |
1,469,557 | 1,469,558 | Jquery, Extract child text | <p>Here is html code, </p>
<pre><code><li class="comment-content">
Target String!!!
<span class="comment-time">2011-07-13 17:08:39</span>
<a title="comment" class="bottoml cof-comment" href="#">comment</a>
<a title="modify" class="bottoml cof-comment" href="#">modify... | jquery | [5] |
445,107 | 445,108 | create and save a webite url's snapshot using PHP and any third party service | <p>I want to capture the website screenshot to be saved in my server and displayed in my application.</p>
<p>Presently we were using some API from <a href="http://counter3.goingup.com/thumboo/" rel="nofollow">http://counter3.goingup.com/thumboo/</a> using the code below :</p>
<pre><code>$result = @file_get_contents("... | php | [2] |
5,525,566 | 5,525,567 | Does somebody know some FAQ websites based on phpMyFAQ? | <p>Does somebody know some FAQ websites based on phpMyFAQ ? </p>
<p>Thanks
Joseph</p>
| php | [2] |
796,527 | 796,528 | UnknownHostException again! | <p>I posted one question previously and all of them answered that there is some problem with DNS but i changed my DNS to many addressed and now i have the most reliable, google DNS :-</p>
<pre><code>8.8.8.8
</code></pre>
<p>Still i get the same UnknownHostException. What can be the problem? This is my code :-</p>
<p... | java | [1] |
5,283,501 | 5,283,502 | Better way to bind event in jquery | <p>I have a page where I have many controls and then I have a div element and have 10 asp buttons in that div element.</p>
<p>I want to bind mousehover event to only those buttons which are inside the div element.</p>
<p>Currently i m doing it like:</p>
<pre><code><script src="jquery-1.6.2.js" type="text/javascri... | jquery | [5] |
5,460,733 | 5,460,734 | How to get a response to HTTPClient from a Servlet which is called from the HTTPClient? | <p>I am able to successfully post to a servlet using HttpClient. However i need a boolean parameter back to the HttpClient from the servlet and am not sure how to do the same. </p>
<p>Earleir i was using the common-httpclient-3.1.jar.However then i was made aware of the version upgrade of httpclient to 4.0 which assis... | java | [1] |
623,875 | 623,876 | Python String to List object | <p>I have this String (representing a JSON value):</p>
<pre><code>BABEL_JSON = "{
'BD': u'Bangladesh',
'WF': u'Wallis y Futuna',
'BF': u'Burkina Faso'
}"
</code></pre>
<p>and I need to transform into a List object like this:</p>
<pre><code>BABEL_LIST = [
("BD", u"Bangladesh"),
("WF", u"Wallis y... | python | [7] |
3,702,890 | 3,702,891 | Can anyone give me the source code to get Horizontal Slide with the next page also visible as a background of the current page | <p>Can anyone give me the source code to get Horizontal Slide with the next page also visible as a background of the current page and with 2 or more xmls, each xml should be given with a different page integrated in the MainActivity..i am getting the Horizontal Scroll with ViewPager but unable to display the 1st page w... | android | [4] |
2,854,738 | 2,854,739 | getting strange results from framerate code in java | <p>I'm trying to keep my game at 60fps, but I'm getting strange results from my code like "2-8000 fps" Why isn't this staying at 60?</p>
<pre><code>public void run(boolean fullscreen) {
this.fullscreen = fullscreen;
try {
long lastFrame = 0;
long frames = 0;
init();... | java | [1] |
5,630,201 | 5,630,202 | JavaScript and getElementById for multiple elements with the same ID | <p>How can I get a collection of elements by specifying their <code>id</code> attribute? I want to get the name of all the tags which has same <code>id</code> in the html.</p>
<p>I want to use ONLY <code>getElementById()</code> to get an array of elements. How can I do this?</p>
| javascript | [3] |
4,964,924 | 4,964,925 | files in folder in listview | <p>I want to make a listview of files in folder,but it doesn't work. What's wrong with this code?</p>
<pre><code>DialogResult wczytywanie_z_folderu = new DialogResult();
wczytywanie_z_folderu = folderBrowserDialog1.ShowDialog();
string[] pliki_w_folderze = Directory.GetFiles(folderBrowserDialog1.SelectedPath);
if (wcz... | c# | [0] |
2,120,275 | 2,120,276 | How can I pass "this" into setTimeout callback? | <p><a href="http://jsfiddle.net/mnbayazit/M2W6Z/" rel="nofollow">fiddle</a></p>
<p><strong>code:</strong></p>
<pre><code><button onclick="this.disabled=true; setTimeout(function(){this.disabled=false;},500);">click</button>
</code></pre>
<p><code>this</code> seems to refer to the window rather than the b... | javascript | [3] |
3,337,431 | 3,337,432 | how to close db connections in except clause | <p>originally, I didn't have a main() function. I just had a whole bunch of code in:</p>
<pre><code>if __name__ == '__main__':
</code></pre>
<p>I'm trying to refactor the code a bit so that it's a little cleaner and does come clean up in case the code raises an exception. So, now my code looks like this:</p>
<pre><c... | python | [7] |
1,692,712 | 1,692,713 | send information through a url from desktop based application | <p>i have to pass some information to a weburl and get a response in return from it.</p>
<p>This has to be done on a button click of a desktop based application made in c#.</p>
| c# | [0] |
3,103,094 | 3,103,095 | How to generate an alphanumeric incrementing id in PHP? | <p>I have system in PHP in which I have to insert a Number which has to like </p>
<pre><code>PO_ACC_00001,PO_ACC_00002,PO_ACC_00003.PO_ACC_00004 and so on
</code></pre>
<p>this will be inserted in Database for further reference also "PO and ACC" are dynamic prefix they could different as per requirement</p>
<p>Now ... | php | [2] |
5,348,240 | 5,348,241 | Specify context of imported method | <p>I have two files. In the first there is a dictionary ready for export:</p>
<pre><code>__all__ = ['container']
def show_name(self):
myFunction()
print self.name
container = {
'show_name': show_name
}
</code></pre>
<p>In the second file I import <code>myFunction</code> and I define the class <code>Person<... | python | [7] |
5,572,324 | 5,572,325 | How to understand the following c++ code? | <pre><code>inpfile>>ch;
if(ch<16) outfile<<"0×0"<<std::hex<<setprecision(2)<<(int)ch<<" ";
</code></pre>
<p>what does <code>std::hex<<setprecision(2)</code> mean?</p>
| c++ | [6] |
1,659,551 | 1,659,552 | creating an ajax application | <p>I have several pages of my web application done. They all use the same master page so they all all look very similar, except of course for the content. It's technically possible to put a larger update panel and have all the pages in one big update panel so that instead of jumping from page to page, the user always s... | asp.net | [9] |
5,974,866 | 5,974,867 | altering variable inside print/echo? | <p>cant you?</p>
<p>Instead of</p>
<pre><code>$next_page = $pageNumber + 1;
print '<a href="'.$url.'/page/'.$next_page.'">Next &raquo;</a>';
</code></pre>
<p>i would like to write it like this</p>
<pre><code>print '<a href="'.$url.'/page/'.$pageNumber+1.'">Next &raquo;</a>';
</code><... | php | [2] |
5,537,884 | 5,537,885 | sliding panels using jquery | <p>What is the best way to have a panel to slide down when a button is clicked? I need the panel to be movable. Are there any jquery plugins to achieve the same?</p>
<p>Thanks</p>
| jquery | [5] |
2,896,778 | 2,896,779 | View for scrollable, zoomable, clickable image? | <p>I need to show an image which is actually a map with coloured areas, also I need to be able to:
1. zoom in and out using two fingers
2. scroll the image as it is bigger than screen
3. clicks on the image, get clicked area pixel value(color), so that I know which area the user clicks </p>
<p>I searched many hours... | android | [4] |
5,694,785 | 5,694,786 | ButtonDown and ButtonUp events for Android screen buttons? | <p>Is there a way to get an onButtonDown or onButtonUp event for a soft button (i.e. not a physical hardware button, but a button on the screen)? I have a button on the screen that I want the user to hold down for X seconds. To do this I need to capture the buttonDown and buttonUp events separately.</p>
<p>Thanks,</... | android | [4] |
666,485 | 666,486 | Allow only numbers to be typed in a textbox | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/995183/how-to-allow-only-numeric-0-9-in-html-inputbox-using-jquery">How to allow only numeric (0-9) in HTML inputbox using jQuery?</a> </p>
</blockquote>
<p>How to allow only numbers to be written in this textb... | javascript | [3] |
3,886,779 | 3,886,780 | difference among "Density-compatibility" and "Size-compatibility" android | <p>Can someone explaing the difference among "Density-compatibility" and "Size-compatibility" please?</p>
<p>Thanks</p>
| android | [4] |
123,823 | 123,824 | How to close window in firefox using javascript? | <p>I am using top.window.close() to close the parent window but it is not working in Mozilla firefox.Please suggest alternatives.
The above code is working fine for IE6.</p>
| javascript | [3] |
2,955,328 | 2,955,329 | I have a problem with the following Java code | <pre><code>public class b {
public static void main(String[] args) {
byte b = 1;
long l = 127;
// b = b + l; // 1 if I try this then it does not compile
b += l; // 2 if I try this then it does compile
System.out.println(b);
}
}
</code></pre>
<... | java | [1] |
4,055,202 | 4,055,203 | PHP switch function doesn't recognize "less than 0" | <pre><code>$bytes = 0;
switch($bytes){
case $bytes == 0:
echo 'Equal to 0.';
break;
case $bytes < 0:
echo 'Less than 0.';
break;
}
</code></pre>
<p>This outputs "Less than 0."</p>
<p>Why?</p>
| php | [2] |
4,549,296 | 4,549,297 | Getting an object to work with array_walk_recursive in PHP | <p>I have an object that implements <code>IteratorAggregate</code> and <code>ArrayAccess</code>, which internally contains an array that will be generated when it is accessed.</p>
<p>I want to use <code>array_walk_recursive</code> on this object, but it does not seem to work. It seems that this is either impossible du... | php | [2] |
314,816 | 314,817 | Get value selected from drop down list in where clause using php code | <p>My code is like this:</p>
<pre><code>$zone = $_POST['zone'];
$state = $_POST['state'];
$sql = "Select zone_id from tbl_zone where zone_name = $zone";
$query = mysql_query($sql);
</code></pre>
<p>I am selecting zone name which is fetched from database and listed in drop down list.
Now i want to get id of zone name... | php | [2] |
2,903,278 | 2,903,279 | Python Path import problems | <p>I added a folder to my PYTHONPATH where I can put all of my Django Apps. I print sys.path, and everything looks good, the folder I want is there. However, when I go to import a module, it tells me that there's no module by that name. All the site-packages modules work fine. In all of my Django apps, there's an "<str... | python | [7] |
3,943,790 | 3,943,791 | How to determine if a home screen shortcut exists? | <p>Is there a way to determine whether a particular home screen shortcut
exists? </p>
<p>My application installs a shortcut on the home screen at device
startup time under certain conditions and I don't want duplicate
shortcuts to appear. I also don't want Toast messages appearing saying
"Shortcut created" or "Shortcu... | android | [4] |
1,077,882 | 1,077,883 | How to make un clickable App Icon on Action Bar like YouTube App in android | <p>How to make un-clickable App Icon on Action Bar like YouTube App in android </p>
| android | [4] |
2,204,629 | 2,204,630 | inserting multiple row at time in sqlite | <p>I just created a method to insert into the database. But it still showing the same result. i,e unit1 only. the code is as follows
DbAdapter.java</p>
<pre><code>private static final String DATABASE_NAME="bible1";
private static final String DATABASE_TABLE="test1";
private static final int DATABASE_VERSION=1;
pub... | android | [4] |
5,280,037 | 5,280,038 | how to make text field in tableview in iphone | <p>i want to know how to make text field in tableview in iphone.</p>
| iphone | [8] |
2,276,953 | 2,276,954 | jquery disable mouseover while waiting on callback | <p>I have a mouseover effect using jquerys animate. The effect makes a div grow in length by * 2 on mouseover and shrink back on mouseleave. This works fine apart from if you move the mouse in and out really quickly - the effect doesnt have time to catch up and so the div just keeps growing.</p>
<p>Is there anyway t... | jquery | [5] |
3,551,412 | 3,551,413 | why use an 'apply' function in this situation? | <p>in Chrome's console,</p>
<pre><code>> $$
bound: function ()
{
return document.querySelectorAll.apply(document, arguments)
}
</code></pre>
<p>why is this code like this?
what's difference with </p>
<pre><code> return document.querySelectorAll(arguments)
</code></pre>
<p>?</p>
| javascript | [3] |
5,126,400 | 5,126,401 | reading bytes from binary file to long int | <p>I have two question :</p>
<ul>
<li><p>I have a data on binary file. I want read first 8 bytes to signed long int by using read function but I could not . Do you know how can I do that ? </p></li>
<li><p>How can directly read a block of data to string ?
Can I read like as shown in
ex : </p>
<pre><code> ifstream i... | c++ | [6] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.