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 |
|---|---|---|---|---|---|
1,316,012 | 1,316,013 | How do you create a property for a custom object in JavaScript? | <p>I know I can create function for custom object like </p>
<pre><code>var newObj = {
myFunc1: function () {
alert('hello');
},
myFunc2: function () {
alert('hello');
}
}
</code></pre>
<p>Now how can I create a new property so that i can set that property in myFunc1 or myFunc2 and and th... | javascript | [3] |
5,572,652 | 5,572,653 | saving images from webcam stream directly to web server with java | <p>Is it possible to save images directly from the webcam of my system to a web server in Java? Maybe it can directly passed to an URL address and can be <code>GET</code> at the server or anything else.</p>
| java | [1] |
3,272,134 | 3,272,135 | Dismissing popover, then popToRootViewController, EXC_BAD_ACCESS | <p>I am getting a crash when I <code>popToRootViewController</code>, this is the way I have it set up.</p>
<p>I have: </p>
<pre><code>@property (nonatomic, retain) UIPopoverController *popover;
</code></pre>
<p>in dealloc:</p>
<pre><code>[popover release];
</code></pre>
<p>when a button is pressed</p>
<pre><code>... | iphone | [8] |
2,307,291 | 2,307,292 | C# Variable Name To String | <p>I have variable</p>
<pre><code>public string MyVariable;
</code></pre>
<p>I need use name of variable as string. Example:</p>
<pre><code>var a = MyVariable.NameVariable();
// a = "MyVariable"
</code></pre>
<p>How i may to do this?</p>
<p>I would like to create your miniORM (NHibernate is too heavy and requires ... | c# | [0] |
253,892 | 253,893 | JQuery textarea value is empty | <p>This type of question tends to immediately get a negative vote. If you have the answer, please help! Thanks.</p>
<p>I have a script that adds a textarea to the dom. When I enter data and later try to retrieve it the value returns empty.</p>
<p>This successfully sets the value of the textarea:</p>
<pre><code>$(... | jquery | [5] |
4,299,375 | 4,299,376 | related to variables | <p>_Shopid =0;</p>
<p>_forename=””;</p>
<p>_dateofbirth=?</p>
<p>id is int represented by 0 </p>
<p>forename is string represented by double qoutations like ""</p>
<p>how to represent dateof birth </p>
| c# | [0] |
994,891 | 994,892 | Get thumbnail image of video from video url | <p>Is it possible to get the thumbnail image from a video Url? I need to thumbnails of videos in a list view.</p>
<p>Thanks in advance
benish</p>
| android | [4] |
834,765 | 834,766 | User input asked twice | <p>The code below asks to input the numbers two times.</p>
<pre><code>public class Palindrome {
public static void main(String[] args) {
boolean x;
boolean display;
x = check();
display = display();
}
private static int getUserInput() {
int inputNumber = 0;
String answer = JOptio... | java | [1] |
5,137,870 | 5,137,871 | What is the right place to store persistent app data before exiting? | <p>I have a single <code>Activity</code> application with a data container that is populated at the launch of the application from a JSON formatted private text file. When exiting the application, whether it's a graceful exit or forced one, the the data must be written back to the text file.</p>
<p>Android documentati... | android | [4] |
3,076,141 | 3,076,142 | How to get some elements from html source and convert them to readable text? | <p>I have a page which displays "HeLLo 54292" in ASCII art, using <code>+</code> characters inside <code><table></code> tags to produce block letters. I'm generating this with PHP. <a href="http://cmaempreendimentos.com/test/" rel="nofollow">You can check out page's html source code</a>, and see how the ASCII art... | php | [2] |
1,705,736 | 1,705,737 | ASP.NET chatting design and speed issues | <p>Ok. I am making a random chatting website here, and the website needs to know each user's new visit datetime and a randomID in order to retrieve the messages he/she made in a chatting room. When a user comes in to my website, he/she gets a unique random ID and start to talk to another person. Every comments they mak... | asp.net | [9] |
5,581,237 | 5,581,238 | Call by reference-stream and char in c++ | <p>My latest homework assignment is to write a program that reads a textfile and outputs the number of lines, words and characters.</p>
<p>I'm just starting out, all I'm trying to do right now is to let the user type in the file name and then the file will open. This is my not-working code, I must be missing something... | c++ | [6] |
3,262,989 | 3,262,990 | how i can place my xml file in url in iPhone | <p>I am developing a XCAP application.In my application i am developing a xml file.Here my problem is this xml file,i want to place an url.can any one help to me?
thank in advance</p>
| iphone | [8] |
435,117 | 435,118 | file_put_contents() not over writing, just appending | <p>I have a simple <code>file.txt</code> which needs to be over written every time I run a certain php code.</p>
<pre><code>$msg ="string";
$file = 'file.txt';
$opn = file_get_contents($file);
$opn .= $msg;
file_put_contents($file, $opn);
</code></pre>
<p>The code works perfectly, It added the string I want it to add... | php | [2] |
2,590,672 | 2,590,673 | jQuery subtracting successive table cells | <p>I'm trying to determine how to calculate the difference between successive table cells in jQuery. I have a table that looks like this. </p>
<pre><code><table id ="tbl">
<tr>
<td>5</td>
<td>12</td>
<td>15</td>
<td>17</td>
</tr>
&... | jquery | [5] |
4,847,731 | 4,847,732 | How do I round a button programmatically in Android? | <p>I have a <code>Button</code> which populates a <code>GridView</code> using a custom adapter's call to <code>getView()</code>. As such, there is no .xml file for the <code>Button</code>.</p>
<p>Is there a way to programmatically round the <code>Button</code>?</p>
| android | [4] |
4,521,889 | 4,521,890 | how to read trace | <p>I have a snipnet which writes user name to trace.</p>
<pre><code>Trace.WriteLine("Current User: " + userIdentity.Name);
</code></pre>
<p>How to read this information. I did good search in net, no luck. Can we read default trace?</p>
<p>Thank in advance.</p>
| c# | [0] |
4,867,385 | 4,867,386 | How can I separate a string so that the first words are in one variable and the last word is in another? | <p>I have a string that looks like this: <code>This is a sample string</code></p>
<p>and I want to separate the sting so that the first words are in one variable and the last word is in another. So:</p>
<pre><code>$beginning = "This is a sample"
$lasword = "string"
</code></pre>
<p>How can I do that? </p>
| php | [2] |
3,166,668 | 3,166,669 | How to call constructor of the current class and parent class at the same time? | <pre><code>public class A{
List m;
public A(int a, int b) {m=new List(); ...}
}
public class B : A{
List a;
List b;
public B(){...} //constructor1
public B(int a, int b) : base(a,b){...} //constructor2
}
</code></pre>
<p>My question is I need to initialize both list a and b in class B. If I ... | c# | [0] |
3,613,736 | 3,613,737 | newsgroup client | <p>I hope to develop a newsgroup client reader for iPhone.
But I can not find out any technology concern this.</p>
<p>Welcome any commnents</p>
<p>Thanks</p>
<p>interdev</p>
| iphone | [8] |
1,977,769 | 1,977,770 | PHP Array count and get element values | <p>I'm pretty new to PHP and programming so I'm having troubles with this thing.</p>
<p>The purpose of the whole situation is to read a column from tab delimited file (already did that), get all different items in it, count them individually and put them in table with <br><br>Column1[item value - label], Column2[count... | php | [2] |
2,790,501 | 2,790,502 | get Values from form elements in JQUERY? | <p>My form.html</p>
<pre><code><form id="search-form" method="post" action="." name="f">
<p><label for="id_customer_type">Customer type</label> <select name="customer_type" id="id_customer_type">
<option value="">All</option>
<option value="TDO" selected="selected">TDO&l... | jquery | [5] |
3,125,915 | 3,125,916 | Get the list of a class's variables & methods in Python | <p>If I have the following class, what's the best way of getting the exact list of variables and methods, <em>excluding</em> those from the superclass?</p>
<pre><code>class Foo(Bar):
var1 = 3.14159265
var2 = Baz()
@property
def var3(self):
return 42
def meth1(self, var):
return var
</code></pre>
... | python | [7] |
3,545,761 | 3,545,762 | C++ function problem, | <p>I have this code, but when I compile it with Borland Turbo C++, Turbo C++ say:</p>
<blockquote>
<p>Error filename.cpp 13: Call of nonfunction in function main()</p>
</blockquote>
<p>my code is:</p>
<pre><code> #include <iostream.h>
int reload (int yes, int no) {
int reload;
cout << yes... | c++ | [6] |
4,569,075 | 4,569,076 | is there any diff between run a java program with jar or with a package unpacked? | <p>is there any diff between run a java program with jar or with a package unpacked?
now i meet a Weird probem. i have a search program.when i run it with a jar,it's ok.
when i run it just with package unpacked to jar ,then the gc log is a</p>
| java | [1] |
1,383,773 | 1,383,774 | Check if a file is writable before writing to it | <p>I'm trying to create a script which will check if a file is writable before writing to it,</p>
<p>Making sure the script doesn't exit prematurely.</p>
<p>I've gotten this far</p>
<pre><code>$meta =stream_get_meta_data($file);
while(!is_writable($meta['uri'])){
sleep(rand(0,3));
$meta=stream_get_meta_data($fil... | php | [2] |
1,215,804 | 1,215,805 | Android, onPrepareDialog to update parameter-ized string not updating. | <p>This does not seem to be working. The alert dialogs are not even showing a title or message unless I set them in the onCreateDialog method.</p>
<pre><code>@Override
protected void onPrepareDialog(int id, Dialog dialog) {
super.onPrepareDialog(id, dialog);
switch(id) {
case R.id.catalog_rename_dialog:
... | android | [4] |
1,729,232 | 1,729,233 | Android Simple way to update MapView without ConcurrentException? | <p>I have a mapview, and some asynctask call, on the asynctask call's end i invalidate my mapview (so i can draw everything, what i need)</p>
<p>But I have some buttons on my mapview, thats can update my mapview's onDraw too (invalidate)</p>
<p>Sometimes I get a concurrentException because of this. How can I call a f... | android | [4] |
4,946,136 | 4,946,137 | details of finding 2nd smallest element in unsorted array | <p>Let me make things clear:
I want to know more about the implementation of the "best" ALGORITHM how to find 2nd smallest element in array, which is described here:</p>
<h2><a href="http://stackoverflow.com/questions/3715935/algorithm-find-index-of-2nd-smallest-element-from-an-unknown-array">Algorithm: Find index of ... | c++ | [6] |
827,474 | 827,475 | How to convert a decimal into time, eg. HH:MM:SS | <p>I am trying to take a decimal and convert it so that I can echo it as hours, minutes, and seconds.</p>
<p>I have the hours and minutes, but am breaking my brain trying to find the seconds. Been googling for awhile with no luck. I'm sure it is quite simple, but nothing I have tried has worked. Any advice is apprecia... | php | [2] |
1,011,320 | 1,011,321 | e-mail validation on windows form | <p>i am using windows forms.</p>
<p>I just want to validate my textbox ( or masked textbox ) for e-mail id.</p>
<p>Can any one tell me the idea for that?</p>
| c# | [0] |
2,040,773 | 2,040,774 | Add a timeout when creating a new Socket | <p>I have a local network with DHCP and a few PCs. One of these should be my Server and get automatically connected to all others (clients). My idea was this:
First, I create a server on every client (CServer) that is listening for a client programm from the server (SClient). When the SClient connects to a CServer, the... | java | [1] |
3,863,385 | 3,863,386 | Add an attribute if not already there | <p>How would I add an attribute to an element if that element does not already have that attribute?</p>
<pre><code>if (' this does not have class=selected') {
$(this).addClass('selected');
}
</code></pre>
| jquery | [5] |
3,230,415 | 3,230,416 | Equivalent is_file() function for URLs? | <p>What is the best way to check if a given url points to a valid file (i.e. not return a 404/301/etc.)? I've got a script that will load certain .js files on a page, but I need a way to verify each URL it receives points to a valid file.</p>
<p>I'm still poking around the PHP manual to see which file functions (if an... | php | [2] |
514,007 | 514,008 | Best UI element for displaying results of XML parsing | <p>i am a student and also new to iphone SDK.i want to do xml parsing which has image URL and Data,it is a XML file about news.i have to show it .can i use table view or navigation controller? which is the best way?i have to show images and titles in first page.when i click it,it shows other page to show full news with... | iphone | [8] |
1,616,461 | 1,616,462 | Addding mapview in tablelayout/tablerow at runtime | <p>Respected All.
I know how to use map in application. But i have to use map in particular table row at run time. I have used mapview in my another activity. can i use that map view (by id)
to show map in that row.
Thank You
... | android | [4] |
3,646,596 | 3,646,597 | How to get comma separated values in td | <p>i getting values from query but i have to place them as comma separated values if there is more than one value
I'm looking for output like this:
title (x,y) , (x,y) </p>
<p>Please help me how can i do this i'm trying in function to get this</p>
<pre><code>$cols = array ('test.*', 'user.*', 'count(test_stats... | php | [2] |
1,759,086 | 1,759,087 | Why is the physical keyboard not working in my Android app? | <p>In my Android app, the soft keyboard is working properly, but the physical keyboard is <strong>not</strong> working. I could not find out the reason for this. Is it due to any coding mistake of my app, or my phone's issue?</p>
| android | [4] |
942,394 | 942,395 | repeat each loop every 1 second | <p>For the below code, how do i repeat the each loop every 1 second on hover? So when the mouse is over <code>prevbutton</code> the each loop runs every 1 second?</p>
<pre><code>$('.prevbutton').hover(function() {
container.animate({'scrollLeft': '-'+scroll}, 5000);
$('.parent-container').each(function() {
... | jquery | [5] |
2,461,042 | 2,461,043 | Android : How get the current Application Context in AsyncTask? | <p>I create an application with several activities and i have an AsyncTask outside any activity which is launched at the begining of the application life. My question is how can i get the current Application Context in the Asynctask class?</p>
<p>Thank's for your answers</p>
| android | [4] |
1,575,674 | 1,575,675 | android: how to know internet connection is available or not in device? | <p>I want to check the Internet connection available or not in device so how can i got this..please give me code for this..</p>
<p>thank a lot In advance</p>
| android | [4] |
4,378,616 | 4,378,617 | java ui component to represent calendar in tabular form | <p>I would like to show the calendar in the tabular form with weeks and days.
Any suggestion on which component/library i can use?</p>
<p>Thanks in advance,
Shags</p>
| java | [1] |
1,162,854 | 1,162,855 | Is it possible to get detailed help on a given function using the command line? | <p>I am a new Python user :)
Is it possible to get detailed help on a given function using the command line ?</p>
| python | [7] |
5,911,004 | 5,911,005 | Variable undefined | <p>role="manager" and its says that "manager" is undefined.please help.</p>
<pre><code> function onSubmitClick(role)
{
.....
<input type="b
utton" class="button" name="btn_Submit" id = "btn_Submit" value="Submit"
onMouseOver="sho... | javascript | [3] |
915,040 | 915,041 | Playing video (on iPhone) which has been streamed via a custom protocol? | <p>I need to play video that has been streamed by a custom protocol, <em>not</em> via HTTP live streaming (in fact not via HTTP at all). While I have no problems implementing the protocol, I can't see how to set up a player so that I can just feed the stream to it (and have it decode and display the video) - instead th... | iphone | [8] |
3,678,477 | 3,678,478 | Adding values to Arraylist | <p>Code 1:</p>
<pre><code>ArrayList arr = new ArrayList();
arr.add(3);
arr.add("ss");
</code></pre>
<p>Code 2:</p>
<pre><code>ArrayList<Object> arr = new ArrayList<Object>();
arr.add(3);
arr.add("ss");
</code></pre>
<p>Code 3:</p>
<pre><code>ArrayList<Object> arr = new ArrayList<Object>();
... | java | [1] |
2,987,210 | 2,987,211 | Java library for graphical diff | <p>Is there any Java library that can diff text (in particular XML) files and provide the result as an image (e.g. like Pretty Diff)?</p>
| java | [1] |
5,816,989 | 5,816,990 | how to pass parameter to javascript in asp.net | <p>I need to pass an url from asp.net load_page to flowplayer javascript function here:
<a href="http://flowplayer.org/plugins/streaming/rtmp.html" rel="nofollow">http://flowplayer.org/plugins/streaming/rtmp.html</a></p>
<p>How to do that ?</p>
| asp.net | [9] |
2,424,685 | 2,424,686 | jQuery fade in background image on hover | <p>I have a row of menu buttons, and I need the background-image to be transparent, and then fade in on rollover (hover).
can I use jQuery to acheive this?</p>
<p><a href="http://jsfiddle.net/craigzilla/JdHWY/" rel="nofollow">http://jsfiddle.net/craigzilla/JdHWY/</a></p>
| jquery | [5] |
4,290,035 | 4,290,036 | How to know if Android device supports stereo recording? | <p>The new Motorola RAZR supports stereo recording, but many other phones do not. How can I ask Android in a programmatic way if the device supports stereo recording?</p>
| android | [4] |
5,370,835 | 5,370,836 | Why does Android allocate more memory than needed when loading images | <p>Folks, I don't <em>think</em> that this is a duplicate and is NOT one of those how do I avoid OOMs questions. This is a genuine quest for knowledge so hold off on those down votes please...</p>
<p>Imagine I have a JPEG of 500x500 pixels. I load it as ARGB_8888 which is as "bad as it gets".</p>
<p>I would expect ... | android | [4] |
2,585,173 | 2,585,174 | Make subcategories in template script | <p>I really need help with a script i have bought, the script has some categories, but i also need sub categories, so i added an extra field in the table traffic_categories. The original traffic_categories has id and category, but i have added sub_id also, so if the category is a main category it has 0 in sub_id, but i... | php | [2] |
5,511,852 | 5,511,853 | Error in PHP file uploading | <p>Now, I am getting another problem. I am trying to upload file with this code :-</p>
<pre><code><form action="up.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="200000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type=... | php | [2] |
3,242,098 | 3,242,099 | Sort a list to place an element at the top | <p>I have a <code>List<Vehicles></code> which contains 4 items:</p>
<p>My <code>Vehicles</code> object has 2 properties: <code>VehId</code>, <code>VehName</code></p>
<p>The 4 items in my list are: </p>
<p>1) <code>VehId : "LOR", VehName : "Lorry"</code></p>
<p>2) <code>VehId : "CAR", VehName : "Car"</code></p... | c# | [0] |
3,326,103 | 3,326,104 | using customadapter of listview with viewpagerextension? | <p>any reference/example would be greatly appreciated?
trying to use library <a href="https://github.com/astuetz/ViewPagerExtensions" rel="nofollow">https://github.com/astuetz/ViewPagerExtensions</a></p>
| android | [4] |
5,783,864 | 5,783,865 | Check a list<string> for matches to a userdefined string | <p>I am having difficulties finding a suiteble way as to search a <code>List<></code> of strings i have for matches to a user specified string, I am not even sure i am going about it in the best way but what i got so far is:</p>
<pre><code> // This is the input string.
string input = userDefinedStr.ToL... | c# | [0] |
3,401,376 | 3,401,377 | Within PHP, how can I make sure a directory as public read access from the web? | <p>I have a bunch of JavaScript files that I want to minify and then cache it to a file. This file is saved to a location I provide as argument.</p>
<p>How can I make sure that location has is accessible from the web? </p>
<p>What I've tried so far:</p>
<pre><code>$test = array
(
'/Users/www/htdocs/test/nhecos/... | php | [2] |
2,555,406 | 2,555,407 | How to set break points when using jquery chain: obj.appendTo().appendTo().appendTo()? | <p>Jquery chain seems easy to read, however, is it possible to set a break point at one of the calls? </p>
<pre><code>obj
.appendTo()
.appendTo()
.appendTo()
.doSomething()
.doSomething2();
</code></pre>
<p>I'm using FireBug in FF.</p>
| jquery | [5] |
3,572,161 | 3,572,162 | Encoding issue , between windows and linux | <p>This is my code</p>
<pre><code>$data['rate_change_with'] = iconv('UTF-8', 'ISO-8859-15//TRANSLIT', $data['rate_change_with']);
$rate_change_with_index_array = preg_split('/\s+/', $data['rate_change_with']);
</code></pre>
<p>on a windows machine it works perfectly. But on ubuntu 12.04 it breaks. preg_split has no e... | php | [2] |
206,342 | 206,343 | Android: layout background changes when resuming | <p>This is extremely odd behavior. When I load my activity for the first time, everything is fine... the layout background is transparent, as it should be, and which I specified in my xml file.</p>
<p>But when I go to another activity and return to the original activity, the background image is set to an image from my... | android | [4] |
83,997 | 83,998 | PHP Form (post) Repeating input in a tabel | <p>I have a form (with post method) that takes the following input:<br>
- a certain name<br>
- a number<br>
- 3 checkboxes </p>
<p>All this input gets generated and calculated in a table.(html code within the php)<br>
Everything gets properly calculated and displayed in a table. </p>
<p><strong>So my question:</str... | php | [2] |
2,435,931 | 2,435,932 | python date appears in last year | <p>How do I do a check in python that a date appears in the last year. i.e. date between now and (now-1 year)</p>
<p>Thanks</p>
| python | [7] |
4,351,637 | 4,351,638 | what exactly are built-in types in Python? | <p>I keep hearing "everything is an object" in both Ruby and Python world. Well, what are built-in functions then? Can someone explain that in layperson English?
For example: </p>
<pre><code>file=open(abc.txt)
</code></pre>
<p>open is a built-in function. Is it an object? Is it a method? Of what class?</p>
<p>How di... | python | [7] |
4,231,138 | 4,231,139 | Display hebrew content in webview android | <p>this is my hebrew content : </p>
<pre><code><string name="test">בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ׃</string>
</code></pre>
<p>When i display in textview it is display correct format. But when i display in webview it display wrong.</p>
<p>I used this but not any effects <c... | android | [4] |
5,857,998 | 5,857,999 | jQuery pass value class | <pre><code>$(".hidee2").click(function() {
var type = $(".st").val();
}
<form action="" method="POST"><input type="hidden" class="st" value="st"><div class="button">Room Status : Accepting Reservation <br /><span><span><a class="hidee2">Book Now!</a></span><... | jquery | [5] |
5,611,340 | 5,611,341 | selecting from Jquery success result | <p>I'm trying to update a part of a page after the success of an asynchronous post.</p>
<p>So I have:</p>
<pre><code>success: function (data, status, xhr) {
var elementName = "#div" + gridName;
var findResult = $(data).find(elementName);
$(elementName).html($findResult);
</code></pre>
<p>Now ... | jquery | [5] |
4,119,809 | 4,119,810 | Error while calling next activity in android? | <p>this is my first activity code:</p>
<pre><code>public class hello extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button button = (Button) findView... | android | [4] |
5,534,274 | 5,534,275 | set dropdownlist selectedIndex in gridview | <p>I have a grideview that is being populated by an ObjectDataSource. In the EditItemTemplate, I have a dropdownlist which gets populated thru the code behind on the RowDataBound event:</p>
<pre><code> ddStates.DataSource = snm.getStates();
ddStates.DataTextField = "State";
ddStates.DataValueField = "StateID";
ddSt... | asp.net | [9] |
4,824,749 | 4,824,750 | jquery append to element when it appears with ajax displaytag | <p>Lets say I may (but also may not) have an element with class <code>order</code> in my DOM.
It maybe create on page load but also, after successful ajax request. My question is, how can I add some live event, that will append something to my element based on it class?</p>
<p>Flow would be like this:</p>
<p>1.Openin... | jquery | [5] |
1,094,514 | 1,094,515 | How to determine the bit order allocation at compile time? | <p>as we all known, for some compilers:</p>
<pre><code>struct T{
char bits: 4; // 3:0
};
</code></pre>
<p>and for others:</p>
<pre><code>struct T{
char bits: 4; // 7:4
};
</code></pre>
<p>since this is not specified by the standard. ( I do think this (the arithmetic meaning) should be specified by the stand... | c++ | [6] |
69,262 | 69,263 | PHP Twitter Style Date | <p>I am wanting to format my date with a Twitter style format however all the examples only have the x hours ago. What I would like...if possible, is:</p>
<pre><code>- X min ago
- X hours ago
- Yesterday
- Thursday (or other days)
- 17 December
</code></pre>
<p>X min/hour ago and yesterday are pretty self explanatory... | php | [2] |
3,512,407 | 3,512,408 | how to get running applications icon on android programmatically | <p>Below here is my code but i am getting default android launcher icon for all running applications:</p>
<pre><code>PackageManager pm = getPackageManager();
ActivityManager am1 = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
List<RunningTaskInfo> processes = am1.getRunn... | android | [4] |
4,533,687 | 4,533,688 | Accessing the value of a variable by its name as string in Java | <p>I have a string containing the variable name. I want to get the value of that variable.</p>
<pre><code>int temp = 10;
String temp_name = "temp";
</code></pre>
<p>Is it possible to access the value <code>10</code> by using <code>temp_name</code>?</p>
| java | [1] |
2,116,636 | 2,116,637 | Script causing 500 Internal Server Error | <p>My site has been suffering "500 Internal Server Error" often of late, and host has advised that this bundle.css.php script might be the reason why ...</p>
<pre><code><?php
ob_start('ob_gzhandler');
header('Content-Type: text/css');
$files = split(",",$_GET['files']);
foreach($files as $key=>$val){
if(file... | php | [2] |
4,586,153 | 4,586,154 | Setting location of the form using c# | <p>I have a form which has only tab control in it. I want to fix the location of the form on windows desktop according to the screen size of the users pc.</p>
<p>The form looks like windows task bar and it should be docked on top of windows desktop.
For this i set dock = top property in my form. But still it is not pe... | c# | [0] |
2,072,061 | 2,072,062 | Creating a wchar to multibyte char function | <p>The libc library I'm currently using is missing wctomb() so I'm looking to come up with a replacement implementation. What are some complexities I should beware of? Can I simply grab each byte in the wchar and stick them inside an char array?</p>
| c++ | [6] |
1,028,566 | 1,028,567 | An extension method for Session variables | <p>I created the following extension method:</p>
<pre><code> public static bool HasHostAndUrl(this HttpSessionStateBase session)
{
return session["CurrentUrl"] != null && session["CurrentHost"] != null;
}
</code></pre>
<p>I also have the following that appears in my code. Is it possible I c... | c# | [0] |
1,361,129 | 1,361,130 | How can I recognize whether it is a class or interface in java by seeing the name? | <p>Hi
I like to know how can I recognize whether it is a class or interface by seeing the name ..
For example all class name starts with capital letters..
method name starts with small name..
Is there any specific way to recognize it?</p>
<p>Thanks</p>
| java | [1] |
3,611,177 | 3,611,178 | Intent.getAction() is throwing Null + Android | <p>I have written BroadcastReceiver for sort of Alarm application. In onReceive method I am reading Intent.getAction(). <strong>It is running well in all of the versions *<em>except in SDK version 1.5 where it throws null pointer exception</em>*</strong>. I am setting the action in another activity where I am calling b... | android | [4] |
206,343 | 206,344 | How many days elapsed of the current year | <p>I want to get number of days elapsed from the current years Jan 1st to today date. I am making a unique id and I want to use it as part of the id. I want number to fixed to three digits with leading zeros. Plz help. </p>
<p>e.g.</p>
<p>Today : 2012-2-27
Then number of days elapsed is 057. </p>
| php | [2] |
5,081,277 | 5,081,278 | Spiral Number pattern in java | <p>I need to create these patterns in java according to how-many numbers the user enters:
like this if user enters 3:</p>
<pre><code>1 2 3 ------------>
8 9 4 |-------> |
7 6 5 <-----------|
</code></pre>
<p>if user enters 4:</p>
<pre><code> 1 2 3 4
12 13 14 5
11 16 15 6
10 9 8... | java | [1] |
4,625,539 | 4,625,540 | Getting screen height before first display? | <p>I have a ListView. I populate it with 8 items, that's all that fits vertically on the G1. Some of my users are saying the Droid has a taller screen height, and so I can probably add one or two more items to the ListView to take up the additional space provided.</p>
<p>How could I measure the available height the sc... | android | [4] |
1,811,653 | 1,811,654 | Regarding Good C# Book for Beginner | <blockquote>
<p><strong>Possible Duplicates:</strong><br>
<a href="http://stackoverflow.com/questions/477748/what-are-the-best-c-net-books">What are the best C# .NET books?</a><br>
<a href="http://stackoverflow.com/questions/3476074/book-about-c-for-a-beginner">Book about c# for a beginner</a> </p>
</blockquote>... | c# | [0] |
645,894 | 645,895 | $(document).ready called inside an external function? | <p>I saw some jquery code on the Net somewhere, that took this form :</p>
<pre><code><script>
function doSomething(message)
{
$(document).ready(function(){
alert(message);
});
};
</script>
</code></pre>
<p>i.e. an external function ("doSomething") which has $(docu... | jquery | [5] |
1,542,018 | 1,542,019 | Calculating an average, minimum, and maximum, from an imported file (.txt) | <p>I have a project where I need to read in data from a .txt file and run some calculations on it. No arrays allowed.</p>
<p>The data in the file looks like this.</p>
<p>firstname lastname age scores</p>
<p>example</p>
<p>Brian Moore 55 8 4 3 6 13 2 4 7</p>
<p>I need to print the data with just the initials of th... | java | [1] |
5,258,266 | 5,258,267 | Generate a form from a poco object | <p>Say you had a config object </p>
<pre><code>public class MyConfig{
public int PageSize{get;set;}
public string Title{get;set;}
}
</code></pre>
<p>and you want to automatically generate a asp.net form to edit the properties on this object.</p>
<p>Do you know of any frameworks to do this automagically? </p>
<p>I... | asp.net | [9] |
1,342,993 | 1,342,994 | How do I declare and access an array of objects in JavaScript? | <p>I have the following code, with the intention of defining and using a list of objects, but I get an 'undefine' for <code>post_title</code>. What am I doing wrong? I don't want to name the array as a property of an object, I just want a collection/array of objects.</p>
<pre><code>var templates = [{ "ID": "12", "post... | javascript | [3] |
2,675,111 | 2,675,112 | PHP: compute 2 variables product | <p>how can I compute the product between these 2 quantities in php ?</p>
<p>This is what I've tried, but it doesn't work</p>
<pre><code><?php echo (uc_price($price_info, $context) * $product->qty); ?>
</code></pre>
<p>thanks</p>
| php | [2] |
3,397,709 | 3,397,710 | ASP Security Exception: Same but different | <p>Raking my brain and I have tried many of the "solutions" found online. Basically we are demoing this application from a vendor and the initial install worked fine. The application is actually four different applications. On our Windows server we have our main site, with four applications inside of it for the vendor.... | asp.net | [9] |
2,313,184 | 2,313,185 | Draw A Custom Table In Windows Forms | <p>I want to draw a custom table to be a way similar to this one in the picture</p>
<p><img src="http://i.stack.imgur.com/OCyeL.png" alt="enter image description here"></p>
<p>I have tried the TableLayoutPanel but i can't get something similar to this one, So your help would be very appreciated and thanks in advance.... | c# | [0] |
4,203,378 | 4,203,379 | how can i do login google plus in my android application | <p>i am new in android can any one tell me
how can i do login google plus in my android application. i want to do a user can login with google plus, facebook and other </p>
<p>i want to know how the user login in google plus
i download the google API from <a href="https://developers.google.com/+/downloads/" rel="nof... | android | [4] |
2,471,041 | 2,471,042 | standalone application in python | <p>I wanted to know how can I make standalone application in python.
Basically what I am doing right now is I have a template.tex file and my script generate the pdf by giving some input values.
So I have to make exe file for windows and same for linux.
I can use cx_freeze for creating exe file.
But my problem is most ... | python | [7] |
2,236,882 | 2,236,883 | How to set to user account value "must not enter a user and password to use this computer" through c# code | <p>How to set to user account value "must not enter a user and password to use this computer"
when power up the computer the user wouldn't have to insert his user name & password
through c# code</p>
| c# | [0] |
1,951,237 | 1,951,238 | jquery .remove not working | <p>So I'm trying to port a web site I wrote in php to java. And I can't figure out why my jquery isn't working in java. Here's a trimmed down function that I'm trying to get working. When I click on a button I was it to remove a div. I know my function is being called because of the alert I've put in there but the jque... | jquery | [5] |
4,742,377 | 4,742,378 | Collections vs Arrays regarding sort() | <p>Collections vs Arrays regarding sort()
What is the difference between these two regarding sort() method? I know Arrays' sort() is using binary search for sort(), what about Collections'? And how to choose which to use?
Thanks!</p>
| java | [1] |
5,893,200 | 5,893,201 | android add ImageView selector programmatically | <p>I want to change ImageView background (in my case gradient color) using selector state programmatically not by using xml file.</p>
<p>I want pressed and default state to my ImageView</p>
<p>For creating gradient background I use this code:</p>
<pre><code> GradientDrawable gd = new GradientDrawable(
... | android | [4] |
2,040,669 | 2,040,670 | How can i delete image file in external storage after email sent? | <p>i am storing image in External storage using MediaStore,and send email with attach that image,image saved and sent email with attachment is working fine,i want to delete that image in external storage after mail sent.anybody knows,please give sample code for me..</p>
<p>Thanks All,</p>
| android | [4] |
3,410,773 | 3,410,774 | Can I have an application always open on Android? | <p>I don't know much about Android multitasking but I thought I'd ask the question before I attempt my project.</p>
<p>Is there a way I can program an Android application (aimed at Android 4.0+ only) to always be open in the background and keep all the network connections alive and the UI "drawn" so that when I open i... | android | [4] |
5,692,976 | 5,692,977 | Assigning values to elements of list | <p>When I have a for loop:</p>
<pre><code>for row in list:
row = something_or_other
</code></pre>
<p>It seems that sometimes I can assign a value (or append/extend etc.) directly to <code>row</code> and the <code>list</code> changes accordingly, and sometimes I have to do something roundabout like:</p>
<pre><cod... | python | [7] |
4,835,660 | 4,835,661 | Replacing tokens in a string from an array | <p>Let's say I have a string</p>
<blockquote>
<p>This $0 is $2 $1. Still, \$$3 is a lot to pay for a puppy.</p>
</blockquote>
<p>and an array of replacements</p>
<pre><code>array('puppy', 'cute', 'ridiculously', '1300')
</code></pre>
<p>What would be the cleanest way to replace the tokens in the string with the c... | php | [2] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.