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 |
|---|---|---|---|---|---|
71,348 | 71,349 | Can i listen android system settings change? | <p>I am writing app, that collects location data, based on GPS. And i have next problem:
when i try to get GPS data and GPS is turned off, i show notification that ask for turning on GPS, and it starts(on click of course) intent with "ACTION_LOCATION_SOURCE_SETTINGS". Question: how can i know that user turned it on? is... | android | [4] |
4,369,011 | 4,369,012 | Combining frame and tween animations | <p>I'm new to the android development, and working my way through android tutorials available on Android website more specifically relating to animation. Now I know how to apply tween and frame by frame animations, but I can't figure out how to combine these two animations to run simultaneously example of which could b... | android | [4] |
1,047,327 | 1,047,328 | what is the difference between iphone device UDID , iphone device ID and iphone device Token? | <p>what is the difference between iphone device UDID , iphone device ID and iphone device Token ??</p>
<p>Normally iphone device token is used when we are using apple push notification service.</p>
<p>But my goal is to just identify unique iphone device ? So which of the above 3 is unique for iphone device ??</p>
| iphone | [8] |
5,460,481 | 5,460,482 | How to set or export display variable through java code? | <p>We are required to add <code>export DISPLAY=:0.0</code> in tomcat's startup file and batch server's startup file. This is to make java see the X11 Display libraries on Unix and run our applet. Without this export in the startup files, the applet throws a Headless Exception.</p>
<p>Though this explicit export makes ... | java | [1] |
458,123 | 458,124 | BaseAdapter or ArrayAdaptor - Android | <p>I am going to make a grid of images and I am trying to figure out whether to use an array adaptor or a baseadaptor. While the <a href="http://developer.android.com/resources/tutorials/views/hello-gridview.html">GridView example</a>, stores the data in an array, it uses a BaseAdapter rather than a ArrayAdaptor. I am ... | android | [4] |
212,105 | 212,106 | Fastest way to do a contains with string[] | <p>I am getting back a "string[]" from a 3rd party library. I want to do a contains on it. what is the most efficient way of doing this?</p>
| c# | [0] |
1,589,548 | 1,589,549 | How to connect multiple custom login controls to single database different tables(sql)? | <p>There are 4 custom login controls on my web page. I need to connect them to different tables in a database. I have managed to connect one of the login controls to a table (below is the code for that). But now I'm not sure on how to connect the remaining controls to the database. If any one has any suggestions, I wil... | asp.net | [9] |
1,166,947 | 1,166,948 | Cohesion Metrics | <p>Can someone give me the java code for LCOM(lack of cohesion) or any other cohesion metrics which takes a class as input and gives a numerical value for cohesion.</p>
| java | [1] |
3,949,747 | 3,949,748 | How to open web application if it is hosted in non-ascii computername | <p>My computername is in non-ascii character like ÄÖßÜÄÖßÜ. I am opening the web application using the url <a href="http://localhost/test/login.aspx" rel="nofollow">http://localhost/test/login.aspx</a>.
It opens with that url. But when i try to open with the url like http://ÄÖßÜÄÖßÜ/processmanager/login.aspx, it is not... | asp.net | [9] |
2,570,860 | 2,570,861 | python regular expression | <p>I am newbie to python. I have an array of words and each word has to be checked to see whether it contains any special characters or digits. If it contains so then i have to skip that word. How should i do this?</p>
| python | [7] |
902,513 | 902,514 | How make a java program wait until a batch file that is executed with a java process is terminated | <p>i am executing a sequence of batch files, i just need my java program to wait for the first batch file to exit and then execute the next. what happens is every thing got executed without the exit of the file that has been executed before it.</p>
<p>This is my code, i am running it in a loop</p>
<pre><code>String c... | java | [1] |
2,028,909 | 2,028,910 | How to get value of currently hovered anchor in jquery | <p>What I am trying to do here is to get the value of the current link that is hovered over by the mouse:</p>
<pre><code> <script type='text/javascript' src='jq.js'></script>
<script type='text/javascript'>
$(function(){
$('a').hover(function(){
var imgName= $('a[href^=num]').v... | jquery | [5] |
5,299,392 | 5,299,393 | jQuery Selector with :not Doesn't Work in IE7 | <p>Can someone tell me why this doesn't work in IE7 please and how to to best refactor it to work in IE7 as well as the other major browser such as Chrome, Firefox and Safari?</p>
<pre><code> var validTabSet = $('[tabindex]:not([tabindex=-1]):not([type=hidden]):not([disabled=true])');
</code></pre>
<p>Thanks</p>
... | jquery | [5] |
5,104,207 | 5,104,208 | Activity for each row in database table | <p>For an application which I am currently building in Java for Android I am looking for the following. I have a set with lets say 10 database records. For each row i want to show an activity (which is every time the same activity). The activity has some fields for each row to be updated.</p>
<p>Lets say for example y... | android | [4] |
4,477,582 | 4,477,583 | change two buttons into one (toggle) | <p>I have this code, which swich 2 different external .css after click on one of two buttons and it works fine, but I need to change it and make only one button with toggling between these two .css files. Thank you</p>
<pre><code><script type="text/javascript">
function changeCSS(cssFile, cssLinkIndex) {
... | javascript | [3] |
3,940,980 | 3,940,981 | javascript classes - is "this.varname" required for each use? | <p>I have a javascript class like this:</p>
<pre><code>function Foo() {
this.x = 5;
this.y = x + 10;
}
</code></pre>
<p>Does 'x' not get scoped to the instance of the class when I don't use '.this'? If so, how do we use callbacks then? I have something like:</p>
<pre><code>function Foo() {
this.x = 5;
this.... | javascript | [3] |
5,357,624 | 5,357,625 | Android manifest configuration? | <p>What do I need to put in my android manifest file to:</p>
<ol>
<li>support all screen sizes.</li>
<li>Hide the icons in the android bottom nav bar on 3.0, i know you cannot remove the bar, but you can hide the icons.</li>
</ol>
| android | [4] |
5,242,369 | 5,242,370 | How do I write a simple string to a file on the iphone? | <p>Simple question:</p>
<p>I have a large string that I want to write to a file in the docs folder for an app. How do I do a simple file creation/write? </p>
| iphone | [8] |
635,153 | 635,154 | what does this php expression regarding session variables mean? | <p>What does isset($_SESSION) mean? I found the following code snippet-</p>
<pre><code>if (!isset($_SESSION)) {
// php code
}
</code></pre>
<p>EDIT:</p>
<p>I found the following snippet in define.php of the facebook style chatting script
<a href="http://evnix.com/drupal2/" rel="nofollow">freichat</a> :</p>
<pre>... | php | [2] |
3,966,342 | 3,966,343 | Securing Android Phone from stealing | <p>We are creating an enterprise android app that would be installed on several mobiles and distributed to agents who work for our clients. The mobiles are exclusively used for carrying out activities via our application.</p>
<p>Now we need a way to secure the mobile from these agents either "losing" it or getting abs... | android | [4] |
1,771,173 | 1,771,174 | Fading table cells with jQuery | <p>I found this code, it supposed to find the first cell in the visible row and when I click it the cell is supposed to fadeout or fadein.</p>
<p>I want to adjust the code so that an input button will make this, How can I do this?</p>
<pre><code>$('tr:visible').find('td:first').click(function () {
$(this)... | jquery | [5] |
446,167 | 446,168 | asp.net web.config to handle 2 SQL con string (dev/prod) | <p>whats a good way to be able to keep 2 connection strings to SQL server in the web .comfig and have the app pick the correct one when its in the prod and dev servers?</p>
<p>i think i saw once some cool ways to keep variables like app settings holding two sets of values just like i am trying to do with my connection... | asp.net | [9] |
5,160,330 | 5,160,331 | Explicit casting to uint when there is no such operator | <p>I have written a simple wrapper around a <code>ulong</code> with a private data member. I want to be able to cast the wrapper to <code>ulong</code> to retrieve the data. I want it to be illegal to cast to <code>uint</code> and lose data, so I did not write an explicit cast to <code>uint</code>. You can imagine my su... | c# | [0] |
4,248,587 | 4,248,588 | How to escape a string to be passed into DecimalFormat | <p>May I know how I can escape a string to be passed into decimal format?</p>
<pre><code>// currencySymbolPrefix can be any string.
NumberFormat numberFormat = new DecimalFormat(currencySymbolPrefix + "#,##0.00");
</code></pre>
<p>How can I escape <code>currencySymbolPrefix</code>, so that it may contains any charact... | java | [1] |
4,431,451 | 4,431,452 | Add close option to Jquery Color Picker | <p>Im using the color picker here: <a href="http://blog.meta100.com/post/600571131/mcolorpicker" rel="nofollow">http://blog.meta100.com/post/600571131/mcolorpicker</a></p>
<p>Im using code shown in example 3. </p>
<p>What I want to do is allow the user to close the colorPicker DIV if they choose not to pick a colour... | jquery | [5] |
2,993,231 | 2,993,232 | Class template function signature syntax | <p>I have a class defined like this:</p>
<pre><code>template< class TBoundingBox >
class BoundingBoxPlaneCalculator
{
typedef PlaneSpatialObject< TBoundingBox::PointDimension > PlaneSpatialObjectType;
typedef typename PlaneSpatialObjectType::Pointer PlaneSpatialObjectPointer;
std::vector<Plan... | c++ | [6] |
4,251,516 | 4,251,517 | Efficient data structure for Zobrist keys | <p>Zobrist keys are 64bit hashed values used in board games to univocally represent different positions found during a tree search. They are usually stored in arrays having a size of 1000K entries or more (each entry is about 10 bytes long). The table is usually accessed by <code>hashKey % size</code> as index. What ki... | c++ | [6] |
3,738,299 | 3,738,300 | What's wrong with my javascript? | <p>I have this code: <a href="http://jsfiddle.net/ZYZLT/2/" rel="nofollow">http://jsfiddle.net/ZYZLT/2/</a></p>
<p>but when I put it live online <a href="http://bellated.us.lt/supersized/index.html" rel="nofollow">http://bellated.us.lt/supersized/index.html</a> it doesnt work. What I am missing here?</p>
<p>My code:<... | javascript | [3] |
5,061,985 | 5,061,986 | java: is using a final static int = 1 better than just a normal 1? | <p>I just saw a class (an big API module), where there is alot of stuff like</p>
<pre><code>readParamString(Object params, int index)
</code></pre>
<p>and they have in that class 10 fields</p>
<pre><code>final static int PARAM1 = 1
...
final static int PARAM10 = 10
</code></pre>
<p>which are being used with readPar... | java | [1] |
251,196 | 251,197 | Adding some numbers using PHP | <p>Here is a situation:</p>
<pre><code>race 1 = 7
race 2 = 3
race 3 = 1
race 4 = 2
race 5 = 6
race 6 = 2
race 7 = 7
race 8 = 3
</code></pre>
<p>The smaller the number the better since these are race positions. race number 1 MUST be added, regardless of it's magnitude and must be added to any 5 others that are selecte... | php | [2] |
2,534,974 | 2,534,975 | read text from website | <p>i work with the emulator and try to get a text from a website.The error of the alertdialog: "the application mainactivity has
stopped unexpectedly. Please try again".</p>
<pre><code> public void testr(View view) throws IOException, URISyntaxException
{
URL websiteurl = new URL("http://test...");
Buf... | android | [4] |
5,948,938 | 5,948,939 | javascript does not load with the jquery post method? | <p>Greeting to all !!!!!</p>
<p>am new to jquery and using it well... it sounds good...</p>
<p>the problem is when i using ajax post method and append to the original page, the javascript i loaded in the original page is not working the response(appended page some abc.php)...</p>
<p>how to use those ? please help me... | jquery | [5] |
5,446,415 | 5,446,416 | How can I save a photo of part of the screen to the local iPhone's Photos? | <p>I have put a UILabel that the user has chosen over a UIImageView that was also chosen by the user. I would like to put these two into a picture, kind of like a screenshot of a small part of the screen. I have absolutely no idea how to do this and have no experience in this. Any help is appreciated!!</p>
| iphone | [8] |
133,753 | 133,754 | Reading standard output from process, always empty | <p>Running this code:</p>
<pre><code>Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.FileName = "tool.exe";
p.Start();
p.WaitForExit();
</code></pre>
<p>Makes tool.exe run, and output some content on standard output. However, if I try to capture the content using:</p>
<pre><code>Process p... | c# | [0] |
3,846,282 | 3,846,283 | Including into a variable | <p>You know how <code>print_r</code> accepts an optional 2nd parameter that if set to <code>true</code> will return the result instead of printing it?</p>
<p>I wish <code>include</code> accepted a 2nd parameter that would work the same way.</p>
<p>It doesn't so what are the available alternatives? How can I include a... | php | [2] |
4,981,712 | 4,981,713 | change uitableviewcell highlight does not work | <p>I used the codes below to change the highlight color of uitabelviewcell</p>
<pre><code>#import <UIKit/UIKit.h>
@interface KUITableViewCell : UITableViewCell
-(void)setSelected:(BOOL)selected animated:(BOOL)animated;
-(void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated;
@end
#import "KUITableVie... | iphone | [8] |
1,811,811 | 1,811,812 | How to implement code like SomeObject.SomeFunction().SomeOtherFunction(); | <p>Today, I searched a line of code which was written like:</p>
<pre><code>SomeObject.SomeFunction().SomeOtherFunction();
</code></pre>
<p>I am unable to understand this. I tried to search it on Google about this but no luck. </p>
<p>Please help me to understand this.</p>
| c# | [0] |
2,441,304 | 2,441,305 | Supporting iOS versions prior to 4.0/3.2 and problems with NSClassFromString | <p>I'm currently developing iPhone applications that -- for the time being -- need to be supported on versions prior to 4.x.</p>
<p>When I want to use something 4.x or 3.2 specific, I would use the usual approach of checking if a given class exists, i.e.:</p>
<pre><code>if(NSClassFromString(@"SomeClass")) {
// do s... | iphone | [8] |
5,586,811 | 5,586,812 | How to apply date now format in Create SubDirectory | <p>I want Date format as Folder Name(27-07-2010).. how to Name it? I want to make it as my sub directory</p>
| c# | [0] |
2,500,536 | 2,500,537 | Android cannot find symbol | <p>I am working on porting in android, from Gingerbread to ICS, I am building my changes but getting lot of compilation errors saying that package com.something.something does not exist or cannot find some variable , although those missing files already exist in my repo. But the thing is these files have the same pack... | android | [4] |
4,181,479 | 4,181,480 | Background process in android | <p>I would like read the file and upload to server in the background which is not require any interaction with the user.which concept is suitable for this?
1.IntentService
2.Async Task
3.Service</p>
<p>please suggest me.
Thanks</p>
| android | [4] |
3,489,323 | 3,489,324 | What is ParcelFileDescriptor in android | <p>I read this <a href="http://developer.android.com/reference/android/os/ParcelFileDescriptor.html" rel="nofollow">http://developer.android.com/reference/android/os/ParcelFileDescriptor.html</a></p>
<p>but I got know idea from it. What it is? and What can it do?</p>
<p>Can anyone explain me.</p>
| android | [4] |
5,420,233 | 5,420,234 | Python executable not finding libpython shared library | <p>I am installing Python 2.7 on CentOS 5. I built and installed Python as follows</p>
<pre><code>./configure --enable-shared --prefix=/usr/local
make
make install
</code></pre>
<p>When I try to run /usr/local/bin/python, I get this error message</p>
<pre><code>/usr/local/bin/python: error while loading shared libra... | python | [7] |
4,252,497 | 4,252,498 | Custom HorizontalScrollView | <p>As the title says, I would like to create a custom HorizontalScrollView. My HSV will not have a scrollbar, but will have arrows on the sides. So, if there is something to be scrolled in the right side, the right arrow will be displayed. Otherwise it will be invisible.
My problem is that I need a listener for the HS... | android | [4] |
4,121,497 | 4,121,498 | Taking android screen shot of whole screen | <p>My application has a list view in relative layout. Now I need to take a screen shot of the entire layout including all the content available in the list view and also other contents like button and text view showing in the layout. But my code takes only the visible part of the screen. Here the view is parent layout... | android | [4] |
2,596,989 | 2,596,990 | Global variable in android | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1944656/android-global-variable">Android global variable</a> </p>
</blockquote>
<p>I am working with an Android project. I have two activities. I am designing a file uploader.
The first activity is to choose a ... | android | [4] |
1,221,245 | 1,221,246 | C# Byte convertions | <p>I get very confused when it comes up to byte conversation.</p>
<p>I need to do two convertions:</p>
<p>1.We have a byte[] array { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35 };</p>
<p>How do I convert it to string so I get "30 31 32 33 34 35".</p>
<p>2.We have the same byte[] array</p>
<p>Now I need to convert it to ASC... | c# | [0] |
721,673 | 721,674 | Java Help: Using Classes | <p>Now I have read and on this but i am just stuck. Any help appreciated. I am looking for hints. The code compiles and runs fine but I don't think the variables are being stored in the employee class and I am not sure I am understanding my use of the constructor right.</p>
<p>Requirements:
I have completed:</p>
<blo... | java | [1] |
2,479,979 | 2,479,980 | Wait for callback to complete with dialog | <p>I am very new to Android development, so please bare with me.
I have a GPS class which returns the current GPS coordinates to the calling activity via a callback.</p>
<p>The user either takes a picture or chooses one from the library and then returns to the main activity. After he returns to the main activity, I po... | android | [4] |
5,971,438 | 5,971,439 | android help activity page | <p>I want to build a help page for my app so obviously it is gona be texty. Other than putting those texts inside my string.xml or in my layout xml, is there any other ways for me to do it? how do I include paragraphs in them? any help would be very much appreciated!</p>
| android | [4] |
891,042 | 891,043 | best way to match these string or list? | <pre><code>main = ['123', '147', '159', '258', '369', '357', '456', '789']
match1 = 1374
match2 = 1892
</code></pre>
<p>here <code>match1</code> has 1, 4 and 7 But main has '147' so it matches. <code>match2</code> has 1,8,9,2 so it doesn't matches to <code>main</code>. What is the optimize solution?</p>
| python | [7] |
576,676 | 576,677 | right click jquery plugin | <p><a href="http://abeautifulsite.net/2008/09/jquery-context-menu-plugin/" rel="nofollow">http://abeautifulsite.net/2008/09/jquery-context-menu-plugin/</a></p>
<p>its a great plugin but i dont know how to edit it so that it will work in my case</p>
<p>i load all the js files from an iframe (it has to be this way, for... | jquery | [5] |
778,257 | 778,258 | Jquery - Get the ID of an element using find() | <p>how can i get the id of an element by using the find method?</p>
<p><strong>HTML</strong></p>
<pre><code><div id="d1" class="line1">blib blab blub </div>
</code></pre>
<p><strong>JS</strong></p>
<pre><code>$(function() {
// hit_id = $(".line1").find("blab").attr('id');
hit_id = $(".li... | jquery | [5] |
1,654,982 | 1,654,983 | How can I read a text file with 200 lines of text, and identify identical string values? | <p>I have a text file that contains 200 lines of text. How can I compare each line of text and identify the same values with PHP. Is that even possible?
Can I convert the lines to XML format?
Can I convert the text file to HTML and append the duplicate values to an un-ordered list?</p>
| php | [2] |
2,933,266 | 2,933,267 | elegant way to disorder a list | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/473973/shuffle-an-array-with-python">Shuffle an array with python</a> </p>
</blockquote>
<p>let's say I have a list <code>myList=[1,2,3,4,5]</code>,and I want to disorder it randomly:</p>
<pre><code>disorder(my... | python | [7] |
2,277,455 | 2,277,456 | Get the most recently updated file in PHP | <p>I need to get the latest updated file from number of files presen under that directory starting with name file_(random number).css?
there are number of file present like this:</p>
<pre><code>file_12.css
file_34.css
file_14.css
</code></pre>
<p>I want to get the most recently updated file. is there any readymade fu... | php | [2] |
479,815 | 479,816 | How to know how many objects will be created with the following code? | <p>I am bit confused in case of objects when it comes to Strings, So wanted to know how many objects will be created with following code, with some explanation about String objects creation with respect to String pool and heap. </p>
<pre><code> public static void main(String[] args) {
String str1 = "String1";
... | java | [1] |
3,631,196 | 3,631,197 | How can I add an image to the title bar in android 3.0? | <p>I am learning android 3.0.
Can any one tell How can add Image in Title bar in android 3.0?
In developer site they are telling by default it will come.but for me it is not coming.
Thanks in advance.</p>
| android | [4] |
5,534,970 | 5,534,971 | Python UnboundLocalError "Need help" | <pre><code>def rotate_word(word,number)
for i in word:
word_num = ord(i)
new_word += chr(word_num + number)
return new_word
</code></pre>
<p>Hi guys, the code above is not working. This is a python function. When i run the program i will return an error: "UnboundLocalError: 'new_word' referenced be... | python | [7] |
309,815 | 309,816 | Android - how to make a button display on a condition? | <p>I have a button that basically looks like this:</p>
<pre><code> <Button
android:id="@+id/admin_new_questions"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="See Asked Questions"
/>
</code></pre>
<p>and I try to display it only in some cas... | android | [4] |
3,143,579 | 3,143,580 | Setting ContentType = "image/tiff" and sending an image is not working in IE | <p>I need to send an image (as a downloadable file) from an ASP web page. It is working correctly in every browser except for IE (all versions).</p>
<p>Here is the server side code:</p>
<pre><code>bool export = Request.QueryString["Export"] != null;
if (export)
{
byte[] allBytes = File.ReadAllBytes(@"C:\MyImage.... | asp.net | [9] |
3,875,530 | 3,875,531 | how to display alert by using serverside code in asp.net? | <p>I want to execute following code on button click but the follwing code executes when I refresh the page as well. I don't want that behaviour. Please help me.</p>
<pre><code>string str = "Are you sure, you want to Approve this Record?";
this.ClientScript.RegisterStartupScript(typeof(Page), "Popup", "ConfirmApproval(... | asp.net | [9] |
4,031,460 | 4,031,461 | I cannot install android application after signing | <p>I have signed them using the export wizared but when i transfer them onto my phone they just wont install "application not installed" my log cat reads "no content provider found for: null" the really fustrating thing is i exported two or three last month just to test it and they still install no problem. Am i missin... | android | [4] |
4,412,157 | 4,412,158 | What does it mean to assign a constructor to something? | <p>Sometimes I see something like this which I quite don't understand:</p>
<pre><code>// ...
that.constructor = ...
//...
</code></pre>
<p>I though the constructor property was not supposed to be something to assign something to, but a property that returned that which the object was an instance of. I thought that ... | javascript | [3] |
3,414,115 | 3,414,116 | How to get the double value of a big number using BigDecimal in java? | <p>I have a database column with Decimal(19,5) size, I want a BigDecimal in java to store the value but if I write</p>
<pre><code> BigDecimal(999999999999999.9999);
</code></pre>
<p>the value is rounded to 1+E15 which I don't want it to be,So how can I get the complete precision of the number.</p>
<p>One way I know ... | java | [1] |
5,168,630 | 5,168,631 | Turning a Alt+D keyboard function in to a Button event | <p>Bear with me please I'm a little new to this!! I've been asked to add a button to a telephone directory I have made, the button needs to be able to dial an extension number which is the list. At the moment the user has to highlight the four digit code the press Alt + D on the keyboard the software will dial the numb... | c# | [0] |
1,754,081 | 1,754,082 | How should I write a FindClosestMatching function? | <p>Of all objects matching a condition, find the one closest to a position. Supposedly a very common problem. The current code looks like this:</p>
<pre><code>protected Foo FindClosestFooMatching (Vec pos, Func<Foo, bool> matches)
{
float bestDist = float.MaxValue;
Foo bestFoo = null;
foreach (Foo foo in All... | c# | [0] |
2,659,552 | 2,659,553 | How to get screen width and height in motorola milestone, android | <p>I have used the followng ways to get screen width and height. When I run my application in motorola I got width= 320pixel and height = 533 pixel. But size of motorla milestone is 480 x 854 pixels. How to get height as 854 and width as 480
see <a href="http://www.gsmarena.com/motorola_milestone-3001.php" rel="nofollo... | android | [4] |
4,397,414 | 4,397,415 | Determine element left of cursor in JavaScript | <p>Is it possible determine the character on the left of the cursor's current position?</p>
<p>Basically if the cursor is at, <code>x-45</code> I'd like to determine if it's prefixed by a <code>{</code> character.</p>
| javascript | [3] |
114,041 | 114,042 | What does the function then() mean in JavaScript | <p>I've been seeing code that looks like:</p>
<pre><code>myObj.doSome("task").then(function(env) {
// logic
});
</code></pre>
<p>Where does then() come from?</p>
| javascript | [3] |
116,002 | 116,003 | random use in app | <p>how can an array be created that randomizes results from 3 different values 0,1,2 and then makes 2 combinations of those </p>
<p>for example :
i have </p>
<pre><code>int values[3] = {0,1,2}
blah = values[arc4random() %3];
</code></pre>
<p>i tried using this from the arc4random help post on this site however when ... | iphone | [8] |
3,573,221 | 3,573,222 | 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] |
188,250 | 188,251 | Floating Point Numbers | <p>This seems like a real simple question but I just to want clear my doubt. I am looking at code which some other developer wrote. There are some calculations involving floating-point numbers.</p>
<p>Example: <code>Float fNotAvlbl = new Float(-99);</code> Why is he creating a new object? What would happen if we do <c... | java | [1] |
5,461,965 | 5,461,966 | How has the C++ language changed over the years? | <p>How can I find a list of major changes that have been made to the language from since C++03 to C++0X? </p>
| c++ | [6] |
4,880,306 | 4,880,307 | how to drag an image by touching in android? | <p>how to drag an image by touching in android?
Please Help me with a sample code.</p>
| android | [4] |
885,415 | 885,416 | PHP MYSQL import excell serialized data | <p>I have a column with serialized data in mysql table.</p>
<p>How to import excell file where I have column like colors where are stored serilized data for checboxes in mysql</p>
<p>and need to import from excel file column </p>
<p>colors colors colors
white yellow blue -> serialized into 1 column in mysql</p... | php | [2] |
3,542,544 | 3,542,545 | .prop() versus .data() | <p>With the new release of <a href="http://api.jquery.com/category/version/1.6/" rel="nofollow">jQuery v1.6</a> and the addition of the <code>.prop()</code> method.</p>
<p>Is there an inherent difference in using <code>.prop()</code> over <code>.data()</code> ? </p>
<p>I see in the documentation that not removing a ... | jquery | [5] |
1,338,871 | 1,338,872 | Noob question about a statement in a Java program | <p>I am beginner to java and was trying out this code puzzle from the book head first java which I solved as follows and got the output correct :D</p>
<pre><code>class DrumKit
{
boolean topHat=true;
boolean snare=true;
void playSnare()
{
System.out.println("bang ... | java | [1] |
5,260,674 | 5,260,675 | Made a website in ASP.NET 4.0, my web host is on ASP.NET 2.0 | <p>I developed a website using Microsoft Visual Web Developer 2010. I'm not a serious programmer, but I can get by if the software is user-friendly enough. Anyway, I have come to learn that the website I developed was on <strong>ASP.NET 4.0</strong> -- I think it might be 4.0.30319, as I look in my computer-->c:/-->w... | asp.net | [9] |
12,469 | 12,470 | C# managed dll call or unmanaged dll call? | <p>I was asking to do two <code>dll</code> calls from our application. These two <code>dlls</code> are from other group and other company. Have read a little about managed and unmanaged. I would prefer to do managed call. But whether use managed or unmanaged is the decision of the caller only or it also depends on the ... | c# | [0] |
4,070,643 | 4,070,644 | How to split a string into individual tokens without a delimiter | <p>For my current assignment I am supposed to take in a series of digits (without any spaces) as a string input. I then have to separate the string into individual tokens. The problem I'm running into is I'm having a hard time finding a method to use to split the string into individual tokens without using some kind of... | c++ | [6] |
1,758,942 | 1,758,943 | Get Week Numbers between two dates in php | <p>I want to get the week numbers for given two dates i.e from 2012-01-01 to 2012-12-31.The week numbers should fall exactly in the range as specified above.Can u please give suggestions for doing this.</p>
| php | [2] |
2,388,036 | 2,388,037 | Accesing Non Inherited members, via base class | <p>I have an Abstract class called <code>Function</code> which has 2 inheriting classes (actually 6, but for example 2).</p>
<p>The first inheriting class will be called <code>Push</code>, the other <code>Lift</code>.</p>
<p>The base class will have simple methods and members like <code>Execute(int Distance)</code>, ... | c# | [0] |
3,846,292 | 3,846,293 | Make picture intent failed on Samsung Galaxy I9000 | <p>I use the following codes to launch the camera from my app:</p>
<pre><code>private void saveFullImage() {
String storageState = Environment.getExternalStorageState();
if (storageState.equals(Environment.MEDIA_MOUNTED)) {
String path = Environment.getExternalStorageDirectory().getName()
... | android | [4] |
1,184,033 | 1,184,034 | Android - shadow on text? | <p>I am wondering how to add shadow on text in android?</p>
<p>I have the following code which is applied on a bitmap and I wanted to be shadowed...</p>
<pre><code>paint.setColor(Color.BLACK);
paint.setTextSize(55);
paint.setFakeBoldText(false);
paint.setShadowLayer(1, 0, 0, Color.BLACK); //This only shadows my whole... | android | [4] |
2,964,980 | 2,964,981 | How to get Array from user | <p>This program is working but I want take A[] array input from the user. Please somebody tell me how to take input from the user and use that input as an array in the program.</p>
<pre><code> public class rough1{
public static int arrMajority1(int A[]){
int n = A.length;
for(int i=0;i<A.length;i++){
int c = 1... | java | [1] |
3,841,692 | 3,841,693 | asp.net-Online printing of the form | <p>I am developing an online application in which I need to take a printout of the data entered in the form,but on that printed page,at right corner I am getting my page url (e.g. <a href="http://www.growmoney.com/print.aspx" rel="nofollow">http://www.growmoney.com/print.aspx</a>) printed.
I don't want it to be printed... | asp.net | [9] |
377,790 | 377,791 | listview for a single row? | <p>I've got an application which displays a field that can have multiple entries but I only wish to show the first entry and then give the user the option to expand that to display all items. I was thinking of making this a listview but once it's expanded I want it to retain the expansion. </p>
<p>the text field in qu... | android | [4] |
5,888,452 | 5,888,453 | Calculate Time Difference in Android | <p>I am new in Android.I can't find any way to calculate the time difference.So please help me. I designed a simple application. In this program I took 3 EditTexts and in these EditText I want to input the login time and logout time then store these values in the Database, And in the 3rd EditText I want to display the ... | android | [4] |
1,422,557 | 1,422,558 | C# Event subscription to method | <p>I am attempting to subscribe two events to an object. But the object is not instantiated before I try to add the events. Is there a way I can subscribe these two events and instantiate afterwards? I already have the delegates, event, event args and event handler working.</p>
<p><strong>Sample Code:</strong></p>
<p... | c# | [0] |
4,991,193 | 4,991,194 | Adding text to an image file | <p>I need to add text to an image file. I need to read one image file (jpg,png,gif) and I need add one line text to it.</p>
| c# | [0] |
1,173,260 | 1,173,261 | Export video iPhone SDK | <p>I want to change the FPS of a movie made with a iPhone to a higher FPS an export it.
How can i do this?</p>
<p>I found this code, but how can i use it in changing a video made by the iPhone?</p>
<pre><code>self.playerItem = [[AVPlayerItem alloc] initWithAsset:anAsset];
AVMutableVideoComposition *composition = [A... | iphone | [8] |
2,315,820 | 2,315,821 | RelativeLayout transparency with ListView below | <p>I have a relative layout with a transparent background. And a LinearLayout with a ListView below. The problem is, that I don't see my ListView below the transaprent RelativeLayout. Here's my xml:</p>
<pre><code> <RelativeLayout
android:id="@+id/layoutabove"
android:background="#55000000"
a... | android | [4] |
2,021,961 | 2,021,962 | What is the fastest way to copy a double[] in Java? | <p>Simple question, what's the fastest way of copying an array of doubles in Java. I currently do this...</p>
<pre><code>public static double[] clone_doubles(double[] from)
{
double[] to = new double[from.length];
for (int i = 0; i < from.length; i++) to[i] = from[i];
return to;
}
</code></pre>
<p>whi... | java | [1] |
4,181,725 | 4,181,726 | How to wait for user decision when downloading file | <p>I want to continue with this question: <a href="http://stackoverflow.com/questions/14947413/how-to-download-whole-file-from-website">How to download whole file from website</a>. I find out that downloading a file is an automatic process and it doesn't wait for user decision cancel/save. So for example user writes ur... | java | [1] |
1,761,068 | 1,761,069 | Filtering grid view when binded using datasender in asp.net | <p>i have a gridview to which values are loaded by stored procedure. the grid view is binded to the data source in the aspx.cs file. Now i need to place a filter option for the grid view in aspx page based on the fields in the grid view.</p>
<p>any one please help me out, thanks in advance</p>
| asp.net | [9] |
1,711,059 | 1,711,060 | what does android.R.layout do? An overview | <p>Im trying to get an overview of what android.R.layout does in an android project.</p>
<p>From the spinner tut at <a href="http://developer.android.com/resources/samples/Spinner/index.html" rel="nofollow">http://developer.android.com/resources/samples/Spinner/index.html</a></p>
<pre><code> this.mAdapter = ArrayAda... | android | [4] |
1,323,266 | 1,323,267 | Can you load a random file each time you click the same button with jQuery? | <p>I have 4 contact forms we would like to rotate for testing. I don't want to run these in separate campaigns and for such a simple thing its overkill. Is it possible to have a group of say 4 forms and load them randomly ( a different form ) each time you click a button?</p>
<pre><code>$(function() {
$("a.random"... | jquery | [5] |
1,598,304 | 1,598,305 | how to upload selected contacts into a webserver | <p>I want to upload the selected contacts (phonebook-android)into webserver....can any one help me...please show me the code..thanks in advance</p>
| android | [4] |
5,295,528 | 5,295,529 | Write uint16_t to binary file with ofstream | <p>I am trying to test writing some data to a file. </p>
<pre><code>sixteenBitData = (uint16_t*) malloc(sizeof(uint16_t)*bufSizeX*bufSizeY);
memset(sixteenBitData, 1, sizeof(uint16_t)*bufSizeX*bufSizeY);
binfile->write((char *)&sixteenBitData, sizeof(uint16_t)*bufSizeX*bufSizeY);
</code></pre>
<p>as you can se... | c++ | [6] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.