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 |
|---|---|---|---|---|---|
5,061,126 | 5,061,127 | javascript error "invalid XML attribute value <script language=JavaScript>\n" | <p>i have some <code>javascript</code> files included in my html file for months. It used to work just fine until couple of days ago, now my scripts don't run anymore and i get <code>javascript error "invalid XML attribute value <script language=JavaScript>\n"</code> with firebug.</p>
<p>Does anyone know what th... | javascript | [3] |
3,083,459 | 3,083,460 | On click get button Value | <p>I have a button like following</p>
<pre><code><input type='button' value='Generate' onclick='f1()' />
</code></pre>
<p>now the f1 function should show a alert box contain button value. in this case 'Generate'</p>
<p>How to do this?</p>
<p>I tried</p>
<pre><code>alert(this);
alert(this.val());
</code></pre... | javascript | [3] |
1,917,551 | 1,917,552 | Can the object you create with a constructor function ever itself be a function? | <p>I hope this question makes sense. Can I ever do something like the following:</p>
<pre><code>function constructor_function() {...code...};
var a = new constructor_function();
a();
</code></pre>
| javascript | [3] |
1,711,227 | 1,711,228 | Calling webservice from windows service | <p>I have a windows service project that references an asp.net webservice. When I run this service locally on my machine via VS it works fine and when I call the web method I get the results I want.</p>
<p>Today I deployed this to a test server and when I call the web method it fails because the it is trying to conne... | asp.net | [9] |
1,428,493 | 1,428,494 | show multiple select box value with jquery? | <p>hi
i am a php developer and using an multiple select box , i want when we select a multiple
option from the select box then value of every select box should be display in text box how
can i do this with the help of jquery please help if anybody have solution of this
thank's</p>
| jquery | [5] |
5,890,429 | 5,890,430 | What is the difference between clearAnimation() and stop() in android? | <p>Can anyone please tell me when i am finishing my activity, Whether i will use clearAnimation() or stop() for AnimationDrawable !</p>
| android | [4] |
3,363,404 | 3,363,405 | Sum function not working in Java. | <p>I'm new to Java programming. I have a project that is supposed to sum a series of inputs and also calculate the average of those numbers. Right now the Total is coming up as zero no matter what I put in for values. I'm stuck. Please help. Thank you.</p>
<pre><code> private class InputButtonListener implement... | java | [1] |
3,459,951 | 3,459,952 | How do you programmatically fill rectangle defined in xml | <p>I have a simple Android project with a rectangle defined in xml, but I can't find a way to pro grammatically fill it with a solid colour.</p>
<p>The main.xml file has the following</p>
<pre><code><ImageView
android:id="@+id/Smoke20"
android:layout_width="wrap_content"
android:layout_height="wrap_con... | android | [4] |
3,644,725 | 3,644,726 | Java noob question - how to store a string to a new text file | <p>Here is my scenario:</p>
<p>Selenium grabbed some text on the html page and convert it to a string (String store_txt = selenium.getText("text");) - the text is dynamically generated.</p>
<p>Now I want to store this string into a new text file locally every time I run this test, should I use FileWriter? Or is it as... | java | [1] |
3,745,040 | 3,745,041 | Opening a file for append | <p>I just had a passing thought and figured what better place to ask then right here. Out of curiosity, does anyone know if opening a file for append, like this:</p>
<pre><code>file_name = "abc"
file_handle = open(file_name,"a")
</code></pre>
<p>Is essentially the same as opening a file for writing and seeking to th... | python | [7] |
2,142,877 | 2,142,878 | UIView or UIImage in a UITableView, what's better for performance | <p>I have a UITableView where we want to just put a colored square. Depending on the data in the UITableViewCell, the UIView changes its background color. That's the way it currently is. To me, it seems better to just have a UIImageView and have a .png image for the different color squares, and load the correct one ... | iphone | [8] |
4,607,572 | 4,607,573 | How to upload and download a file | <p>I like to upload an file in my project. when I click the upload button the file should be stored in client system and the file name and path should be stored in the database. When I clicking the download button it should be downloaded based on the file name and path that I have stored in the database. After making t... | asp.net | [9] |
4,952,451 | 4,952,452 | Singly linked-list class with constructors | <p>What I want to do is have a singly linked-list class with a default constructor, copy constructor, copy assignment constructer, and destructor. I barely started it because I am confused if a <code>Node</code> with int data and next pointer should be a separate class or the way I did it.</p>
<pre><code>class list {
... | c++ | [6] |
5,927,948 | 5,927,949 | Alternative plugin to Javascript for Java to provide a way for user to specify a mask | <p>I'm looking for a scripting language that can be run on a Java VM that would work as a simple scripting language that a user can use for specifying how there filenames are constructed from music metadata. Please see earlier related post of mine <a href="http://stackoverflow.com/questions/6285045/putting-a-simple-exp... | java | [1] |
766,791 | 766,792 | isFinishing method | <p><code>isFinishing()</code> method allows to check if <code>finish()</code> method was called or if the <code>Activity</code> is killed by the system.</p>
<p>What's the purpose of distinguishing these two scenarios? </p>
<p>What's the difference between calling <code>finish()</code> and killing the <code>Activity</... | android | [4] |
355,154 | 355,155 | Writing to Subprocess's Standard Input | <p>I'm spawning a process in Java using the following code:</p>
<pre><code>Process newExec = null;
BufferedReader outStream = null;
BufferedReader inStream = null;
BufferedReader errStream = null;
StringBuffer outputBuffer = new StringBuffer();
String PATH_TO_EXEC = config.getExecPath();
try {
newExec = Runtime... | java | [1] |
4,584,510 | 4,584,511 | android screen resolution | <p>How to know the resolution of phone programatically in android .help me please</p>
| android | [4] |
191,917 | 191,918 | how to add events to default android calendar? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3721963/how-to-add-calendar-events-in-android">How to add calendar events in Android?</a> </p>
</blockquote>
<p><li>I have to add events to the default calendar control on android phones from my application.</li... | android | [4] |
1,989,939 | 1,989,940 | Google Goggles Intent | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2080731/google-goggles-api">Google goggles API</a> </p>
</blockquote>
<p>According to Google, Goggles now supports barcode scanning via intents.
So how would I launch this intent?
Apart from it being mentioned o... | android | [4] |
3,898,700 | 3,898,701 | ASP.NET Removing Items from a list array by checking for certain value | <p>So I am reading a text file which may or may not end with some lines ending 9999999999999999999999999</p>
<p>which are just extra lines to make up a batch...im reading in the file like this</p>
<pre><code>var lines =
File.ReadAllLines("C:\\Users\\Downloads\\EmployeeExpenseReimbACH_20111214.txt");
</code></pre>
... | asp.net | [9] |
5,010,233 | 5,010,234 | jQuery autocomplete-style search box to pull list of links from page | <p>I have a newsroom page, with a short list of articles. I'm not using a database or a CMS for this, so for the time being, I'd like to implement a quick search functionality to parse through the list of titles using a search box.</p>
<p>I'd like to be able to start typing into the input box, and perhaps use .find() ... | jquery | [5] |
2,845,170 | 2,845,171 | Download file through Intent.ACTION_VIEW ignoring SSL certificate errors | <p>I'm trying to download a PDF file.</p>
<p>This is the code I'm using:</p>
<pre><code>Uri uri = Uri.parse(urlReferingPDF);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
</code></pre>
<p>I have a problem with SSL error. (Or that is what I beleive)</p>
<p>A external browser is then ope... | android | [4] |
2,082,192 | 2,082,193 | Remove short words and characters from a string in PHP | <p>I have a string which could be like this:</p>
<pre><code>$searchterm = "The quick brown fox, jumps over the lazy dog! 48372. John's?"
</code></pre>
<p>Is there a way to remove all words that are 3 characters and under as well as characters that aren't alphanumeric (except for apostrophes)?</p>
<p>I want my result... | php | [2] |
4,323,879 | 4,323,880 | manipulating lists | <p>I have written a code to manipulate the contents of a time series data and output into a newly created matrix. This is to enable me construct the phase space for the time series data.</p>
<p>The list is one-dimensional of length=N called "noise".</p>
<p>I want to create a MxN matrix where <code>m = N -5*tdelay1</c... | c# | [0] |
3,687,320 | 3,687,321 | Remove/Disable javascript when using browser's back button | <p>I have a page that consists of two frames: one being a flash app, and one being an aspx page with a user control that contains a grid with several "add to cart" buttons. When the user clicks a button I would like to reload the whole window with a shopping cart page. </p>
<p>I found out how to do so <a href="http:... | javascript | [3] |
4,875,323 | 4,875,324 | StringIndexOutOfBoundsException in android | <p>I am getting the following error:</p>
<pre><code> java.lang.StringIndexOutOfBoundsException: length=13243; regionStart=32; regionLength=-39
at java.lang.String.startEndAndLength(String.java:593)
at java.lang.String.substring(String.java:1474)
at com.dict.XMLParser.getResultFromXML(XMLParser.java:63)
... | android | [4] |
5,858,166 | 5,858,167 | Disable black screen when lock button pressed | <p>I want to disable the black screen appearing when i press the lock button in android. You might have observed how they do it in android video players just place a lock icon on the top instead of bringing up the black screen. Please tell to which classes or methods to refer?</p>
| android | [4] |
4,161,509 | 4,161,510 | Pointer-to-data-member-of-data-member | <p>I had the following piece of code (simplified for this question):</p>
<pre><code>struct StyleInfo
{
int width;
int height;
};
typedef int (StyleInfo::*StyleInfoMember);
void AddStyleInfoMembers(std::vector<StyleInfoMember>& members)
{
members.push_back(&StyleInfo::width);
members.pus... | c++ | [6] |
789,287 | 789,288 | cross domain issue | <p>There is a iframe in my page. This page is in domain A, the stuff in that iframe is belong to domain B. Is there any way I could get the source code of that page in that iframe?
This is a cross domain problem, the domain A and B are totally different. Also the domain B is third part domain, we can not do any changes... | javascript | [3] |
3,154,887 | 3,154,888 | How does JVM deal with duplicate JARs of different versions | <p>When there were duplicate JARs with different versions, the behavior was very inconsistent. Does anyone know how the JVM deals with duplicates?</p>
| java | [1] |
2,302,821 | 2,302,822 | Strategy for a global network connection listener | <p>What would be the best strategy to have a network connection listener for my application that it is started when the application starts and closes when the activity exists. Could I use a service in which to register a PhoneStateListener like this:</p>
<pre><code>((TelephonyManager)app.getSystemService(Context.TELE... | android | [4] |
3,680,272 | 3,680,273 | What does the compiler do to perform a cast operation in C++? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/340413/how-do-c-c-compilers-handle-type-casting">How do C/C++ compilers handle type casting between types with different value ranges?</a> </p>
</blockquote>
<p>What does the compiler do to perform a cast operat... | c++ | [6] |
500,185 | 500,186 | framework for setting the sms body programmatically in iphone | <p>i want to set the sms body by my application so there is any way or a framework available to do this task.. and if any framework than how to implement that..
plz help. i searched a lot on google but all in vain...</p>
| iphone | [8] |
5,217,667 | 5,217,668 | Not able to get value of textarea in .val | <p>HTML:<br></p>
<pre><code><textarea cols="50" rows="5" id="txtHtmlContent">
</textarea>
</code></pre>
<p>jQuery:</p>
<pre><code>if ( $("#rdbHtmlContent").attr("checked") ) {
alert( $('#txtHtmlContent').val() );
}
</code></pre>
<p>But alert show empty. What is my mistake?</p>
| jquery | [5] |
3,021,113 | 3,021,114 | Unknown function | <p>I have a script called ranking.php. I call this script at the top of another script (headtohead.php) as follows:</p>
<pre><code>include("ranking.php");
</code></pre>
<p>Within the ranking script, there is a function called 'win'. In the headtohead.php script, I have a function with the following:</p>
<pre><code>g... | php | [2] |
67,494 | 67,495 | c++ count down script | <pre><code>#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int num, num2;
num = 33;
do
{
cout <<"\n" <<num-3;
}
while (num >=3);
system("PAUSE");
return EXIT_SUCCESS;
}
</code></pre>
<p>I have coded the above b... | c++ | [6] |
852,024 | 852,025 | Generating a Deck of Cards | <p>I'm trying to make a simple blackjack program. Sadly, I'm having problems right off the bat with generating a deck of cards.</p>
<pre><code>#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<char> deck;
char suit[] = {'h','d','c','s'};
char card[] = {'2','... | c++ | [6] |
3,139,878 | 3,139,879 | Custom XML error with Android Build Tools (0.4.2) -- No resource identifier found for attribute 'gapWidth' in package 'xxx.xxxx.' | <p>Updated to the latest Android Build tools (0.4.2) and ran into the following when attempting to assemble:</p>
<p>/AndroidApp/App/build/res/all/flavor/debug/layout/fragment.xml:84:
error: No resource identifier found for attribute 'gapWidth' in package 'com.viewpagerindicator'</p>
<p><code>RelativeLayout xmlns:andr... | android | [4] |
2,919,051 | 2,919,052 | Android How to restirct a zoom level on webview | <p>I wants to capture a webview as a bitmap. If captured a zoomed webview it getting out of memory exception. We need to restrict a zoom level according to the maximum bitmap size.</p>
| android | [4] |
582,313 | 582,314 | Double conversion would solve it but there is not such a thing in C++, right? | <p>I have something like this...</p>
<pre><code>void f(dclass b);
class dclass
{
dclass(string s);
};
f("s");
</code></pre>
<p>This does not seem to work. In principle, it could with double conversion: <code>char* -> string -> dclass</code></p>
<p>So there is no such a thing in C++. Or maybe some compile... | c++ | [6] |
3,505,430 | 3,505,431 | TAG id for each TAG in a TAGHOST | <p><strong>I have a tabhost with two tabs in it. I want to access each TAB separately to perform some logic on each tab. need some guide.</strong> </p>
| android | [4] |
642,361 | 642,362 | To avoid insertion on Refresh | <p>I have a button.In its click i hve written code for insertion.If i click on refresh in browser again insertion takes place and so the duplicate data enters to database.Is there any javascript to avoid insertion on refresh.Can anybody help?</p>
| javascript | [3] |
935,176 | 935,177 | How to get user gmail contacts and send Email from android phone | <p>How to get the Gmail contacts data includes like first Name,Last-name B Day Email address Phone Number and the User Photo.How to send Email to a gmail contact from the android Phone.Using the Face Book SDK we can able to get the user contacts details but the Gmail is not come up with a SDK how to get these details.<... | android | [4] |
5,336,007 | 5,336,008 | Use of Unassigned local variable | <p>I encountered an error. Despite declaring the variables (failturetext and userName) errors still appear. Can anyone please help me? </p>
<pre><code>- Use of Unassigned local variable "FailureText"
- Use of Unassigned local variable "UserName"
protected void Login1_LoginError(object sender, System.EventArgs e)
{
... | c# | [0] |
470,192 | 470,193 | New to Java and have the error "int cannot be dereferenced" | <p>I'm new to java and I've been working on this exercise for a while, but keep receiving the error: int cannot be dereferenced. I saw couple of similar questions but still cannot figure out my own case.
Here is the complete codes:</p>
<pre><code>package inclass;
class OneInt {
int n;
OneInt(int n) {
this.n... | java | [1] |
2,905,450 | 2,905,451 | Handling Android application pause on incoming call and resume after call end | <p>I want to pause my android application when the phone receives an incoming call. After the call ends, I want my applications to resume automatically.</p>
<p>How would this be implemented in an Android application?</p>
| android | [4] |
868,671 | 868,672 | Where do you add iphone frameworks from | <p>I want to add the MessageUI Framework to my project.</p>
<p>The first time I did it, I selected</p>
<pre><code> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1sdk/System/Library/Frameworks/MessageUI.framework
</code></pre>
<p>After I did that my project would no longer build - lots of syntax err... | iphone | [8] |
4,081,184 | 4,081,185 | Index being set to 3040 unexpectedly | <p>I am making a game in which there will be many enemies on the screen. Here is part of the code so far:</p>
<pre><code>private boolean update() {
pIndex += cSpd;
if (pIndex > path.length) return true;
cX = path[pIndex].x;
cY = path[pIndex].y;
return false;
}
</code></pre>
<p>The problem is th... | java | [1] |
3,842,345 | 3,842,346 | Why do I have to initialize pointers as variables? | <p>This piece of code below works fine.
// example on constructors and destructors</p>
<pre><code>#include <iostream>
using namespace std;
class CRectangle {
int *width, *height;
public:
CRectangle (int,int);
~CRectangle ();
int area () {return (*width * *height);}
};
CRectangle::CRectangle (... | c++ | [6] |
640,569 | 640,570 | Android handler skip/jump a second | <p>I am trying to implement a simple digital clock with second and two colons changing every second. I have thought about using DigitalClock but I want the colons to flash as well as the second and don't want to show am/pm. So I read the "Updating the UI from a Timer" and it suggests us to use Handler. So i use Handler... | android | [4] |
5,597,796 | 5,597,797 | Changing Beats per Minute of selected song | <p>I am working on an iPhone application where I want to change the Beats Per Minute (BPM) of the selected song. I am using AVAsset classes for that. </p>
<p>How it can be implemented? Any code help would be appreciated.</p>
| iphone | [8] |
27,205 | 27,206 | Python function that works the same as s.upper | <p>So I am trying to create a function that capitalizes all of the letters of a string the same way s.upper would do, but in the format of a function. And I want to try to utilize ord() and chr() but stating that if the character of a string is >90 replace it with the character that is 32 less than the original ore. I... | python | [7] |
5,988,754 | 5,988,755 | Java: Syntax problem | <p>I want to use the above code for one more argument, say<code>args[2]</code>. Where should I make changes? Will <code>nextline</code> remain the same or does it become <code>nextline[1]</code>?</p>
| java | [1] |
5,817,996 | 5,817,997 | How to assign values to JSON object | <p>I have the following code that does not work. I am trying to push the text "John" onto the end of the object. I am more familiar with PHP, and this works in PHP. </p>
<pre><code>var data = {};
var field_name = "first_name";
data[field_name]['answers'][] = "John";
alert(data['first_name']['answers'][0]);
</code>... | javascript | [3] |
951,951 | 951,952 | how to check if an ImageView is attcahed with image in android | <p>I am setting an image to ImageView in android code not in xml, but could not make out how to check whether that image has been set in or not in java.</p>
<p>Tried with <code>imageViewOne.getVisibility() == 0</code>
but it is not working</p>
<p>If image has been set to ImageView then I am attaching that image for ... | android | [4] |
5,520,534 | 5,520,535 | What is the best way to create a HashMap of String to Vector of Strings in C++? | <p>Criteria, don't want creating copies of objects all over the place.
Should be fast, memory efficient and should not create leaks.
Should be threadsafe.</p>
<p>Ideally I would want to store pointers to vectors in the HashMap, but I am worried about memory leaks that way.</p>
<p>Is this the best way?</p>
<pre><code... | c++ | [6] |
3,472,262 | 3,472,263 | read file with ip range and see if supplied IP matches any range in file | <p>I am trying to read a file with ip/mask ranges and if the supplied IP matches any range in the file it will return with TRUE or similar function. Here is the code I have below</p>
<pre><code>function myip2long($ip) {
if (is_numeric($ip)) {
return sprintf("%u", floatval($ip));
} else {
re... | php | [2] |
1,179,296 | 1,179,297 | increase and decrease date | <p>I want to increase and decrease date on image button click.e.g. < 10/11/09 >.
how can i do that???</p>
| asp.net | [9] |
5,752,260 | 5,752,261 | Programing exercise | <p>Hi I have been doing the Javabat exercises and I have found myself in a bit of a snag with this problem:</p>
<p>We'll say that a String is xy-balanced if for all the 'x' chars in the string, there exists a 'y' char somewhere later in the string. So "xxy" is balanced, but "xyx" is not. One 'y' can balance multiple '... | java | [1] |
439,031 | 439,032 | "Function expected" error when updating frames with javascript in IE9 | <p>We're using some javascript to update a child frame. This has been working fine in IE7 and IE8 but only works in IE9 when compatibility mode is switched on. I've added the code fragment below. I've tried various solutions including using window instead document but nothing seems to work. The error "Function expected... | javascript | [3] |
2,255,780 | 2,255,781 | Modification to the timezone of my function to add 9 hours on the output result | <p>I am trying to get correctly the difference of the current time and a blog's post. When I echo the post's time I get this <code>Sun, 05 Jun 2011 07:24:00 +0000</code> while the correct time should be <code>Sun, 05 Jun 2011 10:24:00 +0000</code> it's also shown on the XML feed.</p>
<p>With <code>time();</code> I get... | php | [2] |
4,333,159 | 4,333,160 | Syncing like GMail | <p>I have an application in which the user can edit/add records offline and they should be sent to the server as soon as the Internet connection is established. It seems to be the exact behavior of the GMail application:</p>
<p>You can write an email offline, click "Send", close the application/process, and when the I... | android | [4] |
3,453,189 | 3,453,190 | designing class hierarchy for typical characters in role playing game | <p>I'm trying to design a simple role playing game which has your typical character types like fighter, wizard, cleric, theif, etc. I need advice on a good way to setup the class hierarchy. </p>
<p>My initial attempt was to create a class of type "Character" and make the fighter, wizard, cleric, derived types from "Ch... | c# | [0] |
3,825,958 | 3,825,959 | Jquery problem collapsing div | <p>Please see this <a href="http://jsfiddle.net/yv8uw/1/" rel="nofollow">http://jsfiddle.net/yv8uw/1/</a></p>
<p>When you click "View all Comments" the box opens up all right.... but when you click again, it doesn't collapse back like it was supposed to... please help.</p>
| jquery | [5] |
4,542,623 | 4,542,624 | Calling a function within a variable declaration | <p>In my lifelong quest to write my entire code on a single line, and give all the psychopathic maintainers nightmares, I ask the following question:</p>
<p>Is there any way I can instantiate an object, assign it to a variable, and call a function on the instantiation on the same line?</p>
<p>Eg I have:</p>
<pre><co... | javascript | [3] |
4,173,310 | 4,173,311 | How do i fix an edittext and a send button at bottom of my List View? | <p>I have a list view in which i m getting my data from server. but at the bottom i need an edit text and a send button so that its like a chat app. where i can type my message and send it back to server and it adds to my list view at the same tym.</p>
<p>Plz give me some suggestions. Thanks in advance.</p>
| android | [4] |
3,625,798 | 3,625,799 | Change layout for Preference screen | <p>I have a Preference screen and also two <code>EditTextPreference</code>. </p>
<p>I want to change its background color and font and also to add an image in its background.</p>
<p>How can I do that?</p>
<p>Here it the code as shown below for the layout in XML:</p>
<pre><code><PreferenceScreen xmlns:android="ht... | android | [4] |
4,265,498 | 4,265,499 | Jquery Styling for Autocomplete | <p>This is driving me nuts!!! I'm using the JQuery Autocomplete UI 8.1 and everything works fine except for my styling on the autocomplete dropdown list hovering. I've narrowed it down to the following line in jquery-ui-1.8.11.custom.css. It seems that I can not add font-weight:bold to the line and get results. Can so... | jquery | [5] |
3,958,423 | 3,958,424 | Is there any good way of SELF-updating running web application? | <p>as stated - it needs to be a "self-update" similar like Wordpress... I haven't thought through because of my knowledge limits... (I haven't found any good answer from the web yet /asp.net c#)</p>
<p>anyone can give some help/ perhaps some code example would be better?</p>
<p>Thanks in advance!</p>
| asp.net | [9] |
1,389,055 | 1,389,056 | Android: Trying to create a dialog within a AsyncTask<String object | <p>I'm using a AsyncTask
<p>I use parent to create the intent no errors.</p>
<p>The line to creat a dialog gives a
parent cannot be resolved to a ye.
new parent.AlertDialog.Builder(this)</p>
<p>The error I get is that parent does not exist, but I use parent in the same methed to call the intent</p>
<p>code block
... | android | [4] |
6,014,876 | 6,014,877 | Program has error lines which are remarked by ???? .I could not understand where the problem is | <pre><code>public static void main (String args[]) {
Scanner myinput=new Scanner(System.in) ; //Arrary length comes from user!
System.out.println("Enter a number: ") ;
int sayi=myinput.nextInt() ;
int [] Array = new int [sayi] ;
for(int i=0; i<SayiDizisi.length ; i++){ //Fill the array!(Comes from user)
... | java | [1] |
1,502,351 | 1,502,352 | python .rstrip removes one additional character | <p>I try to remove seconds from date:</p>
<pre><code>>>> import datetime
>>> test1 = datetime.datetime(2011, 6, 10, 0, 0)
>>> test1
datetime.datetime(2011, 6, 10, 0, 0)
>>> str(test1)
'2011-06-10 00:00:00'
>>> str(test1).rstrip('00:00:00')
'2011-06-10 '
>>> str(tes... | python | [7] |
1,084,684 | 1,084,685 | Asp.net LoadViewState and ItemCommand Never Firing | <p>I converted one of my apps a little while ago from .NET 2 to .NET 4 and I've just noticed a problem on a couple of pages. For some reason the <code>LoadViewState</code> and Itemcommand (repeater) are never fired so the page is not working. This was working before and now it's not! I've tried all sorts but can nev... | asp.net | [9] |
5,327,496 | 5,327,497 | How do I play videos sequentially; one after the other? | <p>I am developing an Android application in which I am reading video links from web services and displaying them in a ListView. I want it so that when I click on any video link it starts playing and at end of that video the next video starts playing automatically (just like a playlist).</p>
| android | [4] |
4,151,117 | 4,151,118 | Modifying a class name through reference to the parent with jQuery | <p>I had some help and some suggestions on how to remove a class name. </p>
<p><a href="http://stackoverflow.com/questions/9257348/how-can-i-remove-a-class-from-an-element-with-jquery-based-on-some-characters-of/9257394#9257394">Previous answer</a></p>
<p>These worked in fiddle but my application is just a bit differ... | jquery | [5] |
1,095,596 | 1,095,597 | Share Intent not give me an option | <p>I am developing an app in which i would like to share my data through facebook,twitter,gmail,message or many more option which are provide by <code>share intent</code> do simply i have goto this code ..</p>
<pre><code> Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND_MULTIPLE );
sharingI... | android | [4] |
626,948 | 626,949 | NSurl connection delegates are not called | <p>This is my code for getting image from url but the delegate methods are not getting invoked.why?</p>
<pre><code>NSString *urlLink = [NSString stringWithString:appRecord.imageURLString];
self.urlString=urlLink;
NSURL *url=[NSURL URLWithString:urlLink];
NSMutableURLRequest *request=[[NSMutableURLRequest alloc] ini... | iphone | [8] |
2,052,200 | 2,052,201 | Why is there a difference in the way functions are created in javascript? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/336859/javascript-var-functionname-function-vs-function-functionname">Javascript: var functionName = function() {} vs function functionName() {}</a> </p>
</blockquote>
<p>I have code with functions defined in tw... | javascript | [3] |
904,769 | 904,770 | Managing user progression through a form with JQuery | <p>I have a very long horizontal form that is separated into multiple sub-forms, acting as <em>slides</em>. </p>
<p>Only one <em>slide</em> is visible at any given time, however they each have a button that allows going on to the next section, without actually submitting the form. I also would like the user to be abl... | jquery | [5] |
49,549 | 49,550 | AutoCompleteTextView and input type in Android | <p>When I give inputtype as "TextUri" for AutoCompleteTextView, the keyboard shows up and after entering the url when I click on Done, instead of going away it's still getting displayed in the screen..</p>
<p>To hide the keyboard,I need to press backbutton..</p>
<pre><code> <AutoCompleteTextView android:id="@+i... | android | [4] |
3,322,303 | 3,322,304 | Why is it said that the java language was developed on top of C, C++? | <p>Why is it said that the java language was developed on top of C, C++ ? </p>
<p>Is that because java virtual machine was developed in C, C++ ?
because of the use of native functions in some classes?</p>
| java | [1] |
1,752,116 | 1,752,117 | How to know where the input/element goes to after the blur event? | <p>I tried this, but it is undefined:</p>
<pre><code>alert($(ev.relatedTarget).attr('name'));
</code></pre>
<p>I have a combobox (textbox and a button), I don't want the code to continue processing if the input goes to its partner control(button). I want to detect from textbox blur that it is leaving the whole combob... | jquery | [5] |
1,674,899 | 1,674,900 | How to check if object has any properties in JavaScript? | <p>Assuming I declare </p>
<pre><code>var ad = {};
</code></pre>
<p>How can I check whether this object will contain any user-defined properties?</p>
| javascript | [3] |
4,923,746 | 4,923,747 | Rewriting problem while loggin in iPhone | <p>i am using following code to log into a file...</p>
<pre><code>NSData *dataToWrite = [[NSString stringWithString:@"log data"] dataUsingEncoding:NSUTF8StringEncoding];
NSString *docsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *path =... | iphone | [8] |
3,943,492 | 3,943,493 | How to target specific paragraphs within an HTML string in PHP | <p>A simple one for all your PHP guys out there.
I have a string which represents a portion of HTML. It looks something like this:</p>
<pre><code><p>blablabla.....</p>
<p>blablabla.....</p>
<p>blablabla.....</p>
<p>blablabla.....</p>
<h3>hello</h3>
<p>b... | php | [2] |
4,021,305 | 4,021,306 | In App Purchase Receipt verification within app | <p>I want to verify the transaction receipt within my app,</p>
<p>Here is my code,</p>
<pre><code>- (void)recordTransaction:(SKPaymentTransaction *)transaction {
NSData *receiptData = [NSData dataWithData:transaction.transactionReceipt];
NSString *encodedString = [Base64 encode:receiptData];
NSURL *ur... | iphone | [8] |
82,744 | 82,745 | Cannot Bind my Listview | <p>I want to bind my Listview but I can't. I dont know what I am doing wrong here. When I press ctrl+f5, the page is empty.</p>
<p>My Code is:</p>
<pre><code><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ListView ID="ListView1" runat="server" DataKeyNames=... | asp.net | [9] |
3,970,188 | 3,970,189 | Javascript. Compare UNIX timestamps | <p>I got two timestamps in unix format and I need to find a way to compare them and to find out which one is the newest (closest to present date).</p>
<p>The two timestamps are:</p>
<ul>
<li>1299925246</li>
<li>1300526796</li>
</ul>
<p>Is there a simple way of doing this in Javascript?</p>
| javascript | [3] |
2,726,350 | 2,726,351 | What is Change the source attachment in android | <p>I am trying to debug a android application. I got error-</p>
<p>"The JAR file C:\Android\android-sdk-windows\platforms\android-8\android.jar has no source attachment" </p>
<p>What is this error exactly?</p>
<p>Thanks.</p>
| android | [4] |
1,558,505 | 1,558,506 | Timer doesn't stop | <p>Basically when a user wins a game I want to animate (counting up) from the original score to the new score. </p>
<p>I'm trying to do this using a timer as shown below</p>
<pre><code> public final void updatePlayerScore(final int newScore){
final Timer t = new Timer();
TimerTask tt = new TimerTask()... | android | [4] |
4,834,447 | 4,834,448 | Android display gradient image | <p>I use the below code to test gradient image.</p>
<pre><code>myView=(ImageView)findViewById(R.id.imgView);
bitmap = BitmapFactory.decodeStream(getContentResolver().openInputStream(uri));
if(bitmap!=null){
myView.setImageBitmap(bitmap);
}
</code></pre>
<p>The gradient image can display normal when I compile it in ... | android | [4] |
1,152,752 | 1,152,753 | Is it possible to get the the createTextNode method to render html tags? | <p>The following code prints</p>
<p><strong>This should print</strong>(b)This should print(/b)<strong>This should print</strong></p>
<pre><code><script>
function produceMessage(){
var msg= '<b>This should print</b>';
return msg;
}
</script>
<span id="mySpan"></span>
<... | javascript | [3] |
4,836,941 | 4,836,942 | Get a single columns | <pre><code><?php
include('config.php');
$result=mysql_query('select * from userinfo');
$row = mysql_fetch_row($result);
$count=mysql_num_rows($result);
echo $row[1];
echo $count;
?>
</code></pre>
<p>This displays only the column 1 data. I want to get the whole first column in an array </p>
| php | [2] |
4,964,674 | 4,964,675 | Payment APIs in android | <p>Is there any google payment APIs for android like we are having "paypal" ?
And
I want to implement credit card payment process in my android application. There is a form in my application. User will enter his card information and on submission the service will verify and accept or reject the card. I have no idea if ... | android | [4] |
192,554 | 192,555 | working with pseudo-elements jquery | <p>I have an HTML table with some <code><tr></code> and <code><td></code>, and I need to set some attributes to certain <code><td></code> elements. So, the problem is:</p>
<p>If I write the selector <a href="http://jsfiddle.net/JTyju/3/" rel="nofollow"><strong>this way</strong></a>:</p>
<pre><code>$... | jquery | [5] |
2,562,750 | 2,562,751 | Using JQuery inside a boxy modal | <p>I'm working on a site which has a modal window (using boxy) with a form. Inside document ready I have the following to load up the modal window:</p>
<pre><code>$("#confirm").boxy({title: "Title", modal: true});
</code></pre>
<p>Where the link is:</p>
<pre><code><a id="confirm" href="/confirm/">Confirm order... | jquery | [5] |
3,540,885 | 3,540,886 | look inside application pool to see what is wrong | <p>Hello I have a problem with Silverlight software Who is working with WCF Service
it is a very big Solution with 12 projects
i now get the the Solution to My responsibility
The problem WCF service randomly stops responding.
When recycling Application Pool
it fix the problam WCF service start reply again
and ... | asp.net | [9] |
1,889,427 | 1,889,428 | why base64EncodeData does't work? | <pre><code>NSString *result = [encData base64EncodeData:encData];
</code></pre>
<p>why base64EncodeData does't work??
it had the message like:</p>
<blockquote>
<p>-[NSConcreteData base64EncodeData:]: unrecognized selector sent to instance 0x4e1f020</p>
</blockquote>
<p>Any suggestion??</p>
| iphone | [8] |
1,720,174 | 1,720,175 | How to change the graphic of the SDK Sample "Compass"? | <p>I m using this sample for android sdk <a href="http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/Compass.html" rel="nofollow">http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/Compass.html</a></p>
<p>In that sample,the compass ... | android | [4] |
5,177,432 | 5,177,433 | Why the size of a class is getting increased by 1 if I inherit more than 2 classes in C++ | <p>In the following code snippet, If I inherit the first 2 classes the size of derived class is 1, from omwards if inherit more number of classes to derived the size of derived class is getting incresed by those many number of classes. Why?</p>
<pre><code>// Remove the comment one by one at derived class (//Base1, //B... | c++ | [6] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.