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,732,710 | 1,732,711 | Parsing response from Github | <p>How do I make string like <code>"payload={'key':'value'...}"</code> to become a variable <code>payload</code> with value assigned to it <code>"{'key':'value'...}"</code>? Thanks.</p>
| python | [7] |
5,815,724 | 5,815,725 | How can i draw a compass like iphone 3gs in ios4? | <p>I'm trying to make a view like compass in iphone 3gs or iphone4. Do you know somebody how can I start?, I can't find too much information about this issue...I only want to draw an arrow always following the north.
I'm using ios 4.0</p>
<p>Thanks in advance</p>
| iphone | [8] |
5,735,949 | 5,735,950 | I'm new in programming with C# | <p>How can I start with C#</p>
| c# | [0] |
2,636,547 | 2,636,548 | C#: How to detect arguments typed into console application? | <p>How would I go upon detecting input for a console application in C#?</p>
<p>Let's say for example I want the console application to start up by writing:
Welcome To Food Hut
(cursor to type stuff here after the first line)</p>
<p>I would want the console application to detect two commands:</p>
<p>1: /help - which ... | c# | [0] |
1,664,121 | 1,664,122 | Add row in list view in android | <p>I have a list view and i want to add 4 rows in the list view and each row contains progress bar and start button. For this purpose i have created another layout for row which contains progress bar and button.
Now in my main activity i am writing the code but listview is not displaying.</p>
<pre><code>ArrayAdapter a... | android | [4] |
4,667,621 | 4,667,622 | finding the td with 0 value | <p>i have a table like this in my html page</p>
<pre><code><table id="mytable">
<tr id="classified">
<td>1</td>
</tr>
<tr id="unclassified">
<td>0</td>
</tr>
</table>
</code></pre>
<p>so, on the document.ready i want to check which column... | jquery | [5] |
5,833,529 | 5,833,530 | What are the uses of Method Handles in Java7? | <p>I see there is a new thing added up in Java7 named method handlers. For what scenario they are useful for?</p>
| java | [1] |
5,028,755 | 5,028,756 | How can I show file in sdcard to user? | <p>I want to show user my apk file using intents, here is the code:</p>
<pre><code> SDCardRoot = Environment.getExternalStorageDirectory();
File file = new File(SDCardRoot,fileName);
if (file.exists()) {
Uri path = Uri.fromFile(file);
Intent intent = new
Intent(Intent.ACTION_VIEW,path); ... | android | [4] |
2,626,489 | 2,626,490 | Android make call activity to check prepaid phone balance | <p>I would like to make an activity where i can call a certain numer to check my prepaid phone balance.
In my provider its for example *555# then i will get a response like for example "Your remaining phone credit is 5 USD". I would like to use this data (5 USD) to save in the database.</p>
<p>I am just a beginner, d... | android | [4] |
3,416,225 | 3,416,226 | setBackgroundDrawable on multiple items not working properly | <p>I have a gallery which has 7 + linear layouts in each view, and I set the background drawable for 7 of these layouts dynamically, depending on data I pull from out db, the position of the gallery, etc. </p>
<p>I have a for loop that launches 7 threads to fetch data and fetch the information needed for the drawable... | android | [4] |
4,088,759 | 4,088,760 | questions on 0xff | <p>I am working on a C++ code. Not very sure what the code below is trying to do. Would like someone's help on it.</p>
<pre><code>int pval = t_gamma[depth[i]];
int lb = pval & 0xff;
switch (pval>>8) {
case 0:
depth_mid[3*i+0] = 255;
depth_mid[3*i+1]... | c++ | [6] |
4,560,241 | 4,560,242 | jQuery function in .attr is called only once for all matching tags | <p>I'm teaching myself jQuery by writing the game of memory (where you turn tiles over two at a time, looking for matches).</p>
<p>I have 16 img tags, each representing one of the tile faces. I have an array of 16 jpg file names. I want to set the src attribute of each img tag to a random selection from my array. T... | jquery | [5] |
123,826 | 123,827 | Javascript Combining Variables inside an Object | <p>Okay this seems really simple but I just can't get it to work. I need to combine variables in an obect. Something like this:</p>
<pre><code>var i = {
a: 1,
b: " sheep",
c: this.a + this.b
}
</code></pre>
<p>So that later on I can do something like:</p>
<pre><code>i.a = 3;
console.log(i.c);
</code></pr... | javascript | [3] |
644,231 | 644,232 | how to find colour depth and locale for iphone through code? | <p>how to find colour depth and locale for iphone through code?</p>
| iphone | [8] |
2,904,956 | 2,904,957 | Take (n) characters from a string | <p>I have a string in java, of uncertain length, and I need to take the first 3 and last 3 characters and put them into new strings. Is there a simple way to do this?</p>
| java | [1] |
3,862,275 | 3,862,276 | How to implement php interface | <p>When I visit </p>
<p><code>http://localhost/oopphp5/Chapter2/interfacetest.php</code></p>
<p>the following give an error and I would like to know why.</p>
<p>error</p>
<blockquote>
<p>Fatal error: Class 'MySQLDriver' not found in
/Users/teacher/Sites/oopphp5/Chapter2/interfacetest.php on line 6</p>
</blo... | php | [2] |
602,386 | 602,387 | django-tagging install fails | <p>i am getting this error while installing django-tagging,</p>
<pre><code>krisdigitx-Satellite-Pro-L450D django-tagging # python setup.py install
Traceback (most recent call last):
File "setup.py", line 49, in <module>
version_tuple = __import__('tagging').VERSION
File "/home/site/krisdigitx/django-tagg... | python | [7] |
5,007,026 | 5,007,027 | How to compare 2 String array lists and get the elements which are same in both the array lists using java | <p>i have 2 array lists a and b containing string elements ex:- ( 1,2,3,4,5)</p>
<p>a = {1,2.3.4.5}
b= {3,4,5}</p>
<p>I want to compare array lists a and b ( each element of a compared with each element of b ) and after comparison i want the elements which are same in both the array lists. How will i do this in java?... | java | [1] |
1,780,936 | 1,780,937 | How to close Activity with software keyboard after BACK press? | <p>I have an Activity, where I want the software keyboard to be alaways opened. How to close the Activity after BACK press, when keyboard is opened? Now I have to click BACK twice, first to close the keyboard and then to finish the Activity.</p>
| android | [4] |
4,966,112 | 4,966,113 | Get all LI elements in array | <p>How can i make JS select every LI element inside a UL tag and put them into an array?</p>
<pre><code> <div id="navbar">
<ul>
<li id="navbar-One">One</li
><li id="navbar-Two">Two</li
><li id="navbar-Three">Three</li
... | javascript | [3] |
5,970,904 | 5,970,905 | Difference between Panel control and Div | <p>I want to know what is difference between Panel control in asp.net and div with runat="server"? Since both render in div.And i want to know which one is best (conditions)?</p>
| asp.net | [9] |
904,608 | 904,609 | string argument for array static method header help for java | <p>I have placed string argument in the method header called methodASet. Is it possible to use this string argument in the body and returns the words in the argument as a set? If so how do I do this? Thanks. </p>
<pre><code>public class MyMates {
private static Set<String> names;
private static String[] name1 ... | java | [1] |
4,303,258 | 4,303,259 | can any one help me creating a tab bar application? | <p>I am creating a tab bar application.I have selected the tab bar template.But the project is build and run one tab is always selected.I don't want this to happen.I want a home screen to come.I am new to iphone development.Can any one help me in doing this?</p>
| iphone | [8] |
517,047 | 517,048 | Do nothing if RSS feed hasn't changed | <p>I want to run a Python script every so many minutes. The script starts by fetching the newest article from a rss-feed (using feedparser). What I want, is when the newest article is the same as the last time it ran, the script just ends. How do I accomplish this?</p>
| python | [7] |
4,778,606 | 4,778,607 | Is there a pointer-to-member equivalent in Java? | <p>I have a class which holds some colors for a GUI, which the program can change to its liking. For a specific element of the GUI, I'd like to be able to specify a color which is a member of that class. In C++, I could use something like</p>
<pre><code>int Pallete::*color = &Pallete::highlight;
Pallete pallete; /... | java | [1] |
5,561,457 | 5,561,458 | a secure way to access my pages | <p>I am having trouble trying to figure out how to solve an error in this code. I'm following a video tutorial.</p>
<pre><code>//when your looking for path
$core_path= dirname(__FILE__);
if(empty($_GET['page']) && in_array("{$_GET['page']}.page.inc.php",scandir("{$core_path}/pages"))==false){
echo'invalid ... | php | [2] |
322,195 | 322,196 | Using Array class in parent and child windows (javascript question) | <p>I'm actually coding a case where a child popup window transfer data to parent window as:</p>
<pre><code>var childArrayData = new Array();
childArrayData[0] = 'Data text1';
childArrayData[1] = 'Data text2';
childArrayData[2] = 'Data text3';
window.opener.parentVariable = childArrayData;
</code></pre>
<p>I got an er... | javascript | [3] |
693,134 | 693,135 | getimagesize not working | <p>I'm trying to get the image size but not managing to do it. What could be the problem?</p>
<pre><code>$size = getimagesize("http://getfavicon.appspot.com/http://google.com?defaulticon=1pxgif");
echo $size[0];
</code></pre>
| php | [2] |
1,291,639 | 1,291,640 | Is there a better way to write this navigation statement? | <p>I know this is a redundant way to write these rules so I'm wondering if anyone knows a better way to write it. Thanks!</p>
<pre><code>$('.nav li a').eq(0).click(function() {
$('.nav li a').eq(0).addClass("active");
$('.nav li a').eq(1).removeClass("active");
$('.nav li a').eq(2).removeClass("active");... | jquery | [5] |
3,044,267 | 3,044,268 | example of breaking the image into pieces in android | <p>i m making a puzzle and i want to break the image into 6 or 9 parts
so if anyone have any idea or link then help me</p>
| android | [4] |
5,540,665 | 5,540,666 | Create bit map font file from true type font | <p>I it possible to create a bit map font file from a true type font using java ?</p>
<p>Thanks</p>
| java | [1] |
5,590,537 | 5,590,538 | Deprecated: Assigning the return value of new by reference is deprecated in | <p>After installing Domain Trader 2.5.1 on my server getting this error</p>
<pre>Deprecated: Assigning the return value of new by reference is deprecated in
/home/user/public_html/pear/DB.php on line 310</pre>
<p>I am using PHP5.3</p>
| php | [2] |
5,264,513 | 5,264,514 | Where is c++ size_t defined in linux | <p>Now I'm talking about new type definition by a programmer using typedef keyword. As long as my pupils are used to the type size_t (for example by using funciton length ()), for which I had to ask them a little effort to just "believe" it is an integer type, I think it woud be great to show noew them where this type ... | c++ | [6] |
5,930,788 | 5,930,789 | Creating method to draw a circle using the centre of the circle and radius | <p>The method I created worked to the point that it would create a circle in a pictureBox but it would only use the coordinates of a rectangle.</p>
<p>I'm trying to create the following,</p>
<ul>
<li>Windows form with:
<ul>
<li>1 pictureBox</li>
<li>1 textBox</li>
<li>1 button</li>
</ul></li>
</ul>
<p>textBox should... | c# | [0] |
956,609 | 956,610 | How to create webpage preloading bar by jquery? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/8442363/how-to-create-a-jquery-loading-bar-like-the-ones-used-on-flash-sites">how to create a jQuery loading bar? (like the ones used on flash sites)</a> </p>
</blockquote>
<p>I want to make an animated preloadi... | jquery | [5] |
5,780,489 | 5,780,490 | Getting a property value and passing it on to superclass | <p>I need to get a property value from a property file and then pass it on to a superclass constructor. But since <code>super(value);</code> should be called first, where should I load the file and get the property value?</p>
| java | [1] |
3,919,847 | 3,919,848 | Javascript crop function without displaying image | <p>First of all, I'm very new to javascript. I'm trying to develop a javascript function which takes an image and returns a cropped version of that image. By looking around on google I've found that I probably need to use a canvas in some way to accomplish this task. But does that mean I have to display the image on my... | javascript | [3] |
1,195,329 | 1,195,330 | adding of Coloumn values of a Layout inflater listview in Android | <p>I have a listview whose rows are added by using layout inflater concept.
i want to add all values in one particular column and to display total in textbox.
I tried more but the adding of all values in a column is not going on perfect.
while scroling the listview...the values are changing.</p>
<p>** Can it possible ... | android | [4] |
1,942,017 | 1,942,018 | What's wrong with this Python code? | <p>I'm very new so just learning, so go easy please!</p>
<pre><code>start = int(input('How much did you start with?:' ))
if start < 0:
print("That's impossible! Try again.")
print(start = int(input('How much did you start with:' )))
if start >= 0:
print(inorout = raw_input('Cool! Now have you put m... | python | [7] |
4,577,513 | 4,577,514 | Where to find the Contact View in Android? | <p>I notice that some of the base applications in Android are using this little control (View in Android terms I guess) that shows the contact picture. When you click on the picture it shows all the ways of contacting the person (phone, sms, talk, facebook). I see this little View used in the contact app, sms app, twit... | android | [4] |
2,680,926 | 2,680,927 | Why is this code giving me an "IndentationError: unexpected unindent" | <p>The code below is really annoying me I have looked on stackoverflow and google yet have not found anything and I am a pretty good pyton programmer and have not as of yet, well untill now, found an error that I could not deal with. I have tried everything but this peace of code is giving me the <strong>IndentationErr... | python | [7] |
3,644,414 | 3,644,415 | Android App --> Displaying Local News | <p>I'm developing an android app and am not sure if something like this exists or how to even approach it. I would appreciate any advice.</p>
<p>In this app I would like to have a screen that displays only local news for a certain zip code. I would of course type in the zip code but after I do this once it would tak... | android | [4] |
2,823,191 | 2,823,192 | nsstring and const char* conversion | <p>i try to convert nsstring to const char*.</p>
<p>1- i add a nsstring and an integer together<br>
2- then i convert this new nsstring to const char*<br>
3- i have an object and i attribute this new nsstring as my object's name.<br>
4- i use this object in another function</p>
<blockquote>
<p>NSString* firstName =... | iphone | [8] |
1,559,697 | 1,559,698 | In Java, create a generic parsed string cache (multiple resulting types) | <p>I'm trying to create a generic parsed string cache to prevent rebuilding the same object over and over. Essentially, what I'm building is something like the following:</p>
<pre><code>public class ParsedStringCache {
// static Map<Pair<String, Parser<T>>, T> _cache
// = new HashMap<... | java | [1] |
902,530 | 902,531 | C++ --- Can a static member variable call non-static member functions | <p>I saw the following code:<br>
<a href="http://sourcemaking.com/design_patterns/singleton/cpp/1" rel="nofollow">http://sourcemaking.com/design_patterns/singleton/cpp/1</a></p>
<pre><code>class GlobalClass
{
private:
int m_value;
static GlobalClass *s_instance;
GlobalClass(int v = 0)
{
m_value... | c++ | [6] |
616,649 | 616,650 | How can I reshape and aggregate list of tuples in Python? | <p>I'm a newb to Python so apologies in advance if my question looks trivial.</p>
<p>From a psycopg2 query i have a result in the form of a list of tuples looking like:</p>
<pre><code>[(1, 0), (1, 0), (1, 1), (2, 1), (2, 2), (2, 2), (2, 2)]
</code></pre>
<p>Each tuple represents id of a location where event happened... | python | [7] |
5,395,307 | 5,395,308 | Using a (to a class) unknown function | <p>I have a check if a form is already open. If it't not, it will open, if it is, it will activate the form + use a SwitchTab(int i) function. Here is some code:</p>
<pre><code>public partial class Insert : Form {
public Insert() {
InitializeComponent();
}
public Insert(int tab) : this() {
... | c# | [0] |
4,973,410 | 4,973,411 | How to display data in MdiChild forms received from serialport | <p>Sir,
I created a MDI Parent form and three Mdi Child forms. Each child form contains a button. on clicking the button a new form is displayed. Mean to say if I click all the 3 buttons in 3 child form then there will be 3 new forms displayed. Its Fine. </p>
<p>My problems are :</p>
<p>1- Each new form which is dis... | c# | [0] |
4,213,262 | 4,213,263 | problems importing scanner class | <p>I am trying to execute the following code but keep getting this error:</p>
<blockquote>
<p>Error: Main method not found in class ScannerDemo, please define the main method as:
<code>public static void main(String[] args)</code></p>
</blockquote>
<pre><code>import java.util.Scanner;
class ScannerDemo
public ... | java | [1] |
2,361,732 | 2,361,733 | Why does <body onload="fn();"> use a function call, but window.onload=fn; use a handler function? | <p>I've read about the technical differences such as which option waits for the appropriate elements to load, but for most cases I understand that they both serve a similar purpose. </p>
<p>I'd like to know about the rationale behind needing to call the function (say, initialize();) when using but only using the func... | javascript | [3] |
4,410,040 | 4,410,041 | Sort list of strings by integer suffix in python | <p>I have a list of strings:</p>
<pre><code>[song_1, song_3, song_15, song_16, song_4, song_8]
</code></pre>
<p>I would like to sort them by the # at the end, unfortunately since the lower numbers aren't "08" and are "8", they are treated as larger than 15 in lexicographical order.</p>
<p>I know I have to pass a key... | python | [7] |
1,700,849 | 1,700,850 | Is there an example of how to use a TouchDelegate in Android to increase the size of a view's click target? | <p>My understanding is that when you have a view that's too small to easily touch, you're supposed to use a TouchDelegate to increase the clickable region for that view.</p>
<p>However, searching for usage examples on Google turn up multiple people asking the question, but few answers.</p>
<p>Does anyone know the pro... | android | [4] |
2,267,816 | 2,267,817 | how to get #define symbol rather than value from predefine constants | <p>I have one C++ define statement as:</p>
<pre><code>#define PING 10
</code></pre>
<p>In my <code>main</code> function, I have something like:</p>
<pre><code>int main()
{
int code;
cout<<"enter command code";
cin>>code; // value entered 10
cout<<code; //here i want "PING" ou... | c++ | [6] |
811,498 | 811,499 | what happens when we do go one page forward and one page back in browser does it hit the server and reload the page? | <p>In my code i am maintaining some session on page load and some button click.
It works fine
but in browser if do Go back one page or go forward one page it disturb all session.</p>
<p>So what is the concept behind Go back one page, go forward one page in browser.</p>
<p>When we go forward or go back, does page relo... | asp.net | [9] |
4,455,303 | 4,455,304 | getting null pointer exception on using savedInstanceState.getInt( "Phase", 1 );? | <p>I'm getting null pointer exception on this line inside OnCreate function:</p>
<pre><code>int Phase = savedInstanceState.getInt( "Phase", 1 );
</code></pre>
<p>According to what I read, this function should return the value associated with "Phase" or 1 if no mapping exits for the key "Phase". However for some reaso... | android | [4] |
3,797,258 | 3,797,259 | When should I change/assign __class__ attribute in Python? | <p>There are a few questions around SO that look into setting <code>__class__</code> attribute in Python. It is mostly seen as unexpected and dangerous. For example, this question contains answers that discuss the downsides:</p>
<p><a href="http://stackoverflow.com/questions/13280680/how-dangerous-is-setting-self-clas... | python | [7] |
5,236,681 | 5,236,682 | Is there a way to get around having to reference Global variables inside a function in PHP? | <p>Is there a way to get around having to reference Global variables inside a function in PHP?</p>
<p>I just hate having to use the 'global' keyword for every variable, and I've been told that using constants (as an alternative) in PHP affects performance badly.</p>
| php | [2] |
3,284,811 | 3,284,812 | Getting coordinates from json parsing and displaying in mapview? | <p>through jsonparsing i parse all the string values again i need to display the latitude and longitude in the mapview.. where i need to store all the coordinates in a separate array
anyone please help me ..
thanks in advance</p>
| android | [4] |
4,896,501 | 4,896,502 | Python Constructing the left-hand coefficient matrix: | <p>Constructing the left-hand coefficient matrix: Write a function which, when given
a list of chemical species and a list of elements, will return a 2-D array representing
the right-hand coefficient matrix A in either (3) or (7). Example: calling your func-tion with inputs of ['CO', 'H2O', 'CO2'] and ['C', 'H', 'O'] s... | python | [7] |
1,245,406 | 1,245,407 | Handling map of files in c++ | <p>I need to write to a bunch of files simultaneously, so I decided to use <code>map <string, ofstream></code>.</p>
<pre><code>map<string, ofstream> MyFileMap;
</code></pre>
<p>I take a <code>vector<string> FileInd</code>, which consists of, say <code>"a" "b" "c"</code>, and try to open my files wi... | c++ | [6] |
4,436,866 | 4,436,867 | PHP date() formatting | <p>I'm trying to format my date like YYYY-MM-DD. </p>
<p>I'm doing this:</p>
<pre><code> $dateAdded = date(Y-m-d);
</code></pre>
<p>So for today, it should say 2011-05-07, but it keeps returning 0000-00-00. Any help?</p>
| php | [2] |
267,094 | 267,095 | what is new in AVD 2.3 to compare 2.1 | <p>i want to know that which are new features in 2.3 compare 2.1.<br>
i have hndled many project in android in 2.1 and good experiance.
please list out what's new feature in 2.3.</p>
| android | [4] |
2,722,168 | 2,722,169 | Make all the words in a string with 3 characters or less completely uppercase | <p>I trying to accomplish the following:</p>
<pre><code>$string = "i want to convert this string to the following";
</code></pre>
<p>and convert it to something like this:</p>
<pre><code>echo $string;
// I Want TO Convert This String TO THE Following
</code></pre>
<p>Thus:
Capitalize the First Letter of All Words i... | php | [2] |
722,306 | 722,307 | How do I get started using Java for web development? | <p>OK, here's the easiest question for the day for those of you who have ever done this. I'm learning Java and I heard that Java can be used to build websites. I am coming from a PHP background, so I would really appreciate using a strongly-typed well-designed language like Java for web development. However, either I c... | java | [1] |
2,954,016 | 2,954,017 | How do I get an animation to play at the same time as a TextToSpeech utterance in Android | <p>I have a set of buttons in my ChordActivity application in a LinearLayout. When a button is clicked, I want the TextToSpeech engine to speak the name of the button clicked ( e.g; Minor 7th ), which is working fine. I also want an animation of the button 'popping out then back' to occur, which I also have working. Th... | android | [4] |
1,255,103 | 1,255,104 | javascript global variables visibility | <p>I'm using a global variable in javascript, declared in a script tag outside any function:</p>
<pre><code><script type="text/javascript">
var prov_status_dict={};
....
</script>
</code></pre>
<p>Later on in a javascript method I'm using the variable normally.</p>
<pre><code>temp=prov_st... | javascript | [3] |
926,583 | 926,584 | Is possible to create pinch zoom in view pager in android ? | <p>I want to create a horizontal scroll view with pinch zoom.I have tried for View Pager but then zooming is not happening.</p>
| android | [4] |
4,150,054 | 4,150,055 | detect UITableViewCell id on UIImageView | <p>I have a UITableView.
I place an UIImageView on each row UITableViewCell.
I used the codes below to detect the touch on the UIImageViews</p>
<pre><code>-(void) touchBegan:(NSSet*) touches withEven:(UIEvent*)event
{
CGPoint pt=[[touches anyObject] locationInView:self];
}
</code></pre>
<p>It looks like I can only ... | iphone | [8] |
5,591,646 | 5,591,647 | PHP Syntax validator? | <p>Im just wondering if theres a recommended syntax validator out there anybody can recommend?</p>
<p>Having major issues and cant figure it out...</p>
<pre><code> <?php
session_start();
if (isset ($_SESSION['id'])) {header("location: home.php");}
if (array_key_exists("login", $_GET)){$oauth... | php | [2] |
6,023,583 | 6,023,584 | how to generate unique number for users that visit a site using javascript? | <p>I want to generate unique number for each of my site users.
How can I achieve something like this using JavaScript?</p>
<p>P.S: I also want this unique number have information about users for example something like IP or concatenation something with IP.
Can I have user IP using JavaScript?how?</p>
| javascript | [3] |
2,588,419 | 2,588,420 | jQuery selector for select option not working in ie? | <p><pre><code>jQuery('#by option:eq(2)').hide();</code></pre> this is not working in ie. Here by is the id of select element.</p>
| jquery | [5] |
258,409 | 258,410 | iPhone - accessing unknown getter method in a class | <p>I have this class that has a delegate method. Its delegate has a navigationController.</p>
<p>I am trying to send a message to this navigationController from inside that class. Something like:</p>
<pre><code>[delegate.navigationController setNavigationBarHidden:NO];
</code></pre>
<p>I am receiving the message: <s... | iphone | [8] |
427,190 | 427,191 | Change background-image with jQuery - doesn´t work | <pre><code>$('#areaView').css('background-image', 'url(/areaNr1.jpg)');
</code></pre>
<p>I don´t know what to say, I have no idea why this code doesn´t work. The old background-image disappears, but the new one never appears.</p>
<p>I have checked and areaNr1.jpg exists in the same folder as the code. Allthough the f... | jquery | [5] |
4,548,474 | 4,548,475 | NullPointerException error in AVL tree | <p>I am doing an assignment about AVL trees in Java. I am getting a <code>NullPointerException</code> error when trying to balance the tree by means of the rotation. Can you please help me in finding the error? Here is my code:</p>
<pre><code>public class Node {
private int value;
private Node leftNode;
pr... | java | [1] |
4,396,246 | 4,396,247 | expected constructor, destructor, or type conversion before '<<' token | <p>On Compiling follow programs using g++. </p>
<pre><code>#include<iostream>
using namespace std;
cout<<"Before Main"<<endl;
int main()
{
cout<<"Within Main"<<endl;
}
</code></pre>
<p>Errors: expected constructor, destructor, or type conversion before '<<' token.
So may i know h... | c++ | [6] |
3,259,611 | 3,259,612 | iframe onmouseout capture | <p>I currently have an iframe within my parent page and I was wondering whether it's possible to capture a onmouseout event to trap when the user clicks or moves outside the iframe border, i.e back onto parent page.</p>
<p>Would really appreciate some help.</p>
<p>Thanks.
Tony.</p>
| javascript | [3] |
1,823,142 | 1,823,143 | problem with UISegmentedControl | <pre><code>-(IBAction)changeSegmentDistance:(UISegmentedControl *)sender{
// refineDistance=sender;
switch ([refineDistance selectedSegmentIndex]) {
case 0:
valueString=5;
NSLog(@"value String %d",valueString);
break;
case 1:
valueString=10;
... | iphone | [8] |
3,066,611 | 3,066,612 | Draw a timetable in console out of 3D-Array | <p>I want to draw a timetable in console application:</p>
<pre><code>---------------------------------------------------
| Mo | Tu | We | ... |
---------------------------------------------------
1| Math | | | |
| Teacher | | | ... | c# | [0] |
5,391,701 | 5,391,702 | How do I reduce the height of a TableView when it is constructed in IB? | <p>I wanted to add a view to the bottom of my screen. The controller is a UITableViewController, how do I shrink the tableView and add a extra view at the bottom of the tableview?</p>
<p>I've tried setting the frame of self.tableView in different places (viewDidLoad, viewWillAppear etc) but nothing happens. The tableV... | iphone | [8] |
1,184,628 | 1,184,629 | How to get the Jquery row ID on single click | <pre><code> var value;
$("#Grid1").click(function(e) {
var row = jQuery(e.target).parent();
value= row.attr("id");
});
var onrowclick = function() {
("#Grid1").click($("#showgrid").load('/Names/Friends/satish/' + value));
};
</code></pre>
<p>i am trying to send ... | jquery | [5] |
1,858,821 | 1,858,822 | error in python: list assignment index out of range | <p>I searched everywhere and even though there were a couple of questions and answers regarding this error I couldn't find a solution to fix my problem</p>
<p>I'm reading in from a file that contains letters and numbers and I'm populating my matrix depending on the values in that file.
ex: file
description of letters ... | python | [7] |
4,494,780 | 4,494,781 | Python is converting double quotes to single quotes in new variable | <p>I'm trying to save a variable with double quotes in python, because I need to pass the double quoted JSON to a template and single quotes wont work with what I'm doing. So I set the variable in python to:</p>
<pre><code>json = {
"auth": {
"key": "auth-code-here"
},
"template_id": "id-here",
"redirect_u... | python | [7] |
1,720,694 | 1,720,695 | Reading to hash table from file c# | <p>(In this windows form application) I'm trying to read data from a file into a hash table and populate text boxes with the data in the hash table but when I run the code I'm always thrown the exception "Item has already been added. Key in dictionary: '' Key being added: '' "</p>
<p>Initial code:</p>
<pre><code>str... | c# | [0] |
2,397,439 | 2,397,440 | Python string representation of binary data | <p>I'm trying to understand the way Python displays strings representing binary data.</p>
<p>Here's an example using <a href="http://docs.python.org/library/os.html#os.urandom" rel="nofollow">os.urandom</a></p>
<pre><code>In [1]: random_bytes = os.urandom(4)
In [2]: random_bytes
Out[2]: '\xfd\xa9\xbe\x87'
In [3]: r... | python | [7] |
2,121,309 | 2,121,310 | Proper way to add functionality to handle() in a python TCP Server? | <p>I have code like this:</p>
<pre><code>class SingleTCPHandler(SocketServer.BaseRequestHandler):
""" One instance per connection. """
def handle(self):
data = Net.recv_from_socket(self.request)
GUI.run(str("RECV'd message: %s" % data))
class SimpleServer(SocketServer.ThreadingMixIn, SocketSer... | python | [7] |
5,765,735 | 5,765,736 | removeChild work only every other time | <p>I try put one element next second, and delete second element, but it does not work.
Look at example: <a href="http://jsfiddle.net/CZCGG/" rel="nofollow">http://jsfiddle.net/CZCGG/</a></p>
| javascript | [3] |
1,398,261 | 1,398,262 | Android camera input similar to xbox kinect | <p>This is probably not possible but are there any API's that allow camera input on Android similar to what is possible with the Xbox kinect. Simpler capabilities I'm sure.</p>
| android | [4] |
4,083,257 | 4,083,258 | Simple Sentence Reverser in C++ | <p>I'm trying to build a program to solve a problem in a text book I bought recently and it's just driving me crazy.</p>
<p>I have to built a sentence reverser so I get the following:</p>
<p>Input = "Do or do not, there is no try."
Output = "try. no is there not, do or Do"</p>
<p>Here's what I've got so far:</p>
<p... | c++ | [6] |
1,086,011 | 1,086,012 | Reverse engineering option in Visual studio 2008 arch edition | <p>We have visual studio 2008 architecture installed and a c# solution created. We need to generate UML diagram (showing the classes, the relationship between them etc). In the architecture edition we don't see any option that would generate such diagram. The option of class digram mearly generates the class diagram b... | c# | [0] |
3,866,091 | 3,866,092 | Document to String? | <p>I've been fiddling with this for over twenty minutes and my Google-foo is failing me.</p>
<p>Let's say I have an XML Document created in Java (org.w3c.dom.Document):</p>
<pre><code>DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docFactory.newDocumentBuilder()... | java | [1] |
4,557,807 | 4,557,808 | authentication mode="Forms" login https to default http | <p>I'm trying to use Forms Authentication to redirect from my login page (https) to my default page (http). </p>
<pre><code><forms name="mysite.com" loginUrl="https://www.mysite.com/Login.aspx" protection="All" defaultUrl="http://www.mysite.com/Default.aspx" requireSSL="false" timeout="30" slidingExpiration="true"... | asp.net | [9] |
864,753 | 864,754 | the best approach to giving an error message when validating | <p>I am a new programmer and am attempting to do some validation for a basic registration form. I have built a basic registration form that sends the user back to the same page when submitted. I have also created a user class and have created some basic validation functions. However, the functions have the error messag... | php | [2] |
1,348,515 | 1,348,516 | entering date into database through three dropdownlists for day, month, and year | <p>I am using three dropdownlists for day, month, and year simultaneously and concatenating their results to generate a string in format 12/12/1999. But as the database table's field type is datetime it does not support this format.</p>
| asp.net | [9] |
2,352,588 | 2,352,589 | Multiple assignment using map function | <p>Is it possible to apply map functions to multiple values at once? </p>
<p>Something like this</p>
<pre><code>from collections import defaultdict
d['a'] = [1,2,3,4]
d['b'] = [4,5,6,7]
d['a'], d['b'] = map(lambda x,y: (x,y) if x*y % 3 == 0 else (0,0), d['a'], d['b'])
-------------------------------------------------... | python | [7] |
1,936,802 | 1,936,803 | Which is better if(a) or if(a!=NULL) | <p>if a is a pointer, is there a difference between testing if(a) and if(a != NULL) ? Which one is better?</p>
| c++ | [6] |
3,820,204 | 3,820,205 | Run Task scheduler at every 2 minute | <p>I want to create Task Scheduler that trigger at every 2 minute.
I am using following namesapce</p>
<p>using Microsoft.Win32.TaskScheduler</p>
<p>I have written following code </p>
<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32.TaskScheduler;... | c# | [0] |
3,288,207 | 3,288,208 | Querying the status of a bit flag? | <p>I am trying to parse some files that have a bitwise flag column. There are 11 bits in this flag and I need to find out, for each row in the files, what is the value of the 5th bit (1-based).</p>
| c++ | [6] |
1,546,023 | 1,546,024 | How to get Date (yyyy/mm/dd) from ticks without using an instance/helper of/from Datetime C# | <p>I'm trying to extract date from ticks.</p>
<p>Am I right that, a millisecond is 10000 ticks.
and a day is 864000000000 ticks and a month
is 26784000000000 and a year is 316224000000000.</p>
<p>but when I use these in computations, I get wrong date :(.</p>
<p>It could have been easy using Datetime parse but, for... | c# | [0] |
698,982 | 698,983 | how to set element center in the div | <p>suppose i have text, images etc in div. so how can i make the element center horizontally and vertically in the div with the help javascript & css. please guide with sample code. </p>
<p>thanks</p>
| javascript | [3] |
3,995,296 | 3,995,297 | How to place exceptions in files? | <p>I have different kinds of exceptions in a library which i am developing.</p>
<p>What do you recommend placing them in a single file or a file with each kind of exception?</p>
<p>Pls answer remembering that this is a library i am developing.</p>
| c# | [0] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.