Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
2,745,866 | 2,745,867 | app crashes while writing data together | <p>I am trying to write NSData objects together. It's a 450 mb file. I'm doing it with 50mb chunks like so:</p>
<pre><code>for (NSString *packetName in listOfFiles) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *packetPath = [[self applicationDocuments... | iphone | [8] |
4,714,087 | 4,714,088 | movie orientation | <p>How can I detect a movie orientation (portrait or landscape) or width and height of it?
For example, when using UIImagePickerController:</p>
<pre><code>- (void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info {
if ([[info valueForKey:UIImagePickerControlle... | iphone | [8] |
2,004,088 | 2,004,089 | jquery ajaxSubmit replaceTarget javascript | <p>I have a div in this pattern:</p>
<pre><code><div id="register_container">
...
<script type="text/javascript">
$(document).ready(function()
alert('hi');
$("#customer").css("backgroundColor", "red");
$('#add_item_form').ajaxSubmit({target: "#register_container", replaceTarget: true});
... | jquery | [5] |
1,357,826 | 1,357,827 | Add values to app.config and retrieve them | <p>I need to insert key value pairs in app.Config as follows:</p>
<pre><code><configuration>
<appSettings>
<add key="Setting1" value="Value1" />
<add key="Setting2" value="Value2" />
</appSettings>
</configuration>
</code></pre>
<p>When I searched in google I got the foll... | c# | [0] |
1,582,027 | 1,582,028 | time now in Riyadh (KSA) , by javascript | <p>How are you ?</p>
<p>I want to add block in site about time now in Riyadh (+3 time zone) (Capital of saudi arabia) </p>
<p>for example when the visitor from Germany or Spain come to my site , he wants to know the time in Riyadh , how can show the time now in Riyadh .</p>
<p>also I want the time 12h ( 12:10:25 am ... | javascript | [3] |
6,014,129 | 6,014,130 | Device Id through Java? | <p>How can i find the device of my fingerprint reader through the Java programming? Is there any specific method in any specific package?</p>
| java | [1] |
2,388,799 | 2,388,800 | c++ - relearning | <p>I haven't done C++ for about three years and looking to get back and ready. What is the best way? any open source projects that I might want to look at to recall all the details and be ready for interviews?
I started reading (again) C++ Primer 5th edition but was wondering whether there's more efficient way since I ... | c++ | [6] |
3,782,937 | 3,782,938 | java - codesprint2 programming contest answer | <p>I recently took part in Codesprint2. I was unable to submit the solution to the following question.
<a href="http://www.spoj.pl/problems/COINTOSS/" rel="nofollow">http://www.spoj.pl/problems/COINTOSS/</a>
( I have posted the link to the problem statement at spoj because the codesprint link requires login )</p>
<p>I... | java | [1] |
5,803,551 | 5,803,552 | Javascript Array of objects - how do i loop through and get the object values | <p>Im having some issues creating an array of objects in javascript</p>
<p>Please see my code below and tell me where im going wrong..</p>
<p>I simply want to loop through and access the values</p>
<pre><code><!-- Read XML Script -->
<script type="text/javascript">
// Object array
var myArray = ... | javascript | [3] |
5,123,780 | 5,123,781 | Get the end of string with Javascript | <p>I am storing a string (url) in a variable
it can look like one/two/three/test.aspx?ID=12312
I want to extract the querystring value, not from window.location but from the html</p>
<p>I thought I could use substring and write</p>
<pre><code>var link = ($(this).find('a').attr('href'));
var qs = link.substring( link... | javascript | [3] |
1,979,393 | 1,979,394 | How to create round cornered Map View in Android? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/5211731/adding-rounded-corners-to-a-mapview">Adding rounded corners to a mapview</a> </p>
</blockquote>
<p>For my Android application i need to create a round cornered MapView, I surfed in Google i could found a... | android | [4] |
1,235,222 | 1,235,223 | Convert to word representation of a number | <p>Using C# I need to convert an integer to it's word representation, and only go up to 5 to 10. Is there a better way to do it than this?</p>
<pre><code>static string[] numberwords =
{
"zero",
"one",
"two",
"three",
"four",
"five"
};
public static string GetNumberAsString(int value)
{
... | c# | [0] |
4,369,876 | 4,369,877 | Android: how to make keyboard enter button say "Search" and handle its click? | <p>I can't figure this out. Some apps have a EditText (textbox) which, when you touch it and it brings up the on-screen keyboard, the keyboard has a "Search" button instead of an enter key.</p>
<p>I want to implement this. How can I implement that Search button and detect press of the Search button?</p>
<p><strong>Ed... | android | [4] |
3,601,246 | 3,601,247 | How to generate unique 3 or 4 letter alpha strings based on first & last name | <p>I need to loop through every one in the DB and give them a unique 3/4 letter stock symbol like code.</p>
<p>I've got roughly 600 names (of people) and want to generate stock symbol like unique codes for them all, but based roughly on the names (like stock symbols).</p>
<p>For example:
Dale Cooper could be DCO/DAC/... | php | [2] |
4,124,923 | 4,124,924 | android: How to hide group indicator in BaseExpandableListAdapter when child count = 0 | <p>Please help me hide the group indicator in BaseExpandableListAdapter when child count is zero. I have a list of groups with various dynamic child counts and I would like to hide the icon only for those groups that do not have any children. What is the proper way to do this?</p>
| android | [4] |
4,999,915 | 4,999,916 | Image URL in a ASP.Net Page | <p>I have a default image in my folder in visual studio.</p>
<p>How can I get the server path to find the image in runtime in code?</p>
<pre><code>if (String.IsNullOrEmpty(entry.Picture))
{
//image1.ImageUrl = @"F:\Temp\Projects\IMEICHECK\IMEICHECK\Images\Design\New\no-image.gif";
}
else
image1.ImageUrl = ent... | asp.net | [9] |
4,599,870 | 4,599,871 | Difference between local variables and arguments | <pre><code>function addLinks () {
for (var i=0, link; i<5; i++) {
link = document.createElement("a");
link.innerHTML = "Link " + i;
link.onclick = function (num) {
return function () {
alert(num);
};
}(i);
}}
</code></pre>
<p>A closur... | javascript | [3] |
5,095,565 | 5,095,566 | how to set textMode = Multiline for dynamic text box in c# | <pre><code>TextBox txt = new TextBox();
txt.TextMode = "MulitiLine";
</code></pre>
<p>is not working </p>
<p>how to set <code>textMode = Multiline</code> for dynamic text box in c#</p>
| c# | [0] |
4,291,921 | 4,291,922 | How to hide (disable) specific days using CalenderExtender Plus in ASP.NET | <p>In my ASP.NET application, I created a page which has a textbox with CalenderExtenderPlus in which the user can select a date. I need to disable the some days (holidays, etc.) such that the user is not able to select those days.</p>
<p>I'm looking for functionality similar to jQuery Datepickers "beforeShowDay".</p>... | asp.net | [9] |
972,272 | 972,273 | How can I calculate log base 2 in c++? | <p>Here is my code.</p>
<pre><code>#include <iostream>
#include<stdlib.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include <cmath>
#include <functional>
using namespace std;
void main()
{
cout<<log2(3.0)<<endl;
}
</code></pre>
<p>But above code g... | c++ | [6] |
3,624,428 | 3,624,429 | Which one of these sites to start learning python? (complete beginner) | <p>Sorry if this question isn't allowed, but of these 3 which one do you recommend for a complete beginner? (I have absolutely NO programming knowledge, this is my first ever language)</p>
<ul>
<li><a href="http://greenteapress.com/thinkpython/html/index.html" rel="nofollow">greenteapress.com/thinkpython/html/index.ht... | python | [7] |
4,059,128 | 4,059,129 | GPS is on, yet LocationManager returns null | <p>The GPS on my Android phone is on, supported by the fact that :</p>
<pre><code>location_manager.isProviderEnabled(LocationManager.GPS_PROVIDER)
</code></pre>
<p>returns true.</p>
<p>Yet, the following line :</p>
<pre><code> Location location = location_manager.getLastKnownLocation(LocationManager.GPS_PROVIDER) ;... | android | [4] |
599,499 | 599,500 | Backslash in JavaScript | <p>In my javascript code I have </p>
<pre><code>onchange="document.getElementById('user_name').value =
document.getElementById('theDomain').value + '\\' +
document.getElementById('fake_user_name').value"
</code></pre>
<p>here backslash doesn't work. What is the problem?
How should I write it?</p>
<p>example:
I w... | javascript | [3] |
5,099,080 | 5,099,081 | Expected constructor, destructor, or type conversion before '*' token | <p>I honestly have no idea why this is happening. I checked, double-checked, and triple-checked curly braces, semicolons, moved constructors around, etc. and it still gives me this error.</p>
<p>Relevant code follows.</p>
<p>BinTree.h</p>
<pre><code>#ifndef _BINTREE_H
#define _BINTREE_H
class BinTree
{
private:
... | c++ | [6] |
2,011,259 | 2,011,260 | C++: avoid optimizing out variable | <p>I have some useful code in constructor or class <code>Valuable</code>. I want be sure it's executed before <code>submain</code>. How can I guarantee that it's not optimized out?</p>
<pre><code>int main()
{
// Dear compiler, please don't optimize ctor call out!
Valuable var;
return submain();
}
</code><... | c++ | [6] |
3,329,262 | 3,329,263 | create tree from linux directory stucture | <p>I need to create a tree from a linux directory stucture. For example:</p>
<pre><code>. 0
./file1.txt 1
./file2.txt 2
./site 3
./site/file3.txt 4
./site/ru 5
./site/ru/file4.txt 6
</code></pre>
<p>Each node is a directory or file(if it has no children) and has ID(>=0). The root ID is 0. Parent ID is always lower th... | java | [1] |
3,579,166 | 3,579,167 | Basic Authentication | <p>I have one VS application named Dotnetpanel, which provides a lot of webservices.</p>
<p>I created another another VS application say TestModule in which I need to create the webservice client. But when I try to create a client and call the webservice in TestModule, an error occured"The request failed with HTTP sta... | asp.net | [9] |
2,019,760 | 2,019,761 | Dock like Shortcuts | <p>I'm looking to develop a program which allows users to drag their desktop shortcuts onto a dock / slideout bar on the desktop. How can i make it possible for a 'Desktop Shortcut' to be dragged onto the Dock to create a Shortcut there?</p>
| c# | [0] |
3,496,815 | 3,496,816 | how to perform action(listener) from the function? | <p>I use the following code to return the Scroll View from the function.That Scroll View contain number of check boxes . I call this function and it return the Scroll View correctly.But how to get the value if any of the check box is checked i need to perform some action.How to do this ?</p>
<p>Scroll View return Func... | android | [4] |
3,741,866 | 3,741,867 | Android Color (setColor in Paint) Needs Negative Integer? | <p>I'm simply trying to paint/draw to the Canvas in Android. However, when I set the color using hex values or using the setARGB method, it doesn't work. But when I use Color.x (eg, Color.GREEN) it works. Here's the code:</p>
<pre><code> Bitmap image = Bitmap.createBitmap(bitmapWidth, bitmapHeight, Bitmap.Config.AR... | android | [4] |
3,143,831 | 3,143,832 | Programmatically start UserControlTestContainer.exe | <p>I implemented a C# user control and succesfully tested it with the UserControlTestContainer.exe by manually interacting with it. Now I would like to programmatically, instead of manually, feed data into the control, through my unit tests and then automatically display the control filled with that data. I guess I nee... | c# | [0] |
3,455,549 | 3,455,550 | Automatically invoking operations/actions | <p>We need to send newsletter/messages to our users at certain times. This is done on the web; however, we want this to be done automatically for certain time. Although this problem suits the Window Service kind model, but we are hosting on public domain; therefore, we can't use this option. </p>
<p>Is there any way t... | c# | [0] |
4,032,725 | 4,032,726 | how to pass a variable thru URL in php | <p>Hi I am trying to pass a value from one file to another file via URL.</p>
<p>The way i do is: <code><a href='fund_view.php?idfund="<? echo $row['idfund']; ?>"'></code></p>
<p>after all i get the right value in other file using </p>
<pre><code>$aidi = $_GET['idfund'];
echo 'ID= '.$aidi;`
</code></pre... | php | [2] |
4,526,885 | 4,526,886 | Is it safe to use a class inside the package sun.misc? | <p>For example should I use <a href="http://java-doc.narod.ru/sun/misc/IOUtils.java.html" rel="nofollow">sun.misc.IOUtils</a>?</p>
| java | [1] |
2,904,887 | 2,904,888 | Comparing numbers in a file to a console input | <p>I am trying to write a program to read in a number from the console, and then read an arbitrary number of numbers from a file. It should then print out how many times the console number appears in the list read from the file. I am not sure how to do the second part can anyone help me with how to count how many tim... | c++ | [6] |
3,860,189 | 3,860,190 | why local timeZone String is getting appended in the UTC date? | <p>I want to get a Date Object in UTC Time Zone so i am converting it first to a String which is returing me correct UTC Date String but when i am again parsing it to Date object then Local Time Zone String(ie. IST) is getting appended in that Date instead of UTC.</p>
<pre><code> Date date = new Date();
... | java | [1] |
3,023,054 | 3,023,055 | Android onCreate() Method called twice when device rotated. (ICS) | <p>I'm developing on an android tablet application and I have to manage application orientation. I got a problem that every time when I rotate the device onCreate() will be called.</p>
<p>I fixed this problem on Honeycomb (3.1) by set this line in Manifest.xml file at the activity tag and it works well. </p>
<pre><co... | android | [4] |
2,457,716 | 2,457,717 | How to store user input of one character into EACH element of an array in C++? | <p>I want the user to input just one character, say 'Y', then I want Y to be stored in each element of an array (ie: array[9]) so that when I print it would be like 'YYYYYYYYY', or when it's a 2d array (ie: array[2][2]) it would look like:</p>
<pre><code>YYY
YYY
YYY
</code></pre>
| c++ | [6] |
2,449,388 | 2,449,389 | how to put one listview inside another listview in java file in android? | <p>I have an xml file with a gallery and listview named main.xml.Another xml file with webimageview and listview named list.xml.Now I need to attach the main.xml to the listview in list.xml in java file.how can i do that?pls help with some ideas..</p>
| android | [4] |
2,024,782 | 2,024,783 | Last six months list in PHP | <p>I need the previous six months list and am using the following code for that.</p>
<pre><code>for ($i=6; $i >= 1; $i--) {
array_push($months, date('M', strtotime('-'.$i.' Month')));
}
print_r($months);
</code></pre>
<p>Its gives the wrong output as follows</p>
<pre><code>Array
(
[0] => 'Dec'
[1] =... | php | [2] |
539,079 | 539,080 | Is there any cache in jvm or a way how to speed up method which sometimes takes longer? | <p>Hi is there any cache or settings of the jvm to speed up methods call? </p>
<p>e.g: I do have a web service and when I call it once per 10minutes or so it's quite slow processing takes around 8-10s in comparison to calling it once per 20seconds-the result is roughly around 5s.</p>
<p>Nothing else except this is ru... | java | [1] |
1,047,954 | 1,047,955 | Jquery to create a popup div on hover? | <p><a href="http://www.sohtanaka.com/web-design/fancy-thumbnail-hover-effect-w-jquery/" rel="nofollow">This</a> is a pretty cool jquery popup technique for an image. Does anyone know the best way to get a similar thing working to get a div-enclosed table as the pop-up? What I'm trying to do is let the user hover over a... | jquery | [5] |
1,720,860 | 1,720,861 | join two lists by interleaving | <p>I have a list that I create by parsing some text.
Let's say the list looks like </p>
<pre><code>charlist = ['a', 'b', 'c']
</code></pre>
<p>I would like to take the following list</p>
<pre><code>numlist = [3, 2, 1]
</code></pre>
<p>and join it together so that my combined list looks like</p>
<pre><code>[['a', 3... | python | [7] |
1,084,043 | 1,084,044 | New Android Developer Console: Update Apk and Store Listing before Publish | <p>I tried uploading an update for the first time using the NEW DEVELOPER CONSOLE. I was very confused and reverted back to the old developer console. I do not understand how to upload a new apk AND edit the store listing (e.g. recent changes) before publishing. I seem to be able to upload APK and publish, or update th... | android | [4] |
95,332 | 95,333 | Unused References in c# application | <p>I develop WinForms applications.
How can I understand which references that I have added to my application are in use, and which ones are unused?</p>
<p><strong>If I don't remove unused references, will they degrade my application performance?</strong></p>
| c# | [0] |
4,428,685 | 4,428,686 | Why does my jQuery-script not work with Internet Explorer 7 | <p>As I've got errors in IE7 - I should to take a closer look at JS file - written before ...(by others). </p>
<p>at this point I'm not sure about anything, so I'd like to ask you - from my point of view is this wrong (aslo spacing can cause problems, I think) - but it is done all over the site:</p>
<pre><code>(funct... | jquery | [5] |
2,049,266 | 2,049,267 | how to modify the document selection in javascript? | <p>I wanna modify the document selection (user currently selected by mouse or keyboard), how to do it in a cross browser way?</p>
| javascript | [3] |
3,422,006 | 3,422,007 | conversion of String to Image android | <pre><code>ArrayList<String> arl =(ArrayList<String>) getIntent().getSerializableExtra("WordList");
</code></pre>
<p>I want a string stored in this array to be converted into image and display the same in the imageview. Anybody suggest how to implement it.</p>
| android | [4] |
4,621,024 | 4,621,025 | Casting to string versus calling ToString | <pre><code>object obj = "Hello";
string str1 = (string)obj;
string str2 = obj.ToString();
</code></pre>
<p>What is the difference between <code>(string)obj</code> and <code>obj.ToString()</code>?</p>
| c# | [0] |
5,552,538 | 5,552,539 | incorrect week_of_year | <p>Have next function to get week of year:</p>
<pre><code>static public Integer getWeek(Date date) {
Calendar cal = Calendar.getInstance();
cal.setMinimalDaysInFirstWeek(1);
cal.setTime(date);
Integer week = cal.WEEK_OF_YEAR;
Integer month = cal.MONTH;
if ((week == 1) && (month == 12)) ... | java | [1] |
583,414 | 583,415 | How to display Coloumn name in WPF ListBox | <p>I am working WPF I display dataContext into the listbox but I want to display Coloumn name.
How I can do it..</p>
| c# | [0] |
75,611 | 75,612 | Remove a row and set back the same ID to next row with jQuery | <p>I have HTML rows containing IDs, like</p>
<pre><code>1
2
3
4
</code></pre>
<p>When I remove ID 2 with jQuery I want that ID 3 should set to 2, like</p>
<pre><code>1
2
3
</code></pre>
| jquery | [5] |
4,412,974 | 4,412,975 | PHP variables issue | <p>I am doing a languages page for my website, placing all texts in variables such as:</p>
<pre><code>if($language=='en') {
lang[1]="Welcome, ".$user."!";
lang[2]="You have earned ".$pts." pts yesterday";
}
elseif($language=='fr') {
lang[1]="Bienvenue, ".$user."!";
lang[2]="Vous avez remporté ".$pts." ... | php | [2] |
4,620,728 | 4,620,729 | Asp.net SQL backed sessions | <p>If I have sessions backed by SQL Server and run a command sequence like</p>
<pre><code>HttpContext.Current.Session['user']
HttpContext.Current.Session['user']
</code></pre>
<p>Will this make 2 requests to the session DB table to fetch the value, or does asp.net do anything special with the Session object to preven... | asp.net | [9] |
4,973,249 | 4,973,250 | get an element of a matrix | <p>I have a matrix of object and I want to get an element of it giving the int of the place.</p>
<pre><code>Computer matrix[][]=new Computer[rows][cols]
public Computer getComputerInTheMatrix(int n_rows,int n_cols){
return matrix[n_rows][n_cols];
}
</code></pre>
<p>is it right this method?</p>
| java | [1] |
1,338,642 | 1,338,643 | Decimal to string conversion issue | <pre><code>Math.Round((ClosePrice - OpenPrice), 5) = -0.00001
</code></pre>
<p>But When I convert it into tostring it gives "-1E-05"</p>
<pre><code>Math.Round((ClosePrice - OpenPrice), 5).ToString() = "-1E-05"
</code></pre>
<p>Why this is so ? How can I get "-0.00001"</p>
| c# | [0] |
418,019 | 418,020 | I need to transfers all visits from domain.com/example/xxx to domain.com/mypages/?id=xxx using php | <p>I need to transfers all visits from domain.com/example/xxx to domain.com/mypages/?id=xxx
using php</p>
<p>Thanks in advance guys,
How do I do this ?</p>
| php | [2] |
3,842,214 | 3,842,215 | Get server path minus file name in PHP | <p>I have a PHP script I am writing that will be used on more than one server. So it could be at any of these:</p>
<pre><code>/home/14535/domains/something.com/html/miller/test/index.php
/home/12345/domains/something.com/html/jones/test/dir4/index.php
/home/11112/domains/something.com/html/smith/test/test2/test3/inde... | php | [2] |
577,704 | 577,705 | hide a portion of button under textedit | <p>I am trying to achieve exactly something like this</p>
<p><img src="http://i.stack.imgur.com/l9lk9.png" alt="alt text">
- a text view on left and a button to its right
- Button should be wrap_text
- textedit should occupy the remaining space</p>
<p>If you carefully see the image in the image the buttons left cu... | android | [4] |
3,123,033 | 3,123,034 | BufferedReader issue - doesn't respond properly | <p>I found this TCP server online, I want to modify it a little bit to return different message than was typed in the client. It doesn't work as I want; the <code>else {}</code> works "like a charm" but the first if doesn't - the client is still waiting for input.</p>
<p>server.java</p>
<pre><code>while(true)
{
Socke... | java | [1] |
4,851,527 | 4,851,528 | Printing to multiple output files in java | <p>I have two arrays that I want to print to separate files. Here's my code:</p>
<pre><code> try {
PrintStream out = new PrintStream(new FileOutputStream(
"Edges.txt"));
for (i = 0; i < bcount; i++) {
out.println(b[i][0] + " " + b[i][1]);
}
out.close();
} catch (Fi... | java | [1] |
5,975,960 | 5,975,961 | Is their a way to check duplicate images with different names using php? | <p>Is their a way to check duplicate images with different names using php ? i want to delete all duplicates ></p>
| php | [2] |
5,212,318 | 5,212,319 | Curtain up and down type animation to remove a view? | <p>I have an application in which i want to include a curtain raiser type animation to remove my splash view from the window?can anybody help me how to achieve this?</p>
| iphone | [8] |
5,664,667 | 5,664,668 | Adding values to some divs withing a wrapped set with jquery | <p>I am so bad with jquery I should ask for forgiveness :)</p>
<p>I have a div element similar to this:</p>
<pre><code><div id="MyDiv"><span id="Title"></span><div id="Text"></div></div>
</code></pre>
<p>I find it with the proper selector:</p>
<pre><code>var myDiv = $("#MyDiv")
<... | jquery | [5] |
3,338,982 | 3,338,983 | How to establish an internet link between an android phone and laptop using Java | <p>I am developing a team viewer kind of application to access remote computer using android phone for academic purpose. How can one establish a connection between the phone and PC using the Internet specifically.</p>
| android | [4] |
2,964,541 | 2,964,542 | Not understanding why this won't sum up properly | <pre><code>grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]
def grades_sum(grades):
sum = 0
for i in grades:
sum += grades[i]
print(grades_sum(grades))
</code></pre>
<p>That's my code and I'm trying to understand why I'm getting an out of index traceback.</p>
| python | [7] |
3,250,559 | 3,250,560 | Hosting a html page of images on localhost and accessing it through web crawler, and downloading the image | <p>I have created a web crawler in python that accesses the web page & downloads images from that page. The code of web crawler is:</p>
<pre><code># ImageDownloader.py
# Finds and downloads all images from any given URL.
import urllib2
import re from os.path
import basename from urlparse
import urlsplit
url =... | python | [7] |
3,805,928 | 3,805,929 | What do I do after studying the basics of Python? | <p>If someone now studies the basics of the Python what should he do after that? Are there specific books he must read? Or, what exactly?</p>
<p>In other words, what is the pathway to mastering Python?</p>
<p>Thanks</p>
| python | [7] |
2,331,573 | 2,331,574 | Python, documentation strings within classes | <p>How do I print documentation strings within classes</p>
<p>For functions i can do this:</p>
<pre><code>def func():
"""
doc string
"""
print func.__doc__
</code></pre>
<p>Is it possible to do the same thing with a class</p>
<pre><code>class MyClass(object):
def __init__(self):
"""
... | python | [7] |
891,061 | 891,062 | Escape quotes while spliting string in javascript | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1293147/javascript-code-to-parse-csv-data">Javascript code to parse CSV data</a> </p>
</blockquote>
<p>Simple and straight, if I have a string like: 1001,"abc, xyz", 34</p>
<p>I want it to split into 3 strings ... | javascript | [3] |
3,614,654 | 3,614,655 | Block fsockopen() errors | <p>I would like to block the errors that fsockopen() gives me. </p>
<blockquote>
<p>(Warning: fsockopen() [function.fsockopen]: unable to connect to 50.31.65.135:27015 (Connection timed out) in /home/reverbga/public_html/query/query.php on line 6)</p>
</blockquote>
<p>I just want it to not show that, as I use fsock... | php | [2] |
1,743,519 | 1,743,520 | Pass more values in doInBackground AsyncTask Android | <p>How to pass more values in the <code>doInBackground</code> </p>
<p>My <code>AsyncTask</code> looks like this. </p>
<pre><code>private class DownloadFile extends AsyncTask<String, Integer, String> {
@Override
protected String doInBackground(String... sUrl) {
{
}
}
</code></pre... | android | [4] |
683,779 | 683,780 | FormsAuthentication.RedirectFromLoginPage is not working | <p>I am working on a LoginPage.Everything related to database or C# code is working fine but after successul login I am unable to redirect to Home.aspx,am I missing Something? Pls help.
<strong>Code:</strong></p>
<p><strong>Web.Config:</strong></p>
<p>
</p>
<pre><code></authentication>
<authoriza... | asp.net | [9] |
1,554,806 | 1,554,807 | How do I detect a max. recursion depth exceeded exception in Python? | <pre><code>try:
recursive_function()
except RuntimeError e:
# is this a max. recursion depth exceeded exception?
</code></pre>
<p>How do I tell when the maximum recursion depth has been reached?</p>
| python | [7] |
1,476,744 | 1,476,745 | Why the callback function (2nd animation callback) executes as loop causing images to keep on moving left? | <p>My images are absolute positioned horizontally and should move right to end after each interval.</p>
<p>When the first image reaches the last images place they should come back left to the beginning position. </p>
<p>My code does this but it keeps on moving the images left to thousands of px.<br>
After that they s... | jquery | [5] |
1,859,467 | 1,859,468 | How can you add multiple input fields in a clone() with incrementing ID's with JQuery? | <p>Using JQuery i am cloning this fieldset:</p>
<pre><code><fieldset class="pollQuestion" id="pq1">
<ul>
<label>Answers</label>
<li id="answerFields">
<input type="text" id="formanswer1" value="" />
</li>
<li>
&... | jquery | [5] |
3,690,978 | 3,690,979 | How to convert string to byte in Java | <p>I have a String array.
I want to convert it to byte array.
I use the Java program.
For example:</p>
<pre><code>String str[] = {"aa", "55"};
</code></pre>
<p>convert to:</p>
<pre><code>byte new[] = {(byte)0xaa, (byte)0x55};
</code></pre>
<p>What can I do?</p>
| java | [1] |
5,524,730 | 5,524,731 | stringstream won't convert to correct number value | <p>[SOLVED] See my answer below.</p>
<p>I am trying to use stringstream (named ss) to convert some strings to ints and some to double and such, but the values are all coming out wrong. I have a vector of strings named vec, initialized like this:<br/>
[0] = ID # in hex<br/>
[1] = phone number<br/>
[2] = last name<br/>
... | c++ | [6] |
4,323,455 | 4,323,456 | Cannot implicitly convert type 'int' to 'string' | <p>My code:</p>
<pre><code>public void FillMaxBankCode()
{
try
{
DataSet ds = new DataSet();
ds = bol.SelectMaxBankCode();
string j = ds.Tables[0].Rows[0].ToString();
txtbankid.Text = int.Parse(j); //ERROR HERE
}
catch (Exception ex)
{
MessageBox.Show(ex.Mess... | c# | [0] |
4,121,230 | 4,121,231 | php echo variable combining test problem | <p>I have the following in a for loop over $x. $x is from 1 to 100. I have variables t1 to t100 already assigned. I want to echo them without typing each one individually, hence the for loop. BUT the following does not work...How can I fix this?</p>
<p>echo "<br>'$t.$x'";</p>
| php | [2] |
5,544,734 | 5,544,735 | Error in "C:\Users\lenovo\Desktop\android-sdk_r06-windows\android-sdk-windows>>SDK Setup.exe" | <p>Ihave had "Failed to fetch URL <a href="https://dl-ssl.google.com/android/repository/repository.xml" rel="nofollow">https://dl-ssl.google.com/android/repository/repository.xml</a>, reason: Connection timed out: connect" Error for 2 weeks. What shoul I do? Please help...</p>
| android | [4] |
3,272,398 | 3,272,399 | Python: if error raised i want to stay in script | <p>I'm doing some practice problems from online with python and I have a question about how to stay in a script if an error is raised. For example, I want to read in values from prompt and compare them to a set integer value inside the script. The only problem is that when someone enters something other than a number '... | python | [7] |
2,797,412 | 2,797,413 | Wordpress > getting full path to my theme's images directory regardless of parent paths | <p>I have a function whose purpose is to list the folders within the images directory of my wordpress theme. It works great when the user has installed wordpress in the root directory of the site. However, it fails if the user has installed wordpress in a folder under the root...</p>
<p>$mydir = get_dirs($_SERVER['DOC... | php | [2] |
5,115,577 | 5,115,578 | Copy Constructor Doubt | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2685854/why-should-the-copy-constructor-accept-its-parameter-by-reference-in-c">Why should the copy constructor accept its parameter by reference in C++?</a> </p>
</blockquote>
<p>In wikipedia, it is mentioned t... | c++ | [6] |
3,778,460 | 3,778,461 | Pass by ref and typecast at the same time | <p>Is there a way to do this in C#? </p>
<pre><code>private void Caller()
{
MyControl c = new MyControl();
Callee(ref c); //Here I want to cast c as Control and pass by ref
}
private void Callee(ref Control c)
{
}
</code></pre>
<hr>
<p>In the generics example, how does it infer T = MyCont... | c# | [0] |
1,740,775 | 1,740,776 | ICMP Disable/Blocked:How To Check Internet Connection Using C# | <p>If ICMP Is Blocked/Disabled by Administrator. Is there any way to check the internet connection through C# when ping test is not possible.</p>
<p>Thanks in Advance.</p>
| c# | [0] |
4,960,029 | 4,960,030 | android mysterious app loading | <p>I've discovered that some of the basic apps on my android phone such as email, gallery, videos appear to have been started when the phone was simply lying on my desk doing nothing - even during the early hours of the morning. Does anyone know if this is to be expected and if so why?</p>
| android | [4] |
4,896,686 | 4,896,687 | How to get MenuItems from Different Android application | <p>I have called "Contacts" app's EditContactActivity from MyApplication. I want to get Contextmenuitems ie ( "Send sms" , "call" , "Edit" , etc ) as menus. So i can use this menu in my application.</p>
| android | [4] |
5,939,306 | 5,939,307 | How to mask a password in command line | <p>I want to mask a password. I used System.console() but it is not better and sometimes it returns null. Is there any other way to stop echo and mask a password? I am new to java. So please can anyone explain how to do this.</p>
| java | [1] |
848,735 | 848,736 | Need help with complicated search | <p>I need to search <code>src="http://www.domain.com/wp-content/uploads/2010/12/6a00e54fa8abf788330147e0622c2e970b-800wi.jpg"</code> </p>
<p>and get <code>http://www.domain.com/wp-content/uploads/2010/12/</code></p>
<p>Since I never know how long the string is I need to get everything up to the last /</p>
| php | [2] |
900,380 | 900,381 | Is it possible to get the value of an overridden NON static member variable of a parent class? | <p>Is it possible to get the value of an overridden NON static member variable of a parent class?</p>
<p>I understand that to get the value of a STATIC member variable you use self::$var1 or ClassName::$var1, but how do you get the value of a NON static member variable?</p>
<p>For instance...</p>
<pre><code>class On... | php | [2] |
1,640,052 | 1,640,053 | Noob question about Android element ID naming | <p>So I have a string in my strings.xml file declared like so:</p>
<pre><code><string name="welcome">Please hit the menu to begin</string>
</code></pre>
<p>And I have a TextView in my main.xml that uses it like so:</p>
<pre><code><TextView
android:id="@string/welcome"
android:layout_width="fill_parent... | android | [4] |
2,177,373 | 2,177,374 | Android: Store Class file in Resources? | <p>I am trying to store a saved class binary file in my application's resources. Where should I put it and how can I access it in the application?</p>
| android | [4] |
2,118,622 | 2,118,623 | How to set up Python for .NET with Python 2.6.1? | <p>The "final" release of Python for .NET (<a href="http://sourceforge.net/project/showfiles.php?group%5Fid=162464&package%5Fid=183296&release%5Fid=537499" rel="nofollow" title="link">link</a>) isn't pre-compiled for Python 2.6. I don't have a problem changing the compilation symbol to PYTHON26 as specified in ... | python | [7] |
2,596,806 | 2,596,807 | No delay in jQuery statement | <p>I want some characters to appear gradually, so i've built this script. However, the delay seems not to execute at all - i tried to put it to several thousands with no change in result. What do i miss?</p>
<pre><code>$(document).ready(function () {
var
i,
d = [500, 300, 600, 1000],
t = ... | jquery | [5] |
2,602,510 | 2,602,511 | Math.round MAX returnable value | <p>Am using Math.round and I am finding that it will not return me any value larger then (2^32/2)-1, but the documentation states it can/will return long values, i.e. 2^64... There a code snippet below.</p>
<pre><code>long bTmp = (long)Math.round(4294967296L);
System.out.println(bTmp);
System.out.println(Long.MAX_VALU... | java | [1] |
5,032,472 | 5,032,473 | Making an on/off button with images | <p>I have two images, sound_on.png and sound_off.png. Both have the same height and dimensions.</p>
<p>I would like to attach a JavaScript for the following action:</p>
<ol>
<li>When the pressed images changes from sound_off.png to sound_on.png and the sound plays</li>
<li>When the button is pressed again it changes ... | javascript | [3] |
2,077,557 | 2,077,558 | unix timestamp conversion results not accurate php | <p>I am trying to convert a unix timestamp into readable text. The timestamp is stored in a database and shown in a table. The problem is the results are not accurate.
<hr />
<strong>Code:</strong></p>
<pre><code><td>'.date("F j, Y, g:i a", strtotime($row['expire'])).'</td>
</code></pre>
<p><hr />
<strong... | php | [2] |
10,952 | 10,953 | Checking if an application is launchable | <p>I have a list of applications, and I want to weed out all the non launchable/non removeable ones. When I run my program on my phone, it gives me all the ones I dont want also, and yes i have:</p>
<pre><code>getInstalledApps(false); /* false = no system packages */
</code></pre>
<p>Any Ideas?</p>
| android | [4] |
379,921 | 379,922 | tab menu, delay when clicking through tabs... jquery fix to show loading msg if load time over 1 sec? | <p>I'm wondering if anyone knows a fix for this.</p>
<p>I have a tab menu and when you click between tabs sometimes there is a delay in the page opening, - the difference can be from m/s to about half a minute - so i tried to add in a loading message for the pages that seemed to take a while. </p>
<p>I thought i had ... | jquery | [5] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.