Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
4,689,151 | 4,689,152 | about:blank page after running my ASP.NET web app using Ctrl + F5 | <p>my web application open about:blank page when i tried to run it using Ctrl+F5.</p>
<p>i am using VS2008 C# ASP.NET web application.</p>
<p>also i set a start up page to the my project.</p>
<p>please what is this page?and how to overcome it?</p>
<p>thanks</p>
| asp.net | [9] |
2,097,881 | 2,097,882 | warning C4251: needs to have dll-interface to be used by clients of class | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4145605/stdvector-needs-to-have-dll-interface-to-be-used-by-clients-of-class-xt-war">std::vector needs to have dll-interface to be used by clients of class 'X<T> warning</a> </p>
</blockquote>
<p>This ... | c++ | [6] |
2,951,796 | 2,951,797 | a list > a list of lists | <p>In python, how can I split a long list into a list of lists wherever I come across '-'. For example, how can I convert:</p>
<pre><code>['1', 'a', 'b','---', '2','c','d','---','3','123','e','---','4']
</code></pre>
<p>to </p>
<pre><code>[['1', 'a', 'b'],['2','c','d'],['3','123','e'],['4']]
</code></pre>
<p>Many t... | python | [7] |
4,637,097 | 4,637,098 | dynamic tree creation using jquery | <p>i Want to create dynamuc dree using jquery at client side and java(jsp/servlet) at backend using mysql database.Please suggest me how can i implemet that.I want to add further functionality like add node,add child,add leaf node.</p>
| jquery | [5] |
5,362,713 | 5,362,714 | jQuery: How to select elements inside a div? | <p>I have a list of <code>video objects</code> that are rendered in HTML as </p>
<pre><code> <div class="video">
<p class='title'> {{ video.title }} </p>
<p class='url'> {{ video.url }} </p>
<button class="btn btn-primary queue" href="#">queue</button&... | jquery | [5] |
1,144,574 | 1,144,575 | How can i make this output easier? | <p>The problem i am having is i have to input 50 integers, and when i hit space it wont recongnize the number and when i hit enter then my output box is very very long for just 1 digit #'s</p>
<pre><code>static final int MAX = 50;
public static void main(String[] args)
{
int index;
int check;
int infants =... | java | [1] |
624,518 | 624,519 | Effective activity List | <p>Iam trying to make my Activity List more effective.
I have an Activity List in my app, on every call its going to the database collecting some information and show it on the screen(as List).</p>
<p>so basiclly everytime you finish and re-call that list, it's calling onCreate.. again and again..
my problem here is w... | android | [4] |
224,556 | 224,557 | Java library to scan image using a scanner | <p>In my project I want to scan an image using a scanner. Which Java library could I use to grab the scanned image from a scanner?</p>
| java | [1] |
1,377,899 | 1,377,900 | How can I call a particular base class method in Python? | <p>Let's say, I have the following two classes:</p>
<pre><code>class A(object):
def __init__(self, i):
self.i = i
class B(object):
def __init__(self, j):
self.j = j
class C(A, B):
def __init__(self):
super(C, self).__init__(self, 4)
c = C()
</code></pre>
<p>c will only have the i ... | python | [7] |
1,981,023 | 1,981,024 | iPhone UISlider question | <p>Why is it that in the following code:</p>
<pre><code>-(IBAction)updateSlider:(id)sender {
UISlider *slider = (UISlider *) sender;
int amount = (int)(slider.value);
NSString *newText = [[NSString alloc]initWithFormat:@"%d", amount];
sliderLabel.text = newText;
newText.release;
</code></pre>
<p>}</p>
<p>the line ... | iphone | [8] |
3,768,464 | 3,768,465 | ListView items won't show focus color when click | <p>When i click on listview, its not show the focus color .</p>
<blockquote>
<pre><code><ListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:divider="@color/grey"
android:dividerHeight="1px"
and... | android | [4] |
5,136,781 | 5,136,782 | closing pop up window on button click(if successcede) and reload parent window | <p>I am using this code.This pop up window pops up when I clicks a button on the main page.Now I want the pop up window to be closed if the password is successfully changed and reload the main page,but if the password is not changed then refresh the pop up window again.
I used javascript for form validation<code>enter ... | asp.net | [9] |
4,379,411 | 4,379,412 | Can I write an .aspx app on Windows XP? | <p>I'm planning to write a aspx pages on Windows XP machine. I have IIS 7.0 enabled and virtual directory setup. Are aspx page developments allowed on Win XP?</p>
| asp.net | [9] |
2,547,426 | 2,547,427 | Writing files on iPhone | <p>I am going to store a .xml file on the iphone through an app I have made. I have written some code:</p>
<pre><code>NSString* documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *resPath = [documentsPath stringByAppendingPathComponent:@"FILENAME... | iphone | [8] |
115,174 | 115,175 | How to tie into a domain server's login for program access rights | <p>I need to write a program used internally where different users will have different abilities within the program.</p>
<p>Rather than making users have a new username and password, how do I tie into an existing domain server's login system?</p>
<p>Assume .NET (C#, VB, ASP, etc)</p>
| c# | [0] |
357,950 | 357,951 | C# - How to add a reference do system.numerics.dll | <p>I want to use the BigInteger class from the System.Numerics but if i want to write </p>
<pre><code>using System.Numerics
</code></pre>
<p>Numerics is not found.
I searched the web and I found that I have to add a reference to System.Numerics.dll
But how can I do that?</p>
| c# | [0] |
413,322 | 413,323 | How to expose internal System.Array | <p>I have a class that is a container for two fixed length arrays as well as some other members. I want to expose the elements of the array for assignment outside the class.</p>
<p>Example would be:</p>
<pre><code> using System.Collections.ObjectModel;
class ArrayContainer<T, U>
{
private T[... | c# | [0] |
5,254,880 | 5,254,881 | hide scrollview stick android | <p>i have build an app in which i need to use <strong>scroll-view</strong> in but i dont need to appear scroll stick on screen so how can i do that?make sure scroll functionality should be working. </p>
<p><img src="http://i.stack.imgur.com/18vmw.png" alt="enter image description here"> </p>
| android | [4] |
3,575,504 | 3,575,505 | Validate plugin and CK Editor? | <p>Before submitting my form I:</p>
<pre><code>CKEDITOR.instances.ckEditor.updateElement();
</code></pre>
<p>This copies the content of CKEditor to the text area it replaced (id of ckEditor, name of article).</p>
<p>Using validate plug in I have the following rules:</p>
<pre><code>rules: {
article: {
... | jquery | [5] |
5,379,250 | 5,379,251 | iphone development | <p>What are the options for developing iPhone apps?
Currently I've tried to install gnu kit for Linux without success! Too many steps, and at the and I was unable to compile a single app.
The Apple SDK seems to be much more easy, but I don't have a Mac.
So am I missing something?</p>
| iphone | [8] |
3,338,125 | 3,338,126 | How do you check for end of line in c++? | <p>I have to accept space separated integers from user but stop when i encounter a new line.
For example: </p>
<pre><code>3 5 7 9
23 47
6
</code></pre>
<p>In this example I must store <code>3, 5, 7, 9</code> in array 1, <code>23, 47</code> in array 2, <code>6</code> in array 3.
Unfortunately, I don't know how to chec... | c++ | [6] |
2,016,915 | 2,016,916 | how to choose load factor | <p>I have read about the concept of Load factor for hash based collections. I got the concept. But I am unable to answer that "Load factor should be less or more. On what basis should I choose Load factor and what is the impact if I choose small value for load factor and what if I choose big".</p>
| java | [1] |
3,319,769 | 3,319,770 | Use ZXing camera decoding confusion | <p>I check the Internet and see using ZXing to solve two-dimension code. But the code I do not understand.</p>
<pre><code>PlanarYUVLuminanceSource source = new PlanarYUVLuminanceSource( data, width, height, dstLeft, dstTop, dstWidth,dstHeight, false);
</code></pre>
<p>What the meaning of the parameter? </p>
| android | [4] |
3,647,292 | 3,647,293 | java file/directory api | <p>Is there an API that can provide me more in depth information on a file/directory on the disk? For e.g. I would want to know if a drive is a root drive or a floppy drive , a file is a hidden file etc..?</p>
<p>Thanks
Shafi</p>
| java | [1] |
4,694,031 | 4,694,032 | Fetch data from a given website | <p>I want to create a web service in ASP.NET that fetches data from a website every hour or so (the storing part I got it covered). <a href="http://www.metacritic.com/video/titles/12rounds" rel="nofollow">In this example</a>, metacritic.com, how can I get the Users score of a movie at any given time interval? </p>
<p... | asp.net | [9] |
5,003,670 | 5,003,671 | (Python) Can some explain what this function is doing (use of object attributes) | <p>I am carrying out code maintenance on an old Python script. I have come accross a piece of the code, which has me flumoxed. Earlier on in the code (not shown in the snippet below), class are defined, with minimal attributes. Further on in the code, assignments are made to non existent fields in the class. For exampl... | python | [7] |
5,490,302 | 5,490,303 | Can constructorless classes have their methods called without instantiation? | <p>Can I avoid initializing this?</p>
<p>I have a simple factory with <strong>no constructor</strong>. I use it like this:</p>
<pre><code>var slf = new GenericSelectListFactory();
vm.Works = slf.getWorkgsl(0);
vm.Cars = slf.getCargsl(0);
</code></pre>
<p>I can also use it like this:</p>
<pre><code>vm.Cars = new Gen... | c# | [0] |
2,453,996 | 2,453,997 | Alternatives to jquery hide()/show()? | <p>I am trying to hide an element in my page (it is a youtube player instance). When I use jquery's hide() method, the player gets a bit wonky, in that it stops responding, even after I call .show() again.</p>
<p>Is there another variant on hide(), maybe something like .opacity(0), or .visibility('none') that I can us... | jquery | [5] |
727,624 | 727,625 | How to lock android device by using programatically...Is it Possible? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4545079/lock-the-android-device-programatically">Lock the android device programatically</a> </p>
</blockquote>
<p>Can any one help me how to lock a device using java Program, and here i am not using any UI mean... | android | [4] |
4,142,526 | 4,142,527 | access and modify array through include file and function | <p>Not sure why I can't modify an array by calling a function that includes a file that then references that array.</p>
<p>Here is the situation:</p>
<p>config.php:</p>
<pre><code>$db['default']['password'] = "password";
$db['default']['database'] = "dbname";
check_if_local_file_exists(__FILE__);
</code></pre>
<... | php | [2] |
3,537,900 | 3,537,901 | onRestoreInstanceState() not being called when it is expected | <p>I have run into some trouble lately with <code>onSaveInstanceState()</code> and <code>onRestoreInstanceState()</code>. I have multiple activities that use these methods to save state in the case that they are cleaned up by the system. Most of them work, except for one, and I have no idea why.</p>
<p>What specifical... | android | [4] |
4,621,275 | 4,621,276 | 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,339,088 | 4,339,089 | Android: float - get rid of trailing point zeros | <p>i did a lot of search on the internet but could not get a satisfacting solution.
The best I did was:</p>
<pre><code>String b = new BigDecimal(floatNumber.stripTrailingZeros().toPlainString();
</code></pre>
<p>But it hast some nasty bugs, e.g. if the number is 1.6 i get 1.600000744 (or similar). </p>
<p>thanks</p>... | android | [4] |
5,883,232 | 5,883,233 | What is the use of IClonable interface in .NET? | <p>I just wanted to know what is the use of IClonable interface in .NET?</p>
| c# | [0] |
847,136 | 847,137 | How to set onclick function to dynamic textview in android? | <p>I set the <code>onClick()</code> function, but when I click the text it works two times that mean I have two dynamic text view. How to resolve it?</p>
<p>My code:</p>
<pre><code>TextView tView[] = new TextView [Array.length];
for(int i =1; i<Array.length; i++)
{
tview[i] = new TextView(this);
tview[i].s... | android | [4] |
27,847 | 27,848 | Autocomplete list for group of text boxes | <p>From my particular question I have got answer for implementing auto complete list..but issue is when I clicked on any suggested it blanks my input box. I have input boxes with class <code>track</code>. My function that I used for on blur event is..</p>
<pre><code><input name="track[]" type="text" class="track" m... | jquery | [5] |
721,741 | 721,742 | Is it possible to open a new window using location.href=""? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/11540085/open-and-close-javascript-window">open and close javascript window</a> </p>
</blockquote>
<p>Is it possible to open a new window using <code>location.href=""</code>? If so, how?</p>
| javascript | [3] |
4,332,202 | 4,332,203 | how to redirect to login page if the users copy the link and paste it in the other tab | <p>I am Developing an application where the user enters their username and password to get into the application. If f he copies the url and pastes it into another other tab it should redirect to the login page with a warning message. How can I do this?</p>
| c# | [0] |
4,659,399 | 4,659,400 | Is there a way to capture all FormClosed event in C# within an application automatically? | <p>I would like to centralize code handler for all FormClosed Event, is there a way to be notified automatically by all forms that are closing ?</p>
| c# | [0] |
2,328,359 | 2,328,360 | How to give space in javascript? | <p>I have a response where I have an Image in that response and after every response I need to give a space.How can I do that?</p>
<p>Any help will be appreciated!</p>
<p>Here is my script:</p>
<pre><code><script type="text/javascript>
$("#thumbnail").append(response)
</script>
</code></pre>
| javascript | [3] |
154,390 | 154,391 | segmentation fault for the code | <pre><code>#include<iostream>
#include<stdlib.h>
#include<string.h>
#include<stdio.h>
using namespace std;
union type{
int a;
char b;
int *p;
char *s;
int arr[10];
};
int fn(union type *exp){
exp->p = exp->p+1;
cout &l... | c++ | [6] |
2,326,504 | 2,326,505 | Preventing Negative Numbers in TextView | <p>I have a TextView that displays a number (in this case, the number is 10). </p>
<p>Now, i have a button so the user has to press that button 10 times in order for the number to hit 0, resulting in moving on to the next level. However, </p>
<p>I can keep hitting that button and it starts its way back into the negat... | android | [4] |
399,476 | 399,477 | How to Custom Tab bar item text | <p>I am using five tab bar items in the tab bar,i want to custom the text which is displayed on that.Is it possible.Please help me in this.Thanks in advance</p>
<p>Thanks
ask</p>
| iphone | [8] |
2,087,474 | 2,087,475 | Is it possible to use sub folders in drawables in Android? | <p>In my application I have several folders and subfolders of images. They are inside drawables. How can I retrieve images from drawables subfolders?</p>
<p>Example:</p>
<p>drawable>actions>sports>soccer.png</p>
<p>How can I get this "soccer.png" photo?</p>
<p>Any help is appreciated.</p>
<p>Thanks!</p>
| android | [4] |
1,974,379 | 1,974,380 | Android TextToSpeech setLanguage works on emulator but not on the phone | <p>I am having a very annoying problem with Android TextToSpeech API.
When I try to set up a language like this for example :</p>
<pre><code>int result = tts.setLanguage(Locale.GERMANY);
</code></pre>
<p>The result is SUCCESS, but the TTS still uses default language, instead of the one I set up.</p>
<p>The weird th... | android | [4] |
1,264,034 | 1,264,035 | Modify the hover jquery function | <p>Consider the following:
There is a panel (let it be a div element) who's height is controlled using the hover function. The only css property that is animated is height. Both of the animations (on mouse over height+=500px; on mouse out height-=500px) have duration of 10 seconds.
Can u imagine this: douring the perio... | jquery | [5] |
4,531,472 | 4,531,473 | Window Focus Disable in Android | <p>I am stuck in a scenario. I have a login Form. I want to show it as disabled for some users. I can get that users but I dont know how to remove the focus from the window.</p>
<pre><code>//to check whether the current user is administrator or not
public void checkAdministrator(){
String owner = ParseVal... | android | [4] |
2,458,612 | 2,458,613 | javascript text wrapper | <p>i want to create a simple text editor for a website which works something like forums.. eg. if the user clicks on font color(<strong>after selecting a particular text</strong>), the selected text should be wrapped around some text something like [FONT COLOR="some_color"]sample text[/FONT]</p>
<p>i don't wanna use t... | javascript | [3] |
2,937,646 | 2,937,647 | from server check for file on another server | <p>I have two server may be they will be at same network or not,while doing some work in jsp page at server 1 ,I want to check if file exist or not on the second server , How I can do this?</p>
| java | [1] |
3,439,231 | 3,439,232 | Function file with 2,000 rows adding to each page. Is it ok? | <p>I have PHP function file with ~2,000 rows and I always include it for each page. Do those many rows make my site slower? Should I separate function file to different files? Thank you.</p>
| php | [2] |
4,978,760 | 4,978,761 | Regarding download image from url in android | <p>I am developing an android application in which i have data coming from Url,The url has 3 images,along with text.I want to show all the images in list along with text.I looked at the some sample url along with lazy loading,code,,,,can anyone guide me how to do this</p>
<p>It is the url
<a href="http://www.harpreetv... | android | [4] |
5,658,344 | 5,658,345 | Difference between these two types of self executing function on JavaScript | <p>I always use the following self executing function in order to avoid exposing my code to global scope in JavaScript:</p>
<pre><code>(function() {
//Code comes here
})();
</code></pre>
<p>I believe that this is also called <em>self executing anonymous function</em> as well. Sometimes, I also see the below code... | javascript | [3] |
1,422,085 | 1,422,086 | How can I add a where into my foreach loop in C# | <p>I have the following:</p>
<pre><code>foreach ( var menuItem in Model.menuItems) {
if (menuItem.Type == "02") {
}
}
</code></pre>
<p>The code within the foreach executes only when Type==2 so is there some way that I could add the check for Type == "02" into the top part of my loop.</p>
| c# | [0] |
4,626,801 | 4,626,802 | Problem of subclassing UITableViewCell | <p>I have a class A that inherits UITableViewCell (to customize a table cell). It has members say x which is a UILabel.</p>
<p>Now, if I want to set values like a.x.text ="some text" in the cellForRowAtIndexPath method, I am getting compiler error "error for member x in cell which is of non-class type UITableViewCel... | iphone | [8] |
2,581,242 | 2,581,243 | To calculate the sum of numbers in a list by Python | <p>My data</p>
<pre><code>466.67
465.56
464.44
463.33
462.22
461.11
460.00
458.89
...
</code></pre>
<p>I run in Python</p>
<pre><code>sum(/tmp/1,0)
</code></pre>
<p>I get an error.</p>
<p><strong>How can you calculate the sum of the values by Python?</strong></p>
| python | [7] |
2,045,906 | 2,045,907 | First next/previous substring positions in Javascript | <p>Let's say I have a long string, for instance:</p>
<pre><code>var sentence = "Marry had a little lamb, Peter had a little wolf, the wolf ate the little lamb and the little wolf was happy.";
</code></pre>
<p>I need to find the position of the substring "Peter" inside the string.</p>
<p>That, of course, is <code>var... | javascript | [3] |
1,714,912 | 1,714,913 | Is the android:id attribute required for all views in my layout? | <p>Is the <a href="http://developer.android.com/guide/topics/ui/declaring-layout.html#id" rel="nofollow"><code>android:id</code></a> attribute required for all views in my layout? What is the best practice?</p>
<p>I would prefer to specify IDs in the rare instances that I need it (like <code>x:Name</code> in WPF), but... | android | [4] |
5,629,555 | 5,629,556 | c# logic to get the first non-repeating(distinct) character from the string | <p>In c# i want to create logic that if i a string like abcabda is passed to a method then it should return first non repeative character from string like in above it should return c.
i am unable to convert a string to array of character then how to make comparison of each array character to the string and return the ... | c# | [0] |
3,111,666 | 3,111,667 | Inserting a string into a list without getting split into characters | <p>I'm new to Python and can't find a way to insert a string into a list without it getting split into individual characters:</p>
<pre><code>>>> list=['hello','world']
>>> list
['hello', 'world']
>>> list[:0]='foo'
>>> list
['f', 'o', 'o', 'hello', 'world']
</code></pre>
<p>What sh... | python | [7] |
3,602,649 | 3,602,650 | android application running in simulator but not in mobile devices | <p>Recently I've created one android application using eclipse and ran it using android virtual device manager. It ran successfully in the simulator, but whenever I am trying to install it in mobile device HTC Salsa (2.3 ginger bread) it is showing an error message and not proceeding. The error message is:</p>
<blockq... | android | [4] |
598,105 | 598,106 | extract url from string with Javascript | <p>this sounds like something you could just google, but been looking for hours.</p>
<p>basically have this string i am ajaxing from another site</p>
<pre><code>'function onclick(event) { toFacebook("http://www.domain.com.au/deal/url-test?2049361208?226781981"); }'
</code></pre>
<p>it comes out like that because im ... | javascript | [3] |
2,067,944 | 2,067,945 | How to detect the position of an element changed? | <p>Consider the situation where <strong>div-A</strong> has a relative position to <strong>div-B</strong> (actually,<strong>div-A</strong> is hovering over <strong>div-B</strong> by different <strong>Z-Index</strong>). When the position of <strong>div-B</strong> changes, <strong>div-C</strong> is to be inserted before i... | javascript | [3] |
654,705 | 654,706 | Iterating a dictionary | <p>I have a dictionary where the values are list elements:</p>
<pre><code>dict1={'A':[9,0,8],'B':[6,5,4],'C':[]}
</code></pre>
<p>Now I have to process this dictionary to check if all the values in the dictionary are empty lists; and if so, collect the keys.</p>
<p>Is there a better option than simply iterating thro... | python | [7] |
1,912,092 | 1,912,093 | alertbox in android | <pre><code>AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);
</code></pre>
<p>when i wrote this error is shawn that</p>
<pre><code>The constructor AlertDialog.Builder(new Runnable(){}) is undefined
</code></pre>
<p>.. so just tell me what i m do... </p>
| android | [4] |
581,376 | 581,377 | please explain to me nature of this error showing up when setting static variable | <p>What I wanted to do is to set static $variable to value 'new value', but there an error shows up, saying: </p>
<pre><code>Parse error: syntax error, unexpected '=' in D:\!TC\www\error.php on line 8
class myobj {
static protected $variable = null;
static function test() {
static::variable = 'new value'
}
... | php | [2] |
3,041,641 | 3,041,642 | dirname(php) similar function in c++ | <p>is there is any function in c++ ,similar to <code>dirname</code> in php...it is used to normalize the url </p>
<pre><code>eg
<?php
$url = "../tets/index.html";
$currentURL = "http://example.com/somedir/anotherdir";
echo dirname($currentURL).substr($url, 2);
?>
</code></pre>
| c++ | [6] |
2,354,625 | 2,354,626 | set focus from class library | <p>In my C# (3.5) solution, i have 2 projects- a Class Library and WinForm project.</p>
<p>All business logic are in class library. while adding/updating data from WinForm, if Class Library finds any error, it will raise error and set focus to associate control in WinForm.</p>
<p>Is it possible?</p>
<p>Thanks,
SKPau... | c# | [0] |
3,559,424 | 3,559,425 | How can I detect if a user is away from keyboard? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4516179/detecting-that-the-user-is-away-from-the-pc-with-net">Detecting that the user is away from the PC with .NET</a> </p>
</blockquote>
<p>I want to make a function which determines if someone is currently AF... | c# | [0] |
5,176,901 | 5,176,902 | browse file from sdcard in android | <p>how to browse file from specific folder from sdcard in android?
and if file is media file then on click event of each item it will play.
i am creating project like call recorder so please help me to browse file and how to play this file.
thanx in advance</p>
| android | [4] |
5,798,081 | 5,798,082 | import class defined in same module file? | <p>I have a module file called <code>mymodule.py</code>, which contains the following code:</p>
<pre><code>class foo:
def __init__(self):
self.foo = 1
class bar:
import foo
def __init__(self):
self.bar = foo().foo
</code></pre>
<p>The <code>__init__.py</code> file in the same directory ha... | python | [7] |
5,333,993 | 5,333,994 | Are semicolons needed after an object literal assignment in JavaScript? | <p>The following code illustrates an object literal being assigned, but with no semicolon afterwards:</p>
<pre><code>var literal = {
say: function(msg) { alert(msg); }
}
literal.say("hello world!");
</code></pre>
<p>This appears to be legal, and doesn't issue a warning (at least in FireFox 3). Is this completely... | javascript | [3] |
3,767,650 | 3,767,651 | Java read utf-8 encoded file, character by character | <p>I have a file saved as utf-8 (saved by my application in fact). How do you read it character by character?</p>
<pre><code>File file = new File(folder+name);
FileInputStream fis = new FileInputStream(file);
BufferedInputStream bis = new BufferedInputStream(fis);
DataInputStream dis = new DataInputStream(bis);
</code... | java | [1] |
1,875,227 | 1,875,228 | Python move cursor to end of .txt lines | <p>I need to write() text at the end of every line in a text file. How do I point the cursor to the end of a specific line.</p>
<p>Note: seek(0,2) will put me at the end of the file, but I need the end of each line.</p>
<p>Appreciate the help guys - I've combined your solutions to achieve what I need:</p>
<pre><cod... | python | [7] |
1,449,241 | 1,449,242 | The best practice for not null if statements | <p>I've been writing my "If this variable is not empty" statements like so:</p>
<pre><code>if ($var != '') {
// Yup
}
</code></pre>
<p>But I've asked if this is correct, it hasn't caused a problem for me. Here is the answer I found online:</p>
<pre><code>if (!($error == NULL)) {
/// Yup
}
</code></pre>
<p>This actu... | php | [2] |
4,045,331 | 4,045,332 | Alert user when they hit the browser back button - with good reson | <p>I know this borders on the taboo here, and please don't reply with "you should never do this etc" I have a very long form in a wizard, some users are too used to using the browsers back and forward buttons that they use those instead of the "Back" and "Next" buttons on the form wizard. If they hit the browsers back ... | jquery | [5] |
2,490,189 | 2,490,190 | Zip and UnZip a file programmatically in iphone? | <p>Can we zip and unzip a file through coding? Please send me the rough idea how it's possible.I tried very much but not succeed ...</p>
| iphone | [8] |
4,493,827 | 4,493,828 | php renaming (unknown) uploaded file extension | <p>hi guys i have to rename the (unknown) uploaded file extension from .MP3 to .zip please help I have been stuck with this for a few days now. Thanks in advance:)</p>
<pre><code>if (!copy($file, $newfile)) {
echo "failed to copy $file...\n";
}
$filename = "members/$id/music" . "/" . $_FILES["file"]["name"];
f... | php | [2] |
2,255,277 | 2,255,278 | Android ActivityOptions class not found in Intellij | <p>I am using Intellij IDE and I'm trying to use the ActivityOptions class from android 4.1, but Intellij keeps giving me the error java: cannot find symbol symbol: class ActivityOptions location: package android.app.</p>
<p>I am trying to use this import:</p>
<pre><code>import android.app.ActivityOptions;
</code... | android | [4] |
3,866,662 | 3,866,663 | Converting numbers into alphabets in c++ | <p>I'm trying to write a code that would convert numbers into alphabets. For example 1 will be 'A', 2 will be 'B', 3 will be 'C' and so on. Im thinking of writing 26 if statements. I'm wondering if there's a better way to do this...</p>
<p>Thank you!</p>
| c++ | [6] |
3,103,361 | 3,103,362 | How to delete a file that exists | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1248292/how-to-delete-a-file-from-sd-card">How to delete a file from SD card?</a> </p>
</blockquote>
<p>This should be simple for most people, I want to know how to delete a file in the SD card (<code>/sdcard/fo... | android | [4] |
1,750,989 | 1,750,990 | How do I use Python to convert a string to a number if it has commas in it as thousands separators? | <p>I have a string that represents a number which uses commas to separate thousands. How can I convert this to a number in python?</p>
<pre><code>>>> int("1,000,000")
</code></pre>
<p>Generates a <code>ValueError</code>.</p>
<p>I could replace the commas with empty strings before I try to convert it, but t... | python | [7] |
3,258,562 | 3,258,563 | Loading gif when PHP form is processing | <p>I have a PHP form which includes a file being uploaded upon submit.
As I allow pretty big files, the page can often stand there loading for ages.</p>
<p>Is there a way to show the user a loading animation of some sort?</p>
| php | [2] |
1,018,661 | 1,018,662 | jquery - how to change the selector keeping the action same | <p>Suppose I have an array <code>Boxes={"#box5","#box3",#box1"","#box2","#box4"}</code> and I have a jquery statement</p>
<pre><code>$(Boxes[2]).click(--------some code----------)
</code></pre>
<p>my problem is that the statement is always executed as - when box1 is clicked even though I swap the Box array several ti... | jquery | [5] |
4,462,915 | 4,462,916 | delete the images imagejpeg creates | <p>Is it possible to delete the images that <code>imagejpeg</code> creates I have the images uploading to my Amazon S3 server but the files just pop up in the main directory on my server after its ran. </p>
<pre><code> $new_height = 120;
$width = imagesx($originalImage);
$height = imagesy($originalImage);
... | php | [2] |
4,454,043 | 4,454,044 | how to refresh a page using javascript? | <p>how to refresh a page using javascript or html?</p>
| javascript | [3] |
5,372,417 | 5,372,418 | iPhone Beginner Question - Hooking Up Actions | <p>I'm just starting out with iPhone development, and in my hello world application I'm having a hard time hooking up a view to a controller with actions. I followed the instructions in the book I'm reading (I believe), but depending on where I run the application the app behaves differently.</p>
<p>-When i command-r... | iphone | [8] |
759,128 | 759,129 | Removable module about android | <p>I want to have a removable module which can dynamically add listview.The module can be moved to left or right.How can I achieve this effect?</p>
| android | [4] |
1,908,497 | 1,908,498 | how to download dynamic file name from url | <p>I want to download the file from url link that is always changing in file name like today's date. I tried regex for filename but it is in the url. for example, the real url is <a href="http://www.sunrise.com.au/web/file/item141112_plain.xls" rel="nofollow">http://www.sunrise.com.au/web/file/item141112_plain.xls</a> ... | c# | [0] |
5,620,953 | 5,620,954 | logout user when the session time out | <p>Can this is the right way to log user out when the session timeout.
this is the code which i have written in Page_init of master page.
and also,<br>
session state and Form Authentication is like,</p>
<pre><code><sessionState mode="InProc" timeout="1" cookieless="false">
</sessionState>
<au... | asp.net | [9] |
3,199,962 | 3,199,963 | How do i visualize graphs in java ? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1277126/plot-graphs-in-java">Plot Graphs in Java</a> </p>
</blockquote>
<p>I was trying to create graphs for x and y values in my java Application. Unfortunately while using the libraries in <a href="http://www.... | java | [1] |
5,227,628 | 5,227,629 | Null Exception array | <p>Hi I am working in string array and It seeming wont add the data in the array keep me getting an error or null exception</p>
<pre><code>public boolean addCategory(String description){
if(numCategories <= maxArrayCategories){
arrayCategories[numCategories] = description;
numCategories++;
return true;}... | java | [1] |
505,009 | 505,010 | Is it possible to create a namespace in jQuery? | <p>YUI has a nice way of creating a namespace for your methods etc. in javascript.</p>
<p>Does jQuery have anything similiar?</p>
| jquery | [5] |
1,817,542 | 1,817,543 | FileSystemWatcher and write completion | <p>I am implementing an event handler that must open and process the content of a file created by a third part application over which I have no control. I am warned by a note in "C# 4.0 in a nutshell" (page 495) about the risk to open a file before it is fully populated; so I am wondering how to manage this occurrence.... | c# | [0] |
4,904,433 | 4,904,434 | When to use equality ("==") instead of identity ("===")? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/359494/javascript-vs-does-it-matter-which-equal-operator-i-use">Javascript === vs == : Does it matter which “equal” operator I use?</a> </p>
</blockquote>
<p>Many recommend using <code>===</code> for... | javascript | [3] |
4,411,187 | 4,411,188 | iPhone - too sensitive rotation detection | <p>I have a UIActionSheet based class. The ActionSheets created by this class are designed to vanish if a device orientation rotation is detected.</p>
<p>So, when this class begins I have</p>
<pre><code>[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] add... | iphone | [8] |
3,202,516 | 3,202,517 | Are too many self-invoking funtions in javascript a bad thing? | <p>Is it bad to have too many self-invoking funtions in javascript?</p>
<p>If they all execute right away (page load) aren't you taking more resources than if you had regular functions and call them when you need them? </p>
<p>Or is that a bug that exists in my head?</p>
<p>For example:</p>
<p>Thousands of these:</... | javascript | [3] |
1,688,684 | 1,688,685 | How to convert the sqlite data into xml form? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/8046280/how-to-convert-sqlite-data-into-xml-file-and-xml-file-into-sql-data">How to convert sqlite data into xml file and xml file into sql data?</a> </p>
</blockquote>
<p>iam developing one applciation.In that ... | iphone | [8] |
1,258,298 | 1,258,299 | Is Python set more space efficient than list? | <p><code>list</code> is known to initialize with a big chunk of space to optimize the time needed to expand the list (on average we don't have to keep making new list like an array). </p>
<p>What about <code>set</code>?</p>
<p>The following construction makes it space wasted because of <code>list</code>. I understand... | python | [7] |
2,027,715 | 2,027,716 | Need to insert href="#" like in <a href="#"> in asp:linkbutton | <p>I need to insert href="#" like in in asp:linkbutton. please let me know how I can do this..
Thanks
Mithilesh</p>
| asp.net | [9] |
5,764,693 | 5,764,694 | jQuery conflict in time picker | <p>I have two js files and having conflict in implementation.
Order of my links is:</p>
<pre><code> <script language="javascript" src="../js/time.js"></script>
<script language="javascript" src="../js/time_picker_min.js"></script>
<script type="text/javascript" src="../j... | jquery | [5] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.