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,059,541
1,059,542
Get contents of div with inner div
<p>HTML:</p> <pre><code>&lt;div class="chocs"&gt;Chocolate Bar &lt;div class="id"&gt;1234&lt;/div&gt;&lt;/div&gt; </code></pre> <p>jQuery:</p> <pre><code>$('div#groupinfo .chocs').click(function(){ alert($(this).slug.text()); }); </code></pre> <p>Im trying to get the contents of the inner div (id) when the outer...
jquery
[5]
5,478,546
5,478,547
Problem getting real IP in php
<p>I am using this to get real IP but I take empty from <code>$_SERVER['HTTP_CLIENT_IP']</code>, I take not empty only from <code>$_SERVER['REMOTE_ADDR']</code> .But I dont need the IP of proxy, I need the real ip of computers using some intranet. Can I get it? When <code>$_SERVER['HTTP_CLIENT_IP']</code> does not retu...
php
[2]
3,763,764
3,763,765
this context changes while assigning
<p>This question is from <a href="http://dmitrysoshnikov.com/ecmascript/the-quiz/" rel="nofollow">ECMA-262</a> quiz</p> <pre><code>var x = 100; var foo = { x: 50, bar: function(){ return this.x; } } console.log(foo.bar()); //returns 50 console.log((foo.bar = foo.bar)()); //returns 100 </code></pre> <p>How d...
javascript
[3]
2,409,252
2,409,253
How can I create a create a java regular expression for a comma separator list
<p>How can I create a java regular expression for a comma separator list</p> <p>(3) (3,6) (3 , 6 )</p> <p>I tried, but it does not match anything:</p> <pre><code>Pattern.compile("\\(\\S[,]+\\)") </code></pre> <p>and how can I get the value "3" or "3"and "6" in my code from the Matcher class?</p>
java
[1]
5,456,677
5,456,678
Java Error: ')' expected
<pre><code>System.out.println("Enter a department name:"); String firstDepartment = bufRead.readLine(); System.out.println("Enter number of employees:"); val1 = Double.parseDouble(bufRead.readLine()); System.out.println("Enter cost per employee:"); val2 = Double.parseDouble(bufRead.readLine()); System.out.println...
java
[1]
3,593,726
3,593,727
released the software to Google Market, but release supports zero device
<p>I released the software to Google Market, but release supports zero device.I configured the manifest file: android: targetSdkVersion = "15" /> I use Android version 4.1 compiler. Tried many ways or zero device. I hope someone can help solve the problem. Really thank you!</p>
android
[4]
207,147
207,148
App Crash during HTTP Post
<p>I noticed that during HTTP Post of files to a backend server if the connection is not established (no reception) or the file size is too big (>10MB) my application crashes. </p> <p>Is there any way to solve this issue? How do I handle for such errors? </p> <p>I checked the logcat, it is showing:</p> <p>ERROR/An...
android
[4]
5,147,277
5,147,278
Replace onclick
<p>i want when click on phone code text it show the second hint span hint2 and when click on phone number text its show the first hint span is that possible to do with JavaScript only????</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &l...
javascript
[3]
1,608,973
1,608,974
Cookie to store post values
<p>The link to the page contains values in the URL that I need to store so that they can be accessed when the user browses around the site.</p> <p>I'm thinking a cookie is the best way to store these, then I can access the cookie when I need these values again. I see that cookies can only be created in the header befo...
php
[2]
858,007
858,008
Expand/collapse group nodes in ExpandableListView based on passed Cursor values?
<p>I've got a ExpandableListView widget that is populated using an adapter based on the SimpleCursorTreeAdapter as shown below. I I query my SQL database for the ListView's group titles as well as a boolean value to whether the group should be expanded or collapsed (which is returned in a Cursor). I then feed this Curs...
android
[4]
364,725
364,726
'C:\MPIHello\bin\Debug' is not recognized as an internal or external command, operable program or batch file
<pre><code>using System; using MPI; class MPIHello { static void Main(string[] args) { using (new MPI.Environment(ref args)) { Intracommunicator comm = Communicator.world; if (comm.Rank == 0) { //Send its rank to the next neighbor ...
c#
[0]
3,548,212
3,548,213
Pass through image from URL on dynamic script
<p>Is it possible to pass through an image file from a remote URL, without downloading it to the local server?</p> <p>I have a PHP script that tracks stats and then outputs an image via readfile(). Example:</p> <pre><code>&lt;img src="http://example.com/image.php?img=1234"&gt; </code></pre> <p>I'd like to use a CDN ...
php
[2]
5,742,195
5,742,196
Can't find the mistaks in my program
<p>I have the following, but keep getting the TypeError: 'Item' object is not iterable. Can anyone help me?</p> <pre><code>import xlrd class Item (object): def __init__(self): pass def readItems(self): wb = xlrd.open_workbook("data3.xls") sh = wb.sheet_by_index(0) sh1 = wb.she...
python
[7]
5,292,622
5,292,623
Android AlertDialog always exits when I click on OK Button
<p>Is there some way to do validation upon clicking ok. Im not dismissing it but it closes when I click Ok. I have written a custom AlertDialog that uses some edit texts. Problem is I can't validate anything. If validation fails I want to change message and tell user but instead it just closes. I'm using AlertBuilder<...
android
[4]
2,584,574
2,584,575
C# - Mixing of Private Constructor and non-private parameterful constructor are allowed in same class?
<p>Veterans please forgive me for asking silly question.<b> I understand that a class having private constructor prevents instance creation . </b></p> <pre><code>class InterestRate { // static constructor static InterestRate() { } //private constructor private InterestRate() { } ...
c#
[0]
319,848
319,849
PHP compiler optimization
<p>For a website in PHP I was searching Php compilers(I know it is parsed).Could'nt find any except HIPHOP from Facebook.I'm not talking about conversion to binary,I am interested in the optimization tasks a compiler performs so that I can optimize my PHP.Like removing extra variables,unused variables,statements inside...
php
[2]
4,628,945
4,628,946
Func and List<string>
<p><br> I have defined the following</p> <pre><code>Dictionary&lt;string, Func&lt;string, List&lt;string&gt;&gt;&gt; test1 = new Dictionary&lt;string, Func&lt;string, List&lt;string&gt;&gt;&gt;(); </code></pre> <p>also I have</p> <pre><code> private string fred(List&lt;string&gt; Parms) { return "Te...
c#
[0]
3,795,773
3,795,774
404 redirecting on include file
<p>I have added a 404 page and included the following in the .htaccess</p> <p>ErrorDocument 404 <a href="http://www.game-plan.net/404.php" rel="nofollow">http://www.game-plan.net/404.php</a></p> <p>For some reason I'm not aware of, when i process forms, it doesnt want to do that, it wants to redirect to a 404 page.</...
php
[2]
1,152,218
1,152,219
PrintForm Query in C#
<p>I have a print button in form 1, when i click that, I should be able to print another form say form 2(This form has the basic layout of the page to be printed). Can anyone please tell me as to how to make this reference to form 2 in the form 1 print button event handler? Is there any need to use printform component ...
c#
[0]
2,051,736
2,051,737
Take a particular string from a file using php
<p>Dear All, i have a txt file like:</p> <pre><code>--start-- jeff --end-- --start-- sophya --end-- </code></pre> <p>Now i need to collect the names like jeff and sophya into an array.How i do it?I use below code but its not give me proper output.</p> <pre><code>$data = file_get_contents('http://localhost/sample...
php
[2]
4,710,380
4,710,381
what is bad about this TextWriter method?
<p><img src="http://img179.imageshack.us/img179/7827/textwriter.jpg" alt="alt text"></p> <p>the tf.txt file has 0 bytes and when calling this method several times over the loop I get:</p> <p>the process cannot access " " because it is being used by another process</p>
c#
[0]
5,739,880
5,739,881
Returning null to object call
<p>I have written an auth class that allows the following:</p> <pre><code>echo $auth-&gt;user()-&gt;username; </code></pre> <p>Which will return the users username if they are logged in, but querying the database and fetching an object.</p> <p>The problem is, when no user is logged in, the auth class won't be able t...
php
[2]
3,772,197
3,772,198
Round UIButton
<p>I want to know whether drawing a round UIButton(not rounded rect) is possible.</p> <p>When I add a round image in a UIButton of type custom, then it looks like a round button. But at the moment the button is clicked the boundary of the button becomes visible, so that it looks like a square button, then again when t...
iphone
[8]
525,557
525,558
Jquery show select box value based anchor clicked
<p>To piggy back off this post <a href="http://stackoverflow.com/questions/8038000/jquery-change-the-select-box-value-based-on-anchor-clicked">Jquery change the select box value based on anchor clicked</a></p> <p>I can change the value of the actually select box </p> <pre><code>$("#id-for-select").val(2) </code></pr...
jquery
[5]
4,487,970
4,487,971
Incorrect path url for a jquery ajax request
<p>I have a very simple question. I would like to proceed to a jquery $.ajax request. I have some trouble with the 'url' right formatting. My index.php is in some folder, call it 'public'. In this folder, I have also my js files. Sharing the same level of the tree than 'public', I have a folder called 'classes' where ...
jquery
[5]
3,888,189
3,888,190
Audio recording with timer
<p>I want to take a photo and as soon as i do that, the audio should start recording automatically for say, 3 seconds.</p> <p>Those 3 seconds should be counted down by a <strong>timer</strong> which appears on the left side of the screen, after the photo is taken. </p> <p>So, then i have to <strong>combine the image ...
iphone
[8]
2,802,323
2,802,324
What is "this" in Form correspond in WPF?
<p>The "this" that we use in Form application. What does it correspond to in WPF? Is it MainWindow? I am using a library that is build around Form application and there are alot of "this" and I don't know how to convert the "this" in WPF</p>
c#
[0]
5,682,111
5,682,112
Pivot tables or crosstab queries in HTSQL
<p>I've been looking into HTSQL to solve some ad-hoc query requirements for a client's admin system (managing holiday trips, passengers, etc).</p> <p>Is HTSQL able produce pivot tables, or crosstab queries (as I think they are sometimes called)?</p> <p>For example: Count of Passengers by trip (rows) and charity suppo...
python
[7]
5,357,591
5,357,592
how do i align text and image in same button
<p>How do I align text and image on same button? I want to do like this image:</p> <p><img src="http://i.stack.imgur.com/gflFO.png" alt="enter image description here"></p> <p>but my button looks like this, with text overlapping the image:</p> <p><img src="http://i.stack.imgur.com/l8TN0.png" alt="enter image descript...
android
[4]
5,554,232
5,554,233
Function does not repeat when specified
<p>i have made a function "1" and I want to ask user "Do you want to repeat function "1"?", what am I doing wrong? Here is my code:</p> <pre><code>#include &lt;cstdlib&gt; #include &lt;iostream&gt; using namespace std; void temperature() { float c,f; cout&lt;&lt;"Áveskite temperatørà pagal Celsijø: "; ci...
c++
[6]
3,246,093
3,246,094
How do you insert a tab in a string?
<p>I don't really get it. Please help!</p> <p>I'm a beginner.</p> <p>To tab, don't you do this?</p> <pre><code>/t </code></pre> <p>Anyways, can someone please explain tabbing to me? Thanks!</p>
c++
[6]
1,973,988
1,973,989
Text viewed as HTML
<p>Hey everyone this is a update from my previous question <a href="http://stackoverflow.com/questions/6676440/android-showing-a-edittext-text-in-webview">[Android] Showing a EditText text in webview</a></p> <p>I got the webview to see the text inside my Edit text field but its displaying it as text this is the codin...
android
[4]
2,449,056
2,449,057
Is there a way to see the actual JavaScript generated by jQuery?
<p>To state the obvious, jQuery is great for beginners as it helps us write less code but it requires a large file to be referenced. I presume there is no tool to convert code written in jQuery to vanilla JavaScript. What is a good way to leverage my knowledge of jQuery to quickly write/generate vanilla JavaScript for ...
jquery
[5]
3,985,101
3,985,102
Removing private data from an Android phone programatically
<p>How can I remove private data (such as contacts, calendar items and media) from an Android phone programatically?</p>
android
[4]
1,912,950
1,912,951
PHP-based indexing and search implementation
<p>Is there such thing?</p> <p>I designed a while back a rudimentary form based app for my users. </p> <p>We receive from our suppliers hardware manufacturing data in XML files: file name is made of eleven fields separated by tildes, with each field having its own meaning.</p> <p>R&amp;D guys wanted to be able to se...
php
[2]
1,548,110
1,548,111
mail could not send through iphone sdk?
<p>i want to send mail through iphone sdk i know there are lots of answers here on stack overflow but it does not work ,i downloaded the mail composer app from apple site and ran in my simulator ,it displaye that mail has been sent but i dont get it on my email address</p>
iphone
[8]
4,730,701
4,730,702
Editing users in ASP.NET from a grid
<p>I want to edit users who are from a grid view. Once I select the user (clicking on a row in a grid), I want to populate the selected user details into an edit pane(form with user fields) above the grid. Is this possible in asp.net.</p>
asp.net
[9]
4,736,857
4,736,858
Set background in autocomplete view android
<p>How i can set an image as background of my autocomlete list?</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="10dp" android:t...
android
[4]
2,317,699
2,317,700
c# serialport question
<p>i have a USB phone attached to my computer</p> <p>how do i detect with the serialport which COM its on?</p>
c#
[0]
3,559,288
3,559,289
Ads in a PHP based webpage
<p>We all have come across web pages which take some time to show the content the user is waiting for and in the mean time display ads on the page. <br><br> I'm not talking about the pages that show full-page ad with 'skip this ad' button. <br><br> A typical example of what I'm referring to is: I visit a free plugin si...
php
[2]
5,029,715
5,029,716
Trying to count, but changes to 1
<p>I am trying to make a counter. What I mean by that is a button that uses a XHTMLrequest and just runs this PHP.</p> <p>My question is why is my counting code changing the value of the text document to the number <code>1</code>. If I just change the value to for example <code>24</code>, instead of adding 1 and chang...
php
[2]
340,792
340,793
Changing header button image and header text at runtime
<p>I have a header common in all activities. </p> <p>header.xml </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/header_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:ori...
android
[4]
5,005,000
5,005,001
How does this Javascript code snippet work?
<p>I have this code snippet that I need to figure out and I'm not much of a JS programmer.</p> <pre><code>load([ {x:234, ppi: ppi, center: true, y:150, width:$('.ProductThumbImage img').width(), height: $('.ProductThumbImage img').height(), distance:1, imageurl: $('.ProductThumbImage img').attr('src')} ], wall...
javascript
[3]
583,515
583,516
Ducktyping with exception objects
<p>I want to create a function that can check if the passed arg is an Exception or one of its subclasses. As an example, I would like the the second is_exception function call to return True as well.</p> <pre><code>def is_exception(obj): return type(obj) == Exception print is_exception(Exception('asdf')) =&gt; ...
python
[7]
5,525,299
5,525,300
How can I focus() to another window on javascript, when the page loads?
<p>On Google Chrome, I can only <code>focus()</code> windows if an element has been clicked.</p>
javascript
[3]
1,273,058
1,273,059
Need to inflate one custom layout into view of another custom layout
<p>I want to inflate 1 complex layout in another custom listview's one layout. How can i achieve that? Please i need help Thanks in advance.</p>
android
[4]
2,926,044
2,926,045
Python interaction between __setattr__ and self.__dict__
<p>If I make a class instance like this</p> <pre><code>class MyClass(object): pass x = MyClass() </code></pre> <p>I can then set attributes on x as follows:</p> <p><code>x.myAttr = 1</code> or <code>x.__setattr__('myAttr', 1)</code></p> <p>However, if I make a dict</p> <pre><code>d = {} </code></pre> <p>I can...
python
[7]
2,188,031
2,188,032
Connecting an NXT to PC with Bluetooth
<p>We're trying to move a NXT Robot using a Java program and bluetooth, but we don't find the way to do it, by the moment we got this and is not working:</p> <pre><code>String nombre = "NXT"; NXTConnector conexion = new NXTConnector(); conexion.connectTo(nombre, NXTComm.LCP); NXTCommand.getSingleton().setNXTComm(conex...
java
[1]
2,483,425
2,483,426
My global variable comes back as undefined (JavaScript)
<p>I'm really struggling with basic Javascript here... basically, I'm trying to make a function that, when called, sets two variables (longitude and latitude) so that I can run other functions straight afterwards that uses these values.</p> <p>When I try to alert out the longitude value however, it comes back undefine...
javascript
[3]
4,687,043
4,687,044
jquery confirm action doesn't work
<p>I'm using this class to set up a Yes/No alert.</p> <p><a href="http://myclabs.github.io/jquery.confirm/" rel="nofollow">http://myclabs.github.io/jquery.confirm/</a></p> <p>This is my code:</p> <pre><code>var currentId; $(".confirm").click(function() { currentId = $(this).attr('id'); }); $(".confirm").confir...
jquery
[5]
5,695,571
5,695,572
How to wrap a div tag inside other tags and variable using php's echo function?
<p>How to wrap a div tag inside other tags and variable using php's echo function? </p> <p>This php code works:</p> <pre><code> echo "&lt;strong&gt; $matches[1] &lt;/strong&gt;" . "&lt;p&gt; $matches[2] &lt;/p&gt;"; </code></pre> <p>But I need the above code to wrap inside a div. I tried the following code belo...
php
[2]
3,952,460
3,952,461
Setting a value inside an array
<p>If I want to add a value in an array, I can use:</p> <pre><code>$array[] = 'value'; // or... array_push($array, 'value'); </code></pre> <p>If I want to set the value associated with a key, I can use:</p> <pre><code>$array['key'] = 'value'; </code></pre> <p>Is there any function I could use instead of the <code>[...
php
[2]
342,046
342,047
Unsigned char automatically promoted to int in function call, why?
<p>Why is an <code>unsigned char</code> automatically promoted to an <code>int</code> when calling a function? In the example below there is an <code>f(int)</code> and a <code>f(char)</code> function. It seemed more logical that the compiler would coerce an <code>unsigned char</code> argument to a <code>char</code> and...
c++
[6]
1,068,729
1,068,730
setInterval() browser queue
<p>I know that the <code>setInterval</code> function is pretty much single threaded. But if we set the time to a very small value like 50 milliseconds:</p> <pre><code>setInterval(function() { // do really heavy stuff }, 50); </code></pre> <p>then the first generated event might not finish in time then I guess a sec...
javascript
[3]
3,864,588
3,864,589
Inheriting a class that has the same constructor but different/similar prototypes
<p>Suppose I have a constructor:</p> <pre><code>function Constructor(input) { this.input = input } Constructor.prototype.method = function() { console.log('a') } </code></pre> <p>But I want to make another class using a copy of the constructor, but changing the prototypes.</p> <pre><code>function Constructor2(i...
javascript
[3]
3,852,481
3,852,482
android autocompletetextview issue
<p>i have a autocompletetextview in which i have attached a listview to show the query results. My problem is that once user selects a result i append it in the autocompletetextview.All the entries are seperated by a "," what i need is if user presses space in virtual keyboard i need to replace it with ",".</p> <p>pre...
android
[4]
4,532,245
4,532,246
Class structure for a queue of variable size and type
<p>I'm more of a hardware person, but the chip design tools I'm using require me to write some C++ code. I am not familiar with object-oriented programming; although I have a good handle on C. What I'm asking is for an explanation of how to structure my class (called <code>cq</code>) to accomplish the task at hand.</p>...
c++
[6]
1,272,831
1,272,832
Why isn't my or statement working, C++?
<p>I'm trying to create a function that will replace 0's, 1's, or 2's with spaces in a string. I'm going about it by iterating through the string and comparing each individual character. </p> <p>My function will work if I compare <strong>str_in[i] == '0'</strong>, but if I add the or statement it returns nothing. </p>...
c++
[6]
4,011,998
4,011,999
How to handle multiple popup dialogs in Web Application
<p>What is the best way to handle multiple popup dialogs in ASP.Net Web Application? Trying I have approx 5+ popup dialogs to show in the main page. currently I am using the ModalPopUpExtender to display the first popup. Do I have to Create a (New Panel and ModalPopUpExtender) for every popup? All this code in the main...
asp.net
[9]
4,860,374
4,860,375
How to I get selected rows in an table?
<p>I have a table where each rows has a check box.</p> <p>This code works for another table:</p> <pre><code> jQuery('#my_table_id tr').has(':checkbox:checked').closest('tr').each(function() { request_arr[i] = jQuery(this).attr('id'); i++; }); </code></pre> <p>Now in this case, I have a table objec...
jquery
[5]
4,921,183
4,921,184
check or uncheck all checkboxes based on a condition
<p>I have this html </p> <pre><code> @foreach (var item in Model.Options) { &lt;input type="checkbox" checked="checked" name="selectedObjects" noneoption=@(item.OptionText=="None of the above" ? "true" : "false") id="@(Model.QuestionNo)_@(item.OptionNumber)_chk" value="@item.OptionNumber" onchange="checkBoxCh...
jquery
[5]
3,662,180
3,662,181
Adapter fetches and parses RSS feed to get its data - best practice?
<p>In a shared project, we have an Adapter class (extends BaseAdapter, implements ListAdapter). In its constructor, this class fetches an RSS feed from the internet and parses the returned XML document to obtain the data it will 'adapt'; the data is kept in a private class variable.</p> <p>This is seen as the "Androi...
android
[4]
3,197,917
3,197,918
STL and CLASSES
<p>I'm relatively new to C++ specifically to the concept of classes. I have to develop a code, which I can almost easily accomplish through the use of STL. To develop good programming practices I want to make good use of classes. However since I can express all my objects as instances of STL containers and perform most...
c++
[6]
66,207
66,208
Preserve newlines when using php split
<p>I'm using php's split function to break a pipe delimited record into an array</p> <pre><code>explode("|",$line) </code></pre> <p>When there is a newline within the pipe field, split puts it into a new array field</p> <pre><code>blue|is my favorite|color </code></pre> <p>works fine and gives 3 array elements</p> ...
php
[2]
1,380,790
1,380,791
How can i solve this Error?
<p>I have uploaded my website to my webhost and it works great except the form authorization. When I try to login I get this error:</p> <blockquote> <p>A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify t...
asp.net
[9]
2,140,392
2,140,393
How to link the imagePath from SQLite database with the images that are stored in the gallery (Android
<p>Hi I was wondering if I were to store the imagePath of the images in the gallery into the database, how do I know which image in the gallery is linked to the imagePath from the database?</p>
android
[4]
67,165
67,166
Getting values from a single array
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/6126512/how-to-find-the-value-from-this-array-in-php">How to find the value from this array in php?</a> </p> </blockquote> <p>hello coders.I have an array like this</p> <pre><code>Array ( [0] =&gt; Array ...
php
[2]
319,904
319,905
Get path to java JRE
<p>It it possible to get the location of the jre that is used for the current process. Need to launch an other java application as a separate process. Having different jre's available (and no path variable set) I would like ask eg. the loader for this. Running on Solaris, Linux, Windows.</p>
java
[1]
5,143,720
5,143,721
Why are nullable boolean values not comparable with the shorthand if(boolean)?
<p>Why can I compare nullable boolean values in C# like this:</p> <pre><code>bool? test = true; if (test==true) //do somethign </code></pre> <p>but not like this:</p> <pre><code>bool? test = true; if (test) //do somethign </code></pre>
c#
[0]
3,747,872
3,747,873
Is it possible to get values from a form and make a link with it?
<p>Please help me do this if its possible.</p> <p>I have a mobile community website which is powered by Wapka.mobi</p> <p>There's a function on the website where members can message each other. It's a form like this;</p> <pre><code>&lt;form method="get" action="messages_site.xhtml"&gt; &lt;input type="text" name=...
javascript
[3]
5,540,680
5,540,681
Send email from Outlook Express in C#
<p>How do I open Outlook Express in C# 2008?</p> <p>How to attach a file from my application to Outlook?</p>
c#
[0]
2,736,686
2,736,687
jQuery Removing specific text from an element
<p>I want to remove the text "By:" from an element in my website. I want the rest of the text to remain there. How can I achieve that with jQuery? Thank you.</p> <p>The HTML</p> <pre><code>&lt;div id="text"&gt;By: Anonymous From Minnesota&lt;/div&gt; </code></pre> <p>I want it to just be:</p> <pre><code>&lt;div id=...
jquery
[5]
3,650,744
3,650,745
How to convert numbers to a number list in python?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4663306/how-can-i-get-a-list-as-input-from-the-user-in-python">How can I get a list as input from the user in Python?</a> </p> </blockquote> <p>I currently have this:</p> <pre><code>c = eval(input("Enter a grou...
python
[7]
3,989,342
3,989,343
ISingleResult and IEnumerable
<p>Can anyone explain what is <strong>ISingleResult</strong> and what is the difference between <strong>ISingleResult</strong> and <strong>IEnumerable</strong>. And when should we use it?.Please Explain this code.</p> <pre><code>public ISingleResult&lt;CityMaster&gt; SelectCityMaster() { try { ...
c#
[0]
335,203
335,204
displaying photo?
<p>I was trying to do this in an alert box only to find out that I can't now. I cannot manage to get this to display at all. Instead of the variable I get <code>[object HTMLImageElement]</code>. I am missing something but what is it? </p> <pre><code>function joePic(){ var joe_fat = new Image; joe_fat.src = "p...
javascript
[3]
710,703
710,704
Visual Studio.NET like property window in ASP.NET
<p>Looking for a VS.NET like property window that can be embedded in ASP.NET page, which will allow users to change decorated proerties of a class.</p> <p>any guidance is much appreciated</p> <p>thanks</p>
asp.net
[9]
1,039,110
1,039,111
Foreach List with unknown item type
<p>I need to go through List. I do not know in advance what type of element List contains the List I get as an object.</p> <pre><code>void anyMethod(object listData, Func&lt;object, string&gt; callback) { foreach (object item in (List&lt;object&gt;)data) { string value = callback(item); doSomet...
c#
[0]
3,003,450
3,003,451
creating sqlite table
<p>This maybe a silly question but I am having trouble looking for the error. I am having a syntax error near "<code>TEXT</code>", but I don't know where. I am pretty sure that I typed this correctly.</p> <pre><code>public void onCreate(SQLiteDatabase db){ db.execSQL("CREATE TABLE " + DATABASE_TABLE + " (" + ...
android
[4]
2,095,892
2,095,893
how to destroy thread in java after the completion of task
<p>I am using thread pool for my task. After completion of each task i am destroying the thread using Thread.stop() and Thread.destroy(). But after running my application (in eclipse) for around 30 min. i am getting Memory out of bound error . So pls suggest me how to kill the thread.</p>
java
[1]
4,427,094
4,427,095
Is it possible to access data from the proximity-sensor of the iPhone surface?
<p>When you hold the iPhone to your ear, it detects that there's something (proximity-sensor) and switches off the display.</p> <p>is it possible to access this sensor in an iPhone app?</p>
iphone
[8]
5,701,625
5,701,626
jQuery fadeIn effect
<p>I am not sure why the following code is not behaving the way I would expect it to, but as I am new to jQuery I am sure that I'm missing something elementary.</p> <p>html:</p> <pre><code>&lt;div id="locale"&gt;&lt;/div&gt; &lt;form id="theForm"&gt; What would you like to do?&lt;br /&gt;&lt;br /&gt; &lt;input type=...
jquery
[5]
868,678
868,679
How to pick multiple images from the Library using iPhone SDK
<p>This is the code to pick a single image from the Library</p> <pre><code>-(void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info { UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"]; NSMutableDictionary *data = [[[NSMutab...
iphone
[8]
3,656,103
3,656,104
Something wrong with enum
<p>I've something like: </p> <pre><code>enum Direction{Forward,Backward}; template&lt;Direction dir = Forward&gt; class X { private: Direction my_direction_; public: void set_direction(Direction dir)//here I'm getting an error { my_direction_ = dir; } }; </code></pre> <p><em>error: declar...
c++
[6]
1,443,588
1,443,589
How to check current running applications in Android?
<p>I want to check current running applications in android programmatically, similar to how it shows 6 applications if we press and hold the <strong>HOME</strong> button.</p> <p>I'm mostly interested in the application names.</p>
android
[4]
1,067,678
1,067,679
How to set my android app as a Lock Screen?
<p>I want to develop my custom Android Lock Screen. So that if I install that app in any phone, it replace the default lock screen. Any guidance?</p>
android
[4]
4,803,878
4,803,879
Dealing with multiple calendars in outlook
<p>I want to extract all items in all my calendars in outlook. I've got it working with my default calendar, but for some unknown reason I can't get other calendars items. Here is what I have done so far:</p> <pre><code> Microsoft.Office.Interop.Outlook.Application oApp = null; Microsoft...
c#
[0]
3,468,395
3,468,396
imgId.style.webkitTransform = tString; not working
<p>The below javascript is called on gesturechange event of an image.In this code everything works fine except the line imgId.style.webkitTransform = tString; transform is not happening after getting the scaling value.</p> <p>function getAngleAndScale(e) {</p> <pre><code>var imgId = e.target.id; alert(imgId); var sc...
javascript
[3]
773,131
773,132
Is JavaScript interpreted by design?
<p>I am cautious of asking this question because it might appear overly fastidious. I just opened up JavaScript: The Definitive Guide, and it states of the first page of chapter 1</p> <blockquote> <p>"JavaScript is a high-level, dynamic, untyped interpreted programming language”</p> </blockquote> <p>So am I to ta...
javascript
[3]
3,440,582
3,440,583
Focus and Highlight An Input Control
<p>When the page loads, I want to focus and highlight (border color or background color change) an input control. How can I do it? This is what I got so far.</p> <pre><code>&lt;script type="text/javascript"&gt; $(function () { $("#txt1").focus(); }); &lt;/script&gt; </code></pre>
jquery
[5]
1,791,313
1,791,314
problem to draw and fill rect after cgcontextclip
<p>I want to clip a rectangle from cgpath with the following code. I don't get any output. What's wrong?</p> <pre><code> CGContextRef context = UIGraphicsGetCurrentContext(); CGMutablePathRef thePath = CGPathCreateMutable(); CGPathMoveToPoint(thePath,NULL,(self.x1),(self.y1)); CGPathAddLineToPoint(thePa...
iphone
[8]
2,675,535
2,675,536
How to convert '[' to '[' use python
<p>I use this :</p> <pre><code> title=title.replace(u'【',u'[').replace(u'】',u'[') </code></pre> <p>But Error:</p> <pre><code>UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in range(128) </code></pre>
python
[7]
2,220,246
2,220,247
Java Final - an enduring mystery
<pre><code>suggestBox.addKeyUpHandler( new KeyUpHandler() { public void onKeyUp(KeyUpEvent event) { if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) { String boxText = suggestBox.getText(); if (!boxText.equals("")) { suggestPanel.add(checkBoxFactory(boxText, candidateNames)); sugge...
java
[1]
3,636,884
3,636,885
get value of <h2> of html page with PHP DOM?
<p>I have a var of a HTTP (craigslist) link <code>$link</code>, and put the contents into <code>$linkhtml</code>. In this var is the HTML code for a craigslist page, <code>$link</code>.</p> <p>I need to extract the text between <code>&lt;h2&gt;</code> and <code>&lt;/h2&gt;</code>. I could use a regexp, but how do I ...
php
[2]
1,553,524
1,553,525
error when linking button to class/page
<p>Hello why wont this work? My plan is to have 2 navigate buttons that link to eternal page/classes in my application? Why does not this work and is this a good way of doing that? I think of make a if and else statement but i dont now is it is better for this action. the problem is that it become a error on } tags at...
android
[4]
4,039,985
4,039,986
How to add new row below previous one in tableview
<p>I want to add a new row below previous ones. I mean I have a UI containing 2 text boxes and 1 submit button. When I fill the text box and press submit, the content of text box is added below the previous one. Is this done with listview or tableview? Please give suggestions to me and how to implement that technique. ...
android
[4]
1,961,559
1,961,560
How to get the difference of two numbers from the input box without page submittal using Codeigniter?
<p>I have three input boxes, of which two are for entering values (any number) and one is for getting results (the difference of the two). How can I get the result without using page submission using Codeigniter?</p>
javascript
[3]
3,564,084
3,564,085
How to set the properties of a file to 0777?
<p>How can I set the properties of a file to 0777 which i created through php create file?</p> <pre><code>$myFile = "test.txt"; $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = 'test'; fwrite($fh, $stringData); fclose($fh); </code></pre>
php
[2]
3,496,327
3,496,328
day and time in Java
<p>How I get current time and day in Java? I'd like to name files based on day an time. For example: Day : march 25th, 1993 Hour : 12.20 pm</p> <p>The file name should be: 250319931220</p> <p>Is something I beginner can achieve?</p> <p>Thank you</p>
java
[1]
845,805
845,806
jQuery: Hover-Over Slide Panel
<p>I am looking for a way to do a slide out panel when you hover over specific images on my website similar to what Google Search does.</p> <p>I'd also need this panel to display another website page. Which I am sure can be done using <code>iframe</code> or PHP's cURL.</p> <p>Here is an example similar to what I am l...
jquery
[5]
4,431,453
4,431,454
Immutability in Java
<p>If my class is going to be an immutable one it has to be <code>final</code> and without any method that modifies its state and all properties must be private. But why should it have properties declared as <code>final</code> (for example, <code>private final int a</code>)?</p> <p><strong>Edit</strong></p> <p>Will t...
java
[1]