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 |
|---|---|---|---|---|---|
4,025,463 | 4,025,464 | How can I give a class as argument to a Python function | <p>I have two functions in my (first!) Python program that only differ by the class that must be instanciated.</p>
<pre><code>def f(id):
c = ClassA(id)
...
return ...
def g(id):
c = ClassB(id)
...
return ...
</code></pre>
<p>To avoid repeated code, I would like to be able to write a singl... | python | [7] |
5,329,875 | 5,329,876 | UITableview cell value over writing again and again problem? | <p>hi
my tableview show like this when i scroll .......will u help what mistake i have done? any help please?if you see that image , the value i have selected in over writing........</p>
<p><a href="http://www.freeimagehosting.net/image.php?fa76ce6c3b.jpg" rel="nofollow">http://www.freeimagehosting.net/image.php?fa76c... | iphone | [8] |
4,876,912 | 4,876,913 | Get Gridview Data in PDF Format in C# Windows Form? | <p>I want to convert the data of datagridview into PDF file . For Example if i press button1 i should get the datagridview data as pdf.</p>
<p>How can I do this?</p>
| c# | [0] |
3,553,825 | 3,553,826 | Different results when using WebRequest vs WebClient | <p>We have a text file that gets generated automatically and put in a web server. The task is to read the file line by line and insert the records in a database. The following code is in C#:</p>
<pre><code> WebRequest request = WebRequest.Create(url);
WebResponse response = request.GetResponse()... | c# | [0] |
1,844,201 | 1,844,202 | screen shots for app store submission | <ol>
<li>Do I have to submit both portrait and landscape screenshots? </li>
<li>Is it fine for my app to only support portrait mode?</li>
</ol>
| iphone | [8] |
5,329,119 | 5,329,120 | Python: Are `hash` values for built-in numeric types, strings standardised? | <p>I came to this question while pondering about the ordering of <code>set</code>, <code>frozenset</code> and <code>dict</code>. Python doesn't guarantee any ordering, and I guess any ordering is all down to the <code>hash</code> value. But is the hash value for a value of a numeric or string built-in type standard? In... | python | [7] |
3,376,495 | 3,376,496 | C++ Question,error C2064: term does not evaluate to a function taking 1 arguments | <p>Would you please help me with this simple code in C++, I don't know what is the problem here?</p>
<pre><code>#include <iostream>
#include <string>
using namespace::std;
template <class Type>
Type binsearch (Type item,Type *table,Type n)
{
int bot=0;
int top=n-1;
int mid, cmp;
while... | c++ | [6] |
4,893,910 | 4,893,911 | Get the next 4 months in a formatted string | <p>What is the most elegant way of getting the following:</p>
<p>Starting from today's date, return an enumerable that would be the following:</p>
<p>July 1st
July 15th
August 1st
August 15th
September 1st
September 15th
October 1st
October 15th</p>
<p>Should account for things like if it's the end of the year, then... | c# | [0] |
2,780,185 | 2,780,186 | How do I output Linked List which holds objects using java.util.ListIterator? | <p>Hi I got this problem with I am not sure how to deal with... I have a Linked List which stores Objects which works fine. But now I am trying to display the content of the linked list using iterator and I understand that wont be as simple as </p>
<pre><code>ListIterator<String> iterator = LibraryUser.listItera... | java | [1] |
1,888,508 | 1,888,509 | Convert object[,] to string[,]? | <p>How would you convert <code>object[,]</code> to <code>string[,]</code> ?</p>
<pre><code>Object[,] myObjects= // sth
string[,] myString = // ?!? Array.ConvertAll(myObjects, s => (string)s) // this doesn't work
</code></pre>
<p>Any suggestions appreciated.</p>
<p>EDIT : Of course, a loop solution will obviously ... | c# | [0] |
2,379,811 | 2,379,812 | onSearchRequested() result in same activity | <p>i have implement in my application the search method onSearchRequested() via list and it work well and i create 2 activity one for list data and another for the search result
in that form</p>
<p>public class acitvity1 extends InterfaceBase {</p>
<pre><code> @Override
ListAdapter makeMeAnAdapter(Inten... | android | [4] |
1,012,493 | 1,012,494 | Jquery to accept both negative and nonnegative values | <p>I have tried this. This accepts only integers. I want both negative and non negative.</p>
<pre><code> $(function () {
$('.spinner').keyup(function () {
if (this.value.match(/[^0-9]/g)) {
this.value = this.value.replace(/[^0-9]/g, '');
}
});
});
</code><... | jquery | [5] |
1,264,801 | 1,264,802 | Get Specific Device Information | <p>Using just PHP, is there anyway to detect if the page is being loaded from a SPECIFIC device? Say, I would want the page to react differently if only MY iPhone was loading the page, no one else's?</p>
<p>The only solution I have so far is to use $_SERVER['REMOTE_PORT' in conjunction with $_SERVER['HTTP_USER_AGENT']... | php | [2] |
2,999,414 | 2,999,415 | How will I get the SelectedItem? C# winforms CheckedListBox control | <p>Prior to this question, I asked <a href="http://stackoverflow.com/questions/3801290/is-there-displaymember-and-valuemember-like-properties-for-checkedlistbox-con">this</a> question on this site. (Mr Jon Skeet answered it!)</p>
<p>I'm having difficulty retrieving the <code>SelectedItem</code> of the <code>CheckedLis... | c# | [0] |
3,622,349 | 3,622,350 | Creating a drawable rectangle in xml with one gradient on the top half and another on the bottom half | <p>I'm trying to create a drawable in xml, a rectangle with one gradient on the top half, and another on the bottom half. This is NOT the way to do it, apparently:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>... | android | [4] |
3,269,128 | 3,269,129 | how to stop interval for animation with its own speed in jquery? | <p>I am trying to figure out how to do this... I have a function that moves a div, this function has a speed property (500 ms), and its used for animate and move the div.. so, what I basically trying to do is everytime I am over a button call that function ,the problem is that I cant stop the interval after I leave the... | jquery | [5] |
4,438,192 | 4,438,193 | Pass attribute, not value as parameter | <p>I would like to make this happen in JavaScript:</p>
<pre><code>function changeAttributeValue(theAttribute, numberOfPixels)
{
theAttribute = numberOfPixels + "px";
}
changeAttributeValue(myImage.style.left, 50);
changeAttributeValue(myImage.style.top, 80);
changeAttributeValue(myCanvas.width, 600);
</code></pre... | javascript | [3] |
439,641 | 439,642 | different compiler behavior when adding bytes | <pre><code>byte b1 = 3;
byte b2 = 0;
b2 = (byte) (b2 + b1); // line 3
System.out.println(b2);
b2 = 0;
b2 += b1; // line 6
System.out.println(b2);
</code></pre>
<p>On line 3, it's a compiler error if we don't typecast the result to a byte -- that may be because the result of addition is always int and ... | java | [1] |
3,540,471 | 3,540,472 | Is there any way to Get data by PHP code insted of HTML from | <p>I'm newbie in PHP.I want to know that,I taking data by html form and a .php file.
like:</p>
<pre><code><form id="form1" name="form1" method="post" action="show.php">
<strong>Please Enter the Unique id</strong><br/><br/>
Unique id:
<!-- name of this text field is "tel" -->
<inp... | php | [2] |
5,294,311 | 5,294,312 | Load module with variable path in python 2.6? | <p>My dev environment is python 2.6, so the importlib.import_module() syntax is not available to me. I'm trying to load a module with a path that is set by a variable; is this even possible in 2.6?</p>
<p>The background is that I'm polling a number of devices from different vendors, so in various directories I have wr... | python | [7] |
1,701,604 | 1,701,605 | How to click on a button, and have the item in question go to the next list using javascript? | <p>I have this problem. I have two lists. One with the items of my fridge (that's the assignment :) ) and other with the items of the shop. I want to be able to click on an item of the fridge, and have it show up on the list of the left. In javascript, that is.</p>
<p>If anyone knows how to do it, I'd be very glad to ... | javascript | [3] |
4,025,276 | 4,025,277 | ASP.NET button click event not working in IE | <p>in my asp.net page, The asp.net button click is not getting fired in IE,But in mozilla its working fine. Any thoughts ?</p>
| asp.net | [9] |
441,228 | 441,229 | jQuery Remove All Elements from Select with Value | <p>I have simple select that looks like this:</p>
<pre><code><select id="region">
<option value=""> -- country -- </option>
<option value="842554592">Alberta</option>
<option value="708812360">Ontario</option>
...
</select>
</code></pre>
<p>I want to clear non... | jquery | [5] |
4,157,837 | 4,157,838 | how to encode the "&" special character in any url..? | <p>how to encode the "&" special character in any url..?</p>
| iphone | [8] |
217,672 | 217,673 | Cannot convert source type to target type | <p>I've got this subclass implementing my Interface and there are no errors in terms of satisfying the contract. However when I try to set the current session in the sub class's constructor I get this compile-time error when it tries to compare the variable type with the returned type of GetCurrentSession():</p>
<p><... | c# | [0] |
4,000,002 | 4,000,003 | How do I create this Table/View in Asp.Net C# | <p><img src="http://i.stack.imgur.com/rONkC.jpg" alt="enter image description here"><a href="http://i.stack.imgur.com/Kc5if.jpg" rel="nofollow">I need to create a Table as per the following Image and I'm a newbie to .Net. Please tell me which tool I should be using</a></p>
| asp.net | [9] |
4,339,660 | 4,339,661 | iPhone SDK: How can you hide an alert box? | <p>I am using the following code to show an alert box:</p>
<pre><code>UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Info" message:@"My Message" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
</code></pre>
<p>Can you tell me how to hide the alert box again w... | iphone | [8] |
1,396,659 | 1,396,660 | How can I prevent anyone from holding a reference to an object in C# | <p>I have a class like this</p>
<pre><code>internal class Report
{
public Company TargetCompany { get; private set; }
.... // other stuff
}
</code></pre>
<p>I do not want any one to be able to do this</p>
<pre><code>Report r = GetReport();
Company c = r.TargetCompany;
</code></pre>
<p>but instead always ... | c# | [0] |
612,297 | 612,298 | Does Android Speech Synthesis do not work for HTC Dream firmware version 1.6 build DRD20? | <p>I have a HTC Dream firmware version 1.6 build DRD20.
I am unable to install voice data in Menu ==> Settings ==> Speech Synthesis ==> Install voice data. The option just brings me back to previous screen of settings. I also tried installing Speech Synthesis Data Installer and many other applications for text to spee... | android | [4] |
2,762,806 | 2,762,807 | Has anyone ever created a way to provide a user the ability to toggle permissions within an Android app? | <p>I am creating an Android app that has many newtorking capabilites, I want to provide them with the option to toggle these permissions on and off. So far in the manfest I have these permissions:</p>
<pre><code> <uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="and... | android | [4] |
950,840 | 950,841 | PHP: Should you ever do this? | <p>If I'm creating a PHP class, should I ever have a function that looks like:</p>
<pre><code><?
class test {
public function hello() {
?>
Hello
<?
}
}
?>
</code></pre>
<p>I know it works, but is it considered to be bad programming, like, should you avoid doing things like this?</p>
| php | [2] |
1,509,968 | 1,509,969 | empty value of parameter - php | <p>I have this code:</p>
<pre><code>foreach($summary as $machine)
{
$hostname = $machine['node'];
$result = mysql_query("SELECT OS FROM machines WHERE ind='$hostname'");
while($row = mysql_fetch_array($result))
{
if($row == 'solaris')
{
$partition_os = 'export/home';
... | php | [2] |
3,510,839 | 3,510,840 | Variable not updating its value | <pre><code>var canAssignMultiple="true";
var canWithdrawMultiple="true";
function onCheckUncheck()
{
if($(':checkbox[name^="checkedRecords"]:checked').length>0)
{
$("input[name='checkedRecords']:checked").each(function()
{
debugger;
var canAssign = $(this).attr("canA... | javascript | [3] |
4,389,147 | 4,389,148 | Kepler Memory Usage | <p>I am using Kepler 2.3 and it looks like my Kepler got killed when I tried to launch it on a cluster machine. The default heap space alloted to kepler is 512m. Is there any way that we can increase the heap size.</p>
<p>Thanks!</p>
| java | [1] |
5,087,644 | 5,087,645 | What is the difference between window, screen, and document in Javascript? | <p>I see these terms used interchangeably as the global environment for the DOM. What is the difference (if there is one) and when should I use each one?</p>
| javascript | [3] |
745,667 | 745,668 | Define php function and use without () | <p>Is it possible to define a function and use without ()?</p>
<p>Like <code>require("a.php")</code> and <code>require "a.php"</code>. </p>
<pre><code>function getNameById($id){}; /*and use it like*/ $id = getNameById "1";
</code></pre>
<p>Thanks.</p>
| php | [2] |
961,667 | 961,668 | Suggest your thoughts on this design | <p>I am working on a business layer functionality.</p>
<p>There are two layers :-
1) Entity Data Model Layer which is the logical layer</p>
<p>This logical layer maps to a storage layer.</p>
<p>There are different classes in each of this layer.</p>
<p>The data storage layer has subject, test and result as objects
... | c# | [0] |
5,688,701 | 5,688,702 | Why do the following expanded if shorthand statements not work in javascript? | <p>This is my first attempt to write shorthand if statements however am befuddled by why the expanded versions don't work quite the way I imagined they would.</p>
<p><strong>Code 1</strong> - Does not work</p>
<pre><code>if(document.getElementById == true) {
alert("The document object model is supported by: "... | javascript | [3] |
2,087,670 | 2,087,671 | PHP Script - Get Server Proccessor | <p>I have done a couple hours of research and have found a solution, however I would prefer a solution without using the exec command. </p>
<p>Currently I have this code:</p>
<pre><code>exec ("cat /proc/cpuinfo", $details);
$string= $details[4];
</code></pre>
<p>I basically would like it to pull the first processor'... | php | [2] |
4,866,384 | 4,866,385 | How to find variables dynamically created, but not with extract? | <p>I'm working on an old site, written by somebody else, and they've done something equivalent to <code>extract($_POST)</code> somewhere in there code. But they didn't use the function extract.</p>
<p>The application was originally designed for PHP3 (yes, old), then it was ported to PHP4, and now I'm porting it to PHP... | php | [2] |
4,409,596 | 4,409,597 | how to updatePeriod for widgets based in a selection from a spinner programmatically? | <p>I'm using the following code to select the time from the spinner but Im unable to update it for widget </p>
<p>adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner2.setAdapter(adapter);
spinner2.setOnItemSelectedListener(
new OnItemSelectedListener() {</p>
... | android | [4] |
281,502 | 281,503 | How to access the String when creating a new method for String.prototype in javascript | <p>I'm trying to learn how to add new methods in the String.prototype in JavaScript. But I can't figure out a way on how to access the string specified in the new method:</p>
<pre><code>String.prototype.new_method = function(){ THE_STRING; };
</code></pre>
<p>So that it will return "abc" when I call it:</p>
<pre><co... | javascript | [3] |
3,791,920 | 3,791,921 | How can I call the .apk file of PDF Viewer through intent of my application? | <p>I have only .APK file of PDF Viewer and my requirement is to use pdf viewer for reading document called through Web API . Is there any possibility to integrate these two in same package apart from source code ?</p>
| android | [4] |
4,958,583 | 4,958,584 | jQuery Accordion drop down not working | <p>Repost of old question with cleaner code:</p>
<p>Trying the make <a href="http://jsfiddle.net/rexonms/Bchjk/3/" rel="nofollow">this</a> accordion work. But the conditional statement is not working. The li > li suppose to show up when a user hover overs li. </p>
<p>Thanks in advance</p>
<p><a href="http://jsfiddle... | jquery | [5] |
266,508 | 266,509 | A simple C# connection string to a flat file , txt | <p>Could any one help me with a connection string to a Microsoft flat file , extension txt ?
I simply want to read a txt document delimited with | .</p>
<p>Get the data and load it into a DataTable via a DataAdapter if possible, the first row on the file should be the columns name on the DataTable, finally DataType is... | c# | [0] |
2,585,040 | 2,585,041 | How to get the last part in href or grandparent's id with jquery? | <p>A list is created dynamically. Now I want to get 93 or 94 etc which will be used for php function.</p>
<p>For example I added 93 in two ways as you can see below. In li class="93" or href="http://127.0.0.1/ci_backendpro2/index.php/messages/admin/changestatus/93"</p>
<p>Can anyone tell me how to get this number wit... | jquery | [5] |
3,960,256 | 3,960,257 | Assign object properties to list in a set order | <p>How can I iterate over an object and assign all it properties to a list</p>
<p>From</p>
<pre><code>a = []
class A(object):
def __init__(self):
self.myinstatt1 = 'one'
self.myinstatt2 = 'two'
</code></pre>
<p>to</p>
<pre><code>a =['one','two']
</code></pre>
| python | [7] |
598,170 | 598,171 | Javascript now working | <p>HEllo Geeks :) Sponsor gave me JS script with variables. I have integrated code in my website
and i'm getting direct link from server. This code should take variables and sponsor server should return *.exe file (it's like wizard with offers on final step it takes download link and saves that file on computer. Let's ... | javascript | [3] |
23,697 | 23,698 | loading gridview with hyperlink column | <p>I have a gridview and added a column "Hyperlink" to all records by enabling autogeneratefields.
When this gridview is loaded and when I click the hyperlink across any record I want to redirect to some other page with entire record passed as query string to that page?
can anybody help me on this?</p>
| asp.net | [9] |
2,475,849 | 2,475,850 | $browser not defined | <p>I am trying to use jquery for browser detection but it says </p>
<blockquote>
<p>Uncaught ReferenceError: $browser is not defined</p>
</blockquote>
<p>the code is like </p>
<pre><code>if(!$browser.msie){
condition
}
</code></pre>
| jquery | [5] |
3,681,775 | 3,681,776 | How to enumerate through IDictionary | <p>How can I enumerate through an IDictionary? Please refer to the code below.</p>
<pre><code> public IDictionary<string, string> SelectDataSource
{
set
{
// This line does not work because it returns a generic enumerator,
// but mine is of type string,string
IDictionaryEnumerato... | c# | [0] |
2,526,874 | 2,526,875 | Jquery replace not working for inner strings | <p>I need to replace <code>|||</code> from all the input fields using jquery. But it is only replacing the first item. I need to use regex but I don't know how to add that to the string.</p>
<pre><code>$(document).ready(function() {
$("#layerPaper").children("div").each(function() {
$val = $(this).children... | jquery | [5] |
3,105,378 | 3,105,379 | Passing data in JavaScript | <p>Having a problem understanding what I will call a variable scope question for lack of a better description. </p>
<p>Say I have a page with two functions, <code>one()</code> and <code>two()</code>. The first function has a locally-scoped variable <code>x</code> with an object in it. This function builds an element,... | javascript | [3] |
3,989,535 | 3,989,536 | how can show UpdateProgress bar during the page loading | <pre><code><asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="0" DynamicLayout="true"
AssociatedUpdatePanelID="update1">
<ProgressTemplate>
<div class="TransparentGrayBack">
</div>
<div class="Sample5PageUpdate">
<img src=... | asp.net | [9] |
3,755,790 | 3,755,791 | python filename=None | <p>I'm new to Python. I heard that when we initialize a function we should always start by self but I didn't get the <code>fileName=None</code>. What does this argument stand for?</p>
<pre><code>def __init__(self, fileName=None):
</code></pre>
| python | [7] |
619,804 | 619,805 | passing a function as a string in php | <p>I'm just starting to learn PHP and am using the W3 Schools tut. In the error handling section there is this code:</p>
<pre><code><?php
function customError($errno,$errstr) {
echo '<b>Error:</b> [$errno] $errstr<br />';
}
set_error_handler('customError');
echo($test);
?>
</code></pre>
<... | php | [2] |
5,078,509 | 5,078,510 | changing the background color of custom cell | <p>It looks simple thing but i dont know why i am not able to change the background color of a custom tag on which i am working. Please check my code below for the custom cell.</p>
<pre><code>- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if ((self = [super initWithS... | iphone | [8] |
4,908,670 | 4,908,671 | How to detect input string is not in correct format in c# codes? | <p>is there any way to easily implement to scan through the C# web application codes to see if the input fields has handled the error: "input string is not in correct format "?</p>
<p>Logically it should display a user friendly error message instead of redirect user to a server error page displaying: "input string is ... | c# | [0] |
3,909,813 | 3,909,814 | How-to kill my app without killing the service it sarted (debugging) | <p>My android application starts a service when runned for the first time. That service handles network connection.</p>
<p>If the device is out of free space, my application can be killed, but the service will remain alive (except on certain extreme case, I know.). When the app will be restarted, it will need to resto... | android | [4] |
4,219,502 | 4,219,503 | Operation inside when we add two Integer objects? | <p>Can some one explain me how the internal behavior when we add two Integer objects in java? (like it is unbox Object into primitives and then add two integers and finally boxed it in to Integer object)</p>
<pre><code>Integer sum = new Integer(2) + new Integer(4);
</code></pre>
| java | [1] |
2,183,584 | 2,183,585 | can't catch java.lang.VerifyError | <p>I'm getting this error:
"Uncaught handler: thread main exiting due to uncaught exception java.lang.VerifyError"</p>
<p>It's only happening on 1.6. Android 2.0 and up doesn't have any problems, but that's the main point of all.</p>
<p>I Can't catch the Error/Exception (VerifyError), and I know it's being caused by ... | android | [4] |
6,026,403 | 6,026,404 | How to check a form is available or not by using its id - jquery | <p>Is it possible to check weather a form is available or not using jquery.</p>
<p>For example :</p>
<p><strong>1. I am having a form ID called form1</strong></p>
<p><strong>2. I need to check in the page weather the id contains a form or not.</strong></p>
<p><strong>3. How can i achieve it using jquery.</strong></... | jquery | [5] |
898,194 | 898,195 | Google maps get latitude and longitude having city name? | <p>I want to get latitude and longitude of a city by providing the api with the city name. It should work for most cities regardless how the user inputs the city.</p>
<p>E.G:</p>
<p>city can be 'miami, US' or city can be 'miami, united states'</p>
<p>How do I print it's latitude?</p>
| javascript | [3] |
1,890,781 | 1,890,782 | how to avoid this error | <p>In my page, if i refer
using System.windows.forms;
using System.web.webcontrols..... </p>
<p>Textbox ambiguos refernece error is occured from webcontrols and forms, </p>
<p>how can i rectify this error... but i need those two namespaces in my asp.net page.</p>
| asp.net | [9] |
3,530,830 | 3,530,831 | PHP how to remove the html tags(<DIV></DIV>,<P></P>,<SPAN></SPAN>) from the string | <p>Am using the strip_tags() to remove the HTML tags from one content . but i wants to remove the html (<code><DIV></DIV>,<P></P>,<SPAN></SPAN></code>) tags apart from the <code><img></code> tag and <code><a></code> , i don't want to remove the <code><img ><a>... | php | [2] |
5,924,177 | 5,924,178 | how to jquery onclick append text to end of TINYMCE textarea | <p>I'm trying to click a word in the page that will append a word at the end of a <code><textarea></code>. What I have works fine on normal textareas but I can't find the proper way to do this in TinyMce.</p>
<pre><code><script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"> </s... | jquery | [5] |
2,329,538 | 2,329,539 | C# how to populate a string, IList, or Array through if statement | <p>I have the following code:</p>
<pre><code>foreach (string file in FleName)
if (!ActualFiles.Any(x => Path.GetFileName(x).Equals(file)))
{
IList<string> MissingFiles = file;
}
</code></pre>
<p>I have 3 if statements that access this... | c# | [0] |
3,003,866 | 3,003,867 | Example of lightweight and heavy weight thread? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2236412/heavy-weight-and-light-weight-thread">Heavy weight and light weight thread</a> </p>
</blockquote>
<p>Can any body give a example in java how light weight thread differs from heavy weight?</p>
| java | [1] |
2,500,746 | 2,500,747 | setImageResource - Strings and Ints when reading from XML-file | <p>I had this, which was working fine:</p>
<pre><code>public static Integer[] photos = new Integer[]
{R.drawable.photo1,R.drawable.photo2,R.drawable.photo3};
this.setImageResource(photos[mCellNumber]);
</code></pre>
<p>But I decided I wanted to put the filenames in an XML file instead, which I did, like this:</p... | android | [4] |
3,614,869 | 3,614,870 | Call by reference vs Pointer argument | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2139224/how-to-pass-objects-to-functions-in-c"><strong>FAQ</strong>: How to pass objects to functions in C++?</a><br>
<a href="http://stackoverflow.com/questions/114180/pointer-vs-reference">Pointer vs. Reference<... | c++ | [6] |
2,432,288 | 2,432,289 | c# writing to spreadsheet using XmlWriter | <p>I'm using an <code>XmlWriter</code> to create a spreadsheet and have been successful with the basic setup. The documentation is available here <a href="http://msdn.microsoft.com/en-us/library/aa140066%28office.10%29.aspx#odc_xmlss_span" rel="nofollow">doc</a></p>
<p>and I'm trying to use some advanced features like... | c# | [0] |
270,278 | 270,279 | adb device missing | <p>I am developing an android app and am now ready to publish it to my device (HTC Desire). The only thing is I am using ubuntu and I am having trouble doing so. I have found some help on the internet regarding installing the drivers, only I need something called "adb devices", however in the latest android sdk it has ... | android | [4] |
1,144,219 | 1,144,220 | Testing if javascript is enabled | <p>Is there a way to test to see if javascript is enabled to ensure an application that required javascript is not initiated when it is disabled or otherwise not available?</p>
| javascript | [3] |
2,195,024 | 2,195,025 | Concise way of pronouncing :: in C++? | <p>How do you pronounce <code>::</code> in C++ in a concise way?</p>
| c++ | [6] |
2,446,793 | 2,446,794 | How we can make multiple syntax? | <p>How we can make multiple counters? The first counter should count from 1 to 10 and the second counter should count from 4 to 20.</p>
<p>Is it possible (Using <code>For</code> or <code>While</code> methods)? </p>
| java | [1] |
4,355,156 | 4,355,157 | how failed constructor roll over to destroy the completed objects? | <p>I know that when a constructor fails, the completed member objects will be destroyed. There is no memory leak.</p>
<p>My question is that how does compiler do that? How can compiler know what member is constructed? Does it make any record of it? Does the compiler really destroy everything in this case? How does it ... | c++ | [6] |
1,882,037 | 1,882,038 | How can I increase 0000 by 1 and keep formatting? | <pre><code>$i=0000;
while($i<=1231)
{
print "$i";
$i++;
}
</code></pre>
<p>I want it to display <code>0001</code>,
<code>0002</code>,
<code>0003</code>,
<code>0004</code>,
but instead it prints:
<code>0</code>,
<code>1</code>,
<code>2</code></p>
<p>Does anyone know why this isn't working?<br>
Thank you in adv... | php | [2] |
1,902,146 | 1,902,147 | Using "google api java client" android | <p>I want to use "google api java client" to create event "google calendar".
In the event, I want add "Description" and Reminders
Help me.
Thanks</p>
| android | [4] |
34,313 | 34,314 | get the content of an image object in PHP | <p>I'm trying to get the raw data that is created by imagejpeg() in PHP. I need to cache the content since the function generating the image is kind of slow. I know I can provide a 2nd parameter, but that's not what I want.</p>
<p>Thx</p>
| php | [2] |
1,470,821 | 1,470,822 | whats the best way to find multiple appearance of string within a list in python? | <p>Lets say i have the following list:</p>
<blockquote>
<p>['ab=2','bc=5','ab=1','cd=6','ab=7']</p>
</blockquote>
<p>whats the best (efficient) way to find all appearance of the word 'ab' in this list</p>
| python | [7] |
5,892,243 | 5,892,244 | How to do a spinning animation while downloading a file | <p>I have a program that copies a file to the sd card. The program takes a while to run, and now it just freezes while the file is being copied.</p>
<p>I saw some other programs that have a animation of a wheel spinning in the center of the screen while the file is being down loaed.</p>
<p>I tried to google spin con... | android | [4] |
907,770 | 907,771 | ArrayAdapter goes beyond bounds | <p>I have an <code>ArrayAdapter</code> with <code>ArrayList</code> filled. Each time I click on any of its item I re-fill the <code>ArrayList</code> and send <code>notifyOnDataSetChange()</code> to the <code>adapter</code>. But for unknown for me reason it goes out of <code>ArrayList</code> bounds in it's <code>getView... | android | [4] |
5,435,597 | 5,435,598 | how to write sqlite query using coredata | <p>Please help me,</p>
<p>I want to write query(mentioned below) using coredata.</p>
<pre><code>select primKey, ( primKey - 5 ) as **d** from TABLE Order by **d** limit 1.
</code></pre>
| iphone | [8] |
1,191,756 | 1,191,757 | how to show liked link with image using fb-like button in asp.net | <p>i am facing a problem since 3 days.</p>
<p>I have fb-like button on my webpage, when i click on it, it posts a message on facebook. but doesnt show given image in that like post.</p>
<p>I refer some posts and got answers that add the open graph meta tags, so that the fb will show the images.
But its not working</p... | asp.net | [9] |
5,721,071 | 5,721,072 | send data to a bluetooth module using python qt | <p>In python-qt i have created a form with for buttons.I have to send data to a bluetooth module.On pressing one button one particular data have to be send.When another button is clicked another data have to send.for this i have opened a socket and tried to send the requried data using sock.send.during all the time the... | python | [7] |
5,876,699 | 5,876,700 | Load image before rendering for JavaScript slideshow for mobile browser | <p>Can someone please tell me what is wrong with this code (other than the fact that it is probably poorly written...)? I am trying to create a slideshow in JavaScript for a mobile browser. The "seamless" thing is to load the image before switching the background image. I tested a previous version of the script on my i... | javascript | [3] |
5,316,645 | 5,316,646 | RaphaelJS for Directory Board Navigation | <p>I am developing a directory board for my own school with touch navigation using JS. I would like to apply a feature where users can see a navigation line when he touch a particular destination from the directory listings. Says from the Parking Lot to the Laboratory. </p>
<p>I have done few readings on RaphaelJS and... | javascript | [3] |
1,281,871 | 1,281,872 | Javascript: Image to Base64? | <p>Is there any way how to encode a png/jpeg/gif image to base64 using Javascript (can't use canvas toDataURL)? Thank you.</p>
| javascript | [3] |
5,934,938 | 5,934,939 | Are onTouch(), onClick() running sequentially in the same thread? | <p>Are onTouch(), onClick(), runOnUiThread() running in the same UI thread sequentially? Or do I have to worry about synchronization issue among them?</p>
<p>Thanks.</p>
| android | [4] |
2,121,067 | 2,121,068 | parsing html data in android | <p>I am making an application in which i have to parse HTML data. I have got data that i want. But data is repeating five to six times. I m saving data into string, but when i am printing this string there is no repeated data. e.g data having 23 values and it is repeating five or six times. I have entered static string... | android | [4] |
364,337 | 364,338 | passing custom data from <a> to jQuery to show confirmation message before delete | <p>How can I pass custom data to the jQuery event handler, specifically from the <code>$(this)</code> element? In HTML5, I probably can legally write:</p>
<p><code><a class="delete" href="delete.php?id=5" data-id="5">delete</a></code></p>
<p>although I still feel a bit awkard about that. How about prior t... | jquery | [5] |
908,477 | 908,478 | Android check internet connection | <p>I want to create an app that uses the internet and I'm trying to create a function that checks if a connection is available and if it isn't, go to an activity that has a retry button and an explanation. </p>
<p>Attached is my code so far, but I'm getting the error <code>Syntax error, insert "}" to complete MethodBo... | android | [4] |
2,261,880 | 2,261,881 | Page View Counter like on StackOverFlow | <p>What is the best way to implement the page view counter like the ones they have here on the site where each question has a "Views" counter?</p>
<p>Factoring in Performance and Scalability issues.</p>
| asp.net | [9] |
1,684,851 | 1,684,852 | Scaling image anchored at cetain point | <p>Is it possible to scale an image by using a specified point as the anchor, i.e. the image "grows" out from this point?</p>
| iphone | [8] |
704,724 | 704,725 | When should a music player gain and give up audio focus? | <p>I'm writing an Android music player, and is stuck on audio focus issue.</p>
<p>It seems like audio focus mainly affects media button receiving, but after reading the document I have no idea about when to gain and give up focus.</p>
<p>My music app will run in background, and need to detect play/pause button <stron... | android | [4] |
465,694 | 465,695 | Sort array using another array | <p>I have an array of products and i want to sort them with another array.</p>
<pre><code>$products = array(
0 => 'Pro 1',
1 => 'Pro 2',
2 => 'Pro 3'
);
$sort = array(1,2,0);
array_multisort($products, $sort);
</code></pre>
<p>Array <strong>should</strong> now be ...</p>
<pre><code>$products = array... | php | [2] |
4,723,812 | 4,723,813 | second click beats first animate complete callback function | <p>I have a button, when clicked, animates a div.</p>
<p>I am trying to make use of the <a href="http://api.jquery.com/animate/" rel="nofollow">$.animate()</a> [complete] callback function, but running into a situation where clicking the button twice really fast causes the animation to run twice before the first anima... | jquery | [5] |
5,503,516 | 5,503,517 | How do you reference another one of your classes in java? | <p>in Class1 I have a private float float1</p>
<p>I have two public methods to access this variable.</p>
<pre><code>public float getFloat1(){
return float1;
}
public void setFloat1(float f){
float1 = f;
}
</code></pre>
<p>How do I use these methods in Class2?</p>
| java | [1] |
1,712,324 | 1,712,325 | Null pointer expection | <pre><code>String graphNameUsed = graphName.getName();
if (graphType.equals("All") || graphType.equals("ALL"))
graphNameUsed += "_ALL";
</code></pre>
<p>If my String is null, then will it throw Null Pointer expection when i am checking whether it equals or not. To Avoid this expection, how should i... | java | [1] |
3,382,845 | 3,382,846 | in android how to develop an hotel bill application with different categories of items? | <p>here there will be list of categories in first page we have to select the categories and in particular category we have to select list of items on clicking the items these items and and their bill amount should be added to the bill page then the bill page should has 3 buttons one for ok other for clear if we press o... | android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.