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,456,104 | 5,456,105 | How to check if an array contains empty elements? | <p>Let's make some examples:</p>
<pre><code>array("Paul", "", "Daniel") // false
array("Paul", "Daniel") // true
array("","") // false
</code></pre>
<p>What's a neat way to work around this function?</p>
| php | [2] |
2,997,269 | 2,997,270 | Sort input is working backwards | <p>Ok, this was an assignment that I was deducted points due to the fact that the output was displayed backwards. I was supposed to prompt the user for input then display the input in descending order, but I am having an issue with the display. I have two arrays, one year[] to hold the months and one <code>month[totalM... | c++ | [6] |
1,843,366 | 1,843,367 | Android ListView Selection Problem | <p><strong>Hi All,</strong></p>
<p>I apologize for the following long question... </p>
<p>I have a LinearLayout which contains a ListView and some other items. As for the ListView, each on of its rows is a LinearLayout that contains 3 views - Checkbox, ImageView and TextView (from left to right - horizontal).
Since I... | android | [4] |
5,223,106 | 5,223,107 | how to listen to user-defined event? (or what's the mechanism to communicate between objects) | <p>I'm new to android (and java) and I am wondering what's the mechanism to communicate between objects? Like if I want to monitor a private member's value, if it changes, I want a method to be triggered. </p>
<p>I know for UI event there's event listener. But what if it's not a mouse click, but a private member's val... | android | [4] |
59,691 | 59,692 | how to iterate .each loop one recursion less | <p>I have an .each loop in jQuery.</p>
<p>I want to iterate the loop one time less. i.e if 4 elements are found matching, than the loop should iterate only 3 times.</p>
<p>PS: Not using var i and i++ etc. But actually looping 1 less.</p>
| jquery | [5] |
1,806,360 | 1,806,361 | jQuery edit-in-place strange behaviour | <p>I use <a href="http://www.arashkarimzadeh.com/jquery/7-editable-jquery-plugin.html" rel="nofollow">http://www.arashkarimzadeh.com/jquery/7-editable-jquery-plugin.html</a> edit-inplace plugin. </p>
<p>For a single editable element it works fine but I have many on my project. When I click on an element the following ... | jquery | [5] |
3,314,449 | 3,314,450 | jquery alternatives to change function | <p>So I'm using jquery to detect the change in an ID element in my form, like this:</p>
<pre><code>$(document).ready(function(){
$('#ID_a').change(function(){
if(<<<some condition>>>){
$('#ID_a').append(<<<more info>>>)
}
})
});
</code></pre>
<p>... | jquery | [5] |
3,403,442 | 3,403,443 | Smooth transition from Java to C# (windows mobile) | <p>could you recommend me the best way to get into C#? As i know Java and those two share many similarities, I"m not very fond of idea of picking a fat book and reading basic concepts. If there is a good thin book ar any good tutorials around, please let me know.</p>
<p>And one more thing I"m interested particularly i... | c# | [0] |
1,924,697 | 1,924,698 | ASP.NET: Thread-safety in a file-based database | <p>I have worked a bit with ASP.NET before. I was using a MS SQL server to store and retrieve data to display in some dynamic pages in one project I started to learn ASP.NET a bit. Now I am about to start a new project but this time I would like to store the data in a file-based database , like say, an Access file. Thi... | asp.net | [9] |
3,651,440 | 3,651,441 | Update panl in asp.net? | <p>In web application, i am working on update panel, when i place radio button list control in update panel and click on radio button it is showing error like :</p>
<pre><code> Microsoft JScript runtime error:
Sys.WebForms.PageRequestManagerParserErrorException:
The... | asp.net | [9] |
5,280,504 | 5,280,505 | Is there a way to rename the android program shortcut on desktop? | <p>In some modified version(for example, CM7), you can long press the shortcut to rename it.
But CM7 have some bugs now.</p>
<p>I would like to know is there a way I can do that? modify the database, change the programs code or resources is OK. Thanks. </p>
| android | [4] |
3,071,557 | 3,071,558 | Android Anatomy by Edward T Kim | <p>Any idea where can i find this book.
Analysis of Operating Principles of the Android Platform. #Part 2 : Android Anatomy</p>
<p>Link from where i found this:
<a href="http://www.kapg.org/E_Android_Anatomy" rel="nofollow">http://www.kapg.org/E_Android_Anatomy</a></p>
<p>Thanks.
Suren</p>
| android | [4] |
1,466,433 | 1,466,434 | webview transparent background §? | <p>Can someone tell me why on my Samsung S3 <code>(v 4.1.1)</code> a webview has a transparent background and on the xperia U <code>(v 4.0.1)</code> it has a black background? </p>
<p>I use in the java code <code>'webView.setBackgroundColor(0x00FFFFFF)'</code> and in the html
<code>'<body style="background: transp... | android | [4] |
5,456,079 | 5,456,080 | How can System.out.printIn() accept integers? | <p>So I started learning java several days ago and got a question. For the next expression:</p>
<pre><code>String foo=123;
</code></pre>
<p>is not allowed. However, in <code>System.out.printIn()</code>, we can use something like:</p>
<pre><code>int x=5;
System.out.println(x);
</code></pre>
<p>Since implicitly assig... | java | [1] |
3,127,513 | 3,127,514 | What is the difference between class and data attributes? | <p>To quote diveintopython,</p>
<blockquote>
<p>"You already know about data attributes, which are variables owned by
a specific instance of a class. Python also supports class attributes,
which are variables owned by the class itself."</p>
</blockquote>
<p>In what sense are class attributes owned by a class? I... | python | [7] |
3,195,595 | 3,195,596 | How can I pass parameters to a module pattern to override default values [private properties] in JavaScript? | <p>I was reading this article <a href="http://www.klauskomenda.com/code/javascript-programming-patterns/#revealing" rel="nofollow">http://www.klauskomenda.com/code/javascript-programming-patterns/#revealing</a> and was wondering if I can pass parameters to override the private properties.</p>
<pre><code>// revealing m... | javascript | [3] |
5,115,031 | 5,115,032 | Looping array and displaying text | <p>I have the following array</p>
<pre><code>var arr = ['abc', 'efg', 'igj', 'feeu', 'fee'];
</code></pre>
<p>I want to do the following two tasks:</p>
<p>Loop through this array and display the text in a div called DIVCont one by one in a continuous manner and a cycle. There should be a gap of two seconds for each ... | jquery | [5] |
360,858 | 360,859 | How to dynamically show a list of words | <p>I'm just starting with android and could use some help.</p>
<p>I have a list of words that will always be between 20 and 30 words in length, and I want to display those words in columns on the screen, utilizing as much of the screen as possible. In portrait, having three columns seems to be the best size, and in l... | android | [4] |
2,780,808 | 2,780,809 | How can I determine which C++ compiler is used if I only can alter the C++ code and inspect console output? | <p>Suppose there's a system like <a href="http://codepad.org">codepad.org</a> - a black box that can accept C++ code, compile it, run it and present the console output. How could I determine what C++ compiler such system uses?</p>
| c++ | [6] |
5,918,923 | 5,918,924 | Convenient way to convert vector<string> to vector<double> | <p>Is there any convenient way in C++ to convert a vector to a vector other than using transform algorithm and istringstream?</p>
<p>Thanks a lot for your help!</p>
| c++ | [6] |
4,870,952 | 4,870,953 | Populate checkbox from database | <p>I have two tables first one consist of id`s which are associated with names
1 - Car
2 - Train
3 - Plain
..etc</p>
<p>The second table consists of two fields user_id and an id from the first table (for example 1)
1 2
1 3</p>
<p>I`m trying to repopulate selected checkboxes when user goes to the page</p>
| php | [2] |
42,902 | 42,903 | how can we disable "force stop" button and "uninstall" button in android device | <p>I am new to Android App development.I want to get event on the force stop and uninstall button of Android device (menu button --> settings --> Application -->Manage Application --> ). user can not do Force Stop or uninstall my application.</p>
| android | [4] |
2,818,849 | 2,818,850 | JavaScript from page 195 of Stoyan Stefanov Object Oriented JavaScript | <p>Using the code below, taken from page 95 of Stoyan Stefanov`s Object Oriented JavaScript, if you call</p>
<pre><code>var my = new Triangle(5, 10);
my.toString()
</code></pre>
<p>You get this result. </p>
<pre><code> "shape, 2D shape, Triangle"
</code></pre>
<p>My question relates to the first function (function... | javascript | [3] |
2,881,120 | 2,881,121 | Which characters should I escape/sanitize for file names? | <p>I need to sanitize some data which will be used in file names. Some of the data contains spaces and ampersand characters. Is there a function which will escape or sanitize data suitable for using in a file name (or path)? I couldn't find one in the 'Filesystem Function' section of the PHP manual.</p>
<p>So, assumin... | php | [2] |
4,180,071 | 4,180,072 | Extract keys from string containing multiple keys | <p>I'm searching for a way to easly extract a string containing multiple keys. The string is a result form a curl header response</p>
<pre><code>echo $response['body'];
// status=2 reason=Invalid tariff/currency
</code></pre>
<p>Desired result:</p>
<pre><code>$status == '2';
$reason == 'Invalid tariff/currency';
</c... | php | [2] |
4,324,862 | 4,324,863 | return array value in jquery | <p>I need to return an array from PHP and in success when I print it it says undefined. How can I get the value of array?</p>
<pre><code>$.ajax({
type: "POST",
url: "test2.php",
data : {
price : [101, 69, 51],
id : [1, 2, 3]
},
success: f... | jquery | [5] |
1,808,813 | 1,808,814 | how to display contplaceholder in the center of the browser | <p>can somebody tell me how can i open my contentplaceholder in the center of the browser.</p>
| asp.net | [9] |
927,325 | 927,326 | Java Byte Code Instrumenation | <p>Searching on a depth level topic about how to instrument Java Byte Code using ASM , not got good article about it , can you please help me in guiding the correct link , article or way in which I can easily create my own java agent or study in depth about how to create java agent.</p>
| java | [1] |
503,473 | 503,474 | Why is my PHP not detecting my submit button press and thus not executing my function? | <p>I have the following HTML like halfway down my index.php page:</p>
<pre><code><form action="" method="post"><input type="submit" value="Reset Game" class="reset-button" title="Admitting defeat?"></form>
</code></pre>
<p>At the top of my page, I have the following check:</p>
<pre><code>if (isset(... | php | [2] |
4,551,233 | 4,551,234 | Service, handler, timer, runnable - which to use and how? | <p>I'm trying to make an Android app which contacts a webserver every 15 minutes to retrieve som kind of RSS. I know how to retrieve the RSS, but my problem is how I make the app contact the webserver periodically.</p>
<p>I've read about services, handlers, timers and runnables but I don't know which of them I should ... | android | [4] |
4,412,076 | 4,412,077 | Is there an easy way to output two columns to the console in Java? | <p>As the title says, is there an easy way to output two columns to the console in Java?</p>
<p>I'm aware of /t, but I haven't found a way to space based on a specific column when using printf.</p>
| java | [1] |
2,548,795 | 2,548,796 | Problem with Mediascanner class of android while connecting USB to device | <p>While connecting USB to the device It is showing the following error without showing the content of USB. It is not reading the content of USB. The media scanner class started and also getting finished but no content is displayed and showing the following error. </p>
<p>ERROR/NVOMXMetadataRetriever(1161): Error crea... | android | [4] |
1,483,284 | 1,483,285 | PHP Wordpress optimization my loop code | <p>I'm just learning PHP, and I'm using get_terms to get some text descriptions from the CMS, but i want to assign 3 variables to only 3 of my woocommerce tags.
My code works well, but I just want to learn if there's a better way to filter by $tag_descrip->name than using if conditions.</p>
<p>This is my code:</p>
<... | php | [2] |
5,883,188 | 5,883,189 | Moodle with Java Or any other LMS that fits this requirement | <p><br>
My requirement is to access moodle as a backend engine and front end will be mint in Java[jsf]<br>
now I want to know that is there any interface available to access Moodle from Java , using WebServices or any APIs or anything. </p>
<p>Initially I tried using Sakai which is in Java, but the problem is there i... | java | [1] |
1,014,308 | 1,014,309 | Left and Right fragment inside tabhost | <p>I understand fragments within fragments are now supported in API 17.</p>
<p>Is it possible to have a multi-pane fragment layout inside a tabhost fragment? I am looking at the design pattern discussed at <a href="http://developer.android.com/design/patterns/multi-pane-layouts.html" rel="nofollow">http://developer.an... | android | [4] |
2,692,189 | 2,692,190 | Inspect intents at runtime? | <p>I'm interested in inspecting an <a href="http://developer.android.com/reference/android/content/Intent.html" rel="nofollow"><code>Intent</code></a> (namely it's extras) that gets logged like this:</p>
<pre><code>01-05 13:00:29.192: INFO/ActivityManager(74): Starting activity: Intent { dat=content://media/external/i... | android | [4] |
2,073,351 | 2,073,352 | Is there a listener for ScrollView's scrolling? | <p>I have a TableLayout inside a ScrollView, because of some special needs, I need to do some things when the ScrollView has reached the top. Is there such a listener to listen in on user's scrolling operations? Or, if there is no a ready listener, can I subclass the ScrollView (which will be painful I supposed) to ach... | android | [4] |
5,703,344 | 5,703,345 | String/File Search Engine | <p>Need some help for creating a File and String search engine.
The program needs to get the user to enter the name of the file then enter the name of a search string the print a search result file, store it then ask the user if they want another selection.
This is what i have so far:</p>
<pre><code>using System;
usin... | c# | [0] |
3,749,922 | 3,749,923 | Access a variable nested in a function inside a class in php | <p>Here is a cut down version of my code with the main <code>class</code> and main <code>function</code></p>
<p>I need to get the value of <code>'userName'</code> that input by the user to use it inside <code>'mainFunction'</code>, tried making the <code>'userName'</code> inside <code>'myForm'</code> global but that d... | php | [2] |
662,046 | 662,047 | Stopping GPS on back button press | <p>My application uses GPS updates while it is running and I would like that to stop when the user back out of the app as I assume it will continue wasting a lot of battery power. I've tried intercepting the back button press but it doesn't seem to work. I'm not sure if this is because it's not executing the code or I'... | android | [4] |
2,624,214 | 2,624,215 | Set focus on textbox control on parent form when closing child form | <p>I need a help with a problem of loosing focus on textbox control (which is a part of parrent form) when closing a child form.
By clicking button1 I close child form (Form2) and return to parent form (Form1) by bringing it to the front. Below is the code:</p>
<pre><code> private void button1_Click(object sender, ... | c# | [0] |
3,228,555 | 3,228,556 | C++ compiled application | <p>Can someone explain in a "very layman's terms" what a C++ compiled application is? There are network accessible computers which run some type of installed program/applet (for lack of better term) to access it across the network but it does not use http/https. Any assistance is appreciated just looking for an overv... | c++ | [6] |
1,728,381 | 1,728,382 | PHP fatal Error require_once | <p>Hello Guys can anyone explain why is this happening to my program</p>
<p>when i use this Folder structure</p>
<p><img src="http://i.stack.imgur.com/beykH.png" alt="enter image description here"></p>
<p>and the code inside database.php is</p>
<pre><code><?php require_once("../db_config.php");?>
</code></pre... | php | [2] |
999,785 | 999,786 | Why do PHP error messages contain a link to the name of the name of the function in their HTML representation? | <p>Why do PHP error messages contain a link, such as this error:</p>
<p><code><b>Warning</b>: preg_match_all() [<a href='function.preg-match-all'>function.preg-match-all</a>]: Delimiter must not be alphanumeric or backslash in <b>/home/www/test.php</b> on line <b>93</b>... | php | [2] |
2,988,138 | 2,988,139 | How to delete only the phone number in an android phone programatically | <p>i have a Phone.Lookupkey and Phone.CONTACT_ID and i want to delete only the phone number that it points to, i dont want to delete all the contact information.</p>
<p>How do i put empty value?
just update it to ""?</p>
<p>Thanks, </p>
| android | [4] |
4,373,573 | 4,373,574 | Sample code that takes a full resolution pciture | <p>I've tried and tried and tried to find example code that takes a full E.g 5MP - not 800x480 preview sized picture but failed miserably. Has anyone got any working code please?</p>
| android | [4] |
2,885,249 | 2,885,250 | Take current datetime and make 2 datetime variables? (6AM - 5:59AM) | <p>I'm trying to make an events page and I want to create 2 <code>datetime</code> variables. They would take the current time, and create one variable at 06:00 am, and one at 05:59 am. </p>
<p>The issue I'm having though is with the calculations.</p>
<p>If a person is visiting the page on <em>March 17, 11PM</em> - th... | php | [2] |
3,797,125 | 3,797,126 | How to embbed video on uiview or uiwebview | <p>There are some apps in the app store that have a video stream without using mpvideo and they are embbeded on the uiview or uiwebview.
How is this implementation done? Any help is great thanks.</p>
| iphone | [8] |
398,994 | 398,995 | Regarding iphone application i-OS-4.0 | <p>How to lock and unlock iphone screen using programm??</p>
<p>Regrds
Lipika</p>
| iphone | [8] |
2,705,350 | 2,705,351 | What's the difference between double exclamation operator and Boolean() in JavaScript? | <p>I know that <code>!!variable</code> will convert variable into a boolean value and the function <code>Boolean()</code>, according to the ecma262 spec, will also perform a type conversion by calling <code>ToBoolean(value)</code>.</p>
<p>My question is: what's the difference? Is <code>!!</code> better in performance ... | javascript | [3] |
718,786 | 718,787 | error : Config cannot be resolved to a variable | <p>In the following code i am having the above error ,here i declared the variable also.</p>
<pre><code>contentBitmap = Bitmap.createBitmap(300, 300,
Config.ARGB_8888);
Backgroundcanvas = new Canvas(contentBitmap);
</code></pre>
| android | [4] |
5,801,716 | 5,801,717 | Android : Using Bluetooth APi | <p>i am working on making bluetooth application which makes use of bluetooth api.</p>
<p>i am able to do it for version 2.0 or above but many newer Api of 2.0 are not supported in 1.6</p>
<p>So any help on what could be the solution.</p>
<p><strong>BluetoothAdapter</strong> is available in 2.0 bt not 1.6 , so any al... | android | [4] |
805,965 | 805,966 | Android Support Package Usage | <p>I am having trouble using a class from the android-support-v4.jar when running on a 2.3.6 Razor. I added the libs folder and placed this android-support-v4.jar jar file inside, yet when I deploy from Eclipse to the real phone, I get a ClassNotFoundException when the Notification.Builder... code is encountered. </p... | android | [4] |
4,684,146 | 4,684,147 | Multisort - uppercase/lowercase? | <p>Im trying to sort an array using multisort, by sort field and then by title.</p>
<pre><code>foreach ($productContent as $key => $row)
{
$title[$key] = $row['title'];
$sort[$key] = $row['sort'];
}
array_multisort($sort, SORT_ASC, $title, SORT_ASC, $productContent);
</code></pre>
<p>This works but it does no... | php | [2] |
3,214,212 | 3,214,213 | jQuery if else and selected value from select tag | <p>Why can't I get the value selected from my input, am I doing something wrong?</p>
<pre><code> if($('#target option:selected').text() == "add")
$("#add").show(selectedEffect, options, 500, callback );
else if ($('#target option:selected').text() == "exit")
$(... | jquery | [5] |
5,192,308 | 5,192,309 | userinteract stop untill activityIndicator stops | <p>I am parsing an xml, and showing the parsed data into Tableview.
Untill the data is fully parsed, i show a activityIndicator ,to user.
As the data gets loaded, i make activityIndicator stop.
The problem is, if user hits back button before the xml gets parsed, my app gets crashed.</p>
<p>What should i do prevent use... | iphone | [8] |
1,130,870 | 1,130,871 | How can I dismiss ProgressDialog in AsyncTask | <p>I am using a <code>ProgressDialog</code> to be shown while my background process goes on, but after background process is completed the ProgressDialog is not dismissed still.</p>
<p>Here is my code</p>
<pre><code>private class async extends AsyncTask<String, Void, Boolean> {
final ProgressDialog progress... | android | [4] |
5,003,618 | 5,003,619 | JavaScript --Enable Script Execution | <p>In javascript how to enable Internetoptions/Adavanced/Enable client scripts
Programatically..</p>
<p>Intention is, If web client has disabled the client Script, our code need to programmatically enable...</p>
<p>Can you please suggest..?</p>
<p>Thanks
Karthik </p>
| javascript | [3] |
4,082,885 | 4,082,886 | How can I execute a Javascript function or not depending on the existance of an element or not? | <p>I have the following:</p>
<pre><code><li id="abc">x</li>
</code></pre>
<p>How can I use JQuery to check to see if this element exists and if it does then execute the following function?</p>
<pre><code>contentControls(ContentButtonAction.Init);
</code></pre>
| jquery | [5] |
1,770,993 | 1,770,994 | Python: Random item from list combining only two | <p>I'm making a slot machine program in Python and for some reason, the random selector wants to combine a known two elements.</p>
<pre><code> itmlist = random.choice(['banana', 'cherry', 'bar', 'seven', 'banana', 'cherry' 'banana', 'cherry', 'seven'])
print itmlist
</code></pre>
<p>It shows up as "cherrybanan... | python | [7] |
5,129,397 | 5,129,398 | Simple, server-side ASP.NET richtext control? | <p>I'm aware of TinyMce, FCKeditor, and Telerik RadEditor, but they are all too heavy weight for my needs. I just want a text box where the user can mark text as bold, italic, make a list, and most importantly spellcheck it. It should also be able to count the number of characters entered. Where I'm at now is a custom ... | asp.net | [9] |
4,915,972 | 4,915,973 | Declare array of Object, within the Object's constructor? | <p>If I have a class, MyClass, can I declare an array of MyClass on the heap, within the constructor of MyClass?</p>
<p>I can do this in C# but it doesnt seem to like it in C++?</p>
<p>I also get an error about no appropriate constructor for type MyClass??</p>
<pre><code>class MyClass
{
public:
MyClass(i... | c++ | [6] |
4,128,791 | 4,128,792 | Start of execution | <p>Please, tell me from where execution starts in c++, hope your answer is "from main".</p>
<p>Then what about this?</p>
<pre><code>class abc
{
public:
abc()
{
cout<<"hello";
}
};
const abc obj;
int main( )
{
cout<<"Main";
}
</code></pre>
<p>output:</p>
<pre><code>helloMain ... | c++ | [6] |
2,483,824 | 2,483,825 | How do I center text in an ASP.Net Hyperlink? | <p>I have an ASP.Net <code>Hyperlink</code> with a set height. The text is rendered at the top left of it. How do I vertically center it (-the text)?</p>
<p>(In C# I'd have: <code>label1.TextAlign = ContentAlignment.MiddleCenter;</code> . How is it done in ASP.Net?)</p>
<p>Tried the following but it doesn't work (nei... | asp.net | [9] |
5,578,339 | 5,578,340 | If i do print_r in PHP, it prints the array in junk | <p>How can I print the array in a Tree-like format--making it easier to read?</p>
| php | [2] |
2,144,447 | 2,144,448 | boolean[] cannot be resolved to a variable | <p>In the class <code>SitoEratostenesaTest</code>, I have:</p>
<pre><code>SitoEratostenesa myObj = new SitoEratostenesa(liczby[x]);
for(i=1; i<ilosc; i++)
{
if(tab[i])
{
System.out.println((i+1)+" jest liczba pierwsza");
}
else
{
System.out.println((i+1)+" jest liczba zlozona");... | java | [1] |
3,972,716 | 3,972,717 | Get data from external site and then modify it | <p>If somesite(external site) returns a string like "cost is 10$", would it be possible to display it as "price:10$" using only javascript and on my own site?
External site is facebook.com or something.
My site is my site.</p>
<hr>
<p>Hey guys. I am editing a question. I want to get data FROM external site. I donnt ... | javascript | [3] |
3,046,224 | 3,046,225 | Python numexpr module not found | <p>I installed in the past numexpr successfully on many machine. But now I just cannot manage
to get it run on a new Linux system. Essentially I download the tar.gz file and</p>
<pre><code>python setup.py install --home=~/Python/
</code></pre>
<p>which nicely works. I also did</p>
<pre><code>export PYTHONPATH+=:$HOM... | python | [7] |
280,974 | 280,975 | Metadata Information( Hotspot point information ) in png image using java | <p>Please let me know how we can add or save hotspot point information in a png image using java.</p>
<p>I want to retrieve this information at the time on clicking on image at specified hotspot point. </p>
<p>Thanks in advance.</p>
<p>Regards,
Kaveesh</p>
| java | [1] |
1,161,728 | 1,161,729 | converting a simple list to a dictionary (in python) | <p>I'm learning python. I have a list of simple entries and I want to convert it in a dictionary where the first element of list is the key of the second element, the third is the key of the fourth, and so on. How can I do it?</p>
<pre><code>list = ['first_key', 'first_value', 'second_key', 'second_value']
</code></pr... | python | [7] |
3,027,218 | 3,027,219 | How to make postback button click event from running twice to once into asp .net? | <p>trigger twice result in inserting double records in database.</p>
<p>How to make insert once</p>
| asp.net | [9] |
361,124 | 361,125 | Android layout design issue? | <p>I have a tabbar application with the tab at the top. My second tab is a list view. When i select an item in the list view , it should open other list view. But the new list view should not take up the whole screen but should be confined below the tab bar ? How to go about doing this? </p>
| android | [4] |
2,142,715 | 2,142,716 | How to error in manage | <p>i have designed web application in asp.net...i have publish a website..
i have create virtual directory and copy the publish file....
and browse the website...</p>
<p>The error r occure</p>
<blockquote>
<p>Object reference not set to an instance of an object.
Description: An unhandled exception occurred dur... | asp.net | [9] |
1,825,133 | 1,825,134 | jQuery: Exclude "this" from a list of results | <p>As a drag event stops, I must find if my div collides with any other node. So, on the "stop" event, I write a loop that will check for collisions with items of the same type.</p>
<pre><code>$('.article').draggable({
stop: function(event, ui){
$(".article").each(function (i) {
if(this == u... | jquery | [5] |
735,438 | 735,439 | MultiPart Data in Javascript | <p>Can anyone help me to know:
How to send text and image type data through multipart data form in javascript to my api. Please help me in getting the solution of my question.</p>
<pre><code>function apiCall(url){
var myJsonObj ;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, O... | javascript | [3] |
3,870,896 | 3,870,897 | Why are variables not local in case statements? | <p>I recently add another menu item to an android java app and was suprised that Eclipse said that variable from the previous case:break were not local (So I've just added a suffix to get by).</p>
<p>I'm a bit confused as in my mind, the 1st set of case:break would not be executed at all if the 2nd option was chosen. ... | java | [1] |
4,410,567 | 4,410,568 | Avoid to to send data when page reload and when the form action is with same page | <p>i want to send a data from my page called is index.php, the action is with same page, so i can get <code>$_POST['submitted']</code> in index.php, when i submit data is save succesfully to my database, but when i reload the page data still save to my database. my question is how do i avoid send data when i reload it ... | php | [2] |
1,155,017 | 1,155,018 | php function namespace | <p>in C , i can define a function to be static so it can only be used in it's own file.
in python , i can define a function with it's name starts with _ so this function can't be used outside this finle.</p>
<p>could i do it in php ?</p>
| php | [2] |
2,902,647 | 2,902,648 | AUTOSIZE CArray in protlib | <p>I saw in another thread while searching for protlib that you are the author of this awesome library. I have a question about the library if that is ok.</p>
<p>I have a CStruct that I want to nest in another CStruct as such:</p>
<pre><code>class Result(CStruct):
index = CUInt(default=0)
size = CUInt(defaul... | python | [7] |
88,578 | 88,579 | Jquery if not clicked after (x) seconds execute function automatically | <p>I have a function that executes to slide open a couple divs to reveal the content behind. There is a button that when clicked activates the function to reveal said content. I'm trying to figure out how to execute that function automatically if the button isn't clicked on after 7 seconds. Any help would be much appre... | jquery | [5] |
5,771,289 | 5,771,290 | how to make a area not clickable | <p>I got a <code><a></code> that contains a <code><input type="text"></code>
clicking the <code><a></code>will submit the parent form, the input in the <code><a></code> is for the quantity and as it is now trying to change amount it will trigger the form. i got idea of what how i could do this b... | jquery | [5] |
1,818,394 | 1,818,395 | How to remove animation for this jQuery modal plugin? | <p>How can I remove the animation from this jQuery modal window? You can see the example of the plugin here:</p>
<p><a href="http://nyromodal.nyrodev.com/#animationCallbacks" rel="nofollow">link text</a></p>
| jquery | [5] |
444,045 | 444,046 | IIlegalArgument Exception ,unknown URL error in custom content provider | <p>I am learning content provider with example. </p>
<p>My logcat shows <strong>"IIlegalArgument Exception ,unknown URL"</strong>. </p>
<blockquote>
<p>CONTENT URI = "content://com.example.DetailProvider/personaldetail"</p>
</blockquote>
<p>where </p>
<pre><code>com.example - packagename
DetailProvider - Conte... | android | [4] |
5,005,061 | 5,005,062 | Search through file until no more data | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/7940467/reading-huge-data-from-files-and-calling-them">Reading huge data from files and calling them</a> </p>
</blockquote>
<p>I do not know how to search through a file, I have a file which has around 50 lines ... | python | [7] |
4,554,819 | 4,554,820 | add a button in a listView | <p>I want to add a button in every list item and when the user press it to make a phone call. But when the user press the text, nothing happens..is that possible? This is my code:</p>
<pre><code>public class museum extends Activity {
/** Called when the activity is first created. */
@Override
public void ... | android | [4] |
4,162,534 | 4,162,535 | php 5.2.17 source code repository | <p>The php developers do not support anymore php 5.2.17. However, normal apps are using this php instead of the new one, 5.3 branch (Whose idea was drop security support for 5.2.17? ). Normally we compile php from source code. However the official source code is outdated. Is there any public repository out there with b... | php | [2] |
2,236,262 | 2,236,263 | javascript global variables visibility | <p>I'm using a global variable in javascript, declared in a script tag outside any function:</p>
<pre><code><script type="text/javascript">
var prov_status_dict={};
....
</script>
</code></pre>
<p>Later on in a javascript method I'm using the variable normally.</p>
<pre><code>temp=prov_st... | javascript | [3] |
3,924,751 | 3,924,752 | How to write a function that takes a string and prints the letters in decreasing order of frequency? | <p>I got this far:</p>
<pre><code>def most_frequent(string):
d = dict()
for key in string:
if key not in d:
d[key] = 1
else:
d[key] += 1
return d
print most_frequent('aabbbc')
</code></pre>
<p>Returning:</p>
<pre><code>{'a': 2, 'c': 1, 'b': 3}
</code></pre>
<p>No... | python | [7] |
5,478,023 | 5,478,024 | Referencing a subfolder on server with local site being root | <p>This maybe a simple task, but I build sites in php locally and then upload them to a subfolder for clients approval. All this is fine, but when i'm building the site, I use references to the root, such as:</p>
<pre><code><link rel="stylesheet" type="text/css" href="/stylesheets/css/custom.css">
</code></pre>
... | php | [2] |
174,382 | 174,383 | How objects are added to data structures - is just their reference added? | <p>When adding an object to a data structure the reference to the object is always added, not the object itself. So below code snippets are fundamentally the same ? </p>
<pre><code>Snippet 1 -
Object objectRef = new Object();
Vector vector = new Vector();
vector.add(objectRef);
Object object = (Obj... | java | [1] |
4,512,022 | 4,512,023 | Why did match_parent replace fill_parent? | <blockquote>
<p><strong>Possible Duplicate:</strong> </p>
<p><a href="http://stackoverflow.com/questions/5761960/what-is-the-difference-between-match-parent-and-fill-parent-property-in-android">what is the difference between match_parent and fill_parent property in android</a></p>
<p><a href="http://stacko... | android | [4] |
3,009,678 | 3,009,679 | how to load the javascript in android webView | <p>i have the two java script files of my web service..and it will display the bar charts in web view...but i'm unable to get that....this is the code which i used</p>
<pre><code> String url="http://************/getchart.php? id="+id+"&sessionid=*********";
webview.setWebViewClient(new WebViewCli... | android | [4] |
1,359,520 | 1,359,521 | Switch-case with variations in android | <p>I wonder if I can turn the following chart into switch-case statement in android. I know I can do it with if-else but I just wonder if I can...
E.g- </p>
<pre><code>switch (bodyfat)
case 2-4 : show (Essential Fat);
case 6-13 : show (Athelete Fat);
</code></pre>
<p>.......
<img src="http://i.stack.imgur.com/otfUx.j... | android | [4] |
3,379,728 | 3,379,729 | Proper way to concatenate a hyperlink into string | <p>What would be the best way to properly concatenate string with an url inside? Can it be okay with this?</p>
<pre><code>String.Format("This is the link: <a href={0}>{1}</a>", somevalue1, somevalue2)
</code></pre>
<p>Or it probably leaves open door for injection attacks?</p>
<p>So how would I insert a h... | asp.net | [9] |
2,085,787 | 2,085,788 | View is not adjusting itself after hiding Tabbar | <p>I have a UITabbar having 5 tabs like this </p>
<p><img src="http://i.stack.imgur.com/0Ry80.png" alt="enter image description here"></p>
<p>Now I want to hide the UITabbar when taps on the Feed Tab. I want to show the full screen there. I am able to hide the tabbar but the UIView of Feed screen is not adjusting its... | iphone | [8] |
4,813,041 | 4,813,042 | SIP Stack iPhone | <p>Does anyone have any docs/guides/code samples on implementing an SIP based IP or video connection on the iPhone? I am looking for a place to start, Google is not being friendly on this one.</p>
<p>Thanks in advance,</p>
<p>Rob</p>
| iphone | [8] |
4,578,825 | 4,578,826 | How to use variables in dot notation like square bracket notation | <p>I have been using square bracket notation in Javascript to create and call associative arrays.</p>
<p>In this example, I understand that square bracket notation allows you to use a variable to call a certain object in the array.</p>
<p>How would you do something like this in dot notation?</p>
<pre><code>var item ... | javascript | [3] |
5,311,328 | 5,311,329 | opening database in raw folder & perform different read opration on it | <p><strong>Title</strong>-Android-read database in raw folder..</p>
<p>My raw folder contains a database 'abc' & abc database contains one table say- xyz
i want to open 'abc' database for fetching data in it..</p>
<p>i want to use something like</p>
<p>SQLiteDatabase db=SQLiteDatabase.openDatabase(path, factory,... | android | [4] |
5,410,887 | 5,410,888 | It goes like this: Click an image, show an image - using jQuery | <p>Simple right?</p>
<p>Basically, here is the concept. Imagine all children of div#images are display:none by default:</p>
<pre><code><div id=thumbs>
<img src="thumb1.jpg"/>
<img src="thumb2.jpg"/>
<img src="thumb3.jpg"/>
</div>
<div id=images>
<img src="img1.jpg"/&... | jquery | [5] |
2,939,714 | 2,939,715 | python: comparing values string/integer | <p>i will be comparing two values like this:\</p>
<pre><code>value1>value2
</code></pre>
<p>i know that value2 is always an integer, but sometimes value1 is None or a string, how do force the comparison ONLY if value1 is numerical?</p>
<p><strong>value1 is a decimal</strong></p>
| python | [7] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.