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,765,042
4,765,043
program checking string of characters for capital letters
<p>Ok, i have a function which checks if a letter is upper case and returns 'true' or 'false' value.</p> <pre><code>function isUpperCase(aCharacter) { return (aCharacter &gt;= 'A') &amp;&amp; (aCharacter &lt;= 'Z'); } </code></pre> <p>now I would like it to check a string of characters e.g...
javascript
[3]
5,676,111
5,676,112
Does anyone have a good java BitBuffer?
<p>I was working on a school assignment (doing Hoffman encoding) and I need some sort of bitbuffer to use to put all the bits in. While I did find several things doing a google, most of the stuff was garbage - didn't compile, referenced <em>other</em> libraries I didn't have, etc. Does anyone have an actual good bitb...
java
[1]
3,561,903
3,561,904
Sorting of data in specific format
<p>I have tried to edit my code to the following But dont seem to be the correct way:</p> <pre><code>public int Compare(object x, object y) { string s1 = (string)x; string s2 = (string)y; return DateTime.Compare(DateTime.ParseExact(s1.Substring(1), "MMddyyyy", CultureInfo.InvariantCulture), ...
c#
[0]
4,843,625
4,843,626
Fatal error: Call to undefined function easter_date()
<p>I'm trying to get the easter_date from this year. This is my code:</p> <pre><code>&lt;?php $year = date ("Y"); $easter = date ("d-M-Y", easter_date ($year)); echo "Easter " . $year . ": " . $easter . ""; ?&gt;</code></pre> <p>When I execute the code following error appears: Fatal error: Call to undefined function ...
php
[2]
1,134,463
1,134,464
string variable shows wrong length
<p>So I have a function that gets some string variables from a form (after the form is submitted), then runs a query using those variables and returns lines of results. I have several conditions that work fine, except for one and I can't figure out what's wrong. When I print out the query and run it in phpMyadmin - it...
php
[2]
6,005,361
6,005,362
hide/show Scrollview in Navigation Contoller
<p>I am using a Navigation Controller. On top of the AppDelegate window I added a view that contains a scrollview and toolbar that I want to be using throughout the app. They appear fine on all the view controllers that I am using in the navigation controller. Now I would like to be able to hide and show them from each...
iphone
[8]
2,899,141
2,899,142
Python calling function with return statement
<p>I have the below piece that created few person objects and apply some methods on those objects.</p> <pre><code>class Person: def __init__(self, name, age, pay=0, job=None): self.name = name self.age = age self.pay = pay self.job = job def lastname(self): return s...
python
[7]
241,968
241,969
how to play MID sound file in iphone?
<p>I have implement game application in which i want to play mid sound file in the background.How it possible?</p>
iphone
[8]
1,263,304
1,263,305
Sharing resources between service and application in android
<p>The code I am trying to implement includes a service and an application. When the application is first launched, it starts the service using the startService(svc_name) call. Here svc name is an intent pointing to the class that runs the service. </p> <p>I want to share a resource(file/socket connection) between ...
android
[4]
1,882,077
1,882,078
C# Calling a Method, and variable scope
<p>Why is cards being changed below? Got me puzzled.. understand passing by ref which works ok.. but when passing an Array is doesn't do as I expect. Compiling under .NET3.5SP1</p> <p>Many thanks</p> <pre><code>void btnCalculate_Click(object sender, EventArgs e) { string[] cards = new string[3]; cards[0] = ...
c#
[0]
2,887,479
2,887,480
inline function -- "unresolved external" error?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3540931/inline-functions-in-c">Inline functions in C++</a> </p> </blockquote> <p><code>#foo.cpp</code></p> <pre><code>void func1(){ ... } inline void func2(){ ... } </code></pre> <p><code>#boo.cpp</code></p> ...
c++
[6]
4,217,060
4,217,061
With Javascript, enforce using scientific notation to represent numbers in IE8
<p>I found that when using IE8, the large number will NOT be represented in scientific notation (e.g., 5e25), but it will be with Firefox3. </p> <p>Can I enfore using scientific notation representation for <strong>large number</strong> with IE8?</p> <p>Thanks.</p>
javascript
[3]
4,176,514
4,176,515
Python: inspecting module to pick out classes of certain type?
<p>I have a module where all classes that implement my "policies" are defined. </p> <pre><code>class Policy_Something(Policy_Base): slug='policy-something' ... class Policy_Something_Else(Policy_Base): slug='policy-something-else' ... </code></pre> <p>I need to create a mapping from slug to class. So...
python
[7]
289,414
289,415
Imposing Restrictions on the installation of apk
<p>I want to make certain restrictions on distribution of the Android mobile application(apk).</p> <p>I am currently not uploading the apk to Android market.</p> <p>I want to provide the apk to the user with the following restrictions.</p> <p>i> After the Android mobile application(apk) is installed , the applicatio...
android
[4]
156,344
156,345
How can I use jQuery to change the class of a DIV inside an A element?
<p>I have the following:</p> <pre><code>&lt;a id="menuPrev"&gt; &lt;div class="sprite-contol-double-180"&gt;&lt;/div&gt; &lt;/a&gt; </code></pre> <p>Is there a way that I can use jQuery to change the class to "sprite-blank"</p>
jquery
[5]
5,619,511
5,619,512
Saving numpy.ndarray in python as an image
<pre><code>b=ndimage.gaussian_filter(imagefile,5) </code></pre> <p>Being new to python, not able to figure this out.<br> how to save <code>b</code> as an image, <code>b</code> is of type 'numpy.ndarray'? </p> <p>Tried these,<br> 1.</p> <pre><code>im = Image.fromarray(b) im.save("newfile.jpeg") </code></p...
python
[7]
2,835,007
2,835,008
i am using sleep method of class Thread in java, can anyone tell how avoid this thing
<p>i am using sleep because one method is taking time to execute and i want to execute next method when it is completed. this is what i am trying.</p> <pre><code>method1(); Thread.sleep(3000); method2(); </code></pre>
java
[1]
3,059,364
3,059,365
Disable backspace and delete key with javascript in IE
<p>Anyone know how can I disable backspace and delete key with Javascript in IE? This is my code below, but seems it's not work for IE but fine for Mozilla.</p> <pre><code>onkeydown="return isNumberKey(event,this)" function isNumberKey(evt, obj) { var charCode = (evt.which) ? evt.which : evt.keyCode if (char...
javascript
[3]
6,024,270
6,024,271
google analytics in JS file instead?
<p>Instead of putting the code at the head or end of body (i put it at the end of body), is it ok if i stick the code inside of a JS file instead of its own script tag in html?</p> <p>(i assume it works fine like any other code but i am asking in case)</p>
javascript
[3]
5,031,204
5,031,205
ImportError: cannot import name Parser
<p>This is how I get an error. To find the code please refer to following link:</p> <p><a href="http://baderlab.org/Software/TCSS?action=AttachFile&amp;do=view&amp;target=TCSS.tar.gz" rel="nofollow">http://baderlab.org/Software/TCSS?action=AttachFile&amp;do=view&amp;target=TCSS.tar.gz</a></p>
python
[7]
4,437,024
4,437,025
how can I call bowtie program to run within my python program
<p>I want to integrate a web available program bowtie in to my python scripts, does anyone know how to do it? </p>
python
[7]
859,446
859,447
_PHP - Image $_Post is not sending anything
<p>I have a html $_POST page which posts a image the name &amp; iD is called image_filename.However when i try to view what the variable value is , its blank below is the code and i cant understand where the issue is. Any suggestions would be grateful.</p> <pre><code> $image_file = fopen($_POST['image_filename'], 'wb'...
php
[2]
3,042,654
3,042,655
how to create a custom datatype in java?
<p>I want to create an custom datatype in Java,for example datatype Email , that having following method isValidate(String email),isEmailExist(String email),getDomain(String email), get Id(String email),just like Integer class in java.</p> <p>Integer is a class and I can initialise the object of Integer class as follo...
java
[1]
1,161,626
1,161,627
Blank Spaces also Bind When Binding a Dropdown list
<p>when i Bind the dropdownlistHostelRoomType, it binds with empty spaces left above.. i dont have any idea why this is happening. help me getting out from this issue please.. My Code:</p> <pre><code>&lt;div&gt; &lt;fieldset&gt; &lt;legend&gt;Hostel Details &lt;/legend&gt; ...
asp.net
[9]
2,973,253
2,973,254
Error when trying to import ActionBarSherlock Sample Project
<p><img src="http://i.stack.imgur.com/pmqGY.gif" alt="enter image description here">When I import the ActionBarSherlock Sample Project I get error saying [SampleList] Unable to resolve target 'android-14'. What could it be.please help</p>
android
[4]
2,002,598
2,002,599
Emulate Array Objects
<p>Question from Object-Oriented JavaScript book: <strong>Imagine Array() doesn't exist and the array literal notation doesn't exist either. Create a constructor called MyArray() that behaves as close to Array() as possible.</strong></p> <p>I thought it would be a good challenge to test my skills. This is what I came ...
javascript
[3]
2,569,912
2,569,913
jquery undisable list onselect
<p>I have a list of options dependent on what is selected in the first option. How can I make it so that after they select location the second options only displays options avaliable to that location?</p> <p>Right now I have a bunch of</p> <pre><code>&lt;option class=2 DISABLED&gt;Blah&lt;/option&gt; </code></pre> <...
jquery
[5]
3,247,396
3,247,397
Enigmatic Naming of Lists in Python
<p>I am writing a program in python and I am using a dictionary. I need to create an empty list for each key in the dictionary, and each list needs to have the same name as the key. The keys are user entered, which is why I can't just make a list in the conventional way. This was the first thing I tried</p> <pre><code...
python
[7]
4,452
4,453
Need Suggestion to do a task when Android Boots-Up
<p>I have written an activity A, when users press a button, it will do MyConfig.doSomething() where MyConfig is simple class with activity A passed to it.</p> <pre><code>public class A extends PreferenceActivity { private MyConfig mMyConfig; /* pseudo code, when button clicked, call */ mMyConfig.d...
android
[4]
1,763,844
1,763,845
Why can't I use int to calculate bytes to gigabytes?
<p>I ran into some trouble when converting bytes to gigabytes in my current project. Initially I did this:</p> <pre><code> long requiredDiskSpace = 5000000000000; // In bytes int gb = (int)requiredDiskSpace / 1024 / 1024 / 1024; </code></pre> <p>This calculation becomes 0. (Correct should be 4 656). Then I switched ...
c#
[0]
2,163,088
2,163,089
set scrolltop of one div in the other one's scroll event cause endless loop
<p>I am trying to write a jquery plugin for reading different contents synchronously in two divs. When one div scrolls, the other div's <code>scrollTop</code> will be set in the event's code.</p> <p>The problem is the scroll event of the other div will be fired when <code>scrollTop</code> is set, then the first div's ...
javascript
[3]
453,686
453,687
How to retrieve id of an object?
<p>How to retrieve id of an object ie. typeof? I mean ways to guarantee that I am dealing with the object I concern most about, not any others. ALso, this helps preventing substitution of different object values. ") i think everyone knows about this. please advise.</p> <p>Thank you.</p>
c++
[6]
592,811
592,812
php - Convert String To Date
<p>I'm trying to convert given string in format <code>1899-12-30 19:00:00.000</code> to date using this function:</p> <pre><code>$startDate = strtotime("1899-12-30 19:00:00.000"); </code></pre> <p>but as a result I get a wrong date, e.g. </p> <pre><code>30.10.2008 00:00:00 </code></pre> <p>what am I doing wrong?</p...
php
[2]
30,769
30,770
Override equals and hashCode just to call super.equals/hashCode or throw AssertionError?
<p>is there a best practice, when to override equals?</p> <p>Should I override equals/hashCode and throw an AssertionError? Just to be sure nobody uses that? (as recommended in the book Effective Java)</p> <p>Should I override equals/hashCode and just invoke super.equals/hashCode, because the super class behaviour is...
java
[1]
5,950,102
5,950,103
Introductory JavaScript programming task for an expert developer
<p>What would be a good mini-project to get intimate with JavaScript, as an advanced 'introduction' to the language? I want to actually code an application in JS, not hook up bits of it to enhance a web application.</p>
javascript
[3]
3,083,758
3,083,759
Android mp3 cross class
<p>I am trying to play an mp3 sound using the MediaPlayer class inside a regular class, which means non Activity, Service or other. My problem is probably initializing the MediaPlayer object since I have no Context in a non Activity class. How is this solvable?</p>
android
[4]
4,618,092
4,618,093
how to convert € ’ “ ” into simple utf8 chars
<p>i have scrapped posts from site and some times it the posts titles some strange chars came like this</p> <pre><code> € ’ “ ” </code></pre> <p>and when i store them into database it store them like </p> <pre><code>’, “, etc </code></pre> <p>how i can convert these chars into simple utf8-chars..</p> <p>Any H...
php
[2]
3,562,255
3,562,256
Looping through a mutidimentional array in python
<p>How do i achieve line 9 and 10 i.e the two <code>for</code> loops in python </p> <pre><code>matrix = [ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12] ] newMatrix = [] for (i=0; i &lt; len(matrix); i++): for (j=0; j &lt; len(matrix[i]); j++): newMatrix[j][i] = matrix[i][j] print newMatrix </co...
python
[7]
5,444,567
5,444,568
load() not working in jquery
<p>Hello Friends check my code <a href="http://jsfiddle.net/sUaky/2/" rel="nofollow">http://jsfiddle.net/sUaky/2/</a> i want to load a web page in a div using the <code>load()</code> function but code is not working plz help me out </p> <p>Thank in advance </p>
jquery
[5]
1,110,379
1,110,380
Issue with RegQueryValueEx
<p>I am using RegQueryValueEx to read a String value (REG_SZ) from the registry. The value if this registry contains some Japanese Characters along with english.<br> For eg: C:\Program Files\MyReg\チチチ\helloworld</p> <p>I am using the following code snippet:</p> <pre><code>BYTE* dwValue = 0; DWORD dwSize = 0; DWORD...
c++
[6]
849,861
849,862
calculate value of sin 30
<p>I can not find the correct value of sin 30 ,</p> <pre><code> double degrees = 30.0; double radians = Math.toRadians(degrees); System.out.println(Math.sin(radians)); </code></pre> <p>which produces .499999999 but the exact value matching to calculator is .5</p> <p>please help me..</p>
java
[1]
3,068,371
3,068,372
Creating Simple Xml In C#
<p>I need help some help printing out some xml. Here is my code (which isnt working its not even formatting the full url right, it doesnt understand "//" in the url string) It also doesnt understand "&lt;". There must be a better way to do this??</p> <pre><code> foreach (string url in theUrls) { ...
c#
[0]
5,964,977
5,964,978
a question on using xhtml2pdf to parse css from website
<p>I am trying to use xhtml2pdf to convert a webpage to pdf. After reading out the content of the webpage using urllib2, I found pisa.CreatePDF needs to process every link in the webpage content too. Especially, whenever it tried to parse .css file after I tried several websites, I got the following error:</p> <pre><c...
python
[7]
5,054,532
5,054,533
Strange C++ behaviour involving multiple calls to destructor
<p>I'm running the following code in Dev Studio 2010:</p> <pre><code>struct Foo { Foo() {cout &lt;&lt; "Foo()" &lt;&lt; endl;} ~Foo() {cout &lt;&lt; "~Foo()" &lt;&lt; endl;} void operator ()(const int &amp;) const {} }; int bar[] = {0}; for_each(begin(bar), end(bar), Foo()); </code></pre> <p>The output i...
c++
[6]
2,231,668
2,231,669
C basics, const unsigned char* to integer or bool
<p>I'm trying to get integer or bool from database result this way:</p> <pre><code>bool tblexist = false; int t_exists = 0; tblexist = (bool)sqlite3_column_text(chkStmt, 1); t_exists = atoi(sqlite3_column_text(chkStmt, 1)); </code></pre> <p>... but no one works.<br> Expected value from sqlite3_column_text(chkStm...
c++
[6]
5,214,753
5,214,754
How to pass value from Broadcast receiver to Activity in android?
<p>I am developing the sample application in android.I want to know how to pass the variable from broadcast receiver to to the Activity class</p> <p>Please any one help me how to do that in android Thanks in advance</p>
android
[4]
407,838
407,839
List is a raw type. References to generic type List<E> should be parameterized
<p>bellow is my syntax </p> <pre><code>List synchronizedpubliesdList = Collections.synchronizedList(publiesdList); </code></pre> <p>I am facing syntax error as "List is a raw type. References to generic type <code>List&lt;E&gt;</code> should be parameterized". Please suggest the solution.</p>
java
[1]
1,132,229
1,132,230
In ASP.NET, how does disabling the ViewState of a databound control affect the event handling of its children controls?
<p>I have a ListView control and in the LayoutTemplate I have Previous and Next paging buttons. On clicking the buttons, a PageButton_Click event handler in the code behind file is called to do the paging. It works fine, but if I switch off the ViewState of the ListView, clicking the buttons would not be able to call t...
asp.net
[9]
4,132,667
4,132,668
Store Battery Level Status In a txt File
<p>I am a New B to Android. I have been Able to get the Battery Status/Level with the Following Code:</p> <pre><code>private void BattStatus() { BroadcastReceiver batteryLevelReceiver = new BroadcastReceiver() { public void onReceive(Context context, Intent intent) { context.unregis...
android
[4]
4,806,284
4,806,285
Gridview related problem in asp.net
<p>How can I enter data from textbox to gridview on the buttonclick event</p>
asp.net
[9]
2,707,283
2,707,284
How can I add more directories to my file deletion program?
<p>I'm trying to use this to delete all .htm files in certain in a couple of directories I have by using recursion. So far it works fine with just one folder, but I haven't been able to find a way to add more than one folder to the code. Is there any way i can add more directories to the directory path so I don't have ...
c#
[0]
4,536,635
4,536,636
how to collate an array of dictionaries into a dictionary of arrays?
<p>I have this data:</p> <pre><code>list = [ {name:'apple', category: "fruit", price: 1.22 }, {name:'pear', category: "fruit", price: 2.22 }, {name:'coke', category: "drink", price: 3.33 }, {name:'sprite', category: "drink", price: .44 }, ]; </code></pre> <p>And I'd like to create a diction...
javascript
[3]
1,191,892
1,191,893
Use a jQuery script so it can work without having to call the url
<p>Is there a way I can use this script so it can work without having to call the <code>url: "http://localhost/a/rate/update.php"</code></p> <p>Here is the script.</p> <pre><code>function getRatingText(){ $.ajax({ type: "GET", url: "http://localhost/a/rating/update.php", data: "do=getavgra...
jquery
[5]
1,410,950
1,410,951
Cross-platform method for finding python include folder
<p>I have python extension code that I need to cross-platform compile, and to do so, I need to be able to find the python include folder. On Linux and Mac OSX, I can do <code>python-config --include</code> and it gives me something like <code>-I/Library/Frameworks/Python.framework/Versions/6.3/include/python2.6</code>...
python
[7]
4,526,102
4,526,103
difference between {} and function(){}
<p>I thought these were equivalent.</p> <pre><code>var __Panel = { this.header = null; }; var __Panel = function() { this.header = null; }; </code></pre> <p>The first one gives a compiler error "Expected identifier or string" for <code>this</code>, and "Expected ','" for <code>;</code>.</p> <p>Can someone clarify...
javascript
[3]
3,600,633
3,600,634
Vector option in Java
<p>I am using vector of object. My issue is the removal from vector is expensive operation( O(n^2)). What would be the replacement of vector in Java. In my uses addition and removal is extensively happens. </p> <p>i am C++ person don't know much Java</p>
java
[1]
3,324,467
3,324,468
How can I remove all classes that are not named "message" from an element?
<p>I have the following:</p> <pre><code>&lt;div id="abc"&gt; &lt;/div&gt; </code></pre> <p>Inside that div there can be one only of the following:</p> <pre><code>&lt;p class="message"&gt; &lt;p class="message error"&gt;&lt;/p&gt; &lt;p class="message warning"&gt;&lt;/p&gt; &lt;p class="message success"&gt;&lt;/p&gt;...
jquery
[5]
4,739,089
4,739,090
How can i take image upload value
<p>In my .aspx , </p> <pre><code>&lt;div id="pictureBox"&gt; &lt;img width="150" height="150" runat="server" id="imageField" /&gt; &lt;/div&gt; &lt;br /&gt; &lt;input id="Upload" style="width: 200px; font-family:...
asp.net
[9]
1,443,820
1,443,821
browser identification
<p>I want to identify if the broswer is IE then goto if block, other browser to else block in Java script. I have one code here, </p> <pre><code>var browserName=navigator.appName; if(browserName == "Microsoft Internet Explorer"){ IE code } else{ Other code } </code></pre> <p>but i want to know is there any ...
javascript
[3]
5,448,787
5,448,788
How can I create a sliding layout, like the main android menu?
<p>I need to create an application with 4 view. I need to pass from a view to an other simply by a touch and a move to the left or to the right (no button). The effect I would like is the same that you see when you navigate in the main menu of android when you pass from a page to another.</p> <p>I have tested the View...
android
[4]
2,446,195
2,446,196
Difference between OAuth 2.0 Two legged and Three legged implementation
<p>Can you please explain me the Difference between OAuth 2.0 Two legged and Three legged implementation. And how to chose? Which ones for me?</p>
android
[4]
3,652,651
3,652,652
validate first of multiple text boxes
<p>I need to validate only first text box, among multiple text-boxes, which share a common name</p> <p>Example</p> <pre><code>&lt;input type="text" name="value[]" /&gt; &lt;input type="text" name="value[]" /&gt; &lt;input type="text" name="value[]" /&gt; </code></pre> <p>How can I validate only first text box, using...
jquery
[5]
46,340
46,341
php captcha cannot load when upload to server
<p>Regarding captcha In local PC is working fine but when upload to server (CentOS5.5)</p> <p>PHP captcha cannot load.</p> <p>This is php code call get_captcha.php:</p> <pre><code>$('#captcha-refresh').click(function() { change_captcha(); }); function change_captcha() { document.getElementById('cap...
php
[2]
3,194,691
3,194,692
How to get class name through JavaScript
<p>How do I get the class name through JavaScript given no id with this <code>span</code>.</p> <p>Like: <code>&lt;span class="xyz"&gt;&lt;/span&gt;</code> </p> <p>I want to change the background color of this <code>span</code>.</p> <p>How can I solve this? Please help me.</p>
javascript
[3]
1,213,099
1,213,100
Need help in creating a file tree using jQueryFileTree.js
<p>I am trying to build a file tree structure using jquery.I came across this link</p> <p><a href="http://www.abeautifulsite.net/blog/2008/03/jquery-file-tree/" rel="nofollow">http://www.abeautifulsite.net/blog/2008/03/jquery-file-tree/</a></p> <p>So i tried to use it.Below is the html source code of my file.</p> <p...
jquery
[5]
1,033,059
1,033,060
Removing DOM element using jQuery
<p>I have a custom error script that displays custom error messages on a page if a user tries to submit a form and it fails validation.</p> <p>On the focusout of the input element (the input that failed validation) I am trying to remove the DOM element I added, but its removing all of the DOM elements with the class n...
jquery
[5]
1,252,854
1,252,855
how to set ImageView visible through out the android application for header
<p>I have a header design which contains an ImageView and it is common for all the layouts in my application. I want to set the ImageView visible onclick of some button. The ImageView must visible in all the activities. I am using <code>.setVisibility(View.VISIBLE);</code> but its not working for all the activities.</p...
android
[4]
4,432,237
4,432,238
Why is the C++ scope resolution operator ::?
<p>This is one of the few questions I didn't find an answer to in Design and Evolution of C++ by Stroustroup. Why is the C++ scope resolution operator ::, as opposed to just :?</p> <p>I'm guessing it's because : is already used to indicate the start of an initialization list in a constructor. Does anyone else agree,...
c++
[6]
2,884,490
2,884,491
Use a variable-object that was given as an argument
<p>I have some classes that sometimes should connect to the database during the same request. The solution I thought about was to give the PDO Object as an argument to the methods. There is a class that DB() that creates the connection and stores into a public attribute:</p> <pre><code>class DB{ public $conn; ...
php
[2]
902,175
902,176
Javascript get nextSibling not class "foo"
<p>I need to get the next sibling of an element but it should not have the class "foo". In jQuery this would be:</p> <pre><code>myEl.next("div.goodClass") or myEl.next().not(".foo") </code></pre> <p>Can this be done with <em>nextSibling</em>?</p>
javascript
[3]
1,544,489
1,544,490
Working with Bitmap? Giving error?
<p>In web application, i am using Bitmap for finding the width and hight of the image. When i write the code it is giving error: Parameter is not a valid.</p> <pre><code> Bitmap bmp = new Bitmap(Server.MapPath("./Images/" + ds.Tables[0].Rows[0]["image"].ToString())); </code></pre> <p>I am getting error can you hel...
asp.net
[9]
3,926,223
3,926,224
Running example of NAppUpdate updater
<p>hi can anyone give me running example of NAPPUpdate</p> <p><a href="http://www.code972.com/blog/2010/08/nappupdate-application-auto-update-framework-for-dotnet/" rel="nofollow">NAppUPdate</a></p>
c#
[0]
2,337,411
2,337,412
What are some of the must know concepts in ASP.NET?
<p>I am giving a small presentation to a group of Java developers and looking for some core areas to target. Ideally I would like to only talk about the core concepts in ASP.NET.</p> <p>I am coming up with</p> <ul> <li>Authentication</li> <li>Session State</li> <li>ASP.NET MVC</li> <li>LINQ (more .net)</li> </ul> <p...
asp.net
[9]
1,193,236
1,193,237
Make Div Expand Smoothly
<p>I'm using Javascript to expand a div, but when the content is expanded it's highly abrupt and at best highly unattracive. I was wondering if there was a way to make this div expand slower and more of a visual expand then a BLAM. Now I'm done. </p> <pre><code>&lt;script language="javascript"&gt; function toggle_pr...
javascript
[3]
4,871,955
4,871,956
How to identify buttons click event which is on the custom cell?
<p>I have custom cell which contains number of rows in it.i want to write it's Action(click event) so how should i identify which buttons clicked and how can i write it's click event for it.Please give me some guidelines for that.i have not implemented yet.</p>
iphone
[8]
2,154,306
2,154,307
onItemSelectedListener is not fired when i select the same previous value
<p>When i am selecteing the same value again which is in adapter the values are not refreshed and even onItemSelectedListener or NothingSelected not fired</p> <p>Here follows my code:</p> <pre><code> spinner.setOnItemSelectedListener(new OnItemSelectedListener() { public void onItemSelected(AdapterView&l...
android
[4]
4,627,108
4,627,109
Apple Push Notification Service
<p>how to know my iphone device is registered or not for applepushnotification service?</p>
iphone
[8]
5,749,331
5,749,332
How do I randomly generate a grid style island map, given two tile types?
<p>I need to write an algorithm than can assign a tile type (one for water and one for land) to every square in a 100 x 100 grid, and I would like it to generate an "island". Something random, but all the land squares together, and all the water squares on the border. Any ideas? </p> <p>I have heard of "perlin noise" ...
c++
[6]
1,190,693
1,190,694
Why does code with successive semi-colons compile?
<p>According to my scientific Java experimentation, <code>int x = 0;</code> is equivalent to <code>int x = 0;;</code> which is equivalent to <code>int x = 0;;;;;;;;;;;;;;;</code></p> <ol> <li>Why does Java allow for this? Does it have any practical application?</li> <li>Are each of these just empty statements? Do they...
java
[1]
5,204,891
5,204,892
Sending large files over socket
<p>I got working over socket file sender, it worked perfectly, but I couldn't send large files with it. Always got heap error. Then I changed the code of client, so it would send file in chunks. Now I can send big files, but there is new problem. Now I recieve small files empty and larger files for example videos can't...
java
[1]
4,829,986
4,829,987
does not execute any code in php tag
<p>I do not know PHP programming, and we have an PHP application in our organization that should be launched. and I have problem with it. when iIdelete this part of index.php application working properly. with in this part of code application does not run. I think the problem is the PHP tag. in this tag does not exec...
php
[2]
5,820,254
5,820,255
Not allowed to start service Intent
<p>I'm trying to call a service from a activity:</p> <p>When I'm running the program the activity throws an error which says: Not allowed to start service Intent. What am I doing wrong? I'm sorry for possible stupid mistakes in the code, but I'm a newbie.</p> <p>activity code: </p> <pre><code>public void startServic...
android
[4]
2,017,043
2,017,044
connection refused exception in socket programming
<p>In simple socket programming in java , what ip should be given while making new socket and its on wan </p> <p>//Server side</p> <pre><code>ServerSocket ss = new ServerSocket(8888); System.out.println("\n\n\tWaiting for connection\n"); Socket c = ss.accept(); System.out.println("\n\n\tConnection established\n");...
java
[1]
3,251,818
3,251,819
Android SDK and AVD Manager hangs trying to rename temporary folders
<p>I run Android SDK and AVD Manager in Vista and have problems installing components. The installer downloads components successfully, but at the end of the installation it hangs for about minute and then asks to disable AV software. If I choose 'No', the installer stops with error message like: "Filed to rename direc...
android
[4]
3,361,523
3,361,524
How to change CreationTime.ToShortDateString() date format?
<p>Code line and output:</p> <pre><code>fileInfo.CreationTime.ToShortDateString(); </code></pre> <p>And the output is for example is <strong><code>11/19/2012</code></strong> which is in this format <strong>MM/dd/yyyy</strong>.<br> How can i change the format to <strong>dd/MM/yyyy</strong>??</p>
c#
[0]
3,885,204
3,885,205
Session value to TextBox Value
<p>How to call a Session and use it as a value of Text Box Form. I am using asp.net</p> <pre><code>&lt;form id="frmLog" name="frmLog" method="post" action="/Page/"&gt; &lt;input type="text" name="UserId" value="&lt;%=Sessiopn["UserID"] %&gt;"&gt;" /&gt; &lt;/form&gt; </code></pre> <p>Thanks!</p>
asp.net
[9]
3,332,733
3,332,734
Controlling how WallpaperManager.setBitmap centers bmp?
<p>I want to set a picture as the wallpaper. I'm simply doing:</p> <pre><code>WallpaperManager wm = WallpaperManager.getInstance(context); wm.setBitmap(bmp); </code></pre> <p>The bmp seems to have a really tight zoom level set, such that only like 40% of the photo is actually visibile on the desktop. Slightly exagger...
android
[4]
5,559,335
5,559,336
What is the best way to get all webpage links with Html Agility Pack?
<p>i am try to get all links from webpage with Html Agility Pack, after send web URL (cnn.com) i have this list (return by Html Agility class):</p> <p><img src="http://i.stack.imgur.com/3loeL.jpg" alt="enter image description here"></p> <p>what is the best way to get all this page links cause some of those links star...
c#
[0]
1,717,538
1,717,539
something olike the multi desktops app
<p>any idea how to implement something like the multiple desktops of the android?</p> <p>I tried Gallery but it sucks I wansted something just like the desktop app </p> <p>thanks </p>
android
[4]
5,469,465
5,469,466
How to send a php variable using a url
<p>I want to for example send the <code>$test</code> in a url then I want to use <code>$_GET</code> ti get the variable.</p> <p>This is probably a stupid question but if you have another way of doing this then please let me know. By the way I would usually use include for this but I can't use it this time because of s...
php
[2]
4,041,709
4,041,710
Stretch layout to screen
<p>I have the following layout. I'm using layout_weight="1", so that everything will stretch to fit the screen uniformly. The user has the option to delete images, by basically setting visibility="gone".</p> <p>Let's say the user deletes both images in the middle LinearLayout, I want that layout to disappear. Currentl...
android
[4]
4,017,922
4,017,923
jQuery - Finding Distinct Values in Object Array
<p>I've got an array of objects where each object has fields like title, description, family, etc. How can I perform a jQuery operation that grabs all objects in this array with a unique family name - similar to SQL's DISTINCT clause?</p>
jquery
[5]
2,735,542
2,735,543
Jquery "nth-child" Issues
<p>I have a list of items, ten in total and will have more however...</p> <p>I've got a "sorting" function which allows the user to view items by "price" or "alphabetically".</p> <p>This works fine, the issue I'm having is the selector line I'm using to get 5th child within the list is bugging out.</p> <p>Here is th...
jquery
[5]
3,001,504
3,001,505
Can't create a zip file with PHP
<p>I've created the following code to create a zip file. I'm pulling a list of files from the database depending on the $job_number (which I'm getting from the global $_GET array) and then trying to add them to the zip file.</p> <p>That part is working fine. It's pulling the list of files from the database, as I can s...
php
[2]
3,153,672
3,153,673
getting illegal start of expression error
<p>i'm totally new to java. i 'm try to create my first program &amp; i get this error.</p> <pre><code>E:\java&gt;javac Robot.java Robot.java:16: error: illegal start of expression public String CreateNew (); { ^ Robot.java:16: error: ';' expected public String CreateNew (); { ...
java
[1]
3,560,418
3,560,419
Good practices for intialising properties?
<p>HI, I have a class property that is a list of strings, List. Sometimes this property is null or if it has been set but the list is empty then count is 0. However elsewhere in my code I need to check whether this property is set, so currently my code check whether it's null and count is 0 which seems messy. </p> <pr...
c#
[0]
3,495,605
3,495,606
I Have a question about jquery performance
<p>Will I have a performance problem if there are 500 elements with this class?</p> <pre><code>$('.class').hover(function handleIn() { /*code*/ },function handleOut() { /*code*/ }); </code></pre>
jquery
[5]
825,863
825,864
Relations between an object, its constructor and its methods
<p>this is #33 from John Resig`s Learning Advanced JavaScript. <a href="http://ejohn.org/apps/learn/#33" rel="nofollow">http://ejohn.org/apps/learn/#33</a> Would appreciate as much help as you can provide on this.</p> <p>1) technically speaking, is <code>ninja.changeName("Bob")</code> "calling" the function Ninja, ...
javascript
[3]
5,248,709
5,248,710
How to resume state of application
<p>I have one activity which starts multiple threads and one doInBackground method. when I launch it is working fine.</p> <p>But everytime I press the back button of the emulator and then again double click of this app it creates a new instance of the application rather than resume it where it is now.</p> <p>I had se...
android
[4]
896,108
896,109
displaying only thumbnails in directory, but linking to full size image
<p>I have a directory with fullsize images and thumbnails. The thumbnails are prefixed with <code>thumb_</code> and then share the same name as the full size counterparts.</p> <p>What do i need to do the script below to get both the full image and the thumb, so i can echo the correct link? As is, it returns all images...
php
[2]