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 |
|---|---|---|---|---|---|
4,674,397 | 4,674,398 | jQuery height() problem | <p>How do we go about accessing a height for a Gridview? The Gridview has a CSS attribute called height that is set to 800px, but I haven't been able to access anything with height()</p>
<p>$('ctl00_MainContent_grdPersonResults').height() = null </p>
<p>Any ideas?</p>
| jquery | [5] |
1,018,015 | 1,018,016 | Tool that detects duplicate javascript function names in a web page? | <p><strong>Background</strong></p>
<p>We have a web application in which several developers have written several .js files that manipulate the DOM and the problem of duplicate function names has crept into our application.</p>
<p><strong>Question</strong></p>
<p>Can anyone recommend a tool that will warn us when we ... | javascript | [3] |
2,620,213 | 2,620,214 | Please explain Date object type conversion | <p>I just found a strange behaviour in SpiderMonkey and V8 javascript engines. Suggest finding an explanation would be a good school for everyone</p>
<p>The strange working code:</p>
<pre><code> var x = (new Date()).setHours(24, 0, 0, 0);
typeof x; // "number"
</code></pre>
<p>The working-as-expected code:</p>
<pr... | javascript | [3] |
3,347,826 | 3,347,827 | PHP installation on windows | <p>I want to install php in my system.For this
I have downloaded the php-5.3.5.tar.bz2 (zip file).
Now from this installation help link
<a href="http://www.php.net/manual/en/install.windows.installer.msi.php" rel="nofollow">http://www.php.net/manual/en/install.windows.installer.msi.php</a>
It is saying "Run the MSI in... | php | [2] |
6,000,513 | 6,000,514 | shouldOverrideUrlLoading is not working | <p>In my application, <strong>shouldOverrideUrlLoading</strong>() is not called on 4.0.3 version. I have tested it on 2.2 and 4.0.1 and they all are working fine.
Device name is <strong>HTC verizon</strong>.</p>
<p>My intent is to provide custom activities for mailto: and tel: links present in the page. Any ideas on ... | android | [4] |
3,380,001 | 3,380,002 | Method executing differently when same arguments are passed | <p>Same arguments passed on the same method for the same object. It usually will display true, which is what I expect. But... sometimes it displays false. About 2-3 out of 100 times. What is wrong with this method that would be causing this behavior?</p>
<p>year, month, and day are instance variables containing "... | java | [1] |
3,008,377 | 3,008,378 | Why are conditional statements not working in this example? | <p>I'm a bit perplexed with this code. <code>$this->product</code> is an Object with 12 vars. The var_dump indicates that <code>$key</code> is a string.</p>
<pre><code>foreach ($this->product as $key => $val) {
if (($key !== "id") || ($key !== "weight")) {
var_dump($key);
} else {
prin... | php | [2] |
5,788,593 | 5,788,594 | Which is fine language for asp.net - C# or VB | <p>im going to digg asp.net deeply.To begin,i want to know which language has more features and advantages over the asp.net whether c# or VB.</p>
| asp.net | [9] |
2,431,958 | 2,431,959 | Convert aspx content to pdf | <p>I am using iTextSharp for convert aspx content to pdf . But facing problem for https site where page is secured and can't don lad as pdf. and geting error like
"Internet explorer was not able to open this internet site. The requested site </p>
<p>is either unavailable or cannot be found . Please try again later"</p... | asp.net | [9] |
2,808,074 | 2,808,075 | jQuery calls twice a function | <p>When i click the .kontrahent div i want to use another jquery function to load xml document and append it to #info div, but when i click it get's called twice, i have no idea why it's not working. I have checked delegate,live,click and on methods.</p>
<p>jQuery code:</p>
<pre><code>$("#dane").on('click',".kontrahe... | jquery | [5] |
1,584,483 | 1,584,484 | Sql Writer refuses to start | <p>I've got Visual Studio 2012 installed on Windows 7 64 bit machine. I am trying to install SQL Server express local DB amd get an error when the installer tries to start services. Here is the exact error message :</p>
<pre><code>Service "SQL Server VSS Writer failed to start. Verify you have sufficient privileges... | asp.net | [9] |
5,221,143 | 5,221,144 | Confusion with Forms authentication and visual studio default asp.net site | <p>I've created new web application. Vs generated login, register and similar pages.
In web.config it put authentication type "Forms". I expected that all request would be redirected to Login page. And yet I can easily navigate to Home and About pages. </p>
<p>Why is that? How to make unauthenticated user to be r... | asp.net | [9] |
4,006,664 | 4,006,665 | Extend MapActivity and another class: avoid multiple inheritance | <p>I would have a class hierarchy like in photo.</p>
<p>Usually in this case it's usefull pattern Decorator in Java, but with MapActivity is not possible, how can i do?</p>
<p><img src="http://dl.dropbox.com/u/278026/View.png" alt="Valid XHTML"></p>
| android | [4] |
2,420,548 | 2,420,549 | JavaScript Events like onclick and onload | <p>How to display the below using javascript 1.Display password in text form and after displaying when we click on reset button it should be asteriked
2.when we click on password textbox it should be blank</p>
| javascript | [3] |
2,414,001 | 2,414,002 | Using reference as template type | <p>In the following example, <code>Foo</code> is not doing what is intended, but I can't figure out why this is allowed to compile.</p>
<pre><code>#include <string>
#include <iostream>
typedef std::string& T;
T Foo(int & i)
{
return T(i);
}
int main()
{
int a = 1;
std::string & s... | c++ | [6] |
2,761,088 | 2,761,089 | Singleton Class in JavaScript | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1479319/simplest-cleanest-way-to-implement-singleton-in-javascript">Simplest/Cleanest way to implement singleton in JavaScript?</a> </p>
</blockquote>
<ol>
<li>What is the use of Singleton class?</li>
<li>Can an... | javascript | [3] |
2,193,231 | 2,193,232 | Linked list of different classes - in a maintanable way? | <p>Yo people,</p>
<p>My problem is, I have to find a way to easily maintain the next situation:
I have a linked list of different classes. I use void pointers, every class has "int type" as its first member.</p>
<p>Now when I want to call a class member function, I have to do this:
- Read the int, so I know the type ... | c++ | [6] |
5,671,804 | 5,671,805 | delete specific entries | <p>I'm creating a jquery script that could create new form fields, i can create them but how can i delete the specific entries (referenced by class name class="inimene_'+count+'")</p>
<pre><code><script>
var count = 0;
function add(){
count ++;
var code = '<div class="inimene_'+count+'"><p>Eesnimi: &... | jquery | [5] |
4,406,107 | 4,406,108 | Is this a variant of the Module pattern? | <p>What is this pattern called? Is this a variant of the Module pattern? I remember there's disadvantage to this pattern and it's related to memory usage. </p>
<pre><code>var module = function() {
this.Alert = function() {
alert("I'm a public");
}
function iamPrivate() {
alert("not c... | javascript | [3] |
4,505,491 | 4,505,492 | How do I run javascript examples from sites like stackoverflow? | <p>What needs to be added inorder to run an example like what is found on here: <a href="http://stackoverflow.com/questions/3103962/converting-html-string-into-dom-elements">Converting HTML string into DOM elements?</a> in a basic HTML document?</p>
<p>Specifically I'm referring to the code:</p>
<pre><code>var xmlStr... | javascript | [3] |
1,651,817 | 1,651,818 | How to use viewGroup in android | <p>How to use viewGroup in android</p>
| android | [4] |
1,281,718 | 1,281,719 | Each time I view a php page on localhost, it downloads the page | <p>I have altered the httpd.conf file good to my knowledge by adding index.php in the directory index, </p>
<pre><code>LoadModule php5_module "d:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "d:/php"
</code></pre>
<p>But any .php file I load, it downloads it.</p>
<p>Any help would be... | php | [2] |
2,996,788 | 2,996,789 | Measuring smooth scrolling performance | <p>Is there any way to measure scroll performance in an iPhone app, e.g. updates per second? I'm trying various techniques to improve the scrolling performance but it's sometimes hard to judge if they're actually having an effect.</p>
| iphone | [8] |
3,830,560 | 3,830,561 | How do I show only current selected image and hide it if not select? | <p>Here an example <a href="http://jsfiddle.net/6GdW6/" rel="nofollow">http://jsfiddle.net/6GdW6/</a></p>
<pre><code>$(".thumbnail").live("click", function() {
$(".fullimage").hide();
var i = $("<img />").attr("src", this.href).load(function() {
$(".fullimage").attr("src", i.attr("src")).addClass... | jquery | [5] |
5,816,272 | 5,816,273 | Android pptx to image convert | <p>Can anyone please help me how to show pptx file in android or how to convert pptx to image?I am tried with apache POI but i can't run it in android.Please help me with code.</p>
| android | [4] |
4,816,708 | 4,816,709 | Java search a text file | <p>I have made a phone bill system takes input of phone number called, date of the call and call length. it the saves it in to a text file. what i have not been able to do is search the text file for the phone number.</p>
<p><a href="http://pastie.org/3691596" rel="nofollow">My coding</a></p>
| java | [1] |
3,456,170 | 3,456,171 | How do I fix the error Incompatible pointer types sending 'NSString _strong' to parameter of type 'UIViewController*'? in Xcode | <p>Can anyone help me fix this error? Here is everything in the ViewController.m file. I've tried fixing it and searching online but nothing is helping. I already declared the GameScreenViewController, but now when I click the play button it goes to a black screen instead of a different screen I made. In the All Output... | iphone | [8] |
5,663,992 | 5,663,993 | jQuery.noConflict and how to use it | <p>i try to use <code>jQuery.noConflict()</code> but in window.load function i get a "$ is not a function" error.</p>
<p>my code:</p>
<pre><code>jQuery.noConflict();
jQuery(document).ready(function($) {
/** Dropdown Menu **/
$('ul.tabs li:has(ul)').bind("click", function() {
$(this).find('ul').show('... | jquery | [5] |
2,759,389 | 2,759,390 | Adding dot between two characters in java string | <p>I have a string :</p>
<pre><code>String x = "10";
</code></pre>
<p>i want to print it like this
1.0</p>
<p>I want to add "." between numbers </p>
<p>how??</p>
| java | [1] |
1,438,201 | 1,438,202 | Subtracting from div height in jQuery | <p>today I have a quick question. Here is my function:</p>
<pre><code>function checkheight() {
var heightofdiv = $('#checkforheight').height();
$("#centeredbackground").css("min-height",heightofdiv);
}
</code></pre>
<p>My problem is that I want to get my variable, heightofdiv, and then subtract the answer by 42 pixe... | jquery | [5] |
1,210,299 | 1,210,300 | How to add Icon in Android Application ? | <p>I have seen in android native Email application that it updates the icon by showing how many new mails are there ?
Is it a service that updates the icon or is it a process who does it ?
Can someone tell me which file does this change ?</p>
| android | [4] |
4,294,351 | 4,294,352 | Annotating C# code in arbitrary levels without obfuscating the code too much? | <p>I'm looking for the best way to do the following in C#.</p>
<p>Say I have a certain set of instructions:</p>
<pre><code>int a = 1;
int b = 2;
if (a==b) {return;}
...
</code></pre>
<p>I need to get some information per instruction or sets of instructions. So I annotate the code, roughly as follows:</p>
<pre><code... | c# | [0] |
2,706,195 | 2,706,196 | jQuery event "looping" | <p>I´m trying to code a tooltip (Yes I know, I have my reasons to avoid plugins in this case) in jQuery.</p>
<p>Whe I show the tooltip and leave the mouse in the same place the show and hide repeats forever. It´s like the element triggers the hover event again and again and again.</p>
<p>I try unbind for the event bu... | jquery | [5] |
1,765,064 | 1,765,065 | Can't execute python scripts, permission denied? | <p>I'm trying to compile a project using "appcelerator" (crossplatform dev for iphone/android). Just evaluating it. It seems to run some python scripts to do the build, but can't get it to work (and not getting anywhere on the help forums there). Seems like a permissions error, but I can't figure it out. Thought I'd tr... | python | [7] |
3,604,295 | 3,604,296 | Best synchronisation strategy | <p>I have a simple app which is writing to an xml file on every button click. Once this is done, I read the Xml file soon after (as in, a couple of lines below with no methods to be stepped in to in between).</p>
<p>When the app runs for the first time, the xml file is written to/read from fine, but if I press the but... | c# | [0] |
3,190,057 | 3,190,058 | "Couldn't get connection factory client"API Key is fine | <p>Ok this has been making me crazy. I get the following crash (Couldn't get connection factory client), but my Maps API key is fine. </p>
<p>This line causes the crash</p>
<pre><code> mapView.getProjection().toPixels(point, somePoint);
</code></pre>
<p>But if I omit the toPixels part it runs fine, but does not ... | android | [4] |
3,699,909 | 3,699,910 | Android: Make parent selector trigger when selecting child | <p>I have a LinearLayout with some other LinearLayouts inside. The children layouts have a background selector set. I need to change the color of the parent layout as well when a children is pressed. I have set a background selector as well for the parent, but it only triggers when clicking outside of any children.</p>... | android | [4] |
5,772,903 | 5,772,904 | eclipse - stuck with chinese in android virtual device | <p>When I run my android emulator in eclipse, all my keyboard characters gets translated to chinese when I try to write text. Why is this?</p>
<p>Thanks</p>
| android | [4] |
3,589,412 | 3,589,413 | Find all image links and add a class to it | <p>If I have a bunch of links to an image like this:</p>
<pre><code><a href="foo.png">foo.png</a> <a href="foo.jpg">foo.jpg</a> <a href="foo.gif">foo.gif</a>
</code></pre>
<p>How would I find it all with js and then add a class?</p>
<p>This is what I was thinking but that didn't w... | jquery | [5] |
824,093 | 824,094 | Equalizer in android implement | <p>i need to improve in sound. i have build an app in which i record from MediaRecoder class.i got success in recording but when i play it, i got loud vocal sound.i found that <a href="http://developer.android.com/reference/android/media/audiofx/Equalizer.html" rel="nofollow"><strong>Equalizer</strong></a> class is ... | android | [4] |
25,027 | 25,028 | NOTHING as String in PHP | <p>How I can show <code>'NOTHING'</code> as string?</p>
<p>I need it to be displayed instead of showing empty string value as results.</p>
<pre><code>else if ($colorByChance == 5)
{
$color='NOTHING';
}
</code></pre>
| php | [2] |
2,097,069 | 2,097,070 | Append a word to ID attribute when it is hidden and remove it when toggle to show | <ol>
<li>I have two input fields that need to hide when first visit. </li>
<li>There will be a button to toggle it to show the fields so it could be edited.</li>
<li>The appending word (i.e. _temp) with the id is just to change the id name so that it doesn't save over again if it's not necessary. When the fields are sh... | jquery | [5] |
298,017 | 298,018 | regular expression for spaces and words | <p>have the following text file:</p>
<pre><code><div>
<asp:HyperLinkField HeaderText="Hello World of Regular Expression" />
</div>
</code></pre>
<p>How do i get what's between the double quotes for any word and spaces?</p>
<p><strong>Updated:</strong></p>
<pre><code>//This one gets me close bu... | c# | [0] |
563,076 | 563,077 | How can I display different phrases depending on the time of day with javascript? | <p>For example, if it's between 8 and 1 pm, it would say "good morning", if it's 1:01-6:00 pm, it would say "good afternoon" and if it's between 6:01-11:59, it would say "good evening"</p>
<p>How do I go about doing that using javascript/jquery?</p>
| javascript | [3] |
3,480,005 | 3,480,006 | How to start ringing with default ringtone? | <p>I need to start ringing with default system ringtone. Which must be a datasource for MediaPlayer ?</p>
| android | [4] |
3,594,794 | 3,594,795 | Save output of $_SERVER to file | <p>I use this :</p>
<pre><code><?php
foreach($_SERVER as $key => $value){
echo "<b>$key:</b> $value<br>\n";
}
?>
</code></pre>
<p>Which outputs in browser. Is there anyway to redirect output to file and hide it from the browser page ?</p>
| php | [2] |
5,023,672 | 5,023,673 | Java 2D game camera without scrolling the world | <p>I've just finished a month long project of building a very complex map / world editor for a 2D tile rpg type game. Now I'm at the point where I'd like to actually play the game and am in the process of creating the runtime implementation of the game using the maps, characters, and other things that were generated th... | java | [1] |
4,643,075 | 4,643,076 | erase all data from txt file - php | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4297570/how-do-i-purge-the-contents-of-a-text-file-in-php">How do i purge the contents of a text file in php</a> </p>
</blockquote>
<p>Hi..</p>
<p>How can I erase all the data stored (make blank) in my text fil... | php | [2] |
41,198 | 41,199 | please tell me what is exception in this code | <pre><code>NSString *qry=@"UPDATE TABLE USERBASIC SET F_NAME='%@',M_NAME='%@',L_NAME='%@' WHERE REGISTRATIONID='%@'";
NSString *updtQuery=[[NSString alloc] stringWithFormat:qry,fname.text,mname.text,lname.text,userInformationId];
NSLog(@"try UPDATE %@:",updtQuery);
</code></pre>
<p>this gives invalid argument exceptio... | iphone | [8] |
1,648,135 | 1,648,136 | English and/or Finnish text validation | <p>Is there an easy-to-use python module that'd do english or finnish text validation?</p>
<p>It'd be ok if I could just check the words exist in user-defined dictionary and possibly checking that the grammar is somewhat okay.</p>
<p>I am planning to implement a fancy validation for a directory contents I did while a... | python | [7] |
383,473 | 383,474 | How to install pymorph on windows? | <p>I am very new to python so sorry if this is a trivial question. I am developing on windows and I want to install the following library <a href="http://pypi.python.org/pypi/pymorph" rel="nofollow">pymorph</a></p>
<p>I know it can be installed on linux but how to install it on windows enviroment ?</p>
<p>Thanks</p>
| python | [7] |
75,382 | 75,383 | Why does java have new? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/433591/why-do-c-and-java-bother-with-the-new-operator">Why do C# and Java bother with the “new” operator?</a> </p>
</blockquote>
<p>Why does java have the new keyword? To create an object of type <co... | java | [1] |
5,494,488 | 5,494,489 | Object gets stored in session, but while retrieving it is null | <p>On page load I am populating my own object, storing in session & it is getting stored,
When I am debugging i can see that object is stored in session, But When I am reading that session variable.. it is null,</p>
<p>Surprizingly I am able to use other session variables,</p>
<p>Howerver I am able to get the ses... | c# | [0] |
1,583,470 | 1,583,471 | How to use a class as the base, but hide the class type publically? | <p>I am currently just exposing the properties through a generic interface e.g.</p>
<pre><code>public interface IBaseClass
{
int ID { get; set; }
}
internal class MyBaseClass : IBaseClass
{
public MyBaseClass() { }
public int ID { get; set; }
}
public class MyExposedClass : IBaseClass
{
private MyBas... | c# | [0] |
6,023,198 | 6,023,199 | (accelerated C++) chapter managing memory | <p>I am going through accelerated C++ and I am stuck in exercise 10.3 and I have literally no clue how to even start. I would like to mention here that its not homework exercise and I am reading it just to gain confidence in C++ . The question is shown below .</p>
<blockquote>
<p>Rewrite the median function from §... | c++ | [6] |
5,078,161 | 5,078,162 | Should hardcoded data in a function be static? | <p>When I have hardcoded data in a function I could just initialize the variable normally:</p>
<pre><code>function check_country() {
$countries = array(
'aa',
'ab',
'ae',
...
);
}
</code></pre>
<p>Will PHP just make <code>$countries</code> <em>point</em> to the literal data in memory or will it <... | php | [2] |
1,505,012 | 1,505,013 | How to remove text input when button is clicked | <p>I have a jquery function below when when an upload has been completed, it will store the name of the file in a string and it's id in a text input. Now at bottom of function, if the user clicks on the <code>deletevideofile</code> button, then it is able to remove the file name which is fine but my question is how can... | jquery | [5] |
2,112,880 | 2,112,881 | How to update system clipboard when Toolkit.getDefaultToolkit().getSystemSelection() returns null. | <p>The following code:</p>
<pre><code>Toolkit.getDefaultToolkit().getSystemSelection().setContents(
new StringSelection(a), null);
</code></pre>
<p>returns <code>null</code> because it is not supported on my Computer. But, I am wondering how I set my Computers selection if it does not support this. There has to ... | java | [1] |
3,674,975 | 3,674,976 | Reminder application | <p>I am developing a reminder application. I am generating notifications using notification manager class, when the timeline crosses.But if my cell phone is switched off ,I am unable to see these notifications. Not even when i switch it on again.</p>
<p>Even if i switch it off and switch on again, i think the pending ... | android | [4] |
5,540,158 | 5,540,159 | Why i need versioning in my IPhone apps? | <p>I don't understand, why i need versioning in my IPhone apps.Could anyone explain. </p>
| iphone | [8] |
1,034,954 | 1,034,955 | mediaplayer dies android | <p>i have a little problem with the media player class. I have a button, and by pressing it a sound will be played. The thing is that there is some delay between when i press the button and when the sound is played, and if i press it too many times the media player dies, and then no sound is played at all and i get the... | android | [4] |
5,850,139 | 5,850,140 | Override the arity of a function | <p>I would like to make a generic function wrapper that (for example) prints the called function and its arguments.</p>
<p>Doing so is easy through the <code>arguments</code> quasi-array and simple calls. For example:</p>
<pre><code>function wrap(target, method) {
return function() {
console.log(Array.pro... | javascript | [3] |
4,110,560 | 4,110,561 | Custom date sort in jquery datatable | <p>I am using jquery datatable and my html table's one of the column contains dates.</p>
<p>So how can we write custom date sort function? It is by default sorting as String.</p>
| jquery | [5] |
4,307,470 | 4,307,471 | How to make Local Notification in android? | <pre><code>public class ChildLock extends Activity implements OnClickListener
{
ProgressDialog dialog;
int increment;
int maximum ;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
... | android | [4] |
2,855,622 | 2,855,623 | How to preserve scroll position in an ExpandableListView | <p>in my app I have a class derived from ExpandableListActivity.
When I scroll the contents, and then change phone orientation or edit an item and then go back to the list, the original list position is not preserved.
I have tried two solutions, similar to those I have recently successfully used with ListActivity-deriv... | android | [4] |
3,733,354 | 3,733,355 | Attach a pan gesture recognizer an image | <p>Could someone guide in what I need to do? I need to attach a pan gesture recognizer to an image which rotate clockwise and anticlockwise as we move.</p>
<p>Thanks</p>
| iphone | [8] |
3,265,778 | 3,265,779 | Is it possible for an app to alter the Android home screen? | <p>I'm a web developer. I have an idea for an Android app, but before I dive in and start learning, could someone please answer the following:</p>
<p>Is it possible for a regular app (installed from the Market)...</p>
<ul>
<li>to add/remove icons (of <strong>other</strong> apps) to/from the home screen? </li>
<li>to ... | android | [4] |
1,698,825 | 1,698,826 | How to create lazy loading in Horizontal scrollview | <p>My application loads 10 image-thumbnails from server and set them into horizontal scrollview. When I swipe it to the last image, I would like to add lazy-loading element in the back of my horizontal scrollview and download next 10 more image in the background process.</p>
<p>My problem is -----> How I know the last... | android | [4] |
4,102,513 | 4,102,514 | How can I send an Android app that I'm developing to someone over e-mail? | <p>This is my first Android app. I need to email what I have so far to someone for testing.</p>
<p>How should I do it?</p>
| android | [4] |
3,029,481 | 3,029,482 | Jquery IsNumeric with a not condition | <p>I am using Jquery to check to see if something isNumeric.
How do I check to see if it is not numeric?</p>
<pre><code> if (IsNumeric($('#Amount').val())) { .....
</code></pre>
<p>I put a ! before IsNumeric but that did not work.</p>
| jquery | [5] |
5,003,015 | 5,003,016 | PhP issue, downloading rather than displaying | <p>I followed much of <a href="https://help.ubuntu.com/community/ApacheMySQLPHP" rel="nofollow">this</a> how-to and got my test.php working fine but then in my public_html folder I added two folders and created a second site, I edited the document for both files in the same way as I did when it was just one site in hom... | php | [2] |
4,931,633 | 4,931,634 | loop through several vectors | <p>I had trouble searching for potential duplicates because I'm not sure what the correct terminology is.</p>
<p>If I have many vectors which are already created, how can I loop through them? To make things simple, suppose I have three vectors of strings named <code>"vec_one"</code>, <code>"vec_two"</code>, <code>"vec... | c++ | [6] |
3,850,425 | 3,850,426 | concatenation operator (+) vs concat() | <p>For String concatenation we can use either <code>concat()</code> or concat operator <code>(+)</code></p>
<p>I have tried the following performance test and found <code>concat()</code> is faster and memory efficient way for String concatenation. If concat() is better than operator then when to use concatenation oper... | java | [1] |
3,171,713 | 3,171,714 | android contactcontract row size | <p>Is there a maximum size for a complete row in the Android contractcontracts database? If so does anyone know what it is or where I can find it? I am wondering if the fields are dynamic in some way or fixed to a definite limit. </p>
| android | [4] |
5,344,321 | 5,344,322 | Function to get certain amount of lines from a file? | <p>Was just wondering if there is anything that exists to retrieve a certain amount of lines from a file or should I just go ahead & make an array of it with <code>file</code> & then loop through it until I get the required data?</p>
<p>All I'm trying to do is get the first 11 lines of data from a file (or les... | php | [2] |
2,827,765 | 2,827,766 | rfind and << crashing program | <p>I have a problem that has a few programmers pulling their hair. The language is C/C++. Consider the code below...assume <em>request</em> is a valid C++ string.</p>
<pre><code>string outMsg;
string trans_str = ("</TRANSACTION>");
int32_t position;
//Assign outMsg and find "</TRANSACTION>"
outMsg.assign(... | c++ | [6] |
71,815 | 71,816 | Is there any way to check timer is runned at defined period? | <p>i developed an application which sends birthday wishes on facebook wall, but when i am calling someone at same time that i set for sending wishes, then wishes failed to post on facebook wall.
I used Alarm Manager first.
But i want to use timer class and in that timer class i want to check that message is posted to w... | android | [4] |
652,519 | 652,520 | Difference between objectAtIndex and [0] | <p>What is the difference between using the following: </p>
<pre><code>NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *dir = [paths objectAtIndex:0];
NSString *dir2 = paths[0]; // this throws incompatible type exception
</code></pre>
| iphone | [8] |
3,801,839 | 3,801,840 | confirm() on window.onbeforeunload | <p>I want to show a confirmation dialog if the user wants to leave the page with unsaved form data. What I have is:</p>
<pre><code>window.onbeforeunload = function() {
if (not_saved) if (confirm('Changes will not be saved')) return true;
return false;
}
</code></pre>
<p>But no matter what the user clicks, the... | javascript | [3] |
207,866 | 207,867 | PHP - get image from byte array | <p>I am trying to create a back-end for my mobile application. I am sending an image's contents as a byte array in the HTTP request's body (output stream) I want to read this stream of bytes in the PHP script and get back an image.</p>
<p>Can someone please tell me how I can do that?</p>
<p>Thanks.</p>
| php | [2] |
3,441,202 | 3,441,203 | jquery: most efficient way to get and store the ids of 100+ td items? | <p>Ok so I have about six of these calendars on page, so thats around 180 td items (1 for each date):</p>
<p><img src="http://i44.tinypic.com/eiwphl.jpg" alt="http://i44.tinypic.com/eiwphl.jpg"></p>
<p>each td has an id that is equal to that day's timestamp.
the dates I want are the red ones (class of <code>.booked</... | jquery | [5] |
818,001 | 818,002 | _addFunctionCall method in Javascript | <p>Is there any method in JS named <code>_addFunctionCall</code> ? I came across following line in a legacy application.<br>
Method defination: </p>
<pre><code>i2b2.ONT.ajax._addFunctionCall( "GetNameInfo",
"{{{URL}}}getNameInfo",
i2b2.ONT.cfg.msgs.GetN... | javascript | [3] |
3,684,221 | 3,684,222 | similar functionality like uitableview in iphone to in android? | <p>can anybody please give me example of using similar functionality like uitableview in iphone to in android?</p>
| android | [4] |
3,782,181 | 3,782,182 | function's return type's need | <p>//we all always specify the return type of a function because it is in the syntax.....but can anyone tell me what basic objective is served by us by specifying the function's return type..........means why did the syntax have to be made like this.....it could be that we could just return the value..</p>
| c++ | [6] |
4,320,497 | 4,320,498 | Is it possible for a running python program to overwrite itself? | <p>Is it possible for a python script to open its own source file and overwrite it?</p>
<p>The idea was to have a very simple and very dirty way for a python script to download an update of itself so that the next time it is run it would be an updated version.</p>
| python | [7] |
4,139,348 | 4,139,349 | php email. how does it know to populate certain fields | <p>so im learning php (begginer if you cant tell) and, im currently pushin/pulling data from the db to a page so that it can then populate other parts of the page and when "send" is hit, it puts it all together and sends right...</p>
<p>my question is, </p>
<p>i know to set for example:</p>
<pre><code>$to = 'email@g... | php | [2] |
2,324,970 | 2,324,971 | Replacing image src with input hidden value using Jquery | <p>I have below input hidden with value ="/fr/images/findacourse_logo_tcm10-268.gif".</p>
<pre><code><input type="hidden" id="Qt_Email_Image" value="/fr/images/findacourse_logo_tcm10-268.gif"/>
</code></pre>
<p>I have another input image below with src = "/images/quote/Quote_Email_Button.JPG"</p>
<pre><code>&l... | jquery | [5] |
1,611,034 | 1,611,035 | Is there a way to appendTo head? | <p>I'm working with a platform that doesn't allow me to edit the source code. Is there a way to insert a line in the head element dynamically? Maybe something like below...</p>
<pre><code>$("<link href='http://fonts.googleapis.com/css?family=News+Cycle' rel='stylesheet'>").appendTo("head")
</code></pre>
| jquery | [5] |
1,391,127 | 1,391,128 | How to include a module dependency as a part of py2exe script | <p>I got a windows installer my_script.exe (generated out of my_script.py using py2exe) which is dependent on "PyDes" module,</p>
<p>when I execute my_script.exe it throws an error saying ,</p>
<p>Import error : pyDes module</p>
<p>How to include the pyDes module as a dependency to my_script.py</p>
<p>I am using py... | python | [7] |
2,470,495 | 2,470,496 | What does plus equals (+=) do in Python? | <p>My friend sent me the following Python code to demonstrate what she thinks is wrong with Python. At the moment, I have to agree with her. All of the experienced programmers I've shown this to are equally confused. Can anyone tell me what is going on? </p>
<pre><code>class foo:
bar = []
def __init__(sel... | python | [7] |
1,461,655 | 1,461,656 | Script disable in text boxes | <p>How can I prevent a script from executing in text boxes, by using jQuery?</p>
<p>Here is my complete problem:</p>
<p>I want to send a message to someone using jQuery; if I entered a script tags like <code>a</code>, <code>href</code>, <code>script</code>, etc. they are not appearing in the other's message. How ca... | jquery | [5] |
385,970 | 385,971 | why is there no value for variable in this jquery code? | <pre><code> var ret = { valid: true, message: "" };
var prtime = $(".ptime").val();
var ctime = $(".ctime").val();
if ($(prtime).length == 0 || $(ctime).length == 0) {
ret = { valid: false, message: "" };
}
$(prtime).length
</code></pre>
<p>when I run this I get 0 even I when fill some word... | jquery | [5] |
1,974,214 | 1,974,215 | How do I encode an HTTP link... something very easily with javascript? | <pre><code><a onclick="go_url(ENCODED-URL);return false;">go to this url</a>
</code></pre>
| javascript | [3] |
184,247 | 184,248 | how to use a recorder / player objects | <p>I'm trying to put objects in a document. dat and then they can be read Does anyone know where is wrong?
The problem I have is that it is able to read the files you keep, I am not sure you save it, but if I find the file in the folders ...</p>
<p>I'm working with objets like:</p>
<pre><code>public class Person {
... | java | [1] |
2,778,801 | 2,778,802 | The ConnectionString property has not been initialized | <p>My connection string is placed in web.config as follows.</p>
<pre><code><connectionStrings>
<add name="empcon" connectionString="Persist Security Info=False;User ID=sa;Password=abc;Initial Catalog=db5pmto8pm;Data Source=SOWMYA-3BBF60D0\SOWMYA" />
</connectionStrings>
</code></pre>
<p>and the c... | asp.net | [9] |
1,525,503 | 1,525,504 | Audio library for C++ for audio plugins? | <p>I am interested in creating audio plugins like a compressor or synthesizer VST plugin for example. Though I do want to start with something as simple as a distortion plugin. </p>
<p>And I thought I will use C++ for it. </p>
<p>I am wondering which audio library would be a good fit for this case? </p>
<p>My inspir... | c++ | [6] |
3,517,086 | 3,517,087 | How I can cancel the AsyncTask during invocation? | <p>I am implementing a function which performs some backend database task. I have used Asynctask for that but If the backend task is in process and I close the activity, I want to cancel the AsyncTask too. How I can do tat?</p>
| android | [4] |
2,438,454 | 2,438,455 | file access peek ahead | <p>I need to read a file, line by line and I need to peek into 'the next line' so first I read the file into a list and then I cycle throught the list... somehow this seems rude, building the list could be become expensive.</p>
<pre><code>for line in open(filename, 'r'):
lines.append(line[:-1])
for cn in range(0,... | python | [7] |
179,218 | 179,219 | jquery validation plugin minLength override in invalidHandler | <p>Is it possible to override the default minlength error message in the callback invalidHandler ?</p>
<p>Say by default the error message for minlength would be <em>Please enter at least {0} characters</em>. Can this be overriden with the inclusion of the form element say <strong>{element} - Please enter at least {0}... | jquery | [5] |
5,815,149 | 5,815,150 | Default.png no longer exists | <p>I've searched for the answer to this question but I can't seem to find it, and logically this process makes no sense to me...</p>
<p>I added a default.png to my app and I didn't like the fact that it didn't show long enough, so I removed it and was going to add a splash screen instead.</p>
<p>The problem is that t... | iphone | [8] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.