Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
5,998,021 | 5,998,022 | python human readable large numbers | <p>is there a python library that would make numbers such as this more human readable</p>
<p>$187,280,840,422,780</p>
<p>edited: for example iw ant the output of this to be 187 Trillion not just comma separated. So I want output to be trillions, millions, billions etc</p>
| python | [7] |
3,908,219 | 3,908,220 | Why is knowing the Asp.net lifecyle important to coding in Asp.net? | <p>Why is knowing the Asp.net lifecyle important to coding in Asp.net?</p>
| asp.net | [9] |
551,177 | 551,178 | how to parse self closing tag in xml file | <p>I am working on an iphone application in which I am consuming a webservice.
So i am parsing the XML file data. any idea about how to parse self closing tag
like: State/ and how to read data of self tag like: Contact Email="abc@anc.com" Name="PhD" Phone="123-521-3388" Source="location"/</p>
<p>I am parsing xml file ... | iphone | [8] |
5,605,699 | 5,605,700 | Get what page the visitor visit in PHP | <p>I was trying to get what page the visitor visit:</p>
<p>Here is my code: </p>
<pre><code>$url = $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
$urlcomplete = $url;
$url = explode(".com/",$url);
$urlcount = count($url);
$newurl = '';
for ($start = 1; $start < $urlcount; $start++) {
if ($newurl != '') {
... | php | [2] |
4,241,599 | 4,241,600 | dynamic array value changed | <p>I am writing a program for read a text file and put in to an array. First i put data into a char array and then convert char array to int. In my loop the value of map[,] is true. But when the FOR ends all of the map[,] changes to 0.</p>
<pre><code>#include "stdafx.h"
#include <iostream>
#include <iomanip&g... | c++ | [6] |
5,540,770 | 5,540,771 | Beginner object references question | <p>If I instantiate an object in a main class, say:</p>
<pre><code>SomeObject aRef = new SomeObject();
</code></pre>
<p>Then I instantiate another object from the main class, say:</p>
<pre><code>AnotherObject xRef = new AnotherObject();
</code></pre>
<p>How can the instance of AnotherObject make use of the aRef ref... | java | [1] |
2,517,024 | 2,517,025 | Is it ok to use the same function name in different classes? | <p>You can see question in title , I was wondering if the same function name can be used in different classes without problems? </p>
<p>Classes are not connected, non of them is inherited by another </p>
<p>I have lots of places where would use the same function name for Posts object and Categories object. Something ... | php | [2] |
5,917,366 | 5,917,367 | How to read Toast notification aloud? | <p>I'm developing an android text to speech message application.When the message received as a <strong>Toast</strong> notification, I want to read it aloud.So how can I read the message inside the <strong>Toast</strong> notification as a voice.</p>
<p>There are 3 classes in my project
1) for sending message
2)receivin... | android | [4] |
4,024,257 | 4,024,258 | Method taking two default parameters | <p>I have a method with the following definition:</p>
<pre><code>void foo(int i = 0, bool flag = false) {}
</code></pre>
<p>I want to call foo() by passing only the second argument:</p>
<pre><code>foo(true);
</code></pre>
<p>But like this it will always pass it to the first parameter (i).<br>
Is there any other sol... | c++ | [6] |
5,479,680 | 5,479,681 | Image Tracking Script | <p>I want it able to ender the full link to a image, as the second the image chances, it will download it, when it changes again, it will download the image again. Is something like this possible? I have made a image downloader script, but I wan't to make it so it will run automatically once it detects that the image h... | php | [2] |
5,450,513 | 5,450,514 | image in not animated in IE, works for other browser? | <p>In ASPX page we have below code, everything works fine, but the animated gif "arrows64.gif" is not animated in IE browser, it's seems like freeze, need to know the workaround? </p>
<p>In page load I'm calling time consuming database call, meanwhile I wanted to show this busy image, but it's freeze in IE,</p>
<pre... | asp.net | [9] |
2,422,037 | 2,422,038 | what is difference between public and private Intents | <p>I know that public (named) intents that are registered with the system and can be called from any application and private (anonymous) intents that are used within a single
application. please can anyone give me an example for better understanding.</p>
<p>Thanks in advance</p>
| android | [4] |
349,391 | 349,392 | Show multiple UIActionSheet | <p>I have two UIActionSheets which I want to show at the same time</p>
<pre><code>[action1 showInView:self.tabBarController.view];
[action2 showInView:self.tabBarController.view];
</code></pre>
<p>the problem is that the first UIActionSheet answers the clicks, which is behind the second one which is frontmost and vis... | iphone | [8] |
4,716,343 | 4,716,344 | unparseable unix timestamp | <p>Unix timestamp is 1334672401.</p>
<pre><code>long t = Long.parseLong(map.get("timestamp").toString());
SimpleDateFormat formatter = new SimpleDateFormat("EEE MMM dd, ''yy, hh:mma");
Date time = new Date(t*1000);
Date date = formatter.parse(time.toString());
</code></pre>
<p>I'm trying to convert a unix timestam... | java | [1] |
5,847,583 | 5,847,584 | Ordered Binary Search w/ Assembly | Recursive vs. Iterative vs. Library | <p>Which is better?</p>
<p>According to Savitch, each recurse is saved on the stack in the form of an activation frame. This has overhead. However it takes a few less lines of code to write a recursive version. For an interview which one is better to turn in. The code for both is below.</p>
<pre><code>#include &l... | c++ | [6] |
3,035,085 | 3,035,086 | How can I allow only specified functions to be executed and disable all others? | <p>I am planning on allowing certain (registered & vetted) users to post php code and/or upload a php file that I will execute in a sandbox environment.</p>
<p>I am aware of how much a bad idea this sounds and the possible security holes I could open.</p>
<p>I'm also going to be doing things like setting strict, ... | php | [2] |
3,778,506 | 3,778,507 | Returning a reference to an object | <p>I'm trying to return a reference to an object, not pass it by value. This is due to not being able to pass a property by reference. </p>
<p>How can I get the code below to write 'new number plate' not 'old number plate'. After a bit of looking it seems like I cant. Just wanted to be sure first. Seems odd you cant. ... | c# | [0] |
5,849,155 | 5,849,156 | What is the block size of the iphone filesystem? | <p>Is it worth it for me to compress a 1000 byte file to a 300 byte file? or will the filesystem space consumption be the same?</p>
<p>I'm looking at storing 10k less than 4k files on my iphone and I'm curious if I'll see space saving by compressing them.</p>
<p>Thank you,</p>
<p>Carl</p>
| iphone | [8] |
2,988,895 | 2,988,896 | how to use $_POST to post a php variable | <p>I have a php variable "echo $id". Now I want to use the $_POST method to post the variable. I just want to know how to do this for a variable because $_POST[$id] does not work? I want the $id to be posted from the form into another page.</p>
<p>Below is my function where the $id is in:</p>
<pre><code>function id_g... | php | [2] |
5,484,922 | 5,484,923 | Getting a list of all phone contacts? | <p><strong>NOTE: Must work on Android 1.5 - ContactsContract does not</strong></p>
<p>Simple enough question. I need to know the best way to get the same list of contacts that show up when a user presses the Contacts button.</p>
<p>You would think something like this would work:</p>
<pre><code>//For Contacts
Intent... | android | [4] |
2,707,990 | 2,707,991 | Python Store dynamic data | <p><br>
I don't know if the heading makes sense... but this is what I am trying to do using list</p>
<pre><code>>>> x = 5
>>> l = [x]
>>> l
[5]
>>> x = 6
>>> l
[5] # I want l to automatically get updated and wish to see [6]
>>>
</code></pre>
<p>The same happens w... | python | [7] |
4,419,894 | 4,419,895 | Production Apply Push Notification Certificate | <p>Is it possible for another Apple developer to push notifications to another application if they know the device token?</p>
| iphone | [8] |
340,388 | 340,389 | PHP debugging techniques? | <p>How do I effectively debug PHP applications? My current method is to use trace output - eg: die("message") and then fix the application from there. The problem is that this is often very cumbersome and inefficient. I would like to do something like this: </p>
<pre><code>define('DEBUG', true);
debug({ print_r($arr)... | php | [2] |
592,443 | 592,444 | Saving an object which contains arraylists in arraylists | <p>I have an object of type Restaurant called myRestaurant which contains EmployeesAList, MenuAList and OrdersAList, each of which storing instances of objects Employee, Menu_Item and Order. Each instance of Order stores integers, strings and an arraylist of integers. </p>
<p>When I save myRestaurant, every arraylist ... | java | [1] |
1,267,816 | 1,267,817 | Passing values to Construtor | <pre><code>package org.apache.wicket.examples.guestbook;
import java.util.Date;
import org.apache.wicket.IClusterable;
public class Comment implements IClusterable {
private String text;
private Date date = new Date();
public Comment() {
}
public Comment(final Comment comment) {
this.t... | java | [1] |
2,106,821 | 2,106,822 | Table Driven Method issue | <p>I am writing a table driven method in C#. I have a dictionary of this signature:</p>
<pre><code>Diction<Func<string, bool>, Func<string>>
</code></pre>
<p>So it will take a string as a parameter and let me execute a method which returns a bool on the string (eg string.Length > 5). The value corre... | c# | [0] |
2,707,159 | 2,707,160 | How to upload the binary to app store? | <p>Please answer my query,my application is a server based application and only when connected to the server it can navigate to other screens,else the user will be restricted to only one screen.If i upload this binary,how could apple test it without a server.Do i give them the server also or do apple follow someother m... | iphone | [8] |
5,553,224 | 5,553,225 | how to combine elements from two text files and put them in a third file in java | <p>I have two files Persons.txt and Hobby.txt.In the third file i want to put all the persons names and add each name some hobbies.i read the names from the persons file but i don't know how to add each persons different hobbies.</p>
| java | [1] |
94,121 | 94,122 | Dyanamically choose js files to download | <p>I have a js client.
Currently I have a single <em>app.js</em> file which is a concatenation of all my <em>js</em> files.
Therefore in my html file I reference only one <em>js</em> file:</p>
<pre><code><script type="text/javascript" src="js/app.js"></script>
</code></pre>
<p>However, for debugging purpo... | javascript | [3] |
5,452,946 | 5,452,947 | const_cast for vector with object | <p>I understand that const_cast to remove constness of objects is bad, </p>
<p>I have the following use case, </p>
<pre><code>//note I cannot remove constness in the foo function
foo(const std::vector<Object> & objectVec) {
...
int size = (int) objectVec.size();
std::vector<Object> tempObjec... | c++ | [6] |
921,997 | 921,998 | Android Device not showing up in device chooser | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2256884/android-device-chooser-device-not-showing-up">Android Device Chooser — device not showing up</a> </p>
</blockquote>
<p>Does anybody have an idea what I may be doing wrong. I have installed the usb ... | android | [4] |
3,101,836 | 3,101,837 | How can changes to Java Control Panel settings be saved? | <p>I've just downloaded the latest JRE on a computer running a clean install of Windows 7. Now I want to do three things:</p>
<ol>
<li>disable automatic updating</li>
<li>remove the icon from the system tray</li>
<li>reduce the amount of space Java uses for temporary files</li>
</ol>
<p>I was able to do 2 and 3 by go... | java | [1] |
2,850,995 | 2,850,996 | How can I specify a smaller font than textAppearanceSmall? | <p>In android, I can specify text appearance like this:</p>
<pre><code> <TextView
android:id="@+id/text"
android:textAppearance="?android:attr/textAppearanceSmall"/>
</code></pre>
<p>Can you please tell me how can I specify a even smaller size than "textAppearaneSmall"?</p>
| android | [4] |
2,718,717 | 2,718,718 | javascript parseInt - difference of calculation in different radix | <p>For base19 and base24 both, value of a is 10 and b is 11 that I know.</p>
<p>But
<code>parseInt("ab", 19) returns 201</code> and <code>parseInt("ab", 24) returns 251</code>. </p>
<p>I want to know that how calculation is being done in each case.</p>
| javascript | [3] |
3,415,447 | 3,415,448 | Additional comma in the end of aggregates in C++98 / C++03 | <p>Why i can't use additional comma in the end of the initializer-list of aggregates in C++98 / C++03?</p>
<p><strong>ISO/IEC 14882:2003</strong></p>
<blockquote>
<p>8.5 Initializers [dcl.init]</p>
<p>= initializer-clause ( expression-list ) initializer-clause: assignment-expression { initializer-list ,opt } {... | c++ | [6] |
4,014,055 | 4,014,056 | Make web page read comfortable | <p>I'm looking for some tips and/or some open source code to make a web page read comfortable, something like readability or instapaper does.</p>
<p>Thanks</p>
| javascript | [3] |
4,321,289 | 4,321,290 | var_dump() without show protected and private property | <p>Is there any functions or how to var_dump() object without showing it protected and private property?</p>
<p>example:</p>
<pre><code>class foo {
public $public = 'public';
protected $protected = 'protected';
private $private = 'private';
}
$Foo = new foo;
var_dump($Foo);
// Expected output "(string) p... | php | [2] |
5,361,483 | 5,361,484 | Memory management in Python | <p>I'm new to python.To find the sizeof an integer i used getsizeof method available in sys module. It returns 24 bytes for integer and 34 bytes for char.</p>
<pre><code>>>> sys.getsizeof(1)
24
>>> sys.getsizeof('a')
34
</code></pre>
<p>I feel this size (24 bytes or 34 bytes) is very large to hold a... | python | [7] |
2,888,585 | 2,888,586 | How to accurately change a parsed version number in string form to numeric? | <p>So say I have a retrieved directory name, "LibX_00.03", and I retrieve the version information of the directory with:</p>
<pre class="lang-py prettyprint-override"><code>lib = "LibX_00.03"
version = lib[-5:]
</code></pre>
<p>After doing this I then want to compare this version number with others to assert the lat... | python | [7] |
4,187,820 | 4,187,821 | Selective and Specific printing of hash Map key - value pairs | <p>While writing test automation, i was required to leverage the api's provided by the developers and these api accepts HashMap as arguments. The test code involves calling several such api with hashmap as the parameter as shown below.</p>
<pre><code> Map<String,String> testMap = new HashMap<String,String>... | java | [1] |
3,054,636 | 3,054,637 | 2 simple variable initialization question | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1051379/is-there-a-difference-in-c-between-copy-initialization-and-direct-initializatio">Is there a difference in C++ between copy initialization and direct initialization?</a> </p>
</blockquote>
<p>Is there any... | c++ | [6] |
1,222,383 | 1,222,384 | how do I parse a specific string in python | <p>have a yaml file open to read</p>
<p>looking for a path that is stored in it </p>
<p>will always be on the second line of the file in the form</p>
<pre><code>Location: !!python/unicode '[PATH here]'
</code></pre>
<p>sorry if this is elementary (I'm sure it is), but what's the easiest way to grab the path locatio... | python | [7] |
4,806,084 | 4,806,085 | Extract image url from HTML code using Javascript | <p>I am pulling information from a Page note from the Facebook API. In the output I get an image URL embeded in HTML code. How can I extract the image url from the HTML code below using Javascript?</p>
<pre><code><img class=\"photo_img img\" src=\"http://photos-c.ak.fbcdn.net/hphotos-ak-ash4/373909_207177302696060_... | javascript | [3] |
119,833 | 119,834 | BFS detecting cycles where it should not be | <p>I have implemented a BFS algorithm to detect cycles in a graph, this is the following code:</p>
<pre><code> void hasCycle(node *root,string start){
if(root->visted){
if(root->name == start) cout << "Has cycle" << endl;
else return;
... | c++ | [6] |
2,681,710 | 2,681,711 | struct as key of unordered_map | <p>I have a problem putting data into an unordered_map using a struct as key:</p>
<pre><code>
typedef struct osdpi_flow_identificator {
u32 lower_ip;
u32 upper_ip;
u16 lower_port;
u16 upper_port;
u8 protocol;
} osdpi_flow_identificator_t;
// custom hash function for osdpi_flow_identificator
struct osdpi_flow_has... | c++ | [6] |
5,524,868 | 5,524,869 | Other class view cannot be loaded into TabBar Controller | <p><strong>Hi,</strong></p>
<p>I am making a project with 3 child views that are switched by a TabBar.</p>
<p><strong>What I did</strong></p>
<ol>
<li>Create a project (Window-Based)</li>
<li>Add 3 child classes (Window-Based too)</li>
<li>Add a Tab Bar Controller to MainWindow.xib</li>
<li>For each view under Tab B... | iphone | [8] |
328,048 | 328,049 | What is a "could not find type System.Collections.Generic.List" in the .NET Designer? | <p>I've got a WinForms project that I've had for quite some time, and now suddenly, I can't open the designer anymore and when I try to open the designer I get an error that says</p>
<p>could not find type 'System.Collections.Generic.List'</p>
<p>All of the code builds just fine, but I can't use the designer anymore,... | c# | [0] |
3,282,037 | 3,282,038 | Android development toolkits | <p>Was wondering if anyone knew of some third party android development toolkits.</p>
<p>I have found Basic4Android.</p>
<p>Was wondering what other options are available.Language does not matter.</p>
<p>Thanks</p>
| android | [4] |
199,261 | 199,262 | Auto increment inside a loop | <p>I need to auto increment an array value inside a <code>while</code> loop. If the array value is <code>$Values[2]</code>, I need it to be <code>$Values[3]</code> on the next loop. What I have is not providing any results.</p>
<pre><code>//select the top spread winners
$query_moline = "SELECT * FROM `highscore_leader... | php | [2] |
3,729,801 | 3,729,802 | Android screenOrientation vs Rotation | <p>I am using OrientationEventListener to correctly orient my activity when user rotates the device. I orient the activity by calling Activity.setRequestedOrientation(int).</p>
<p>My problem is that OrientationEventListener returns angle from "natural device position". setRequestedOrientation takes argument such as SC... | android | [4] |
2,846,043 | 2,846,044 | Export data into Excel, Word and PDF with Formatting | <p>I want to export data of DataTable or DataSet with formating like Color of Header-Footer, Font Size, Row Color in Word, Excel and PDF format. Is it possible?</p>
<p>If yes then how? Please healp me.
My code is as below.</p>
<pre><code>public void ExportToExcel(DataTable dt)
{
con.Open();
string ... | asp.net | [9] |
2,157,834 | 2,157,835 | How do I control the behavior of window.location in Javascript? | <p>At the bottom of my page I have window.location = ...</p>
<p>I wish my page (let's call it jspage) to load, and then only once everything is fully loaded do the redirect. At the moment I get "stuck" on the referring page while jspage is processing, then jspage flashes up for a tiny instant and I am redirected</p>
| javascript | [3] |
3,480,616 | 3,480,617 | How to call whatsapp as an Intent from my app on Android? | <p>This is how I am calling the SMS app: </p>
<pre><code>Intent sendIntent = new Intent(Intent.ACTION_VIEW);
sendIntent.putExtra("sms_body", "The SMS text");
sendIntent.setType("vnd.android-dir/mms-sms");
startActivity(sendIntent);
</code></pre>
<p>How do I do the same for sen... | android | [4] |
4,226,364 | 4,226,365 | Is there a way to catch un-displayable characters before they are written to a JTextArea? | <p>I alter my keyTyped behaviour to default output the char to the JTextArea, however when I copy and paste, it produces an un-displayable character. </p>
<p>I need this to work across multiple operating systems so using case 22: doesn't work as this doesn't apply on Mac's. Does sun either have a case for catching pas... | java | [1] |
2,694,949 | 2,694,950 | unique pin generator | <p>The task is to generate a given number of numeric pins of a given length.
Here's the code I came up with for a particular case of numeric pins that don't start with 0:</p>
<pre><code>def generate_pins(length, count):
return random.sample(range(int('1' + '0' * (length - 1)), int('9' * length)), count)
</code></p... | python | [7] |
1,676,914 | 1,676,915 | How to make each category in my "image" behave like a button in android? | <p>I wanted to ask that i have made an image (in Photoshop) which has a list of categories.
Now i want to make these categories clickable individually i.e when i click on 1 of the category <strong>"in my image"</strong>, certain thing will happen. But the problem is i can't understand <strong>how to make categories cli... | android | [4] |
4,245,115 | 4,245,116 | Wordpress and Custom PHP single SignOn | <p>I have a Wordpress installation and some php pages (not related to Wordpress). I want to use the same login between Wordpress and My Php pages. When I login from my php, and go to wordpress, it shouldn't prompt me to login again (and vice versa). Can you please tell me how to do this? Thank you.</p>
| php | [2] |
2,021,216 | 2,021,217 | Console.Readline() max length? | <p>When running a small piece of C# code, when I try to input a long string into <code>Console.Readline()</code> it seems to cut off after a couple of lines.</p>
<p>Is there a max length to Console.Readline(), if so is there a way to increase that?
<img src="http://i.stack.imgur.com/UxPOp.png" alt="enter image descrip... | c# | [0] |
2,223,643 | 2,223,644 | how to set textview border dynamically in android | <p>I m newbie to android and i am working on an app in which i want to set the border of textview dynamically, i.e by code not by xml. i searched a lot on google but everywhere i find solution by xml. I tried a lot, but didn't find a correct way to implement this.
Like using this url, but i cant get to the result
<a hr... | android | [4] |
702,125 | 702,126 | Create a template with ITemplate for a datalist | <p>How to create a new template e.g with divs for a DataList programmatically with ITemplate
or any other similar way?</p>
| asp.net | [9] |
5,932,347 | 5,932,348 | Undefined parameter in a javascript event | <p>When I click the anchor, I find that <code>date</code> is not defined. How should I make sure the parameters are in the scope of the self-calling function that I pass to <code>onclick</code>?</p>
<pre><code>var date = today; // today is well-defined at this point.
html += '<a onclick="(function(obj, myDate) { \... | javascript | [3] |
82,554 | 82,555 | Reading a complex JSON in jQuery | <p>I have the following complex jSON string which gets returned in an Ajax call in jquery 1.8</p>
<pre><code>listCountries({"totalResults":3,"countrynames":[
{"countryName":"Afghanistan","fName":"parks,area, ...","lng":1,"code":"continent"},
{"countryName":"Albenia","fName":"parks,area, ...","lng":2,"code":"continent"... | jquery | [5] |
4,057,018 | 4,057,019 | When to use get and set in C# class declaration | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/653536/difference-between-property-and-field-in-c-sharp-net-3-5">Difference between Property and Field in C# .NET 3.5+</a> </p>
</blockquote>
<p>What's the difference between using </p>
<pre><code>public string... | c# | [0] |
2,652,451 | 2,652,452 | Independant button | <p>I have a Javascript code that creates buttons OnLoad with the attributes being the values from an ASP page that fetches from the database. But whatever event I want each button to do, all the other buttons do it and it executes before the buttons are displayed. Please help...</p>
<pre><code>function createButtons(t... | javascript | [3] |
47,376 | 47,377 | PHP contact form error | <p>Have the following for my contact form im building only its not sending...</p>
<p>Ive tried to print the results to the browser which it does but for some reason it wont send, can anybody see syntax errors? </p>
<pre><code><?php
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$ad... | php | [2] |
475,703 | 475,704 | Can we dynamically swap assemblies at run-time in C# | <p>Consider following code -</p>
<pre><code>namespace N1
{
class A
{
//some implementation
}
class B
{
//some implemntation
}
}
namespace N2
{
class A
{
//slightly different implementation
}
class B
{
//slightly different implementation
}... | c# | [0] |
3,458,066 | 3,458,067 | Jquery Submit form and POST certain values to another script | <p>I have a payment button on a page that submits info to a payment processor and on the same page there is a form with some custom fields that updates a contact info when u submit it.</p>
<p>Im using a jquery script that submits the payment button and at the same time POSTS the values of the form to the updatecontact... | jquery | [5] |
549,043 | 549,044 | How to redirect to LogIn page when Session is expired (ASP.NET 3.5 FormsAuthen) | <p>I'm using FormsAuthentication and ASP.Net SqlMembership Provider.
I would like to provide a functionality to redirect to LogIn page when the underlying Session is expired.
I put the following block of codes in my <strong>BasePage OnInit</strong>.
As far as I tested, it always keeps on redirecting to... | asp.net | [9] |
4,750,661 | 4,750,662 | How to hide Widget If not supported by Android API? | <p><br/>
I am developing multiple widgets, One of them uses ListView but ListView is not supported by Android 2.3.<br/>
So, if my app is installed in Android 2.3 at that time widget with ListView should not display in widget's list.<br/>
But my that widget with ListView is showing in widget's list and if i click on it ... | android | [4] |
5,698,468 | 5,698,469 | phpinfo and php -v show different version on mountain lion | <p>I am trying to upgrade my php from 5.3.15 to 5.4.8 on Mac OSX 10.8.2. I've manually downloaded the source code of php 5.4.8 and executed:</p>
<pre><code>./configure --prefix=/usr/local
make
sudo make install
</code></pre>
<p>I also added <code>export PATH=/usr/local/bin:$PATH</code> to my <code>/etc/profile</cod... | php | [2] |
3,639,940 | 3,639,941 | Pass mysqli object to class | <p>I want to pass a mysqli object to a class. I create the object in one file:</p>
<pre><code>$host = 'host';
$user = 'username';
$pw = 'pw';
$db = 'db';
$link = new mysqli($host,$user,$pw,$db);
</code></pre>
<p>which is included in one page:</p>
<pre><code>include 'php/mysql.php';
include 'php/classes/Class.Dataco... | php | [2] |
354,693 | 354,694 | URL Object is not recognized | <p>I am writing a web service similar to below. But Java is not recognizing the URL, URLConnection. I am unable to solve this issue.</p>
<pre><code>URL yahoo = new URL("http://www.yahoo.com/");
URLConnection yc = yahoo.openConnection();
int dataLen = yc.getContentLength() ;
</code></pre>
| java | [1] |
4,994,228 | 4,994,229 | How to make this combo box. C# | <p>I want this funtion showing folders in local or ohher computer.
You can see this, if you open a Excel. Excel program offer hyper Link.
In the hyper Link dialog, there is a combobox.
That have skill or funtion as I said and wanted. .</p>
<p>this is combobox I want
<img src="http://i.stack.imgur.com/4DVP5.png" alt... | c# | [0] |
460,026 | 460,027 | Drupal - PHP Validation | <p>I have some content types (nodes) that are attached to various taxonomies. For specific node types, I want to do some validation on the taxonomy. I do not want to hard-code the nodes types and their corresponding fields that reference the taxonomy. So I put them in array. </p>
<p>However, I am unable to dereference... | php | [2] |
3,221,026 | 3,221,027 | android programming using internet to access web site | <p>I want to access the web site I want to retrieve information from website. I have found a solution for that but this application is unfortunately stopped any ideas?</p>
<pre><code>package pete.android.study;
</code></pre>
| android | [4] |
101,881 | 101,882 | How to Compare Dates in php? | <p>i need code to compare date in php</p>
<ol>
<li>Input date should be a valid date</li>
<li>input date should not be less than the current date.</li>
<li>i need to give time zones EST,PST,etc..</li>
<li>We need to make the time to GMT and compare with Current Time.</li>
</ol>
<p>can anyone help on this.
Thanks
Rama... | php | [2] |
2,466,573 | 2,466,574 | Echo last entry into MySql table first, followed by the next most previous entry | <p>I have a very simple database table of posts, I'd like to be able to print the most recent entry first, followed then by the next most previous entry etc etc when I retrieve them all . How do I do this? </p>
<pre><code>$someText = mysql_query("SELECT * FROM text");
while($row = mysql_fetch_array($someText)) ... | php | [2] |
2,289,743 | 2,289,744 | Session_set_save_handler close/gc | <p>I need to perform an action after a session times out. However I have no clue how to trigger that action without an incoming request. An event handler/a listener/a timer would suit perfect but since PHP does not support such a thing it is really difficult to accomplish what I want.</p>
<p>After lot of searching I b... | php | [2] |
5,884,079 | 5,884,080 | how to use regular expression for this below stuff in php | <p>I have a database of more than 70000 records and its primary key value started from 1 single digit.</p>
<p>So I want user have to type <code>nm0000001</code> instead of <code>1</code> in url.And in code part I have to discard the rest of the value except <code>1</code>.</p>
<p>But my problem is i want this type of... | php | [2] |
716,617 | 716,618 | Java Object default toString | <pre><code>System.out.println(someObj.toString());
</code></pre>
<p>you probably see the output like</p>
<blockquote>
<p>someObjectClassname@hashcodenumber</p>
</blockquote>
<p>My question : Is there any specific reason why hashCode number is displayed there?</p>
| java | [1] |
2,174,076 | 2,174,077 | Raphael map won't resize | <p>Hi I'm trying to resize the map created by raphael I ended up loading the SVG file coordinates and then running this function to create the map with the new region selected but I can't seem to get it to resize.
<a href="http://pastie.org/4319180" rel="nofollow">http://pastie.org/4319180</a></p>
| jquery | [5] |
5,628,789 | 5,628,790 | How to get function to fire when buttonless form is submitted | <p>I have a page with many forms on it. could be 1..200. None of these forms have buttons and they are built programatically. I am using jquery to submit all the forms that are checked.</p>
<pre><code> function FakeName()
{
$("input:checked").parent("form").submit();
}
</code></pre>
<p>My forms look... | javascript | [3] |
4,200,467 | 4,200,468 | Seeking simple Post-Redirect-Get code example | <p>I see lots which describes it functionally, but can't find a very simple PHP code example.</p>
<hr>
<p>Edit: lots of great feedback (+1 all round). Here's what I decided to implement; it may not be pure P-R-G, but it seems ok. Care to comment?</p>
<p>The form.php has an action; let's call it validate.php.</p>
<p... | php | [2] |
5,262,656 | 5,262,657 | iPhone XML parser wont add object to mutable array | <p>Greetings,</p>
<p>I have a problem with adding an object from parser to mutable array.
It was working fine until I moved MtableArray from AppDelegate to ViewController. This is where I call parser (MutableArray is inside this View also):</p>
<pre><code> NSURL *url = [[NSURL alloc] initWithString:@"http://example.c... | iphone | [8] |
453,364 | 453,365 | detecting changes to my program's focus | <p>When other programs are open in Android, how do I know when my program loses focus or gains focus?</p>
<p>I've seen the <a href="http://developer.android.com/reference/android/view/View.html#onFocusChanged%28boolean,%20int,%20android.graphics.Rect%29" rel="nofollow">View <code>onFocusChanged</code> event</a>, but I... | android | [4] |
284,185 | 284,186 | Getting error while writting code for onClickListener() in android | <p>Ma COde:-</p>
<pre><code>public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
b1=(Button)findViewById(R.id.button2);
b1.setOnClickListener(new onClickListener()// error Line
{
public void onClick(View arg0)
... | android | [4] |
5,767,890 | 5,767,891 | Cheapest way to copy an IEnumerable<T>? | <p>I've got an <code>IEnumerable<T></code>, and I need a copy of it. Anything that implements <code>IEnumerable<T></code> will do just fine. What's the cheapest way to copy it? <code>.ToArray()</code> maybe?</p>
| c# | [0] |
4,355,368 | 4,355,369 | Declare as property OR pass as method arguments | <p>I am writing a MySQL class.I notice that this cosfuses me already.I need to passing for example the table as an argument to a function or declare a property and do a setter method first before executing.</p>
<pre><code>public $table;
public function fetchByUniqueId($table,$id){
$query = "SELECT * FROM etc";
}
<... | php | [2] |
1,973,934 | 1,973,935 | Where should I put global methods and variables in an Android app? | <p>When I'm writing a method or using a member variable, I often find I need to share them across an app. But where should they go?</p>
<p>I can subclass Activity, but that falls over as soon as I use a MapView and am forced to use MapActivity, so not all my activities inherit from my subclass. Is there I way around t... | android | [4] |
2,055,313 | 2,055,314 | limit vector.size() in a for loop | <p>I'm trying to do this in a vector composed of Vec3f:</p>
<pre><code>for (size_t i = 0; i < (mPoints.size() - 10) ; i++) {
glVertex3f(mPoints[i]);
}
</code></pre>
<p>But I always get a run time error EXC_BAD_ACCESS ... if instead of size() I use an int I get the same error. If instead I simply use size() wit... | c++ | [6] |
2,580,076 | 2,580,077 | Odd(?) behaviour of a temporary std::ostringstream | <p>I was messing around with <code>std::ostringstream</code> whilst looking at this question: <a href="http://stackoverflow.com/questions/5963242/sprintf-in-c">sprintf in c++ ?</a>, and noticed the <code>stringbuilder()</code> wrapper by Nawaz and thought, well that ought to work with <code>std::ostringstream</code>.</... | c++ | [6] |
5,404,672 | 5,404,673 | Using a constantly changing variable to define a list | <p>I want to make a piece of code which pulls the title and link off an RSS feed and compiles it into a variable which can be then used in the message body. My problem is Body gets redefined every time i pull the info off the RSS. I am very new to programming and python, and I am under the impression that using a list ... | python | [7] |
3,199,089 | 3,199,090 | prependTo many elements with the same class to their parent div? | <p>I was trying this:</p>
<pre><code>$(document).ready(function () {
$(".qa-a-count").appendTo(".qa-q-item-main");
});
</code></pre>
<p>But there are a lot of <code>.qa-a-count</code> and <code>.qa-q-item-main</code> divs. They end up being appened to each other. How can I do it so that they only append to their ... | jquery | [5] |
3,031,544 | 3,031,545 | Collections sort(List<T>,Comparator<? super T>) method example | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/8036429/sorting-java-objects-using-multiple-keys">Sorting Java objects using multiple keys</a> </p>
</blockquote>
<p>I can't find any example of using this method, all examples give the second parameter "null".
... | java | [1] |
3,200,743 | 3,200,744 | Cancel function on mouse up? | <p>I am wondering how do i cancel/stop a function upon a mouse up event? </p>
<p>I basically have a onmousedown followed by a mousemove this lets me find a way to work out the offset amount with the mouse, but if i mouseup - it still keeps following the mouse!</p>
<p>I use:</p>
<pre><code>function mousePos(e){ //ge... | javascript | [3] |
4,977,445 | 4,977,446 | how to handle this exception :Invalidoperation exception | <pre><code>Application.Run(form);
</code></pre>
<p>Actually I tried to call this from my project. I got this exception. How to solve it? I have already called another <code>Application.Run(frmBind);</code> in my project.</p>
<blockquote>
<p>Starting a second message loop on a single thread is not a valid
operat... | c# | [0] |
2,688,494 | 2,688,495 | How can I initialize the union in const struct? | <pre><code> const struct EbmlSyntax {
uint32_t id;
EbmlType type;
int list_elem_size;
int data_offset;
union {
uint64_t u;
double f;
const char *s;
const struct EbmlSyntax *n;
} def;
} ;
</code></pre>
<p>I have to use the const struct above and want to cr... | c++ | [6] |
5,850,780 | 5,850,781 | Mutable default arguments in Python | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1132941/least-astonishment-in-python-the-mutable-default-argument">“Least Astonishment” in Python: The Mutable Default Argument</a> </p>
</blockquote>
<p>I have written the following python program:<... | python | [7] |
4,472,565 | 4,472,566 | Custom Dialog in android | <p>I want to custom dialog to change only body of the alert. I want to output like in this screen shot:</p>
<p><img src="http://i.stack.imgur.com/GtQ9g.png" alt="enter image description here"></p>
<p>But I have no idea on such a type of dialog. Any help is greatly appreciated.</p>
| android | [4] |
5,374,471 | 5,374,472 | enum name as function | <p>What happens if we use the enum name as a function in c++? To elaborate, let me put the following code snippet</p>
<pre><code>enum check{
HELLO,
HI,
HOWDY,
SALAM,
SALOM,
STOP
};
void main() {
int p = check();
cout<<p;
}
</code></pre>
<p>I could assume it may be invoking the ... | c++ | [6] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.