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 |
|---|---|---|---|---|---|
1,310,072 | 1,310,073 | c++ program gets segmentation fault | <p>I've been working on some coding and I ran into a segmentation fault. I've tried my best to make it work but I kept failing. Now I am asking for help. This is my code:</p>
<pre><code>#include <iostream>
#include <string>
using namespace std;
int main()
{
string symbols = "ABCDEFGHIJKLMNOPRSTUVYZ_... | c++ | [6] |
4,502,699 | 4,502,700 | Is there any problem with this code? | <pre><code>#include<iostream>
#include<fstream>
#include<cstring>
using namespace std;
int main()
{
cout << "Hello.";
ifstream attack,output;
attack.open("CattackList");
output.open("finaltestOutput.txt");
if (!attack)
cout << "file1 not opened.\n";
if ... | c++ | [6] |
466,904 | 466,905 | Built-in date time picker control in Android that looks like the datetime picker of the Calendar Application | <p>Is the control shown in the image below built-in in the Android Framework or it is a custom control. If it is custom control, should it be built using a button with background that pops a calendar dialog on click?</p>
<p><img src="http://i.stack.imgur.com/j3UGs.jpg" alt="snapshot"></p>
<p>Thanks</p>
| android | [4] |
801,139 | 801,140 | Can you use a function local class as predicate to find_if? | <p>Is it possible to use a local class as a predicate to std::find_if?</p>
<pre><code>#include <algorithm>
struct Cont
{
char* foo()
{
struct Query
{
Query(unsigned column)
: m_column(column) {}
bool operator()(char c)
{
... | c++ | [6] |
5,634,001 | 5,634,002 | onCreateDialog doesn't refresh message | <p>I try to create AlertDialog. It works but setMessage doesn't refresh message. Code snippet below: </p>
<pre><code>@Override
protected Dialog onCreateDialog(int id) {
super.onCreateDialog(id);
switch (id) {
case CONFIRM:
confirmView = new LinearL... | android | [4] |
3,338,702 | 3,338,703 | Animating Activity on onStartActivity | <p>I want to animate an activity while starting another activity.
The animation i am trying to do flip animation.</p>
<p>I tried ActivityOptions and overridePendingTransition with objectanimtor.
I think i am doing wrong ,objectanimator can not be used with these above methods.</p>
<p>Is there any way to animate activ... | android | [4] |
1,497,838 | 1,497,839 | What's the best way to display a bunch of images from a web server in Android? | <p>I need to load several thumbnails (the images on the server are full sized images, so I need to resize them in the app), and display them in a way that allows for the user to click on one (or more) and have some associated id be given back to the app for use in a larger context. </p>
<p>so, in pseudo code...</p>
<... | android | [4] |
4,235,969 | 4,235,970 | Java Software Engineering | <p>I'm a newbie to software engineering. People around me used to talk some jargons such as dto, bo,do ,so and so on. What all those means. Is there are any books to refer about those. i 'm into java software development.</p>
| java | [1] |
3,448,132 | 3,448,133 | Function that takes an STL iterator over ANY container of a elements of a specific type | <p>How would I define a function that takes as input an iterator over any type of STL container, but only to those of a specific templated type. For example:</p>
<p>Any iterator of the form <code>std::list<Unit*>::iterator</code> <strong>or</strong> <code>std::vector<Unit*>::iterator</code></p>
<p>I would... | c++ | [6] |
477,181 | 477,182 | how to write the condition? | <pre><code>$tree = taxonomy_get_tree($vid);
print "<li>"; // 1 line
foreach ($tree as $term ) { // 2 lines
$diffdepth=0;
if ($term->depth > $depth) {
print "<ul class='haschild'><li>";
$depth = $term->depth;
}
</code></pre>
<p>the above is the or... | php | [2] |
174,525 | 174,526 | Jquery display images one after another | <p>This is perhaps a couple of questions rolled into one here, I am creating an image gallery and wanted the thumbnails to fade in on the page one after another, this needs to be dynamic to the amount of images within a div (for reuse on the other gallery pages)</p>
<pre><code>$(function {
var $gallImages = $('#galler... | jquery | [5] |
512,373 | 512,374 | bind causing errors | <p>I'm noticing some errors that are occurring because of JQuery bind. What happens is that when I submit a form, bind causes a javascript error to occur when the page that uses it is not loaded. When I comment the bind section out, the error goes away.</p>
<p>Here are the relevant lines of code.</p>
<pre><code> $('... | jquery | [5] |
1,396,809 | 1,396,810 | Pushing Array value to first Index | <pre><code>var Config = {
Windows: ['apple','mangi','lemon']
}
</code></pre>
<p>I have a condition and based on that i want to Push the banana value in my Array. </p>
<pre><code>If(Condition Passed) {
Config.Windows.unshift('banana');
Windows: ['banana','apple','mangi','lemon']
Config.Windows.rev... | javascript | [3] |
5,621,116 | 5,621,117 | Android add more smileys in one edittext? | <p>I need to add more than one smileys in a single edittext box. For add a single smiley I follow <a href="http://www.iteedu.com/handset/android/spannablediary/imagespan.php" rel="nofollow">this link</a></p>
<p>How to add more smileys in a single Edittext box? Thanks in advance..</p>
| android | [4] |
1,358,480 | 1,358,481 | Android external keyboard ctrl keycode | <p>I want to listen if the <code>ctrl key</code> is pressed but in <code>android 2.3</code> ,there is no <code>ctrl's keycode</code>.</p>
<p>My device cannot update to <code>android 3.0</code></p>
<p>Are there any ways to solve this problem?</p>
| android | [4] |
4,852,618 | 4,852,619 | Phantom uindentation: unexpected unindent on blank line | <p>I'm getting the following indentation error with a completely nonexistent line (the code ends at line 17, there is no line 18 on the page):</p>
<pre><code> File "./test.py", line 18
^
IndentationError: unexpected unindent
</code></pre>
<p>I've tried resaving the file as new, everything. What's ... | python | [7] |
163,219 | 163,220 | Why does MonkeyRunner.waitForConnection() error "Adb rejected adb port forwarding command: cannot bind socket" | <p>When I try to get a device with MonkeyRunner I get this message:</p>
<blockquote>
<blockquote>
<blockquote>
<p>newdevice = MonkeyRunner.waitForConnection()
110804 17:35:28.561:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] Adb rejected adb port forwarding command: cannot bind socket
... | android | [4] |
1,200,960 | 1,200,961 | handling javascript object existence checks globally | <p>My JS developers always miss checking the object existence causing doucument.getElementByID is null problem. is there a way to handle this globally than adding the check for every single object. or is it possible to handle/suppress it during runtime?</p>
| javascript | [3] |
959,193 | 959,194 | How to open Maps app from my code to show directions? | <p>HI.. I have to show directions between two coordinates. I'd like to open Maps app, passing the start and end coordinates from my code. </p>
<p>I don't want to open it in the Google maps, which opens in browser(Safari). I tried that method. That was working perfect.</p>
<pre><code>NSString* urlStr = [NSString strin... | iphone | [8] |
3,549,744 | 3,549,745 | polymorphisim java | <p>I'm getting the fine after computing the method <code>computeFine()</code> it returns the result <code>0</code> each time I put any <code>period</code></p>
<p>Please check it here because it is very long and it's hard to past it in SOF</p>
<p><a href="http://paste.org/pastebin/view/40017" rel="nofollow">http://p... | java | [1] |
49,176 | 49,177 | I want to use google map API with PHP but unsure how | <p>I currently have a webpage where people can see their local bus routes and when they click on their route it loads a page with a google map through their API with what stops it stops at and times it arrives. But I'm currently using a lot of get statements e.g. '?route.php=blahroute1' which will tell the loading page... | php | [2] |
716,915 | 716,916 | Switching font for android app | <p>I have downloaded multiple fonts and would like to apply them throughout my app. Can this be done? I tried searching on stack overflow and could not find anyone that fits my request. Please help me.</p>
<p>thanks.</p>
| android | [4] |
1,420,956 | 1,420,957 | Change background image of listview on item selected from adapter | <p>In my getView method from my listadapter, When i select an item in the list, i want this selected item background image to take a specific image and the other items from the list to take the default background image. I implemented a for loop to do this but when i select an item from the row, the background image doe... | android | [4] |
1,008,439 | 1,008,440 | Custom event handler not getting initialized | <p>Following is the Code i am using </p>
<pre><code>class ImpersonatedTab : System.Windows.Forms.TabPage
{
Credentials _cred = new Credentials();
public delegate void Savesetting(TabData Tb);
public event Savesetting TriggerSaveSetting;
public ImpersonatedTab(TabData tb)
... | c# | [0] |
3,984,747 | 3,984,748 | Having problems with storing variable in classes | <p>Please see ifmy logic is correct i do not know how to implement what i am trying to do. I am a beginner in java.</p>
<p>Game is a class which stores the Name and the Steps of that user after the game is complete.</p>
<p>[ First Method ]</p>
<pre><code>private game[] gameArray = new game[10];
for(int i = 0; i <... | java | [1] |
3,516,132 | 3,516,133 | How to put variables into calling scope in PHP? | <p>The built-in PHP function parse_str( $str ) parses a query string and sets the variables from it into the current scope. Is there any way for me to create my own function that does something like this and returns values to the scope of the caller?</p>
<p>Example:</p>
<pre><code>function checkset()
{
global $in... | php | [2] |
202,800 | 202,801 | Can I turn off power save function of emulator? | <p>Whenever I execute my app, I have to click one more time to brighten emulator screen.
Is there any way I can turn off power save function of emulator?</p>
| android | [4] |
3,339,819 | 3,339,820 | Creating an accurate Bible Search | <p>I am creating a Bible search. The trouble with bible searches is that people often enter different kinds of searches, and I need to split them up accordingly. So i figured the best way to start out would be to remove all spaces, and work through the string there. Different types of searches could be:</p>
<p><cod... | php | [2] |
3,640,567 | 3,640,568 | cin condition checking error | <p>I am a beginner programmer learning c++. I am having a nagging issue with the cin command.
In the program section below, if I enter a wrong type at the 1st cin command, the program will not execute any of the following cin commands at all, but will execute the rest of the program. </p>
<pre><code>//start
#include &... | c++ | [6] |
484,384 | 484,385 | Python, simple FTP upload .txt | <p>I'm really struggling just to get a simple <code>.txt</code> file to upload to a FTP server. I've got a folder on my desktop which contains two files: <code>text.txt</code> and <code>upload_to_ftp.py</code>.</p>
<p>I've tried these:<br>
<a href="http://love-python.blogspot.com.au/2008/02/ftp-file-upload.html" rel="... | python | [7] |
3,380,215 | 3,380,216 | Paint bitmap on Canvas ignoring alpha channel | <p>I have a Bitmap with an alpha channel (ARGB8888), and I just want to paint it ignoring the alpha bytes. Modifying the alpha channel is not an option.</p>
<p>Is there a way of doing this?
Thanks!</p>
| android | [4] |
3,599,246 | 3,599,247 | ProgresDialog doesn't show up | <pre><code>public Context ctx;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.ctx = this;
//another code......)
send = (Button)findViewById(R.id.wyslij_zapytanie_ofertowe);
send.setOnClickListener(new View.OnClickLis... | android | [4] |
4,400,718 | 4,400,719 | Jquery .next() function not working | <p>Guys i am trying to do something like this i have two href and a text box in the middle of those <-> TEXT <+> So when i press the - and + the value in the txt must increase or decrease by one</p>
<p>and i am using a jquery to + and - the value in the text box. Whenever i press + its happening correctly but fo... | jquery | [5] |
1,036,934 | 1,036,935 | Shuffling a Deck of Cards , Redundancy after swapping two values | <p>I was asked to write a program(mainly a method) for shuffling a deck of cards. I wrote the following program:</p>
<pre><code>public class Deck {
////////////////////////////////////////
// Data Members
////////////////////////////////////////
private Card[] cards; // array holding all 52 cards
private int cardsIn... | java | [1] |
5,947,076 | 5,947,077 | android media player is not playing audio file from url which has space or special character | <p>i am trying to make media player for audio file.</p>
<p>when i play a file which has space or special character like this </p>
<pre><code>[str=**http://192.168.1.214/MusicApplication/Songs/Baek Chan & Joo Hee of 8eight.mp3**;]
</code></pre>
<p>using </p>
<pre><code> mediaPlayer=new MediaPlayer();
medi... | android | [4] |
532,043 | 532,044 | Why do these two 'x' refer to different variable? | <p>In this code, the x in the lambda refers to the x in the for statement. So <code>y[0]()</code> returns 2:</p>
<pre><code>x = 0
y = [lambda : x for x in range(3)]
y[0]()
</code></pre>
<p>But in this code, the x in the lambda refers to global x, so <code>x[0]()</code> returns global x itself:<br /></p>
<pre><code>x... | python | [7] |
952,984 | 952,985 | Pass long[] instead of Long | <p>I have a function like this</p>
<pre><code>void doSmth(Long... paramg){
}
</code></pre>
<p>But I can't pass <code>long[]</code> instead of <code>Long...</code>. Why? I thought it's the same things (whats the difference between them?).</p>
<p><strong>How can I pass long[] instead of Long... ?</strong></p>
| java | [1] |
3,533,095 | 3,533,096 | what is android support library | <p>what is the purpose of Android Support Library?
Does this mean </p>
<pre><code> http://developer.android.com/tools/extras/support-library.html
</code></pre>
<p>Currently my app has min sdk restriction of level 10
I am trying to use ViewPager, which is not available at higher api (level 16 I believe)</p>
<p>So w... | android | [4] |
4,735,216 | 4,735,217 | Send data from phone to phone over internet? | <p>Is there any way to actually communicate between two android devices over internet without having to have any service between the two devices? </p>
<p>Like posting something to device2 from device1 without having to "middle-land" on any other server or whatever?</p>
<p>Another question: I tried to ping my phone ov... | android | [4] |
1,656,490 | 1,656,491 | ACTION Cannot be resolved - Android SMS Programming | <p>I am following a tutorial regarding a certain SMS Android program, specifically SMS Parsing. </p>
<p>I had this particular error that i meet...</p>
<pre><code> Public class SMSTestActivity extends BroadcastReceiver {
public void onReceive (Context context, Intent intent) {
if (intent.getAc... | android | [4] |
5,720,853 | 5,720,854 | How do i pass an value to a function that i use as parameter? | <p>i want to pass a function as an parameter if an element was clicked.
But in the function that i pass i want to set an attribute information from the clicked element.</p>
<p>What is the best way to pass the attribute value to the inner of the function?</p>
<p>My JavaScript looks like this:</p>
<pre><code>$('.edit-... | javascript | [3] |
4,274,808 | 4,274,809 | Can nflx:// app run within an IOS app using UIWebView | <p>I am writing an IOS app where I would like to launch the Netflix app (nflx://) within my app using UIWebView. I would like to have the Netfix movies run within my UIWebview structure so when the user stops the movie it will go back to my app control.</p>
<p>I have have done the following:</p>
<p>1). I can launc... | iphone | [8] |
1,893,622 | 1,893,623 | How to convert intptr_t to string | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/5590381/easiest-way-to-convert-int-to-string-in-c">Easiest way to convert int to string in C++</a> </p>
</blockquote>
<p>Does anyone know how to do that conversion?</p>
<p>I need to concatenate a intptr_t type ... | c++ | [6] |
5,927,614 | 5,927,615 | Passing SESSION variables | <p>Let's say I have a questionnaire consisting of three pages that a user is supposed to submit.
I collect variables through SESSION.
Should I pass all the variables in session from page to page repeating them or could I pass variables from page one to page three?
For example, I have 'first name' and 'last name' on pa... | php | [2] |
50,094 | 50,095 | what is the best Serializable replacement for "Set" and "Collection" interfaces? | <p>I have to serialize Collection and Set interfaces. Which are the best Serializable replacements for those interfaces on Java?</p>
| java | [1] |
2,895,754 | 2,895,755 | Mouseout Call Event | <p>I wanted to use <a href="http://james.padolsey.com/javascript/table-rows-as-clickable-anchors/" rel="nofollow">this plugin</a> for hover effects on a table row but retaining the links correctly in the browser. The problem is that against the latest version of jQuery there is a section of the plugin that doesn't work... | jquery | [5] |
3,327,969 | 3,327,970 | How do I detect focus on an InputText field in Android? | <p>I know I MUST be a total idiot, but I don't see anything in the documentation that resembles an onFocus event handler for an InputText view in Android.</p>
<p>What am I overlooking?</p>
| android | [4] |
601,412 | 601,413 | List all NAS server present in LAN using C# | <p>I want to List all NAS server present in LAN using C#.
Any idea or code snippet is highly appreciated.
Thanks in Advance.</p>
| c# | [0] |
5,325,507 | 5,325,508 | How much time do you spend in JavaScript development ? And what do you do to reduce it? | <p>I would like to know how much time (in percent) does JavaScript development takes at your work. I work with complex rich-internet applications and i spend most of my time in JavaScript development. </p>
<p>And you: how much time do you you spend in JavaScript development and what do you do to reduce it ?</p>
<p>re... | javascript | [3] |
5,516,676 | 5,516,677 | Use jQuery prepend to add div element | <p>I wonder if it's possible to have several div elements with different id that has different contents and then add them with prepend depending of the choice from a menu? When the page load, all of these element should be hidden. Could I do that? </p>
<p>EDIT:
Instead of load several different pages with just some te... | jquery | [5] |
5,397,197 | 5,397,198 | Can python be integrated into HTML, JavaScript... Online? | <p>I have a python multiplayer game which I want to host online. So far I have only seen online games which use some kind of user downloaded library (such as a flash or the java runtime virtual box) of course, many gamers won't have python installed. For the game, it is using the multiplayer by the library socket, and ... | python | [7] |
4,510,651 | 4,510,652 | Carousel library for android | <p>Is there any library available for Carousel animation of images as available in iphone
<a href="http://cocoacontrols.com/platforms/ios/controls/icarousel" rel="nofollow">http://cocoacontrols.com/platforms/ios/controls/icarousel</a></p>
<p>I have used cover flow but it is not giving effect like iCarousel in iphone,... | android | [4] |
5,924,385 | 5,924,386 | javascript: || (or) in variable define? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2802055/what-does-this-construct-x-x-y-mean">What does this construct (x = x || y) mean?</a> </p>
</blockquote>
<p>a lot of times i can see that variables set like that </p>
<pre><code>var d = d || {}
</code></... | javascript | [3] |
1,893,826 | 1,893,827 | Image Preloading for image gallery | <p>suppose i am showing images through datalist control. datalist have 5 rows and 5 columns. all rows and all columns will show a small image. so when i am showing images then it is taking little time. so i want to show a image pre-loader for each image. so at the very beginning when page will be running then many busy... | asp.net | [9] |
4,154,860 | 4,154,861 | If i don't have a website's database, what is the alternative to retrieve its informations in Android app? | <p>I want to develop an app to display the programs schedule of a specific channel from its website. I don't have their website indeed, however, is there some other techniques to retrieve some specific data from a page, in my case the name of the program and its diffusion time. The website does not have an RSS feed too... | android | [4] |
5,894,813 | 5,894,814 | How do I get number of common numbers in an array record in Mysql? | <p>How do I get mode of an array record in Mysql?
<br>i.e: 1,2,3,4,5 , 1,3,5<br>
I would like to get out of the table user_friends to get which friends these friends have in common, in this case, 1,3,5. How would I accomplish this?</p>
| php | [2] |
4,321,448 | 4,321,449 | Javascript Delete Method? | <p>In this code snippet from AdvancED DOM Scripting:</p>
<p>The call to <code>delete(classes[i]);</code> is this an array or object method? I'm unable to Google an answer.</p>
<pre><code>/**
* remove a class from an element
*/
function removeClassName(element, className) {
if(!(element = $(element))) return fa... | javascript | [3] |
3,627,746 | 3,627,747 | Detrimental Javascript Tricks | <p>What are some of the most detrimental Javascript tricks? Pleas include the <strong>"issue seen"</strong> and "<strong>avoid by</strong>" blocks. </p>
<p>Examples:</p>
<ol>
<li><p>Adding properties to <code>Object.prototype.prop = 1</code><br>
<strong>Issue seen</strong>: <code>for(var i in obj){ alert(i);}</code... | javascript | [3] |
5,419,037 | 5,419,038 | Friendly name on COM port in Java? | <p>I working on a project where I have to get access to at COM port. I'm at the moment using winjcom to get access and to list the connected devices. My problem is that I would like to have the friendly names displayed instead of just COM3, COM4 and so on.</p>
<p>I found a thread </p>
<p><a href="http://stackoverflow... | java | [1] |
118,030 | 118,031 | Dynamic sub-field assignation | <p>I have some difficulties to explain my problem, some code is better than a long text:</p>
<pre><code><?php
$n = new stdClass();
$f = 'field[0][0]';
$n->$f = 1;
var_dump($n);
</code></pre>
<p>The current result:</p>
<pre><code>object(stdClass)#1 (1) {
["field[0][0]"]=>
int(1)
}
</code></pre>
<p>The ... | php | [2] |
2,752,100 | 2,752,101 | Memory Error in Python 2.7.3 | <p>I'm trying to run this program on python which simulates a mindless being going around in space and to see whether it'll reach it's target.. But I'm getting a memory error every time i run it..--</p>
<pre><code>init_posn=[0,0]
posn_final=[2,2]
obs = [[-1,1],[-1,0],[-1,1],[0,1],[1,1],[1,0],[1,-1],[0,-1]]
# algo ca... | python | [7] |
4,537,266 | 4,537,267 | How to print Array data retrieved from Database using JQuery | <p>I am using cakePHP 1.26, and JQuery.</p>
<p>In a TestingController, I got this line of code<br/></p>
<pre><code>function testing(){
$r = $this->User->findallByuser_id(1);
}
</code></pre>
<p>and I am using JQuery Ajax to retrieve the data from function testing():</p>
<pre><code> $.ajax({
type: "POST",... | jquery | [5] |
901,274 | 901,275 | Unexpected bahaviour of GetFragment and PutFragment | <p>The following is a part of the code i wrote to replace fragments using FragmentManager.</p>
<pre><code> FragmentManager mFragmentManager = getFragmentManager();
if(activeFragment!=null) {
mFragmentManager.putFragment(fragmentBundle,oldTabId + FRAGMENT_PREF, activeFragment);
System.out.println... | android | [4] |
5,044,585 | 5,044,586 | selecting gridview rows using ctrl key | <p>I need help for selecting multiple rows in a gridview using ctrl key. (C#, asp.net)</p>
<p>While right clicking on the selected rows, I need to export those particular rows to "word".</p>
| asp.net | [9] |
2,494,565 | 2,494,566 | How to pass a textbox input value to another element onclick | <p>was looking for ideas/samples on how to change div styles through user input</p>
| javascript | [3] |
5,373,751 | 5,373,752 | Selecting element type with attribute value in jQuery | <p>Good morning, everyone.</p>
<p>Can someone please let me know the correct way to select an element type with a given attribute? In my particular case I'm trying to access a label with a an attribute of "for" that has a value of "P500_CB_TRANSFERUNIVERSITY".</p>
<p>I would have though the propery jQuery syntax wou... | jquery | [5] |
2,162,987 | 2,162,988 | Formatting a number with leading zeros in PHP | <p>I want have a variable which contains the value 1234567.</p>
<p>I want it to contain exactly 8 digits i.e. 01234567.</p>
<p>Is there a PHP function for that?</p>
| php | [2] |
3,855,025 | 3,855,026 | how to display the image in galleryview | <p>I create gallery view in my application. it is working fine but i want which image focused in the gallery that image also display on the screen at the same time. can anyone help for this </p>
<p>Regards
Raj.</p>
| android | [4] |
3,448,477 | 3,448,478 | finding out which object to point to in javascript | <p>I have several global objects that contain arrays of objects; let's call these appointments. Let's say I have these objects: AppointmentsToday, Appointments02102012, Appointments02092012... I also have a global variable CurrentAppointments that holds a reference to the actual object I'm currently working on.</p>
<... | javascript | [3] |
5,207,644 | 5,207,645 | Should I NOT include jquery on pages that do not use it? | <p>I understand that after a browser loads jquery, generally it is added to the browsers cache.</p>
<p>My site has hundreds of pages and I have a header file that is included on these pages and only some of these pages use jquery code so I am wondering will a page load faster or have better performance to the end user... | jquery | [5] |
215,018 | 215,019 | How to count total number of elements in each column in a tab delimited file | <p>Given a tab delimited file, How to count total number of elements in each column? My file is ~6GB in size. </p>
<pre><code>column count min max sum mean
80 29573061 2 40 855179253 28.92
81 28861459 2 40 802912711 27.82
82 40 778234605 27.63
83 27479902 2 40 ... | python | [7] |
2,921,962 | 2,921,963 | why javascript's charAt() with a string returns the first letter | <p>I am doing some exercises in my object-oriented javascript book, I notice that this:</p>
<pre><code>var a = "hello";
a.charAt('e'); // 'h'
a.charAt('adfadf'); //'h'
</code></pre>
<p>Why is the string in the argument seemingly evaluated to the integer 0 for the charAt() method for strings?</p>
<p>Edit: I was aware... | javascript | [3] |
911,590 | 911,591 | ACL not getting inherited | <pre><code>var ac = directoryInfo.GetAccessControl();
var wid = WindowsIdentity.GetCurrent();
IdentityReference securityIdentifier = (wid == null) ? new SecurityIdentifier(WellKnownSidType.BuiltinUsersSid, null) : wid.User;
bool result = false;
ac.ModifyAccessRule(AccessControlModification.RemoveAll, new FileSystemAcce... | c# | [0] |
715,259 | 715,260 | class with virtual functions takes more place | <p>There is such code:</p>
<pre><code>#include <iostream>
class A{
int a;
int fun(){}
};
class B{
int a;
virtual int fun(){}
};
int main()
{
std::cout << sizeof(A) << " " << sizeof(B) << std::endl;
std::cin.get();
return 0;
}
</code></pre>
<p>The output is:... | c++ | [6] |
399,571 | 399,572 | Where is an event registered with addEventListener stored? | <p>I start with an empty page. If I run <code>document.body.onclick</code> I get <code>null</code>. If I apply following code:</p>
<pre><code>document.body.onclick = function() { return "Click"; };
</code></pre>
<p>I get <code>function() { return "Click"; }</code> when I run <code>document.body.onclick</code>. That m... | javascript | [3] |
2,105,136 | 2,105,137 | Can we add images into outlook mail using php? | <p>I have a Create task page. So once Task is created, and if user admin clicks mail button. Outlook will open and add the subject and body which I typed. </p>
<p>But my doubt is can I add an image and also can we change teh font color in Message using code itself. I am a newbie in this thats why the dumb doubt.</p>
... | php | [2] |
3,431,843 | 3,431,844 | Can jquery tell me which image is shown when .cycle stops? | <p>I have 5 images inside a single div and I'm using jquery's .cycle plugin to cycle through them. Is there a way jquery can tell me which image the cycle stopped on?</p>
<p>Heres my html...</p>
<pre><code> <div id="slot1">
<li id="reel1a"><img src="reel1a.jpg" /></li>
<l... | jquery | [5] |
2,392,660 | 2,392,661 | Undefined Javascript variable | <p>So here is the problem. There is a HTML/JS code, but I can't read v3 variable. In short anything after <code>DDDD(D,{"COM":"lng","leaf":145,"AXIS":true});</code> (which is some kind of predefined random array) is unreadable(or ignored as JS code). Why? And how can i get contents of v3? Is this a javascript parse bug... | javascript | [3] |
5,399,417 | 5,399,418 | how to take image in byte[] format from drawable folder? | <p>I want to take the image from drawable folder but it should be in the byte[] format.So that i can save that byte[] into the database.I have gone through links but that is taking image from drawable folder in String or Drawable format. Any suggestion for me plz..</p>
| android | [4] |
4,138,421 | 4,138,422 | To start our application when user selects a file to share | <p>I am developing an application to share files between two devices. My task is to pin my application to the 'share menu' or 'send via menu' so that my application get started when the user want to share it through my application.</p>
<p>If anybody knows how to resolve this please answer.</p>
<p>Thanks</p>
| android | [4] |
4,252,790 | 4,252,791 | C Programming, Variables | <p>When we declare variables in a class and then when we assign the value of those variables, for example like this </p>
<pre><code>class c {
public :
int x;
int x2;
c () {
x = 0;
x2 = 0;
scanf ("%d", &x); and now we're gonna input for example 10
}
};
</code></pre>
... | c++ | [6] |
2,781,723 | 2,781,724 | How to attach request parameters to current Android HttpUrlConnection call | <p>I am able to send a request from an Android program to a remote server, but it seems the request has no parameters. How do I attach parameters?</p>
<p>Here is my current code:</p>
<pre><code> @Override
protected String doInBackground(String... theParams)
{
String myUrl = theParams[0];
... | android | [4] |
5,305,565 | 5,305,566 | How to save bitmap in database? | <p>I want to know how to save a bitmap in database. I created table in db as:</p>
<pre><code>@Override
public void onCreate(SQLiteDatabase db)
{
db.execSQL("CREATE TABLE " + TABLE_NAME + " (_id INTEGER PRIMARY KEY AUTOINCREMENT,image BLOB)");
}
</code></pre>
<p>My problem is I am not able to insert t... | android | [4] |
3,011,891 | 3,011,892 | Why {}.toString can check data type? | <p>Can anyone explain a bit about why these codes can check data type? They does not make sense to me. I cannot understand what the codes do behind the scene. Thanks in advance!</p>
<pre><code>var toClass = {}.toString // {} is for what? toString is a method?
alert(toClass); // alert it I get a function? = > funct... | javascript | [3] |
3,087,347 | 3,087,348 | setContentView not executed after onRestoreInstanceState | <p>I have the following problem:</p>
<p>After <code>onRestoreInstanceState</code> is called, I notice that while <code>setContentView</code> is supposed to be called, I keep getting all sorts of exceptions that imply that <code>setContentView</code> isn't executed - missing <code>findViewById</code>, <code>getWindow()... | android | [4] |
1,629,993 | 1,629,994 | Is it right to think of a Javascript Function Expression that uses the 'new' keyword as 'static' | <p>I'm just trying to understand Javascript a little deeper. </p>
<p>I created a 'class' <code>gameData</code> that I only want ONE of, doesn't need a constructor, or instantiated.</p>
<p>So I created it like so...</p>
<pre><code>var gameData = new function () {
//May need this later
this.init = function ... | javascript | [3] |
938,365 | 938,366 | How to display text at runtime throught LightBox | <p>how to show few text in light box instead of image. i found that most of the time light box is used to show images but i want to show text or suppose a asp.net gridview inside a light box. i found jquery light box plugin available the url is <a href="http://leandrovieira.com/projects/jquery/lightbox/" rel="nofollow"... | jquery | [5] |
267,800 | 267,801 | display a bg image in table view for iphone | <p>i can display BG image in table view cell but when i click any cell there is a blue color filling all my cell and my images just goes behind now i want to show my image in front of that blue color how to do that??</p>
<pre><code>cell.backgroundView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Super... | iphone | [8] |
2,672,516 | 2,672,517 | how to show progress bar moving from one activity to another activity in android | <p>I want to show progress bar to going from one activity to another activity until another activity is loaded can anybody give example</p>
<p>Thanks</p>
| android | [4] |
5,568,172 | 5,568,173 | Is it possible to have variables visible "only to modules" and its extensions? | <p>Say I have the following modules, split across multiple files both capable of <em>extending</em> <code>skillet</code>:</p>
<p><strong>File1.js:</strong></p>
<pre><code>(function(){
var privateVar1 = 0;
var privateFunction1 = function() {
//function definiton
};
skillet.fry() = function() {
//fry it
//m... | javascript | [3] |
5,985,559 | 5,985,560 | timer issue at getting previous view | <p>hi i am new to iPhone development. what i am doing is displaying 20 images as grid and each image treat as button,by selecting that image it will be displayed on image view "here what i needed is i using timer to get back to grid but there is [NSCFArray ObjectAtIndex]: index(4) beyond bounds(4) and application termi... | iphone | [8] |
172,823 | 172,824 | How do I control the behavior of window.location in Javascript? | <p>At the bottom of my page I have window.location = ...</p>
<p>I wish my page (let's call it jspage) to load, and then only once everything is fully loaded do the redirect. At the moment I get "stuck" on the referring page while jspage is processing, then jspage flashes up for a tiny instant and I am redirected</p>
| javascript | [3] |
2,937,454 | 2,937,455 | How to check in an entered value is from autocomplete? | <p>I have a jquery's autocomplete texbox and, upon a click of a button, I need to check if the value entered has come from the autocomplete or is it a completely new value.</p>
<p>The problems is that my code constantly gives me 'alert("no")'... maybe I shouldn't be checking against 'cache', but something else?</p>
<... | jquery | [5] |
2,376,627 | 2,376,628 | JQuery only highlight prepended text | <p>I need to highlight the text that I prepend; not the entire string. My code below highlights everything.</p>
<pre><code>jQuery("#foo").prepend("<li>Addition li</li>").effect("highlight", {}, 1000)
</code></pre>
<p>So I only want to highlight that new <li>. How can I do this?</p>
| jquery | [5] |
3,399,349 | 3,399,350 | Destructors and constructors | <p>Would someone please explain to me why I get an "Error: not declared in this scope?"</p>
<p>num and denom are private members of class Rationalnumber.</p>
<p>Thanks!</p>
<pre><code>Rationalnumber::Rationalnumber(){
num = 0;
denom = 1;
int * n = new int;
int * d = new int;
*n = num;
*d = denom;
}
Rationalnumber::... | c++ | [6] |
4,652,703 | 4,652,704 | Java: how do I spawn multiple threads on each processor core? | <p>I have a java app, and, I want it to take advantage of multicore processors, how do I take advantage of them? Does just spawning a new thread do the trick? Like does the OS decide what core to put the thread on?</p>
| java | [1] |
162,071 | 162,072 | Simple code? PHP script pulls update.zip from central server and extracts it to local folder! | <p>Can someone post code or point to a working example of a php script that opens a known zip file located on a remote server (via http) and extracts the contents of that zip file to a folder on the same server as the calling script?</p>
<pre><code>Server A calls out for zip file located on Server B
Server B sends the... | php | [2] |
4,396,172 | 4,396,173 | Jquery select only neighbor | <p>I've got:</p>
<pre><code><div class="row even">
<div class="more">more</div>
<div class="body">Some additional text</div>
</div>
<div class="row odd">
<div class="more">more</div>
<div class="body">Anoteher text</div>
</div>
</c... | jquery | [5] |
2,662,377 | 2,662,378 | Getting a value of a site | <p>So as the title says I want to get a value of this site : <a href="http://xtremetop100.com/conquer-online" rel="nofollow">Xtremetop100 Conquer-Online</a></p>
<p>My server is called Zath-Co and right now we are on rank 11.
What I want is that a script is going to tell me which rank we are, how much in's and out's we... | php | [2] |
1,967,647 | 1,967,648 | mediaplayer start and stop within dialog | <p>I've an "info" dialog and I'd like add background music. I added my music in res/raw, just open dialog there's a check by sharedpreferences. So, when an users click on "info", automatically start music, next when users click on "ok" music should be stops.</p>
<p>My code, but does not runs.</p>
<pre><code>private v... | android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.