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
2,053,168
2,053,169
jquery sum values from different divs with same classes
<p>I am loading dynamically divs that have a .totalprice class. At the end, I would like to sum of the values from all of the .totalprice.</p> <p>Thank you. </p>
jquery
[5]
2,899,368
2,899,369
How to read contact name and number from contact list
<p>I'm trying to read contact numbers from users contact list. Here is my code</p> <pre><code>Cursor cursor = getContacts(); if(cursor.getCount()&gt;0){ while (cursor.moveToNext()) { String displayName = cursor.getString(cursor.getColumnIndex(ContactsContract.Data.DISPLAY_NAME)); int numberField = ...
android
[4]
3,850,185
3,850,186
Self update application while running in memory
<p>I have a console app that is triggered by a scheduled task. I would like to run this console app permanently in a new thread and anytime a newer version of the console app is placed, it should run the main code. (maybe once the main code is done executing, it should run a monitor thread on the console exe. When the ...
c#
[0]
4,542,137
4,542,138
jquery on input blur show / hide class
<p>I am currently building an html form and using jquery to validate.</p> <p>Each input field is set up like this:</p> <pre><code>&lt;div class="controls"&gt; &lt;input type="text" class="input-xlarge" name="name" id="name"&gt; &lt;div class="info"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="valid" style="di...
jquery
[5]
20,649
20,650
How to design a JavaScript class to support callbacks in a clean way?
<p>I've tried to design some classes to support a callback functionality. Classes MyClass1 and MyClass2 didn't work. Class3 worked, but the design is really horrible. It uses a external class reference to call the method. I'd like to implement a design similar to MyClass1, which is a lot clearer and isn't coupled to an...
javascript
[3]
2,905,893
2,905,894
PHP Remove URL from string
<p>If I have a string that contains a url (for examples sake, we'll call it $url) such as;</p> <pre><code>$url = "Here is a funny site http://www.tunyurl.com/34934"; </code></pre> <p>How do i remove the URL from the string? Difficulty is, urls might also show up without the http://, such as ;</p> <pre><code>$url = "...
php
[2]
5,589,688
5,589,689
How can I create News Android application without having my own server?
<p>I have tried to create a news app that display news from some website.<br> Some friends helped me to write some php so that I can call the php using http request and get the JSON from the response.<br> Then, I can parse the JSON and display the news correctly.<br> However, the server is not mine.<br> Actually, I don...
android
[4]
2,713,039
2,713,040
issue with using std::copy
<p>I am getting warning when using the std copy function.</p> <p>I have a byte array that I declare. </p> <pre><code>byte *tstArray = new tstArray[length]; </code></pre> <p>Then I have a couple other byte arrays that are declared and initialized with some hex values that i would like to use depending on some initial...
c++
[6]
1,628,823
1,628,824
what does "@" means in c#
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1057926/when-to-use-in-c">when to use @ in c# ?</a> </p> </blockquote> <p>F.e. <code>string sqlSelect = @"SELECT * FROM Sales".</code></p>
c#
[0]
4,076,299
4,076,300
receiving warning of uninitialized local variable
<p>I am writing a program and I am trying to overload to &lt;&lt; operator. When I debug my code, i receive an error saying that p is not initialized. I feel as if i am initializing p in the for statement, but i guess i am not. cannot seem to figure out how i would initialize p. this is the code where i am receiving th...
c++
[6]
1,402,765
1,402,766
Method to recursively delete any directory that has no files, my solution seems to work but trying to find ways it can break
<p>This method will delete any files and empty directories provided in the fileList. It seems to be working. I use recursion to delete the empty directories and i'm worried about cases that will create an infinite loop. Any thoughts or things to consider with this approach?</p> <pre><code>public static void deleteFile...
java
[1]
2,646,318
2,646,319
How can I store reference to a variable within an array?
<p>I'm trying to create an array that maps strings to variables. It seems that the array stores the current value of the variable instead of storing a reference to the variable.</p> <pre><code>var name = "foo"; var array = []; array["reference"] = name; name = "bar"; // Still returns "foo" when I'd like it to retur...
javascript
[3]
3,086,579
3,086,580
Add new updates on Android App
<p>I am a beginner on Android as I am working on developing a new Android app. In my project I have some problems when the user click on an icon, it should redirect him to dot net website I did in my code.</p> <ol> <li><p>If I want to update the apk file on customer mobile to update it should prompt to the user to dow...
android
[4]
756,147
756,148
jQuery softscroll.js works in all browsers in the demo, but doesnt work in safari on my website?
<p>Basically what i say in the title is what goes.. Ill show you some of the code and give an explanation.</p> <p>Here's the website page: <a href="http://eosa.co.cc/themes/osoa/portfolio.html" rel="nofollow">http://eosa.co.cc/themes/osoa/portfolio.html</a></p> <p><strong>As this doesnt let me post more than 1 link d...
jquery
[5]
445,318
445,319
Web frontend for a Python application
<p>I created a nice RSS application in Python. It took a while and most of the code just does heavy work, like formatting XML, downloading feeds, etc. To the application itself requires very little user interaction, just a initial list of RSS feeds and some parameters. </p> <p>What would be really nice, is if I was ...
python
[7]
2,092,499
2,092,500
Sql calls in code behind page
<p>For now all my sql calls take place in the cs pages and its a lot of code my goal is to set a new class or whatever (i heard it is done right with dll's) that the class will store functions for every scenario i will need. So my question is how to accomplish it .. Suppose in a large scale site how it is supposed to b...
asp.net
[9]
1,075,308
1,075,309
How to access the web with Python?
<p>I want to access websites without using their API. Would i do this by using something like Mechanize?</p>
python
[7]
1,714,976
1,714,977
what does ? sign in this statement?
<blockquote> <p><strong>Possible Duplicates:</strong><br> <a href="http://stackoverflow.com/questions/889373/quick-php-syntax-question">quick php syntax question</a><br> <a href="http://stackoverflow.com/questions/3737139/reference-what-does-this-symbol-mean-in-php">Reference - What does this symbol mean in PHP?<...
php
[2]
1,872,927
1,872,928
Access mobile inbox online
<p>Is possible to access mobile inbox online using android?</p>
android
[4]
364,854
364,855
How to Zoom in and out an image using seekbar in android?
<p>In my application I have a requirement of Zooming in/out an image using seekbar,I can able to Zoom in/out by using Touch events.</p> <p>I also need to add seek bar for zooming.Is it possible to do this?</p> <p>thanks</p>
android
[4]
2,322,841
2,322,842
Display "Loading" Message While Loading External JavaScript?
<p>So, I know how to use JS or jQuery, etc., to display a "Loading" message while content is loading. I have created a fairly large webapp with a number of JS dependencies and I want to display a "loading" message while all the scripts are loading.</p> <p>My head tag has a number of <code>&lt;script src=…&gt;</code> ...
javascript
[3]
3,148,944
3,148,945
Is there a universal way of iterating over a set or values of a dict in Python 2.7?
<p>I expect the collection to be either a set or a dict. Problem is that:</p> <pre><code>for element in collection: print element </code></pre> <p>will give me the elements if collection is a set, but indexes if collection is a dict. What I want is a one-liner that will iterate over dict values.</p> <p>Is that p...
python
[7]
3,274,102
3,274,103
java condition using strings not working
<p>This is a program when i type "kutty" it should say me "Hello kutty" but this code is not working.</p> <pre><code>import java.util.*; public class Kutty { public static void main(String args[]) { byte a[]={5,2,3}; String c; Scanner scan=new Scanner(System.in); c=scan.next(); ...
java
[1]
1,483,146
1,483,147
Android TrafficStats delivering wrong numbers
<p>I want to measure the data transferred and received for my HTTP request over the mobile network. I found the TrafficStats API in Android 2.2, but the numbers I get from this seem to be too low. I am measuring on a real device (HTC Desire), over 3G network. Immediately before the request a compute the tx/rx data sinc...
android
[4]
4,694,384
4,694,385
Cannot import namedtuple while using pydoc
<p>OS - Windows XP Python - 2.6.4</p> <p>While trying to generate docs using pydoc, I get the error -</p> <pre><code>Traceback (most recent call last): File "C:\Python26\Lib\pydoc.py", line 55, in &lt;module&gt; import sys, imp, os, re, types, inspect, __builtin__, pkgutil File "C:\Python26\Lib\inspect.py", l...
python
[7]
2,159,349
2,159,350
how to change values of a dropdown on key press using jquery
<p>i need to change values of a "Focused" dropdown on keypress using jquery.</p> <p>i need,</p> <ol> <li>how i get a foucsed drop down or how i can check whether the drop down has focus.</li> <li>how to change this drop down values in key press like 1,2,3 etc. using JQUERY.</li> </ol> <p>thanks in advance.</p>
jquery
[5]
195,657
195,658
Use of <%= %> and expression databinding for Write Response
<p>i want write content(summary) with &lt;%= %> and expression databinding in below code but do not success!how i can, do it?</p> <pre><code>&lt;asp:Literal Text='&lt;%# Eval("Summary") %&gt;' ID="SumLitteral" runat="server" /&gt; </code></pre>
asp.net
[9]
47,056
47,057
hide all li elements and show the first 2 and toggle them by button
<p>hay assume i have</p> <pre><code>&lt;ul&gt; &lt;li&gt;2&lt;/li&gt; &lt;li&gt;3&lt;/li&gt; &lt;li&gt;4&lt;/li&gt; &lt;li&gt;5&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>i want jquery code hide all <code>&lt;li&gt;</code> then show the fist and the second one then <code>append()</code> an additional <co...
jquery
[5]
4,797,451
4,797,452
main method in Python
<p>I have the following code, which has the following two problems:</p> <pre><code>Traceback (most recent call last): File "C:\Users\v\workspace\first\src\tests.py", line 1, in &lt;module&gt; class Animal: File "C:\Users\v\workspace\first\src\tests.py", line 39, in Animal File "C:\Users\v\workspace\first\src...
python
[7]
3,301,013
3,301,014
connect tableView + tableView
<p>Right now I have an indexed tableview that goes to a detail view but i want it to go to another tableview then a detail view.</p> <p>my code like this:</p> <p>` - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {</p> <pre><code>displyAnnController *anController = [[disply...
iphone
[8]
1,094,049
1,094,050
C++ template specialization question
<p>I'm trying to implement a generic toString() function that would work on all types. All our internal classes derive from Abstract which includes a signature for toString(). In other words, all our internal classes have in some form, a toString method. </p> <p>The problem is, the primitive types (int, char, double.....
c++
[6]
494,846
494,847
Run a method thats name was passed as a string
<p>I have a C# method that takes a string as an argument, that string contains the name of a static method e.g</p> <pre><code>"MyClass.GetData" </code></pre> <p>Is it possible to run that method from the value passed in the string?</p>
c#
[0]
988,025
988,026
Date and Time string parse
<p>I have a date time string formatted as follows:</p> <p><strong>2012-12-03T02:00:00Z</strong></p> <p>I want to split the date and time up and display it as follows: 03/12/2012 02:00:00</p> <p>How can I do this in python in as few a lines as possible?? (The 'T' and 'Z' will be removed)</p>
python
[7]
3,660,800
3,660,801
Can a service get a reference to the activity during onBind?
<p>I have a service that basically manages a MediaPlayer instance for playing podcasts. Once an activity binds to the service it can do things like play, pause, stop, etc. I used a service because I want the podcast to continue playing even after the activity is destroyed.</p> <p>I'd like the service to be able to s...
android
[4]
671,229
671,230
Reimport a module in python while interactive
<p>I know it can be done, but I never remember how.</p> <p>How can you reimport a module in python? The scenario is as follows: I import a module interactively and tinker with it, but then I face an error. I fix the error in the .py file and then I want to reimport the fixed module without quitting python. How can I ...
python
[7]
5,799,814
5,799,815
Run windows service task at a specific time using C#
<p>i have already design my windows service which include many tasks (same logic run each xxx seconds), but for the new task i have to do :</p> <ul> <li>Download over HTTP a playlist xml file from a CDN repository in a specific time, let see 03:12:12 pm.</li> </ul> <p>i'am looking for profesional code (just thread or...
c#
[0]
2,633,387
2,633,388
How do I disable jQuery dialog child elements from resizing independently?
<p>I have a dialog box that I open using jQuery 1.7.1. The html for the dialog is:</p> <pre><code>&lt;div id="transactionDialog" title="Transaction Contents"&gt; &lt;textarea&gt;&lt;/textarea&gt; &lt;/div&gt; </code></pre> <p>jQuery Code:</p> <pre><code>$("#transactionDialog").dialog({ autoOpen: false,...
jquery
[5]
4,485,668
4,485,669
ListView QueryString Security
<p>I've a ListView with HyperLink where I pass the orderID. I'm worried that query string is security risk given that end user can modify it.</p> <p>Could you please suggest any other options I can take? It's a ListView and looks like i dont have much options..</p> <p>This is what I'm doing at the moment at ListView:...
asp.net
[9]
668,418
668,419
Is there a way to capture all FormClosed event in C# within an application automatically?
<p>I would like to centralize code handler for all FormClosed Event, is there a way to be notified automatically by all forms that are closing ?</p>
c#
[0]
811,024
811,025
How to Block outgoing calls and Text SMS
<p>I am developing an App in which I need to block the teenager from using mobile while driving, I need to block the call and sms. please help . any small hints and clues will do. please help me!</p>
android
[4]
3,985,242
3,985,243
Does C++ support variable numbers of parameters to functions?
<p>Like <code>printf</code>?</p> <p>But I remember that C++ does name mangling with function name and parameter types,</p> <p>this can deduce that C++ doesn't support variable length parameters...</p> <p>I just want to make sure, is that the case?</p> <p><strong>UPDATE</strong></p> <p>the discussion should exclude...
c++
[6]
179,742
179,743
Why am I getting only first character in array stored in Session?
<p>I have an array (mysql query result) stored in $_SESSION variable.</p> <p>Now, I try to access a member of that array like:</p> <pre><code>$_SESSION["template"]["key"] </code></pre> <p>Now, the problem is that it gives only first character of the string "key". Strangely, it runs perfectly on localhost and also di...
php
[2]
5,760,876
5,760,877
Block a user from a website in ASP.NET
<p>Beside IP blocking and probably using a cookie (if the user changes the IP but doesn't remove the cookie, the new IP is added to the banned list, so the IP has to be changed and the cookie has to be removed together to access the site), is there any tricks one can use to block an annoying user from a website, I know...
asp.net
[9]
1,569,698
1,569,699
Removing the values using JQuery
<p>I need to remove some values from a hidden and text input box using JQuery, but somehow this is not working</p> <p>Example:</p> <pre><code>&lt;input type="hidden" value="abc" name="ht1" id="ht1" /&gt; &lt;input type="text" name="t1" id="t1" /&gt; </code></pre> <p>I use the following JQuery code to remove the valu...
jquery
[5]
5,139,499
5,139,500
unable to install apk file on AVD Emulator
<p>I have an apk file which have to install on AVD Emulator. But it is showing outofspace dialog with message(app could not be viewed. Free up some space on your and try again).</p> <p>I do uninstall some apps and free memory and install again the app after uninstalling it. but again it is showing same alert msg.</p> ...
android
[4]
4,817,748
4,817,749
Linking with constant variable definition in a header file
<p>Suppose I created a header file constants.h and this file contains:</p> <pre><code>extern const int YEAR = 2011; // definition </code></pre> <p>If I tried in a cpp file (MainCPP.cpp) to use this constant after declaring it without defining it and without including the constants.h file as following:</p> <pre><code...
c++
[6]
5,171,612
5,171,613
Can we execute multiple commands in the same command prompt launched by python
<p>There is an excel file which contains the paths of multiple scenarios. I am using <code>os.system(command)</code> in a for loop. In each iteration, a path is read from excel file and executes the scenario for that path. </p> <p>My problem is that every time, by using <code>os.system()</code>, a CMD opens, execute o...
python
[7]
1,306,895
1,306,896
Sending keys to inactive windows
<p>I've been doing java for a couple months now in a software engineering class and I've recently been working on a program that sends text to an inactive or minimized program. Sending it to the active window is a simple matter of importing jna and using the key press function, ex: <code>r.keyPress(KeyEvent.VK_F6);</co...
java
[1]
35,313
35,314
How to convert a string to a Guid
<p>I did not find the TryParse method for the Guid. I’m wondering how others handle converting a guid in string format into a guid type.</p> <pre><code>Guid Id; try { Id = new Guid(Request.QueryString["id"]); } catch { Id = Guid.Empty; } </code></pre>
c#
[0]
2,094,708
2,094,709
How to get a random line of a text file in Java?
<p>Say there is a file too big to be put to memory. How can I get a random line from it? Thanks.</p> <p>Update: I want to the probabilities of getting each line to be equal.</p>
java
[1]
3,719,924
3,719,925
ListActivity Intents
<p>I currently have a ListActivity and I am looking to start a new activity based on the selection in the list. Based upon Intents and Extras, how can I make this possible? Here is my code so far:</p> <pre><code>package com.fragile.honbook; import android.app.ListActivity; import android.os.Bundle; import android.v...
android
[4]
3,010,531
3,010,532
Is there a way to check if text is in cyrilics or latin using C#?
<p>Is there a way to check if text is in cyrilics or latin using C#?</p>
c#
[0]
63,986
63,987
Cannot Access Protected Function in Derived Class in C#?
<p>How to use protected function of base class in derived class?</p> <pre><code>public class A { protected void Test() { // some code.... } } public class B : A { public void Test2() { A obj = new A(); obj.Test(); // error thrown; } } </code></pre> <p>When i tried to use the Test function o...
c#
[0]
4,855,520
4,855,521
Jquery - use form action including the GET variables?
<p>it it possible to get the form action of a GET form on submit including all of the get variables added on the end?</p> <p>The reason being I want to use AJAX to run the script that the form submits to, and then just display a thank you message.</p>
jquery
[5]
46,808
46,809
how to get only time from date time
<p>suppose i have 6/22/2009 10:00:00 AM.. then how to get only 10:00 Am from this date time</p>
c#
[0]
3,125,891
3,125,892
Can I use file.readline in a blocking manner? Am I doing this right?
<p>I'm trying to write a something that monitors a log file and adds a timestamp when it sees a complete line: </p> <pre><code>import sys f = open(sys.argv[1]) if not f: print 'Failed to open %s' % sys.argv[1] print sys.argv[1] import time try: while True: line = f.readline().replace('\n', '') ...
python
[7]
5,854,731
5,854,732
Positioning an image in middle of the screen
<p>Hi can someone please tell me how to position an image in the centre of the screen using javascript?</p> <p>Would I get the screen height and divide by 2? How would I get the screen height?</p> <p>Thanks!</p>
javascript
[3]
601,333
601,334
getting data from combobox to a datagridview
<p>I am using windows forms application. I have two combo boxes , comboA and comboB.I have a datagrid view with two columns. Now I have to populate the datagrid view, with selected item from comboA into first column of datagridview and selected item of comboB into the second column. Please suggest me.</p> <p>To...
c#
[0]
2,821,629
2,821,630
javascript read variable value from URL
<p>When i post data from one page to another,how do i get that into dom.</p> <p>say URL is www.test.com/?xxx=1234&amp;a=122</p> <p>How to get <strong>xxx</strong> and <strong>a</strong> value inside DOM?</p>
javascript
[3]
2,899,076
2,899,077
Possible to use preprocessor directives in web.config?
<p>I'd like to be able to do this so that I could do something like:</p> <pre><code>#if DEBUG &lt;!--&lt;customErrors mode="On" defaultRedirect="Error.aspx" /&gt;--&gt; #else &lt;customErrors mode="On" defaultRedirect="Error.aspx" /&gt; </code></pre> <p>Possible? Would make life a little easier.</p>
asp.net
[9]
571,999
572,000
jQuery test if element1 is descendant of element2
<p>Does anyone know a good way to test if one element, stored in a var, is the descendant of another, also stored in a var?</p> <p>I don't need <code>element1.isChildOf('selector')</code>, that's easy.<br> I need <code>element1.isChildOf(element2)</code></p> <p><code>element2.find(element1).size() &gt; 0</code> Does ...
jquery
[5]
2,410,733
2,410,734
Want to Integrate Google Calender In my App
<p>I want to develop an android app in which I want to integrate Google Calendar .This is my first app. N nm not getting to start from where please help ... I included calendarview in my xml file but its not working properly n throwing an error of saying "class could not be found "</p>
android
[4]
953,236
953,237
Dictionary with List of Values
<p>I have a file such as:</p> <pre><code>a 1 a 2 b 5 c 8 a 9 </code></pre> <p>I want to add together the second field per key so that I have an aggregate number and therefore a single key:value pair.</p> <p>With a large dataset I am thinking the best way to go about this would be to create a dictionary that contains...
python
[7]
671,849
671,850
finding multiple ocurrences of a string
<p>How can I find multiple occurrences of a string within a string? And replace the found string with another string in all occurrences? Say, I have the string below:</p> <pre><code>"A cat is going. It is black-white stripped." </code></pre> <p>I want to replace all occurrences of "is" with are.</p>
c++
[6]
4,975,416
4,975,417
how to #define macro only to specific files?
<p>I have a special macro defined in macro.h, but I want it to be valid only in part of my source files (h/cpp), how can I do that?</p> <p>I am afraid that some "bad" user included the macro.h before the source files that must not be familiar with the macro.</p> <p>how can I prevent it?</p>
c++
[6]
2,012,237
2,012,238
How can I catch the event that happens only when the value of a <select> changes through user input?
<p>I have the following code for a normal select list:</p> <pre><code> $('.update-title') .change(function () { var title = $('option:selected', this).prop('title'); $("#modal_Title").val(title); }); </code></pre> <p>This seems to be getting triggered when the select is popu...
jquery
[5]
5,165,530
5,165,531
Convert date to month and day python?
<p>if I have an array of dates:</p> <pre><code>["2012-1-1", "2012-1-3","2012-5-3"] </code></pre> <p>I want to be able to get a result list of:</p> <pre><code>["January 2012", "May 2012"] </code></pre> <p>What is the best way to do this?</p>
python
[7]
1,251,984
1,251,985
Casting To The Correct Subclass
<p>I hava a supeclass called Car with 3 subclasses.</p> <pre><code>class Ford extends Car{ } class Chevrolet extends Car{ } class Audi extends Car{ } </code></pre> <p>Now i have a function called <code>printMessge(Car car)</code> which will print a message of a particular car type. In the implementation i use ...
java
[1]
3,998,513
3,998,514
PHP: Get the last weekday of the year
<p>Is it possible in php to get the last weekday of the year, i.e- not a Saturday or Sunday?</p> <p>If so, whats the best way to do this?</p>
php
[2]
3,807,030
3,807,031
Travesing the DOM - Alphabetically
<p>I have a list of links/image pairs in a page. </p> <p>For example, social page below has two links - Twitter, Facebook...the image didn't capture the name. </p> <p>I need to traverse these and do and insert alphabetically.</p> <p>So I grab the page ID as follows:</p> <pre><code>var element_iterator = document....
javascript
[3]
315,586
315,587
Anchor Javascript Window Reloading
<p>all ready link here : <code>site.com/en/#gone_videoid</code></p> <p>new url : </p> <pre><code>var url = 'en/#gone_videoid2'; window.location.href= url; </code></pre> <p>coming url : <code>site.com/en/#gone_videoid2</code></p> <p>but window refeshing when refering location href i want work like this click</p> <...
javascript
[3]
1,908,982
1,908,983
Question regarding subprocess in python
<p>I have a question regarding subprocess popen()</p> <p>If suppose the command executed is in a while loop is there any way for the subprocess.popen to detect it and exit after printing the first output?</p> <p>Or is there any other way to do this and print the result</p> <p>As u see the following program executed...
python
[7]
4,185,305
4,185,306
The method replaceVariables(String) is undefined for the type
<p>I get this message for as many times as I have used <code>replaceVariables</code> in my code. I have added the referenced libraries, but I don't know what else to do. Can someone please help me?</p> <p><strong>Update</strong>: This is the code:</p> <pre><code> int k = 0; for(Xml reg_is:fetchsite.child("site").ch...
java
[1]
4,246,972
4,246,973
How to run a video hosted on YouTube or a private server in Android?
<p>I have about 3 videos that i cannot install with my app on DROID due to their huge size. Now we have decided to host them on a private server or YouTube. How can i run these videos in Android? Thank you</p>
android
[4]
2,089,356
2,089,357
Get Google Analytics ID with Javascript
<p>I am trying to extract the Google analytics ID from a html document.</p> <p>I found the following function:</p> <pre><code>function get_UA() { txt = document.getElementById('scripttag').value; var matches = txt.match(/(UA-[\d-]+)/); if (matches[1]) { alert(matches[1]); } } </code></pre> <p>But im gettin...
javascript
[3]
3,686,673
3,686,674
Jquery Keyup with Contains to hide Span
<p>I am attempting to hide certain elements using the combination of keyup with contains. What I want to do is hide the span elements that do not equal my input values.</p> <p>For instance, if I input the value 1 the spans containing the values 2 and 3 are hidden, leaving only the span containing the 1 visible. I woul...
jquery
[5]
5,779,443
5,779,444
Destruction of class members when destructor is not called
<p>In the following code, when <code>ptr</code> is deleted, the destructor for <code>Base</code> is called, but not the destructor for <code>Derived</code> (due to destructor of <code>Base</code> not being virtual).</p> <pre><code>class Base { int b; }; class Derived : public Base { int d; }; int main(void) { ...
c++
[6]
5,048,484
5,048,485
How to post sdcard image into facebook wall using graph api
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/13740692/how-to-post-image-to-facebook-wall-using-graph-api">How to post image to facebook wall using graph api</a> </p> </blockquote> <p>I am using Graph API to post on Facebook wall.</p> <pre><code>strpostima...
android
[4]
3,897,836
3,897,837
Button subclass with Alpha
<p>I'm trying to set the transparency of a button using the API level 10 (so no view.setAlpha). I wrapped the <code>Button.onDraw</code> calling a <code>Canvas.saveLayerAlpha</code> on a subclass: this works with the text but not with the button background.</p> <p>I want to make it possible to leave the current button...
android
[4]
2,824,774
2,824,775
Read file and add to database
<p>I want to load a .txt file and loop through this to put data in a database.</p> <p>text file format looks like this:</p> <pre> 1231.24314, 112.341234, 34, text 34.13214234, 3455.1234, 11, text </pre> <p>There are hundreds of rows that I want to read out and save each row into a database in the right column</p> <...
php
[2]
690,736
690,737
Capturing events when my application is minimized
<p>I want to develop an Android application in order to capture events (key press, touch, ...). The problem is that when my application is minimized, it cannot capture events. One solution can be using message sent from OS kernel to processes but I do not know how. I will be appreciated if anybody can help me.</p>
android
[4]
1,584,528
1,584,529
How to create a file using content?
<p>After capturing a photo I'm receiving an <code>Intent data</code> from which I'm retrieving an <code>Uri</code>:</p> <pre><code>Uri contentURI = data.getData(); </code></pre> <p>content Uri is <code>content://media/external/images/media/5576</code></p> <p>Using this <code>contentURI</code> I need to save a File t...
android
[4]
2,185,923
2,185,924
List Line2D.Double
<p>HI everyone ,</p> <p>these two code statements are part of program (I'm currently trying to develop) whose main purpose is to display a waveform during playback of an audio file (.wav).</p> <p>The list lines , it contains <strong>line coordinates</strong> (values of samples in a diagram) ..is that correct?** </p> ...
java
[1]
4,248,446
4,248,447
How do disable the Alt+Tab,Alt+F4,ctr+Alt+Delete butttons from C# program?
<p>I am Using On application I want disable the Alt+Tab,Alt+F4,ctr+Alt+Delete buttons from C# program.and also to disable the right click if the users go at the top and click right it should not come it should not show that menubar also.how to do in web application.</p>
c#
[0]
3,358,555
3,358,556
asp.net dropdown list selected value
<p>For first time when the page loads we are unable to retrieve selected drop down value which consists of page numbers in dropdown list.Here is my dropdown list</p> <pre><code>&lt;asp:DropDownList ID="ddlpagenubers" runat="server" AppendDataBoundItems="true" onselectedindexchanged="ddlpagenubers_SelectedIndexChanged...
asp.net
[9]
2,939,266
2,939,267
implementing tabs with fragments instead of TabActivity issue
<p>I have used this <a href="http://developer.android.com/reference/android/app/TabActivity.html" rel="nofollow">tutorial</a> to implement tabs with fragments instead of TabActivity and it worked greate for some time I have two tabs with ListFragment. the problem is that suddenly the realTabContent disappeared from the...
android
[4]
60,706
60,707
readlines not reading the last line of the file in python
<p>I have a code where I am reading all the lines from the file using readlines function and I am further parsing each line in a list. But when I printed the list I saw that the loop is ignoring the last line in the file. When I inserted a blank line in the file then all the contents are read. can you pls tell me why i...
python
[7]
2,903,994
2,903,995
php regex form questions
<p>Is it possible to just use this code alone to do two different regex matches?</p> <p>One reg-ex match for X digits and the other for a given string "CAT" only, or do I need to create two different forms, one for each: X digits and one for the string "CAT"? </p> <p>Furthermore is there a better php method for this...
php
[2]
3,933,953
3,933,954
Android - query if a sync account is checked for syncing
<p>How can I query if a sync account is checked for syncing or not?</p>
android
[4]
5,892,144
5,892,145
Why doesn't Java allow to define two methods with the same signature except the generic type parameters?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1998544/method-has-the-same-erasure-as-another-method-in-type">Method has the same erasure as another method in type</a> </p> </blockquote> <p>In one of my classes I wanted to define these two methods:</p> <pre...
java
[1]
4,963,013
4,963,014
Stop uninstallation of application
<p>i create an app and install it on phone. now i want to add a feature that my app should not uninstall from the phone. so i think if one of the following issues could be solved</p> <ol> <li>is there anyway to stop the user from uninstall the app? </li> <li>is it possible , if user try to uninstall the app we get a...
android
[4]
2,564,717
2,564,718
color of progress bar
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2020882/how-to-change-progress-bars-progress-color-in-android">How to change progress bar&#39;s progress color in Android</a> </p> </blockquote> <p>Hi, I want to change the color of progress bar from yellow to b...
android
[4]
2,542,909
2,542,910
Internal access modifier
<p>I have a 2 classes in a project like this:</p> <pre><code>namespace ConsoleApplication1 { internal class ClassA { internal int dataMember; } } </code></pre> <p>and</p> <pre><code>namespace ConsoleApplication1 { class ClassB { static void Main(string[] args) { ...
c#
[0]
1,407,872
1,407,873
Need help on Bar Chart Plot
<p>I need help on plotting the bar chart to show daily based statistics like below attached image<img src="http://i.stack.imgur.com/Zpkc9.png" alt="enter image description here"> shown on iPhone App to android, can you any suggest the corresponding api for this one.</p>
android
[4]
543,675
543,676
asp.net 301 redirect without ms visual studio
<p>I have a website (asp.net c#), dns for 2 domains are pointed to the same server. For one domain website display correct, but for second one, it shows IIS7 splash page...</p> <p>www.mydomain.com - works fine www.mydomain.co.uk - IIS7 splas page</p> <p>How to make 301 redirect so i could point not working domain to ...
asp.net
[9]
1,346,398
1,346,399
java standalone app
<p>i am writing a standalone java app. the app's properties should be configurable from a webpage deployed with the app. how do i achieve this ?</p> <p>Thanks in advance</p> <p>note: the app has an embedded HTTP client/server module. it should only run from command prompt</p>
java
[1]
599,869
599,870
What is the difference between the wording of the first and second written
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/9006553/slice-or-array-prototype-slice">[].slice or Array.prototype.slice</a> </p> </blockquote> <p>the first</p> <pre><code>(function() { var slice = Array.prototype.slice, aArguments = slice.apply...
javascript
[3]
2,098,132
2,098,133
How to reload img every 5 second using javascript?
<p>How to reload img every 5 second using javascript ?</p> <pre><code>&lt;img src="screen.jpg" alt="" /&gt; </code></pre>
javascript
[3]
773,144
773,145
Python: Extracting numbers from result
<p>I was working on a python script to automatically extract ratings from imdb, only I am unable to extract the numbers from my result.</p> <pre><code>from pattern.web import URL from pattern.web import plaintext from pattern.web import decode_utf8 import re def scrape_imdb(film): url = URL (film) s=url.downl...
python
[7]
164,064
164,065
save user settings
<p>Why do not you want to keep the camera zoom after leaving aktivity?</p> <pre><code>public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.menu_old); SharedPreferences preferences = getSharedPreferences("goodnight", MODE_PRIVATE); ...
android
[4]