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
5,715,678
5,715,679
Multiple Screen Size support for android?
<p>I am creating a simple <code>layout</code> in android with some customized buttons(not the ones android provides by default).The image appears proper on screen size 2.7 to 5.1. However <code>buttons</code> appear stretched on screen size 5.4 and greater (tried till screen size 7).I have made four same images named t...
android
[4]
3,010,813
3,010,814
scripting gmail bulk fowarding, IMAP not an option
<p>Constraint justifying script: IMAP is not an available option. I am working with Gmail enterprise and the option has been made unavailable.</p> <p>This script needs to bulk forward gmail by user defined label and include message recipient, sender, subject, and date. It can successfully forward messages; however, g...
javascript
[3]
4,523,780
4,523,781
Streaming WebRadio
<p>I want to stream a webradio channels but android MediaPlayer Supports only streaming of files that are in downloadable form.</p> <p>Anybody have solution for this? </p>
android
[4]
1,600,216
1,600,217
$_SESSION Problem
<p>I have recently changed my editor to save int UTF-8. This started poping out afterwards and don't know what it means.</p> <pre><code>Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/sudancar/public_html/index.php:1) in /home/sudanc...
php
[2]
235,012
235,013
JavaScript - Get the parent iframe of element that was right clicked for context menu
<p>I'm developing a <strong>Firefox</strong> extension. I want to see if the <strong>selected text</strong> is in a editable area like in a WEBMAIL, GOOGLE DOCS, etc. If it is then some items in the context menu will be available in order to modify that text. As i happened to find these editable textareas are located ...
javascript
[3]
4,176,089
4,176,090
toString() method is not overridden when a reference to Annotation is output in println()
<pre><code>package javaapplication20; import java.lang.annotation.*; import java.lang.reflect.*; @Retention (RetentionPolicy.RUNTIME) @interface MyAnno { String str(); int yu(); } @Retention (RetentionPolicy.RUNTIME) @interface Wasp { double hg(); } @MyAnno(str = "Falcon", yu=5 ) @Wasp(hg = 54.67) public c...
java
[1]
5,492,092
5,492,093
Convert.ToSingle() for float data Type
<p>I have used many of the Convert.To..... functions for conversion , but I didn't understand one thing that for every datatype they have provide a Convert.To function but not for float datatype, in order to convert to float you need to use Convert.ToSingle() , why is this so ?</p>
c#
[0]
3,286,294
3,286,295
jQuery - Using replaceWith twice doesn't work
<p>I'm using jQuery to replace a HTML element with another element. It works great the first time, but not the second time. I have no idea why it doesn't work the second time.</p> <p>Anyone any idea?</p> <p>Here's an example of the problem: <a href="http://jsfiddle.net/jfYLG/" rel="nofollow">http://jsfiddle.net/jfYLG...
jquery
[5]
2,873,424
2,873,425
Didn't find the R.java file
<p>i recently downloaded the Foursquare app (open source) from google , and when i opened it with eclipse i've seen a lot of errors , and i figured out that there is no R.java file in the gen folder , instead there is Buildconfig.java So how can generate the R.java file thanks</p>
android
[4]
3,772,766
3,772,767
How to get a handle to a new Object while unit testing?
<p>How would I test this ValueObject created on the fly in SomeClass without stubbing it out using PowerMock etc?</p> <pre><code>class ValueOBject { private String x, y; getters setters } class SomeClass { public void foo () { ValueObject vo = new ValueObject(); vo.setX("some string 1");...
java
[1]
1,922,722
1,922,723
Way to fill List<> with elements
<p>I have in my code </p> <pre><code>List&lt;BookedReelsState&gt; retVal = new List&lt;BookedReelsState&gt;(somesize); </code></pre> <p>Match later in the code if some condition works I need to fill this entire List with same value.</p> <p>Of course I can do it via <code>foreach</code> loop and set values , Is there...
c#
[0]
164,802
164,803
Is there any way to count the number of occurences in a jQuery array?
<p>I have an array that I put together in jQuery and I'm wondering if there is a way that I could find the number of occurrences of a given term. Would I have better results if I tried creating a string instead?</p> <p>Thanks,</p> <p>Lance</p>
jquery
[5]
4,021,579
4,021,580
Getting jert.jar, jnet.jar and jsse.jar?
<p>I'm trying to setup jetty 7 with ssl, part of the instructions say:</p> <p><strong>make sure that jcert.jar, jnet.jar and jsse.jar are on your classpath</strong></p> <p>Where do we find those jars from? I'm running on mac 10.6. They don't seem to be part of my java installation, and not sure where to download them...
java
[1]
1,430,221
1,430,222
how to check if text exists in javascript var
<p>I have a var that contains some text. I would like to check whether the texts has a certain word.</p> <p>Example: </p> <pre><code>var myString = 'This is some random text'; </code></pre> <p>I would like to check if the word "random" exists. Thanks for any help.</p>
javascript
[3]
5,225,967
5,225,968
Can you see what's wrong with my simple php code?
<p>I just can't figure out why I am getting this error:</p> <blockquote> <p>Warning: Cannot modify header information - headers already sent by (output started at C:\Users\Gateway\Documents\xampp\htdocs\login.php:3) in C:\Users\Gateway\Documents\xampp\htdocs\login.php on line 14</p> </blockquote> <p>Her...
php
[2]
1,028,164
1,028,165
Using GridRecord Event Args
<p>I'm new to asp.net and I have a condition where when I click a button i need to use Gridrecord event args.</p> <pre><code> protected void yesclicked(object sender, GridRecordEventArgs e) { NCDCPoint ncdc = new NCDCPoint(); SaveAllColumnFields(ref ncdc, e); mCDC.NCDCPoints.InsertOnSubmit(ncdc); mCDC...
asp.net
[9]
1,565,793
1,565,794
Javascript Prompt: best practice?
<p>I would like to prompt the user for some input on a webpage.</p> <p>I can't use the builtin Javascript <em>prompt</em> function as it is creates security warnings in IE.</p> <p>Is there a best practice/method/example that people use to recreate this?</p> <p>The Javascript would need to be embedded in the page, so...
javascript
[3]
1,524,448
1,524,449
Convert pdf,doc,ppt,xls files to html using php
<p>Actually I want all files view as html like gmail in view as html.</p> <p>I have used below code for doc view as html but here not displaying font style (bold,color,etc...)</p> <pre><code>function parseWord($userDoc) { $fileHandle = fopen($userDoc, "r"); $line = @fread($fileHandle, filesize($userDoc)); ...
php
[2]
4,310,543
4,310,544
How can i get the buttons to launch a intent
<p>How can I get the buttons to link to a intent so when user clicks on one of these arrays it would load up a new java file?</p> <pre><code>final CharSequence[] items = {"Red", "Green", "Blue"}; AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Pick a color"); builder.setItems(items, new...
android
[4]
2,977,755
2,977,756
NullPointerException in for loop?
<p>I know why there is an error and i have fixed it.. i need someone to explain it properly.. It compiles fine but at runTime it shows Null Pointer Exception at line <strong>appString[i][j] = s[j];</strong>..Some one know the reason...?</p> <pre><code>appString = new String[app.size()][]; for(int i = 0; i&lt;app.size(...
java
[1]
2,829,208
2,829,209
Issuse with session_start()
<p>I am new with advance php. Please can you explain what this function does?</p> <pre><code>ini_set('session.use_trans_sid', 0); </code></pre> <p>I have particular file named index.php in which if I start session I get following error on this function.</p> <blockquote> <p>Warning: ini_set() [function.ini-set]: A ...
php
[2]
5,270,179
5,270,180
Convert couple of characters to int
<p>How can I convert couple of characters to int, to keep the question simple let's assume this :</p> <pre><code>char c1 = '1'; char c2 = '4'; char c3 = '5'; </code></pre> <p>What would be the efficient way to get <code>145</code> type int.</p>
java
[1]
606,310
606,311
Access values from dynamic array via another function
<p>I have a function that sets bunch of <code>setTimeout</code> functions. All functions are added to Array <code>funcs</code>; nevertheless, when I try to stop them using <code>stopplay().clearTimeout</code> the array has no values.</p> <p>How to access those functions and <code>clearTimeout</code> on them?</p> <pre...
javascript
[3]
4,842,538
4,842,539
The Java language specification allows a dummy gc() method. Why?
<p>I've a hard time understanding the following:</p> <p><b> "The Java language specification allows a dummy gc() method." </b></p> <p>Why would the standard do this?<br>Its effectively making a very important feature of java <em>optional</em>.<br>This would also mean my same program will behave differently on two dif...
java
[1]
3,854,752
3,854,753
how can i get Los Angeles (USA) current time programmatically in android?
<p>Hi i developing a application in android. i need to use the Los Angeles (USA) location current time, date. For that I used the below code </p> <pre><code> Calendar calendar = Calendar.getInstance(); TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); calendar.setTimeZone(tz); ...
android
[4]
2,111,267
2,111,268
Initiating activity for settings class
<p>In my code I'm calling a preferences activity from my main activity which prompts the user to enter username/password, as below..</p> <hr> <p>// Launch Preference activity</p> <p>Intent k = new Intent(application.this, settings.class);</p> <p>startActivity(k);</p> <hr> <p>This calls settings.xml, but I want to...
android
[4]
1,545,472
1,545,473
Date Time Issue
<p>the data table (C#) returns date/time (with AM/PM) column with below data,</p> <p>08/01/2011 5:16:02 PM<br> 07/27/2011 9:31:26 PM</p> <p>how to convert the same to string data type in C#?</p> <p>in SQL, i can convert datetime to string by below, but how to convert in C#....?</p> <pre><code>ISNULL(CASE WHEN CONVE...
c#
[0]
928,509
928,510
using empty does not provide correct results
<p>Can someone please tell me why I'm able to echo inside of this block when the session clearly has a value?</p> <pre><code>$_SESSION['test']['testing'] = 'hgkjhg'; echo $_SESSION['test']['testing']; // Produces hgkjhg (Clearly not empty) if(empty($_SESSION['test']['testing'])){ echo 'Hello'; // This echoes and to m...
php
[2]
5,318,447
5,318,448
Iphone sms app issue
<p>iam making an application where i have to send a same body sms to my contact list . I m using </p> <pre><code>Class messageClass = (NSClassFromString(@"MFMessageComposeViewController")); if (messageClass != nil) { MFMessageComposeViewController *controller = [[[MFMessageComposeViewController alloc] ...
iphone
[8]
3,537,143
3,537,144
Creating unordered list in a DIV
<p>I have a DIV. I want to dynamically generate a bulleted list inside the DIV using jQuery with a items list I have with me</p> <pre><code>for (cnt = 0; cnt &lt; someList.length; cnt++) { someList[cnt].FirstName + ":" + someList[cnt].LastName + "&lt;br/&gt;" // what to...
jquery
[5]
2,698,618
2,698,619
Is there a "real height" in jQuery?
<p>Maybe it is a stupid question, but I'd like to know if there is a "power" function that get to me the real height of a div, counting also the "display:none;" height for each element on it.</p> <p>Is it just a dream?</p>
jquery
[5]
4,832,284
4,832,285
Is it possible to get the embed tag attributes through jquery?
<p>I tried </p> <pre><code>$('#w001').attr('width'); // return undefined </code></pre> <p>for tag:</p> <pre><code>&lt;embed type="application/x-vlc-plugin" class="w001" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2" autoplay="yes" id="w001" width="512" height="384" rtsp-caching="80" &l...
jquery
[5]
3,248,426
3,248,427
Dynamic Invoke feature in java
<p>If we use Dynamic Invoke, is there any performance improvenent in the application? if not what is the advantage of it?</p>
java
[1]
1,974,983
1,974,984
Error occured during build the source code of Android 2.2
<p>A fatal error occured while making build of Android 2.2 source code. The error occured can be found in this link: <a href="http://pastie.org/1292955" rel="nofollow">http://pastie.org/1292955</a></p> <p>How to solve this problem ? for why it occures. suggest me.</p>
android
[4]
2,185,233
2,185,234
Questions about GUIs and stuff in Java
<p>This isn't homework, this is something I'm doing for fun. If you think it's homework, then don't answer. I know all about Java, stacks, arrays, variables OOP, etc. But not GUIs.</p> <p>I'm making a text based, but I'm using a GUI to do it. I'm just using Jframes, Jbuttons, and JPanels to do it, that was the easy ...
java
[1]
4,559,804
4,559,805
Getting this Error: Server:: Write Abort: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: QueryClass
<p>I have a JAVA server using MultiThread to communicate with client. Everything of the Server works, except for when a client object is send to Server thread. I have narrowed down the problem to this following lines of code. </p> <p>The error is as a result of this line in the code: queryClass= ((QueryClass)inStream...
java
[1]
3,307,464
3,307,465
C++ middleware assignment
<p>I have a rather large assignment for my Programming II class. We are to take a system that we currently use or have access to and develop a middleware program that runs and does something new for you or improves upon middlware that is already there. Originally I was going with writing a middleware program that uses ...
c++
[6]
4,411,089
4,411,090
Which edition of Java is being used in Android J2ME or Java SE?
<p>Which edition of Java is being used in Android J2ME or Java SE?</p>
android
[4]
118,040
118,041
The best way to load javascript locally if web not available?
<p>I am using the following. The intent is that it will load jQuery even if I am running on my development machine and the internet is not available. </p> <p>Can someone let me know if this is the best way to do this?</p> <pre><code> &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" ty...
jquery
[5]
3,792,543
3,792,544
Python: Check an index against multiple other indexes
<p>I am using Python and I would like to check the location of a value in a list of lists against other indexes.</p> <p>Like if I had 1 at (1, 1) I would want to be able to check if 1 were at the other indexes so I could make something happen based on which index it matched. </p> <p>For example:</p> <pre><code>list_...
python
[7]
6,015,984
6,015,985
display multiple columns under the one header in grid view
<p>I am using the grid view in asp.net and i want to show the sub columns under these headers from different table in database.</p> <p>Example: Suppose <strong>Expenditure</strong>(Main header)</p> <p>Date,Details,Amount(sub columns of expenditure)</p> <p>and VAT,Charges,Repairs,Salary are the sub columns under Deta...
asp.net
[9]
4,838,315
4,838,316
Effective activity List
<p>Iam trying to make my Activity List more effective. I have an Activity List in my app, on every call its going to the database collecting some information and show it on the screen(as List).</p> <p>so basiclly everytime you finish and re-call that list, it's calling onCreate.. again and again.. my problem here is w...
android
[4]
580,108
580,109
const object and const constructor
<p>Is there any way to know if an object is a const object or regular object, for instance consider the following class</p> <pre><code>class String { String(const char* str); }; </code></pre> <p>if user create a const object from <code>String</code> then there is no reason to copy the passed native string and that...
c++
[6]
4,863,625
4,863,626
android-How to set the text size of list item in alert dialog
<p>In My application one button is there when you click on that one alert dialog will be appear. that alert dialog consists of single choice list items. Here i want to set the text size of single choice list item. is it possible? if yes how to do it.</p> <p>The following is my code </p> <p><strong>sclist.java</stron...
android
[4]
5,829,300
5,829,301
Replace textbox value using javascript
<p>I have two textboxes</p> <pre><code>&lt;input id='random_value' name='random_name' value='First' &lt;input id='random_value' name='random_name' value='' </code></pre> <p>I need to replace the value of a textbox having value 'First' with 'Second' instead of using textbox id or textbox name.Is it Possible?</p>
javascript
[3]
5,125,224
5,125,225
How to use void pointer to create a 2D array in C++?
<p>I was given a question from my prof. that to use a void pointer to create a dynamic 2D array rather than int pointer due to the data type is more general.</p> <p>But I've no idea how to create by using -> <code>void***m // data type is void* pointer</code></p> <p>Anyone can give an example on this? Appreciate your...
c++
[6]
589,544
589,545
radio group funtionality
<p>On my ASPxGrid, I have two columns: Approve and Deny. Both the columns are of boolean type (Radio buttons).</p> <p>In a particular row, if a user selects the radio button for the Approve column then the radio button for the Deny column should be unselected and vice versa.</p> <p>I also have a header radio button f...
asp.net
[9]
3,796,249
3,796,250
How to get the number of DOM elements used in a web page
<p>Using jQuery I can get easily the number of DOM elemetns used by a web page:</p> <pre><code>$('*').length; </code></pre> <p>But not all web sites are using jQuery. </p> <p>So my question is: how to get the number of DOM elements used in a web page using pure javascript and js console.</p>
javascript
[3]
3,275,483
3,275,484
How do I insert a list at the front of another list?
<pre><code>&gt;&gt;&gt; a = ['foo.py'] &gt;&gt;&gt; k = ['nice', '-n', '10'] &gt;&gt;&gt; a.insert(0, k) &gt;&gt;&gt; a [['nice', '-n', '10'], 'foo.py'] </code></pre> <p>I want to list <code>k</code> to be on the same level as <code>foo.py</code>, rather than a sublist.</p>
python
[7]
5,260,110
5,260,111
java: about read txt file into array
<p>i want read txt file into array.<br> In the array, how can i do that? data = new String[lines.size] <br>i dont want to hard code 10 in the array. <br>My code:</p> <pre><code> BufferedReader abc = new BufferedReader(new FileReader(myfile)); String []data; data = new String[10]; // &lt;= how can i do that?...
java
[1]
3,792,134
3,792,135
Remove parent DIV
<p>I have this html code:</p> <pre><code>&lt;div class="action"&gt; some_text &lt;a class="delete_action" name="q1"&gt;some&lt;/a&gt; &lt;/div&gt; &lt;div class="action"&gt; some_text &lt;a class="delete_action" name="q2"&gt;some&lt;/a&gt; &lt;/div&gt; </code></pre> <p>And jQuery code:</p> <pre><code>$(d...
jquery
[5]
1,530,112
1,530,113
php pthreads maximum execution time
<p>I am reading <a href="http://pthreads.org/" rel="nofollow">http://pthreads.org/</a> on the topic of pthreads and i have this questions.Does pthread depend on the maximum execution time set using <code>void set_time_limit ( int $seconds )</code> or can a thread run for more time than set_time_limit allows?.</p>
php
[2]
2,779,948
2,779,949
android use Multipartentity to upload a .txt file to server
<p>I try to upload a text file using MulitPartEntity but unable to upload .. my code is mention below please help me..</p> <pre><code> File file = new File("/sdcard/" + strEmailAddress + ".txt"); HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost(strUrl); M...
android
[4]
5,968,661
5,968,662
All containers coming out at the same time
<p>I'm creating a world map and there are flags in several countries. What I need to do is so that when someone hovers over a flag a DIV with content corresponding to that country slides down and then gets closed by clicking on a close button.</p> <p>This is my basic HTML:</p> <pre><code>&lt;map name="imgworldmap" id...
jquery
[5]
3,160,754
3,160,755
Using exit(0); in iphone app
<p>Will the application get rejected if we use exit(0); in our application</p> <p>Thanks in advance</p>
iphone
[8]
1,981,258
1,981,259
Reset the counter for Traffic Stats Api in android
<p>How to reset the counter for Traffic Stats Api. Is there any system call for that. Actually everytime, device reboot, it removes the earlier file and create new one , thus setting new counter on each reboot. Can i do it programatically from my App.</p>
android
[4]
1,941,816
1,941,817
Is Python's logging module thread safe?
<p>If you call the same logging handler from two different python threads, is there a need for locking?</p>
python
[7]
2,338,534
2,338,535
Select records using WHERE clause on comma delimited field
<p>I have a table myTable with 2 fields (4 example):</p> <pre><code>ID Zip_Codes === ========= 1 60148,60123,61034,61234 2 60122,61034 </code></pre> <p>I want to use:</p> <pre><code>$zip = 61034; $qry = "Select ID from myTable Where $zip in Zip_Codes"; </code></pre> <p>Is that possible? What makes it fast?...
php
[2]
5,317,065
5,317,066
How can I achieve this search condition?
<p>I want to implement some search condition like the below which I want to make in best optimized way, how can I achieve this?</p> <pre><code>switch (e.CommandName) { case "DRESS": chkItem.Items.Clear(); chkItem.DataSource = cDressing.GetAllDressingDetail(cWebUtil.CurrClientID); chkItem.DataTextF...
asp.net
[9]
223,452
223,453
Pass parameters to user control at Page_Load
<p>I'm fairly new to the .NET framework model of doing things so any help/suggestions would be much appreciated. Basically I want to call a user control from a master page. However, I need to pass an object (a List of objects to be more specific), to the user control. I'm generating the list of objects in the Page_Load...
asp.net
[9]
3,092,149
3,092,150
Declaring function Templates within a namspace and using in a class
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/495021/why-can-templates-only-be-implemented-in-the-header-file">Why can templates only be implemented in the header file?</a><br> <a href="http://stackoverflow.com/questions/4100893/undefined-reference-to-templat...
c++
[6]
3,003,256
3,003,257
Adding anchor tag with insertafter in jquery
<p>I'm a newbie to jquery. I want to know why can't I insert an anchor tag with insertafter, but I can add h2 tag and other tags. Please help me. and here is the link to the code.</p> <p><a href="http://jsbin.com/iboquj/4/edit" rel="nofollow">http://jsbin.com/iboquj/4/edit</a></p> <pre><code> $(function(){ ...
jquery
[5]
3,192,441
3,192,442
Python record the time of typing
<p>I need to record the time when the user send everyone of a series of phrases (strings) into a python script. How can I do that? Thank you</p>
python
[7]
814,224
814,225
multiple arrays in a listview
<p>For my listview, I want to be able to display multiple textviews within it, with each textview displaying the items of a specific array associated with it. Right now is what I have:</p> <pre><code>public class GreatestHits extends ListActivity { @Override public void onCreate(Bundle savedInstanceState) { super....
android
[4]
5,371,296
5,371,297
Is it possible to change PRIVATE data memebers of a CLASS illigaly?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/729363/is-it-possible-to-access-private-members-of-a-class">Is it possible to access private members of a class?</a> </p> </blockquote> <p>Is it possible to change PRIVATE data memebers of a CLASS without Member...
c++
[6]
1,173,270
1,173,271
jQuery - if statment, combined widths minus 100 must be less than body
<p>The following code checks the combined width of a set of divs, and if there less wide than the document body it changes the ID of a different div: </p> <pre><code>$(document).ready(function() { $('#makeMeScrollable').each(function() { var totalImageWidth = 0; $(".image-div", this).each(function () { totalImageWi...
jquery
[5]
4,582,147
4,582,148
Javascript - how do I iterate thru all URLs of a given page
<p>I am not experienced in Javascript. After the page finishes loading, I need to iterate thru all URLs a given page and perform some cleanings.</p> <p>How do I do that?</p> <p>Something like</p> <pre><code>for i = 0 to (number of URLS on the page) { doSomething (URL(i)); } </code></pre> <p>thanks</p>
javascript
[3]
4,574,051
4,574,052
how to retrieve recent call list and favourites list in android?
<p>I need to call recent call list and favourite call list on the click of respective buttons and need the data in my own list layout.I am new to android and having lot of trouble with this.can anyone please help me..thanks in advance..</p>
android
[4]
5,841,368
5,841,369
OnCommand event on ImageButton control
<p>I have problem with OnCommand event. When I give this parametr as argument or display everything is all right, but if I used it as CommandArgument I get InvalidCastException. In code behind method CommandArgument is equal "" (string.Empty)</p> <p>In my aspx file I have this code below:</p> <pre><code>&lt;%# (bool)...
asp.net
[9]
268,517
268,518
Class returning object confusion
<p>I've been asked to create a class that does some stuff, and then returns an object with read only properties.. Now I've created the class and I've got everything working 100%, however I'm confused when they say to 'return an object with read only properties'..</p> <p>This is the outline of my php file which contain...
php
[2]
5,258,890
5,258,891
Jquery get javascript file without running
<p>I want to get content of a file using jquery, normally i can use:</p> <p><code>$.get("file", function(data) { alert(data) }</code></p> <p>When i try to get javascript file, jquery run the javascript code before returning callback.</p> <p>How to get file content without running its code?</p>
jquery
[5]
1,243,101
1,243,102
Save a $_GET value because I use another one in PHP
<p>Look at the code below and you will onderstand ;)</p> <p><strong>Multiplecompetitions.php</strong></p> <pre><code>&lt;p&gt;&lt;a href="subscribe.php? Competition =1"&gt;competition 1!&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="subscribe.php? Competition =2"&gt;competition 2!&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="...
php
[2]
1,920,504
1,920,505
session expiring soon
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/648992/session-timeout-in-asp-net">Session timeout in ASP.NET</a> </p> </blockquote> <p>I am working is ASP.NET and using Session transfer method for page locking. In my case the session is being expired very so...
asp.net
[9]
3,503,256
3,503,257
Best way to pull out a section of a string
<p>I am trying to pull out a number from a string like so <code>"item_2445_205"</code>. So I need to pull out <code>"2445"</code> as the item ID and discard the rest. What is the best way to do that?</p>
javascript
[3]
85,616
85,617
mail sending with attachement in android application
<p>Thanks in advance, HOw to send mail in android application with some file attached in attachement.. and I want to send this mail automatically not use any another mail screen or navigation..</p> <p>Thanks again..</p>
android
[4]
1,423,427
1,423,428
How do I restrict the usage of a C# application
<p>I want to restrict the use of any exe file to specific number of iteration, lets say 10. After that limit is reached user shall not be able to run the exe file, or on running the exe file for the 11th time, he / she shall be greeted with a message "Exceeeded Trial Run" .</p> <p>This is very much possible in C, lik...
c#
[0]
2,363,342
2,363,343
error msg in log4cxx
<p>I am using VS2005 and log4cxx 10.0.1 for logging purpuse. I downloaded the log4cxx and built it. then i copied the .dll and .lib files to the working(new) project. Also made the .xml file. and all required changes to build new project.</p> <p>I built new project successfully but when i run the project(new), an erro...
c++
[6]
5,695,328
5,695,329
Referencing a variable in an object created using custom constructor
<p>Trying to get this to work in JS:</p> <pre><code>var calculate = function(votesA, votesB, votesC) { var total = votesA + votesB + votesC; function Results(resultsA, resultsB, resultsC) { this.resultsA = resultsA; this.resultsB = resultsB; this.resultsC = resultsC; } var cu...
javascript
[3]
5,310,558
5,310,559
Python - How to remove/unimport libs was imported before
<p>As we know that, in python 2.x, <strong>integer</strong> would be got if we divide two <strong>integer</strong> values. However, if using the <strong><em>furture</em></strong> (it's might be a lib or something like that), just like <strong>from __<em>future</em>__ import division</strong>, we can get float value. E....
python
[7]
4,736,569
4,736,570
How to set some String values in to an Alarm
<p>I need to pass some values into <code>onReceive()</code> method in <code>BroadcastReceiver</code>. I'm implementing an Alarm and when alarm trigger out i need to show some text based on some of the text values i gained before? Any suggestions on how to do this?</p>
android
[4]
4,633,824
4,633,825
place for storing custom IPrincipal
<p>I'm using my custom IPrincipal, because I need some additional fields, like id and password (logging to outer wcf service). I'm setting the principal in the Application_PostAuthenticateRequest event, but it must be done on every request. I want to cache it in some place, but what is the best solution for it? Session...
asp.net
[9]
4,623,022
4,623,023
Assign value to type byte[] in c#
<p>How can I set a value to a byte[]</p> <p>I have tried the following but I get a compilation error:</p> <pre><code>byte[] XMLbyte=null; XMLbyte = byte(2345) </code></pre> <p>Any suggestions how I can do this?</p>
c#
[0]
5,018,985
5,018,986
My app never goes to background, always terminate, why?
<p>I have an app that always terminate, never goes to suspend mode.</p> <p>I have other apps that go to suspend, the only difference that I can see between them are:</p> <ul> <li><p>app that terminates: In the left popup menu of the main project window, no matter wich option I select, it start always with Device - 3....
iphone
[8]
2,418,567
2,418,568
How to detect wrongly encoded strings in PHP
<p>Suppose to have string like this one:</p> <pre><code>Çë½ÌΪʲôÎÒÒ»½øÐв鶾ʱ¾Í·¢ÏÖϵͳÅÌ¿ÉÓÃ¿Õ ¼ä¾Í¼±¾ç¼õÉÙ£ </code></pre> <p>They have been wrongly encoded. How do you think it's possible to know if in fact, it's wrongly encoded? An example of right encoded string would be</p> <pre><code>Ciao mamm@ guardà come ...
php
[2]
2,689,300
2,689,301
C++ Swap string
<p>I am trying to create a non-recursive method to swap a c-style string. It throws an exception in the Swap method. Could not figure out the problem.</p> <pre><code>void Swap(char *a, char* b) { char temp; temp = *a; *a = *b; *b = temp; } void Reverse_String(char * str, int length) { for(int i=0 ;...
c++
[6]
2,755,990
2,755,991
Bitmap memory leak in android
<p>I am working in an android application in which I am having a Bitmap and I am binding that bitmaps to an image view. I also want to set an image border and I have to set my image view in an particular angle which is my requirement. This is the code that I am using to implement this and it works fine except there wil...
android
[4]
920,187
920,188
Fancy box not opened on second time
<p>The below given code is not working on second time when i click the button. I called it using trigger(click) function of jquery.</p> <pre><code>jQuery(document).ready(function(){ jQuery('.fancybox').fancybox( { hideOnContentClick : true, width: 382, ...
jquery
[5]
4,436,148
4,436,149
Overlay view over tab viewcontrollers
<p>using iphone sdk 4.1. I want to overlay a small view over all my tabcontroller views. this will present itself on the push of a button from one of the tab bar viewcontrollers but then i wish it to remain in place even if the user tabs to another view. How to do?</p> <p>Thanks</p>
iphone
[8]
3,963,659
3,963,660
what is Java best practice to handle enum's
<p>hi I know Java for a long time and recently I have been diving deep to the Java world. As an experienced c# developer I find it odd to use Java enum's. For example if I show on console items such as :</p> <pre><code>public enum AdminOpertionFirstlayer {MANAGE_SUPPLY, MANAGE_CUSTOMERS_SERVICE, ORDERS_MANAGEMENT, ...
java
[1]
3,954,506
3,954,507
Is there a way to read a file in a loop in python using a separator other than newline
<p>I usually read files like this in Python:</p> <pre><code>f = open('filename.txt', 'r') for x in f: doStuff(x) f.close() </code></pre> <p>However, this splits the file by newlines. I now have a file which has all of its info in one line (45,000 strings separated by commas). While a file of this size is trivia...
python
[7]
2,100,507
2,100,508
Call a recursive function with different variables
<p>I am new to javascript. I am doing a feedback form where there are 12 radio buttons that need to get validated individually and a textarea will be displayed when I click a particular value.</p> <p>Here, when I click that button, my textarea, which is in display, should be mandatory entered (eg: when I click fail op...
javascript
[3]
4,459,139
4,459,140
Parsing Javascript-Array in PHP
<p>If I have a String, containing the Javascript-Code for an array:</p> <pre><code>parent.data[0].c = [[10,'TESTVALUE',]]; </code></pre> <p>with a lot of nested arrays in it. What is the best way to parse it with PHP. JSON is not an option due to the fact that the data is only available in the format above.</p> <p>T...
php
[2]
4,721,039
4,721,040
Asp.NET - Multiple Instances of AdRotator
<p>I've created a master page that uses 3 instances of System.Web.UI.WebControls.AdRotator each backed by the same XML file of ad elements. For example,</p> <pre><code>&lt;asp:adRotator AdvertisementFile="/ads.xml" Runat="server"/&gt; *** ads.xml *** &lt;Advertisements&gt; &lt;Ad&gt; &lt;ImageUrl&gt;/Path/B...
asp.net
[9]
4,242,737
4,242,738
Android Advice - Images
<p>Im new to Android and over the past few days I have been over many tutorials, I was wondering if you could help me with some advice.</p> <p>I want images on top of each (not completely, there may be some overlapping) other with each image to be clickable.</p> <p>Whats the best way to do this? Have each image in an...
android
[4]
2,955,159
2,955,160
De-Duplication API in Java
<p>Are there any De-Duplication API in Java? I want to eliminate redundant items (for e.g. duplicate fingerprints) from the database, how is it possible through Java programming?</p>
java
[1]
4,218,821
4,218,822
could you suggest me to create a plugin for web application to calculate the each and every method execution time
<p>I want to calculate the each and every method execution time like profiler do.. for my web application. IDE is netbeans and application server is glassfishV2. my application file is EAR (ejb+war). could any body suggest me on this topic. </p>
java
[1]
1,951,226
1,951,227
Profile creation and form submission in Android
<p>I am a newbie in android and trying hard to get on to it. I have searched a lot to find a better and reliable way to do what I want in my application. But didnt get lucky to find specific information. Can anybody tell me how to create a simple login page including form submission text input fields like name , addres...
android
[4]
1,181,925
1,181,926
How to use onConfigurationChanged() and newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE in android 2.3.3
<p>I am using <code>onConfigurationChanged()</code>. In that, when I am changing from LandScape to Portrait, it is calling <code>if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT)</code> and shifting to Portrait from LandScape. But when I am changing from Portrait to Land-Scape, it is not changing to Land...
android
[4]
4,355,645
4,355,646
Update ListView in the main thread from another thread
<p>I have a separate thread running to get data from the internet. After that, I would like to update the ListView in the main thread by calling adapter.notifyDataSetChanged(). But it does not work. Any workaround for that? Thanks.</p>
android
[4]
1,345,258
1,345,259
PhoneStateListener events stop receiving sometime
<p>My application process incoming/outgoing calls and shows some UI. So I use PhoneStateListener to listen changes such as CALL_STATE_IDLE , CALL_STATE_RINGING ,CALL_STATE_OFFHOOK. on receiving call to my BroacastReceiver for incoming/outgoing call. </p> <p>Most of the time things work properly. But sometimes my ...
android
[4]