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,199,510
4,199,511
AVAudioPlayer stops playing the audio when iPhone goes to sleep
<p>I need to play a background sound all the time as long as my application is running. I tried to use AVAudioPlayer for this purpose. However, it stops playing the sound as soon as the iPhone goes to sleep mode.</p> <p>Could you let me know how can I fix this problem?</p> <p>Thanks</p>
iphone
[8]
4,465,519
4,465,520
Need direction on where to begin my programming journey. Non language specific just a foundation..where do I start?
<p>Sorry if this is in the wrong forum but I'm taking the plunge and I want to learn how to program from the ground up. I've been using VB.NET but only by copying/pasting what I could find on the net.</p> <p>I am wanting to start fresh. I'm looking for direction on what types of things I should be researching for a go...
c#
[0]
3,989,362
3,989,363
C++ typedef question
<p>if I make a <code>typedef someobject* pntr</code>;</p> <p>I can use this typedef to make a pointer to point to an object of type someobject. but can I also use a pointer made from this typedef to point to an array of someobject? </p>
c++
[6]
1,512,687
1,512,688
Remove web address from string
<p>Input is </p> <pre><code>Catch up on all episodes and series at ChannelChooser. .channelchooser.com/ - Cached - Similar </code></pre> <p>I want to the remove web address and terms like cached,similar.I need to extract only text. </p> <p>Thanks in advance</p>
java
[1]
5,795,005
5,795,006
Any elegent method to build relation between string and integer in Java?
<p>I have a class which has many fields of the type String. I want to write a method as a setter for all these fields, so I need a switch. Here comes my question, how to map the field name into an integer to be fit in switch? I don't want <code>Integer.parseInt()</code>, because I don't know what char may be and couldn...
java
[1]
4,691,827
4,691,828
Java - Converting hours(in double) to minutes(integer) and vice versa
<p>I need the correct formula that will convert hours to minutes and vice versa. I have written a code, but it doesn't seem to work as expected. For eg: If I have hours=8.16, then minutes should be 490, but I'm getting the result as 489.</p> <pre><code> import java.io.*; class DoubleToInt { public static void m...
java
[1]
3,309,224
3,309,225
Creating a font with just a few characters
<p>Not even sure how to phrase the subject line properly, but what I want to do is this:</p> <p>I want to use a few special characters in my app, e.g. x̄, which are not in the system's built-in font.</p> <p>I could simply define my own ttf font with the specific characters in it, but I'd like the system font to be us...
android
[4]
285,095
285,096
iPhone - current date considering daylight saving
<p>My country is located in GMT+0. We are +1 hour now, because we are in daylight saving.</p> <p>When I do</p> <pre><code>[NSDate date]; </code></pre> <p>it was supposed to return the current date and time, but when I do that, I receive the GMT time not considering the daylight saving. </p> <p>This is what the docs...
iphone
[8]
727,323
727,324
Size of the given structure
<pre><code>struct x { char a : 1; // statement 1 char c : 3; // statement 2 }; </code></pre> <p>what will be the size if this structure. What is the meaning of statement 1 and 2?</p>
c++
[6]
3,656,780
3,656,781
How to use Graph API in facebook
<p>I wish to develop a Facebook application i don't know how to use Post in Graph API if any one one could help me..</p>
android
[4]
1,993,419
1,993,420
Jquery .Post problem
<p>For some reason, this is not submitting to the server. </p> <pre><code>function get(){ $.post('something_help.php', name: 'blah',function(output) { alert(output); }); } </code></pre> <hr> <pre><code>&lt;?php echo $_POST['name']; ?&gt; </code></pre>
jquery
[5]
3,701,138
3,701,139
Google support for enterprise Android development
<p>Does Google offer any support program for enterprise Android development?</p> <p>Something similar to Apple's <a href="http://developer.apple.com/programs/ios/enterprise/" rel="nofollow">iOS Developer Enterprise Program</a>?</p> <p>A search on Internet didn't yield any results, so I'm wondering if anyone here know...
android
[4]
770,690
770,691
How should I choose the right Android phone for testing my app?
<p>I am looking to buy an Android phone to test my first Android app on.</p> <p>What things should I pay attention to to make sure I pick the most suitable device?</p>
android
[4]
3,677,999
3,678,000
Javascript Create custom callback
<p>All i need to do is to execute a callback function when my current function execution end</p> <pre><code>function LoadData() { alert('the data have been loaded'); //call my callback with parameters i want Ex. //callback(loadedData , currentObject); } </code></pre> <p>Consumer for this function should ...
javascript
[3]
4,256,745
4,256,746
Make barcode generator in android
<p>i made a barcode generator using code128 but when my barcode generate then it wont display in my layout. so plz suggest me some solution that how to display generated barcode in my layout enter code here </p> <pre><code>public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); se...
android
[4]
4,723,548
4,723,549
Swapping content with jquery and adding fadein effect
<p>Wondering if anyone has an answer to this conundrum?</p> <p>I've got some Jquery working which swaps content within a div when some text is clicked:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function() { $("#changeText").click(function() { $("#textBox").html("&lt;div&gt;This text...
jquery
[5]
4,435,821
4,435,822
Why does an inline conditional in Java auto-cast numbers?
<p>In the following inline conditionals, one might expect an integer and a double to be printed, respectively:</p> <pre><code>System.out.println(true ? 0 : 0.0); System.out.println(false ? 0 : 0.0); System.out.println(true ? new Integer(0) : new Double(0.0)); System.out.println(true ? 0 : ""); </code></pre> <p>Instea...
java
[1]
3,679,218
3,679,219
How to change table row on every fifth cell using while or for?
<p>Let's say we have a query that gives a result from database's records. I want to put those records on a table, but not like row after row. I would like to make a table that will change row on every fifth cell. How can I do this using <code>while</code> or <code>for</code>?</p> <p>Here is just an example of what I h...
php
[2]
5,341,717
5,341,718
Javascript: way to implement 100% tamperproof private variables?
<p>I was reading Crockford's tutorial <a href="http://javascript.crockford.com/private.html" rel="nofollow">http://javascript.crockford.com/private.html</a>. private variables are implemented by function inside constructor that makes possible to associate private variables to closure.</p> <p>Generally javascript libra...
javascript
[3]
4,309,403
4,309,404
Hover images effect
<p>i need similar script to this - <a href="http://d2o0t5hpnwv4c1.cloudfront.net/358_jquery/example%20files/all-examples.html" rel="nofollow">http://d2o0t5hpnwv4c1.cloudfront.net/358_jquery/example%20files/all-examples.html</a></p> <p>This works if images have the same resolution, but I have images with different widt...
jquery
[5]
26,784
26,785
Why is Class.getAnnotation() requiring me to do a cast?
<p>I'm using Java 1.6.0_25.</p> <p>I have an annotation defined:</p> <pre><code>@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface Resource { String value(); } </code></pre> <p>And later when I use getAnnotation:</p> <pre><code>Resource resource = (Resource)cls.getAnnotation(Resourc...
java
[1]
2,826,948
2,826,949
Empty vector of type <stuff*>
<p>I have a vector populated with objects:</p> <pre><code>std::vector&lt;Stuff*&gt; stuffVector; </code></pre> <p>and am trying to delete all elements of it using a cleanup function</p> <pre><code>void CleanUp() { for (std::vector&lt;Stuff*&gt;::size_type i = 0 ; i &lt; stuffVector.size() ; i++) { st...
c++
[6]
780,515
780,516
I am searching for verticalmenu in jquery and css.. submenu should show up on click event. Can anybody help me?
<p>MI am hard time in finding jquery menu which works with click event. Suggests me the links where I can download such menu</p>
jquery
[5]
4,963,207
4,963,208
Camera.Parameters.FLASH_MODE_TORCH
<p>My problem is that the TORCH MODE is disabled when the get function onPictureTaken. How to make a torch mode on work during a photographic survey?</p>
android
[4]
3,439,148
3,439,149
Write tab separated csv file in c#
<p>I am currently developing an application in C# where I need to write a tab separated CSV file from the data that it retrieves from a MySQL Database. The database retrieval works fine. </p> <p>The problem that I am having is writing the file. Between each variable that I am writing I am using the \t which I thought ...
c#
[0]
5,523,079
5,523,080
display icons (or content) on mouseover
<p>In twitter, when you hover your mouse over a message a star and a reply icon appears on the right.</p> <p>Similarly, in facebook when you hover your mouse over to an update, the little 'hide' icon appears on the right also giving a little context menu.</p> <p>I want to have a similar approach in my project for dra...
jquery
[5]
3,709,719
3,709,720
check compiler with break point
<p>When I tried to focus on compiler in code, I made break point on code.</p> <pre><code>if (!IsPostBack) { using (SqlConnection Con = Connection.GetConnection()) { if (Request.QueryString["Category_Id"] != null &amp;&amp; DDlProductFamily.SelectedIndex &lt; 0) { SqlComm...
c#
[0]
3,883,152
3,883,153
Is there a way to expand the notifications with a key press, instead of touch?
<p>The reason: I'm trying to make Android work in a device without touch screen.</p>
android
[4]
5,359,838
5,359,839
add animation to show user that add goods to tabbar badge
<p>I notice there are some app, when I tap a button, it will display an animation look likes something drop from the button to uitabbaritem, and badge of the uitabbaritem will increade.</p> <p>I try to do smashing in my app, but no result</p> <p>Welcome any comment</p>
iphone
[8]
678,241
678,242
jquery to modify a link
<p>I have the following HTML:</p> <pre><code>&lt;TD class=ms-sctabcf &gt; &lt;A href="http://localdev.industrial.com:80/en-US/SearchM3/Pages/results.aspx?k=test+contenttype%3a%22IABusinessProduct%22&amp;amp;s=IA_xx-XX_Content"&gt;All Results &lt;/A&gt;&lt;/TD&gt; </code></pre> <p>I need a jquery function that rem...
jquery
[5]
3,245,637
3,245,638
How to use subList()
<p>I have a JSF page which displays list of Glassfish log files. I use lazy loading for pagination. I keep the list of the log files names into Java <code>List</code>.</p> <pre><code>private List&lt;directoryListObj&gt; dataList = new ArrayList&lt;&gt;(); dataList = dataList.subList(firstRow, lastRow); </code></pre> ...
java
[1]
2,835,142
2,835,143
Add adjacent digit repetetions in an 10 digit number until no adjacent repetetions in a number
<p>How to add same adjacent digits in a number for eg: 9112322544 would be 9223458. and again add same adjacent digits if any until no repetition in number using c++??</p>
c++
[6]
4,369,130
4,369,131
php fetchpage() function help, identifying image sizes from a url in php
<p>hey guys so im building an application and one of teh features it will have is the ability to show photo links from twitter inline sort of like what tweetdeck has done in their chrome browser version and sites like crowdreel have been able to do, i spent some time researching how to grab image tags from urls on goog...
php
[2]
2,476,201
2,476,202
In StartActivityForResult how to get requestCode from child
<p><br> I have Four activity say A, B, C and D<br> My situation is A will start the activity B by startActivityForResult. </p> <pre><code>startActivityForResult(new Intent(this,B.class),ONE); </code></pre> <p>In other situation i will B with other situation. like </p> <pre><code> startActivityForResult(new Intent(t...
android
[4]
2,662,658
2,662,659
How do I capture the mouse move event in my winform application
<p>I would like to capture the mouse move event in my main form. Although I am able to wire up the MouseEventHandler for the mian form the event no longer fires when the cursor is over a usercontrol or any other control. How do I ensure that I always have the mouse position.</p>
c#
[0]
5,618,896
5,618,897
Adding a ID to a <li> based on part of an <a> tag
<p>I have the following code:</p> <pre><code>&lt;li class="zoneName"&gt;&lt;a href="/Default.aspx?PageID=4869007"&gt;CYKF&lt;/a&gt;&lt;/li&gt; &lt;li class="zoneName"&gt;&lt;a href="/Default.aspx?PageID=4868459"&gt;YKA&lt;/a&gt;&lt;/li&gt; </code></pre> <p>I need to add and ID to each of the &lt; li > tags in this li...
jquery
[5]
5,874,910
5,874,911
stringstream won't convert to correct number value
<p>[SOLVED] See my answer below.</p> <p>I am trying to use stringstream (named ss) to convert some strings to ints and some to double and such, but the values are all coming out wrong. I have a vector of strings named vec, initialized like this:<br/> [0] = ID # in hex<br/> [1] = phone number<br/> [2] = last name<br/> ...
c++
[6]
824,677
824,678
Python Vertical Array Slicing
<p>Can anyone show me how to slice the structure below:</p> <pre><code>[[1, A], [2, B], [3,C]] </code></pre> <p>Into two separate lists:</p> <pre><code>[1, 2, 3] [A, B, C] </code></pre> <p>I can obviously do this using code, but wondered if Python was able to do it natively?</p>
python
[7]
78,968
78,969
where should inheritance classes be stored?
<p>I want to create classes that can be inherited by other classes to use along my project. i.e. i want to create a separate class for each Mail method, each class will implement differently the Compose method, and more Mail classes will be created in the future.</p> <p>My question is - Where should I create these cla...
asp.net
[9]
6,008,133
6,008,134
What is jquery and hashtable usage
<p>I am new to jquery. I want know jquery "how it works in webpage"? Is there any useful site to learn jquery completely??? I want to know about hashtable in jquery?</p>
php
[2]
3,813,534
3,813,535
How to retain the state of button click in android
<p>I have two layout for one activity like layout-port and layout-land with different designs .if user click button in potrait mode and change to landscape mode activity is restarting or refreshing again can anybody tell how to avoid this can anybody tell how to maintain the state activity can anybody provide example<...
android
[4]
2,902,708
2,902,709
Save a table as text
<p>What i have right now:</p> <pre><code>oname = open("1231.txt","w") def cC_(): d_=" fahrenheit celsius" print(d_) for i in range(-300,213,1): c_=(i-32)*(5/9) a_=str(i)+'°F' b_=str(round(c_,3))+'°C' print(...
python
[7]
464,780
464,781
Purpose of if(0){ //code }?
<p>Quick question. I just came across the following in a JS file:</p> <pre><code>if (0) { // code } </code></pre> <p>What's the purpose of this if statement? Which cases would the code execute? It currently doesn't run the code in the if clause.</p>
javascript
[3]
1,178,028
1,178,029
I am (also) having trouble making connections between code and Interface Builder
<p>I have the exact same question as this <a href="http://stackoverflow.com/questions/441941/i-am-having-trouble-making-connections-between-code-and-interface-builder">post</a> but with a better description of the problem.</p> <p>Using Inteface Builder (IB) I am unable to connect a button to the View Controller ("File...
iphone
[8]
5,819,658
5,819,659
Modify __new__ attribute for inmutable types in Python
<p>im trying to modify the behaviour of the 'int' type in Python.</p> <p>it says </p> <p><code>'__new__' is readonly.</code></p> <p>Is there a way to do it? </p> <p>thanks.</p>
python
[7]
5,139,165
5,139,166
Can a Tab Page be a parent of MDI child windows?
<p>I am using C# to create a form application which has a couple of tab pages. I want to contain MDI child windows in one of the Tab page. Is it possible? I tried something like childForm.MdiParent = this.tabPage1.Handle, but I got a compile error because the type doesn't match. Would you have a good idea to do this?</...
c#
[0]
1,782,242
1,782,243
example of using log collector from my app
<p>the open source Log Collector looks very useful and I would like to integrate it into my app. Although the source code site mentions a usage example I cant see anything like this except for the mention re usage inside the source code itself. Is there any other info on this?</p>
android
[4]
1,954,374
1,954,375
Android : HttpClient Secure
<p>I am new to Android . I have a requirement , send a data from Android mobile to server. I have done using HttpClient. Now the problem is whether it is secure connection? How we can make sure this is secure way?Please guide me this topic: </p> <pre><code>ArrayList&lt;NameValuePair&gt; nameValuePairs = new ArrayList&...
android
[4]
4,902,644
4,902,645
Facebook Album Creation php
<p>When I issue the following post command to create the album, nothing is created.</p> <pre><code> $album_url="https://graph.facebook.com/".$fanpage_id."/albums?" . "name=" . urlencode($album_name) . "&amp;message=" . urlencode($album_description) . "&amp;method=POST" . "&amp;access_token=" . $fanp...
php
[2]
2,608,762
2,608,763
Roles/responsibilities of FragmentActivities vs. Fragments
<p>Say I have an application with two instances of FragmentActivity, FragActivityA and FragActivityB, and two ListFragments, FragA and FragB.</p> <p>In portrait, FragActivityA presents FragA, and upon selection starts FragActivityB presenting FragB.</p> <p>Should FragA implement OnItemClickListener for the ListView (...
android
[4]
4,536,428
4,536,429
how to set system properties in C#
<p>how can i set system properties in C#. </p> <p>In java i can use:</p> <pre><code>System.setProperty("webdriver.chrome.driver","/path/to/where/you/ve/put/chromedriver.exe"); </code></pre> <p>how to do this in C#?</p>
c#
[0]
1,241,697
1,241,698
How to store a list of sets of three strings?
<pre><code>std::vector&lt;std::pair&lt;std::string &gt; &gt; </code></pre> <p>can be used to store a list of a pair of strings. Is there a similar way to store a list of triplets of strings?</p> <p>One way I can think of is to use <code>std::vector</code></p> <pre><code>std::vector&lt;std::vector&lt;std::string &gt;...
c++
[6]
4,608,560
4,608,561
Making Request to a Web API in c#
<p>I have an application to send sms. we have purchased a sms api and they have given links to request. Now my question is how to request this links in c# and get back the result.</p>
c#
[0]
1,271,370
1,271,371
array_combine empty values
<p>One array is 35 elements (mysql column names) </p> <p>Array ( [1] => ID...) </p> <p>second is only few elements: </p> <pre><code>Array ( [1] =&gt; 63 [2] =&gt; REF213211 [3] =&gt; aaa [7] =&gt; Warszawa [8] =&gt; Wola [12] =&gt; 100 [14] =&gt; 1 [15] =&gt; 100 [35] =&gt; 1 ) </code></pre> <p>I need to combin...
php
[2]
3,585,890
3,585,891
Use name of object to run a function
<p>I would like to do the following in JavaScript:</p> <pre><code>var myObject.name = myString; function newFunction(){myObject.name} </code></pre> <p>Is it possible to use a string as the contents of a function? How would you convert it to be usable?</p>
javascript
[3]
808,375
808,376
Data storage for Android app
<p>I need to write an application with a lot of questions with 4 variant aanswer for each (tests, in short). Where to store the actual answers and the questions? Create a file, or use SQLlite, or Strinq.xml (although it seems this is the most desirable not).</p> <p>If I use SQLlite, then for example, if somebody downl...
android
[4]
2,380,860
2,380,861
Check pixels pattern
<p>How can I check for a pixel pattern in PHP?</p> <p>I mean I wanna use as condition that pixel A has xxx value and the following pixel B has another value yyy.</p> <p>This is what I wrote:</p> <pre><code>$img = imagecreatefrompng("myimage.png"); $w = imagesx($img); $h = imagesy($img); for($y=0;$y&lt;$h;$y++) {...
php
[2]
5,109,611
5,109,612
Java Script: New Date Format is not working for Nov and December
<p>I am trying to change my date format </p> <pre><code> var d = new Date(); var curr_year = d.getFullYear(); var curr_Month = d.getMonth() +1; var curr_date = d.getDate(); var todayDate = var tDate = ( curr_Month +"/"+curr_date +"/"+ cu...
javascript
[3]
263,584
263,585
Call a method of running java application on the same instance of the application from command prompt
<p>Is there any way to call a certain method in a running java application?</p> <p>Forexample: I have a java application running, Now I want to call a method <code>uk.co.planetbeyond.chatservice.Stopper.stop()</code> on the same instance of the application. Can I do that?</p>
java
[1]
2,690,176
2,690,177
Android - How to create a basic class and use it?
<p>I have defined a class that contains properties of a specific answer object The class look like this and is defined inside the class that is trying to use it</p> <pre><code>protected class Answer { String QuestionId = ""; String AnswerValue = ""; String Correct = ""; public String getQuestionId() { ...
android
[4]
1,459,530
1,459,531
Remove the Close button in the program's title bar
<p>Goal:<br> Don't want the user to use the X mark (upper right of the program's screen) to exit the program.</p> <p>Problem:<br> Don't know how to remove that icon that allows user to exit the program?</p>
c#
[0]
949,097
949,098
jQuery .html() and a variable inside
<p>I would like to put variable FLC in inside <code>$("#FNC").html('');</code> but don't know how to, any tips?</p> <p>DEMO:</p> <pre><code>var FLV = $("#random-input-box").val(); $("#FNC").html('&lt;input id="random-input-box" style="width: 99px;" value="FLC" disabled="disabled" /&gt;'); </code></pre>
jquery
[5]
665,968
665,969
NSScanner, reaching the end of parsing string
<p>I have a string that's like</p> <p>"Condition: <strong><em>some text which can have a comma in it but not always</em></strong>, Type <em><code>more text</code></em> Product: <strong><em>more text, can be NULL sometimes</em></strong></p> <p>What I did was:</p> <pre><code>NSString *condition = @"Condition:"; NSStri...
iphone
[8]
2,237,612
2,237,613
Android Bundle NullPointer
<p>In my Android application I want to transfer data between activities; mentioned FirstActivity.class and SecondActivity.class. But in my FirstActivity it is showing a <code>NullPointerException</code>. Can you tell me what's wrong in my class?</p> <p>FirstActivity.class:</p> <pre><code>Bundle bundle = getIntent().g...
android
[4]
1,905,405
1,905,406
Logout for twitter, linkedin and last.fm
<p>I am able to logged into my application with linkedin, twitter and last.fm but on logout I logs out of the application and not linkedin, twitter and last.fm.I want user to logout of both linkedin, twitter and last.fm and my application at the same time. please anyone suggest me how to do that.</p> <p>thanks in adva...
php
[2]
3,431,420
3,431,421
Jquery DataTables, sort by specific column?
<p>Here's the page: </p> <p><a href="http://csuvscu.com/" rel="nofollow">http://csuvscu.com/</a></p> <p>I need to sort by the Date Column, right now it needs to read Nov 6, Nov 5 and lastly Oct 7. </p> <p>How do I do this? </p>
jquery
[5]
4,885,024
4,885,025
How to invoke a remote program in Java?
<p>Is it possible to invoke an exe on a remote computer, supposing we know the absolute path of the exe where it lies?</p> <p>I have written a client and a server program and am able to get both work as expected when both are running. But now, all I want to do is to invoke the server program from client if server is n...
java
[1]
5,442,795
5,442,796
retrieve data from sql to datagrid view
<p>this code wont run it supposed to fill the datagridview some data but all i got was the rows of how many data was retrieve but no values on each cells</p> <pre><code> public void refDGV() { con.OpenConnections(); SqlCommand cmd = new SqlCommand(); SqlConnection cn = new SqlConnection...
c#
[0]
313,802
313,803
php if statement in javascript
<p>dear all</p> <p>i have a error when i put if statement to rules validation javascript</p> <p>example</p> <pre><code>var jenis = "prabayar"//echo json_encode </code></pre> <p>and this is the script </p> <pre><code>if(jenis == "prabayar") { rules: { user: { required: true, ...
javascript
[3]
5,166,824
5,166,825
How to get the contents of a text file (stored locally in the documents directory) into an NSString?
<p>How to retrieve the contents of a <strong>TEXT FILE</strong> stored locally in the documents directory?</p>
iphone
[8]
4,203,302
4,203,303
What does & in &$data do?
<p>A quick beginner's question in PHP.</p> <p>What does &amp; in &amp;$data do and what are differences with $data?</p> <pre><code>function prepareMenu(&amp;$data) { $this-&gt;db-&gt;where('parentid',0) ... ... </code></pre>
php
[2]
1,191,864
1,191,865
caculating dates with php
<p>I have a general question on calculating dates with php.</p> <p>What happens if I store a timestamp like this in my database:</p> <pre><code>$db_timestamp = '2010-01-31 00:00:00'; </code></pre> <p>and then run a daily script that checks if a month has passed since the timestamp was saved in the database:</p> <pr...
php
[2]
2,245,432
2,245,433
how to get value of hidden field value?
<p>I have an asp.net application in which i want to get the value of hidden field value in to my code behind page.</p> <p>Actually its executing code first and after that its executing javascript.</p> <p>That's why i am not getting the value. Please tell me how can i get the value.</p> <p>Javascript</p> <pre><code>...
asp.net
[9]
5,890,070
5,890,071
why isn't this click trigger on a tab list working with jQuery?
<p>I've inherited support for a rails site with jQuery and I'm still learning jQuery. Looks like they're using tab navigation, and trying to trigger a click on the next tab with a 'Next' link below. Here's the relevant snippet:</p> <pre><code>&lt;script type="text/javascript"&gt; jQ().ready(function(){ ...
jquery
[5]
3,722,813
3,722,814
Authorization in ASP.NET for accessing a set of subdirectories depending on login
<p>Scenario: A web application consists of a root directory (open, no authorization) and a number of subdirectories (let's call them Sub1, Sub2 and Sub3). Furthermore, when an user name is provided, there's a method contacting a SP and returning an <code>IEnumerable&lt;String&gt;</code> consisting of the names of subdi...
asp.net
[9]
4,638,518
4,638,519
How can I make a constructor's argument be available from instance initialisers?
<pre><code>class Foo { final String s; final int x = s.length(); Foo(String s) { this.s = s; } } </code></pre> <p>The above code will not compile, because the assignment to x happens before the assignment to s. I could place the assignment to x inside the constructor, but for readability in ...
java
[1]
2,012,525
2,012,526
Java application installer as a windows service or startup
<p>I am using netbeans to create a project, and the final result needs to be an installer, that when you install the app, it would automatically turn itself on after every computer reset. I was looking (still am) for any software that would help me, but cant find anything.. I found a simple install creator and it makes...
java
[1]
1,931,484
1,931,485
how to parse xml with http post service
<p>guys, I want to parse a xml in android which is got by HTTPPost method service. and I stored that xml in a string variable, but i don't know how to parse it. becoz it is in a string format. can any one give the example code for this? .............</p>
android
[4]
4,597,599
4,597,600
How to implement a HTTP Server in android which can be access by other device with browser?
<p>I have a new requirement to implement a HTTP Server which run in a android device. And this HTTP server is access by other device such as PC with browser. I find a example like it: PAW server for android. But I don't know how to implement it. The PAW server for android is very complicate. Is there any simple way to ...
android
[4]
2,288,933
2,288,934
Using a Date as the hash table key
<p>How can I create a hash table object in JavaSript and use a date as the key? So far I've got this:</p> <pre><code>var eventHash = {}; for (var i = 0, l = events.length; i &lt; l; i += 1) { eventHash[events[i].date.getTime()] = events[i]; } </code></pre> <p>And then when I want to find the event associated with...
javascript
[3]
4,796,714
4,796,715
Type casting to EntityCollection<Object>
<p>I have a method taking a parameter EntityCollection</p> <p>Say:</p> <pre><code>DisplayItems(EntityCollection&lt;Object&gt; items); </code></pre> <p>Why is it not possible to call?</p> <pre><code>EntityCollection&lt;Student&gt; students; DisplayItems((EntityCollection&lt;Object&gt;) students); //type casting her...
c#
[0]
1,195,978
1,195,979
Python text file
<p>I have a txt file which is approx 25 columns wide and 5 columns deep, I have written the following script </p> <pre><code>for line in open("ABC.txt"): fg = line.split("\t") minimum = fg[17] print minimum </code></pre> <p>This is finding column 18 data which is </p> <pre><code>Supplier B 567 4444 2.77 ...
python
[7]
4,707,624
4,707,625
Remove the Close button in the program's title bar
<p>Goal:<br> Don't want the user to use the X mark (upper right of the program's screen) to exit the program.</p> <p>Problem:<br> Don't know how to remove that icon that allows user to exit the program?</p>
c#
[0]
968,404
968,405
my php files are nt getting displayed so wat should i do for tht?
<p>how to display Php if else statements and how to define a function in php?</p>
php
[2]
3,051,637
3,051,638
How to show random images on Android?
<p>I have a number of images in my directory. I want to show random images in ANDROID. Please anyone provide me with an example.</p>
android
[4]
4,827,668
4,827,669
get data from h:selectManyListbox without selecting
<p>I want to get data from h:selectManyListbox without selecting any data and bind to backing bean automatically.How to get? Please confirm me about this problem.</p>
java
[1]
2,705,419
2,705,420
Application is starting even after closing
<p>This is my first activity and when I press the back button in the phone , the app closes, but the second activty is popping up even after it closes! may be because the thread is still running? but i tried destroying it but of no avail! any suggestions </p> <pre><code>protected void onCreate(Bundle myclass) { su...
android
[4]
807,414
807,415
how to sort files on server in the client-server model?
<p>I am developing a client server model in which i need to send some TCP dump data to the server. The server will sort the data and will send it back to the client. I wanted to know how to go about this procedure. </p>
java
[1]
2,581,983
2,581,984
Copying files with unicode names
<p>this was supposed to be a simple script</p> <pre><code>import shutil files = os.listdir("C:\\") for efile in files: shutil.copy(efile, "D:\\") </code></pre> <p>It worked fine, until i tried it on a pc with files named with unicode characters! python just converted these characters into question marks "????" w...
python
[7]
3,936,823
3,936,824
Python: `1+1j == (1+1j)` but `1+1j.imag == 2`, why?
<p>It's very strange. Looks like python interpret it as <code>(1+1)j.imag</code>, but why? Shouldn't it be <code>1+(1j).imag</code> or <code>(1+1j).imag</code>?</p>
python
[7]
3,625,772
3,625,773
JQuery fire click event on clicking li
<p>I have ul li list and I want to fire a jQuery click event on clicking "li" element but except the first li/first-child. So suppose if I have a below list:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ $(".sample_list li").click(function(){ alert("hello");...
jquery
[5]
5,777,199
5,777,200
Browserless JavaScript
<p>I talked to the Team Lead at Snap-On Tools once, and she told they used an "implementation of JavaScript" for their server-side coding. It's been a while, but I was thinking, WTF is she talking about? Are there interpreters for JavaScript besides those implemented in browsers? </p> <p><strong>How can you create a p...
javascript
[3]
2,394,049
2,394,050
Bundle Identifier
<p>my bundle identifier : com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</p> <p>app Name : World</p> <p>my account name in apple : S111</p> <p>what's my bundle identifier for insert into itunesConnect for upload app?</p> <p>company name means "Organization Name" that exist in (Info->build) or means apple id ? <...
iphone
[8]
5,449,627
5,449,628
Clearing a carriage return from memory in C++
<p>I have the following code:</p> <pre><code>int main() { // Variables char name; // Take the users name as input cout &lt;&lt; "Please enter you name..." &lt;&lt; endl; cin &gt;&gt; name; // Write "Hello, world!" and await user response cout &lt;&lt; "Hello, " &lt;&lt; name &lt;&lt; "!" &lt;&lt; endl; cout &lt;&lt...
c++
[6]
864,840
864,841
How to get Google plus birthday issue
<p>I was made a Google plus app in my android phone and get the list of all my friends successfully but when i get the date of birth my friends then its return me null even my friend share their birthday with my and mark it as public.</p> <p>my code is </p> <pre><code>String dob=""; if(personBuffer.get(i).hasBirthda...
android
[4]
5,835,409
5,835,410
How to do a registration confirmation email which will expires within 24 hr
<p>I have a php registration form but now I want to create a registration confirm email which will send to provided email and expires within 24 hr. and when that link is clicked then registration will be confirmed.</p> <p>Please anybody help and provide some code. Thanks in advance. </p>
php
[2]
675,221
675,222
Is this defining a new class or new instance?
<p>New to java. Unclear about this piece of code:</p> <pre><code>ParseQuery query = new ParseQuery("GameScore"); query.getInBackground("xWMyZ4YEGZ", new GetCallback() { public void done(ParseObject object, ParseException e) { if (e == null) { // object will be your game score } else { // somethin...
java
[1]
246,889
246,890
Limiting the input for all the textboxes to 2 digits(0-99), whose ID contains a certain text or has specific class. (jQuery)
<p>I have two sets of textboxes which are generated dynamically. All these textboxes has either (<code>**textnormal**</code> or <code>**textnormalHS**</code>) as <strong>class name</strong> and all of them have a specific text ("txtMem") as part of their <strong>ID</strong>. I want to limit the no of characters to be d...
jquery
[5]
5,352,350
5,352,351
Copy & Paste, 2011 Edition
<p>How can I copy and paste text using JavaScript?</p> <p>Most of the methods I've found via Google don't seem to work with newer browsers/versions of Flash. Are there any methods that still work?</p>
javascript
[3]
2,275,658
2,275,659
Property method in python
<p>Can some1 explain me this behaviour as to why 1) doesnt work while 2) and 3) works 1)</p> <pre><code>class bm(object): ....: def __init__(self,val): ....: self.a=val ....: def get(self): ....: return self.a ....: def set(self,val): ....: self.a=val ....: ...
python
[7]