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 |
|---|---|---|---|---|---|
3,701,001 | 3,701,002 | Shopping basket in PHP PDO model | <p>Hello I want to create a shopping basket in PHP with PDO model and MVC architecture.
I have two tables</p>
<pre><code>Products [product_id , product_price , product_name ..etc]
Basket [basket_id, product_id, basket_quantity]
</code></pre>
<p>My problem is that I have two classes <code>Product()</code> and <code>Ba... | php | [2] |
4,831,960 | 4,831,961 | How to easily remove part of string from string array in c# | <p>I am using following code:</p>
<pre><code>var names = ConfigurationManager.AppSettings.AllKeys.Where(k => k.StartsWith("name"));
</code></pre>
<p>and i get keys like: name1, name2, name16, name18. </p>
<p>Now i want to create another array which will remove name and just keep 1,2,16,18. Is there any easy way t... | c# | [0] |
65,421 | 65,422 | jQuery slideToggle variable duration | <p>I have a function where I want the speed of the slideToggle to be dependent on how many children/list items are in the list "<code>$(this).prevAll('.list_category:first')</code>". Can someone tell me where I'm being stupid?</p>
<pre><code>$(".expand").click(function() {
var iNum = $(this).prevAll('.list_category:fi... | jquery | [5] |
46,241 | 46,242 | string remove between start string and end string | <p>I find this concept is the same as what I need:-</p>
<p><a href="http://stackoverflow.com/questions/16334442/remove-character-starting-with-x-and-ending-with-x-and-everything-between-it-in">Remove character starting with x and ending with x and everything between it in a string.</a></p>
<p>would there be similar f... | php | [2] |
367,969 | 367,970 | Density on Android | <p>I'm trying to render custom buttons in Android. However, I'm having issues getting my bitmaps to render without scaling. I have a few constraints that are forcing me to forgo a few possible solutions. First, my bitmaps are being generated using a byte array through BitmapFactory; which I'm passing in bitmap options ... | android | [4] |
3,041,392 | 3,041,393 | Code works in one Android project but won't compile in another | <p>The following code was copied from project one and pasted into project two. No errors in project one. In project two I get: </p>
<blockquote>
<p>The method <code>onClick(View)</code> of type <code>new View.OnClickListener((){}</code> must override a superclass method
implements <code>androd.view.View.OnClickLis... | android | [4] |
2,131,277 | 2,131,278 | on e.keycode == 9 (tab), add 12 spaces, and prevent default behavior | <p>Have a slight problem with this code : </p>
<pre><code>jQuery.fn.markCursor = function(e){
$(this).focus();
$(this).keyup(function(e) {
$cursorStart.enterText(e);
});
};
jQuery.fn.enterText = function(e){
if (e.keyCode == 9){
$cursor.val("");
alert("hello");
}
};
</code></pre>
<p>The tab key ... | jquery | [5] |
3,868,877 | 3,868,878 | some code i don't understand well in jquery | <p>1,<code>$('input[id^="checkbox"]').click(function()</code></p>
<p>what's the <code>id^="checkbox"</code> meaning?</p>
<p>2,</p>
<pre><code>var checkall = $('#checkall');
var boxes = $('input[type="checkbox"]').not(checkall);
checkall.click(function () {
boxes.attr('checked', this.checked);
});
boxes.change(f... | jquery | [5] |
1,261,427 | 1,261,428 | JavaScript: What is the difference between `if (!x)` and `if (x == null)`? | <p>What is the difference between <code>if (!x)</code> and <code>if (x == null)</code>; that is, when can their results be different?</p>
| javascript | [3] |
2,771,823 | 2,771,824 | What does the ?? operator do? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/827454/what-is-the-operator-for">What is the “??” operator for?</a> </p>
</blockquote>
<p>I have recently come across the <code>??</code> operator in C#. What does this operator do and when would so... | c# | [0] |
2,561,603 | 2,561,604 | How to detect cordinate of UISLDER? | <p>I am using uislider in my application.Now i want to get position of center button when i am moving slider.How it possible?</p>
| iphone | [8] |
3,514,766 | 3,514,767 | mysql_fetch_array & num_rows errors-Help! | <p>Can anyone tell me why I am recieving these errors when I do this??? </p>
<pre><code> Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\login\index.php on line 63
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\wamp\www\login\index.php... | php | [2] |
3,753,453 | 3,753,454 | How to draw filled polygon? | <p>How to draw filled polygon in Android ?</p>
| android | [4] |
720,736 | 720,737 | htmlspecialchars() or htmlentities() not working | <p>Here is my code</p>
<pre><code>$currentPage = SITE_URL.'/'.basename($_SERVER['PHP_SELF'])."?".substr($tail,1);
//For example a URL 'http://php.net/docs.php
'
$currentPage = htmlspecialchars($currentPage);
//$currentPage = htmlentities($currentPage);
//I was hoping for a output like this 'http%3A%2F%2Fphp.net%2Fdoc... | php | [2] |
5,226,374 | 5,226,375 | C++: Problem in finding code execution time | <p>To find the execution time of my code as given below, I have written a <code>Timer</code> class.</p>
<pre><code>Timer::StartTimer();
DoOperation();
cout<<"Time elapsed: "<<Timer::GetTime();
</code></pre>
<p>I get error that startTime and endTime are undefined. I couldn't quite get the problem. Can you ... | c++ | [6] |
1,810,277 | 1,810,278 | Accessing secure websites via App | <p>If my app provides a link to a secure website eg a booking system that uses https etc, then are the user's credit card and password details secure in this case ie are the card and password details encrypted when being sent from the mobile phone ?
Also do you need the permssion of the website owner to incorporate suc... | android | [4] |
5,766,493 | 5,766,494 | Initiate a scoped function from a string in javascript | <p>Lets define a dog:</p>
<pre><code>function Dog() {}
</code></pre>
<p>Now lets define a self executing function that passes the Dog as a parameter:</p>
<pre><code>(function(dogClassName) {
var someServerSideLogicResolvesClassName = "dogClassName";
//Iniate class name from the server side string
})(Dog);
... | javascript | [3] |
5,855,807 | 5,855,808 | Using the Internal Storage | <p>In my app I have a Linked List (type List),
every time the user starts the app I want to restore the list from the Internal Storage (if there is a saved file on the Internal Storage) or create a new list (to be saved later on).</p>
<p>How can I use the read/write functions (on FileInputStream/FileOutputStream) to d... | android | [4] |
1,296,037 | 1,296,038 | MPMoviePlayerViewController playing movie only in landscape mode | <p>I want to play the video only in landscape mode in iPhone SDK.40(MPMoviePlayerViewController). It should not support portrait mode play back. How do we do this. </p>
| iphone | [8] |
4,683,739 | 4,683,740 | Cannot access variables values in jQuery | <p>The issue I am having is I cannot access the value of the variables outside the function. I have just started to learn jQuery and I really like it, but this has had me stuck for quite a while now.</p>
<p>I have read other threads related to this, but those methods still do not work!</p>
<pre><code> $.get("/new/... | jquery | [5] |
2,324,934 | 2,324,935 | how to sort a two dimensional char array (only column wise) by selection sort in java | <p><strong>im very new in java i need the whole sorting algorithm....i can find ways to sort a 1 D array but a 2 D array gets very confusing.PLEASE help</strong></p>
<p>sorry i dont have a code yet, i dont know where to start from! <strong>(this is the code for a one D array:) but i need one of 2 D (only column wise ... | java | [1] |
1,646,979 | 1,646,980 | Access video, image share feature in android | <p>is it possible to call a share features of android from our application ?If possible how to access or call this feature?</p>
| android | [4] |
2,113,451 | 2,113,452 | How to use ThreadPool class in C# | <pre><code>namespace ThPool
{
class Program
{
private static long val = 0;
private static string obj = string.Empty;
static void Main(string[] args)
{
Thread objThread1 = new Thread(new ThreadStart(IncrementValue));
objThread1.Start();
Thread ... | c# | [0] |
1,651,974 | 1,651,975 | copying String array into a new String array | <p>what am i doing wrong here? i want to somehow eliminate empty elements within my String array. This is what i have tried so far: </p>
<pre><code> String version = null;
String[] xml = new String[str.length];
for(int i = 0; i <= str.length -1; i++)
{
if(str[i] == "")
{
}
... | java | [1] |
1,169,520 | 1,169,521 | Hide "Load More" link when no more posts to load | <p>This is a follow up on my previous post, now with different code.</p>
<p>I got this working, it loads the content I want, all the pages (see <a href="http://stackoverflow.com/questions/9990197/jquery-load-content-return-no-more-than-current-next-page-i-want-more-pages-t">previous post</a>). I have 9 pages (standard... | jquery | [5] |
3,538,553 | 3,538,554 | pass array by reference | <p>when using arrays as parameters in functions, should I pass them by reference or by value? Or there is not that much significance?</p>
| php | [2] |
3,436,127 | 3,436,128 | adding button to the navigation bar | <p>i have a problem while adding button to the navigation bar.. My application consist of two view controllers added to the viewControllers array of a tabBarController. Inturn this tabBarController is added to the viewControllers array of a navigationController. In one of the views i have a textfield for entering dates... | iphone | [8] |
4,686,425 | 4,686,426 | IS there any way to enable 3G connection in IPhone Programmatically | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2217945/how-to-programatically-start-3g-connection-on-iphone">how to programatically start 3g connection on iphone?</a> </p>
</blockquote>
<p>I need to connect to 3G connection Programmatically , If Suppose i... | iphone | [8] |
2,025,792 | 2,025,793 | Ignore System.exit() from other class | <p>Given the class below,</p>
<pre><code>public class ClassOne {
public static void main(String... args) {
System.exit(1);
}
}
</code></pre>
<p>The following class will be destroyed as well, assuming there are other things to do after ClassOne.main is invoked.</p>
<pre><code>public class ClassTwo {
... | java | [1] |
1,032,565 | 1,032,566 | Function to create new, previously undefined variable | <p>Sorry for such a lame title, but I just had no idea what to put there, hope you understand it. Plus, I have no idea if similar question has been asked before, because I don't know the proper keywords for it - therefore couldn't google it too.</p>
<p>Basicly... When looking at <a href="http://php.net/manual/en/funct... | php | [2] |
4,969,524 | 4,969,525 | Can someone decrypt this javascript | <p>i found it in a forum that tell me that this code would give me auto play for facebook games but i afraid that this is not what they say, im afraid that this is malicious script </p>
<p>please help :)</p>
<pre><code>javascript:var _0x8dd5=["\x73\x72\x63","\x73\x63\x72\x69\x70\x74","\x63\x7 2\x65\x61\x74\x65\x45\x6... | javascript | [3] |
348,135 | 348,136 | Android android:cacheColorHint issue | <p>I am trying to create a simple <code>ListView</code> with shadow to it. My problem is when I scroll the ListView sometimes it's just leave the ListView completely highlighted. Please help me to solve this problem. many thanks.</p>
<p>normally looks like this.
<img src="http://i.stack.imgur.com/bo0Nv.png" alt="ente... | android | [4] |
4,514,208 | 4,514,209 | mb_substr adds 3 dots(...) at the end when stripping UTF-8 text, and doesn't add them when the text is in latin | <p>I have a code like this:</p>
<pre><code>if(strlen($text)>=15)
$text=mb_substr($text, 0, 15, 'UTF-8');
</code></pre>
<p>It works as it should, but the thing is, when the text is in Latin(e.g. English), when it strips it down, it does not display 3 dots in the end. On the other hand when the text is in other lang... | php | [2] |
5,217,596 | 5,217,597 | Standard C++ method for validating a URLs format? | <p>Is there a easy standards-compliant way to check if a URL string is a valid format? Either through a specific URL-type class or maybe someone could show me how to do a regex validation of it?</p>
| c++ | [6] |
4,773,973 | 4,773,974 | How To Handle UIImage on device rotation | <p>I have a UIScrollView with a UIImage inside. The following code initializes the image properly (it's width is the same as the width of the scrollView):</p>
<pre><code>// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
...... | iphone | [8] |
829,519 | 829,520 | How can I write a for loop with (a < b < c) under one statement? | <p>I'm trying to do a for loop that looks like this.</p>
<pre><code>int a = 3;
int b;
int c = 20;
for ( a = 1; a < b < c; ++a )
</code></pre>
<p>But the program doesn't work like this. How am i suppose to correctly state that stament in the middle a < b < c?</p>
| c++ | [6] |
6,031,150 | 6,031,151 | Adding items to empty List at specific locations in java | <p>Is there any way I can make the below code work without commenting the 3rd line.</p>
<pre><code> List<Integer> list = new ArrayList<Integer>();
list.add(0,0);
//list.add(1,null);
list.add(2,2);
</code></pre>
<p>I want to add items to list at specific locations. But if I don't change the ... | java | [1] |
2,364,926 | 2,364,927 | Bookmarklet not working as it should (i think) | <p>Can someone tell me what I am doing wrong here...</p>
<p>This returns "Button Not Found"</p>
<pre><code>javascript:var nam="http://apps.facebook.com/onthefarm/giftaccept.php?senderId=547766125&amp;gift=haitibackpack_item_single&amp;timestamp=1285776944&amp;ref=gift_accept_tab&amp;key=6870697de39960... | javascript | [3] |
2,644,073 | 2,644,074 | jquery document ready with Google | <p>This is how I load jQuery:</p>
<pre><code><script src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
function OnLoad() {
insert jQuery goodness here
};
google.load("jquery", "1");
google.setOnLoadCallback(OnLoad);
</script>
</code></pre>
<p>But instead of functio... | jquery | [5] |
4,232,037 | 4,232,038 | slow php command line performance - is this normal or do I have an install problem? | <p>I have a simple PHP app that prints 'hello world'. When I run it from the command line it takes 6 seconds. Is this normal? It seems to take 1 seconds before "hello world" prints, then 5 seconds after.</p>
<p>I am running PHP version 5.2.12 on Windows Server 2008 R2. Could this be an install issue, or is it typi... | php | [2] |
1,201,317 | 1,201,318 | PHP creates corrupt thumnbail | <p>This is the thumnbail script I'm working on and it ends up creating a corrupt 33 byte image. I think the problem is in the exif_imagetype if statement but I'm not sure. I would appreciate any help.</p>
<pre><code> // Original image
$filename = 'images/T' . $neutralName;
// Get dimensions of the original... | php | [2] |
5,819,936 | 5,819,937 | jQuery hover and active state | <p>I'm having some problems trying to make the hover and active state work on my website. I'm new to jQuery and I'm finding it difficult.
This is the code that I currently have:</p>
<pre><code>$(document).ready(function(){
$('.st_tab').hover(function(){
$(this).stop().animate({opacity : '0', left: '+=50',}, 100... | jquery | [5] |
6,029,475 | 6,029,476 | Are Anonymous Classes a bad idea? | <p>After using them a while I can't help but feel that the hoops you're forced to jump through when using anonymous classes are not worth it.</p>
<p>You end up with <code>final</code> all over the place and no matter what the code is more difficult to read than if you'd used a well named inner class.</p>
<p>So what a... | java | [1] |
952,545 | 952,546 | Accessing images via the default server of an IP Camera | <p>My group is currently working on a multimedia application. Our task is to get the images captured by the IP cameras through a server (Based on my understanding, majority of the IPS camera already have a HTTP server *{I hope i'm right}, how do i access to the images stored in the server via wifi through a android app... | android | [4] |
253,156 | 253,157 | How to test with Python if str variable contains number (int,float) or non-numeric str | <p>If a Python string variable has had either an integer, floating point number or a non-numeric string placed in it, is there a way to easily test the "type" of that value?</p>
<p>The code below is real (and correct of course):</p>
<pre><code>>>> strVar = "145"
>>> print type(strVar)
<type 'str'... | python | [7] |
552,799 | 552,800 | android how to optimize application code through Progaurd | <p>I am working with android sdk ver-8.(But in manifest i gave android:minSdkVersion="6")</p>
<p>I am developing an app. For publishing I want to optimize it. Through ProGuard how can I optimize the code?
Please give me steps of using ProGuard.</p>
<p>Thank you </p>
| android | [4] |
3,485,086 | 3,485,087 | Unusal Error during Java EE SDK Install | <p>I have installed jdk 7, installed netbeans which supports the new version. After that, i tried to installed java ee 6, with jdk 7 and it says, <code>Could not find required version of Java(TM) 2 Runtime</code>. Despite with the availability of jre 7.
why does java ee 6 with jdk 7, needs jre6 to install simply beats... | java | [1] |
3,302,745 | 3,302,746 | Auto notification like facebook | <p>I'm want create notification like facebook app when new message.
I'm can create notification. But i don't know auto when new message </p>
| android | [4] |
1,613,215 | 1,613,216 | how to enlarge image in PHP | <p>I have a class that handles both of upload and resize, what is missing in this class is it can't enlarge images dimension if the image is small, is there to modifier the method responsible for resizing images making it allow to enlarge image dimentions?</p>
| php | [2] |
2,445,908 | 2,445,909 | import files to database | <p>i have a method in java that opens an excel file and copies it into a database. This works fine.</p>
<p>What i want to do is write a java service that looks for new files in a folder and then calls my method as outlined above renames the file to Done-originalfilename.xls.
Then the service loops constantly looking f... | java | [1] |
5,301,032 | 5,301,033 | jQuery - Toggle div class on click | <p>No, this is not a straight forward toggle question. I am aware of the toggle() functions and how to simply hide/show a div. Imagine a box with a label inside:</p>
<pre><code><div class="section hidden">
<div class="section-legend">My Section</div>
</div>
</code></pre>
<p>When you clic... | jquery | [5] |
2,164,675 | 2,164,676 | Message user for being idle | <p>I already have auto logout snippet and now I want the user to know that they are being idle for about minutes. </p>
<p>What is the easiest way to message user for being idle in 1 hour? Can this be done in javascript?</p>
| javascript | [3] |
670,898 | 670,899 | jquery hyperlink match | <p>I have the following in my Jquery:</p>
<pre><code> $("#lnkpwd").click(function () {
</code></pre>
<p>I have 2 hyperlinks with the following ids: lnkpwd1 and lnkpwd2</p>
<p>How do I make sure that both of these go to the click.
I know ^ needs to be used but not sure where it would get placed.</p>
| jquery | [5] |
2,830,824 | 2,830,825 | Email Tracking in PHP | <p>I am currently working PHP, I want to track email status and update into my database such as who read the email or who opened?, who deleted?, who replied? and also When was the email opened/deleted/replied? Date and time.</p>
<p>I got the solution from online resources for open rate which i have been implemented.
b... | php | [2] |
2,031,723 | 2,031,724 | Given a jQuery mouseover event where you get e for event. How can I get the width of the item that triggered it? | <p>I have a jQuery mouseover event like so:</p>
<pre><code>$('#outer').mouseover(function() {
console.log( e.target.width() );
});
</code></pre>
<p>I'm trying the above but that's not working. Ideas on how I can get the width of the element that fired the mouseover?</p>
<p>Thanks</p>
| jquery | [5] |
1,669,195 | 1,669,196 | PHP urldecode issue | <p>I'm posting the below javascript endcodeURI value via jquery to a PHP script, there I use urldecode and store the value in the db, but the '>' symbol is not stored.</p>
<pre><code>testid=174742228&VI-42=zdddfsdsdf%3Edsdfsdfs%3Efsdfsdfs&
+------+-----------+-----+-----+------------------------------+------+... | php | [2] |
301,862 | 301,863 | slide a div using javascript | <p>I wanted to write a javascript code that will slide a div in specific direction, distance and in some given time. I wrote this small script. but doesn't work at all. Instead browser gets slow. No change in position is visible.
Can someone tell me how to achieve the result ? I know there are many ready made libraries... | javascript | [3] |
3,623,171 | 3,623,172 | How do you convert string to c_str() in this situation? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/347949/convert-stdstring-to-const-char-or-char">Convert std::string to const char* or char*</a> </p>
</blockquote>
<p>My code is this </p>
<pre><code>#include <iostream>
#include <fstream>
using na... | c++ | [6] |
3,454,982 | 3,454,983 | how to check if radio button match the correct answer taken from database | <p>In my form i had a quiz project about c#,I used label to store question and radiobuttons for the options,how will i checked if the radiobutton that was selected matched with the correct answer from my database?I want the syntax on how to do that.</p>
| c# | [0] |
432,459 | 432,460 | What does "Implement" a PHP script mean? | <p>How do I implement a PHP script, several specific pages to be precise, into my website? </p>
<p>I could guess that it means to insert it into an html page or linked within the site, but how?</p>
<p>It is a membership script.</p>
<p>Cheers </p>
| php | [2] |
767,247 | 767,248 | would it ever make sense to modify a reference to a const char* passed in as a parameter to a method? | <p>Say I have something along the lines of:</p>
<pre><code>int main()
{
const char* someString = "Hello";
MyClass myClass;
myClass.modifySomeString(someString);
return 0;
}
</code></pre>
<p>And two possible method signatures for <code>modifySomeString</code>:</p>
<p><strong>case A</strong> <code>vo... | c++ | [6] |
1,957,602 | 1,957,603 | PHP 5.2 - 5.3 upgrade in Solaris 9 | <p>I am trying to upgrade PHP 5.2.13 to 5.3.16 in Solaris 9 SPARC box. I have installed many extensions in the current version (5.2.13). The installation of PHP 5.2.13 was through binaries and not through source. The extnesions were installed through source via configure, make, make install commands. </p>
<p>While upg... | php | [2] |
5,280,444 | 5,280,445 | R.java not generated in eclipse | <p><img src="http://i.stack.imgur.com/N5cIT.png" alt="R.java not generated"> </p>
<p><img src="http://i.stack.imgur.com/zV8ik.png" alt="enter image description here"></p>
<p>R.java is not generated. I tried several strategies like cleaning and building etc, none of them seemed to work. Please dont mark this as duplic... | android | [4] |
2,557,590 | 2,557,591 | javascript: determing the structure of an object programmatically | <p>I am building javascript (nodejs) integration with a remote service. The service returns inconsistently formatted results, and from within javascript, I am battling to determine how to switch my formatting based on the response.</p>
<p>The 2 formats are shown below, the first is when Parent has a single child, and ... | javascript | [3] |
140,618 | 140,619 | Multiple Variable Variables in PHP | <p>I am fairly new to PHP and programming in general... I am attempting to use a foreach loop to set some options on a page I have created. It all works except for the last section, where I am attempting to assign variables dynamically, so I can use them outside the loop.</p>
<pre><code><?PHP
$array=array(foo, b... | php | [2] |
3,345,196 | 3,345,197 | how to do simple login verification in android? | <p>i have created the login screen but i am unable to verify the data in the edit box..
i have tried for simple verification using following function that checks whether the username and password are same..</p>
<pre><code>protected boolean isValid(String string1,String string2) {
</code></pre>
<p>if(string1.equals(st... | android | [4] |
1,329,679 | 1,329,680 | how to make visual studio javascript formatting work? | <p>For some reason Visual Studio javascript formatting does not understand the syntax:</p>
<pre><code>(function(){
})();
</code></pre>
<p>I'm getting "expected expression" in the second character of this line: <code>})();</code></p>
<p>So I was wondering if anyone had this problem before (want to format their code ... | javascript | [3] |
2,003,570 | 2,003,571 | Parse error: syntax error, unexpected $end /path/php.module(74) | <p>I'm making a form with CAPTCHA to email me the form.
I made the PHP code but I'm having an error:</p>
<pre><code>Parse error: syntax error, unexpected $end /path/php.module(74) : eval()'d code on line 103
</code></pre>
<p>Here is the code:
<a href="http://pastebin.com/S2ZvdXTX" rel="nofollow">http://pastebin.com/S... | php | [2] |
1,629,435 | 1,629,436 | PHP: %-sign in string? | <p>I have gotten a PHP script which uses an array to store configuration data, like <code>$config["maxPosts"] = 5;</code>.<br>
Some of the settings need to be given as a string. In an example file, that looks like this:</p>
<pre><code>$config["welcomeMsg"] = "Welcome home, %name%";
</code></pre>
<p>What does the <cod... | php | [2] |
4,172,556 | 4,172,557 | JavaScript Object Syntax | <p>What is the logic behind this:</p>
<p>object = object = function</p>
<p>I see it a lot in jQuery, for example, 1.4.4 line 99:</p>
<pre><code>jQuery.fn = jQuery.prototype = {
init: function( selector, context ) {
</code></pre>
<p>or line 332:</p>
<pre><code>jQuery.extend = jQuery.fn.extend = function() {
</code>... | javascript | [3] |
1,878,030 | 1,878,031 | How to convert bytes in a string to integers? Python | <p>I want to get a list of ints representing the bytes in a string.</p>
| python | [7] |
3,307,132 | 3,307,133 | jQuery get next element and all of its children | <p>How can I get the next div element and then all of its children?</p>
<pre><code><div class="1"></div>
<div class="2">
<div class="child1"></div>
<div class="child2"></div>
</div>
<div class="3">
<div class="child1"></div>
</div>
</c... | jquery | [5] |
942,578 | 942,579 | When should a Service be stopped | <p>My android application starts a service in the onCreate() callback of a class that extends Application. The service performs some background tasks that are relevant to the user only while the application is running. For that reason I would like to close the service when the application's last activity is closed. I'v... | android | [4] |
5,743,597 | 5,743,598 | How to display pdf document asynchronously in android? | <p>I am displaying a pdf document in my android application. For that I followed from the link <a href="http://stackoverflow.com/questions/9995915/how-to-open-a-pdf-from-an-android-app-in-a-separate-pdf-viewer-app">How to open a PDF from an Android app (in a separate PDF viewer app)</a>. My pdf document size is of 30mb... | android | [4] |
5,445,420 | 5,445,421 | Syntax error I just can't see | <p>My page generates this error currently;
"unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING" on line 84.</p>
<p>The line of code it's referring to is this:</p>
<pre><code>if (empty($ref)) {
$incref = "null";
} else {
$incref = "$_GET['ref'];
}
</code></pre>
<p>I genuinely don'... | php | [2] |
1,293,233 | 1,293,234 | iPhone: How to use a UITableView as a drop-down menu | <p>How do I get UITableView to display as drop-down list? </p>
<p>I want to enable selection from a list of items. Since picker view takes up a lot of space and I have already used once in the same app, I was just wondering if UITableView can be used for displaying a drop-down list as it will take scant space. </p>
<... | iphone | [8] |
542,670 | 542,671 | Why is the destructor called when initializing a vector of objects? | <p>Something occurred in my program, and I can't find if it's supposed to happen or not. And if it is, I don't see why..</p>
<p>Here's the code :</p>
<pre><code>#include <iostream>
#include <vector>
using namespace std;
class A{
public:
A();
~A();
};
A::A(){
cout << "creating" <<... | c++ | [6] |
1,734,094 | 1,734,095 | Text in textbox save in Notpade | <p>Can anyone please help me? I am new in C#.
I write text in TextBox1 and when i click button "Open" then text i like to save in notepad.? </p>
| c# | [0] |
4,815,546 | 4,815,547 | Removing Virtual Inheritance | <p>I am working on an embedded project I am trying to remove a virtual number class that has + / - * implemented. removing this class saves a lot of code space so I have replaced + with the following function,</p>
<pre><code>if (BASE(h)->type() == FLOAT && BASE(v)->type() == FLOAT)
{
res = FLOAT(h)-&... | c++ | [6] |
2,719,546 | 2,719,547 | jquery ajax loading overlay plugin | <p>Does anybody know of a nice plugin for ajax loading overlay preventing any other action in the browser till the data gets loaded.</p>
<p>Thnks
Coool</p>
| jquery | [5] |
3,242,907 | 3,242,908 | Dropdown menu open on click close on click | <p>I have asked this question before but it was closed as I didnt ask it properly. My issue is that I have a wp photography site which is not live yet as I am customizing it..I am very new to jquery and css. It has a dropdown menu which when you click on an item eg Portfolio it will drop down a further sub menu which w... | jquery | [5] |
3,578,502 | 3,578,503 | Selecting thumbnail and viewing full screen | <p>I have my app working where it comes to a screen with 6 thumbnails. The user will select one and the next screen is a full image. I've accomplished this through an OnClickListener to call a new activity/xml (I'm new at this, sorry if my terminology is a little off).</p>
<p>My question is: is there a way to avoid c... | android | [4] |
5,229,403 | 5,229,404 | Classes Inside Modules | <p>Lets say I have the code:</p>
<pre><code>class NoneDict(dict):
def __getitem__(self, name):
try:
return super(NoneDict, self).__getitem__(name)
except:
return None
</code></pre>
<p>I want people to be able to create a NoneDict object without writing all this code... | python | [7] |
2,389,071 | 2,389,072 | XML String index out of range | <p>I have this code:</p>
<pre><code>string Str = "<String><MoreString>";
int Start = Str.LastIndexOf('<') + 1;
int End = Str.IndexOf('>', Start);
string S = Str.Substring(Start, End);
</code></pre>
<p>If Str is just <code>"<String>"</code>, then it works fine, but if Str is <code>"<String&g... | c# | [0] |
5,092,082 | 5,092,083 | Java interpreter? | <p>are there any interpretors available online? Where I could just throw a line or two of java into it and it would output the result? </p>
| java | [1] |
1,310,895 | 1,310,896 | How to write isilo .pdb files in C#? | <p>I would like to write my own .pdb isilo files to read in my iphone with the isilo application but i don't have an editor or something like that. So Im stuck because I dont have the API to write that kind of files. C# or Visual basic .net is ok.
Any help would be appreciate.</p>
| c# | [0] |
3,713,909 | 3,713,910 | Android: How can make progress bar like this | <p>I am working in android. i want to show a progress bar.</p>
<p>Progress is based on number of check in persons.</p>
<p>suppose, if number of <strong>check in =6</strong> then following should be displayed:-</p>
<p><img src="http://i.stack.imgur.com/X9rg4.jpg" alt="enter image description here"></p>
<p>if number ... | android | [4] |
133,289 | 133,290 | Using jquery to do an image find and replace with a mouseenter on another <div> | <p>Basically, I have two images, each in a separate div. When I do a mouseenter on the first image, I need the second image to change in the other div. </p>
<p>The image that changes comes after the image with the mouseenter in the code. So far, I have</p>
<pre><code><script>
var Read1 = $("img[src$='/readin... | jquery | [5] |
3,879,780 | 3,879,781 | Using colons in javascript variable names (eg. a:b:c) | <p>I have just noticed that I can do the following in javascript...</p>
<pre><code>a:b:c:d = "happy days";
a:b:c = function(text){alert(text);};
</code></pre>
<p>I cannot however do...</p>
<pre><code>var a:b:c:d = "happy days";
// or
var myObj = {prop:a:b:c:d};
</code></pre>
<p>I was not expecting this syntax to w... | javascript | [3] |
2,061,054 | 2,061,055 | How to disable blinking of textview onClick | <p>I have a <code>TextView</code> with an <code>onClickListener()</code>.
When I click on the <code>TextView</code> it blinks.
How to disable this effect?</p>
<p>Here is the XML</p>
<pre><code><TextView
android:id="@+id/descriptionText"
android:layout_width="fill_parent"
... | android | [4] |
1,074,508 | 1,074,509 | forward break label | <p>How can i do forward jumps like this?? Eclipse is complaining label1 is not found...</p>
<p>Thx</p>
<pre><code>public class foo {
int xyz() {
int b = 1;
if (b == 0) {
break label1;
}
// MORE CODE HERE
label1:
return 1;
}
}
</code></pre>
| java | [1] |
3,399,470 | 3,399,471 | How to Deep clone in javascript | <p>How do you deep clone a Javascript object?</p>
<p>I know there are various functions based on frameworks like <code>JSON.parse(JSON.stringify(o))</code> and <code>$.extend(true, {}, o)</code> but I don't want to use a framework like that.</p>
<p>What is the most elegant or efficient way to create a deep clone. </p... | javascript | [3] |
3,939,984 | 3,939,985 | iphone TKCalendar selected date need dot with transparent image | <p>iphone application i am using TKCalendar selected date shows dot by default so i need to display dot with transparent image on particular selected date.
please help me </p>
| iphone | [8] |
5,735,752 | 5,735,753 | Query the android Mediastore for Artist names of Music files | <p>I'm torn about how to implement this because Content Provider URI querys do not support the simple SQL "DISTINCT" query method to return a cursor to the Artists of the songs in the mediastore, removing any duplicate entries.</p>
<p>I can query and get a cursor to all the artists, I'm just torn as to how to remove t... | android | [4] |
1,131,608 | 1,131,609 | help with validate field | <p>how do i check a field contain number and alphabet.</p>
<p>something like $str = 3ab, ab3, a3</p>
| php | [2] |
1,454,862 | 1,454,863 | jQuery tabs with cookie support restore wrong tab position after page refresh | <p>I have tricky problem which I can't completely understand. It's jQuery tabs with cookie support. I've following code:</p>
<pre><code>$(document).ready(function() {
var $tabs = $("#tabs").tabs();
$tabs.tabs('select', $.cookie("tabNumber"));
$('#tabs ul li a').click(function() {
$.cookie("tabNumber", $tabs.tabs... | jquery | [5] |
4,762,050 | 4,762,051 | WordPress/FTP Custom File Upload Security | <p>My file upload routine first checks to make sure the user is logged in to the wordpress application which is hosting the upload form...CHECK!</p>
<p>Here is the code at the top of my uploader utility that does this...</p>
<pre><code>if (!is_user_logged_in()){
die("You Must Be Logged In to Access This");;
}
</c... | php | [2] |
5,584,040 | 5,584,041 | remove duplication | <p>I have a class contains 10 methods which are doing almost the same things apart from one key event. Two examples are given below: </p>
<pre><code>
Public String ATypeOperation(String pin, String amount){
doSomething();
doMoreStuff();
requestBuilder.buildATypeRequest(pin, amount);
doAfterStuff();
}
<... | java | [1] |
5,272,659 | 5,272,660 | how to send many emails in one time by php | <p>i want know
how i can send one mail to 200 user
and i want when the email sendt
it appeare send to:user@mail.com
from:my mail</p>
<p>because i think i see many email like that
to:email1@exaple.com;email2@exaple.com;emial3@exaple.com;
ithink this from bbc</p>
<p>i mean i want every user see sent to this email only... | php | [2] |
3,783,412 | 3,783,413 | Installation error: INSTALL_PARSE_FAILED_NO_CERTIFICATES | <p>At the risk of repeating what appears to be a very common complaint, I think I have a substantial variation on this bug.</p>
<p>The application won't install from Eclipse and this appears in the console: Installation error: INSTALL_PARSE_FAILED_NO_CERTIFICATES.</p>
<p>LogCat provides some illumination: Package com... | android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.