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,638,095 | 5,638,096 | What does this line of code containing a '||' in JavaScript do? | <p>I have read many javascript tutorials and I believe i know many things until now. So i thought that it will be a good idea to see a few script written in this language. My problem is that i don't know what this line really does:</p>
<pre><code>var b=Number(ls.autofarm)||0,g,h,i,d,j;
</code></pre>
<p>I know the ba... | javascript | [3] |
2,780,744 | 2,780,745 | PHP merging two arrays, improving the code | <p>I have the following tested code that after a couple of tries does the job to filter unique results out of two merged arrays. I previously tried using array_diff, array_diff_key, array_diff_assoc to no avail until I settled with the following.</p>
<ul>
<li>The second needs to first exclude empty values (like 0) usi... | php | [2] |
1,330,654 | 1,330,655 | Read ebcdic file with .net | <p>I have an ebcdic file with header and footer (each 24 bytes). I want to remove those header and footer with .net application. </p>
| c# | [0] |
225,395 | 225,396 | setTimeout stack over flow | <blockquote>
<p>
setTimeout stack over flow..
$(document).ready(function(){
counterFN();</p>
<pre><code> var theCounter = 1;
function counterFN()
{
$(".searchInput").val(theCounter);
... | jquery | [5] |
5,918,866 | 5,918,867 | Google Map marker on the basics of radius in cakephp | <p>I have a DB that has a series of zip code that I would like to plot on a Google Map. What I would like to do is select a lat long from my db records and have the map display the selected record and all pertaining records within a 10,15,25 mile radius and display them.. Can any of you gurus out there point me in the ... | javascript | [3] |
2,416,606 | 2,416,607 | Making DataGriView Row(S) unselectable | <p>I have a DataGridView with 3 rows.</p>
<p>I am adding a fourth row programmatically.</p>
<p>Is there any way to prevent the user from selecting the three rows after I add the fourth row.</p>
<p>Thanks a ton everyone</p>
| c# | [0] |
4,322,562 | 4,322,563 | Occasionally get error "Sorry, this video cannot be played" when reading from SD card | <p>My videos from SD card usually plays fine, and I am switching between multiple movies, but some times I get an error: Sorry, this video cannot be played for movie that had played before, is seems that the error is appearing randomly.</p>
<pre><code>VideoView mVideoView = (VideoView)findViewById(R.id.sim_videoView);... | android | [4] |
5,856,337 | 5,856,338 | NullReferenceException in Page_Load | <p>I have developed my project in asp.net 3.5. It works fine in localhost, when i published in the web sometimes its working fine but sometimes i am getting the following error. I think some error while conecting to the server but dont know exactly. Please help me to do it fine.</p>
<p>Server Error in '/' Application.... | asp.net | [9] |
1,418,147 | 1,418,148 | UIButton like blink | <p>hello friend how to make uibutton like blink i have use bellow code but it is not like blink
in my app i am developed recording so i want to like that button</p>
<pre><code>CABasicAnimation *pulseAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
pulseAnimation.duration = .5;
pulseAnimation.... | iphone | [8] |
4,186,965 | 4,186,966 | How is null implemented in Java? | <p>I know that null is not a data type.</p>
<p>But <code>null</code> can be only assigned for any type of <code>Object</code> and <code>String</code>.</p>
<p>Example:</p>
<pre><code>Object o = null; // it tells that null is an object
String b = null; // it tells that null is of string type
</code></pre>
<p>Here <co... | java | [1] |
1,422,251 | 1,422,252 | C# Use a class that implements an interface without adding a reference to the assembly that defines the interface | <p>I have 3 assemblies written in C#, namely A.exe, B.dll, C.dll</p>
<ul>
<li>C.dll defines a public interface IfaceC.</li>
<li>A.exe defines a public class ClassA : IfaceC</li>
<li>B.dll uses ClassA but does not make explicit use of IfaceC</li>
</ul>
<p>My question: is it possible to compile B <strong>without</stron... | c# | [0] |
4,322,040 | 4,322,041 | how do you remove the navigation bar on Android? | <p>When I listen to a YouTube video fullscreen in landscape on my Galaxy Nexus, the navigation bar on the right disapear after a few seconds (the bar which contains the "back", "home" and "recent apps" buttons ). </p>
<p>I want to do the same thing when a user watch a video in my app. What is the code to hide the navi... | android | [4] |
1,977,714 | 1,977,715 | How to fix scroll up in jquery? | <p>let's assume i have a div element, with static height and width</p>
<pre><code><div style="height: 500px; width: 300px;" id="scrollable">
</code></pre>
<p>how can i fix the moment, when mouse scrolls up on this div?</p>
<p>is there something like </p>
<pre><code>$("#scrollable").scrollup(function()
{
... | jquery | [5] |
4,776,630 | 4,776,631 | How to get debug printouts from PHP? | <p>I don't have access to the apache server or whatever is running on the server. I just have a free account with a web host. I do apparently have access to the .htaccess file, but I'm not sure if I feel safe enough to temper with the "nuts and bolts" as it were. So instead I tried to enable debug printouts in my php s... | php | [2] |
4,359,917 | 4,359,918 | $.fn or Function.prototype | <p>I'm trying to get this to work. </p>
<pre><code>$.fn.createDelegate = function(scope){
var fn = this;
return function() {
return fn.apply(scope, arguments);
}
}
</code></pre>
<p>The below version works but I thought they were both the same. The first being a shorthand way of writing the second.
Or ma... | jquery | [5] |
4,527,782 | 4,527,783 | how to check if textarea field exist on form with jquery or javascript? | <pre><code>$("textarea").cleditor({ width: "800px", height: "300px" })[0].focus();
</code></pre>
<p>but when i do not have textarea felad i get</p>
<pre><code>Error: $("textarea").cleditor({width: "800px", height: "300px"})[0] is undefined
</code></pre>
<p>how can i check if textarea field exist. </p>
<p>I try ($("... | jquery | [5] |
595,815 | 595,816 | How to convert a byte array to Stream | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4736155/how-do-i-convert-byte-to-stream-in-c">How do I convert byte[] to stream in C#?</a> </p>
</blockquote>
<p>I need to convert a byte array to a Stream . How to do so in C#?</p>
<p>It is in asp.net applicat... | c# | [0] |
383,377 | 383,378 | How to find elements with jquery when dragging element | <p>I have couple of elements that are boxes, i want when i drag one element above some of the boxes, to get the specific id of the box.I want to get only these id's that my dragging element is being above them.So how can i do such a thing ? </p>
| jquery | [5] |
1,034,874 | 1,034,875 | Show a div tag only if a person is logged in | <p>I was trying to incorporate a functionality in my ASP.NET such that a <code>DIV</code> tag which contains the <code>Profile Navigation Menu</code> should only be visible if a person is logged in.
I know the condition on how to if the person is logged in or not but wanted to know the method to toggle the div tag o... | asp.net | [9] |
5,514,882 | 5,514,883 | Flush the extracted file to the disk in python | <p>This is my code :</p>
<pre><code> x=zipfile.ZipFile('C://X/malware.zip')
for i in range(1):
x.extractall('C://E',pwd='infected')
start=time.clock()
print str(start)
while flag==1:
if os.path.exists('C://E/malware.exe')==True:
flag=1
... | python | [7] |
2,227,780 | 2,227,781 | Drawable.setColorFilter() not working on Android 2.1 | <pre><code>Drawable d = new BitmapDrawable(BitmapFactory.decodeResource(
getResources(), R.drawable.ic_watch));
d.setColorFilter(new LightingColorFilter(color, lightenColor));
imageView.setImageDrawable(d);
</code></pre>
<p>On Android 2.2 (emulator) and 2.3 (N1) setColorFilter() works fine. Why doesn't it work on ... | android | [4] |
4,282,423 | 4,282,424 | Simple jQuery Show / Hide | <p>I have an input which is hidden which carrys a value based on that value I would like to show a menu item.</p>
<p>i.e. if value in field = 1 than show menu item 1
else if value in field is not 1 then hide menu item 1</p>
<p>my jquery</p>
<pre><code>$(function() {
$("#sessionVal".val(==1){
$("#adm... | jquery | [5] |
2,885,142 | 2,885,143 | regular+required validation | <pre><code><asp:TextBox ID="Textboxtotalamount" OnTextChanged="AmountChanged"
Width="90px" AutoPostBack="true" runat="server">
</asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator" runat="server"
ControlToValidate="Textboxtotalamount"
SetFocusOnError="True" Va... | asp.net | [9] |
958,563 | 958,564 | When i click on a option how to make that option as selected in JQUery? | <p>HI,
i am having a select dropdown like</p>
<pre><code> <select id="listForms">
<option value="Personal Form" id="25">Personal Form</option>
<option value="Employee Details Form" id="24">Employee Details Form</option>
<option value="Contact Form" id="45">Contact Form</opt... | jquery | [5] |
5,614,410 | 5,614,411 | iphone - how the file system responds to accessing the same file at the same time? | <p>Suppose two asynchronous operations try to read or write in the same file on a given folder. How does iOS deals with that? Is the operations queued? The app crashes? the file get corrupted?</p>
<p>In case it is up to the programmer to deal with this, where do I find informations or an example on how to deal with ra... | iphone | [8] |
4,476,530 | 4,476,531 | UILabel text align right in UITableViewCell | <p>I'm not sure if I'm totally missing something, but I thought in UIStoryboards, I could create a UILabel, have it align its text to the right, and place it in near the LHS of the table view cell (see picture).
<img src="http://i.stack.imgur.com/Cc0sZ.png" alt="enter image description here"></p>
<p>However when I run... | iphone | [8] |
1,965,577 | 1,965,578 | How can I debug my android app on NexusOne | <p>I have rooted my NexusOne. I can get 'adb shell and su'.</p>
<p>But when I deploy and run my android app on NexusOne and start my application. Under DDMS (connected to the phone of course), I DO NOT see my application. I see some apps but not mine. </p>
<p>How can I make my application visible under DDMS so that ... | android | [4] |
5,927,329 | 5,927,330 | String compare C# - whole word match | <p>I have two strings:</p>
<pre><code>string1 = "theater is small";
string2 = "The small thing in the world";
</code></pre>
<p>I need to check weather the string "the" is present in the strings or not.<br>
I can use the contains function, but can it do a whole word match? i.e it should not match with "theater" of... | c# | [0] |
5,831,757 | 5,831,758 | How can I grant anonymous access to an httpHandler that uses wildcards in a site that requires authentication? | <p>I have an application which requires authentication, but has some related services which can call into the application as anonymous. The calls are made via httpHandlers, some of which use wildcards. For the httpHandlers that do not use wildcards, I can manage the security by using the location element in web.config:... | asp.net | [9] |
5,261,524 | 5,261,525 | Problem While receiving events from a thread | <p>I'm Doing a project on FileTransfer in which i have a listview , i will get events from one of my class file for updating the percentage of the file sent so far,after receiving it i will place the percentage in my listview ,while doing that the listview got
a flickering effect how to avoid it.i used application.doev... | c# | [0] |
2,734,744 | 2,734,745 | How to exit adb logcat | <p>The following terminal command shows the logcat. </p>
<pre><code>$> $SDK/platform-tools/adb logcat
</code></pre>
<p>But how do I get out of it to go back to the terminal prompt? I tried kill-server, exit etc.</p>
| android | [4] |
2,733,775 | 2,733,776 | Using bitmap font for displaying and editing texts | <p>One of the problems i'm facing now, is displaying complex text (English + Persian/Arabic).
The texts that have both English and Persian/Arabic letters, not display in correct order.
For solving this issue, I created a Bitmap Font library that draws these complex texts correctly. Now i want to convert all the texts i... | android | [4] |
1,358,112 | 1,358,113 | Changing last 5 char of array | <p>I have a program that encrypts files, but adds the extension ".safe" to the end. So the end result is something like "file.txt.safe"</p>
<p>When I go to decrypt the file, the user enters the file name again: "file.txt.safe" which is saved to a char. Now I want to remove ".safe" and rename the file to its original n... | c++ | [6] |
2,142,340 | 2,142,341 | How to get the data value from a list item, using jquery, when it is clicked | <p>I have some Html like:</p>
<pre><code><div id="adiv">
<ul>
<li data-id="3">Cat</li>
<li data-id="4">Dog</li>
</ul>
</div>
</code></pre>
<p>What I wanted was to alert the data-id value when the user clicks the list item.</p>
<p>In ... | jquery | [5] |
3,527,776 | 3,527,777 | php pdo error handling difficulty | <p>I am using firebug to see what is being returned with JSON and i get this array</p>
<pre><code> Array
(
[0] => 00000
)
</code></pre>
<p>With Mysql i could simple do <code>or die(mysql_error())</code>.</p>
<p>Here is my query, I just changed it from mysql to prepared statement and now it isn't working.</p>
... | php | [2] |
615,549 | 615,550 | getType in wordnet java API | <p>I am using wordnet java API.
I have defined a</p>
<pre><code>WordNetDatabase database = WordNetDatabase.getFileInstance();
Synset[] synsets = database.getSynsets(wordForm);
System.out.println("type " + synsets[i].getType());
</code></pre>
<p>when I do this print, I get value 1 for "new york".</p>
<p>I am trying ... | java | [1] |
2,660,366 | 2,660,367 | Where to download old iphone SDKs? | <p>Not immediately seeing where to download legacy versions of the iphone SDKs. I can get the latest 3.1.3 release and 3.2 betas off the Apple developer site, but a lot of example code I'm finding online was written for 2.0-2.2 and it is still relevant code, but I can't build them because I don't have the 2.0-2.2 SDK. ... | iphone | [8] |
983,276 | 983,277 | Update foreground activity from background | <p>I have <code>ListView</code>, populated by an SQLITE table, that is updated by bluetooth spp input through the use of a <code>Handler</code>. (A bluetooth barcode scanner performs a scan-and-increment function to modify lines in the table.) I <code>startActivityForResult</code> on a <code>ListItemClick</code> to br... | android | [4] |
1,565,312 | 1,565,313 | How to read instance variables from another file without instantiating the class? | <p>I'm relatively new to Python and I'm having some trouble importing a variable to use it in another class. I did look at several other questions on this topic and tried to make it work, but it seems the way I set up this program early on might be the problem. I'll simplify what's going on so there's less to read...</... | python | [7] |
2,233,852 | 2,233,853 | Log in and Sign up screens | <p>I have following Activities(imagine Pinterest app):</p>
<p><strong>WellcomeActivity</strong> with two buttons - Sign up and Log in</p>
<p><strong>LogInActivity</strong> you come here from WellcomeActivity</p>
<p><strong>SignUpActivity</strong> you come here from WellcomeActivity</p>
<p><strong>MainActivity</stro... | android | [4] |
5,315,093 | 5,315,094 | How can i send and jpg image from my server to my c# app? | <p>My server is running php and I want it to be able to send me images. For instance "profile.jpg".</p>
<p>In C# i just populate a bitmap image with the source, but how do I create a source, a file that outputs the images binary data?</p>
<p>I have this:</p>
<pre><code><?php
$file = 'profil.jpg';
$image = imagecr... | php | [2] |
2,731,271 | 2,731,272 | Displaying php variables for the value in text boxes | <p>I need to have users choose a task to edit from a drop down box. I need to take this value and perform a <code>SELECT</code> query to fill out a form with the results of this query. I have the drop down menu working fine. I am accurately passing the value through the <code>$_POST['taskID']</code> variable. I am load... | php | [2] |
3,459,736 | 3,459,737 | Please recommend a simplest php framework | <p>Just for learning, as easy to learn as possible. thanks!</p>
| php | [2] |
4,383,770 | 4,383,771 | function concept | <pre><code>void execute(int &x,int y=100)
{
x=x+y;
cout<<x<<endl;
}
void main()
{
int a=5,b=6;
execute(b);
}
</code></pre>
<p>will the following program work in spite of not assigning a default value to the x(formal parameters in the fuction prototype).</p>
| c++ | [6] |
3,764,470 | 3,764,471 | Android: How do I circumvent invalidation / redraw of not effected layers? | <p>I have a relative layout with several ImageViews (with transparent areas) above each other. The problem is: if I invalidate one of those, all other's onDraw() methods are called too. Is this normal?
I don't want all Layers (Views) to redraw since this is a big performance issue- I only want the invalidated view to r... | android | [4] |
2,795,210 | 2,795,211 | How to make text revealed when hovering? | <p>I found this effect done in Flash. Is there a similar method to solve this in JavaScript?
Look at the link below and hover over 2013.</p>
<p><a href="http://www.iflymagazine.com/?locale=no_en" rel="nofollow">http://www.iflymagazine.com/?locale=no_en</a></p>
| jquery | [5] |
2,656,106 | 2,656,107 | SMS Delivery Report in Android | <p>I want to get sms delivery report i am trying many examples but,one flow not displaying delivery report like if my balance is 0 when sms sending in my code is not displaying sms delivey report failed otherwise shows report like no service etc.i want to find sms sending failed delivery report when my balance is 0.</p... | android | [4] |
1,761,514 | 1,761,515 | Copy XML file from Server to iphone? | <p>I want to copy the xml file from server to save it to locally, because if I will send request to server again and again, it will take time, so I want to copy the xml to local resources whenever app starts, then parse the local xml, </p>
<p>how can I do it?</p>
| iphone | [8] |
1,651,566 | 1,651,567 | RecursiveIterator copying file to folder where it doesn't exist | <p>I've been trying to come up with a way to recursively add a specific file to all newly created folders.</p>
<p>All I've been able to come up with is listing all the folders/files.</p>
<pre><code>foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator('.')) as $filename)
{
echo "$filename\n &l... | php | [2] |
1,661,223 | 1,661,224 | c++ undeclared identifier in template | <p>I have the following code</p>
<pre><code>#define HANDLE_EX(aa) catch(x::aa *ex)\
{\
##aa* ex1 = dynamic_cast<##aa*>(ex);\
.... and so on
}
</code></pre>
<p>the first line causes an error "'ex1': undeclare identifier
anyone have any idea what that means here?</p>
| c++ | [6] |
6,013,646 | 6,013,647 | Php text spinner | <p>i spent time writing a rss feed aggregator and have come to find out it completely has no impact on seo. infact it could be damaging my website. i cant get rid of it as its a commonly used resource. So was wondering is there any hardcore php text spinner(synonimizer) out there. that way i could server crawlers/spide... | php | [2] |
6,005,305 | 6,005,306 | C++ class object memory map | <p>When we create an object of a class what does it memory map look like. I am more interested in how the object calls the non virtual member functions. Does the compiler create a table like vtable which is shared between all objects?</p>
<pre><code>class A
{
public:
void f0() {}
int int_in_b1;
};
A * a = new A;
... | c++ | [6] |
5,693,242 | 5,693,243 | How to define a Method with no return in C# | <p>I'm a beginner in C#.
I want to define a Method that has an input. And the input will be shown in an alert box with this Method.
In other words, the duty of this method is receiving a variable.
Every where that I call this method, the message will be alerted.
I want to know how to define and How to call.</p>
| c# | [0] |
4,104,495 | 4,104,496 | how to create own function in JQuery? | <p>how to create own function and call it another function? like-</p>
<pre><code>$('.mycls li').hover(function() {
var divid = $(this).find('li').attr('some_attr');
call myfunc(divid);
});
function myfunc(divid)
{
$(divid).show();
//I want to hide rest all divs
$('div#info1').hide();
$('div#info2').hide();
$('di... | jquery | [5] |
1,176,990 | 1,176,991 | Jquery .remove() undo? | <p>Is there any way to achieve this? I am using a pagination plugin that reads the number of li's inside my ul and determines the number of numbered links to spit out.</p>
| jquery | [5] |
3,415,929 | 3,415,930 | Android AlarmManager did not work after process stops | <p>I want to set an alarm via <code>AlarmManager</code> class. Normally, It works fine and everything is OK.
But if my application process stops or Phone turns off and turns on again, The alarm wont start. Any help?
or other service that android provides?</p>
<p>thanks</p>
| android | [4] |
2,619,953 | 2,619,954 | What object is .getElementById() originally attached to? | <p>I'd like to modify the prototype of whatever object is responsible for <code>.getElementById()</code></p>
<p>I know <code>document</code> does not have a prototype, so what object is <code>.getElementById()</code> actually attached to?</p>
<p>Edit: so turns out document does have a prototype (thanks Kevin). I feel... | javascript | [3] |
1,536,268 | 1,536,269 | How to get facebook user info using fb:login-button | <p>I'm trying to implement facebook connect in website, and have a problem to access the facebook user info, i'm using FB.api to see info but throw "undefined" in my alert.</p>
<p>My code is here:</p>
<pre><code><div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB... | javascript | [3] |
985,483 | 985,484 | Pulling data from a multidimensional array based on data in a sub-array | <p>I have a flat delimited file structured like this (real one is much larger):</p>
<pre><code>"15616-01","joe,15616,15616-01.net"
"15616-02","harry,15616,15616-02"
"3874-03","mike,joe,paul,frank,bill"
"6487-10","tony,joe"
"6510-14","phil"
"12631-08","steve"
</code></pre>
<p>I need to pull the file into a multi-dimen... | php | [2] |
2,809,862 | 2,809,863 | Add "menu" on every listview item | <p>So I'm developing this app, which has a listview in it, but I want to add the "three-dot" icon in the corner, and when you press it, an awesome menu will popup. Like this in the Google Play app: <a href="http://imgur.com/a/cGb2Q" rel="nofollow">http://imgur.com/a/cGb2Q</a></p>
<p>I've seen many apps that have it, s... | android | [4] |
237,224 | 237,225 | iPhone app pricing model question? | <p>I have heard there has been some studies of the apple app store for the iphone. It was a comparison between having a free application supported by ad vs a .99 cent application. .99 cents seems to be the sweet spot for a lot of the smaller applications. Anyone know where those studies were done? Are people having be... | iphone | [8] |
4,492,133 | 4,492,134 | Android how to create activity only if it wasn't created yet | <p>I have a problem cause when I go to different activities using startActivity function,
they always get created from scratch. Even if activity A was visited before, when I go to activity B and then A again, activity A is created again.</p>
<p>The problem is with back button, cause if I go to Activity A then B then A... | android | [4] |
4,841,243 | 4,841,244 | PHP: check from which page the link is directed | <p>lets say i have a page <code>hit.php</code> in my website and the link is to this page is available on every\many pages in the website..</p>
<p>lets say i click <code><a href"hit.php">HIT</a></code> from any page.....</p>
<p>is there a way when <code>hit.php</code> is loaded i could know that the page ... | php | [2] |
3,258,942 | 3,258,943 | Upload to ftp using php | <p>Is it possible to upload files (even big files) to a ftp using PHP?</p>
<p>Been reading about <code>ftp_connect()</code> and it looks like I can, or can't I?</p>
<p>I had a look at this example, it's in Italian but you can read the code anyway, if that does what I'm asking, will I have to add an html form? I need ... | php | [2] |
3,443,836 | 3,443,837 | Form data not inserting into mysql database | <p>I got this script from some website for an invoicing system but cant get it to insert into my database please help</p>
<p>this inserts into the appropriate database, I have not yet created the database can any one give me the structure of the table and explain this code?</p>
<pre><code><?php
$query_ins = ... | php | [2] |
5,327,885 | 5,327,886 | Includes and GET | <p>I currently have profiles on my website with a unordered list for the navigation, when a list item is clicked it loads the content from a AJAX call.</p>
<pre><code>"Users Uploads" -> AJAX -> request.php with $_POST['id'] = '1' & $_POST['request'] = 'users_uploads' -> include_once('user_uploads.php');
<... | php | [2] |
5,949,817 | 5,949,818 | I'm having trouble getting file_get_contents() to work on my server | <p>I've got a php file on my server that looks like this:</p>
<p>echo file_get_contents('http://server.com/some.file');</p>
<p>and I get the following error:</p>
<p>Warning: file_get_contents(http://server.com/some.file) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found... | php | [2] |
1,293,369 | 1,293,370 | Onclick delete table row jQuery | <p>I've got a table that I can't seem to delete the rows from no matter what I try.
Its a simple table of 5 columns and a few rows generated from a php/mysql lookup using Json. I'd eventually like to delete the row from the mysql table with the button click but I'm stuck with the "easy" part of deleting the row in jque... | jquery | [5] |
3,592,224 | 3,592,225 | Javascript Array extension | <p>Just wonder.
I have extended javascript Array object using its prototype as follows:</p>
<pre><code><html>
<head>
</head>
<body>
<script type="text/javascript">
function SomeMethod(){
alert('Hello');
}
if(typeof Array.prototype.SomeMethod ==='undefined' ){
Array.prototype.S... | javascript | [3] |
1,521,344 | 1,521,345 | Read a number of random lines from a file in Python | <p>Could someone show me how I could read a random number of lines from a file in Python?</p>
| python | [7] |
2,810,787 | 2,810,788 | Binding click to a repeated div ID | <p>I'm trying to create a <code>div</code> popup gallery type thing. But I'm having an issue with my approach.</p>
<p>I have a few linked thumbnail images, which link to the large image.
Each of these images looks like so</p>
<pre><code><a href="www.google.com" id="galImage">
<img src="http://www.savoryspice... | jquery | [5] |
597,876 | 597,877 | Files.size() implementation in Java 7 | <p>Is there any implementation difference between <code>file.length()</code> and <code>Files.size()</code> in Java? Java 7 introduced <code>Files.size()</code> method.</p>
<p>Thanks in advance.</p>
| java | [1] |
841,239 | 841,240 | Does getting a stack overflow only affect the thread it happened in? | <p>To put it in context :
So lets say I was playing an online game and I created a stack overflow. Would that effect everyone on the server playing as well, or just me?</p>
| java | [1] |
5,092,711 | 5,092,712 | PHP - Processing each line of a textarea form in a script | <p>I've learned it's possible to trim a string from a textarea and put break tags after it, so each sentence written at a new line in the textbox will also be written at a new line in the PHP file.</p>
<p>This is the snippet:</p>
<pre><code><html>
<body>
<?php
$text = trim($_POST['textarea']);
$text =... | php | [2] |
5,069,467 | 5,069,468 | Get user data from android application | <p>I have created an android application where user need to login to store some info like their score, level and so on which are not needed to make secured or open for all. </p>
<p>Now don't want to prompt user to login or sign up, My question is how my application can automatically grab users identical info like his... | android | [4] |
4,722,312 | 4,722,313 | Implement a top level window from a broadcast receiver | <p>I have a broadcast receiver that listens for incoming calls, then displays a popup. The popup is a dialog type of theme and has FLAG_NOT_FOCUSABLE and FLAG_NOT_TOUCHABLE - basically, it's an informational window that goes away after x seconds, and is not meant to interfere or take focus over anything else.</p>
<p>T... | android | [4] |
1,698,667 | 1,698,668 | Javascript, getting value using key press is always one character behind the latest? | <p>Is there anyway around this?</p>
<p>If i pressed 'St', by the time i had pressed the t, if i were to output the input textfield.value in the onkeypress/onkeyup/etc function, i would only get 'S'??</p>
<p>How do i get rid of this lag?</p>
| javascript | [3] |
5,458,803 | 5,458,804 | Best way to name thumbnails and look them up in PHP | <p>This PHP code below will take an image and add the word <strong>_thumb</strong> in between the filename and file extension </p>
<p>This file is called up to 50 times on some pages to show user photo, please not I only linked to a full path image on another server for this example, the file path is usually pulled fr... | php | [2] |
1,935,427 | 1,935,428 | Tail Recursion in java | <p>Is this a good example to show tail recursion?</p>
<pre><code>public printName(){
System.out.println("Smith");
printName();
}
</code></pre>
<p>I'm not intending to do this in real life, but i put this as an example for my exam. Is this one correct?</p>
| java | [1] |
3,347,215 | 3,347,216 | when clicking the div hide other divs | <p>when I click the div it will open the subgroups,I want to when opening the current one close the others I wrote a jqquery for this but because I get the class whole divs will hide I want just their children to hide so I should use the id but the Id is not working as I tested here is my function,my div has class name... | jquery | [5] |
759,732 | 759,733 | Difference between $a == $b and $a === $b if a and b are objects | <p>What is the difference between <code>$a == $b</code> and <code>$a === $b</code> if <code>a</code> and <code>b</code> are <code>objects</code> (that shouldn't be typecasted)?</p>
<p>EDIT: I know there's a difference if a and b would be bool/integer (<code>true == 1</code> is true but <code>true === 1</code> is false... | php | [2] |
1,895,945 | 1,895,946 | WP8 App misbehaving due to StreamWrite in JavaScript | <p>I would like to save the results calculated on html page in a <strong>textfile</strong> using javascript.</p>
<pre><code><script type="text/javascript">
window.onload = function () {
var sw : StreamWriter = new StreamWriter("HTML_Results.txt");
sr.Write('xyz");
*** calculations ******
sr... | javascript | [3] |
239,849 | 239,850 | Listview of installed apps on android | <p>I want to make a list view that shows the name and icon of all applications in user's device i found some codes but i don't know how to use them or what do they mean please help me to make a list because that's my biggest problem :)</p>
| android | [4] |
2,831,410 | 2,831,411 | How to get comma seperated values from the string in php | <p>I have a string <code>$employee="Mr vinay HS,engineer,Bangalore";</code>. i want to store Mr vinay H S in <code>$name</code> ,engineer in <code>$job</code> and Bangalore in <code>$location</code>. how to do this </p>
| php | [2] |
3,044,397 | 3,044,398 | Android handling many HTTP requests | <p>Im building a application that needs to poll a webserver alot. Right now i create a recursive method that requests the server and when response is returned it starts all over again, i might put in a sleep in between later.</p>
<p>Now because i need this intensive request polling. I would like to optimize the actual... | android | [4] |
314,048 | 314,049 | Utility started from python code doesn't write in file | <p>I have two utilities written in C++, TCP/IP server and client that I have used for years.
Server opens designated file and waits for client to connect. After connection has been established the server starts to send file's content. The client receives it and saves in a file.
Now, I want to write a python script to s... | python | [7] |
4,349,010 | 4,349,011 | jQuery Previous and Forward issue | <p>I am beginner in jQuery.</p>
<p>I have three boxes. Every box has its own Prev/Next navigation. When I click on any box, text move, which is fine. But when I click on Prev/Next navigation (except first one) it doesn’t move. Please guide me how can I fix that?</p>
<p>Please check the example to understand my requir... | jquery | [5] |
4,066,378 | 4,066,379 | Python - Find non mutual items in two dicts | <p>Lets say I have two dictionaries:</p>
<pre><code>a = {'a': 1, 'b': 2, 'c': 3}
b = {'b': 2, 'c': 3, 'd': 4, 'e': 5}
</code></pre>
<p>What's the most pythonic way to find the non mutual items between the two of them such that for <code>a</code> and <code>b</code> I would get: </p>
<pre><code>{'a': 1, 'd': 4, 'e': 5... | python | [7] |
4,078,828 | 4,078,829 | Wrap dollar values in a span with jQuery? | <p>I've got a bunch of h4 tags that I want to wrap in a <code><span class="red"> </span></code> </p>
<p>Some of the text is like this: $12 and some has a space like $ 5</p>
<p>How can I wrap all instances of $ and the numbers that follow with jQuery?</p>
<p>Let me clarify. I want to have this <code><h... | jquery | [5] |
2,404,946 | 2,404,947 | Anybody know what api this javascript is coming from? | <pre><code>object.define("cryption", "abc", function(abc){ //do something with abc});
object.use("cryption", function(xxx){//do something with xxx});
</code></pre>
<p>I've never seen this api before, wondering where can I find some documentation for that?</p>
<p>console.log(object.define) gives <code>function() { [n... | javascript | [3] |
1,219,036 | 1,219,037 | Accordion active bar with checkbox | <p>I have created the following accordion in jquery:</p>
<p>But I need to add a check box into the accordionButton but I don't want the hidden panel slide down when I click on the the checkbox.</p>
<p>Here is the example:</p>
<p><a href="http://jsfiddle.net/zidski/NU7Gp/4/" rel="nofollow">http://jsfiddle.net/zidski/... | jquery | [5] |
128,324 | 128,325 | How can I transfer the selected text and value of one select box to another with jQuery? | <p>If I have two selects like this?</p>
<pre><code><select id="A">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
<select id="B">
... | jquery | [5] |
1,422,265 | 1,422,266 | How to avoid Outlook security alert when sending outlook appointment from C# program | <p><br/>
I wrote a function in order to send appointment via microsoft outlook. The method works but before sending the appointment, Outlook security alert pops out and ask if I allow/deny access.
<br/>this is my code:</p>
<pre class="lang-cs prettyprint-override"><code>public static void SendAppointment()
{ ... | c# | [0] |
1,696,824 | 1,696,825 | Error handling with PHP classes | <p>I'm working on my first "public" class, meaning that i will release it under the GPL for everyone. I'm giving extra-attention to documentation, however, i gave zero attention to error handling. How do you guys suggest that i do that? Throw exceptions? I never worked with error handling before, just the basic try cat... | php | [2] |
133,036 | 133,037 | How to change the content of a div dynamically when the input changes? | <pre><code><input type="text" class="input-text qty" title="Qty" value="1" maxlength="12" id="qty" name="qty" />
<div id="qtyvalue"><div>
</code></pre>
<p>There is an input text box on the page. I'm using Javascript to output the qtyvalue to the following div.</p>
<pre><code>var qty =document.getEle... | javascript | [3] |
2,160,650 | 2,160,651 | Split array into key => array() | <p>Consider the following array:</p>
<pre><code>$array[23] = array(
[0] => 'FOO'
[1] => 'BAR'
[2] => 'BAZ'
);
</code></pre>
<p>Whenever I want to work with the inner array, I do something like this:</p>
<pre><code>foreach ($array as $key => $values) {
foreach ($values as $value) {
echo $value... | php | [2] |
4,191,325 | 4,191,326 | optional parameters, overloaded methods or properties | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/251868/should-you-declare-methods-using-overloads-or-optional-parameters-in-c-4-0">Should you declare methods using overloads or optional parameters in C# 4.0?</a> </p>
</blockquote>
<p>Hi have a method that is ... | c# | [0] |
4,232,279 | 4,232,280 | jquery append to element when it appears with ajax displaytag | <p>Lets say I may (but also may not) have an element with class <code>order</code> in my DOM.
It maybe create on page load but also, after successful ajax request. My question is, how can I add some live event, that will append something to my element based on it class?</p>
<p>Flow would be like this:</p>
<p>1.Openin... | jquery | [5] |
1,109,876 | 1,109,877 | How to remove gray color from the webview? | <p>I have loaded pdf file in <code>uiwebview</code>. But in <code>webview</code> its show gray color. I have tried to remove gray color, but without any success. I have used [UIColor clearcolor]. But that is not working. Can you give me idea how to remove gray color from the UIwebview?</p>
| iphone | [8] |
1,766,592 | 1,766,593 | attempting to check if a circle overlaps, is inside of, or outside of, a second circle | <p>I have these three methods to check if a circle is inside another circle, everything works except for the fact that the intersecting circle is marked as inside and intersecting. I've been reading articles but none of the suggested options seem to make it work correctly. Here are my methods:</p>
<pre><code> publi... | java | [1] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.