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
2,277,032
2,277,033
Android Tutorials or book recommendations?
<p>I want to write an Android application(a port from a windows mobile phone) but I need to learn a couple things</p> <ol> <li>How to program for different screen sizes and resolutions (so my controls get bigger smaller or whatever)</li> <li>How to dynamically create controls such labels and checkboxes ( and checkbox ...
android
[4]
3,847,583
3,847,584
php: refreshing script without browser
<p>I know that this can be done with a cron tab, but I was wondering if there was any way to refresh a php script at a certain interval, say one second, without using a browser/javaScript. </p> <p>I have a device that outputs data constantly and I need a php script that can run independent for a browser to load that d...
php
[2]
3,099,263
3,099,264
How to draw shapes (rectangle,circle) on finger swipe in xcode programatically?
<p>I am trying to draw custom shapes like rectangle,circle,traingle on finger swipe in an iphone application.But i am not getting the way ,how will do it.even i googled a lot but still i don't have any solution.any help would be appreciated</p>
iphone
[8]
2,901,432
2,901,433
How do I fake a sms system notification?
<p>Hello everyone I have a question... I'm trying to make my sms faker app, and I can insert the fake sms into the inbox but I cant trigger the notification about the new sms... anyone know how can I trigger it?</p>
android
[4]
3,661,875
3,661,876
Can a telephony.Phone object be instantiated through the sdk?
<p>I am trying to get a phone object so that I can call and conference two numbers from within my application.</p> <p>I have tried using the static PhoneFactory.makeDefaultPhones((Context)this) but have not had any luck.</p> <pre><code>String phoneFactoryName = "com.android.internal.telephony.PhoneFactory"; String ph...
android
[4]
3,265,659
3,265,660
Pointer in managed Code? C#
<p>I use C#.net.</p> <p>These is my method now:</p> <pre><code> [DllImport(DLLPath, CallingConvention = CallingConvention.Cdecl)] unsafe public extern static int AMRecoveryModeDeviceReboot(AMRecoveryDevice device, byte[] paramByte, int u1, int u2, int u3) </code></pre> <p>I must have a Pointer in it, the AMRe...
c#
[0]
3,497,842
3,497,843
NavigationController Problem
<p>In navigationcontroller application , i used</p> <p>ViewController *modalViewController=[[ViewController alloc]initWithNibName:@"ViewController" bundle:nil];</p> <pre><code>[[self navigationController]presentModalViewController:modalViewController animated:NO]; [modalViewController release]; </code></pre> <p>abo...
iphone
[8]
4,972,435
4,972,436
ASP.NET Enter key log out?
<p>I have created Website. After I login When I hit enter key for add Product, my Website just kick me out.? I dont have problem with adding my cart with mouse click. Does Any One have same Issue or Any suggestion ..</p>
asp.net
[9]
2,847,740
2,847,741
Basic if..elseif...else question in PHP
<p>Sorry, just a very basic question on conditionals in PHP</p> <pre><code>If {} elseif {} else {} </code></pre> <p>If the <code>if</code> condition comes out to be true, will PHP still evaluate the <code>elseif</code> to see if that is true as well?</p>
php
[2]
4,563,948
4,563,949
The page will closed & saved after a few minutes
<p>I work with asp.net in c# and i want that if someone is opened his page and didnt do nothing after 5 minutes the page will closed and the changes will saved. how i write it? (this feature is exist in a banks pages or another pages with protection)</p>
asp.net
[9]
3,609,557
3,609,558
Is there a simple command to hide or display an imageview?
<p>I have a series of imageviews that I want to display, but on a button press there needs to be less or more. These imageviews are stored in a list. Is there a simple way to hide or display them?</p>
android
[4]
3,610,602
3,610,603
Save a java source code to a file?
<p>I'm having a problem to save my java source code to a file, I want to prompt the user for the name of the java source file and then write java source code to that file. let me elaborate more, I have created a simple bean builder tool to allow users to add components like JLable or JButton or other components to a de...
java
[1]
1,394,126
1,394,127
PHP uploading images in the correct dimensions
<p>I know this question is very common but the main point in my question is that i want to know how facebook or some other websites upload their pictures in the correct size. for example. if we upload a picture of the dimension : width : 1000px , height : 20px. then facebook updates the status updates with that pic but...
php
[2]
3,737,261
3,737,262
Can i provide services in Android app
<p>My question may seem foolish to you! I just have a doubt that, what happens if i dev an android app, showing a text that </p> <p>"Do you want an android app like this? Just contact me on abcd@gmail.com"</p> <p>What does happen? Does google ban! </p> <p>Thank you!</p>
android
[4]
3,765,599
3,765,600
HTML tags in string for TextView
<p>If I put simple HTML formatting tags, such as &lt;b&gt;...&lt;/b&gt; into a string resource and display the string in a TextView, the expected formatting is applied. But how can I do this if I build up my own String and display it? If I do something like String str = "This is &lt;b&gt;bold&lt;/b&gt;";, the actual ta...
android
[4]
2,551,548
2,551,549
Transparent STATIC text changing
<p>I have this STATIC control displayed over a window that has an image as its background. When I initiate the control it displays a text. If I want to change the text inside a WM_TIMER message it is displayed over the initial text (it is not removed) I have tried UpdateWindow and InvalidateRect but id doesn't work. Th...
c++
[6]
5,885,346
5,885,347
window.location not working when button is clicked
<p>Check out this link: <a href="http://humorjots.com/Barry/BarryWashington.htm" rel="nofollow">http://humorjots.com/Barry/BarryWashington.htm</a></p> <p>The part in the script that says: </p> <pre><code>if(emailInput.value != '' &amp;&amp; zipInput.value != ''){ window.location = "sea206.html"; } </code></pre> ...
javascript
[3]
3,382,008
3,382,009
Can I create a custom configuration qualifier for android?
<p>I know that I can use the android configuration qualifiers for different screen sizes and different orientations. (I am using android 2.2).</p> <p>But I need to build my app to a very specific tablet with its unique screen size/resolution.</p> <p>Can I have another configuration qualifier for my specific tablet so...
android
[4]
4,716,161
4,716,162
sending email in android
<pre><code>public class AndroidEmailActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final EditText edittextEmailAddress = (Edi...
android
[4]
2,271,369
2,271,370
Allocation Bar like View in Android
<p>I am developing an app for Surveys. I want to have Allocation Bar like view in Android. <img src="http://i.stack.imgur.com/fid5w.png" alt="enter image description here"></p> <p>Can anybody tell me how to implement this kind of view. Please help me to solve this issue. Thanks in advance.</p>
android
[4]
1,593,448
1,593,449
res.getIdentifier - find packagename
<p>I need to display an image which I save under res/drawable folder. I get the image name from a web service call and I try to find this image in the drawable folder using the following code</p> <pre><code>ImageView backgroundImage = (ImageView) findViewById(R.id.ivFormBackgroundImage); Resources res = getResources()...
android
[4]
244,368
244,369
Can I override the Javascript Function object to log all function calls?
<p>Can I override the behavior of the Function object so that I can inject behavior prior t every function call, and then carry on as normal? Specifically, (though the general idea is intriguing in itself) can I log to the console every function call without having to insert console.log statements everywhere? And then...
javascript
[3]
3,496,134
3,496,135
DLMS/COSEM in PHP
<p>I'm creating a simple web based AMR (Automated Meter Reading) system, but can't find any implementations of <a href="http://www.dlms.com/index2.php" rel="nofollow">DLMS/COSEM</a> in php, maybe someone has a solution?</p> <p>DLMS/COSEM are communication standards (definitions, rules and methods) for meters</p>
php
[2]
1,246,503
1,246,504
Opening new activity with fixed width and height in android
<p>I am creating an enterprise app on android 2.3 which is like the default launcher app with some modifications. The home and back button of the device is hidden behind an enclosing, thus a user won't be able to click them. My problem is that: once users launch an app from the launcher then how do I give them an optio...
android
[4]
2,219,437
2,219,438
How to make a variable timer sequence which runs infinitive
<p>I have <code>n</code> parameters which have to be run in sequence for <code>t</code> seconds each. All the data is stored in an array which is loaded dynamically through ajax and json and exists of: function parameters <code>p</code> and time to sleep <code>t</code></p> <p><code>function(p1)</code>, for 30 seconds;...
javascript
[3]
376,860
376,861
It is an error to use a se`enter code here`ction registered as allowDefinition='MachineToApplication' beyond application level.
<p>Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.</p> <p>Parser Error Message: It is an error to use a se<code>enter code here</code>ction...
asp.net
[9]
367,638
367,639
Javascript shorthand if-else and returning
<p>Can the javascript shorthand for if-else return out of a function? If so how would this work. </p> <p>eg. I have this:</p> <pre><code>if(boolean){ return; } </code></pre> <p>and I would like to write it as this:</p> <pre><code>(value)? return; </code></pre> <p>Chrome complains that return is unexpected. Is th...
javascript
[3]
3,144,411
3,144,412
Core Data Vs File System
<p>What is the difference between storing data in CORE data and storing them in File system. And on what basis should one choose between them?</p>
iphone
[8]
1,077,711
1,077,712
intermediate javascript: assign a function with its parameter to a variable and execute later
<p>I have a function in javascript:</p> <pre><code>function alertMe($a) { alert($a); } </code></pre> <p>Which I can execute like this: alertMe("Hello");</p> <p>I want to do is assign alertMe("Hello") with the "Hello" parameter to a variable $func, and be able to execute this later by doing something like $func();...
javascript
[3]
414,725
414,726
How to print a numpy array without brackets
<p>I want to convert <code>a = [1,2,3,4,5]</code> into <code>a_string = "1 2 3 4 5"</code>. The real numpy array is quite big (50000x200) so I assume using <code>for loops</code> is too slow.</p>
python
[7]
6,002,963
6,002,964
Android custom tabs
<p>Actually i want 4 tabs in my app but i dont want to show default tabs. i Want to have something like dragging tabs. when i click on first tab and does not pick my finger up and drags to next tab and so on.</p> <p><img src="http://i.stack.imgur.com/lcES5.png" alt="enter image description here"></p> <p>The tab bar l...
android
[4]
2,770,536
2,770,537
how to include currency convertor?
<p>Is There any free API for currency convertor for iphone. So I can get live updates for currency convertor for my application.</p>
iphone
[8]
980,851
980,852
C++ Pointers to Pointers in Java
<p>I am a Java noob. I have been able to grasp the concept of converting C/C++ pointers into Java references and this has gone fairly smoothly.</p> <p>I hit a piece of code that has pointers to pointers (ie **ptr). I need to dereference the pointer and change the value of the pointer it is pointing to (ie *ptr = &n...
java
[1]
5,272,558
5,272,559
My application wont allow me to open any other application
<p>I created a sample package listener application which get launched when user clicks any other application. But currently I am not able to uninstall old version and even not able install updated version. The application is not allowing me to open settings or task manager or anything else. i am not able to do anything...
android
[4]
4,815,073
4,815,074
Problem re-factoring multiple timer countdown
<p>I create my multiple timer countdown from easy or simple script. <a href="http://jsfiddle.net/jowan/6jkSJ/" rel="nofollow">entire code</a></p> <p>The problem's happen when i want to add timer countdown again</p> <p>i have to declare variable current_total_second</p> <p>CODE:</p> <pre><code>elapsed_seconds= tam...
jquery
[5]
5,386,480
5,386,481
Jquery clone of a textbox without the content
<p>Can I clone one textbox without its content??Means if I enter some values in the textbox after cloning I want an empty textbox.Is it possible?Or jquery clone returns this as an innerHtml?</p>
jquery
[5]
1,192,339
1,192,340
check if an input with specific type is selected
<p>I'm using the folowing code to check if an input field is selected but I don't no where the problems is, because it is not working!</p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;title&gt;Test &lt;/title&gt; &lt;head&gt; &lt;body&gt; &lt;form &gt; &lt;input type="text" id="select" value="select"/&gt; &lt;/form&gt...
javascript
[3]
19,512
19,513
Javascript Document.bgColor does not work
<p>In the below code, I get the two dialog boxes, but the bgColor of the page is never changed. Is there any standard that font / color changes are not honored in JavaScript ?</p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body bgColor="GRAY"&gt; &lt;script type="text/javascript"&gt; document.write("This...
javascript
[3]
72,659
72,660
PHP - file_put_contents . How to suppress ouput of it?
<p>When I try to create a file with file_put_contents then it also outputs the file directly in the browser.</p> <p>Code:</p> <pre><code>file_put_contents($file, utf8_encode($seite)); </code></pre> <p>Is there a way to suppress this output? Documentation seems to not have a solution :(</p>
php
[2]
4,212,736
4,212,737
Android Notification Icon
<p>New to Android development. I'm wondering if its possible to programmatically draw an icon to put in the notification bar? What if we want the icon to display some dynamic text for something like battery level? </p> <p>If anyone has a code sample it would be nice. Thanks.</p>
android
[4]
5,054,183
5,054,184
Javascript Object initialization
<p>I am trying to initialize a Javascript object like.</p> <pre><code>function showKabineninfo(W3CElement) { params = params || {}; ... ... } </code></pre> <p>But I am getting Javascript error that "params is undefined"</p>
javascript
[3]
4,002,303
4,002,304
tabbar controller's tabbar is not getting hid
<p>I am using a UITabBarController in my application and when I switch between tabs I want to hide the tabbar in one of the tabs. </p> <p>I tried</p> <pre><code>self.tabBarController.tabBar.hidden = YES; </code></pre> <p>Although the tabs dont appear I can still see the tabbar on the bottom of my screen. </p> <p>I ...
iphone
[8]
1,581,967
1,581,968
How to open a jquery dialog in MVC
<p>I have an aspx page and UserControl [ it contains a button,textbox ] and userControl is added onto aspx page</p> <p>So When i click button in aspx page it should make a Jquery ajax call to the Controller to open a dialog .</p> <p>how can i do this....in this we have to make a call to controller </p>
jquery
[5]
3,322,336
3,322,337
How to get items in listbox in to Settings.Default C#
<p>Im trying to save the items in the listbox in Settings.Default but it will not work, this is what i have so far.</p> <pre><code>test.Properties.Settings.Default.list = listBox1.Items; </code></pre>
c#
[0]
4,780,005
4,780,006
Can I install Microsoft Visual Studio 2010 Service Pack 1 in Microsoft Visual Web Developer 2010 Express
<p>Can I install Microsoft Visual Studio 2010 Service Pack 1 in Microsoft Visual Web Developer 2010 Express? Thanks!</p>
asp.net
[9]
2,985,388
2,985,389
Query Result: What is $row[0]
<p>I know this may sound like a stupid question from a programming-newbie, but I just want to make sure I understand correctly.</p> <p>After a query, what does <code>$row[0]</code> stand for/ result in?</p> <p>Is my understanding correct that <code>$row[0]</code> shows ALL results?</p> <p>HERE ARE EXAMPLES:</p> <pr...
php
[2]
3,956,890
3,956,891
Synchronous HttpPost on a separate thread
<p>Im currently posting some data to a php webservice using a class that extends <code>AsyncTask</code>.</p> <p>Now i need to make a synchronous call, because i want to show the default exception popup that my app has crashed once the data is sent (<code>previousHandler.uncaughtException(t, e)</code>).</p> <p>Can i j...
android
[4]
3,103,687
3,103,688
Back button on Android Phones
<p>A couple questions about the back button (as seen on the emulator)...</p> <p>1) Do all Android phones have the back button as a hard, tactile button?</p> <p>2) If so, is it still recommended to put a back button in your software?</p> <p>3) Is it possible to change the animation between activities when this back b...
android
[4]
958,311
958,312
The server tag is not well formed. in asp.net using another sql result in repeater
<p>Parser Error Message: <strong>The server tag is not well formed.</strong> Source Error: </p> <pre><code>Line 27: &lt;asp:Label ID="Label1" runat="server" Text='&lt;%# Bind("PCName") %&gt;' /&gt; Line 28: &lt;/li&gt; Line 29: &lt;asp:AccessDataSource ID="AccessDataSource2" runat="server" Line 30: DataFile="~/D...
asp.net
[9]
3,259,618
3,259,619
JavaScript document.referrer
<p>I've got two webpages one</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;p&gt;&lt;a href="page2.html"&gt;Link&lt;/a&gt;&lt;/p&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>And the second page.</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;script type="text/javascript"&gt; document.write(docume...
javascript
[3]
3,819,262
3,819,263
Creating buttons in android splashscreen to move to next location
<p>I have created a splash screen in which i want to create two buttons PLAY and INFO.I want that when i click INFO it will go to the next splashscreen that is of Instruction Manual and also want that these two buttons should not be visible on splashscreen.</p>
android
[4]
1,832,528
1,832,529
Checking if a jQuery selector doesn't find any results
<p>I'm used to Prototypejs, where $$("selector") will return null if no elements were found. This is convenient because I can do</p> <pre><code>if ($$("selector")) {} </code></pre> <p>to check if an element is in the DOM.</p> <p>However, in jQuery $(selector) will return [] if no element is found, so now I need to d...
jquery
[5]
5,459,292
5,459,293
Finding a line number certain text is on
<p>what is the best way to find on which line certain string is on? I know I could iterate though all of the lines, but the catch is that the string being searched might be multiline. Would this be solvable by regex for example? Thanks</p>
php
[2]
13,905
13,906
How do I convert a java ArrayList<Double> to the equivalent double[]
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/6018267/how-to-cast-from-listdouble-to-double-in-java">How to cast from List&lt;Double&gt; to double[] in Java?</a> </p> </blockquote> <p>So far the only method I can get working is to loop through the entire ar...
java
[1]
4,689,719
4,689,720
Multiplying a matrix and a vector in GLM (OpenGL)
<p>I have a transformation matrix, m, and a vector, v. I want to do a linear transformation on the vector using the matrix. I'd expect that I would be able to do something like this:</p> <pre><code>glm::mat4 m(1.0); glm::vec4 v(1.0); glm::vec4 result = v * m; </code></pre> <p>This doesn't seem to work, though. What ...
c++
[6]
2,799,087
2,799,088
Pass variables through Quoted Javascript String
<p>I have a function which returns a string which contains a javascript call. Since it is quoted I cannot pass variables through it. </p> <p>How can I change the return string which would enable me to pass javascript object values. </p> <p>Ex: How can I pass <code>var i</code> through the return statement.</p> <pre>...
javascript
[3]
1,475,146
1,475,147
How to connect with udp in android?
<p>I am new to android.I need to know how to connect (communicate) with PC’s UDP server with android client.Can anyone give a simple example ( Guide me to understand)</p>
android
[4]
5,219,586
5,219,587
Code behind the wait timer
<p>Can someone tell me the code for this expression, <code>"Waiting for" + n + "Seconds"</code> such that the text displays only once in the output and the variable <code>n</code> keeps changing.</p> <p>Thanks.</p>
c#
[0]
1,155,652
1,155,653
Adding icon on arraylist
<p>i'm displaying folders from sdcard dynamically. How to add icon on <code>ArrayList</code>. </p> <p>Code:</p> <pre><code>if(file.isDirectory()) { item.add(file.getName() + "/"); } </code></pre> <p>I need to add icon to the left of <code>file.getName()</code>.</p> <p>Can anyone help me?</p>
android
[4]
6,027,414
6,027,415
isValidUrl source code?
<p>Where can I get the source code of this method in android : URLUtil.isValidUrl() ?</p>
android
[4]
5,459,619
5,459,620
Do Android controls/widgets have choice of styles?
<p>I have a column of Checkboxes and associated EditTexts and I want one pair of these to have a distinct appearance because it has a distinct significance. </p> <p>Short of writing custom controls, or using custom drawables, does Android have any way to style or alter the appearance of basic controls like buttons,...
android
[4]
5,247,500
5,247,501
Default.png
<p>Ok. I've got an openGL ES application up and running on the iPhone.</p> <p>And my project has a Default.png to show something other than a black screen on powerup.</p> <p>This image appears when I compile a DEBUG version for the simulator and the device. If I do a compile for the DEVICE in RELEASE mode, the imag...
iphone
[8]
442,872
442,873
Defining a class instead of attribute
<p>How could I properly edit the below line to include a specific class, as opposed to the href attribute?</p> <pre><code>var activeTab = $(this).find("a").attr("href"); </code></pre>
jquery
[5]
5,771,183
5,771,184
How Can I count excel column name?
<p>I Want to import data from excel to sql,in this operation if a user can add one column extra,how can I check which column is newly added and at the same time in sql table also added the new column with the same column name like excel sheet...</p> <p>I can Done read the excel column count-like below my coding</p> <...
c#
[0]
5,706,184
5,706,185
Hide Folders/ File with Python
<p>is it any way to hide folders/ files with python. </p> <p>Im working a huge project (a vulnerability scanner) the project creates alot of files and folders, so back to the question, is it any way to make a script that hides files and folders.</p>
python
[7]
4,870,898
4,870,899
Android Emulator api level11
<p>I just updated <code>android</code> from 2.3.3 api Level 10 to <code>android</code> 3.0 api Level 11. But I am getting these two problems. I have searched the internet but could not find anything helpful. </p> <p>Here are my problems:</p> <ol> <li>My emulator is in the portrait mode but my activities runs in lands...
android
[4]
5,787,548
5,787,549
Iphone Differentiate between lite version and full version
<p>I have developed an app for iphone. it is quiz app. It has main topics say 5. All topics has 20 question. Now I want to create lite and full version. in Lite Version, when user download app, user gets 5 question in all topics. and in full version user can buy topic wise. for eg there are topic 1,2,..5. user want to ...
iphone
[8]
646,234
646,235
PySQLPool getting old data until restart
<p>I am facing a problem where data from MySQL retrieved using PySQLPool is returned as the db was at start of process, INSERT or UPDATE queries from python or MySQL client do not show up until a kill and re-run of the python process.</p> <p>Would appreciate any help regarding this.</p>
python
[7]
4,452,536
4,452,537
What's the difference between array.sort() and array.sort(function(a,b) { return a - b; })?
<p>I have a piece of code which triggers some actions. Before that it simply sorts weights. Everything works well when I use: <code>weight.sort()</code> where <code>weight</code> is an non-empty array e.g. <code>[10 20 30 40]</code>, but when I change that to:</p> <pre><code>weight.sort(function(a,b) { return a - ...
javascript
[3]
2,202,852
2,202,853
Get window up from the taskbar if it is minimized
<p>I want a code that shows my Form / Window when it is minimized. Kind of like this:</p> <pre><code>WindowState = FormWindowState.Maximized; </code></pre> <p>But this also maximizes my window, I just want to pop it up from the taskbar.</p>
c#
[0]
1,663,298
1,663,299
How can I click a flash object with javascript?
<p>I want to click the video on this page <code>http://37.128.191.200/?640</code> using JavaScript but can't figure out how</p> <pre><code>document.getElementById('container').click() </code></pre> <p>does not work</p>
javascript
[3]
1,663,088
1,663,089
Why does Java Pattern class use a factory method rather than constructor?
<p>There's a good discussion of this in the <a href="http://stackoverflow.com/questions/628950/constructors-vs-factory-methods">general case</a>.</p> <p>However, I was wondering specifically why the Pattern class uses the <code>compile</code> static method to create an object, rather than the constructor?</p> <p>Seem...
java
[1]
1,745,093
1,745,094
Jquery move element on scroll?
<p>Example: I have menu horisontally (on header), then if I scroll page down (about >100px from top) the menu (horisontal) will move to left side of browser (vertical) and fixed there...</p> <p>Any help?</p>
jquery
[5]
4,537,069
4,537,070
All possible jQuery methods?
<p>I'm trying to find all jquery methods.</p> <pre><code>$("#submit").click() </code></pre> <p>Like all possible ones, as I only know .hover and .click. I've tried searching on google on jQuery docs, but I can't find them anywhere. And these are pretty necessary to know?</p>
jquery
[5]
1,409,187
1,409,188
Execute python commands passed as strings in command line using python -c
<p>Is it possible to execute python commands passed as strings using python -c? can someone give an example.</p>
python
[7]
1,078,460
1,078,461
Common cases in which all sessions are thrown
<p>I have a website where the id of the users saved in session object And any action that the user does, the session is tested to see whether or not it null Sometimes an Exception occurs in one of the users actions and then all sessions thrown out What makes all users thrown out to login page, and this very serious pro...
asp.net
[9]
4,046,264
4,046,265
What is the best way to receive back (to Fragment) data from DialogFragment
<p>I'm fighting couple of days with a such simple think like receiving back a data from a <code>DialogFragment</code>. First I tried to make a <code>DialogFragment</code> as a nested class, but it happened it fails on orientation change. Then I decided to user <code>interfaces</code> passing a <code>listener</code> to ...
android
[4]
699,794
699,795
Parsing files in java/android
<p>I have a text file that has is set out like the following</p> <pre><code>Title - Welcome to the Dibb Date - 13/03/11 Information - Hello and welcome to our website. Title - Welcome to student room Date - 06/05/11 Information - Hello and welcome to the student room. We are a online forum that allows previous and cu...
java
[1]
5,781,541
5,781,542
Where should I begin to look for information on creating a remote control app for Android that can communicate with a PC over wifi?
<p>I am trying to create a new <em>Android</em> application that can send commands to a <em>PC</em> over wifi (or USB). Basically, it is a remote control for a PC application I am creating. As I am knew to Android development, I have no idea where to begin. Can anyone point me in the right direction?</p>
android
[4]
4,793,278
4,793,279
Most efficient way to empty an array
<p>I have an array containing several keys, values, objects etc.. I need to empty that array but I'd like to do it in the most efficient manner.</p> <p>The best I can come up with is:</p> <pre><code>foreach ($array as $key =&gt; $val) unset($array[$key]); </code></pre> <p>But I don't like the idea of having to loop ...
php
[2]
131,730
131,731
In Web application, could not load type? asp .net?
<p>In web applicaiton, when i am running the asp.net project i am getting the error like :</p> <pre><code>Could not load type 'Com.ajSolutions.CosmacCRM.Web.EmpInserting'. &lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmpInserting.aspx.cs" Inherits="Com.ajSolutions.CosmacCRM.Web.EmpInserting" %&gt; </co...
asp.net
[9]
1,285,422
1,285,423
Custom Popup Dialog Asp.Net
<p>I'd like to create email dialog that has several inputs including message textbox plus some other custom info. I'd like it to display center screen over top of main page setting the opacity to like 50%. </p> <p>do i create the pop up as anohter aspx page or panel?</p> <p>Not sure what to use here, z-index, modalPo...
asp.net
[9]
3,063,678
3,063,679
Python regular expression with raw string prefix
<p>I'm new with python and regular expressions.</p> <p>I have this regular expressions and i don't know what is the purpose of this</p> <pre><code>r'(\d+)\.(\d*)' </code></pre> <p>all I know is it matches a digit from 0 to 9.</p> <p>can anyone help me explain it?</p> <p>thanks..</p>
python
[7]
3,036,166
3,036,167
Can't write a binary file
<p>I have the following piece of code in C++.</p> <pre><code>int arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; ofstream output("Sample.txt", ios::out | ios::binary); for(int i = 0; i &lt; 10; i++) { output&lt;&lt;arr[i]; } </code></pre> <p>Now the Sample.txt is like this:</p> <pre><code>12345678910 </code></pre> <p>I...
c++
[6]
3,241,194
3,241,195
How to mimic passing a file using python variable
<p>I am trying to figure out how to mimic passing a file to a program and instead of passing the file pass a python variable that has what information the program needs in it.</p> <p>The syntax I need to mimic:</p> <pre><code>msfconsole &lt; setofcommands.txt 2&gt;/dev/null </code></pre> <p>What I would like to do:<...
python
[7]
5,316,768
5,316,769
$.each and animation confusion
<p>I am expecting when I go</p> <pre><code>$.each($(something).find(something), function(){ $(this).delay(1000).fadeOut(); }); </code></pre> <p>then for each matching element I get a second of delay before it is gone. but what I get is a second of delay and then it all fades out. its 3am and I can't think. please ...
jquery
[5]
835,607
835,608
Animating a div to 100% height
<p>I am trying to animate a div to 100% of its content but it just flashes and rather than animate the div the background disappears at the end of the animation. i am stumped because it works when i enter a number for the height rather than a percentage.</p> <pre><code>$("#artbutton").click(function(event){ event....
jquery
[5]
5,667,892
5,667,893
Setting Initially checked CheckedTextViews in ListView for choiceMode="multipleChoice"
<p>I am having a really difficult time trying to work with android's ListView multipleChoice mode. Here is what I am trying to do:</p> <p>I have a "players" button in a game setup screen. When this is clicked it opens another activity with a multipleChoice ListView of all the players in the database in CheckedTextView...
android
[4]
640,776
640,777
show data in listview from webservice according to keypress in android
<p>i am developing a apps for korean client.i have to search a data according to key press. like if i press A then all the data who started from A show in listview where data come from a webservice in listview.is it possible?if yes,then how to do it.if possible give me some code or link which i can use.</p> <p>thanks...
android
[4]
1,417,538
1,417,539
Android: How to solve slow response after clicking TabWidget
<p>I have four Tab at the top of my apps<br> The content of the fourth tab is that it will get data from sql server and then display in listview<br> since the amount of data retrieved is quite big, it takes 2-3 sec<br> The problem is that:<br> After I click the fourth tab, it has no response, then after 2-3sec, it disp...
android
[4]
2,348,025
2,348,026
iPhone Bundle Display Name vs. Long Name?
<p>I am creating two apps, let's call them Foo Bar and Foo Bar Pro. When I install them and open iTunes, I see both apps there, but they both say Foo Bar because "Foo Bar Pro" won't fit as a bundle display name. However, in iTunes, I want to see "Foo Bar" and "Foo Bar Pro".</p> <p>I see a whole bunch of other apps w...
iphone
[8]
4,036,454
4,036,455
Python saving xml from webservice
<p>I'm using a webservice to get a certain xml file from it. It works fine with urllib2 I get the xml as fileobject. So I want to know what would be the fastest way to store that somewhere in memory or not even store just parse it.</p> <p>I tried iterparse on that object and it takes too long unless I save it first in...
python
[7]
4,153,090
4,153,091
Android :: Background Thread across the Application
<p>i want to detect the audio headphone to play the audio file. but i need to detect that earphone is connected or not everytime in each tab like album, aritist, playlist, etc. i when i am trying to do it. i am creating separate asynctask to detect the device in each tab. its working fine. but if i am giving more str...
android
[4]
2,602,644
2,602,645
Dealing with Listeners
<p>I know the listeners are supposed to make life easier, especially in a multi-tasking environment like android, but sometimes (to me) it just makes things harder.</p> <p>Right now I have an ExpandableList activity which presents a list of events, and I want the user to select the group &amp; child of interest and se...
android
[4]
524,651
524,652
Android Sliding Menu by Jeremy Feinstein
<p>I cloned repo with Android Sliding Menu example from <a href="https://github.com/jfeinstein10/SlidingMenu" rel="nofollow">https://github.com/jfeinstein10/SlidingMenu</a>. I successfully built library. But while building example project I got four same error: </p> <pre><code>No resource identifier found for attribut...
android
[4]
1,019,858
1,019,859
How can I switch adapter for a Gallery
<p>Is it possible for me to dynamically switch the adapter of a Gallery?</p> <p>In the <code>onCreate()</code> of my activity, I did this:</p> <pre><code>myGallery.setAdapter(adapter1); </code></pre> <p>And then later on in my code, I did</p> <pre><code>myGallery.setAdapter(anotherAdapter1); </code></pre> <p>I tri...
android
[4]
2,803,320
2,803,321
How can I achieve this in python
<p>Here's some code:</p> <pre><code>li=[1,2,3] def change(l): l[2]=10 change(li) print li [1, 2, 10] </code></pre> <p>But I want this:</p> <pre><code>li=[1,2,3] def change(l): l=[1,2,10] change(li) print li [1,2,3] </code></pre> <p>For some reason,I have to change whole list in method,how can I achieve this...
python
[7]
2,401,719
2,401,720
Remove history entry in Jquery Address
<p>When for example a customer adds an item to the cart I set the address through <a href="http://www.asual.com/jquery/address/" rel="nofollow">Jquery Address</a> to <code>/cart/23432 (productid)</code>. After the item has been added to the cart and the cart details have been shown, i want to change the url to <code>/...
jquery
[5]
3,842,080
3,842,081
Developing an universal android application (phone and tablet) - Defining Orientations
<p>I have developed an android application, which only supports portrait orientation, for android phones. Now, I need to modify this app because I want to do the universal version (for tablets, too) but I have a problem. The phone version only supports portrait orientation and the tablet version supports portrait and l...
android
[4]
4,756,413
4,756,414
c# MailMessage object question
<p>I have a a MailMessage object called message.</p> <p>I am trying to create the message.Body but I only have a IList to populate it with.</p> <p>In the body I want the following:</p> <pre><code>"The following files could not be converted-" + IList&lt;string&gt; testlist </code></pre> <p>??????</p>
c#
[0]