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,120,354 | 2,120,355 | Can't process list of dicts against list of strings | <pre><code>d = ['X + Y = Z', 'X <=Y']
p = [{'Y': 1, 'X': 0, 'Z': 0}, {'Y': 1, 'X': 0, 'Z': 3}, {'Y': 1, 'X': 0, 'Z': 6}, {'Y': 1, 'X': 0, 'Z': 9}, {'Y': 1, 'X': 1, 'Z': 0}, {'Y': 1, 'X': 1, 'Z': 3}]
</code></pre>
<p>I need to create create some structure which would store List of expressions, where variables are ch... | python | [7] |
5,681,645 | 5,681,646 | New ASTRO File Manager (Android) broken with ACTION_GET_CONTENT? | <p>UPDATED: the successive version of ASTRO File Manager (Android) works again with ACTION_GET_CONTENT!</p>
<hr>
<p>Did anyone notice that the new version of ASTRO File Manager (Android) is broken with ACTION_GET_CONTENT?</p>
<p>This code used to work well to choose a zipfile with previous versions of ASTRO File Ma... | android | [4] |
5,904,924 | 5,904,925 | Javascript loading clients local media | <p>This is new to me since I did something similar a few years back:</p>
<pre><code><input type="file" onchange="fileSelected(this.value)" />
</code></pre>
<p>This will provide a fakepath reference, IE, if I select <code>test.jpg</code> on my desktop it returns:</p>
<pre><code>c:/fakepath/test.jpg
</code></pre... | javascript | [3] |
1,645,430 | 1,645,431 | Why this code could work | <p>I just found out this code actually work. I wonder why. row and col are both variables. I was trying to dynamically allocate a 2D vector. Could someone explain this? Thanks!</p>
<p>row and col are both "int"</p>
<pre><code>grid_ = new vector<vector<bool> > (row, col);
</code></pre>
| c++ | [6] |
1,859,721 | 1,859,722 | access object through dot-syntax string path | <p>How can I access <code>myobject[path][to][obj]</code> via a string <code>path.to.obj</code>? I want to call a function <code>Settings.write('path.to.setting', 'settingValue')</code> which would write <code>'settingValue'</code> to <code>settingObj[path][to][setting]</code>. How can I do this without <code>eval()</co... | javascript | [3] |
5,725,419 | 5,725,420 | Creating a connection object in Python | <p>In a Python software I am working on, I have a number of objects that need to be able to be 'connected' to other objects (the term connected here referring to the fact that it just needs to point to the object it is connected to).</p>
<p>I have thought to create an connection class, which can create this link and s... | python | [7] |
3,276,363 | 3,276,364 | Comparing two strings within if statement | <p>I have the following code:</p>
<pre><code>String tmp = "cif";
String control = tmp.substring(1);
if(control == "if") {
append = "if( ";
}
</code></pre>
<p>However, despite control being "if", the test will still fail. Any solutions?</p>
| java | [1] |
2,784,401 | 2,784,402 | PHP Send Mail Alternative | <p>I know PHPMailer and I'm using this but I have some user groups and send multiple emails to multiple groups, so at this time it runs too slow. Is there any other way or any third party tools? Is there any library?
thanks in advance</p>
| php | [2] |
3,719,947 | 3,719,948 | Get selector in event handler | <p>I answered <a href="http://stackoverflow.com/questions/6469116/asp-net-checkbox/6469251#6469251">this question</a> with this jQuery code:</p>
<pre><code>$('input[type="checkbox"][name$="chkSelect"]').click(function() {
$('input[type="checkbox"][name$="chkSelect"]').not(this).prop("checked", false);
});
</code></p... | jquery | [5] |
5,788,514 | 5,788,515 | If Yes button of Dialog box is clicked, run program again | <p>I'm writing a grade calculator, and at the end, I ask the user if they have another grade to calculate.</p>
<pre><code> Console.Write("Do you have another grade to calculate? ");
moreGradesToCalculate = Console.ReadLine();
moreGradesToCalculate = moreGradesToCalculate.ToUpper();
</code></pre>
<p>I... | c# | [0] |
25,545 | 25,546 | Using jquery .load without a delay | <p>I create div place holders in my html and store the url for fetching on the rel attribute, some of these urls are slower to load</p>
<p>when using the folowing code, the each loop waits for each load function to be done before moving along to the next one which make an html with 5 placeholders load pretty slow:</p>... | jquery | [5] |
1,580,069 | 1,580,070 | Basic ImageButton onClick event not firing - surely something simple? | <p>I'm trying to get a simple onClick to fire from an ImageButton - it seems like a simple enough task, but I'm obviously missing something here.</p>
<p>Here is my java file:</p>
<pre><code>package com.jlbeard.android.testapp;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
im... | android | [4] |
1,469,342 | 1,469,343 | Can i use adapter for dialogs? | <p>I have some data that i want to show them in different dialogs with the same layout.Can i use an adapter like simpleCursorAdapter?</p>
<pre><code>entry.open();
Cursor cursor = entry.getData();
startManagingCursor(cursor);
Dialog dialog = new Dialog(this);
dialog.requ... | android | [4] |
4,371,915 | 4,371,916 | Read Windows 7 Registry c# | <p>Need to obtain following path from the registry:</p>
<p>%userprofile%</p>
| c# | [0] |
388,710 | 388,711 | Looping each() loop infinitely | <p>I am using jQuery to loop through each li element under a ul displaying them one by one. Here is the code:</p>
<pre><code> $('.article_ticker li:first').siblings().hide();
var list=$('.article_ticker li:first').siblings();
list.each(function(index)
{
$(this).siblings().hide().delay(2000).fadeOut();
... | jquery | [5] |
4,444,055 | 4,444,056 | Split screen in two | <p>I am trying to split my layout into two halves.When I try layout_weight,in splits it into two horizontal halves.How do i split the layout into two vertical halves.</p>
<pre><code> <?xml version="1.0" encoding="utf-8"?>
</code></pre>
<p>
<pre><code>android:id="@+id/linearLayout123" android:layout_w... | android | [4] |
3,837,390 | 3,837,391 | Android: Sharing webview across activites | <p>Is it possible to share a same webview object in two different activities in android ? Here is my use case. I have an Activity A that has a webview W. W occupies 50% of A. Now When I click on Webview W, in activity A, I want to launch Activity B with whole of it occupying webview W. In acitivity B, I do not want web... | android | [4] |
2,415,006 | 2,415,007 | Load an activity in the background before displaying it | <p>Is it possible to load a new activity in the background before switching the view to that activity?</p>
<p>For example, I would like to have a slash screen activity that gets called and displays a splash screen. While this splash screen is displayed, the next activity is loaded, and when it is done loading (when it... | android | [4] |
5,579,619 | 5,579,620 | Exec command doesn't work as expected | <p>I'm trying to launch a CLI command from a PHP script:</p>
<p>in particular I wanna use this command <code>convert a.png a.tif</code> to convert an image to tiff.</p>
<p>When I launch this command from CLI it works as expected but if I launch from a PHP script with the following code it doesn't create any tiff imag... | php | [2] |
161,857 | 161,858 | What actually does this javascript snippet mean? | <p>From <a href="http://html5boilerplate.com/mobile" rel="nofollow">HTML5 Mobile Boilerplate's</a> helper.js:</p>
<pre><code>(function(document){
//all stuff here
})(document);
</code></pre>
<p>What does this snippet do or when does it run?</p>
| javascript | [3] |
5,205,070 | 5,205,071 | Arraylist remove elements | <p>I have a java code where i have an ArrayList and want to remove element from the arraylist.</p>
<pre><code> ArrayList <word> wordlist=new ArrayList<>();
public void removeWord(String inputWord){
for(word z:wordlist){
if(z.getWord() == inputWord)
... | java | [1] |
2,626,792 | 2,626,793 | what is intel x86 atom system image in android sdk manager? | <p>I am new to android development. I am setting up development environment.
So my question is, what is intel x86 atom system image in android sdk manager?
Should i install it or not?
the option is present in api level 15 & 16 but not in 17.</p>
<p>Thanks.</p>
| android | [4] |
3,818,024 | 3,818,025 | use CursorLoader with PagerAdapter in android | <p>Could i use <code>CursorLoader</code> with <code>PagerAdapter</code> in android if yes How to integrate them ? article , code snippet or hints to help me do this ? if no is there a workaround this ? </p>
| android | [4] |
2,911,138 | 2,911,139 | HTTP Live Streaming in iPhone | <p>I am using <code>MPMoviePlayerController</code> to stream http video files from web.
But am getting error and the video is not streaming.</p>
<p>Can I get any help for this?</p>
<pre><code>-(IBAction)play
{
NSString *urlString = [NSString stringWithFormat:@"<html><head><title>HTTP Live S... | iphone | [8] |
5,223,522 | 5,223,523 | Best idiom for a decrementing loop | <p>What's the best/preferred idiom for a decrementing for loop, and why?</p>
<pre><code>for(int idx=(len-1); idx>=0; idx--) {...}
</code></pre>
<p>or</p>
<pre><code>for(int idx=(len-1); idx>-1; idx--) {...}
</code></pre>
<p>or (based on sylvarking's answer, but using for to constrain the index scope)</p>
<pr... | java | [1] |
4,556,240 | 4,556,241 | Music in Webview Activity kill when press back button to home activity | <p>I am coding the play mp3(Flash Embedded) in WebView(Second Activity), I can play the music in WebView as usually, but when I press back buttom to First Activity the music in Second Activity in WebView still playing, then I go to Second Activity again in WebView to stop the music but it's appear the new mp3 play list... | android | [4] |
3,462,174 | 3,462,175 | alias name should be same or not for updating app in android market? | <p>i had launched one app in android market and now i going to release next version.
i came to know that for updating the app i want to use same keystore and same password.
now i getting doubt about my alias name .
which one is better for updating my application in android market , whether i have to use same alias nam... | android | [4] |
701,840 | 701,841 | Using a 64bit DLL wiht 32 Borland C++ Builder | <p>I need to make a "data pool" of more than 4GB data, organized as 2 dimensional data arrays:</p>
<p>I have a 50 forms application made in 32bit CodeGear 2009 C++ Builder with many third party VCL components - thus not really an option right now to migrate to Visual Studio 2010 ( for now ). </p>
<p>The idea is to us... | c++ | [6] |
4,427,541 | 4,427,542 | A pointer to function in c++ | <p>When I did something with pointer to function I noticed something and didn't understand</p>
<p>I did this:</p>
<pre><code>#include <stdio.h>
int callback(void)
{
return 5;
}
void call(int (*cpmpare)(void))
{
int x;
x = cpmpare();
printf("%d", x);
}
void main()
{
int (*compare)(void);
... | c++ | [6] |
4,939,850 | 4,939,851 | C# App exit as expected, but why Windows 7 shows "This program has stop working" | <p>I wrote a C# App. The app exit while click on the Exit button.
The app close as expected, but why Windows 7 shows "This program has stop working", and windows 7 is trying to gather error information? The exit button is purposely designed to stop the app from working.</p>
<p>anyone has any clue, thanks.</p>
<hr>
<... | c# | [0] |
5,680,537 | 5,680,538 | How is it that I can add properties to a closure in anonymous self executing function? | <p>why is it that when I do this:</p>
<pre><code>x = 5
(function bla(varX){
varX = 7; console.log(x); //7
})(x);
console.log(x); //5
</code></pre>
<p>the <code>x</code> doesn't change, since it's in a closure if I understand correctly,
but here:</p>
<pre><code>x = {a:5}
(function bla(varX){
varX.a = 7; cons... | javascript | [3] |
4,920,391 | 4,920,392 | Disabling all controls until the thread finishes executing | <p>Once i launch a win forms application, i create a background worker to do some initialization. While this initialization happens, i want all the buttons in the form to stay disabled. </p>
<p>I was thinking whats the best way to do this. One straightforward approach i could think of is setting a flag in the thread's... | c# | [0] |
5,640,970 | 5,640,971 | Get all elements without child node in jQuery | <p>I need to select elements without child node (including text since in <code><p></code> a text is a child node). </p>
<p>I used <code>empty</code>, but it also consider space as child node.</p>
<p><strong>Example:</strong> </p>
<p>Markup:</p>
<pre><code> <span> </span>
<span></span&... | jquery | [5] |
1,722,071 | 1,722,072 | C# Program to get modified date from URL directory | <p>I am fairly new to C# and was hoping for some assistance. I currently use Visual Studio 2008. What I am wanting to do is the following:</p>
<p>I have a server (\backupserv) that runs a RoboCopy script nightly to backup directories from 18 other servers. These directories are then copied down to \backup in directori... | c# | [0] |
4,008,901 | 4,008,902 | HorizontalScrollView not scrolling on 1.5 API phones | <p>My main view is a <code>relativeView</code>. inside the <code>relativeView</code> I have a <code>HorizontalScrollView</code> which holds a <code>Linearlayout</code> with a bunch of buttons. On a 1.5 API phone the <code>HorizontalScrollView</code> does not scroll and I don't see all the buttons in the <code>LinearL... | android | [4] |
639,857 | 639,858 | Show relative time that changes to default date after Midnight | <p>I would like to show "posted Today at" if the posted was posted today, and I know how to do that, but I would like it to show the default date and time format as of 12:01am, obviously because ita no longer posted "today", is there a way I can do this? Thanks for the help.</p>
<hr>
<p>Thanks, I'll try that, here is... | php | [2] |
1,197,580 | 1,197,581 | how to create a cursor with SQL Query if my table created also in SQL Query | <p>I have a problem, i created a table like this. </p>
<p>private static final String TABLE_CREATE ="CREATE TABLE IF NOT EXISTS alarm(REQ_CODE INT(3),HOUR INT(3),MINUTE INT(3),COUNT INT(3),REPEAT INT(3),DAYS VARCHAR2(100),SUN INT(3),MON INT(3),TUE INT(3),WED INT(3),THU INT(3),FRI INT(3),SAT INT(3));";</p>
<p>A i inse... | android | [4] |
3,560,542 | 3,560,543 | jquery and 'innerHTML' wrapper | <p>hello<br>
have a next question:<br>
i.g. we have next html with structure: </p>
<pre><code><html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(doc... | jquery | [5] |
4,086,078 | 4,086,079 | PHP pagination: is_dir is truncating images when looping through readdir | <p>I just got pagination to work on my site, but I wanted to use a thumbnailer script that accepts a path, not a resource. This conflicts with how I pagination- using readdir to scan for a resource.</p>
<p>Right now I'm implementing a skip pattern I found online to keep track of images and their corresponding page num... | php | [2] |
2,777,585 | 2,777,586 | In C#, how do you create methods that append to variables? | <p>I've searched around for the answer to this many times, but I don't know what this type of method is called, so my searches ended up useless, nor can I explain it to the search engine.</p>
<p>How do you make a method that uses the variable it is appended to as it's parameter (like "myVariable**.ToString()**)?"</p>
... | c# | [0] |
1,284,167 | 1,284,168 | What is meant by metadata in android? | <p>When you start a drag, you include both the data you are moving and metadata describing this data as part of the call to the system,the following explanation was found in android developers site</p>
<p>here,What is meant by metadata in android?</p>
| android | [4] |
2,067,686 | 2,067,687 | Response.BinaryWrite Div | <p>Is there a way to write PDF to a div from DataBase i.e. Retrieve a Byte[] from Database and Reponse.BinaryWrite to a div.</p>
<p>We do similar thing for Images using src = "anotherpage.aspx" where image is written on anotherpage.</p>
<p>Is it possible with PDF without using IFrame?</p>
| asp.net | [9] |
4,839,549 | 4,839,550 | switch on wifi in emulator | <p>I'm doing project on android chat application with both friends and anonymous. we finished with the design phase. now we need to create a network between two emulators present in two system so that we can do chat in two different systems. But in emulator wifi is not getting turned on. I tried with the F8 button stil... | android | [4] |
3,367,362 | 3,367,363 | A question regarding to the state maintainance | <p>If i have total 10 views such as from 1 to 2, 2 to 3,and same as upto 10</p>
<p>if i go to 5 th view,then i press home button and then i go to another application and then after doing some task ,i go to home button and then i press my application my 1 st view opens b... | iphone | [8] |
1,833,495 | 1,833,496 | read and write in java | <p>I want print in the file every time line
But every time i want print a new line printed on the same line the old.</p>
<p>I want to print lines in the file </p>
<p>This my code</p>
<pre><code>BufferedReader read = new BufferedReader(new FileReader (SecurityScreen.path.get("ScoreFile")));
FileWriter file ;
Buffered... | java | [1] |
2,050,640 | 2,050,641 | How to get diffreence between GMT time and any time zone in C++ | <p>I want a soultion in C++ to get hours diffreence between GMT time and any time zone.
e.g.
This is in Java I want to make in C++</p>
<pre><code>// New York
Calendar c = new GregorianCalendar(TimeZone.getTimeZone("America/New_York"));
// Alaska
c = new GregorianCalendar(TimeZone.getTimeZone("America/Anchorage"))... | c++ | [6] |
210,955 | 210,956 | Binding public variable of a class to repeater | <p>I am trying to bind a public variable of a class to reapeater, but it says </p>
<blockquote>
<p>DataBinding: 'Class Name' does not contain a property with the name 'id'.</p>
</blockquote>
<p>So its obvious that repeater is trying to find properties in my class which does not exits as all are public variable.</p>... | asp.net | [9] |
4,606,828 | 4,606,829 | form should not appear after the 30 button_click | <p>*<em>strong text</em>*I Have a doubt</p>
<p>i have created an application in VS2010 for windows application </p>
<p>i have used form1 in form1 i used a button, onclicking on to the button it will load a second form ie.. form2 in which image is added </p>
<p>the overall situation is when i execute the application ... | c# | [0] |
281,976 | 281,977 | Add events to controls added dynamically | <p>I am working on winform app. and I have added some controls dynamicaly eg. <code>Button</code> now i want to add an event to that created button, how can i perform this? also can some one refer a <code>C#</code> book to me which has covered well all topics in winform? thanks.</p>
| c# | [0] |
2,802,029 | 2,802,030 | How to maintain a Unique List in Java? | <p>How to create a Unique List in Java. </p>
<p>Right now I am using <code>HashMap<String, Integer></code> to do this as the key is overwritten and hence at the end we can get <code>HashMap.getKeySet()</code> which would be unique. But I am sure there should be a better way to do this as the value part is waste... | java | [1] |
3,613,104 | 3,613,105 | how to use inline javascript code to auto center pop up window | <p>I have a in line javascript used in AJAX, would like to auto center when open, but make the change in the inline scriprt only. Is that possible? Here's my code:</p>
<pre><code><a href='javascript:void(0)' title='owner' onclick=\"window.open('owner.html','owner','height=320, width=300,location=no,scrollbars=yes')... | javascript | [3] |
2,971,587 | 2,971,588 | Is hashCode() used any where? | <p>Does anyone use <code>hashCode()</code> anywhere?</p>
<p>Can anyone give me an example of the exact use of hashcode and in which cases we need to implement it?
<strong>Any specific area where HashCode is being used?</strong></p>
| java | [1] |
2,852,524 | 2,852,525 | Adding annotations to a map from custom contacts group | <p>How can I add annotations of all the contacts in my custom group, in a mapview.</p>
| iphone | [8] |
3,745,348 | 3,745,349 | c# string replace with backslash buggy? | <p>I have the following string:</p>
<pre><code> "\\\\AAA.AA.A.AA\\d$\\ivr\\vm\\2012May\\29\\10231_1723221348.vox"
</code></pre>
<p>I would like it to look like:</p>
<pre><code>"\\AAA.AA.A.AA\d$\ivr\vm\2012May\29\10231_1723221348.vox"
</code></pre>
<p>I have tried</p>
<pre><code>fileToConvert.Replace(@"\\",@"\")
</... | c# | [0] |
3,943,140 | 3,943,141 | How do I access a c# variable's value in an .aspx page? | <p>The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). </p>
<p>we need to access the c# variable in .aspx page at the time we have problem</p>
<p>Please guide us?</p>
| asp.net | [9] |
514,939 | 514,940 | Pattern to create polymorphic objects with dependency constraint | <p>First, my structure :</p>
<p>AbstractObject<br>
--ObjectA<br>
--ObjectB</p>
<p>AbstractOtherObject<br>
--OtherObjectA<br>
--OtherObjectB</p>
<p>With polymorphism, I want to create an <code>AbstractOtherObject</code> based on my <code>AbstractObject</code>. More precisely, I want an <code>OtherObjectA</code> if it... | java | [1] |
1,969,332 | 1,969,333 | static_cast with bounded types | <p>When you cast an int in short with a classic static_cast (or c cast), if the value is out of the short limits, the compiler will truncat the int.</p>
<p>For example:</p>
<pre><code>int i = 70000;
short s = static_cast<short>(i);
std::cout << "s=" << s << std::endl;
</code></pre>
<p>Will di... | c++ | [6] |
192,660 | 192,661 | Android Audio record | <p>I want to know that how to record our voice and playback using AudioRecord functionality in android instead of MediaRecorder.</p>
<p>Please give me sample code or url.
Thanks in advance</p>
| android | [4] |
5,308,217 | 5,308,218 | Jquery - hide() then fadeIn() then fadeOut() is there a cleaner way? | <p>I'm trying to achieve some animation using jQuery. I have it working but I'm 100% sure there is a cleaner better way of doing and I'm hoping someone can point me in the right direction.</p>
<p>Here is my code:</p>
<pre><code>$(document).ready(function () {
$("#1-popup").hide(); // Hides the first popup
... | jquery | [5] |
5,411,146 | 5,411,147 | Call Base class fun() in using "this" keyword (when a derived class is presen) | <p>I have the following code snippet</p>
<pre><code>Class Parent
{
public override String ToString()
{
return "in Parent";
}
public virtual void printer()
{
Console.write(this.ToString());
}
}
Class Child : Parent
{
public override String ToString()
{
... | c# | [0] |
5,395,958 | 5,395,959 | How to switch between CSS files using external Javascript | <p>I'm working on a website for my Web Design coursework and I'm writing both CSS scripts that will format the site for either a desktop browser or a mobile one, depending on whether the appropriate useragent is detected. I'm able to detect the presence of a mobile browser easily enough and the default CSS is desktop, ... | javascript | [3] |
777,771 | 777,772 | How can i redirect a php page to another php page ? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4864522/how-to-redirect-users-to-another-page">How to redirect users to another page?</a> </p>
</blockquote>
<p>I'm a beginner in the programming field....I want to redirect a php page to another one..How is it ... | php | [2] |
951,761 | 951,762 | how to assign the hover to 2 elements | <p>I am trying to assign hover event to 2 elements at the same time. Are there better ways to do this?</p>
<pre><code>//I want to assign hover to another element.
$element1=$('hi');
$element2=$('hi2');
//I need to assign element 1 and element 2 to the same hover function...
$element1.hover(function(e){
... | jquery | [5] |
1,543,841 | 1,543,842 | Mantaining dropdown.. Script is so long? | <p>I've read that using session is one way to retain the values from PHP submit failure. The data is wiped out as soon as you send the form to the server so to get back the data, a session should be use. I have a dropdown that is a list of country. It contains more than 60-80 countries. I used the ternary condition to ... | php | [2] |
4,541,523 | 4,541,524 | Memory wise, is storing a string as byte cheaper than its UTF equivalent? | <p>If I store a string as a byte, does it use less memory than if it was stored in UTF-8?</p>
<p>e.g.</p>
<pre><code>string text = "Hello, World!";
</code></pre>
<p>Versus encoding it into a byte variable?</p>
| c# | [0] |
247,069 | 247,070 | Worst PHP practice found in your experience? | <p>What are the worst practices found in PHP code?</p>
<p>Some examples:</p>
<ul>
<li>Use of $array[reference] without single quotes</li>
<li>Instance "hidden" variables into inclusion files, which are needed later</li>
<li>Lots of recursive inclusion not using "_once" functions</li>
</ul>
<p><em>Note</em>: maybe su... | php | [2] |
4,580,682 | 4,580,683 | append data in serialized array with php | <p>I am writing a php script for creating serialized array as follow:</p>
<pre><code>$x=Array();
$x[0]=$_GET['fname'];
$x[1]=$_GET['lname'];
$str=serialize($x);
print $str;
$y=$_GET['hf'];
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
... | php | [2] |
2,892,449 | 2,892,450 | String comparison in java | <p>I take a string from an array that stores strings. Then I print it for check and see that is this that i want. When I compare it with the string that it suppose to be I get error.
When I print bString it is "root"!!! When I compare it is not! </p>
<pre><code>System.out.println(aString);
if (aString.equals("root")) ... | java | [1] |
194,508 | 194,509 | PHP - Printing out values of arrays inside arrays | <p>I have a system that inputs multiple images via a backend script ... i want to be able to echo out the images into a list on the frontend so i can manipulate them.</p>
<p>Im not exactly sure how i would do this using a loop.</p>
<p>In my PHP im viewing the contents of the array using the following:</p>
<pre><code... | php | [2] |
600,672 | 600,673 | jQuery kill link if li has children | <p>Given the following structure:</p>
<pre><code><ul>
<li><a href="example.com>1</a></li>
<li><a href="example.com>2</a></li>
<li><a href="example.com>3</a>
<ul>
<li><a href="example.com">3.1</a... | jquery | [5] |
144,261 | 144,262 | iPhone:How to get window frame in UIInterfaceOrientationLandscapeLeft or Right? | <p>I want to get exactly window frame with x,y,width and height position in <code>UIInterfaceOrientationLandscapeLeft</code>, <code>UIInterfaceOrientationLandscapeRight</code>, <code>UIInterfaceOrientationPortraitUpsideDown</code> and <code>UIInterfaceOrientationPortrait</code>.</p>
<p>Please give me any link or any i... | iphone | [8] |
750,237 | 750,238 | aspnet command line tools location | <p>Microsoft provides a number of command line tools for working with asp.net applications. I haven't had any trouble using these tools. One thing that I can not understand though, is the location of these tools.</p>
<p>Even for applications targeting newer versions of .net, these tools are located in the .net v2 di... | asp.net | [9] |
4,736,293 | 4,736,294 | Maintain count in python list comprehension | <p>In Python, is there any <code>counter</code> available during the list comprehension as it would be in case of a <code>for</code> loop?</p>
<p>It would be more clear why I need a counter, with this example:</p>
<p>I wish to achieve the following:</p>
<p>Initial List: <code>['p', 'q', 'r', 's']</code></p>
<p>Desi... | python | [7] |
3,392,063 | 3,392,064 | How to get all the li in javascript? | <pre><code><ul id="tab">
<li onclick="clicker()" class="li01">one test</li>
<li onclick="clicker()" class="li02">two test</li>
<li onclick="clicker()" class="li03">three test</li>
<div class="web_clear"></div>
</ul>
<div class="web_index">... | javascript | [3] |
3,382,163 | 3,382,164 | How to use JQuery to highlight a checkobx when it is checked | <p>I am trying to use JQuery to highlight the checkboxes checked by a user,<br/>
and when they will be un-highlighted when the user unchecked those checkoxes.<br/></p>
<p>But how is it possible to do this effect?</p>
| jquery | [5] |
5,007,686 | 5,007,687 | Why is the Process.GetProcessesByName() always null? | <p>I try to use program to check the process if it exists.</p>
<pre><code>using System;
using System.Diagnostics;
using System.ServiceProcess;
namespace ServProInfo
{
class Program
{
public static int IfProcessExist(string processName)
{
try
{
Process[] t... | c# | [0] |
2,879,062 | 2,879,063 | jQuery Event for link click not firing | <p>I have the following function:</p>
<pre><code> $("a#mylink").click(function(e){
e.preventDefault();
$.ajax({ url: $(this).attr("href") });
$(this).parent().parent().fadeOut("slow");
});
</code></pre>
<p>A link is being created on the page with the following code:</p... | jquery | [5] |
2,099,125 | 2,099,126 | Basic Python repetition exercise | <p>I was trying to learn Python when I came upon this question. I am not asking for you to answer the question for me, I just need some help. <strong>Note: I am only allowed to use loops and if statements etc. Nothing ahead.</strong> I don't understand where I can use loops to create this program or the formulas needed... | python | [7] |
434,119 | 434,120 | google.ads.AdView not take the full width of screen in samsung galaxy notes | <p>Actually i am displaying an google.ads.AdView in my app at the bottom of the screen..All works fine. But the only problem is that it doesn't take the full width of the screen while showing in samsung galaxy notes, however while displaying in nexus s it take the full width of the screen.</p>
<p>Why this happen, is t... | android | [4] |
4,690,697 | 4,690,698 | Android development: How to find out which applications are currently accessing the internet? | <p>Is there any method that can help me track internet usage by application? I need to find out which app is using Internet at the moment.</p>
<p>I've managed to get all applications with INTERNET permission but I don't know how to get only those applications that are connected to internet.</p>
<pre><code>for(int i=0... | android | [4] |
4,832,969 | 4,832,970 | How do I unpack a list with fewer variables? | <pre><code>k = [u'query_urls', u'"kick"', u'"00"', u'msg=1212', u'id=11']
>>> name, view, id, tokens = k
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: too many values to unpack
</code></pre>
<p>I need to provide 5 variables to unpack this list. Is there a wa... | python | [7] |
3,826,665 | 3,826,666 | Is it possible in Android to create a view that overlaps the actionbar? | <p>I have created a menu out of a tablelayout. When activated, the menu will animate over the background view, until it covers the whole window.</p>
<p>I would like for this menu to also overlap the actionbar, when the menu is visible. My question is, is it possible to have a view overlap the action bar container? If ... | android | [4] |
3,231,928 | 3,231,929 | How to test input value for null or zero with jQuery | <p>I need to keep the focus on the text input when the user moves to the next input without putting something in the previous one. In short, if it is null (left blank) or not valid, how do I keep the focus on that input until the conditions are satisfied?</p>
| jquery | [5] |
5,506,235 | 5,506,236 | Override image constructor in JS? | <p>Is it possible to override the <code>Image</code> constructor in JS? So that, for example, every time a <code>new Image()</code> is created, a message is written to the console?</p>
| javascript | [3] |
1,765,816 | 1,765,817 | Multidimensional Associative array email check | <p>I have an array multidimensional associative array.</p>
<pre><code>Array
(
[0] => Array
(
[username] => uname1
[name] => fullname1
[email] => uname1@email.com
)
[1] => Array
(
[username] => uname2
[name] => f... | php | [2] |
5,498,541 | 5,498,542 | unable to view graphical layout while doing android application | <p>i am new to android application..i am developing a application but i am unable to view graphical layout.It is showing empty.Some of my asked to open with android layout editor.Even though i open with androidlayouteditor it is not showing any graphical representation.Please help me.</p>
<p>thanks and regards,
pradee... | android | [4] |
328,743 | 328,744 | set android alarm at specific time | <p>i set the alarm at specific time but every time i open the application it will turn on
this is the code i used :</p>
<pre><code> AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(this, AlarmReceiver.class);
PendingIntent pendingIntent = Pendin... | android | [4] |
1,654,705 | 1,654,706 | How to identify a PHP variable is an array or not | <p>How to check whether the PHP variable is an array?
$value is my PHP variable and how to check whether it is an array?</p>
| php | [2] |
832,576 | 832,577 | how to make condition on selection of checkbox in user controler | <p>I have a user control </p>
<pre><code><input id="check" type="checkbox" />
<label>&nbsp;</label>
<fieldset class="clearfix" id="fieldset-exception">
<legend>Student Information</legend>
<div class="fiveper">
<label for="StudentID">
... | jquery | [5] |
5,338,327 | 5,338,328 | How would I check a string for a certain letter in Python? | <p>How would I tell Python to check the below for the letter x and then print "Yes"? The below is what I have so far...</p>
<pre><code>dog = "xdasds"
if "x" is in dog:
print "Yes!"
</code></pre>
| python | [7] |
5,696,802 | 5,696,803 | Which jQuery attribute do I need to use to find specific text? | <p>I'm trying to target the <code>a</code> tags that contain the html <code>next &raquo;</code> and add a class to that tag. I have tried using jQuery's <code>contains</code> but obviously it didn't work since I'm here. </p>
<pre><code>$('a').contains('next &raquo;').addClass('next');
</code></pre>
<p>Which a... | jquery | [5] |
3,717,392 | 3,717,393 | get list of files in order of creation | <p>i am currently reading in a list of files from different directories into a LIST:</p>
<pre><code>public List<string> MapMyFiles()
{
List<string> batchaddresses = new List<string>();
foreach (object o in lstViewAddresses.Items)
{
try
... | c# | [0] |
5,162,736 | 5,162,737 | Different constants in android projects that have same code base(library project) | <p>I have an android library project.
Two projects-A and B are using that library project code.</p>
<p>I have this code in the shared android library project
RequestAdFromAdmob(constantAdId)</p>
<p>I wish to use a different ad id for project A and project B, so what is the best practice to do it?</p>
<p>Thanks</p>
| android | [4] |
4,351,722 | 4,351,723 | Any php code to detect the browser with version and operating system? | <p>I tried to search in google but cannot find a complete solution (i only find something detects only the browser's type like firefox, opera) .</p>
<p>i want a php class or code to check the user's Browser including the <strong>version</strong> and also the operating system. </p>
<p>Thanks</p>
| php | [2] |
1,670,753 | 1,670,754 | Maintaining application state in Android | <p>I am having trouble finding out how to maintain the state of my Android app in development.</p>
<p>Just to clarify, I am not talking about maintaining activity state (i.e. keeping track of textbox values, checkboxes, etc on a specific activity). </p>
<p>Let's say for example my application has two activities <code... | android | [4] |
4,330,324 | 4,330,325 | Explicit access to Python's built in scope | <p>How do you explicitly access name in Python's built in scope? </p>
<p>One situation where I ran in to this was a in module, say called foo, which happened to have an open function. In another module foo's open function would be accessible as foo.open which works well. In foo itself though, open blocks the built ... | python | [7] |
5,013,987 | 5,013,988 | Outputting data from a for loop | <p>Can you please help me in getting data out of this for loop. It actually should print the names of 3 months, which it does if i dont use the $ period variable in there and use echo instead. But I want to put the value into the $period variable, so I can use it else where in my script. Right now, it print out only on... | php | [2] |
2,765,479 | 2,765,480 | Letter into words | <p>I'll be placing my class to show additional things that I need work with. Would it work if I did typecasting? Or I just have to learn strings?</p>
<pre><code>class NumberBox
{
private:
int number;
char letter;
public:
NumberBox *next_ptr;
void setNumber(int number)
{
this->number =... | c++ | [6] |
4,433,896 | 4,433,897 | Adding SSL on a single Page in ASP.NET | <p>I want 'only' my Login page to be SSL enabled. When the user logsin using https://mysite.login.aspx, after the login the user should be taken to an <a href="http://mysite.default.aspx" rel="nofollow">http://mysite.default.aspx</a></p>
<p>Please tell me step by step how to do it.</p>
| asp.net | [9] |
5,258,822 | 5,258,823 | How to find if there are active downloads using API level 8? | <p>Is there a way to find if there is active downloads programmatically working on API level 8?
I need to do an application for android that turns off wifi if there a no downloads active.</p>
| android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.