Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
2,370,033 | 2,370,034 | Web Platform Installer says asp.net is already installed (its not) | <p>Just trying to download it from <a href="http://www.asp.net/downloads" rel="nofollow">http://www.asp.net/downloads</a> for the first time. Web Platform Installer says regarding "Frameworks and Runtimes" (and also "Visual Studio Tools"), "All the recommended products from this group are already installed", even thou... | asp.net | [9] |
228,090 | 228,091 | JQuery works only for a one time | <p>I wrote jquery function for emphasis clicked <code><h4></code> tag. but it only works an one time. so how I solve that problem. this is my code.</p>
<pre><code> $(document).ready(function(){
$('h4').click(function(){
var a = $('h4').attr('style');
if(a=='font-size: 1.5em'){
... | jquery | [5] |
2,776,600 | 2,776,601 | string args error on compiling command prompt | <p>I'm a biginner and got an error on this command, whou'ld someone please help me ?
I've got this when I tried to compile my first programm....
get this in command prompt...</p>
<blockquote>
<p>HelloWorld.java:3: cannot find
symbol<br /> symbol : class string location: class HelloWorld<br />
public static voi... | java | [1] |
3,957,922 | 3,957,923 | Alert message not popped up after using Array.concat method | <p>I tried the following code in <code>IE9, Chrome</code>. But it is not working in both browsers.</p>
<p>In <code>Firefox</code>, it is working fine</p>
<pre><code><script type="text/javascript">
var first = ['a','b','c','h','i','j'];
var second = ['d','e','f','g'];
var insertPosIndex = 3;
firs... | javascript | [3] |
3,782,336 | 3,782,337 | Problems when reading from a FILE and use strtok function | <p>I have writen a code in C++ that must read information from a txt file and when it finds a "|" character it must jump to a new line. Its something quite easy but Im having problems when executing and Ive been trying to find the problem for hours and I havent suceed. :( I attached the code. </p>
<p>Thaaaanks in adv... | c++ | [6] |
3,637,972 | 3,637,973 | Simplified Object Data Source Control | <p>Is there any simplified Data Source Control that would allow binding to a local (code behind) page method? Any way to accomplish this with an ODS?</p>
<p>The ODS requires the TypeName parameter which I can't figure out to to point to the local page (code behind) in a Web Site Project.</p>
<pre><code><asp:DropDo... | asp.net | [9] |
100,675 | 100,676 | Is there a synonym for "Blittable" that is more common? | <p>Is there a more common name for a "Blittable" data type? In my software there is a distinction between a variable sized structure and a fixed size structure that has a similar behavior to "blittable" but I have only seen the name used in Microsoft software.</p>
| c# | [0] |
800,140 | 800,141 | detect a single ball out of two (Python) | <p>So i've got an image in input an i transformed it into an array. There is two ball, and i want to remove one ball.
My idea is to run through a loop, and detect line by line if there is a red pixel. And if in this array at an i, and there is not red pixel in i+1 it erase the entire rest of the line.</p>
<pre><code>f... | python | [7] |
4,263,652 | 4,263,653 | How do I allocate a class (using new) when that class has a nested abstract class? | <p>I'm new to C++ and am porting over code from Java. I have a renderer class which has a method that takes an interface as an argument. This way the caller can define how to render its buffers. Now I'm running into trouble when I try to 'new' the ported over class. I get the error 'allocating an object of abstract... | c++ | [6] |
5,640,446 | 5,640,447 | PHP multiple If conditions are true | <p>I have this PHP code:</p>
<pre><code>$supplier = $line[2];
if ($supplier == "supplier")
{
} else {
Header("Location: premium.php");
}
</code></pre>
<p>Now I want that to include $supplier == "demo" to the PHP code to be as follows:</p>
<pre><code>$supplier = $line[2];
if ($supplier == "supplier" && $suppl... | php | [2] |
2,348,883 | 2,348,884 | Why does this attribute not change? | <p>In the code below the last line is not setting the src attribute. Why?</p>
<pre><code>$("div.galerina").each(function(){
var gal=$(this);
var bullet=gal.children("img.galerina1");
var width=12*(gal.children("img").size())+'px';
gal.children("p").css({width:width})
gal.children("img").each(funct... | jquery | [5] |
3,680,090 | 3,680,091 | Simple map<> instantiation, I can't compile, please help | <p>Why I can't compile this code?</p>
<pre><code>#include <map>
using namespace std;
class MyTest {
template<typename T> void test() const;
};
template<typename T> void MyTest::test() const {
map<string, T*> m;
map<string, T*>::const_iterator i = m.begin();
}
</code></pre>
<p... | c++ | [6] |
3,751,641 | 3,751,642 | ImageView inside of a ScrollView | <p>I am working on a android project. I n that I have to deal with <code>ScrollViews</code> to scroll image. But when I am using <code>ImageView</code> inside <code>ScrollView</code> image given to me is not fit in UI layout. So I am thinking I convert a <code>ScrollView</code> to <code>ImageView</code>. Is there any p... | android | [4] |
1,580,890 | 1,580,891 | How to run an application before any other application in android? | <p>I want to write a program in that if somebody wants to open a application (like Contacts Application) , first my program starts and user enter a password and if password is correct , let contacts program to open.</p>
<p>i know it s possible because <a href="https://market.android.com/details?id=com.cc.applock&f... | android | [4] |
1,983,440 | 1,983,441 | change first line of a file in python | <p>I only need to read the first line of a huge file and change it.</p>
<p>Is there a trick to only change the first line of a file and save it as another file using Python? All my code is done in python and would help me to keep consistency.</p>
<p>The idea is to not have to read and then write the whole file.</p>
| python | [7] |
2,793,697 | 2,793,698 | Redirecting to file on network drive from asp.net page | <p>I need to open a file that is in the network location from a asp.net page. I have a service method that returns the path of the file.</p>
<p>string fpath=string.empty;
fpath=service.GetDocumentPath();</p>
<p>The path of the file returned will be fpath="\myserv1\downloads\xyz.pdf"</p>
<p>How do I redirect users to... | asp.net | [9] |
16,784 | 16,785 | JS alert doesn't fire after php update | <ol>
<li>The alert message 'Test' fires on load correctly. </li>
<li>The tblRoles table is updated correctly after the button is clicked.
HOWEVER </li>
<li>The alert message 'Update' does not fire after the update/button click.</li>
</ol>
<p>Code: </p>
<pre><code> <?php
//works correctly--On load----------... | javascript | [3] |
1,141,496 | 1,141,497 | Why python round so strange? | <p>My code:</p>
<pre><code> #!/usr/bin/python
# -*- coding: utf-8 -*-
print (round(1.555,1)) #It seems normal
print (round(1.555,2)) #Why it is not output 1.56?
print (round(1.556,2)) #It seems normal
</code></pre>
<p>Output:</p>
<pre><code> sam@sam:~/code/python$ ./t2.py
1.6
1.55
1.56
sam@sam:... | python | [7] |
2,672,034 | 2,672,035 | Android Development which sound file type? | <p>I have been getting the loop error where the soundpool plays a sound twice if they are WAV's and decided to convert all my audio to either OGG or MP3. I have seen mixed reviews.</p>
<p>Generally for Android Development which is the better audio file type?</p>
| android | [4] |
3,117,057 | 3,117,058 | one android app XML resources for different versions of build | <p>I need one information regarding , one android app XML resources for different versions of build. That means, i have a string XML files related to one android app. i have to use same string resource file for two different builds(in second build i need to change some strings of xml file instead of create new string.x... | android | [4] |
3,978,804 | 3,978,805 | How can I convince Python to import a class from a submodule when you import the package? | <p>Example: <code>mypkg/submodule.py</code> with class <code>MyClass</code> inside.</p>
<p>I want to be able to do:</p>
<pre><code>import mypkg
obj = MyClass()
</code></pre>
<p>What I need to do in order to make this work with default import?</p>
<p>I note that <code>from pkg import *</code> and <code>import pkg.su... | python | [7] |
3,419,186 | 3,419,187 | Where to start in learning how PHP works? | <p>I know PHP but I don't know why things work the way they do. I just know it has worked in the past so I just put it in there. </p>
<p>I can't seriously call myself a web developer until I truely know the languages I am working with. And if someone asks me why this does that etc., and I can't answer them, it's just ... | php | [2] |
2,355,130 | 2,355,131 | RingtonePreference: Is it possible to change the dialog title? | <p>By default, the title of the RingtonePreference dialog is "Ringtones". I'd like to change it to something else, but I'm not seeing an obivous way to do that. </p>
<p>Setting the title in the xml does not work:</p>
<pre><code><RingtonePreference
android:key="@string/pref_key_notifications_sound"
andro... | android | [4] |
3,301,296 | 3,301,297 | Setting focus in ASP | <p>I’m maintaining a site in ASP, one of the tasks is to set the focus on textbox on a page.
Here is what I have tried:</p>
<pre><code><script type="text/javascript">
<!--
document.psForm['password'].focus();
//AND
document.getElementById("password").focus();
-->
</script>
</code></pre>
<p>I didn't... | javascript | [3] |
1,372,846 | 1,372,847 | I have a text file of a paragraph of writing, and want to iterate through each word in Python | <p>How would I do this? I want to iterate through each word and see if it fits certain parameters (for example is it longer than 4 letters..etc. not really important though). </p>
<p>The text file is literally a rambling of text with punctuation and white spaces, much like this posting.</p>
| python | [7] |
3,445,301 | 3,445,302 | How do you alias a python class to have another name without using inheritance? | <p>If I have a python class, how can I alias that class-name into another class-name and retain all it's methods and class members and instance members? Is this possible without using inheritance?</p>
<p>e.g. I have a class like:</p>
<pre><code>class MyReallyBigClassNameWhichIHateToType:
def __init__(self):
... | python | [7] |
1,946,280 | 1,946,281 | how to get function's name from within the function (or kind of "self" reference to the function)? | <p><a href="http://stackoverflow.com/questions/251464/how-to-get-the-function-name-as-string-in-python/255297#255297">This answer</a> shows that there is a built-in <code>__name__</code> attribute of a function which can be used from <strong>outside</strong> the function, i.e. <code>print f.__name__</code>. However, ho... | python | [7] |
614,074 | 614,075 | How to override the behavior of the volume buttons in an Android application? | <p>I'd like to use the volume buttons for something else in my Android application. The Dolphin browser does this I am told. Anyone know how?</p>
| android | [4] |
5,753,986 | 5,753,987 | How to look through multiple arrays? | <p>I have an array that looks like this?</p>
<pre><code>Array ( [0] => 15 [id] => 15 )
Array ( [0] => 16 [id] => 16 )
</code></pre>
<p>I was wondering how can I know one from each other, if I want to echo the values separately?</p>
<pre><code>$getid = mysql_query($query);
while ($get_id = mysql_fetch_ar... | php | [2] |
4,057,587 | 4,057,588 | Getting fixed headers to stay inside container w/ jquery | <p>I'm trying to get a div to get fixed positioning when it's parent gets to the top of the window, and lose it when it hits the bottom... for some reason, i can get it to get the fixed positioning, but not lose it. been at this for awhile and i just cant figure it out...</p>
<p>Here is my code so far. Can anyone s... | jquery | [5] |
306,128 | 306,129 | How many bytes is unsigned long long? | <p>How many bytes is <code>unsigned long long</code>?
Is it the same as <code>unsigned long long int</code> ?</p>
| c++ | [6] |
4,354,602 | 4,354,603 | Understanding ASP.Net toolbar controls | <p>I am new to ASP.Net and am looking for a resource to describe the asp.net controls in the toolbar. Any ideas and suggestions are greatly apreciated.</p>
| asp.net | [9] |
4,561,451 | 4,561,452 | How to generate a string containing private and public key in PhP? | <p>I saw this code:</p>
<pre><code><?php
class MyEncryption
{
public $pubkey = '...public key here...';
public $privkey = '...private key here...';
public function encrypt($data)
{
if (openssl_public_encrypt($data, $encrypted, $this->pubkey))
$data = base64_encode($encrypted... | php | [2] |
2,533,370 | 2,533,371 | How to Crop a Zoomin image in Android | <p>In my app,user can select image from gallery and after that he can zoom in/ zoom out that image .</p>
<p>After that user wants to save that zoomin/zoom out image.</p>
<p>I dont want the default android crop method.</p>
<p>How to get the zoomed image's current height & width for cropping.</p>
<p>Anybody have ... | android | [4] |
5,244,872 | 5,244,873 | Asp.Net CSS Friendly Menu Adapter | <p>I have used the CSS Friendly menu in one of my projects and have found it great, however I have 2 different areas in the same project and would like to use the CSS Friendly menu in just some of my pages.</p>
<p>How can I prevent all other menus from using the Css Friendly menu dll?</p>
<p>Thank you</p>
<p>Josimar... | asp.net | [9] |
6,029,949 | 6,029,950 | Show/hide an image works only on IE | <p>I have that JavaScript code:</p>
<pre><code> var state = 'hidden';
function Show_Picture()
{
if (state == 'visible')
state = 'hidden';
else
state = 'visible';
document.getElementById('loader').style.visibility = state;
}
</code></pre>
<p>'loader' is t... | javascript | [3] |
4,646,104 | 4,646,105 | Is there a sensible way to refer to application resources (R.string...) in static initializers | <p>Is there a sensible, clean way to refer to application resources from static initalizer code in my android classes.</p>
<p>I would specifically like to define an enum which contains the values of some resource strings in its constants.</p>
<p>Here is some pseudo code for the enum</p>
<pre><code>private enum MyEnu... | android | [4] |
1,249,467 | 1,249,468 | Get name of prototype object | <p>I'm planning on writing a convention over configuration template source engine for KnockoutJS / MVC.
I'm started with a little client side POC and ran into a show stopper right away</p>
<p>My plan is use this syntax or something similar</p>
<pre><code>MyApp.EditCustomersViewModel = function() {
ko.templates.loa... | javascript | [3] |
5,115,353 | 5,115,354 | Capturing a shift+tab keypress in C# | <p>I'm trying to capture shift + tab in c# using the following cpp syntax:</p>
<pre><code>if (GetAsyncKeyState(VK_SHIFT) & 0x8000)
{
// The key is currently down
}
</code></pre>
<p>Can anyone point me to the c# equivalent?</p>
<p>Thanks,
Drew</p>
| c# | [0] |
4,707,688 | 4,707,689 | Reducing CPU Usage while using reading a file | <p>This is the idea, behind my project, playing around with the hashlib modules, when user enters a hash, all uppercase lower case combination are tried to find if a match is found, everything is fine, works great, the only problem Is with the CPU usage, which shoots upto 50%-60%.. Anyhow, is there a way to decrease th... | python | [7] |
5,511,272 | 5,511,273 | Are there any pitfalls in displaying a "No JavaScript" warning in the following fashion? | <p>I have a webpage that has a comment box that can be toggled by clicking a link (the opening and closing of the box is controlled using JavaScript, specifically JQuery). This box is hidden by default, so naturally, it's impossible to display without the use of JavaScript. I'm not concerned by this fact: the comment b... | javascript | [3] |
3,624,092 | 3,624,093 | How to remove the first two BR tags with jquery? | <p>My customer's CMS from the last century outputs the following code.</p>
<p>And I'd like to remove only the first two BR tags with jquery.</p>
<pre><code><div id="system">
<BR CLEAR="ALL"><BR>// I want to remove both BR.
...
<BR>...
...
<BR>
</code></pre>
<p>I assume something like t... | jquery | [5] |
713,305 | 713,306 | Initialise class object by name | <p>Since everything in python is an object, i was wondering if there was a way i could initialise a class object using the name of the class</p>
<p>for example, </p>
<pre><code>class Foo:
"""Class Foo"""
</code></pre>
<p>How could i access this class by "Foo", ie something like <code>c = get_class("Foo")</code><... | python | [7] |
2,182,204 | 2,182,205 | when sending mail via a Intent we are getting bluetooth also in th echooser why? | <p>when sending mails from intent we are calling the intent using such as these <code>codestartActivity(Intent.createChooser(emailIntent, "Send your email in:"))</code>, but we are getting Bluetooth also in the chooser, how to avoid Bluetooth from the chooser.</p>
| android | [4] |
1,043,382 | 1,043,383 | AutoComplete combobox (search anywhere within list, not just first letter ) | <p>I have a combobox that fill with a datatable in form load.</p>
<pre><code>Mycombo.DisplayMember = "FullName";
MyCombo.ValueMember = "ID";
MyCombo.DataSource = MyDattable;
</code></pre>
<p>And set <code>AutoComplateMode</code> to <code>SuggestAppend</code> and <code>AutoComplateMode</code> to List item.</p>
<p>Whe... | c# | [0] |
3,771,712 | 3,771,713 | Android click and touch events not working properly | <p>Actually i have an activity that downloads data from server and that data contains lattitude ,longitude and images of various venues, this images are downloaded from server and shown in listview and on same activity i am showing listview and mapview alternatively , by hiding the listview and mapview respectively.I ... | android | [4] |
1,272,566 | 1,272,567 | How to connect ireports from php | <p>I am developing a web application with PHP and MySQL. Now I am facing problem with selecting the reporting tool. I am developing in Windows XP environment. But the hosting server is Linux. Therefore I have selected iReports as it has Linux version too.</p>
<p>I want at the clicking of a button from front end (which... | php | [2] |
1,869,327 | 1,869,328 | C# Rich text box , add string, output to different textbox | <p>I'm looking for a way to take each item in a rich text box that a user can customize and take those items and put them into a different text box with a string attatched. </p>
<p>for example: the richtextbox would contain and be separated like this: </p>
<pre><code>Sad
Glad
Mad
</code></pre>
<p>The string i w... | c# | [0] |
4,683,172 | 4,683,173 | 2D arrays comparison - nested for loop error | <p>I have the following function which compares the first column value in two 2D arrays.</p>
<pre><code>var new_array = [['EMI_007','lion','cat'],
['EMI_008','cat','dog']
];
var existing_array = [['EMI_002','cat','tiger'],
['EMI_004','hen','pig'],
... | javascript | [3] |
2,765,777 | 2,765,778 | Get Uri of All Images in SDCard in Android | <p>I want to get <strong>URI</strong> or <strong>Path</strong> of all the <strong>Images</strong> of <strong>SDCARD</strong>.</p>
<p>How I can achieve this ?</p>
<p>Thanks.</p>
| android | [4] |
1,234,172 | 1,234,173 | Why do I get a parse error when running this PHP code? | <p>Im new to PHP programming.
I get this error when running the following PHP code to generate a URL.
Im using PHP 5.3.5. </p>
<blockquote>
<p>( ! ) Parse error: syntax error, unexpected
T_CONSTANT_ENCAPSED_STRING, expecting '&' or T_VARIABLE in
C:\wamp\www\test\urlgen.php on line 30</p>
</blockquote>
<p... | php | [2] |
4,086,891 | 4,086,892 | How to convert any audio format to MP3 using C# | <p>I want to play the audio uploaded by the users. The uploaded audio will be in any format.
Is there a way to convert any audio file into mp3 format? </p>
| c# | [0] |
1,724,215 | 1,724,216 | POST a hidden input + multiple options PHP | <p>Hi there I'm quite new to PHP</p>
<p>I have this problem:</p>
<p>I would like to POST a multiple choice + a hidden field from a form:</p>
<pre><code><?php
if (isset($_SESSION['nickname']))
{
$result = mysql_query("SELECT * FROM users");
$teamsCount = ceil(mysql_num_rows($result)/2);
for ($i=1; $i&l... | php | [2] |
4,833,997 | 4,833,998 | Is it necessary temporary variable when allocating ivar used only in that class? | <p>If ivar is used by other classes, I use @property (noatomic, retain) and @synthesize.
And I add it to the view like this. label is ivar.</p>
<pre><code>UILabel *aLabel = [UILabel alloc] initWithFrame:frame];
self.label = aLabel;
[aLabel release];
[self.view addSubview:label];
</code></pre>
<p>But if it is not used... | iphone | [8] |
4,520,034 | 4,520,035 | CSS doesn't affect new items on asp.net web form | <p>I have a web form with a CSS, I'm working on it with visual studio.</p>
<p>Yesterday I edited the CSS and it worked just fine, new fonts, positions, labels, everything works.</p>
<p>Today I decided to add a new label and dropdown box to my web form, and I did some styling for them in the same CSS. In the visual st... | asp.net | [9] |
4,912,826 | 4,912,827 | Send music control keys from my app in android | <p>Is there a simple way to tell the default media player to change track back or forward?</p>
<p>I want the ability to send commands to the system media player (Music) to change track back and forward from within my app.</p>
<p>Is there a simple way? Code examples or descriptive explanation please, I have not develo... | android | [4] |
3,946,557 | 3,946,558 | Session variable Error | <p>I'm not getting value to the session variable. Please have a look at the following code. </p>
<pre><code><?php
session_start();
$uname=$_SESSION['uname'];
include("connection.php");
$qtno=$_POST['qtno'];
$uans=$_POST['answer'];
$query_qt=mysql_query("SELECT * FROM answr WHERE No='$qtno' ");
$info = mysql_fetch_a... | php | [2] |
4,704,230 | 4,704,231 | Browser Display Problem on Motorola Droid Phone | <p>I have the mobile page displayed fine in iPhone with the meta element set.</p>
<p></p>
<p>It also work fine in HTC G1 and G2 phone without the above meta tag.</p>
<p>However, it is totally screwed up when displayed on the HTC Droid phone such as Motorola Droid. </p>
<p>Does anyone know that what parameters I sho... | android | [4] |
919,653 | 919,654 | Handling physical buttons on Android | <p>I'm creating a 2d game for android.I want to handle physical buttons on Android but what i have to do if i will handle these buttons from another class not from Activity.Because i'm using my own screen class based on opengl in my game and i want to handle menu buttons from different screens.</p>
| android | [4] |
4,565,436 | 4,565,437 | access an array of type class which is internal in a public class | <p>I have an internal class </p>
<pre><code>namespace commonNamespace
{
internal class A{}
}
</code></pre>
<p>i have another public class within the same assembly</p>
<pre><code>public class B{}
</code></pre>
<p>I want to declare an array of type A in classB.
ex:</p>
<pre><code>namespace commonNamespace
{
... | c# | [0] |
4,442,479 | 4,442,480 | Passing objects in javascript | <p>I want to pass an object in javascript. But i am getting an error <code>javascript:callbackCredits(1,dotsContainer_credits); is undefined</code></p>
<p>My code is as follows:</p>
<pre><code>var dotSlideCredits = {
show : 3,
width : 430,
functionName : "callbackCredits",
... | javascript | [3] |
1,879,847 | 1,879,848 | How to split a string based on every third character regardless of what the character is in c# | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/105770/net-string-format-to-add-commas-in-thousands-place-for-a-number">.NET String.Format() to add commas in thousands place for a number</a> </p>
</blockquote>
<p>I am trying to add commas to a number for the ... | c# | [0] |
2,665,239 | 2,665,240 | Convert month number to month short name | <p>I have a variable with the following value</p>
<pre><code>$month = 201002;
</code></pre>
<p>the first 4 numbers represent the year, and the last 2 numbers represent the month. I need to get the last 2 numbers in the month string name eg. Feb</p>
<p>My code looks like this</p>
<pre><code><?php echo date('M',s... | php | [2] |
4,685,970 | 4,685,971 | Error resolving getLayoutInflater | <p>While am compiling the program with the below code, an error is occurring. it says getLayoutInflater ( ) is undefined. Could anyone please help me to resolve it asap.</p>
<pre><code> final LayoutInflater inflater = getLayoutInflater ( );
</code></pre>
<p>Thanks in advance.</p>
| android | [4] |
2,305,667 | 2,305,668 | PHP curly string syntax question | <p>I'm running PHP 5.3.0. I've found that the curly string syntax only works when the first character of the expression is <code>$</code>. Is there a way to include other types of expressions (function calls, etc)?</p>
<p>Trivial example:</p>
<pre><code><?php
$x = '05';
echo "{$x}"; // works as expected
echo "{int... | php | [2] |
4,114,105 | 4,114,106 | Maps - difference between satellite and hybrid modes | <p>I can see the difference on Google Maps, but on an Android MapActivity
I'm struggling to find the difference.</p>
<p>For 'map' I call: mapView.setSatellite(false);</p>
<p>For 'satellite' I call: mapView.setSatellite(true);</p>
<p>But for hybrid view... I tried playing with
mapView.setStreetView(true); but this do... | android | [4] |
3,670,047 | 3,670,048 | How do I recursively try different SSH passwords in Python? | <p>We use multiple sets of predefined passwords here for test servers - I would like to try a portable Python SSH library (like the one below - spur.py) and get it to try each one in succession - but obviously stop when it is successfully connected or if it can't - ask me for a password. I'm after some sort of recursio... | python | [7] |
5,609,339 | 5,609,340 | calculate result from a string expression dynamically | <p>Is there a way to calculate the result of a string expression, for example
<code>mystring = "2*a+32-Math.Sin(6)"</code> dynamically knowing that <strong>a</strong> is a variable that I have, may be there is some dynamic solution or using <code>System.Reflection</code></p>
<pre><code>string mystring = "2*a+32-Math.... | c# | [0] |
1,295,045 | 1,295,046 | PNG file won't display in ImageView if source is set programatically | <p>I have a png file in my res/drawable-ldpi folder. I'm working in Eclipse with the emulator, but I've tried this on my 2.2.1 Android phone and I get the same behavior. I have an ImageView and I want to set the src programatically, based on a database call. If I just put </p>
<pre><code>src="@drawable.norusdpyr"
</... | android | [4] |
4,981,255 | 4,981,256 | SetText by Database Column Value | <p>i have a db named: "dbtest.db" , a table named: "mensagens" , a column named: "usuarioorigem".
in my XML file i have a textview and a button, when button is clicked i want to the value of textview change to the value in the column: "usuarioorigem" .</p>
<p>How do i do it? and can you explain how it works.</p>
<p>i... | android | [4] |
1,965,912 | 1,965,913 | Asp.net do you leave the debugging server open while developing? | <p>I'm new to ASP.net but not to C#, .net or Web Development.</p>
<p>In PHP it was nice to be able to go right to the browser and refresh whenever I made a change. Using ASP.net with VS08 however seems a bit awkward.</p>
<p>Should I launch a development server and keep it open, refreshing the browser when I make a ch... | asp.net | [9] |
2,546,745 | 2,546,746 | Convert string date to timestamp in Python | <p>How to convert a string in the format <code>"%d/%m/%Y"</code> to timestamp?</p>
<pre><code>"01/12/2011" -> 1322697600
</code></pre>
| python | [7] |
4,352,187 | 4,352,188 | Gallery adapter (in fragment) misbehaves when Activity instance is destroyed with "Don't keep activities" | <p>I've an activity (<code>FragmentActivity</code>) which instantiates a Fragment onCreate</p>
<pre><code>protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MyFragment fragment = MyFragment.newInstance(rowId); // simply does new MyFragment();
getSupportFra... | android | [4] |
5,741,124 | 5,741,125 | Looking for free online webservice for getting zipcode(/postalcode) from lat, long? | <p>I am Looking for free online webservice for getting zipcode(/postalcode) from lat, long ?</p>
<p>There is one : </p>
<p><a href="http://ws.geonames.org/findNearbyPostalCodesxml?formatted=true&lat=latValue&lng=longValue" rel="nofollow">http://ws.geonames.org/findNearbyPostalCodesxml?formatted=true&lat=l... | iphone | [8] |
4,599,468 | 4,599,469 | jQuery, filtered list using links and a data selector | <p>I have a list that when a link is selected, the div's associated will hide.</p>
<p>First of all, is there an easier way to write the code to make the selector find the data associated to the button pressed? </p>
<p>Secondly, when multiple links are selected and one is clicked again, the list goes back to default.... | jquery | [5] |
4,547,317 | 4,547,318 | I want to "intercept" a delete button press | <p>I would like to "intercept" a delete button press - I believe this is possible with Javascript? I don't know the exact terminology.</p>
<p>Here's my code:</p>
<pre><code><button type="submit" name="del" value=' . stripslashes($cultrow["cult_id"]) . '>Del</button></td>
</code></pre>
<p>I would li... | javascript | [3] |
4,311,061 | 4,311,062 | How to remove space from para in php | <pre><code>$string="This is testing para";
$string_withoue_whitespace=trim($string," ");
</code></pre>
<p>My expcted output is <code>Thisismypara</code> but <strike>whites</strike>paces are not removed. </p>
<p><strong>How can i remove <strike>white</strike> spaces within a paragraph in php</strong></p>
| php | [2] |
5,671,669 | 5,671,670 | C++ converting a float to individual digits | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/339150/extracting-individual-digits-from-a-float">Extracting individual digits from a float</a> </p>
</blockquote>
<p>For part of my program I need to read a number as a float (eg. 123.45) and get each of the in... | c++ | [6] |
5,568,465 | 5,568,466 | .val() not returning correct value | <p>I have the following code that runs on change for a select box:</p>
<pre><code> $('#reg-phone-type').change( function() {
console.dir($(this));
console.log("$(this).val():" + $(this).val());
if( $(this).val == 'work' ) {
// do one thing
} else {
// do something else
}
});
</cod... | jquery | [5] |
4,841,598 | 4,841,599 | How to create a dialog for multiple consecutive entries? | <p>I am currently working on an Android application that can manage a card game. I have (let's say) 4 players and after each round I click a button that opens a dialog to enter the score of the players during this round. How can I achieve this in an opened dialog? I tried several things, for example a ViewFlipper in th... | android | [4] |
699,214 | 699,215 | how to split variable data from string using C# | <p>Could someone please help meto improve this part of code? </p>
<p>The string is something like this: <strong>Current Hourly Price (HOEP): $20.09/MWh (2.01¢/kWh)</strong>. this is one line on website where data of 20.09 and 2. 01 changes within time </p>
<pre><code>static void get_HOEP(string web)
{
int x = web... | c# | [0] |
3,312,785 | 3,312,786 | Java for Beginners | <p>I am familiar with Microsoft technologies. First time I am going to learn Java.Like Visual Studio ,is there any Java GUI IDE is available to compile and run Java programs?</p>
| java | [1] |
4,760,712 | 4,760,713 | PHP scan image in folder and read image property | <p>PHP scan image in folder and read image property.</p>
<p>Folder1:</p>
<pre><code>1.jpg
2.gif
3.jpg
</code></pre>
<p>Property:</p>
<pre><code>title
Description
</code></pre>
<p>I would like to crate PHP code list all images in folder.
I want to display it on browser and want to display image properties such a... | php | [2] |
5,046,372 | 5,046,373 | JS Form validation issue | <p>I am new to JS ! This is my first program. It validates that the text field shouldn't be null. I tried everthing but nothing seems to work.</p>
<pre><code><script type="text/javascript">
var data_age = document.getElementById("ages") ;
function check() {
if (data_age==null) {
aler... | javascript | [3] |
955,130 | 955,131 | What are the best practices for loading javascript with the least amount of impact on display performance of the page? | <p>Is there a way to download javascript without executing it? I want to decrease my page load times so am trying to "lazy load" as much javascript onto the page while the user is idle. However I don't want the javascript to execute, I just want it to be in the browser cache.</p>
<p>Should I use an object tag? I no... | javascript | [3] |
1,887,537 | 1,887,538 | Deep clone an object in java | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2156120/java-recommended-solution-for-deep-cloning-copying-an-instance">Java: recommended solution for deep cloning/copying an instance</a> </p>
</blockquote>
<p>I have an object which has to be cloned. However ... | java | [1] |
4,940,496 | 4,940,497 | "unrecognized selector" within a simple internal call | <p>I would like my custom controller (opened by a UITabBarController) to immediately load a UIImagePickerControllerSourceTypeCamera as soon as it is loaded. To achieve this, I added a method - acquirePhoto() and I'm trying to call it from within the - viewDidLoad() but this is causing the error above.</p>
<p>This is t... | iphone | [8] |
3,956,537 | 3,956,538 | adaptive bitrate in android | <p>Hello
In my android application i would like to shift from 2G or 3G depending on the bitrte available.
Is there any method that i can get the bitrate in android.</p>
<p>Please forward your valuable suggestions.</p>
<p>Thanks i advance :)</p>
| android | [4] |
4,405,189 | 4,405,190 | Date incorrectly interpreted in my string | <p>I have the following javascript code:</p>
<pre><code>var myDate = new Date("10/04/2013");
var d = myDate.getDate();
var m = myDate.getMonth();
var y = myDate.getFullYear();
</code></pre>
<p>When I debug this code I got:</p>
<p>d = 4</p>
<p>m = 9</p>
<p>y = 2013</p>
<p>This is not was I expected. I would like t... | javascript | [3] |
1,989,906 | 1,989,907 | Python RE question - proper state initial formatting | <p>I have a string that I need to edit, it looks something similar to this:</p>
<pre><code>string = "Idaho Ave N,,Crystal,Mn,55427-1463,US,,610839124763,Expedited"
</code></pre>
<p>If you notice the state initial "Mn" is not in proper formatting. I'm trying to use a regular expression to change this:</p>
<pre><code>... | python | [7] |
4,444,826 | 4,444,827 | using callback functions in dialogs | <p>I am using the jQuery dialog. I want to be able to use the script for a single the dialog for more than one use. To do so, I am thinking of assigning some callback function which can be called in the dialog. Is this an appropriate way to do so? What do I need to do to make the below code alert "hi" when the dia... | jquery | [5] |
2,384,207 | 2,384,208 | Building with Ant | <p>I've installed Ant. From an existing Eclipse project I am able to generate the build.xml file from the command line using ant -update project. When I now try ant release I get this error: <code>build.xml:65: java.lang.NullPointerException.</code></p>
<p>This project builds fine under Eclipse. I have no idea where t... | android | [4] |
5,587,123 | 5,587,124 | Android sdk main.out.xml parsing error | <p>I just started a new Android project, helloword" to continue learning Android development and I got stumped compiling the default 'helloword' compile / run. I think that I missed a step in configuration and setup, but I am at a loss to find out where. I have an AVD configured, set and launched.</p>
<p>When I press ... | android | [4] |
2,654,774 | 2,654,775 | Why does the Void wrapper class exists in the JDK? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/643906/uses-for-the-java-void-reference-type">Uses for the Java Void Reference Type?</a> </p>
</blockquote>
<p>What is the real usage of Void class in real world problems? In which scenario can we use this class... | java | [1] |
946,275 | 946,276 | Questions re deciding what version of Android to target in 2013 | <p>I'm an experienced Java programmer but new to Android. Two basic questions:</p>
<ul>
<li>as of now (i.e. let's say, an app to be released early 2013), what Android version should one be thinking of targeting to cover a reasonable majority of devices? Has this changed, for example, from the <a href="http://stackover... | android | [4] |
4,530,824 | 4,530,825 | Javascript: Hijack Copy? | <p>I was just reading the Times online and I wanted to copy a bit of text from the article and IM it to a friend, but I noticed when I did so, it automatically appended the link back to the article in what I had copied. </p>
<p>This is not a feature of my IM client, so I assume this happened because of some javascrip... | javascript | [3] |
4,417,161 | 4,417,162 | Get event of Home button | <p>My requirement is that when user clicks the home button at any screen in application, he is redirected to device home screen and when he comes back to the application he will redirect to app home screen rather than at screen where he pressed the home button.</p>
<p>Any help would be appreciaed. </p>
| android | [4] |
21,228 | 21,229 | Parse_url and remove slash only on first folder only? | <p>PHP dummy here. <br/><br/>Let's say that I have my domain like this:<code>http://www.domain.com/somefolder/index.html</code> so now i need to make it like <b>this</b> :<code>somefolder/index.html</code></p>
<p>In order to do so I am using following code:</p>
<pre><code><?php $urlparts = parse_url("http://www.do... | php | [2] |
4,761,840 | 4,761,841 | Javascript: Could not really understand the function return | <p>It is maybe incredibly easy but I couldn't solve what was going on.</p>
<pre><code>
function doSomething(a)
{
var num=10;
return setTimeout(
function(){ a(num); }, 1000);
}
</code></pre>
<p>The only thing that actually confuses me is the <b>a(num)</b> part. What actually it does?<br/><b>Reminder: </b> I r... | javascript | [3] |
3,331,337 | 3,331,338 | Convert two dimensional array to List in java? | <p>I have a<code>m X n</code> two dimensional array of an Object say <code>Foo</code>. So I have <code>Foo[][] foosArray</code>. What is the best way to convert this into a <code>List<Foo></code> in Java?</p>
| java | [1] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.