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 |
|---|---|---|---|---|---|
1,704,919 | 1,704,920 | Using jquery, how can I select all the DIVs in my document with ID names containing specific text? | <p>Using jquery, how can I select all the DIVs in my document with ID names containing specific text?</p>
<p>I want to select all the elements that contain 'parent', the problem is the string parent might be in the middle of the string.</p>
<p>I've been trying to use:</p>
<pre><code>var allcontent_collection = $('di... | jquery | [5] |
303,122 | 303,123 | hierarchy is not working for my device | <p>when I run hierarchy in terminal. it can show the interface of it, but can not connect to my device.And it can connect to virtual emulator. It remind me in terminal like that,</p>
<ol>
<li>Adb rejected forward command for device 172.18...... unknown host service</li>
<li>missing forward port for 172.18.....</li>
<l... | android | [4] |
4,855,126 | 4,855,127 | Constant value calculation | <p>I have an hpp file with following code:</p>
<pre><code>const float PixelsPerMeter = ConfigManager->Get<float>("koef", 100.0f);
inline const float Meters2Pixels(float meters) { return meters * PixelsPerMeter; }
inline const float Pixels2Meters(float pixels) { return pixels / PixelsPerMeter; }
const float ... | c++ | [6] |
197,977 | 197,978 | How do I get first element rather than using [0] in jquery | <p>I'm new to JQuery, appologies if this is a silly question.
When I use it find an element using the id, I know theres always one match and in order to access it I would use the index [0]. Is there a better way of doing this?
For e.g.</p>
<pre><code>var gridHeader = $("#grid_GridHeader")[0];
</code></pre>
| jquery | [5] |
2,747,104 | 2,747,105 | PHP - get everything after the #? | <p>I've got a flash file (that I can't edit) that is making erroneous requests to a file ending in a #. So the link where the file is being accessed is /files/flash/, so the requests are being made for /files/flash/#</p>
<p>Is there any way for me to detect the # in the link so that I can have those pages not load?</p... | php | [2] |
2,761,722 | 2,761,723 | buttons and levels | <p>I have a class where I add some buttons in code. I am adding this button click on my second button. I want to adding this buttons one above second. I mean: I cick on the button and first button is adding to layout, I click second time and this second button add but he must be uder this first. Under I mean that first... | android | [4] |
3,323,410 | 3,323,411 | How to get a object from another module? | <p>A.py</p>
<pre><code># logging object
logger = ""
def log():
"""
a log handle
"""
global logger, doc_log
import logging.handlers
logger = logging.getLogger("autons_log")
logger.setLevel(logging.DEBUG)
MAX_SIZE = 800 * 1024 * 1024
LOG_PATH = d... | python | [7] |
3,250,966 | 3,250,967 | System.ServiceModel disappear | <p>After installing .Net Framework 4.0 it seems like I cannot find System.ServiceModel in .Net tab through "Add Reference..." by using VS2008. But you can see it and add it in VS2010 version.</p>
<p>Can someone tell me why, and how I can have both version, and still can use it in VS2008?</p>
<p>Thanks</p>
| c# | [0] |
4,319,995 | 4,319,996 | How to get mp3 file details from remote folder file using php? | <p>I want to know how to get mp3 file details like artist, title, album etc.</p>
| php | [2] |
2,143,530 | 2,143,531 | Limit number of results for glob directory/folder listing | <p>How would I go about limiting the number of directory results/pdfs to, say 8, in the following code?</p>
<pre><code>$counter = 0;
foreach (glob("/directory/*.pdf") as $path) { //configure path
$docs[filectime($path)] = $path;
}
krsort($docs); // sort by key (timestamp)
foreach ($docs as $timest... | php | [2] |
5,639,073 | 5,639,074 | How do I access an object property with a string variable that has the name of that property? | <p>How do I do this in C#?</p>
<pre><code>using System;
namespace TestProperties28373
{
class Program
{
static void Main(string[] args)
{
Customer customer = new Customer { FirstName = "Jim", LastName = "Smith", Age = 34};
Console.WriteLine(customer.FirstName);
... | c# | [0] |
4,605,369 | 4,605,370 | Event handling not working in Python 3.3.0? | <p>I tried running the chapter 15 programs that came with Object-Oriented Programming in Python by Goldwasser & Letscher. Chapter 15 deals with event handling. For some reason, it won't work. It always crashes the program when I run it. My Python version is 3.3.0 and the specific code is the following:</p>
<pre><c... | python | [7] |
5,145,637 | 5,145,638 | calling resource menu into other activity | <p>Please help me how can i call a menu resource in other activity .
Here is code of main activity </p>
<pre><code>public class ControlMenu extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceS... | android | [4] |
1,774,383 | 1,774,384 | Remove single quote character escaping | <p>I have a string like this</p>
<pre><code>This is\' it
</code></pre>
<p>I would like it to look like this</p>
<pre><code>This is' it
</code></pre>
<p>Nothing I do seems to work</p>
<pre><code>> "This is\' it".replace(/\\'/,"'");
'This is\' it'
> "This is\' it".replace("'",/\\'/);
'This is/\\\\\'/ it'
> ... | javascript | [3] |
1,910,239 | 1,910,240 | How to get data using SAX parsing in android | <p>Can any body show how to get the data from xml document using SAX parsing for below XML example.</p>
<pre><code><root>
<parent>
<child1>xyz</child1>
<child2>abc</child2>
</parent>
</root>
</code></pre>
<p>for this how can we write the sax pa... | android | [4] |
4,898,595 | 4,898,596 | Using jQuery to get a select box value with the selectedindex | <p>Is it possible with jQuery to get the value of a select box item based on the selected index? I ask because what I actually need is the value of the items before and after the current selectedindex for next/previous buttons. This is the code I tried but it did not work.</p>
<pre><code>var my_value = $('#my_element... | jquery | [5] |
2,371,515 | 2,371,516 | Display AlertDialog as system overlay window from Service | <p>I have issue with displaying AlertDialog from Service. I am able to display custom layout window using Toast or using WindowManager(TYPE_SYSTEM_ALERT or TYPE_SYSTEM_OVERLAY). But, I do not want to use custom layout, I prefer to use nice AlertDialog GUI directly.</p>
<p>Scenario:</p>
<ul>
<li>Running Service. No ac... | android | [4] |
1,065,063 | 1,065,064 | How to set the Password Hint when setting Windows Account Password using C# | <p>I have .NET application, that is intended to set password or change password for existing Windows User Account. I have done the coding to Set/Change password and it works fine. My problem is that , while we Set new password for User Account, we need to create Password Hint, but is there any way to save Password Hint... | c# | [0] |
2,502,468 | 2,502,469 | python problems with integer comparision | <p>I'm using a function in a card game, to check the value of each card, and see if it is higher than the last card played.</p>
<pre><code>def Valid(card):
prev=pile[len(pile)-1]
cardValue=0
prevValue=0
if card[0]=="J":
cardValue=11
elif card[0]=="Q":
cardValue=12
elif card[0]=="K":
cardValue=13
elif card[... | python | [7] |
627,105 | 627,106 | How to assign utube video url to android media player | <p>I want that when i will pass the <strong>utube url</strong> to media player it will automatically load the video and play in it.
Example: <a href="http://www.youtube.com/watch?v=WAG8e_53le4" rel="nofollow">http://www.youtube.com/watch?v=WAG8e_53le4</a>
This type of url i want to play in android media player</p>
| android | [4] |
274,941 | 274,942 | Beginning Python printing out standard deviation | <p>I'm trying to figure out what's wrong with my code. Could anyone fix it?</p>
<pre><code>def main():
fname = input("Enter filename:")
infile = open(fname, "r")
SD()
def SD():
b= []
a = 5.0
r = len(b)
for n in range(r-1):
b.append((r[n] -a)**2)
m = (float(b)/r)**0.5
print("The standard d... | python | [7] |
2,753,974 | 2,753,975 | How to check alertview values | <p>This is my code :</p>
<pre><code>self.myAlert = [[[UIAlertView alloc] initWithTitle:@"MNB" message:@"R u want to delete" delegate:self cancelButtonTitle:@"OK",nil otherButtonTitles:@"Cancel",nil] autorelease];
[myAlert show];
</code></pre>
<p>Here I would like to process if OK button click and also for cancel ... | iphone | [8] |
5,093,264 | 5,093,265 | How do I convert a string to an array name (php)? | <p>I have 4 arrays, each with a question and answer. I want to select a random question/answer array. Here is my code:</p>
<pre><code><?php
$query_1 = array("What is two plus three?", "5");
$query_2 = array("What is four plus two?", "6");
$query_3 = array("What is seven plus one?", "8");
$query_4 = array("What is s... | php | [2] |
2,100,448 | 2,100,449 | Statistical funcation in C# | <p>I am doing some work in C# to calculate the binomial probability density function of some variables. Just wandering is there any package I can use?</p>
<p>Thanks in advance</p>
| c# | [0] |
983,051 | 983,052 | A variable references bug? | <p>I have a cannot understand problem, the following code why is print Array ( [a] => 1 [b] => 2 [c] => 3 [d] => ) , I didn't change the $info variable but why it changed?</p>
<pre><code><?php
function ifSetOr(&$a, $b = null) {
return isset($a) ? $a : $b;
}
$info = array('a' => 1, 'b' => 2, 'c' =>... | php | [2] |
2,803,215 | 2,803,216 | Why is the second variable passed as a reference and const | <p>Why isn't <code>first</code> passed as a reference and const as well?</p>
<pre><code>template <typename Iterator>
int distance(Iterator first, const Iterator & last) {
int count;
for ( ; first != last; first++)
count++;
return count;
}
</code></pre>
| c++ | [6] |
4,362,016 | 4,362,017 | how can i save a text file without typing ".txt" at the end? | <p>My Program (c++):</p>
<pre><code>#include <iostream>
#include <fstream>
#include <cstdlib>
using namespace std;
float x, y, z;
char d[20];
int main()
{
cin.getline >>d;
x=111;
y=222;
z=333;
ofstream meuarquivo;
meuarquivo.open (d".txt");
meuarquivo << x... | c++ | [6] |
5,366,574 | 5,366,575 | Using jQuery to toggle DIV in next row | <p>I'm trying to toggle the build_files_toggle classed div in the next row when you click the
build_files_toggld classed link above it. I can get the next row to collapse with $(this).parent().parent().next().slideToggle(30), but when I add the '.build_files_toggle' it doesn't work... and it's killing me. I even trie... | jquery | [5] |
3,169,662 | 3,169,663 | Java Class<T> static method forName() IncompatibleClassChangeError | <pre><code>private static Importable getRightInstance(String s) throws Exception {
Class<? extends Importable> c = Class.forName(s).asSubclass(Importable.class);
Importable i = c.newInstance();
return i;
}
</code></pre>
<p>which i can also write</p>
<pre><code>private static Importable getRightInstance... | java | [1] |
2,440,479 | 2,440,480 | activate events onclick of browser's back button in jquery | <p>Im looking for a simple cross-browser plugin or method that can help me do this :</p>
<pre><code>$('#clear_window').click(function(){
$('#window').fadeOut(50);
var activeTab = $("ul.tabs li.active").find("a").attr("href");
$(activeTab).fadeIn(50);
});
</code></pre>
<p>but on the click of the br... | jquery | [5] |
4,997,843 | 4,997,844 | HTML Format in .Net TextBox | <p>How I can display HTML formatted text in .Net TextBox?</p>
| asp.net | [9] |
2,979,478 | 2,979,479 | Changing the value of a RadioButtonList using jQuery | <p>I've searched around and found multiple answers for this, but none of them have worked for me.
I'm using a RadioButtonList inside a repeater control. Here is my jQuery function.</p>
<pre><code>$("[name$='$PlanSelectionRbtnLst']").click(function () {
alert($(this).val()); //this works
$("[name$='$PlanSelect... | jquery | [5] |
3,266,057 | 3,266,058 | upload image out side site root directory | <p>I want to upload image out side site root directory using php? can any one tell me that how I give path of directory out side root for image upload ????</p>
| php | [2] |
620,620 | 620,621 | C# naming conventions | <p>Regarding C# naming, if I was writing a library related to the Windows API is there any strong convention toward either WindowsApi or WindowsAPI or is it just personal preference?</p>
| c# | [0] |
2,844,499 | 2,844,500 | Add timeout in receiving message - socket | <p>I have method for sending message over socket and receiving answer. How to put timer, if there is no answer for example 1 sec to put information timeout ?</p>
<pre><code>public boolean SendForceMessage(final ForceMessageTCP message) {
boolean result = true;
System.out.println("******************SendForceMes... | java | [1] |
336,597 | 336,598 | jQuery - Change color on click | <p>I'm looking at some jQuery because I want to create a div that changes color when you click it. </p>
<p>And I've done that with: </p>
<pre><code>$(function() {
$('.star').click(function(){
$(this).css('background', 'yellow');
});
});
</code></pre>
<p>And it works perfectly!
But I want it to remove the b... | jquery | [5] |
2,063,915 | 2,063,916 | How to show the default alert message in JQGrid while implementing custom buttons? | <p>In form editing in jqgrid if we do not select any row for editing an message box show automatically asking to select any row for editing.</p>
<p>I want to show the same message window while doing some custom fucntions by implementing the custom button in my jqgrid?</p>
<p>Is there any way to call any method or imp... | jquery | [5] |
5,614,962 | 5,614,963 | Final keyword in for statement | <p>I was reading some code found on the web and fell on these lines (java):</p>
<pre><code>private List<String> values;
[...]
for (final String str : values) {
length += context.strlen(str);
}
</code></pre>
<p>What is the advantage of declaring a variable final in a for loop ? I thought the variable specif... | java | [1] |
2,217,724 | 2,217,725 | Summing columns of a txt file in java | <p>I have a text file that reads:</p>
<p>1 2 3 4 5</p>
<p>6 7 8 9 1</p>
<p>8 3 9 7 1</p>
<p>9 3 4 8 2</p>
<p>8 7 1 6 5</p>
<p>where each number is separated by a tab.</p>
<p>My question is, is there a simple way to sum the columns of numbers using java? I want it to sum 1+6+8+9+8, 2+7+3+3+7, etc. I am reading th... | java | [1] |
1,696,063 | 1,696,064 | How to associate each item in ListView with id from database | <p>I have a <code>ListView</code> object with <code>Adapter</code> extended from <code>CursorAdapter</code>. There are only <code>(ListView l, View v, int position, long id)</code> parameters in <code>onListItemClick()</code> method. I need to query my database with <code>_id</code> for currently chosen list's <code>it... | android | [4] |
3,694,595 | 3,694,596 | How to determine if end of URL matches "/my-phrase" | <p>I need to execute conditional code if the last part of the URL string is /my-phrase</p>
<p>How can I parse the URL for a match after the last "/" character in the URL string?</p>
<pre><code>if(end of URL is "/my-phrase")
{ //dosomething;}
else
{//something else;}
</code></pre>
| php | [2] |
5,603,640 | 5,603,641 | possible to extract functions from a javascript file? | <p>Not sure if this is the right approach of if this even a "good" question, but I'm loading a javscript as part of a plugin style architecture and I have the following problem:</p>
<p>If a particular node has a reference to a plugin, I want to load that plugin per the url provided via the json description of that plu... | javascript | [3] |
2,777,822 | 2,777,823 | Android Eclipse: Class File Editor - Source not found | <p>i am working on Android project using Eclipse </p>
<pre><code>Eclipse IDE for Java Developers
Version: Indigo Service Release 1
Build id: 20110916-0149
</code></pre>
<p>so when i try to debug the code after few step over (f6) the code i get this windows and after that it does not do anything... what should i do t... | android | [4] |
2,664,910 | 2,664,911 | OnItemClickListener With OnItemLongClickListener | <p>how can i use both OnItemClickListener and OnItemLongClickListener or just disable longclick on a list view?
i've override OnItemLongClickListener and when i return true on onItemLongClick the longclick will disable but OnItemClickListener wont respond anymore.</p>
<pre><code>DailyReportList.setOnItemLongClickList... | android | [4] |
461,523 | 461,524 | Copy value from one textbox to another using submit button | <p>I know this can be accomplished by Javascript, and I am learning so please tell me, when I click an update button I want the text from a textbox to be copied into another one.</p>
| javascript | [3] |
4,141,910 | 4,141,911 | Server Side Push In PHP (Commet) | <p>I have banged my head loads of time but couldn't find any good commet example.
Me and my friend are developing a small chat software in PHP, I need the commet thing urgently please guys if anybody can explain that in simple words. I will be grateful. Thank you</p>
| php | [2] |
2,139,320 | 2,139,321 | Apply BROWSABLE intent category to a broadcast receiver | <p>I looked up the following intent filter for an activity in <a href="https://github.com/commonsguy/cw-advandroid/blob/master/Introspection/URLHandler/AndroidManifest.xml" rel="nofollow">commonsware samples</a></p>
<pre><code><intent-filter>
<action android:name="android.intent.action.VIEW" />
&l... | android | [4] |
5,474,675 | 5,474,676 | how to parse the array of json string using gson in android | <pre><code>{
"serviceType":"IMAGE_ANDROID",
"parameters":[
[
{
"itemId":"it003376",
"itemNameInEng":"8th Chennai International Film Festival Photos",
"itemSmallImage":"http://122.183.217.134:8080/sivajitv/photos/20101216001017.jpg",
"count":"110"
... | android | [4] |
5,487,363 | 5,487,364 | How would I represent the following menu structure in JavaScript? | <pre><code>Soccer
Australia
Melbourne
Sydney
New Zealand
Christchurch
Tennis
United Kingdom
Kensington
London
Manchester
</code></pre>
<p>I have tried multidimensional arrays however it becomes awkward because of the different lengths. I have also experimented with key/value pairs however... | javascript | [3] |
327,634 | 327,635 | Best way of capturing user email address on website | <p>I currently have a form that on a coming soon page on my web server that I need to capture entered email addresses and send it to my email address e.g. <em>example@hotmail.com</em>. </p>
<p>What would be the best way of accomplishing this using PHP?</p>
<pre><code><form method="post">
<input class="email... | php | [2] |
4,140,584 | 4,140,585 | How to access specific object in an array of DOM objects in jQuery? | <p>Ok so I wanna ask a simple jQuery question about arrays of objects. </p>
<p>If I get all elements (for example all paragraphs) from an html page and store them in an array how can I access one of them to do stuff with it?</p>
<p>For example let's say I have this html:</p>
<pre><code><!DOCTYPE html>
<html... | jquery | [5] |
855,202 | 855,203 | file.exists() returns false on Android | <pre><code> String filename = "file:///android_asset/Help_ja.html";
File f = new File(filename);
if (!f.exists()) filename="file:///android_asset/Help_us.html";
webView.loadUrl(filename);
</code></pre>
<p>i load an HTML out of the assests folder, both files are there, when i tried this code:</p>
<pre><... | android | [4] |
558,957 | 558,958 | How to deallocate pointer-to-pointer-types that point to pointer-types in heap that point to other objects in heap? | <p>So I decided to have some pointer fun tonight :)</p>
<pre><code>CursorHBList::CursorHBList(UINT iNumHB)
:m_ppCursorHB(nullptr)
,m_iNumHB(iNumHB)
{
if (iNumHB != 0) {
m_ppCursorHB = new CursorHitBox* [iNumHB];
}
}
</code></pre>
<p>so you can see, I've now dynamically allocated pointer-typ... | c++ | [6] |
5,364,069 | 5,364,070 | how to convert array of live dom elements into live NodeList? | <p>For example I have this array object: <code>Object [object HTMLDivElement],[object HTMLDivElement],[object HTMLDivElement],[object HTMLDivElement]</code> and I need to change it to a kind of value that getElementsByTagName method returns, but without moving the nodes out of node tree into my new node list that is a ... | javascript | [3] |
5,489,974 | 5,489,975 | Don't allow changing document.domain value | <p>I need to deny changing <code>document.domain</code>. Say, if I run this code at <em>foo.boo.com</em></p>
<pre><code>Object.defineProperty(document, 'domain', {
get: function () {
return 'foo.boo.com';
}
});
</code></pre>
<p>and then will it be possible to set <code>document.domain</code> to <em>b... | javascript | [3] |
937,110 | 937,111 | operator new with negative size | <p>In C++11 if we try to allocate array with negative size using global operator new, it will throw std::bad_array_new_length, but what about C++98 / C++03? Is it UB or will throw std::bad_alloc?</p>
<pre><code>int main()
{
int* ptr = new int[-1];
}
</code></pre>
| c++ | [6] |
3,880,599 | 3,880,600 | Problems with onResume() | <p>I am developing the typical RSS application. In the method onCreate define the layout to paint the screen and in the method onResume do a query to a URL to extract the data. Should paint the screen and then check the URL, right? because I do not paint the screen until the request to the URL has been answered.</p>
<... | android | [4] |
206,020 | 206,021 | stop to go on onPostExecute() if parsing exception onpreexecute() occurs | <p>am using asynchronous task for hitting the web service url and retrieve the result from server but some time in onPreExecute() method if parsing exception occurs i handle it on catch() method,now i want to Halt the processing next means execution not go to OnpostExecute() method ,so how to stop execution process for... | android | [4] |
2,913,339 | 2,913,340 | How would i figure out the price difference efficiently with PHP? | <p>I have this <a href="http://posnation.com/shop_pos/step2/Bakery" rel="nofollow">page</a> and if you scroll to the second "Customize" in the middle of the page and you click you will see my print_r() for the products and the thing i am trying to do is figure out the difference in price between the selected and the ot... | php | [2] |
5,388,523 | 5,388,524 | Android New layout wants to replace the old | <p>I'm new to android. When I try to create a new (landscape) layout in <code>layout-land folder</code>, it says:</p>
<blockquote>
<p>do you want to OVERWRITE the file res/layout/main.xml</p>
</blockquote>
<p>Why does it want to REPLACE another layout? In eclipse, I right click the layout-land folder and choose New... | android | [4] |
5,952,512 | 5,952,513 | Animation : multiple/parallel transformations | <p>The animation class can achieve animations by transform graphs. The example:</p>
<pre><code> Animation myAnimation_Translate;
myAnimation_Translate=new TranslateAnimation(30.0f, -80.0f, 30.0f, 300.0f);
startAnimation(myAnimation_Translate);
</code></pre>
<p>But, how do I achieve multiply transformation at sam... | android | [4] |
4,713,262 | 4,713,263 | Extending Linenarlayout height | <p>I have problem in displaying content in Linearlayout,how to extend layout height.when large number layout used for displaying content..</p>
| android | [4] |
2,653,940 | 2,653,941 | date format yyyy-MM-ddTHH:mm:ssZ | <p>I assume this should be pretty simple, but could not get it :(.
In this format Z is time zone.
<br/> T is long time pattern
<br/> How could I get a date in this format except by using </p>
<pre><code>DateTime dt = DateTime.Now;
Console.WriteLine(dt.ToString("yyyy-MM-ddTHH:mm:ssZ"));
</code></pre>
<p>in C#</p>
| c# | [0] |
3,620,362 | 3,620,363 | DateTime getting todays Month in if statement | <p>I want to do an if statement if month == january for example load something
else if month == april load something else.
Can someone help please
Thanks</p>
| c# | [0] |
2,093,535 | 2,093,536 | I need some pointer tasks/challenges | <p>I struggle with learning. I have to practice, and keep practicing, in order for something to stick. I don't do much C++ (once every month maybe) so I am constantly going over the same stuff.</p>
<p>I need some tasks to do so I can really understand pointers and their uses in the real world, rather than reading scen... | c++ | [6] |
3,320,705 | 3,320,706 | Printing out each array element | <p>I have an array and I use <code>print_r</code> and this what happen:</p>
<pre><code>Array
(
[141] => 1
[171] => 3
[156] => 2
[241] => 1
[271] => 1
[256] => 1
[341] => 1
[371] => 1
[356] => 1
[441] => 1
[471] => 1
)
</code></pre>
<p>How ca... | php | [2] |
2,070,848 | 2,070,849 | C++ primitive for Handle | <p>I am implementing an opaque data structure that is internally an array of opaque data structures. Let's call them records. There will be multiple queries to different fields of a record each with the same key. I have a list of APIs of this form:</p>
<pre><code>QueryFieldX(KEY key, FieldX& Data)
</code></pre>
<... | c++ | [6] |
3,585,295 | 3,585,296 | Python function | <p>Here's my function: I need it to return False when it is not an integer or when it is not a number...now it still returns True both instances.</p>
<pre><code>def isInt(x):
if str(x):
print "True"
else:
print "False"
</code></pre>
| python | [7] |
1,081,563 | 1,081,564 | How to Increment the cursor values? | <p>My database have 12 values i use the table layout with list view but in the second row its again started to show second value from the database </p>
<pre><code> class NoteHolder {
private Button b1 = null;
private Button b2 = null;
private Button b3 = null;
NoteHolder(View row) {
b1 = (But... | android | [4] |
4,331,972 | 4,331,973 | How to set Ringtone from raw folder resource | <p>I see multiple threads about doing this but they all differ in their approaches. Can someone tell me the definitive way to take a raw resource (i.e. "song.mp3") and set it as the ringtone on a phone? I know it goes something like:
1. Push the song to external storage.
2. Set ringtone using the absolute path of wher... | android | [4] |
3,529,078 | 3,529,079 | How to access object | <p>I want alert object <code>key</code> name and its <code>value</code>. But it is not working.</p>
<pre><code>$(function() {
var james = {first: '1,2,3', second: '4,5,6' }
$('a').click(function(){
alert(james[first])
})
})
</code></pre>
| javascript | [3] |
483,487 | 483,488 | Loading user controls dynamically | <p>I have an aspx page and therein I have a dropdown control. Depending on the selected value, I need to load the user control that many times in the page. E.g..if first item is selected, I need to query DB and get how many subsections are their for this value and then load the user control that many times. It is work... | asp.net | [9] |
2,777,640 | 2,777,641 | How to split WriteLine over multiple lines? | <p>This is an example of the syntax I tried and don't want to use <code>\n</code>.</p>
<pre><code>Console.WriteLine("x"
"x"
"x"
"x"
"x");
</code></pre>
<p>One call should yield:</p>
<pre>
x
x
x
x
x
</pre>
| c# | [0] |
4,938,145 | 4,938,146 | How I can use a handler to change the ImageView's picture after 2 sec, and 5? | <p>I have an ImageView, what shows one picture . I tried to use a thread, but it doesn't change the picture. Then I tried a handler, but it doesn't treat the sleep(int) method, so I can't increase the time, what elapsed. How can I make it? Can you write an example please?</p>
<p>Here is my original code: </p>
<pre><c... | android | [4] |
1,555,595 | 1,555,596 | Python string function to strip the last comma | <p>Input</p>
<pre><code>str = 'test1,test2,test3,'
</code></pre>
<p>Ouput </p>
<pre><code>str = 'test1,test2,test3'
</code></pre>
<p>Requirement to strip the last occurence of ','</p>
| python | [7] |
4,194,190 | 4,194,191 | Abstract getter with concrete setter in C# | <p>I'm trying to write an abstract base class for read-only collections which implement <code>IList</code>. Such a base class should implement the set-indexer to throw a <code>NotSupportedException</code>, but leave the get-indexer as abstract. Does C# allow such a situation? Here's what I have so far:</p>
<pre><code>... | c# | [0] |
3,692,564 | 3,692,565 | How to enforce that classes's instances only be allocated on the stack, but not on the heap | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/124856/how-do-i-prevent-a-class-from-being-allocated-via-the-new-operator-id-like-t">How do I prevent a class from being allocated via the 'new' operator? (I'd like to ensure my RAII class is always allo... | c++ | [6] |
2,076,859 | 2,076,860 | push notification for RSS Feed? | <p>I want to send push notification to my user,when will i update some information in my RSS Feed,Now i am using third party tool like urbanairship,but did not support RSS Feed,Have any third party tool for notification,please give some idea about that.</p>
<p>Thanks,
John</p>
| android | [4] |
2,991,896 | 2,991,897 | TypeConverter/InstanceDescriptor failing when ASP.NET project with my user control is compiled/run | <p>I am having problem with TypeConverter/InstanceDescriptor.</p>
<p>I have a class called MyClass</p>
<pre><code>public class MyClass
{
private ICollection<Color> _colors;
public MyClass(ICollection<Color> colors)
{
_colors = colors;
}
public MyClass(string colors)
{
if... | c# | [0] |
3,437,483 | 3,437,484 | Convert input to a string in Python | <p>I want to wrap the colour input in quotes within python:</p>
<pre><code>def main():
colour = input("please enter a colour")
</code></pre>
<p>So if I enter red into the input box it automatically makes it "red"</p>
<p>I'm not sure how to do this, would it be something along the lines of:</p>
<pre><code>def ma... | python | [7] |
1,970,465 | 1,970,466 | Code for parsing an html file | <p>I want a java code for parsing a table from a html page.</p>
<p>Can someone help me on this?</p>
| java | [1] |
2,436,699 | 2,436,700 | Passing optional number of arguments into another function | <p>Say I have a function called <code>addUp</code> which takes any number of decimal arguments and returns the result of them all added together.</p>
<p>If I have the following function:</p>
<pre><code>function myTest(){
$args = func_get_args();
return addUp($args);
}
</code></pre>
<p>If I call <code>myTest(... | php | [2] |
3,998,031 | 3,998,032 | Signed INT Conversion of MSB ->LSB and LSB->MSB in C++ | <p>I checked out the SWAR algorithm (<strong>S</strong>IMD <strong>W</strong>ithin <strong>A</strong> <strong>R</strong>egister) for reversing bit order of <code>unsigned int</code>s. Is there something similar for <code>signed int</code>?</p>
| c++ | [6] |
2,629,186 | 2,629,187 | Encrypt query string | <p>Iam trying to send EmployeeId in another page using query string but i want to send it in encrypted format.If anyone knows the answer pls send it soon.Any help is a great help.</p>
<p>Thanks and Regards
Sanjay Sharma </p>
| asp.net | [9] |
2,939,877 | 2,939,878 | Problem with SimpleCursorAdapter | <p>I'm trying to create a list activity that uses a SimpleCursorAdapter, but it just won't work. I know I'm getting the cursor correctly because when I have it print out to text all the values are there and I know there's nothing wrong with the SimpleCursorAdapter class because when I used it with the Image Content Pro... | android | [4] |
5,224,962 | 5,224,963 | Itunes conversion to HTC Android Thunderbolt - how to achieve | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://superuser.com/questions/47137/sync-android-with-itunes">Sync Android with iTunes</a> </p>
</blockquote>
<p>Just purchased HTC Thunderbolt: is there a program through Google that I can convert and manage my Tunes without using Itunes?</p>
| android | [4] |
5,034,252 | 5,034,253 | What is the difference between ref and out | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/135234/difference-between-ref-and-out-parameters-in-net">Difference between ref and out parameters in .NET</a> </p>
</blockquote>
<p>I know that ref is used for passing the changed value of the variable outside ... | c# | [0] |
5,119,650 | 5,119,651 | Get Rid of Duplicate Information in PHP | <p>Ok, so I've got a bit of a problem.</p>
<p>I am scraping a site, and it will scrape two address boxes - each of which may have minor differences.</p>
<p>One of the addresses is like this:</p>
<pre><code>ONE MICROSOFT WAY
REDMOND WA 98052-6399
425-882-8080
</code></pre>
<p>And the other is like this:</p>
<pre><c... | php | [2] |
349,781 | 349,782 | cursor.rowcount gives 'int' object is not callable error | <p>i selected values from sqlite3 database and print the count of cursor.then it gives an error " 'int' object is not callable"</p>
<pre><code> strq="select * from tblsample1"
self.con = sqlite3.connect('mydb.sqlite')
self.cur = self.con.cursor()
self.cur.execute(strq)
print(self.cur.r... | python | [7] |
2,161,844 | 2,161,845 | Open file from server and send to browser | <p>Hey,
In my asp.net application I create pdf file and save it in App_Data folder on server. Next I want to open this file that user can print it.</p>
<p>How to open this file in browser ? Send it in http header etc ? Someone have some examples?</p>
<p>Please help ;)</p>
| asp.net | [9] |
5,534,920 | 5,534,921 | Is there a way to call a function every time a jquery basic function is called? | <p>I would like everytime I call a jquery load function:</p>
<pre><code>$("#div").load("file.php");
</code></pre>
<p>To then call a separate function:</p>
<pre><code>function secondFunction() {
//do stuff
}
</code></pre>
| jquery | [5] |
3,750,130 | 3,750,131 | Basic questions about RAII, STL pop, and PIMPL | <p>While reading proggit today, I came upon this comment in a <a href="http://www.reddit.com/r/programming/comments/b9iiv/for_all_you_haters_of_c_take_a_look_at_the/" rel="nofollow">post</a> about how the top places in the Google Ai challenge were taken by C++. User <code>reventlov</code> declares</p>
<blockquote>
<... | c++ | [6] |
5,776,321 | 5,776,322 | how to change the themes and icons of Android 2.2 OS? | <p>I am Optimizing the Android 2.2 OS to make it in such a way that it can be ported to the tablet. Can anyone suggest me how to change the themes and icons of Android 2.2 OS.</p>
| android | [4] |
2,518,361 | 2,518,362 | Why does file_get_contents() return the error "Filename cannot be empty"? | <p>I'm pretty much a complete newbie to PHP. My background is C/C++ and C#. I'm trying to object orient-ify some simple PHP code, but I'm doing something wrong.</p>
<p>Class code:</p>
<pre><code>class ConnectionString
{
public $String = "";
public $HostName = "";
public $UserName = "";
public $Password = "";
... | php | [2] |
848,093 | 848,094 | how to get over security in asp.net | <p>If you have a code, log in information of which is encrypted, how to decrypt using asp.net ?</p>
<p>Cryptography class?</p>
<p>Any other?</p>
| asp.net | [9] |
2,593,492 | 2,593,493 | How to replace decorView in Android? | <p>As it knows, we can get Android top-hierarhy <code>Views</code> via <code>Activity.getWindow().getDecorView()</code> and <code>Activity.findViewById(android.R.id.content)</code>.</p>
<p>Is it possible to replace the standard set of custom Views?</p>
| android | [4] |
2,039,347 | 2,039,348 | Need Help about how to use Google Maps API | <p>Some one had about document , curriculum about Google Maps API could share me because i prepare do de project about Google Maps API for my last exam . I know i can find guide about google maps api on developer.android.com but i dont understand </p>
<p>Some one had document , curriculum about Google Maps API could... | android | [4] |
5,641,289 | 5,641,290 | jquery error undefined function | <p>I created this fiddle from code found on Stack, but it is firing an error. Can you help please.</p>
<p>My Fiddle: <a href="http://jsfiddle.net/422steve/DVNGc/" rel="nofollow">http://jsfiddle.net/422steve/DVNGc/</a></p>
<p>Original anser : <a href="http://stackoverflow.com/a/13000179/501173">http://stackoverflow.co... | jquery | [5] |
3,657,453 | 3,657,454 | reference to call ambiguous in java | <pre><code>class A {
public void printFirst(int... va) throws IOException{
System.out.print("A");
}
public static void main(String args[]) {
try {
new B().printFirst(2);
} catch (Exception ex) {
}
}
}
class B extends A {
//@Override
public void pr... | java | [1] |
1,551,796 | 1,551,797 | Android Mobile Calls | <p>Whether It is possible to set User busy when call comes from particular number in Android mobiles 2.1 version</p>
| android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.