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 |
|---|---|---|---|---|---|
3,861,305 | 3,861,306 | Getting image from a secured website with popup username/password | <p>I am using c# to get a value from a website like so url = </p>
<pre><code>"http://user:password@127.0.0.1/p/status.html"
</code></pre>
<p>this works fine once here I can pull the html and get the value.</p>
<p>My problem is I am trying to do the same thing but this time pull an image from the webite like so</p>
... | c# | [0] |
2,540,116 | 2,540,117 | Get the IP address of printer | <p>I want connect to the printer via wifi.In order to connect,i should find the ip address and port number of the printer.How to find them?</p>
<p>can anybody help me?</p>
<p>Thanks.</p>
| android | [4] |
5,078,538 | 5,078,539 | help to turn numbers into symbols? | <p>I want this code to represent symbols and not numbers (A, O, X)?
Can someone give me a simple code to make the numbers into symbols? Thanks </p>
<pre><code>int game[3][3];
int x, y;
int lines = 0;
// select a random grid
srand(time(0));
for(x = 0; x < 3; x++) {
for(y = 0; y < 3; y++) {
game[x][y] =... | c++ | [6] |
183,647 | 183,648 | jQuery data attribute click event | <p>I have made a quick fiddle to outline my problem: <a href="http://jsfiddle.net/mYdxw/" rel="nofollow">http://jsfiddle.net/mYdxw/</a></p>
<p>I'm trying to click on a div, grab its data attribute and show its corresponding set of divs.</p>
<p>Can anyone spot why it isn't doing this currently?</p>
<p><em><strong>JS<... | jquery | [5] |
2,129,361 | 2,129,362 | flikr api+iphone+for geting photos and latitude/longitude of that photos | <p>I want to use the flikr api.
in which i can pass current latitude -longitude and can get the photos and latitude and longitude of that photos.</p>
<p>Please help me..If flikr is providing any such url then..
And also please help me if anyone had any knowledge of other such kind of api</p>
<p>Thanks</p>
| iphone | [8] |
83,584 | 83,585 | How to convert date in milliseconds to iso format javascript? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2573521/how-do-i-output-an-iso-8601-formatted-string-in-javascript">How do I output an ISO-8601 formatted string in Javascript?</a> </p>
</blockquote>
<p>If I have an integer that represents a date in millisecon... | javascript | [3] |
4,446,716 | 4,446,717 | In C# is there any difference between += and =+? | <p>If I go</p>
<pre><code>variable1 =+ variable2
variable1 += variable2
</code></pre>
<p>I get the same result for variable1.</p>
<p>So is there any difference?</p>
| c# | [0] |
2,164,693 | 2,164,694 | IE input beeping | <p>I hope someone can help. My asp.net application is exhibiting strange behaviour. Whenever I press the Return/Enter key I get a series of beeps/dings. It sort of goes dindindidindindinggggg !</p>
<p>I have reproduced the issue with a small sample application:</p>
<pre><code><%@ Page Language="Oxygene" AutoEventW... | asp.net | [9] |
1,758,782 | 1,758,783 | List-view Lazy Load android | <p>I need to prevent against lazy load in my custom list-view. so i found that scrollview onscroll listner are helpfull over there i have tryed it but not getting success to implement this functionality.</p>
<p><strong>code::</strong></p>
<pre><code>lviewAdapter = new ListViewAdapter(SaxParser2.this, Arr_ActivityName... | android | [4] |
838,962 | 838,963 | Android - DisplayMetrics Resolution issue when using HDMI | <p>I have a GoogleTV device from Sony which is connected to a Full-HD TV (1920x1080) using HDMI. I use the following code to calculate the target display dimensions of the TV.</p>
<pre><code>DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
//dm.widthPixels
//dm.heightPix... | android | [4] |
270,653 | 270,654 | i cant view asp.net pages in my browser | <p>i have created a web project and i want to test it.when i click on debug or click on default page to view on browser , ASP.NET Web Development Server Works but nothing appear in my web browser . even i used internal browser of Visual Studio 2008 but it shows this message : </p>
<p>Action canceled</p>
<p>i have to ... | asp.net | [9] |
4,361,855 | 4,361,856 | php stacking string query | <p>I am trying to nest if statements based on a query string, but it isnt working</p>
<p>query string</p>
<pre><code>index.php?list&page=1
</code></pre>
<p>php</p>
<pre><code>if ($_SERVER['QUERY_STRING'] == 'list') {
if ($_GET['page'] == '1') {
echo 'hi';
}
}
</code></pre>
| php | [2] |
4,342,764 | 4,342,765 | android is it possible to get notified when a new image,video is inserted,deleted from sd? | <p>is it possible to get notified every time a new image,video is inserted on the sd card of your android device and how? I have looked at the Media Scanner class which indexes files but I can't find how to do get notified from that only how to notify Media Scanner of a new image I have created. </p>
| android | [4] |
1,618,836 | 1,618,837 | JQuery replacing css class attribute of all table cells in a row | <p>I'm trying to set the class attribute of all the cells within a given row in a table. Here is what I've attempted but while I don't get an exception, it doesn't work either.</p>
<p>Here is a sample of the current html for the rows/cells is as follows.</p>
<pre><code> <tr id="rowid-1234">
<td c... | jquery | [5] |
4,872,288 | 4,872,289 | Android Development: Webview progress Bar | <p>Take a look at: <a href="http://groups.google.com/group/android-beginners/msg/61802d28a8335809" rel="nofollow">http://groups.google.com/group/android-beginners/msg/61802d28a8335809</a></p>
<p>ive done that a got it to work but the progress does not change when clicking on a link in the webbrowser.</p>
<p>So the pr... | android | [4] |
1,028,616 | 1,028,617 | LRU byte Cache java | <p>I need to implement a cache in java with a maximum size, would like to do it using the real size of the cache in the memory and not the number of elements in the cache. This cache will basically have String as key and String as value. I have already implemented the cache using the LinkedHashMap structure of java but... | java | [1] |
2,370,768 | 2,370,769 | Unable to make multiple calls to single Jquery function | <p>Apologies again - this is probably down to my lack of knowledge with JQuery - but I have set up the following function whihc when passed a parameter which attempt to check for and then remove some dynamically added fields (the check should stop the removal attempt being carried out - if not needed) </p>
<pre><code... | jquery | [5] |
5,088,071 | 5,088,072 | Hiding a cell with a Hidden Field | <p>In my GridView, I am using a Hidden Field to store some data that is not supposed to be seen by the user:</p>
<pre><code> <Columns>
<asp:BoundField DataField="Название" HeaderText="Название" ItemStyle-Width="250px" HeaderStyle-Width="25... | asp.net | [9] |
5,189,735 | 5,189,736 | Using _bstr_t to pass parameter of type BSTR* in function | <p>What is the correct way of doing this:</p>
<pre><code> _bstr_t description;
errorInfo->GetDescription( &description.GetBSTR() );
</code></pre>
<p>or:</p>
<pre><code> _bstr_t description;
errorInfo->GetDescription( description.GetAddress() );
</code></pre>
<p>Where IError:G... | c++ | [6] |
4,646,588 | 4,646,589 | How to submit a form using javascript? | <p>I have a form with id "theForm" which has the following div with a submit button inside:</p>
<pre><code><div id="placeOrder" style="text-align: right; width: 100%; background-color: white;">
<button type="submit" class='input_submit' style="margin-right: 15px;" onClick="placeOrder()">Place Order</... | javascript | [3] |
4,874,325 | 4,874,326 | Does the inaccessible `.0` variable in `locals()` affect memory or performance? | <p>I maintain a project that has a function definition similar to this:</p>
<pre><code>def f(a, (b1, b2), c):
print locals()
</code></pre>
<p>While debugging the code I discovered that a <code>.1</code> key appeared in <code>locals()</code>, with the value <code>(b1, b2)</code>. A quick check revealed that a func... | python | [7] |
3,672,372 | 3,672,373 | Python Library Path | <p>In ruby the library path is provided in $:, in perl it's in @INC - how do you get the list of paths that Python searches for modules when you do an import?</p>
| python | [7] |
2,950,115 | 2,950,116 | How to generate numbers from an array randomly,with each number being unique | <p>I hav a numeric array,which contains 20 elements.I am displaying the numbers randomly for a blackberry application,bt i want dat all d numbers generated should b unique.It should b randomly generated,bt it has b unique until all the elemnts in the array is exhausted.I am giving the piece of code here,if anyone can h... | java | [1] |
1,387,140 | 1,387,141 | Displaying Images PHP table Mysql | <p>I am trying to display an image, in a table, the image is in the images folder and the link is placed in the Mysql DB.</p>
<p>This is the line of code that calls the image. The mysql query is working but it is only displaying the image link as text and not the picture.</p>
<pre><code><tr ><td >Image... | php | [2] |
5,706,278 | 5,706,279 | Braille in android (IDE: Eclipse) | <p>I am writing an application in android to convert english text to braille. How can I do this? Is there any font that I can download to convert english letters entered by user to Braille or is there any other way to do this?</p>
<p>Any support provided will indeed be appreciated!</p>
| android | [4] |
255,659 | 255,660 | Warning: mail() [function.mail]: SMTP server response: 550 Invalid recipient: | <p>I'm creating a 'forgot password' page where the user enters their email address and the script finds the password associated to that email, and sends it to the stored email address.</p>
<p>I believe the problem has to do with my SMTP Mailserver. I am using WAMP which doesn't have one so I downloaded one that was fr... | php | [2] |
1,351,341 | 1,351,342 | Undefined pathname in js | <p>I am trying to extract the base of the url:</p>
<pre><code>http://google.com/something --> http://google.com
http://127.0.0.1:8000/something --> http://127.0.0.1:8000
</code></pre>
<p>When I try and use the following:</p>
<pre><code>var pathArray = window.location.pathname;
alert(pathArray);
</code></pre>
... | javascript | [3] |
3,938,110 | 3,938,111 | Can Java SE class libraries be used on mobile devices? | <p>I am relatively new to Java, and am developing a Java implementation of a class library I have already written in .NET and Objective-C. The library in Java is primarily being aimed at Android devices (or any device which supports Java) - would a standard Java SE library be compatible with Java ME? The only data type... | java | [1] |
2,470,166 | 2,470,167 | python bisect, it is possible to work with descending sorted lists? | <p>How can I use bisect module on lists that are sorted descending?
eg.</p>
<pre><code>import bisect
x = [1.0,2.0,3.0,4.0] # normal, ascending
bisect.insort(x,2.5) # --> x is [1.0, 2.0, 2.5, 3.0, 4.0] ok, works fine for ascending list
# however
x = [1.0,2.0,3.0,4.0]
x.reverse() # --> x is [4.0... | python | [7] |
2,239,385 | 2,239,386 | alarm: calling an status bar notification activity doesn't work | <pre><code> private void scheduleAlarmReceiver() {
AlarmManager alarmMgr = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);
PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, new Intent(this, StatusNotify.class),
PendingIntent.FLAG_CANCEL_CURRENT);
alarmMgr.setInexactRepeating(AlarmManag... | android | [4] |
2,464,022 | 2,464,023 | Why CompilationTask.getTask(...) automatically creates a folder for output the class files? | <p>I'm doing following to compile my java files. <code>outputFolder</code> is the folder where all my java files are located.</p>
<pre><code> //specify classes output folder
Iterable<String> options = Arrays.asList("-d", outputFolder);
Iterable<? extends JavaFileObject> fileObjects = fi... | java | [1] |
4,357,324 | 4,357,325 | Is there a Python module for transparently working with a file-like object as a buffer? | <p>I'm working on a pure Python parser, where the input data may range in size from kilobytes to gigabytes. Is there a module that wraps a file-like object and abstracts explicit .open()/.seek()/.read()/.close() calls into a simple buffer-like object? You might think of this as the inverse of StringIO. I expect it migh... | python | [7] |
2,183,692 | 2,183,693 | clear a view and redraw a image | <p>How to dealloc a view and realloc it?</p>
<p>Code:</p>
<pre><code>-(IBAction)CancelButton{
[drawImage removeFromSuperview];
[drawImage dealloc];
</code></pre>
<p>When you click on the cancel button the view gets cleared but nothing can be drawn on the page. I need to draw on the page.</p>
| iphone | [8] |
2,671,034 | 2,671,035 | jQuery - If input has more or less that 10 characters inside | <p>I want to make a custom validation for an phone number input.<br></p>
<pre><code>var telVal = $("#telefon").val();
if(telVal == '') {
$("#telefon").addClass('eroare png');
hasError = true;
}
</code></pre>
<p>This gives me an error if user does not type anything in this input, but I want to check if user types 10 c... | jquery | [5] |
2,394,119 | 2,394,120 | how to get onunload event on IE | <p>Hi i need to catch an onUnload event but its working in firefox not in IE . Can we capture onUnload event in IE?</p>
| jquery | [5] |
4,133,908 | 4,133,909 | Is inheritance supported for view controllers and nibs | <p>I am creating 2 view controllers and 2 nibs for each of the supported orientations of my app - portrait and landscape as recommended by <a href="http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/BasicViewControllers/BasicViewControllers.html#//apple_ref/doc/uid/TP40007457-CH101-SW2... | iphone | [8] |
4,437,493 | 4,437,494 | jquery - remove a div from form | <p>I have a form whose html looks like:</p>
<pre><code><div id="form_container">
<h1><a>Untitled Form</a></h1>
<form action="save_form" method="post" id="newform" name="newform">
<div class="form_description">
<h2 class="editable">Fo... | jquery | [5] |
331,935 | 331,936 | how to install jist/swans in windows? | <p>i want to run jist/swans on windows to be able to compile and run via command line </p>
<p>this <strong>didn't</strong> help: <a href="http://vanet.info/node/98" rel="nofollow">http://vanet.info/node/98</a></p>
<p>source: jist.ece.cornell.edu/sw.html </p>
<p>i would really appreciate any easy to do tutorial on ... | java | [1] |
4,580,127 | 4,580,128 | How to track Gps data from Android Mobil? | <p>I started to learn about Micro..Now I'm doing tacking data from GPS and if will be get data search from Google Earth and then User can create scheduletime in mobile if u r arrived that place and show message, I want to get any Suggestion ??</p>
| java | [1] |
2,604,767 | 2,604,768 | iPhone:Tabbar hides when pushing from TableView to UIViewController | <p>I have four Tab bar items in a Tab bar which is being bottom of the view where i have the TableView. I am adding Tab bar and items programmatically (Refer below code) not through I.B.
Click on first three Tab bar items, will show the data in the same TableView itself. But clicking on last Tab bar items will push to ... | iphone | [8] |
5,560,092 | 5,560,093 | php code to display none? | <p>I'm sure this is fairly simple but I really don't get php is there a way to have the below code to display none if there's no url details entered?</p>
<pre><code> <div class="details">
<h3>web</h3>
<div>URL: <span><a href="<?=$website_url?>"><?=... | php | [2] |
3,325,199 | 3,325,200 | Print value of number (int) spelled out | <p>is there an out-of-box way to spell out an int in C#? For example if I have:</p>
<pre><code>int a = 53;
</code></pre>
<p>I want to print:</p>
<pre><code>"fifty three"
</code></pre>
<p>not</p>
<pre><code>"53"
</code></pre>
<p>If not, does anybody have any examples on how to accomplis this?</p>
<p>Thanks!</p>
| c# | [0] |
1,079,858 | 1,079,859 | How to display clicked button names in another screen in android? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/12262535/how-to-store-and-display-the-button-names-in-different-screensthat-are-clicke">How to store and display the button names ( in different screens)that are clicked by user in android</a> </p>
</blockquote>
... | android | [4] |
4,150,706 | 4,150,707 | SensorManager.getOrientation()vs. Sensor.TYPE_ORIENTATION | <p>sry if there are Information which answer my question but I can't find anything to solve my problem.</p>
<p>I try to get the same Information from azimuth,pitch and roll from the "orientationsensor" and
SensorManager.getOrientation() to compare these different ways. I know that SensorManager.getOrientation()give m... | android | [4] |
4,057,580 | 4,057,581 | How to edit file on console from Java? | <p>I'm trying to edit a file from CLI. I'm executing the <code>nano</code> command (I know that command will always be available); when I execute it, I can see nano's output but I cannot interact with it. How can I pass user input to the command? Do you have a better idea to easily edit a file from within my Java app?<... | java | [1] |
3,393,848 | 3,393,849 | share feature of menu in android application | <p>i asked so many question regarding my title but i could not get my proper answer till yet.I need to implement androd's menu feature in my application ie when we goes to gallery in android phone, when we press menu than it comes with lots of option like share...etc.My question is can i implement same menu feature in ... | android | [4] |
2,471,170 | 2,471,171 | building ModalViewAction programmtically | <p>on pressing infobutton modalviewaction comes next to show uiviewcontroller which has uitext view and uinvigation controller on top of uitextview with done button to navigate back to mainviewcontroller. </p>
<p>Everything is handled programmtically without interfacebuilder.</p>
<p>can someone please show me that wh... | iphone | [8] |
2,735,691 | 2,735,692 | Serialization of Queue type not working | <p>Consider this piece of code:</p>
<pre><code>private Queue Date=new Queue();
//other declarations
public DateTime _Date {
get { return (DateTime)Date.Peek();}
set { Date.Enqueue(value); }
}
//other properties and stuff....
public void UpdatePosition(...)
{
//other code
IFormatter formatter = new Bi... | c# | [0] |
979,882 | 979,883 | What does "Return false;" in onclick event for JavaScript mean? | <p>What does "Return false;" in onclick event for JavaScript mean?</p>
<pre><code> <input
type="button"
runat="server"
id="btnCancel"
value=" Cancel "
style="width:70px;"
onclick="document.location.href = 'ReportPanel.aspx'; return false;"
/>
</code></pre>
<p>in ... | javascript | [3] |
492,992 | 492,993 | How to start a newline in C++ while doing equations | <p>Im reading through "The C++ Programming Language" and my current assignment is to make a program that takes two variables and determines the smallest, largest, sum, difference, product, and ratio of the values.</p>
<p>Problem is i can't start a newline. "\n" doesn't work because i have variables after the quote. An... | c++ | [6] |
306,479 | 306,480 | Is it possible to get the Identity value in the ItemInserted event in a listView? | <p>I'd rather not make a call to the database to query @@IDENTITY. Is there some way to get the identity value for what was just inserted through code?</p>
| asp.net | [9] |
3,933,090 | 3,933,091 | How to pass a integer into a javascript function? | <p>I am getting a response from ajax request(done by jquery). </p>
<p>I have a method that displays errors to the users. Sometimes though I have some other information coming along with the json request.</p>
<p>So I don't want this info shown(where the rest of the errors are). So I figured since I always know the len... | javascript | [3] |
2,866,357 | 2,866,358 | Creating Android background images | <p>Does anyone know how to manage background images for android applications?</p>
<p>I have my backgrounds looking pretty sweet in my app, however, when ported to another device they are stretched to fit and look awefull.</p>
<p>So my question is how do i specify my background image size in dp to account for the ever... | android | [4] |
5,116,781 | 5,116,782 | Is it posible to check how much memory browser is using and clear memory currently using by javascript? | <p>i am stuck with big problem i working on big project that is hanging browser automaticaly javacript executes<br>
"how to detect how much memory javascript is using and clear the memory in regular interval.Is it posible?"</p>
| javascript | [3] |
2,466,646 | 2,466,647 | Get std::fstream failure error messages and/or exceptions | <p>I'm using fstream is there any way to get the failure message/ excpetion. for example if unable to open the file I want to get the reason for it.</p>
| c++ | [6] |
4,549,697 | 4,549,698 | Android system stops application when launching Media Intent | <p>I am launching a media intent to take a photo. After the user took a picture and gets back to the previous activity the whole application has restarted. </p>
<p>As this doesn't happen all the time, I think my application goes to the background and android kills it when the device has low memory.</p>
<p>Is there an... | android | [4] |
1,000,825 | 1,000,826 | Global variables in Javascript across multiple files | <p>A bunch of my JavaScript code is in an external file called helpers.js. Inside the HTML that calls this JavaScript code I find myself in need of knowing if a certain function from helpers.js has been called.</p>
<p>I have attempted to create a global variable by defining:</p>
<pre><code>var myFunctionTag = true;
<... | javascript | [3] |
5,880,571 | 5,880,572 | Android Layout, displaying Multiple Colums | <p>Hi Im new to android. I want to display text such that it would be like:</p>
<ol>
<li>TITLE 1.1</li>
</ol>
<p>text about title 1.1</p>
<ol>
<li>TITLE 1.2</li>
</ol>
<p>text about title 1.2</p>
<ol>
<li>TITLE 2.1</li>
</ol>
<p>text about title 2.1</p>
<blockquote>
<blockquote>
<p>and so on</p>
</blockq... | android | [4] |
930,602 | 930,603 | log out function not working (session not killed) | <pre><code>function killsession()
{
// global $_SESSION;
$_SESSION = array();
if (session_id() != "" || isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time() - 42000, '/');
}
session_unset();
session_destroy();
header("Location: "index");
}
</code></pre>
<p>Any ide... | php | [2] |
3,375,459 | 3,375,460 | App is started again instead of running current activity | <p>I have a question, I noticed an effect when testing my release on my mobile device like described in this <a href="http://stackoverflow.com/questions/3042420/home-key-press-behaviour/10706598#10706598">link</a>. To sumarize it, after installing my App, when I instantly start it, it is started from a different "root"... | android | [4] |
1,752,920 | 1,752,921 | Java programming style | <p>its a maybe a dumb question but i am curious to understand this thing....
The below code works but the one below that doesn't work.</p>
<pre><code>import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Menu extends JFrame
{
public Menu()
{
JMenuBar menubar = new JMenuBar();
ImageIcon icon... | java | [1] |
2,545,457 | 2,545,458 | C++ for loop/char pointer "hack" | <p>I have a small piece of code which does something funny, but I can't figure out how it does it.</p>
<pre><code>int main(int argc, const char * argv[])
{
char text[] = "object";
for(char *ptr = &text[0]; *ptr != '\0'; ptr+=2)
{
cout << ptr << endl;
ptr--;
}
ret... | c++ | [6] |
1,109,182 | 1,109,183 | Refresh page when url hash is present | <p>I have a navigation system on my site that uses javascript to slide horizontally stacked divs left and right into view. I'm trying to make the site function better with javascript turned off, so I have a second navigation system that uses hash values to 'go to' the appropriate section. <br /><br />
The problem aris... | javascript | [3] |
306,604 | 306,605 | Is possible to run export command from java? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2460297/run-shell-command-from-java">run shell command from java</a> </p>
</blockquote>
<p>I want to export some variable so I have this command.</p>
<pre><code>Runtime.getRuntime().exec("export a=b");
</code><... | java | [1] |
1,357,624 | 1,357,625 | How to know how many event listeners there are on the page | <p>I am building a fairly large application in Javascript. It is a single page that can change different views. All the views have their own variables, events, listeners, elements, etc.</p>
<p>When working with large collections and multiple events it's sometimes good to know what exactly is happening on the page.</p>... | javascript | [3] |
4,194,095 | 4,194,096 | how to check connection to php page | <p>I might have written the title wrong. Sorry for that.</p>
<p>I just wonder if there is a way to check users connection to a php page. </p>
<p>For example, i have a php page called "download.php" and this page lets user to download sth and insert this action to mysql, like that</p>
<pre><code>$query = "INSERT INTO... | php | [2] |
1,480,670 | 1,480,671 | how to solve this exception in java on my mail server open-exchange? | <p>![Error to create new context open-exchange][1]</p>
<pre><code>/opt/open-xchange/sbin/registerserver -n oxserver -A oxadminmaster -P admin_master_password
server could not be registered:
Error: connection failed to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Conexión rehusada
</code></... | java | [1] |
2,377,174 | 2,377,175 | How to use WebClient.UploadFileAsync to upload files and POST Params as well? | <p>I am using <code>WebClient.UploadFileAsync</code> to upload local files to a web server and I would also like to pass some parameters with the post as well. I would like to send a few fields that will tell the PHP code on the server specific locations on where to save the uploaded files.</p>
<p>I tried to put the f... | c# | [0] |
962,775 | 962,776 | is using constants for language file a good idea from the performance point of view? | <p>im trying to implement a language file.
im tossing between gettext and constants.
i noticed that several OS projects use constants.
are there any performance dissadvantages to using many constants?</p>
| php | [2] |
1,608,638 | 1,608,639 | French date format | <p>I am a newbie in PHP & wordpress. I wanted to know how to make this codde renders the date formating in french (e.g. 5 Fev) when your on the french side but in english format in English (e.g. Jan 5)</p>
<p>Here is my code:</p>
<pre><code><?php
if (strtolower(ICL_LANGUAGE_CODE) == 'en') {$sidePosts = get_pos... | php | [2] |
26,125 | 26,126 | Generic binary search Java | <p>I've been trying to make this code work. I have to create a generic binary version of the binary search. I'm not sure how to compare two generic types without the comparable interface</p>
<pre><code>import java.util.ArrayList;
public class BinarySearcher<T> {
private T[] a;
public BinarySearcher(T[... | java | [1] |
3,124,849 | 3,124,850 | how to test the presence of an application on a android smartphone | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3694267/android-check-for-presence-of-another-app">Android - check for presence of another app</a> </p>
</blockquote>
<p>How to check if an application is installed on the smartphone?
For my application, I need ... | android | [4] |
1,962,066 | 1,962,067 | DetailsView web control does not change to insert mode when insert is clicked | <p>I'm binding a hashtable to a detailsview web control in ASP.NET 2.0. I have my edit/delete/insert link buttons on the detailsview, but when clicking new, the mode does not change.</p>
<p>Any ideas why?</p>
<p>If you need code examples, I will be happy to provide them.</p>
<p>Thanks</p>
| asp.net | [9] |
2,894,511 | 2,894,512 | how do you get rid of the picture title bar when using action bar? | <p>Hi I was just wondering if anyone could help me get rid of this bar with the picture above the singleplayer/multiplayer/friends tabs</p>
<p><img src="http://i.stack.imgur.com/kkQTu.png" alt="enter image description here"></p>
<p>Here is what I tried :</p>
<pre><code>ActionBar actionBar = getActionBar();
actionBar... | android | [4] |
5,332,111 | 5,332,112 | can't catch java.lang.VerifyError | <p>I'm getting this error:
"Uncaught handler: thread main exiting due to uncaught exception java.lang.VerifyError"</p>
<p>It's only happening on 1.6. Android 2.0 and up doesn't have any problems, but that's the main point of all.</p>
<p>I Can't catch the Error/Exception (VerifyError), and I know it's being caused by ... | android | [4] |
364,095 | 364,096 | What style do you use for creating a "class"? | <p>There are a few ways to get class-like behavior in javascript, the most common seem to be prototype based like this:</p>
<pre><code>function Vector(x, y, x) {
this.x = x;
this.y = y;
this.z = z;
return this;
}
Vector.prototype.length = function () { return Math.sqrt(this.x * this.x ... ); }
</code>... | javascript | [3] |
3,004,904 | 3,004,905 | simple question: how to pull out some info from an object in Java | <p>I'm working in java, and I have a method that returns a pair, ie. (String, integer). At a different point in the program, I want to pull out the String alone. How do I do that? </p>
<p>Thanks.</p>
| java | [1] |
1,010,219 | 1,010,220 | Python execute complex shell command | <p>Hi I have to execute a shell command :diff <(ssh -n root@10.22.254.34 cat /vms/cloudburst.qcow2.*) <(ssh -n root@10.22.254.101 cat /vms/cloudburst.qcow2)
I tried </p>
<pre><code>cmd="diff <(ssh -n root@10.22.254.34 cat /vms/cloudburst.qcow2.*) <(ssh -n root@10.22.254.101 cat /vms/cloudburst.qcow2)"
args... | python | [7] |
2,390,696 | 2,390,697 | How To Generate A Unique 4-Digit String | <p>I'm looking for a way to generate a (fairly) unique (non auto-incrementing) 4-digit string using the numbers 0 - 9 for each digit using C#. I can validate uniqueness and generate another number if a dup is found. I had thought about basing the number somehow on the DateTime object's Ticks property but am having a ... | c# | [0] |
1,130,297 | 1,130,298 | The type initializer for 'ClosedXML.Excel.XLWorkbook' threw an exception | <pre><code>using ClosedXML.Excel;
class XLSXWriter : BExporter
{
private readonly string _fName;
public XLSXWriter(string fileName)
{
_fName = fileName;
}
public override void Export(IEnumerable<AnimalData> animals)
{
var workBook = ne... | c# | [0] |
2,341,254 | 2,341,255 | return in PHP code | <p>when we use <code>return</code> in PHP on global scope, after <code>return</code>, does execution just stop?
or processing will go on?</p>
<pre><code><?php
if(defined("A")) return;
define("A", true);
echo "Hello";
if(defined("A")) return;
define("A", true);
echo "Hello";
?>
</code></pre>
| php | [2] |
3,160,717 | 3,160,718 | C# Enum or int constants | <p>I have a group of values that represent a state (ON, OFF, READY, ...). These values also get stored in a DB as an int field, so I am wondering if best practices would say to make this an enum or just bunch of const int types on a class. </p>
<p>Enum seems like a natural fit for human reading/coding, but it seems li... | c# | [0] |
1,707,498 | 1,707,499 | Add another item in javascript | <p>I am trying to add another item to the approval list below. I also want to make sure if the code is correctly formatted. </p>
<pre><code> function getApprovers() {
//generate a list of approvers from APPROVAL_LISTS and APPROVALS_REQUIRED
var approvers = [];
if (item.APPROVALS_REQUIRED !== null) {
... | javascript | [3] |
2,915,864 | 2,915,865 | Reading a website table from android | <p>I would like to read a 3 column table from a site and store it to three variables <code>col1</code>,<code>col2</code>,<code>col3</code>
I found here a sample code
<a href="http://www.devx.com/wireless/Article/39810/1954" rel="nofollow">connecting to the web tutorial</a>
and I'm trying to manipulate it </p>
<pre><co... | android | [4] |
5,213,658 | 5,213,659 | How to detect operating system encoding in php? | <p>I want to detect a operating system of filesystem's encoding as default, like Windows OS in different language version it will use different encoding (iso-8859-1, ms950, big5, gb2312..etc)
So how can I detect the different operating system of encoding in PHP? Any idea? Thanks.</p>
| php | [2] |
5,456,340 | 5,456,341 | Appending data into an array when condition is met? | <p>I'm trying to keep a timer for users in my IRC. When a user types a message I'm trying to insert the username & time of the message. This is to stop spammers.</p>
<pre><code>if(userList.Contains(username)) {
//check the time of message
//if last message is 3 seconds ago or greater, continue
} else {
//Add use... | c# | [0] |
3,231,346 | 3,231,347 | Change default phone language by changing application language in Android? | <p>Is there any way to change language of phone by changing the language from application.</p>
<p>I mean when I change the language of my application then the default phone language will also change.</p>
<p>Is there any idea about this then please share here.</p>
<p>Thanks in advance.</p>
| android | [4] |
601,678 | 601,679 | how to slice two images into one image in iphone | <p>Hi
I have one app where i need to slice two or three images into one image can anybody help me in this</p>
| iphone | [8] |
3,411,867 | 3,411,868 | android how to make native zip application | <p>I would like to create a zip file from files located on the sd card, I have managed to do that using java but I think that the result is too slow, so I thought of going native using the android NDK.</p>
<p>My questions are: </p>
<p>Does anyone know any C/C++ library to zip unzip files that will work on android?</p... | android | [4] |
1,471,162 | 1,471,163 | Flow control patterns and best practices | <p>We got in argument with co-worker about the patterns of flow control and general code design. Need your opinion - which is the better/cleaner/preferred way of writing the code ?</p>
<p>This is for MVC 3, but that doesn't really matter.<br/>
Version 1:</p>
<pre><code>public ActionResult Login(LoginData loginData)
{... | c# | [0] |
2,624,458 | 2,624,459 | PHP> Extracting html data from an html file? | <p>What I've been trying to do recently is to extract listing information from a given html file,</p>
<p>For example, I have an html page that has a list of many companys, with their phone number, address, etc'</p>
<p>Each company is in it's own table, every table started like that: <code><table border="0"></co... | php | [2] |
10,968 | 10,969 | How do I modify the background color of an empty UITableViewCell object based on it's position? | <p>I'm trying to write code to modify the background color of a cell based on it's position in the table. While the following code 'works', it only effects cells that are passed to it. Empty cells don't get effected.</p>
<pre><code>- (void)tableView: (UITableView*)tableView willDisplayCell: (UITableViewCell*)cell fo... | iphone | [8] |
887,179 | 887,180 | Vanilla JS plugin template | <p>Okay, we all know how to write jQuery plugins: <a href="http://docs.jquery.com/Plugins/Authoring" rel="nofollow">http://docs.jquery.com/Plugins/Authoring</a></p>
<p>Can someone advise pure javascript template plugin? With methods and default settings.</p>
<p>I want to make it work with single node and <strong>with... | javascript | [3] |
2,848,723 | 2,848,724 | Orientation in UITabBarController + UIViewController | <p>Anyone please answer for my requirement </p>
<p>Im using my application in this order,</p>
<p>first page = UIViewController,
secondpage = UITabBarController with 4 tabs,</p>
<ol>
<li>I need landscape on the orientation on the second tabpage(UIViewController) ? not working..</li>
</ol>
<p>Note : When using UITabB... | iphone | [8] |
2,556,033 | 2,556,034 | ASP.NET custom server control cannot make binding expression work on properties | <p>I got an issue which annoys me a lot... I have a custom server control which has a Text property. When I put that control inside the in repeater, listview, etc, for example, given the following markup:</p>
<pre><code><ItemTemplate>
<dl:SimpleLabel ID="lblTest" runat="server" Text='<%#Eval("FirstNam... | asp.net | [9] |
3,319,466 | 3,319,467 | what is the output if x == 42 | <pre><code>switch (x % 5)
{
case 0: cout << x++ << '';
case 1: cout << x-- << '';
break;
case 2: cout << ++x << '';
case 3: cout << --x << '';
default: cout << 2*x << '';
}
</code></pre>
| c++ | [6] |
4,148,370 | 4,148,371 | numeric variables in JS | <p>For a variable x=5, how do I know it is number five or the character '5'? </p>
<p>Btw, in JS, do characters follow the ASCII table? Then can I manipulate a character variable. For example, if variable x is character a, can I do x=x+1 to make it character b?</p>
| javascript | [3] |
884,594 | 884,595 | function concept | <pre><code>void execute(int &x,int y=100)
{
x=x+y;
cout<<x<<endl;
}
void main()
{
int a=5,b=6;
execute(b);
}
</code></pre>
<p>will the following program work in spite of not assigning a default value to the x(formal parameters in the fuction prototype).</p>
| c++ | [6] |
4,740,040 | 4,740,041 | why setName in Thread class assigns to a character array?why not a String? | <p>When i was dealing with threads concept in Java, i have seen Thread.java source file. I noticed when <code>setName()</code> method assigns string to a character array called <code>"name[]"</code>. Java has a feature of String data type, then why they are using character array. </p>
<p>In source file it is initialis... | java | [1] |
5,355,197 | 5,355,198 | Bind actions to some html then append | <p>Let's imagine that we have some piece of html with appended actions.</p>
<pre><code>var html = $('<a href="#">click me</a>');
html.find('a').bind('click', function(e) {
alert('You clicked me!');
});
</code></pre>
<p>Now we want append this piece of html (with binded actions) to some <code><div id... | jquery | [5] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.