Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
2,305,359 | 2,305,360 | How to implement color selector of TextView when the OnClick listener is set on its parent Layout? | <p>The layout xml is as below. I have a RelativeLayout, which contains a TextView. The OnClick listener is set on RelativeLayout. The RelativeLayout has a selector background. What I want is, when user clicks on the RelativeLayout, the background of the RelativeLayout should change, and the color of the text of the Tex... | android | [4] |
4,892,357 | 4,892,358 | overloading std::ostream& operator<< in the derived class without static_cast<> | <p>Is this the only way of overloading the <code>ostream& operator<<</code> for a derived class without duplicating code for the base class? Are the casts not something to be avoided? </p>
<p>I don't see any other way, except to define some kind of function in the base class that will represent the data of t... | c++ | [6] |
2,512,715 | 2,512,716 | How to check for alphanumeric characters | <p>I'm writing a custom method for a jQuery plugin:</p>
<pre><code>jQuery.validator.addMethod("alphanumeric", function(value, element) {
return this.optional(element) || (/*contains "^[a-zA-Z0-9]*$"*/);
});
</code></pre>
<p>I know the regexp for what I want, but I'm not sure how to write something in JS that ... | jquery | [5] |
310,934 | 310,935 | question about drawing with out java2D | <p>I have another question, this is also extra credit and not homework. This time I need to create a border with out using java2d. The instructions are...
Write a method called drawRectangleBorder having six parameters which does not use the graphics package. It draws a rectangular border starting at the x and y coordi... | java | [1] |
254,128 | 254,129 | Javascript tutorial, please explain | <p>I'm a newbie learning Javascript. In the following tutorial, I don`t understand </p>
<ul>
<li><p>why value is initially set to null</p></li>
<li><p>if the value entered is 2, for example, how does the program know to display "You`re an embarassment" and not redisplay the initial question "What is the value of 2 + 2... | javascript | [3] |
4,361,183 | 4,361,184 | on draging the image how to calculate the angle ? I want to calculate the direction in angle when i drag the image in android? | <p>I am getting stucked in problem that i want to calculate the angle and direction that in which direction and angle i dragged or moved the image in android.</p>
<p>Please tell us how to approach in this scenario?</p>
| android | [4] |
5,186,452 | 5,186,453 | Listview item colour | <p>how to change colour of an the particular item in listview</p>
<p>any one help me
thanks in advance </p>
| android | [4] |
5,839,443 | 5,839,444 | requestSingleUpdate doesn't exist | <p>I looked in <a href="http://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates%28long,%20float,%20android.location.Criteria,%20android.app.PendingIntent%29" rel="nofollow">http://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates%28l... | android | [4] |
5,580,748 | 5,580,749 | Should we go the Corona way? | <p>We are a small company that develop applications that have an app as the user interface. The backend is a Java server. We have an Android and an Iphone version of our apps and we have been struggling a bit with keeping them in synch functionality-wise and to keep a similar look-and-feel without interfering with the ... | android | [4] |
5,103,436 | 5,103,437 | convert view to image in android | <p>hi everyone i m trying to send a chart via email in android application how can i attach that chart to email application. Thanks .....</p>
| android | [4] |
1,035,097 | 1,035,098 | How to get hex string from signed integer | <p>Say I have the classic 4-byte signed integer, and I want something like
<p> print hex(-1)
<p> to give me something like
<p>>> 0xffffffff
<p> In reality, the above gives me -0x1. I'm dawdling about in some lower level language, and python commandline is quick n easy.
<p> So.. is there a way to do it?</p>
| python | [7] |
5,268,257 | 5,268,258 | Why doesn't $(window).height(); return a value, but $(document).height(); does? | <p>I'm trying to use jQuery to get current window height. I intend to set a variable with this value, and update the value upon resize. For some reason, $(window).height(); always returns zero, but $(document).height(); returns a value. Why would this be? </p>
<p>(code snipped for brevity)</p>
<pre><code>$(document)... | jquery | [5] |
5,197,047 | 5,197,048 | iphone programmatically block caller ID? | <p>Since *67 doesn't work when embedding in phone links is there a way to programmically block caller ID from an application? </p>
| iphone | [8] |
2,989,305 | 2,989,306 | finding substring | <p><br />
Thanks in advance.I want to find all the substring that occurs between K and N,eventhough K and N occurs in between any number of times.
for example<br />
a='KANNKAAN'</p>
<p>OUTPUT;<br />
[KANNKAAN, KANN , KAN ,KAAN]</p>
| python | [7] |
4,805,886 | 4,805,887 | div section clone by jquery | <p>i am facing problem to create clone of my firstSection (div) and paste it on up to secondSection.</p>
<pre><code><script type="text/javascript">
$(document).ready(function(){
$("#firstSection").clone().prependTo("#secondSection");
});
</script>
<table width="100%" border="1">
<di... | jquery | [5] |
4,130,350 | 4,130,351 | How i am convert the page url https to http format in dot net | <p>can any body tell that how to convert the https:// to http:// in the page url </p>
<p>Regrds,
Sudhakar</p>
| asp.net | [9] |
4,768,548 | 4,768,549 | IP Addresses of Mac OSX, Linux | <p>How to calculate IP Addresses of Mac OSX and Linux using python.
I would like to get IPv4 and IPv6 addresses both.</p>
<p>Thanks.</p>
| python | [7] |
3,742,919 | 3,742,920 | PHP Code not working (Insert to DB) | <p>I have a db connection and want to test inserting a variable value into a db field. It's not inserting anything but cannot see why...can anyone spot the problem please?</p>
<p>Updated - here's all the php code:</p>
<pre><code> //DB Conn
<?php
$link = mysql_connect('localhost', 'root', '');
if (!$lin... | php | [2] |
5,160,946 | 5,160,947 | Android - How to call contact screen through our application | <p>How to push contact app through our application and return back to our application with new modify details.
It is possible or not?</p>
<p>Thanks.</p>
| android | [4] |
4,744,913 | 4,744,914 | Android Activity.getParent() always returning null | <p>I have this little function here:</p>
<pre><code>public Activity getRootActivity()
{
Activity a = this;
while (a.getParent() != null)
a = a.getParent();
return a;
}
</code></pre>
<p>But a.getParent() always returns null. It doesn't seem to matter how deep into my UI I go, it will always return... | android | [4] |
2,769,892 | 2,769,893 | Why does it say invalid expression? | <p>Why does this not work?</p>
<pre><code>private void btnEquals_Click(object sender, EventArgs e)
{
if (plusButtonClicked == true)
{
total2 = total1 + double.Parse(txtDisplay.Text);
}
else if (minusButtonClicked == true);
{
total2 = total1 - double.Parse(txtDisplay.Text);
}
... | c# | [0] |
2,927,462 | 2,927,463 | JAVA - find element in linked list | <p>I need to solve this problem:</p>
<p>Write a method <code>find()</code> that takes an instance of <code>Stack</code> and
a <code>String</code> <code>key</code> as arguments and returns <code>true</code> if some node in the list has <code>key</code> as
its <code>item</code> field, <code>false</code> otherwise. Test ... | java | [1] |
3,365,588 | 3,365,589 | how can we upgrade our android device htc hero? | <p>How can i upgrade my android device htc hero??</p>
| android | [4] |
2,970,614 | 2,970,615 | unable to execute statements in sequential order while calling one function from another function in javascript | <p>while designing my webpage, i have done with some javascript validations, in JS file, i'm trying to call one function from another function. The first is called when i click on button. In first function, i'm trying to set text for label and then i called the second function, but the second function is called first a... | javascript | [3] |
401,639 | 401,640 | Create List with object and strings | <p>I want to create list with object like
i.e. for every object there is entries of two strings that related to him.</p>
<p>i try to find in the net some kind of example and maybe I should to it with class
but I not sure how to connect the object to the strings.</p>
<pre><code><object,String,String>
Like
Obj... | java | [1] |
4,999,078 | 4,999,079 | How to Filter .txt file from the sdcard | <p>I want to list of the Text file in Listview and Select .txt file path get from the sdcard.</p>
| android | [4] |
3,122,021 | 3,122,022 | Why is my upload-of-a-file code putting 2 sets of files into my directory? (PHP) | <p>When I upload a file using this code, it puts a copy of the file in the "uploads" folder(which is what I want) but it also puts a copy in my root. I only want the files going to the uploads folder.</p>
<pre><code> define ('GW_UPLOADPATH', 'uploads/');
$upfile= GW_UPLOADPATH . $_FILES['userfile']['name'];
if(is_... | php | [2] |
537,884 | 537,885 | both parameters are default? | <pre><code> void method( double code = 0, CQueue* = NULL).
</code></pre>
<p>I have this method defined in ".h" file . In the .cpp file I assign the values of code in ont method( I want the queue to be a null here) and queue is assigned a null in another method ( code has to be a 0 here)
Having both the parameter... | c++ | [6] |
5,544,341 | 5,544,342 | Android - in app payments crashing during checkout | <p>I am adding in-app functionality to my app, and I am able to get the user to go to the checkout page of Google Play after they press buy. But when they click on "Accept & Buy" in the checkout screen, the system crashes, and says:</p>
<pre><code>Error
-----
Your order could not be processed. Please try again.
</... | android | [4] |
27,263 | 27,264 | How can I use jQuery to remove more than one string from HTML? | <p>I have this jQuery to remove the first option group:</p>
<pre><code>var topicSelectHtml = $('#TopicID')
.clone()
.find("optgroup:first")
.remove().end().html();
</code></pre>
<p>From the following HTML:</p>
<pre><code><select name="TopicID" id="TopicID">
<optgroup label="Admin">
&... | jquery | [5] |
908,591 | 908,592 | .insertBefore Jquery not working? | <p>I have put together a simple piece of Jquery that upon clicking an anchor tag (Advanced Search) toggles more content below it and moves the search button, everything works as expected except that when I toggle back to the elements original layout the search button does not move back.. bit stumped as to why</p>
<p>I... | jquery | [5] |
1,212,282 | 1,212,283 | Undo "Default Home Sceen" as my default home screen | <p>In my app I am trying to override the default home screen. For that purpose, I have created an activity of category "HOME". When the app launches, it is prompting the user to select the App(Showing my app and default Launcher) to complete the action. If I select "Launcher" ( Default Home screen), then there is no wa... | android | [4] |
5,460,023 | 5,460,024 | Do different android views have different sensitivities? | <p>I'm building an application now and I'm using the <code>Button</code> view and setting the background of the button to my images using selector xml files. But I find that the buttons aren't very sensitive to touch and take a bit of effort to press as they are somewhat small.</p>
<p>My question is do different andro... | android | [4] |
3,451,558 | 3,451,559 | HTTPConnection request socket.gaierror in python | <p>I encountered an error today while trying to retrieve an XML by sending a 'GET' HTTP request.</p>
<pre><code>from httplib import HTTPConnection
import urllib
params = urllib.urlencode({'sK': 'test', 'sXML': 1})
httpCon = HTTPConnection("http://www.podnapisi.net",80)
httpCon.request('GET', '/en/ppodnapisi/search',p... | python | [7] |
5,960,172 | 5,960,173 | Asp.Net Change a value from another page | <p>Hi
I have 2 webpage in my asp.net project.
I defined a int value in second page.
i want to change int value from first page. How can I make this? </p>
| asp.net | [9] |
1,998,209 | 1,998,210 | warning:[unchecked] unchecked conversion | <p>I am getting following warning :</p>
<pre><code>warning:[unchecked] unchecked conversion
[javac]found:java.util.List
[javac] required:java.util.List<edu.fullerton.cs476s09.espressobar.jpa.espressobar_milk>
return query.getResultList();
</code></pre>
<p>What may the problem and probable solution.
I am using f... | java | [1] |
5,245,161 | 5,245,162 | jquery display momentary dialog | <p>I have an asp.net page and when the user clicks the Save button the database is updated in code-behind. After I have saved the record I would like to display a message or dialog for a fixed number of seconds (e.g. 5) and then have it go away. Or if the user clicks it have it go away. And then just leave them on the ... | jquery | [5] |
1,986,024 | 1,986,025 | Change browser time | <p>Is there any way to change the browser's time without manipulating the system clock?</p>
| javascript | [3] |
5,255,938 | 5,255,939 | click-event doesn't fire if blur changes layout | <p>I have a form with blur-events bound to the required fields. Then there is a "Cancel" Button which simply calls an URL (button is an image with click-event).</p>
<p>When leaving one of the required fields a warning is written to the page saying that field xy is required. -> this causes a layout shift, meaning all t... | javascript | [3] |
4,397,806 | 4,397,807 | how to Upload Photo in twitter from android | <p>I have tried upload a photo in twitter but the status is send not photo. Can anyone suggest some help?</p>
| android | [4] |
5,812,391 | 5,812,392 | Interfaces and enums | <p>Among interfaces and enums which is better for declaring constants?Why is it so?</p>
| java | [1] |
2,348,662 | 2,348,663 | How to use SQL to search for a value? | <p>I'm trying to learn how to use database in Android and so far I have learned how to fetch all rows of data in the table, but I'm not sure how I'm going to use a SQL query to search for a value that is equal to the string value I pass to the method below?</p>
<p>I wonder if someone could add some simple code how to ... | android | [4] |
5,622,450 | 5,622,451 | jQuery show hide div, replace toggle but not sure how | <p>I've got some code that uses toggle to show and hide a div, but now I want to do stuff based on which state it's in. I'm not sure how to do this. I think I need to separate the toggle out into show and hide separately.</p>
<p>I've got this code, and below it, some pseudo code to suggest what I'm trying to do.</p>
... | jquery | [5] |
5,830,199 | 5,830,200 | How can I count the total amount of elements inside an each function? | <p>Inside my each function I am pulling text from a div, adding it as a class to a parent element, and then I need to count how many elements have that class. The problem comes in because it's inside my each function as it counts up incrementally instead of just giving me the total amount. </p>
<p>You can see in my fi... | jquery | [5] |
1,571,908 | 1,571,909 | Download Bitmap return nulls sometimes | <p>I have some code that retrieves an image from the web using this method</p>
<pre><code>public Bitmap downloadFile(String fileUrl){
URL myFileUrl =null;
try {
myFileUrl= new URL(fileUrl);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStac... | android | [4] |
820,748 | 820,749 | Determine the "offending" file and line number when error occurs | <p>This is a bit hard to explain but the code might be clearer:</p>
<pre><code>// class.php
class Foo
{
public function bar ()
{
}
}
// test.php
$foo = new Foo;
$foo->bar(); // e.g., for some reason this returns an error hence error handler will be triggered
</code></pre>
<p>This is a simplified exa... | php | [2] |
1,399,028 | 1,399,029 | Equals method benifit for hashtable implementation in java? | <p>For the benefit of hashtable we have two methods hashcode and equals.Internally when we add a key value pair in hastable first it goes inside hashcode method of key and checks if it is equal to hashcode value of any previous key. If it is not then it simply add key value pair in hashtable but if if it is equal the... | java | [1] |
1,996,855 | 1,996,856 | Comparing 2 strings in a linq to sql statement | <pre><code> var j = from c in User.USERs
where (c.USER_NAME.Equals(tempUserName))
select c;
</code></pre>
<p>this keeps on giving me an empty sequence</p>
<p>both are just strings im comparing user input with database</p>
| c# | [0] |
4,202,169 | 4,202,170 | Call disconnecting just after dialing while using call intent from service | <p>I'm trying to initiate a call from background service. Its working fine on sony xperia p android ics. But in <code>samsung galaxy y android 2.3.3</code> call gets disconnected automatically just after initiating. </p>
<pre><code>String number=Utils.getNumber(this, "contact"+i);
Intent intent = new Intent(Intent.A... | android | [4] |
2,017,291 | 2,017,292 | Output buffer based progress bar | <p>I have been trying to get the following code working.</p>
<p>It's a progress bar trick which uses ob_get_clean() function.</p>
<p>Don't know why but this script just don't work!</p>
<p>Only the initial percent - 1% comes up and nothing after that.</p>
<pre><code><?php
error_reporting(8191);
function flush... | php | [2] |
1,073,541 | 1,073,542 | How to pull string from bundle in onResume()? | <p>I have an activity that is resumed after a user picks a contact. Now before the user picks a contact onSavedInstanceState is called and i put a string in the Bundle. Now, After the user selects the contact and the results are returned. onRestoreInstanceState doesnt get called. only onResume() gets called. So how wou... | android | [4] |
5,972,567 | 5,972,568 | How to apply stored index to another div? | <p>I have a following problem here: in my html structure I got some div's and they are initially hidden. What I am trying to do is this: on click of a paragraph tag store it's index and apply that same index to hidden div (witch also has the same index as "clicked" p tag).
<br/><b>For example:</b> when I click SHOW RED... | jquery | [5] |
5,075,018 | 5,075,019 | Jquery if statement for different classed buttons | <p>I have 5 buttons all with different classes (fancy images for each), I want to be able turn the particular active class on when the button is clicked and off when another is clicked.
`
--HTML for buttons--</p>
<pre><code> <ul>
<li class="home">
<a href="#home" class="buttonhome">HOME</a>
... | jquery | [5] |
5,450,119 | 5,450,120 | Solving an exercise from Thinking C++ | <p>The exercise says:</p>
<blockquote>
<p>Create a Text class that contains a string object to hold the text of
a file. Give it two constructors: a default constructor and a
constructor that takes a string argument that is the name of the file
to open. When the second constructor is used, open the file and rea... | c++ | [6] |
4,594,868 | 4,594,869 | do not understand xml parsing code | <p>the following code is for xml parsing.</p>
<pre><code>try
{
HttpEntity entity = response.getEntity();
final InputStream in = entity.getContent();
final SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
final XmlHandler handler = new XmlHandler();
Reader reader = new InputStreamReader(in, "UTF-8");
I... | android | [4] |
4,557,809 | 4,557,810 | BufferedReader - read line by line | <p>I have created a buffered reader like this:</p>
<pre><code>this.inFile = new BufferedReader(new FileReader(fileName));
</code></pre>
<p>And then, I read from it like this</p>
<pre><code>while(System.currentTimeMillis() - lastRead < someTreshold) {
Thread.sleep(1)
}
lastRead += someTreshold;
String line = i... | java | [1] |
193,776 | 193,777 | pulling data from the database to a gridview with error code 413 | <p>When I bind a datatble which contains: 183785 records from the database, I got this problem:</p>
<blockquote>
<p>Sys.WebForms.PageRequestManagerServerErrorException: An unknown error
occured while processing the request on the server. The status code
returned from the server was: 413.</p>
</blockquote>
<p>By... | asp.net | [9] |
5,891,934 | 5,891,935 | Does google allows download of youtube video in our application | <p>Currently i am working on one android application in which we have feature of downloading youtube videos , so does google alllow download of youtube videos in our application </p>
<p>Thanks </p>
| android | [4] |
5,224,142 | 5,224,143 | How to compress javascript? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/194397/how-can-i-obfuscate-javascript">How can I obfuscate JavaScript?</a> </p>
</blockquote>
<p>Hi,</p>
<p>I want to compress a JavaScript code but not just to remove whitespaces also I want to change all vari... | javascript | [3] |
4,059,029 | 4,059,030 | Open Google Maps from iPhone and show route | <p>I was wondering how I can open Google Maps from my iphone app so that Google Maps shows the route when you arrive at the web page?</p>
<p>Today I use code that <strong>only</strong> shows the coordinate.</p>
<pre><code> NSString *latlong = [NSString stringWithString: @"59.33267,18.07361"];
NSURL *ur... | iphone | [8] |
2,326,646 | 2,326,647 | jquery referencing blank value in textarea | <p>I am trying to do a form validate which is checking for unfilled entries. In my form, I have inputs, textareas, and selects. I was able to get the input validation working, but I can't get the textarea to work (I haven't even tried on the select yet.). Here is my code:</p>
<pre><code>$(document).ready(function(){ ... | jquery | [5] |
4,499,352 | 4,499,353 | Short cut for (if,and) statment | <p>If there any way to write short cut code instead of this one</p>
<p>I want to say if page id is 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10 then show something and else show something else</p>
<pre><code><?PHP
if ($page[id]==1 || $page[id]==2 || $page[id]==3 || $page[id]==4 || $page[id]==5 || $page[id]==6 |... | php | [2] |
2,116,939 | 2,116,940 | How to draw a menu separator? | <p>I would like to draw a separator between two views. I am aware that I can draw a line between the views with the xml below, but it's pretty ugly. I'd like it to be more like the menu separator used in java; beveled and rounded and such. Any advice on how to achieve this effect?</p>
<pre><code><View
androi... | android | [4] |
1,903,933 | 1,903,934 | Is it possible to have 2 buttons within the same layout that have the same functionality? | <p>I have a long list with search options. I want a button at the top and bottom of the list to 'search'. Both buttons would have the same functionality. I thought it would be possible to just copy and past the first button in the xml layout at the end, but the button at the end has no functionality. How do I get this ... | android | [4] |
1,995,511 | 1,995,512 | Arabic Font Break | <p>I am working on an Arabic App. I am wondering that my S3 is showing Arabic text correctly. But when I see the text in Emulator it is breaking. Any reason why?</p>
| android | [4] |
5,247,340 | 5,247,341 | Native PHP function that will grant me access to the string portions directly without having to create a temporary array? | <p>I asked this question before, <a href="http://stackoverflow.com/questions/264441/does-a-native-php-5-function-exist-that-does-the-following-in-1-line">Here</a> however I think I presented the problem poorly, and got quite a few replies that may have been useful to someone but did not address the actual question and ... | php | [2] |
2,328,552 | 2,328,553 | How to redefine the scroll in a listview | <p>I have a listview with headers as you can see here : <a href="http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/" rel="nofollow">http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/</a> </p>
<p>I would like to redefine the scroll behavior, to always let the... | android | [4] |
4,897,500 | 4,897,501 | better performance for algorithm | <p>I have something like this:</p>
<pre><code>using (SqlDataAdapter a = new SqlDataAdapter(query, c))
{
// 3
// Use DataAdapter to fill DataTable
DataTable t = new DataTable();
a.Fill(t);
string txt = "";
for (... | c# | [0] |
5,312,899 | 5,312,900 | How do I access android:label for an Activity | <p>Given</p>
<p>Android.xml:</p>
<pre><code><activity android:name='.IconListActivity'
android:label='@string/icon_list_activity_name'
/>
</code></pre>
<p>Strings.xml:</p>
<pre><code><string name='icon_list_activity_name>Icon List</string>
</code></pre>
<p>How do I access to the string <em>'Ico... | android | [4] |
5,726,973 | 5,726,974 | Javascript: 'this' changes when assigning a property? | <p>I know 'this' can be a problem when you don't understand Javascript well but this one got me a little puzzled.</p>
<pre><code>var ControlTypes = {
TextBox: function () {
console.log(this);
this.Name = "TextBox";
console.log(this);
}
}
ControlTypes.TextBox();
</code></pre>
<p>Firebu... | javascript | [3] |
3,979,555 | 3,979,556 | Click event also fires focus event causing a function to run twice - jQuery | <p>I know this is probably a simple problem but I can't seem to find anything about it. I have the following code:</p>
<pre><code>var moreitemsdiv = $('.moreitemsdiv');
$('.moreitemsanchor').bind("focus click", function(){
showList(this);
return false
});
function showList(this_anchor){
var thismoreitems... | jquery | [5] |
5,366,103 | 5,366,104 | javascript clearTimeout isn't working from a child page | <p>These are the relavent lines.</p>
<pre><code>// In the parent page I set the timer and attach its handle to the window
window.warnTo = window.setTimeout("WarnTimeout();", 20000);
// If I clear the timer in the same page it works great
window.clearTimeout(window.warnTO);
// In the child page launched with window.o... | javascript | [3] |
5,114,464 | 5,114,465 | Javascript not acquiring field value | <p>I have 2 php pages, htmldisp.php and classfn.php. And an alert used in hrmldisp.php is not working. It should actually give a dropdown value.</p>
<p>htmldisp.php is</p>
<pre><code> <?php include("classfn.php"); $obj=new hello;?>
<script language="javascript">
function submitted(){
var select=doc... | javascript | [3] |
2,805,910 | 2,805,911 | Create an object with properties, | <p>I am new to javascript...
I trying to create an object- "Flower".
Every Flower has it properties: price,color,height...</p>
<p>Can somebody give me an idea how to build it?</p>
<p>Create an object and then change his properties?</p>
<p>:-)</p>
| javascript | [3] |
1,396,138 | 1,396,139 | Drag ImageView in a Grid Puzzle to swap with another ImageView in the same GridView | <p>I am trying to develop a puzzle that lets you drag the puzzle part to another part in the puzzle. This drag event shall swap the 2 parts (Images in my case).</p>
<p>I made the first part of the puzzle by making a GridView that contains the puzzle parts as ImageViews and a blank position. So, clicking on an image ch... | android | [4] |
821,150 | 821,151 | Java: read from console until getting a blank line | <p>I wrote this method, which is never ending. It isn't printing what I'm passing, why?</p>
<pre><code>import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
class Main {
public void readFromConsole() {
ArrayList<String> wholeInput= new ArrayList <String&g... | java | [1] |
487,293 | 487,294 | .html() and .alert() show different output | <p>I have a jquery that collects the id's of selected spans.
when i want to display it on html it's coming out without comma, while alert() print for example <code>1,2,3</code> html() prints <code>123</code></p>
<pre><code>$("#selected_order").click(function() {
var order = new Array();
$(".selected")... | jquery | [5] |
5,434,058 | 5,434,059 | Why can I use .equalsIgnoreCase("anoterString") without assigning it to a variable or within a control flow statement? | <p>I came across this code:</p>
<pre><code> for (final String s : myList)
{
s.equalsIgnoreCase(test);
updateNeeded = true;
break;
}
</code></pre>
<p>I suspect that this is not what the programmer actually wanted to do. I believe he meant to write something like:</p>
<... | java | [1] |
176,790 | 176,791 | RPG skill system | <p>im working on a RPG system for my friend, and I was wondering on how to make the skills system, should I use ArrayList skills as a type and write every skill down, into a XML or in to a class?</p>
<p>Example</p>
<pre><code>Skill s = new Skill();
ArrayList<Skill> skills = new ArrayList<Skill>();
s.name ... | java | [1] |
1,454,222 | 1,454,223 | Get Thumbnail from Video file in ASP.NET | <p>I am trying to get thumbnail from video file and my code run successfully but thumbnail is not saved here is my code..</p>
<pre><code> protected void Convert(string fileIn, string fileOut, string thumbOut)
{
try
{
System.Diagnostics.Process ffmpeg;
string video;
... | asp.net | [9] |
1,210,107 | 1,210,108 | Safe decoding in python ('?' symbol instead of exception) | <p>I have code:</p>
<pre><code>encoding = guess_encoding()
text = unicode(text, encoding)
</code></pre>
<p>when wrong symbol appears in text UnicodeDecode exception is raised. How can I silently skip exception replacing wrong symbol with '?' ?</p>
| python | [7] |
1,868,245 | 1,868,246 | how to set a null value for DefultValue of a property | <p>i have 4 properties
like these</p>
<pre><code> public string strLastName { get; set; }
public string strSpeciality { get; set; }
public string strProfession { get; set; }
public string strUserName { get; set; }
public string strPassword { get; set; }
public string strRegDate { get; set; }
</c... | asp.net | [9] |
2,332,415 | 2,332,416 | php renaming session ID | <p>By default the initial PHP session ID is:PHPSESSID
However, when I change that to:YourVisit
and I click on Cookies, and view Cookie information
after submitting my form there are two
Cookies:
PHPSESSID and YourVisit, I thought there was only suppose to be one session ID?</p>
<p>This has been occurring even after hi... | php | [2] |
180,102 | 180,103 | Which one is a better method to use: variable.split("_"); or variable.split(/_/);? | <p>which one is better between quotes and slash, not just in <code>split</code> method, but in other methods to search a string within a variable?</p>
| javascript | [3] |
1,369,592 | 1,369,593 | How I can use this pagination code as Multiple Table | <p>I had found an example of paging entries using PHP and <code>MySQL</code>, which I downloaded from <a href="http://www.jooria.com/downloads/470/Pagination.zip" rel="nofollow">here</a>. I found out that it was designed for a single table only.</p>
<p>Now my problem is about how to page a "mulitple queried table" (2 ... | php | [2] |
1,287,319 | 1,287,320 | Animation breaking on rapid button click | <p>So i have a slider (which is very buggy a WIP) but if i was to hammer (a british term for spam) one of the two navigational buttons the slider seems to breaks.</p>
<p>I think the example should speak for itself.</p>
<p><a href="http://jsfiddle.net/xavi3r/aZkPZ/" rel="nofollow">http://jsfiddle.net/xavi3r/aZkPZ/</a>... | jquery | [5] |
5,141,930 | 5,141,931 | Modify java code in framework.jar | <p>My stock rom on my phone has issues with MVNO's (mobile virtual network operator). Basically this means that my data connection only works when Roaming. This is a know issue that has already been fixed on several roms (but not on mine).</p>
<p>To fix this I would like to modify the source of the framework.jar file ... | android | [4] |
711,230 | 711,231 | Date and time change listener in Android? | <p>In my application, there's a alarm service, and I find that if user change it's date or time to a passed time. My alarm will not be triggered at the time I expect.</p>
<p>So, I may have to reset all the alarms again. Is there an date and time change listener in android?</p>
| android | [4] |
5,151,043 | 5,151,044 | How to instantiante object & call setter on same line? | <p>If I have an <code>Employee</code> class with a default constructor:</p>
<pre><code>private String firstName;
public Employee(){}
</code></pre>
<p>and a setter:</p>
<pre><code>public void setFirstName(String firstName){
this.firstName = firstName;
}
</code></pre>
<p>Why does this attempt fail to instantiate ... | java | [1] |
4,979,079 | 4,979,080 | Run a php function upon button click? | <p>Okay, I managed to call a php script page with a form, this way:</p>
<pre><code> <form action="action.php" method="post">
Name: <input type="text" name="txt"/>
<input type="submit" />
</form>
</code></pre>
<p>But I don't really want to call the "action.php" page. I just want to call a ph... | php | [2] |
5,479,263 | 5,479,264 | can import the classes present in the remote system? | <p>i have a server machine where all the helper jars and classes present, which i want to use. is it possible to import those classes in my application?</p>
| java | [1] |
3,360,621 | 3,360,622 | What is this C# construct doing? | <p>I have seen on another post this and its confusing me...</p>
<pre><code>public class MyClass : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected void NotifyPropertyChanged(String info)
{
if (PropertyChanged != null)
{
PropertyChanged... | c# | [0] |
4,406,403 | 4,406,404 | Javascript - turning if statement into switch statement | <p>I'm trying to convert an if statement into a switch statement using javascript. This is the working if statement:</p>
<pre><code> if(!error1(num, a_id) && !error2(num, b_id) && !error3(num, c_id) && !error4(num, d_id)) {
a.innerHTML = num;
</code></pre>
<p>Any tips on how to put th... | javascript | [3] |
267,978 | 267,979 | What are x and y values after the invocation of foo()? | <pre><code>var x = 'hello';
var x = 'world';
function foo(){
var y = x = 'hello from foo';
}
foo();
</code></pre>
<p>Is it x = 'hello from foo', y = 'hello from foo'?</p>
| javascript | [3] |
3,737,141 | 3,737,142 | Script manager is unable to open aspx page in new window in c# | <p>below is my Code</p>
<pre><code>protected void btnprnt_Click(object sender, EventArgs e)
{
//Response.Redirect("Print.aspx");
string url = "Print.aspx?ID=1&cat=test";
string script = "window.open('" + url + "','')";
if (!ClientScript.IsClientScriptBlockRegistered("NewWindow"))
{
//c... | c# | [0] |
1,349,006 | 1,349,007 | Please help a confused newbie? | <p>So, I've just started learning c++ yesterday and I'm really confused with this piece of code.</p>
<pre><code>#include <iostream>
int ReadNumber()
{
using namespace std;
cout << "Enter a number: ";
int x;
cin >> x;
return x;
}
void WriteAnswer(int x)
{
using namespace std;... | c++ | [6] |
1,937,075 | 1,937,076 | Javascript - Use array to iterate through fields? | <p>I have a form and would like to verify that a few fields that it contains have an entry.</p>
<p>As such I have the following:</p>
<pre><code> var requiredFields = array(
'Delivery_first_name',
'Delivery_last_name',
... | javascript | [3] |
989,991 | 989,992 | Defining class string constants in C++? | <p>I have seen code around with these two styles , I am not not sure if one is better than another (is it just a matter of style)? Do you have any recommendations of why you would choose one over another.</p>
<pre><code> //Example1
class Test {
private:
static const char* const str;
};
const char* con... | c++ | [6] |
1,513,745 | 1,513,746 | Read from source.sql write to destiantion.sql with python script? | <p>I Have a file source.sql</p>
<pre><code>INSERT INTO `Tbl_ABC` VALUES (1, 0, 'MMB', '2 MB INTERNATIONAL', NULL, NULL, 0)
INSERT INTO `Tbl_ABC` VALUES (2, 12, '3D STRUCTURES', '3D STRUCTURES', NULL, NULL, 0)
INSERT INTO `Tbl_ABC` VALUES (2, 0, '2 STRUCTURES', '2D STRUCTURES', NULL, NULL, 0)
INSERT INTO `Tbl_ABC` VALU... | python | [7] |
2,872,102 | 2,872,103 | Learning Python: Print 3 consecutives lines from a PIPE | <p>i have the following code:</p>
<pre><code>def cmds(cmd):
cmd= Popen(cmd, shell=True, stdout=PIPE)
lines = command.stdout.read().splitlines()
</code></pre>
<p>I have a command that outputs lines like this:</p>
<pre><code>2011/03/30-201
CLIENT 3
Failed
23:17
0.0000
2011/03/31-3
CLIENT 2
Completed
00:47
1.0... | python | [7] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.