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
988,694
988,695
how to work UICollectionView in iOS 5
<p>IS it work UICollictionview in IOS 5 error Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'</p>
iphone
[8]
259,830
259,831
jQuery data retrieve from div
<pre><code>&lt;div align="left" style="margin-bottom:3px;"&gt; &lt;b&gt;ID:&lt;/b&gt; 37749 &lt;b&gt;Active on:&lt;/b&gt; 03/28/2012 &lt;/div&gt; </code></pre> <p>this is my content, how to retrieve numbers. use Jquery </p>
jquery
[5]
4,102,166
4,102,167
Java -- This seems like pass by reference to me
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/40480/is-java-pass-by-reference">Is Java pass by reference?</a> </p> </blockquote> <p>So consider the following two examples and their respective output:</p> <pre><code>public class LooksLikePassByValue { ...
java
[1]
2,786,534
2,786,535
Executing a function when the console window closes?
<p>I want to execute a function when the program is closed by user.</p> <p>For example, if the main program is <code>time.sleep(1000)</code>,how can I write a txt to record unexpected termination of the program.</p> <p>The program is packaged into exe by cxfreeze. Click the "X" to close the console window.</p> <p>I ...
python
[7]
5,760,286
5,760,287
Can someone tell me what does "XThrowIfError" does?
<p>I cannot find its definition in the documentation...</p>
iphone
[8]
1,013,336
1,013,337
My android application lags when i switch screens
<p>When i open one of my screens for the fist time, there is lag, but after it has been opened and i switch it runs smoothly. Is there a way to load the all the images before the app starts so that it doesn't lag the first time i switch to those screens?</p>
android
[4]
2,126,160
2,126,161
jQuery use keypress on absolute input
<p>i'm using jquery to insert input tag on element absolute and i i want to use keypress on that.</p> <p>after create and use keypress in <code>on()</code> i cant get keypress (enter).</p> <p>jQuery inserted input element:</p> <pre><code>$(event.target).html("&lt;input value= '"+ $(event.target).text() +"' style='wi...
jquery
[5]
1,054,814
1,054,815
Read dropdownlist value from a gridview
<p>I have a gridview with a dropdownlist column, and i enabled the paging function. The problem is every time after it turns to the next page, the selected value of the dropdownlist on the previous page is back to default value. </p> <p>I tried to wrap the code with <code>if(!ispostback)</code>, only the first page av...
asp.net
[9]
2,665,720
2,665,721
Create staticmethod from an existing method outside of the class? ("unbound method" error)
<p>How can you make a class method static after the class is defined? In other words, why does the third case fail? </p> <pre> &#62;&#62;&#62; class b: ... @staticmethod ... def foo(): ... pass ... &#62;&#62;&#62; b.foo() &#62;&#62;&#62; class c: ... def foo(): ... pass ... foo = staticmethod( foo ) ... &#62...
python
[7]
4,617,993
4,617,994
Convert kilobytes to bytes in PHP
<p>How can I convert kilobytes to bytes in PHP? Let's say I get the value 22.2 kb and I want to return this in bytes.</p>
php
[2]
4,750,361
4,750,362
How to manage styles, themes, layouts so it looks similar on different android platforms including ICS, Honeycomb and Gingerbread
<p>Looking for prescribed approach for writing compatible android application on different platforms including ICS, Honeycomb and Gingerbread.</p> <p>I already spike out regarding managing backward compatibility with action-bar, swipable-tabs, etc and now looking cleaner approach for managing UI aspects for the same.<...
android
[4]
469,608
469,609
FB redirection not working with custom image
<p>I am trying to allow user to login to my website using FB and then get redirected back to my website. I am unsure why it is not working. When I click on the image, it goes to FB website and then display "An error occurred. Please try again later." Here is the code I am using and not sure if there is better code I...
php
[2]
5,246,083
5,246,084
Bitmap from url without scaling
<p>i am getting bitamap from a url. Everything is fine but i m having small issue i.e my bitmap from url gets scales down. I want bitmap of original size without scaling. How to achieve this. I tried options but no success yet. here is my code:</p> <pre><code>try { URL url = new URL(src); HttpURLConnection connection ...
android
[4]
1,551,148
1,551,149
How can I load more than one javasrcipt on the same page?
<p>This script works fine if my images rotate on a single page.</p> <p>If I do this one once instance of this works at one time.</p> <p>Question: How can I load more than one instance of javasrcipt on the same page?</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src="js1.js"&gt;&lt;/scri...
javascript
[3]
1,281,000
1,281,001
Having a form submit on every keypress
<p>I have a currency calculator that requires buttons to convert to/from currencies. I'd like to make it so that it converts (runs the form) as soon as anything is typed in. Currently, my jQuery that handles the button click looks like this (this is one of two click handlers):</p> <pre><code> $('#convertFromBut...
jquery
[5]
5,008,148
5,008,149
help with error SCRIPT5007: Unable to set value of the property 'onclick'
<p>I have a link in the html page and it has the <code>id="redirect"</code></p> <p>and this in (script.js)</p> <pre><code>window.onload = initAll(); function initAll(){ document.getElementById("redirect").onclick = clickHandler; } function clickHandler(){ alert("Sure!"); return true; } </code></pre> <p...
javascript
[3]
3,303,260
3,303,261
Parse Custom DateTime
<p>I'm having trouble parsing this datetime:</p> <pre><code> DateTime ParseDateTime(string dateString) { //dateString is "2011-07-22 16:11:14,770" var format = "yyyy-MM-dd hh:mm:ss,fff"; var dateTime = DateTime.ParseExact(dateString, format, CultureInfo.InvariantCultu...
c#
[0]
4,867,363
4,867,364
Why is that Jquery not working in chrome?
<p>I have <a href="http://www.reelworks.net/wordpress/" rel="nofollow">this site</a> that i am working with. On the main page the slider rotates every 5 seconds and I have a surrounding div around the video and when clicked I fire this</p> <pre><code>$('.video_button_a').click(function(event){ event.preventDefault()...
jquery
[5]
1,238,105
1,238,106
Can you set a maximum limit to an integer (C++)?
<p>If I never want an integer to go over 100, is there any simple way to make sure that the integer never exceeds 100, regardless of how much the user adds to it?</p> <p>For example, </p> <pre><code>50 + 40 = 90 50 + 50 = 100 50 + 60 = 100 50 + 90 = 100 </code></pre> <p>Thanks in advance</p>
c++
[6]
4,287,003
4,287,004
C#, quick generics question
<p>I have a need to create a quick class with just 2 properties (left and top), I'll then call these in a collection. </p> <p>Is there a quick way to create the class structure without having to actually create the strongly typed class itself using generics?</p> <p>Thanks in advance</p> <p>Better still, does the fra...
c#
[0]
39,521
39,522
is "Redundant #include Guards" necessary on Visual Studio?
<p>I used to use the following code to make sure that the include file is not loaded more than once.</p> <pre><code>#ifndef _STRING_ #include &lt;string&gt; #endif // use std::string here std::string str; ... </code></pre> <p>This trick is illustrated in the book "API Design for C++".</p> <p>Now my co-work told me ...
c++
[6]
3,259,126
3,259,127
Why am I not allowed to have multiple assignments in for each loop with different lengths of lists in python
<p>Just like I'm allowed to do this: </p> <p>(EDIT - I'm NOT allowed to do this either, sorry messed up, but anyway I guess my question is more on the lines of how to go about doing parallel assignments in a loop)</p> <pre><code>for (x,i) in ([0,1,2],[3,4,5]): # do something </code></pre> <p>why am I not allowed t...
python
[7]
1,437,696
1,437,697
Stopping interval if a user clicks on a li
<p>I have this jquery which works great, but i want to stop it emulating the clicks if a user actually clicks a tab...if anyone can help that would be great!</p> <pre><code>//Homepage Tabs $('#lcontent .tab:first').show(); $('#llist li').click(function() { var thisTop = $(this).position().top; $('....
jquery
[5]
5,546,869
5,546,870
Android - java.lang.VerifyError
<p>I'm facing a recurrent problem that I don't know why it is happening. It happens all of a sudden. I didn't do anything different from what I was doing before.</p> <p>I'm using these tabs: <a href="http://developer.android.com/resources/tutorials/views/hello-tabwidget.html" rel="nofollow">http://developer.android.co...
android
[4]
1,192,816
1,192,817
Changing the value of dynamically created dropdowns
<p>I have a list of drop-down elements dynamically created in my server side code.</p> <pre><code>&lt;select id="color1"&gt; &lt;option value="blue"&gt;blue&lt;/option&gt; &lt;option value="red"&gt;red&lt;/option&gt; &lt;option value="green"&gt;green&lt;/option&gt; &lt;/select&gt; &lt;select id="color2"&gt; &lt;option...
jquery
[5]
1,224,274
1,224,275
C# - Refresh dropdown after a child form closes
<p>I have a c# application with multiple "worker" forms. These forms have numerous comboboxes that are populated from the database on form load, with 'add' buttons beside them. When a user clicks the add button the administrative form is opened allowing the user to add a corresponding value to the database.</p> <p>For...
c#
[0]
893,668
893,669
Getting "missing ; before statement error in javascript
<p>Only thing in the file is the following line:</p> <pre><code>@include Menu.js </code></pre> <p>Is there any way that it stops showing this error??</p>
javascript
[3]
5,934,442
5,934,443
adding a textbox server control from code behind?
<p>I'm trying to add a new textbox server control to my page from code-behind.</p> <pre><code>TextBox txt=new TextBox(); txt.Width=100; txt.Height=100; Page.Controls.Add(txt); </code></pre> <p>When I write following Code, this error is thrown:</p> <blockquote> <p>"Control 'ctl02' of type 'TextBox' must be placed ...
asp.net
[9]
2,790,586
2,790,587
why use c++ Typedef?
<p>My understanding of typedef is to give a declaration an alias. Such the declaration for int will now be referred to as Integer. But why? Why would someone use typedef? What's the more advantageous reason? </p> <pre><code>typedef int Integer; Integer blamo = 50; cout &lt;&lt; blamo &lt;&lt; endl; </code></pre>
c++
[6]
3,959,820
3,959,821
Progress bar appears with loading string before fragment gets loaded in HoneyComb3.0
<p>hi <br> I am writing an Android application in which I displays a List . Clicking on any item on list will display another list which is a Fragment.Say this Fragment as Fragment1.I will display this fragment every time I click 1,2,4 listitems. But When I click ListItem3 I will display another Fragment say Fragment2 ...
android
[4]
1,206,859
1,206,860
Finding closest id within span
<p>I have two images within span. I need the value of id1 for each image-click.</p> <pre><code>&lt;span class="deleteid"&gt; @Html.ActionLink(item.categoryModel.catName, "Show", new { id1=item.itemId}) &lt;img id="iconItemEdit" src="@Url.Content("~/Content/MyIcons/ee.png")" style="width: 13px; height: 13px;"/&...
jquery
[5]
5,660,683
5,660,684
How add clip art at run time on button click
<p>Hello I am working on project where I need to customize our card at run time. Mean when user click on a button then it will show a horizontal slider(that contain images ) user click one of the image and images comes over the screen.</p>
javascript
[3]
2,702,659
2,702,660
How do I throw and exception using `if` and `else` if the user enter something that isn't a valid integer?
<p>I'm writing a program that adds numbers. The program takes input from the user as an integer value and gives him a total of both numbers. But I want that when the user enters any character besides the number, a custom error is written to the console. How do you do that with <code>if</code> and <code>else</code>?</p>...
c#
[0]
826,976
826,977
How to get scrollbars showing when when using an accordian in jQuery?
<pre><code>function pageLoad() { $('#accordion h3').click(function() { $(this).next().toggle(); return false; }).next().hide(); &lt;div id="accordion"&gt; &lt;h3&gt;&lt;a href="#"&gt;Section A&lt;/a&gt;&lt;/h3&gt; &lt;div id="a"&gt; &lt;Ctrl:A id="a" runat="server"&gt;&lt;/Ctrl...
jquery
[5]
4,353,766
4,353,767
Java for-loop, do i need continue statement here?
<p>Consider this code:</p> <pre><code>if (int a == 0) { System.out.println("hello"); continue; } </code></pre> <p>This <code>if</code> is part of a <code>for</code> loop in java. What is the significane of continue statement here? I know <code>continue</code> is the opposite of <code>break</code> so that it w...
java
[1]
2,339,929
2,339,930
Using HttpModules to modify the response sent to the client
<p>I have two production websites that have similar content. One of these websites needs to be indexed by search engines and the other shouldn't. Is there a way of adding content to the response given to the client using the HttpModule? </p> <p>In my case, I need the HttpModule to add to the response sent to the when...
asp.net
[9]
207,932
207,933
Alternative to scipy and numpy for linear algebra?
<p>Is there a good (small and light) alternative to numpy for python, to do linear algebra? I only need matrices (multiplication, addition), inverses, transposes and such.</p> <p>Why?</p> <blockquote> <p>I am tired of trying to install numpy/scipy - it is such a pita to get it to work - it never seems to install ...
python
[7]
2,138,447
2,138,448
Would calling a function like this be considered bad practice?
<p>Suppose I have this function signature:</p> <pre><code>def foo(a=True, b=True, c=True, d=True, e=True): </code></pre> <p>I've decided these would be concise ways to call this function, considering all passed parameters should be <code>False</code>:</p> <pre><code>foo(*5*[False]) foo(*[False]*5) </code></pre> <p>...
python
[7]
43,071
43,072
Why its dangerous to use pass by value when function parameter expects an Abstract class object?
<p>I read below statements in Addison Wesley FAQs.</p> <blockquote> <p>Beware: passing objects by value can be dangerous in some situations. Often it is better to pass objects by reference-to-const than to pass them by value. For example, pass-by-value won't work if the destination type is an abstract ...
c++
[6]
4,581,482
4,581,483
What is the point of a private pure virtual function?
<p>I came across the following code in a header file:</p> <pre><code>class Engine { public: void SetState( int var, bool val ); { SetStateBool( int var, bool val ); } void SetState( int var, int val ); { SetStateInt( int var, int val ); } private: virtual void SetStateBool(int var, bool val ) ...
c++
[6]
5,895,694
5,895,695
C# change string value to be next value in alphabetical order
<p>So this is what i'm trying to do. I have a string alphaCode, and what i simply want to do is increase from letter A to letter B. I did a way that assigned each letter an int and then did int++, but i'm assuming there has to be a better way.</p> <pre><code>string alphaCode = "a" result = "b" </code></pre>
c#
[0]
5,788,749
5,788,750
Search a space after a particular string in java
<pre><code> String text = "select ename from emp"; </code></pre> <p>I want to know the space index after the word <strong>from</strong>. How to do it?</p>
java
[1]
735,091
735,092
Does document.getElementById() consider temporarily created DIV
<p>I have a DIV like this </p> <pre><code> var div = document.createElement('div'); div.innerHTML = "&lt;div id='a'&gt;&lt;/div&gt;"; </code></pre> <p>And I have not appended it to document yet.. But I just want to retrieve the element <code>a</code> from temporary DIV.. </p> <p>I have this way otherwise </p> ...
javascript
[3]
5,653,090
5,653,091
Jquery when do you use $.get(index) instead normal selector
<p>Just wondering when do you actually use $.get(index); I am a bit confused on when and where to use $.get(index), when u can straight get any element by getting the id or class name?</p> <p>(note i am not talking about the $.get() ajax call) sorry i confused some of your guys</p>
jquery
[5]
2,396,971
2,396,972
Display message during cookie redirect
<p>I have a site that saves a cookie to a users computer, when they next get to the homepage they are redirected to another page via a cookie.</p> <p>I have tried using jquery loading() and document.write, to display a message during the 2 seconds that the page takes to redirect but none work, right now the only event...
javascript
[3]
1,154,270
1,154,271
Error: '.class' expected or cannot find symbol method
<p>I can't figure out what exactly is wrong. This is what i get when i compile this program:</p> <pre><code>cannot find symbol method kuce(java.util.List&lt;java.lang.String&gt;,java.lang.String[]). </code></pre> <p>If i change this row:</p> <pre><code>System.out.print(mauka.kuce(mauka,temp)); </code></pre> <p>to</...
java
[1]
29,899
29,900
Need help setting up dev environment
<p>I'm working on different windows machines and virtual windows machines on a mac. I have a project wich uses SQL server and AD for autentication.</p> <p>Right now I have to be connected to VPN so that the asp.net web application can connect to AD using LDAP string to autentivate users, I also have the SQL server on ...
asp.net
[9]
1,324,314
1,324,315
jQuery deletion of div childrens except one
<p>How can I delete everything inside <code>main</code> except the <code>ul</code> element?</p> <pre><code>&lt;div id="main"&gt; &lt;div id="a"&gt; &lt;div id="b"&gt; &lt;div id="c"&gt;&lt;/div&gt; &lt;div id="d"&gt;&lt;/div&gt; &lt;div id="e"&gt; &lt;ul&gt;&lt;/ul&gt; &lt;/div&gt; &lt;/div&...
jquery
[5]
3,511,460
3,511,461
javascript:if statement
<p>How to execute the if statement only when both the inputs are different not when both inputs are same. suppose:</p> <pre><code>var a=prompt("have Input",""); var b=prompt("have Input",""); if(a &amp;&amp; !b){alert("ok")} else{"wrong"} </code></pre> <p>the above condition works when both the inputs are true ,when ...
javascript
[3]
2,380,427
2,380,428
i want the data to be save sucessfully
<p>I have a JFrame name opinion. in this form I have given a error message for each field means whenever I am filling the form and if I put any field empty and than click save button it should display that error message for that perticular empty field is empty. my code is saving the data but when I put any field empty ...
java
[1]
4,809,094
4,809,095
Changing the width of an element only in IE browsers using javascript
<p>I wish to change the width of an element specifically only in IE browsers using javascript, but not getting any idea of how to do this.</p> <p>Please help me as soon as possible.</p>
javascript
[3]
4,321,763
4,321,764
Is there a way to trigger a window.onresize event in a cross browser way?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3856098/trigger-onresize-in-cross-browser-compatible-manner">trigger onresize in cross browser compatible manner</a> </p> </blockquote> <p>I library I use has some code I need called attached to the window.onres...
javascript
[3]
5,444,076
5,444,077
What does & mean in python
<p>Hi I came across the following code</p> <pre><code>numdigits = len(cardNumber) oddeven = numdigits &amp; 1 </code></pre> <p>what exactly is going on here? I'm not sure what the "&amp;" is doing.</p>
python
[7]
5,916,097
5,916,098
read the url content
<p>I want to read the url content by bytes. I have to read the 64 kb from the content of url.</p> <pre><code>public void readUrlBytes(String address) { StringBuilder builder = null; BufferedInputStream input = null; byte[] buffer = new byte[1024]; int i = 0; try { URL url = new URL(address)...
java
[1]
4,981,565
4,981,566
Usages Some Android Method
<p>I want to update an Android project ... but some code is not recognized by me..</p> <ol> <li>Why we are using Debug.startMethodTracing("text"); </li> <li>Why we are using Debug.stopMethodTracing();</li> <li>What is Context,BaseContext in android?</li> </ol>
android
[4]
3,738,205
3,738,206
How to decrease size of c++ source code?
<p>For example</p> <pre><code>#include &lt;iostream&gt; using namespace std; int main() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); int n; cin &gt;&gt; n; for (int i = 0; i &lt; n; i++) { cout &lt;&lt; i; } return 0; } </code></pre> <p>Decrease:</p> <pre><code>#includ...
c++
[6]
4,329,388
4,329,389
jquery: get value from clicked div
<pre><code>&lt;div&gt;'.$i.'&lt;/div&gt; </code></pre> <p>$i is auto generated by loop - which could lead to: </p> <pre><code>&lt;div&gt;'.$i.'&lt;/div&gt; &lt;div&gt;'.$i.'&lt;/div&gt; &lt;div&gt;'.$i.'&lt;/div&gt; </code></pre> <p>etc. where each $i is different.</p> <p>How do I get value of particular $i (using ...
jquery
[5]
2,904,800
2,904,801
When to Cache the data
<p>Q1) I am designing a iPhone app and want to know on what basis I should take the decision of caching data. </p> <p>Q2) I have a huge data set which can change frequently. On my app I am showing the data under different categories and is planning to fetch the data from server when a particular category is tapped. Th...
iphone
[8]
5,334,741
5,334,742
"from x import y as z" vs. "import x.y as z"
<p>I'm assuming they are functionally the same, bar some negligible under-the-hood differences. If so, which form is more Pythonic?</p>
python
[7]
3,475,415
3,475,416
Trouble converting string from commandline to array of floats
<pre><code>char * temp_array; strcpy(temp_array, argv[i + 1]); for(int j = 0; j &lt; 8; j++) { fann_input[j] = atoi(temp_array[j]); printf("%f\n", fann_input[j]); printf("o%c\n", temp_array[j]); } </code></pre> <p>fann_input is a fl...
c++
[6]
2,641,626
2,641,627
Pointing ASP.Net Client to same service on another server
<p>I have a scenario, my asp.net application is consuming a WCF service. Now for the service has two version say for example testservice and prodservice. I have to use either of them at any given time. In order to test, I need to point my appplication to test or prod. Can I achieve this by, simply changing url in endpo...
asp.net
[9]
3,584,702
3,584,703
how to do only this div
<pre><code>&lt;div id="container"&gt; &lt;div class="slides"&gt; &lt;div class="slides_container"&gt; &lt;p&gt;1&lt;/p&gt; &lt;p&gt;2&lt;/p&gt; &lt;p&gt;3&lt;/p&gt; &lt;/div&gt; &lt;a href="#" class="prev"&gt;Prev&lt;/a&gt; &lt;a href="#" class="next"&gt;Next&lt;/a&gt; &lt;/d...
jquery
[5]
4,253,889
4,253,890
Array syntax error newbie
<p>I am lost in this error. I am trying to write a function and write a array in that function. in an external js file. This is going to be a random image loading function but i keep getting an error with the array and can't figure out why.</p> <pre><code>function randImg(){ var imgs = new Array(); img[0]="b...
javascript
[3]
4,532,867
4,532,868
What is memory space occupied for reference and object
<p>What happen at background(in case of memory) when I declare variable and then create object for that variable . Is reference variable store anywhere and in which format and how this variable points to the memory on heap. Please clarify below doubts in the comments.</p> <p>For example</p> <pre><code>ClassA instanc...
c#
[0]
3,146,357
3,146,358
how to toggle between the items in comboBox using c# .net for wpf application
<p>how to toggle between the items in comboBox using c# .net for wpf application.once i focus on combo box i can able to toggle between the items instead of focusing the comboBox i want to toggle between the items.</p>
c#
[0]
1,653,514
1,653,515
javascript var declaration within loop
<pre><code>/*Test scope problem*/ for(var i=1; i&lt;3; i++){ //declare variables var no = i; //verify no alert('setting '+no); //timeout to recheck setTimeout(function(){ alert('test '+no); }, 500); } </code></pre> <p>it alerts "setting 1" and "setting 2" as expected, but after th...
javascript
[3]
199,445
199,446
how to make rest webservices without using any framework
<p>I am working on rest webservices in php. I want to know that can i make rest webservices in php without using any framework(cakephp,zend,Tonic). if anyone have some some idea. Please let me know ?</p>
php
[2]
3,380,761
3,380,762
update a currently displayed variable
<p>I am writing some Python code, which will in the end will display something which looks like:</p> <pre><code>Volt1: 3.1V Volt2: 2.6V Volt3: 5.6V </code></pre> <p>I am constantly monitoring some register values which will give me the current values of Volt1,Volt2,Volt3. As I read in the new values I want ...
python
[7]
5,124,848
5,124,849
How do I detect in jQuery if the contents of an anchor tag contains a string?
<p>How can i check <code>&lt;a href="#"&gt;sometext&lt;/a&gt;</code> equals something, trying to reach something like this:</p> <pre><code>$('a').click(function() { if ($("a:contains('sometext')")) { alert('sometext'); } else { alert('text'); } }); </code></pre>
jquery
[5]
5,042,309
5,042,310
Nested get performance
<p>In Java, is there a performance hit if i continually use nested get to retrieve values? For instance:</p> <pre><code>String firstname = getOffice().getDepartment().getEmployee().getFirstName(); String lastname = getOffice().getDepartment().getEmployee().getLastName(); String address = getOffice().getDepartment().ge...
java
[1]
223,191
223,192
detecting a character in input box
<pre><code>if(document.form.user.value=='') </code></pre> <p>this is a javascript code which tests if it is empty input box,</p> <p>but I need a piece of code which controls is there any character in input box? could anyone help me?</p> <p>I mean any character like /, &amp;, or any letter... or I can say any chara...
javascript
[3]
951,887
951,888
How to view the headers sent by HttpWebRequest
<p>I'm scraping a site with HttpWebRequest, but the site is returning an error. The page works fine when I hit it from my browser. I'd like to compare them to see what may be causing the error. I know how to intercept the request from my browser to inspect the headers, but how do I view the data sent by HttpWebReque...
c#
[0]
2,868,293
2,868,294
Is Java 7 already available to develop?
<p>Is Java 7 already available to do development with?</p>
java
[1]
4,437,694
4,437,695
What software can I use to auto generate class diagrams in PHP?
<p>I have some source code and I would like to auto generate class diagrams in PHP. What software can I use to do this?</p> <p><strong>Duplicate</strong></p> <ul> <li><a href="http://stackoverflow.com/questions/393603/php-uml-generator">http://stackoverflow.com/questions/393603/php-uml-generator</a></li> <li><a href=...
php
[2]
668,377
668,378
Python RAD (Desktop Deployment)
<p>please forgive me if this questions were answered so many times!</p> <p>How can I deploy desktop applications with python (in RAD way), I mean: 1. there is an IDE and i can create user interface(gui) like virtual studio that you just <strong><em>drag and drop objects</em></strong> (label, combobox, radiobutton...) ...
python
[7]
869,563
869,564
Difference between window.location.assign() and window.location.replace()
<p>What is the difference between window.location.assign() and window.location.replace(), when both redirect to new page?</p>
javascript
[3]
2,918,020
2,918,021
Simple explanation for why datatables uses $.fn.dataTableExt.afnSortData
<p>I saw a post out there:</p> <p><a href="http://stackoverflow.com/questions/4083351/what-does-jquery-fn-mean">what does $.fn mean</a></p> <p>However I still don't understand it. Can someone explain this in very simple terms to me. Why did they choose to specify it this way?</p>
jquery
[5]
398,782
398,783
culture name is not supported
<p>I'm receiving "culture name 'uploads' is not supported" when my asp.net app start. Where I have to view/debug to toggle the error? A full-text for "uploads" returns o entries in my project</p>
asp.net
[9]
2,551,173
2,551,174
Getting a statabase query returned as string in c#
<p>I am working with a dbf database. I need to query it to get information back in string format. The dbf file is set up as follows:</p> <pre><code>Student Name Student Number Student Description HelloWorld 123456789 Present WorldHello 987654321 Absent </code></pre> <p>Here is the code i...
c#
[0]
2,523,173
2,523,174
How to draw a circle tangent to 3 circles
<p>I have three circles . I have the full information regarding that 3 circles .</p> <p>I want the logic to draw another circle which is tangent to rest 3 circles . I dont have any information regarding that 4th circle(which is being tangent to rest 3) .</p>
c++
[6]
3,852,103
3,852,104
Can't get Google USB driver to load
<p>After getting my app to work in the emulator, I now want to test it on my Samsung Exhibit II Android phone. I follow the instructions from google here <a href="http://developer.android.com/sdk/win-usb.html" rel="nofollow">http://developer.android.com/sdk/win-usb.html</a> but can't get their USB driver to load. </p>...
android
[4]
2,192,863
2,192,864
How can I filter ListView data when typing on EditText in android
<p>I have a ListView and a EditText. How can I filter ListView data when typing on EditText ? </p> <p>My code is given below: </p> <pre><code> public class ListContacts extends ListActivity { ListAdapter lAdapter; EditText filterText; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(sa...
android
[4]
1,672,835
1,672,836
most negative value for python
<p>I expect the most negative for python is <code>-maxint-1</code></p> <p>I expect having -2, will make integer overflow.</p> <pre><code>from sys import maxint maximum_int = maxint minimum_int = -maxint - 2 # 2147483647 # -2147483649 print maximum_int print minimum_int </code></pre> <p>Yet. Correct result is displa...
python
[7]
1,030,673
1,030,674
Calling a base abstract method in an override of that method
<p>If I have the following:</p> <p>e.g.</p> <pre><code>public abstract class ClassA { protected abstract void ValidateTransaction(); } public abstract class ClassB : ClassA { protected override void ValidateTransaction() { // some custom logic here } } public class ClassC : ClassB { ...
c#
[0]
150,191
150,192
Is it possible to get Class attributes? C#
<p>I have a class which is using generics. This class do some operation which need serialization. So the class which will be given to myClass must hold the attribute [Serializable()]. Is it possible to request a class which attributes it holds? In best case at design time.</p> <pre><code> [Serializable()] publi...
c#
[0]
881,758
881,759
Could not Understand the usage of map in c++
<p>Map is a container class that is used to store the aggregate data... Its very easy to retreive the datas stored in it as it uses hash algorithm for retrieval. map is a key value pair...The data can be retrieved with the corresponding key... Here in this declaration below I'm defining that the key has to be integer(4...
c++
[6]
5,511,927
5,511,928
Calculate the shortest way to rotate, right or left?
<p>Im making a simple computerplayer to my simple 2d action game. it suppose to turn towards me and shoot, but i cant figure out how to calc the shortest path... should it turn left of right if it want to shoot and kill me :P ?</p> <p>Ive got two angles: cpu_facing (direction the cpu is facing) and player_degree (the ...
javascript
[3]
3,099,742
3,099,743
Get spinner selected items text?
<p>How to get spinner selected item's text?</p> <p>I have to get the text on the item selected in my spinner when i click on the save button. i need the text not the Index.</p>
android
[4]
1,946,014
1,946,015
Friendly URL adding to my links on the nav bar menu... creating issues
<p>Website is PHP/mySQL. Some of the pages (inventory) have friendly URLs. Great.</p> <p>The problem is when on these profile pages (those with friendly URLs), it is also adding that friendly URL in front of the links of the top nav bar (aka menu drop down).</p> <p>So instead of faq.php ... now the link is productA/f...
php
[2]
3,222,066
3,222,067
TypeError: $(...).tablesorter is not a function
<p>I am using jquery.tmpl to create tables through ajax call. Table row is coming from database .</p> <p>And i included all the tablesorter plugins that is ,tablesorte,js,latest.js and css</p> <p>But it is giving error as tablesorter is not a function...</p> <pre><code>$.ajax({ ..... success:function(){ $("#my...
jquery
[5]
2,139,626
2,139,627
How to list from higher numbers to lowers ones in php?
<p>Say I have a variable like this:</p> <pre><code>$votes </code></pre> <p>That variable will store positive and negative numbers: -1, 0, 2, 3, etc...)</p> <p>How to code a function that arrange those numbers but higher ones to lower ones?</p>
php
[2]
5,167,975
5,167,976
C# - Switching System.Text.Decoder mid-stream - buffered data
<p>I have a Decoder instance, and am using its convert method in conjunction with a file reader to read in data with the appropriate encoding.</p> <p>I'd like to switch the Decoder instance I'm using mid-way through my read, however I'm conscious that the original decoder may have some bytes buffered internally (incom...
c#
[0]
2,881,693
2,881,694
jQuery : how to debug?
<p>Recently i watched a tutorial from youtube (<a href="http://www.youtube.com/watch?v=8mwKq7%5FJlS8" rel="nofollow">http://www.youtube.com/watch?v=8mwKq7%5FJlS8</a>)</p> <p>The boy is typing jQuery code and as soon as he presses enter key we can see the result intently. What tool is that?</p>
jquery
[5]
4,901,850
4,901,851
abstraction and interface explanation
<p>could some body explain me abstraction and interface in asp.net, C# by taking an apprpriate example...pleasse i am not understanding it for long</p>
asp.net
[9]
890,697
890,698
What is the SimpleDateFormat pattern that parses like the deprecated String constructor for Date?
<p>I have some code that looks like <code>"Sat May 12 04:46:05 EDT 2012"</code> that is currently being parsed by the <code>java.util.Date</code>'s <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html#Date%28java.lang.String%29" rel="nofollow"><code>Date(String s)</code></a> constructor. However, now I...
java
[1]
5,189,871
5,189,872
Differentiating Test site from Development Site (ASP.NET)
<p>We have a couple of ASP.NET applications running here at work and our users get the test site confused with the production site. What is the best way to help the users know they are at the test site. Is there a best practice for how this can be accomplished? Maybe have a custom control or something on the screen ...
asp.net
[9]
5,837,295
5,837,296
loading image is taking too much time
<p>now Im doing an android application . In my app I have to swipe and show different pages.Each page is having some images.To make the sense of moving image [eg: smiling apple] I am using the logic of showing one image and hide that image and show second image in the same position and third so on.But this process is t...
android
[4]
3,260,179
3,260,180
Facebook graph API integration in my android app
<p>i have downloaded facebook graph api, and when i am importing that api, after that i am getting lot of errors in <strong>Util.java</strong> file... please guide me, where am i doing mistake..</p> <p>Thanks in advance..</p>
android
[4]
3,352,671
3,352,672
How can I use JavaScript to read a local file when the html is local
<p>I would like to be able to read a file that is stored in the same directory as the html file. When the html file is accessed by http, there is no problem; I can just use a HttpXMLRequest. However when the HTML is being read off the local disk (as with File/Open in most desktop browsers, it seems HttpXMLRequest doe...
javascript
[3]
1,118,061
1,118,062
What standards and practices should I use to develop an application that runs on both the iPhone and on iPads?
<p>What standards and practices should I use to develop an application that runs on both the iPhone and on iPads?</p>
iphone
[8]