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,597,339
1,597,340
Python : run a py program on another box
<p>I have a Python script that scans my logs and reports all its findings. Is it possible that the script in my box (say Box A) can be executed for another box (say B) without copying it.</p> <p>Do I really need to copy my Python script to Box B and then execute it from box A or there is a method by which staying in B...
python
[7]
402,598
402,599
Capture SIGINT in Java
<p>What is the best way to capture a kill signal in java without using JNI. I did discover the sun.misc.Signal and the sun.misc.SignalHandler and the warning of the possibility of being removed in the future releases. </p> <p>Would using JNI to call a c lib be the only option i have? </p>
java
[1]
1,107,950
1,107,951
Is it better to move this anonymous function to a real named function?
<p>I am using the following code:</p> <pre><code> $('#dataTable .select-topic') .click(function () { if ($(this).attr('data-list') == "N") { $(this).attr('data-list', 'Y') var topicSelectHtml = $('#TopicID') .clone() .find("optgroup:...
jquery
[5]
5,077,229
5,077,230
How can I check SIM lock on Android application level
<p>I'm looking for a way to find out if an android device is SIM locked or not. I know that in /efs/ should be a file where this setting is stored at. The problem is that without root there's no access to /efs/. </p> <p>USSD codes like <em>#</em>#7465625# does no more work for Android 4.1.2 on Samsung devices.</p> <p...
android
[4]
3,046,793
3,046,794
Where can I find free PHP forms?
<p>There is a question concerning PHP. Whether there is a product similar on a functional liks <a href="http://phpforms.net/tutorial/html-basics/php-forms.html" rel="nofollow">PHP forms</a> but is more cheaper? Thanks!</p>
php
[2]
2,712,032
2,712,033
Calculate CPU usage for an application
<p>I need to calculate the cpu usage of a perticular process in android device. I have tried to find it out using top command. Problem is that it is completely different from the android assistant which is showing cpu usage in RTCPU percentange. I dont know what is RTCPU. Can anyone explain me ?</p> <p>I also want to ...
android
[4]
85,946
85,947
About Ambient Light sensor in iphone
<p>Thanks in advance.</p> <p>I got the information about the iphone sensors from <a href="http://ipod.about.com/od/ipodiphonehardwareterms/qt/iphone-sensors.htm" rel="nofollow">http://ipod.about.com/od/ipodiphonehardwareterms/qt/iphone-sensors.htm</a>. But I didn't get information about how to use ambient sensor in ip...
iphone
[8]
2,660,018
2,660,019
"this" vs normal initialization java
<p>I am a beginner in java and has slowly started to get the feel of this language.</p> <p>I am having a hard time understanding "this" variable.</p> <p>For example, which is better.. and why?</p> <pre><code> public class Foo{ int a; public Foo(int _a){ a = _a; } } </code></pre> <p>vs</p> <pre><cod...
java
[1]
766,109
766,110
Android NFC TECH_DISCOVERED with foreground dispatcher
<p>I am programming an NFC application in Android and I have a little problem when writing tags. I have been able to write a tag but in order to do it I detect it using intent-filters in the manifest. However, what I want to do is to deal with the tag directly with the application using the foreground dispatcher. I am ...
android
[4]
3,258,138
3,258,139
How can i scroll a Listview within a scrollview?
<p>Iam new to Android, iam developing an application with listview in a scrollview. According to my requirement i need to show some of views with vertical scrolling and below that a listview. I want to scroll the entire view and listview vertically, where as listview must scroll independently. I have googled for the so...
android
[4]
1,671,949
1,671,950
Jquery Radio Button Checked, Whole Page quickly flicks
<p>I have a form that has a question which has two radio options (Yes and No). </p> <p>I managed to get the code working fine, but when i click yes out of the radio button the whole screen flashes very quickly. </p> <p>I have never seen this before. can anyone help? </p> <pre><code>$(document).ready(function(){ ...
jquery
[5]
6,018,061
6,018,062
How to sort 2D array (row-wise) in Visual Studio C#?
<p>Need your expert guidance as how to sort a 2D array, row-wise ( means considering each row independently and sort all rows independently of a 2D array) in Visual Studio C#.Example</p> <p>First row: 5 4 3 6 Second row: 2 3 1 4</p> <p>Sorted: First row :3 4 5 6 Second row: 1 2 3 4</p> <p>There is a method called A...
c#
[0]
5,983,289
5,983,290
How to compare variables and find difference in python
<p>I have two variables readARP and readFPING which will have a series of IP's listed in them and I want to compare one to the other. After comparing them I would like to print out the difference if there is any.</p> <pre><code>readARP = scanProcess.read() readFPING = fpingscanPocess.read() &gt;&gt;&gt; print readARP...
python
[7]
4,008,823
4,008,824
Use anchors/hashbangs in the URL to trigger functions on load?
<p>Say someone is linked to the url, <code>example.com/#boom</code></p> <p>Can the hashbang in the url, <code>#boom</code> be linked to triggering a function like <code>boom()</code> on the page?</p> <p>Thanks!</p>
javascript
[3]
2,414,457
2,414,458
php: session_start() error
<p>I have a file, which starts <code>&lt;?php session_start();?&gt;</code>, and it returns an error</p> <pre><code>Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp2\htdocs\index.php:1) in C:\xampp2\htdocs\index.php on line 3 </code...
php
[2]
1,027,338
1,027,339
why null==undefined is true in javascript
<p>If we <code>alert(null==undefined)</code> it outputs to <code>true</code>.</p> <p>What is the logical reason for this.</p> <p>Is this something that is hard coded in javascript or is there an explanation for this.</p>
javascript
[3]
4,255,596
4,255,597
Finding all possible combination on python
<p>I am trying to find all combination of numbers in a list that gives a certain number on python 2.7.Tried combinations of itertool but can't quite figure it out,so here it goes.</p> <pre><code>mylist=[1,2,3,4,5,6,7,8,9,10] number=60 # for 3 elements results=[[3,4,5],[2,3,10],[2,5,6],[1,6,10]...] </code></pre> <p...
python
[7]
5,375,127
5,375,128
Takes away a % of a number not working
<p>What I want it to do is take 10% from what ever the price is.</p> <p>The code is</p> <pre><code>$SALEPRICE = $PS-&gt;Price; $TAX = .10 * ($PS-&gt;Price); $PROFIT = ($PS-&gt;Price) - ($TAX); $getAmount = $PROFIT; </code></pre> <p>$PS->Price is the price it will take 10% from. When $PS->Price is 100,000 it works fi...
php
[2]
4,139,448
4,139,449
Partially hide Layout programatically?
<p>What should I do to partially hide some layout from code? Should I play with <code>setMargins</code>?</p> <p>Basically, I want to detect size of the screen and then I want that element X becomes visible only 10% of its width? I know how to do it all except <strong>how to make it partially hidden or offscreen</stron...
android
[4]
900,747
900,748
How do I delay a form from submitting
<p>I have an additional function to execute before I submit the form. This isn't doing the trick.</p> <pre><code>$('form').submit( function(event) { var formId = $(this).attr('id'); mySpecialFunction(formId); event.preventDefault(); setTimeout( function () { $(this).submit(); }, 300); }...
jquery
[5]
5,018,515
5,018,516
How to show two images in a view one after another and viceversa?
<p>How to show two images in a view one after another,I have tow images named image1 and image2,when the user opens a perticular page it wants to show the image1 then after 2 second image1 dissapers and shows image2 then after 2 second image2 disappers and shows the image1 and go on. I hope you will understand my quest...
iphone
[8]
245,550
245,551
How to add elements to a sorted linked list?
<p>while loop (so that while the current element in the list is less than the parameter, go to the next element)....but how do I do this? I can't do &lt; or compareTo, so I'm not sure how to do this.</p>
java
[1]
597,300
597,301
How to insert external stylesheet in JavaScript (dynamically)
<p>...with right path.</p> <p>For example. I have script called foo.js. I'd like to insert stylesheet declaration which I can do with following instruction:</p> <pre><code>$('head').append('&lt;link rel="stylesheet" href="/template/foo.css" type="text/css" /&gt;'); </code></pre> <p><strong>Problem</strong>: I have t...
javascript
[3]
5,416,049
5,416,050
Using keys in same web.config
<p>My application accesses an active directory for login and querying information about users and I'd like to keep all of my active directory connection information in one place.</p> <p>I'd like to be able to access AD connection information from web.config. I'd assume the correct way to do that would be through appS...
asp.net
[9]
2,394,944
2,394,945
How to customize text color of the CheckBoxPreference title
<p>How to change the color of Title text in CheckBoxPreference?</p>
android
[4]
2,173,217
2,173,218
Can we apply themes in an C#.net Application?
<p>Can we apply themes in an C#.net Application?</p>
c#
[0]
2,167,423
2,167,424
Executing a jquery function to all href attributes
<pre><code>function openFile(file) { var extension = file.substr( (file.lastIndexOf('.') +1) ); switch(extension) { case 'jpg': case 'png': case 'gif': alert('was jpg png gif'); break; case 'zip': case 'rar': aler...
jquery
[5]
416,232
416,233
Convert a 4 char string into int32
<p>Is there a fast way to convert 4 chars into a 32bit int? I know i can loop through it like :</p> <pre><code>string key = "ABCD"; int val = 0; for (int i = 0; i &lt; 4; i++) { int b = (int)key[i] * (int)Math.Pow(256, i); val += b; } // val = 1145258561 </code></pre> <p>I would like something lower level, I...
c#
[0]
1,387,942
1,387,943
Passing $(this) to functions
<p>In JQuery, how we can pass entire $(this) to a functions? Possible?</p>
jquery
[5]
2,478,668
2,478,669
Communication between RS422 serial device and Javascript
<p>I've written a simple web page that uses Javascript to control a Quicktime plugin for movie playback. There's also some AJAX stuff using jquery to get info on the movies from an MSSQL database. The web page is served to the user from an Apache 2.0 server, this also hosts MSSQL. The end users will view the page in IE...
javascript
[3]
5,585,615
5,585,616
Add prefix to mobile number in php before sending it to database
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/11786411/please-help-me-validate-mobile-no-in-php-form">Please help me VALIDATE Mobile no in php form</a> </p> </blockquote> <p>I got mobile number to validate but I am stuck at the prefix part.</p> <pre><code>...
php
[2]
3,183,740
3,183,741
Learning Android programming
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1114287/good-book-for-beginning-android-development">Good book for beginning android development</a> </p> </blockquote> <p>I have been working in android for around 5 months and while I have no problem in design...
android
[4]
105,138
105,139
Weak Reference issue
<p>My App uses CoreAudio and CoreVideo frameworks (supported in iOS4 or later). Now I want my app to be run in device 3 or later. For that i have made core audio and core video frame work to Weak Reference. but it is still giving same problem. </p> <pre><code>dyld: Symbol not found: _OBJC_CLASS_$_AVCaptureDevice Ref...
iphone
[8]
1,275,950
1,275,951
Javascript dynamic objects
<p>I don't really know the correct words to describe what I am trying to do, but the functionality is very similar to overriding the __get() function of PHP classes. For example this is what I want to do.</p> <pre><code>var obj = { param1:'a', func1:function(){ return '1';}, catch_all:function(input){ ...
javascript
[3]
1,010,623
1,010,624
Bigrams and ranks of words
<p>I am using this code to get the frequency of bigrams:</p> <pre><code>text1='the cat jumped over the dog in the dog house' text=text1.split() counts = defaultdict(int) for pair in nltk.bigrams(text): counts[pair] +=1 for c, pair in ((c, pair) for pair, c in counts.iteritems()): print pair, c </code></pre> ...
python
[7]
2,527,150
2,527,151
best way to inject html using javascript
<p>I'm hoping that this isn't too subjective. I feel there is a definitive answer so here goes.</p> <p>I want to create this html on the fly using JS (no libraries):</p> <pre><code>&lt;a href="#" id="playButton"&gt;Play&lt;/a&gt; &lt;a href="javascript: void(0)" id="muteUnmute"&gt;Mute&lt;/a&gt; &lt;div id="progressB...
javascript
[3]
5,514,803
5,514,804
How can I simplify this code snippet?
<p>I have a method that 'steps' from a start to an end value, which works perfectly well and ignores steps that are either infinite or that already fails the condition. But the only different is <code>&gt;=</code> vs <code>&lt;=</code> if the step is negative. I've tried what feels like everything with no luck. Show me...
java
[1]
2,525,519
2,525,520
how to prevent growing activity stack in android
<p>I read somewhere that each time you call startActivity() to transition to a new screen, you are creating a new instance of that activity. This immediately raised a red flag to me.</p> <p>In search of a way to prevent this issue, I read about using FLAG_ACTIVITY_REORDER_TO_FRONT. However I'm a little alarmed that th...
android
[4]
3,222,594
3,222,595
My picture can't fill the tab
<p>I develop an app like below,In the mainActivity,when I try to add an image the TAB1,the picuture can't fill full of the tab,it has a border lost.</p> <p><img src="http://i.stack.imgur.com/0KQeG.jpg" alt="activity picutre"></p> <p>The yellow part is the TAB1,I need yellow color fill with the TAB1.any help will be a...
android
[4]
5,653,276
5,653,277
JavaScript works just once
<p>I have the following script. It works when the users clicks the search button but it only works once. Please guide me how can I make it work for more clicks. Thanks,</p> <pre><code> &lt;form action="" method="get" id="searchform"&gt; &lt;input name="q" type="text" id="search" size="32" maxlength="128" class="txt...
javascript
[3]
1,909,661
1,909,662
subclassing a View and overriding onDraw(Canvas)
<p>When I'm instantiating myView in the Activity, why is it necessary to pass the context and why is it required to pass the context to the View's constructor? What is the significance?</p> <pre><code>import android.app.Activity; import android.os.Bundle; import android.view.View; import android.graphics.Canvas; publ...
android
[4]
5,098,613
5,098,614
Followup: Check if two integers have the same sign
<p>I experimented with the bitwise-operator suggested <a href="http://stackoverflow.com/questions/10298109/check-if-two-integers-have-the-same-sign">to my question</a> and <a href="http://stackoverflow.com/a/66968/1047823">here</a>.</p> <p>Check the results of my testsuite:</p> <pre><code>function equal(n1,n2){ v...
javascript
[3]
5,550,932
5,550,933
Save dialouge box in ASP.NET
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/12351415/showing-save-file-dialog-box-in-asp-net">Showing Save file dialog box in asp.net</a> </p> </blockquote> <p>Currently, In my website, users are able to download file from my website with option to open/s...
asp.net
[9]
2,407,028
2,407,029
Please correct the following Python CGi program
<p>Please correct the following cgi program</p> <pre><code>#!usr/bin/python print "Content-type : text/html\n\n" print "&lt;html&gt;&lt;body&gt;&lt;span&gt;Hello World&lt;/span&gt;&lt;/body&gt;&lt;/html&gt;" </code></pre> <p>What is wrong with the above code?</p> <p>I am getting 500 Internal Server error and it is...
python
[7]
4,734,489
4,734,490
How to iterate & search in a dictionary?
<p>I've constructed a dictionary like this:</p> <p>dir is: </p> <pre><code>{((2, 1), 'South', 1): set([((2, 2), 'South', 1)]), ((1, 3), 'South', 1): set([((1, 4), 'South', 1)]), ((5, 3), 'East', 1): set([((4, 3), 'North', 1)]), ((2, 2), 'South', 1): set([((2, 3), 'East', 1)]), ((4, 2), 'East', 1): set([((3, 2)...
python
[7]
2,076,877
2,076,878
loop in python !
<p>can anyone help me with loop i want loop that code</p> <pre><code>login_form_data = urllib.urlencode(login_form_seq) opener = urllib2.build_opener() site = opener.open(B, login_form_data).read() </code></pre> <p>the code allow me to login to site but site have problem and the problem is: you can't login from fir...
python
[7]
89,878
89,879
how to convert a WebView into an ImageView?
<p>i have a WebView of an html page which shows only one image</p> <p><a href="http://www.google.fr/intl/en_com/images/srpr/logo1w.png" rel="nofollow">http://www.google.fr/intl/en_com/images/srpr/logo1w.png</a></p> <pre><code>webView = (WebView) findViewById(R.id.webView); webView.loadUrl("http://www.google.fr/intl/e...
android
[4]
3,584,942
3,584,943
Picture box always throws object reference not set to instance of object error
<p>I have a class which holds a picturebox. I have created an array of objects of my class, but when I try to create a new picture box, I am getting an error stating, object reference is not set to an instance of object. </p> <p>Here is how I am creating pictureboxes</p> <pre><code> GreyHound[] dog; public Form1...
c#
[0]
1,634,013
1,634,014
using str_replace with file_get_contents
<p>I am using file_get_contents to grab a page, but i need to replace some data in the contents of the page before echoing it. </p> <p>I have this so far (this script runs on domain2.com)</p> <pre><code>&lt;?php $page = file_get_contents('http://domain.com/page.html'); str_replace('href="/','href="http://domain.com',...
php
[2]
294,973
294,974
Python CSV DictReader ignore columns?
<p>If I'm using CSV.dictReader to read in an CSV, how would I go about having it ignore certain columns in the CSV?</p> <p>For example,</p> <pre><code>"id","name","address","number","created" "123456","someName","someAddress","someNumber","2003-5-0294" </code></pre> <p>And I want to just get the id and name using th...
python
[7]
3,748,804
3,748,805
Silde up / down
<p>I have this markup</p> <pre><code>&lt;div id="content" &gt; &lt;h1&gt;&lt;a href="#"&gt;Sample 1&lt;/a&gt;&lt;/h1&gt; &lt;img src="" alt="sample 1" /&gt; &lt;h1&gt;&lt;a href="#"&gt;Sample 2&lt;/a&gt;&lt;/h1&gt; &lt;img src="" alt="sample 2" /&gt; &lt;h1&gt;&lt;a href="#"&gt;Sample...
jquery
[5]
3,721,184
3,721,185
How to display this in format dd.mm.yyyy?
<pre><code>alert(end); //Wed Oct 22 2014 00:00:00 GMT+0200 (CEST) </code></pre> <p>How to display this in format dd.mm.yyyy ?</p>
javascript
[3]
446,102
446,103
Opening jar files in java
<p>I want to know how to load a jar file through another jar file</p> <p>I.e. I hit the start button and it loads up the other jar file.</p> <p>The start button is a button in the first app.</p>
java
[1]
4,602,822
4,602,823
App icon not showing up on emulator
<p>I created a simple splash screen application, and it works just fine only when i click the "Run" button in eclipse indigo, and I am not able to find the icon at all in the emulator. Where is icon?! I ran it as android 4.0.3.</p>
android
[4]
2,150,041
2,150,042
python unpack little endian
<p><P>I'm trying to use Python read a binary file. The file is in LSB mode. I import the struct module and use unpack like this:</p> <pre><code>f=open(sys.argv[1],'rb') contents= unpack('&lt;I',f.read(4))[0] print contents f.close() </code></pre> <p><p>The data in the file is 0XC0000500 in LSB mode, and the actual va...
python
[7]
4,594,605
4,594,606
Problem with Refreshing data in ExpandableListView
<p>My problem is when I want to refresh data in ExpandableListView while being in that current activity. I create adapter and when I want to add new data to list I call again constructor of that adapter(it is my private variable) with all new data....and then I call onContentChanged() method to redraw my list. But what...
android
[4]
2,594,763
2,594,764
how to make default no when contact is clicked to send sms....in android
<p>how to get contact number when its clicked on contact to send sms. and in the method showSelectedNumber(type, number); what to write in this method,i m not getting please provide me a solution to this method or any alternate way to get contact default.</p>
android
[4]
4,680,694
4,680,695
How to show videos from sdcard in thumbnail view?
<p>How can I get a list of all videos from a folder on the sdcard and display the thumbnails in a list? When I click on a thumbnail, it should then open that video for playback.</p> <p>Please help me out. </p>
android
[4]
5,271,200
5,271,201
Sum instead of concatenation
<p>I have my code</p> <pre><code>sum=parseFloat($('input[name=fieldname]').val()) * 60 + parseFloat($('input[name=fieldname]').val()) + (($('input[name=fieldname]').val()) /60).toFixed(2). </code></pre> <p>It get's the values from felds where I enter duration and it should give me the sum in minutes. The problem is...
javascript
[3]
981,648
981,649
How can I get android device Unique ID?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id">Is there a unique Android device ID?</a> </p> </blockquote> <p>I used below code to get android device IMEI and How can I change below code to get android device Uniq...
android
[4]
3,369,208
3,369,209
java : Need help converting an Object to Array
<p>I have this Userlist Object with some data in it </p> <pre><code>Userlist userlist = new Userlist(); userlist.setUserlistItem(userlistitem); </code></pre> <p>Now i have another Object UserDatalists , the structure of UserDatalists is shown below </p> <pre><code>public class UserDatalists{ private Userlist...
java
[1]
2,479,675
2,479,676
Java and UDP web server
<p>I thinking of building a mini-server where Java can send data through UDP protocol so that my other Flex application can read. The data consist of short string of up to 64 characters. Should I consider HTTP instead?</p> <p>Where can I find out more tutorial on building HTTP/UDP web server</p>
java
[1]
5,200,373
5,200,374
JavaScript target question
<p>Here is some code I don't understand, but I know it opens the link in THE SAME WINDOW. I like it to open in BLANK NEW WINOWS... what to add/modify?</p> <pre><code>[some code before] _.addEvent(b, 'click', function (e, i) { document.location.href = (('undefined' !== typeof i) ? i: e.target).getAttribute('flickrshow-...
javascript
[3]
3,797,193
3,797,194
Setting\Getting Environment Variables through batch file inside java program
<p>I am facing a problem where I need to run a bat file from java program. This Batch file contains certain SET ms-dos command which i need to access further down in my application.</p> <p>I used ProcessBuilder Class to invoke the batch file but processBuilder.environment() is not returning me the variables set by the...
java
[1]
1,919,297
1,919,298
Format a Number, Exactly Two in Length?
<p>I have an integer that is less then 100 and is printed to an HTML page with JavaScript. How do I format the integer so that it is exactly two digits long? For example:</p> <p>01<br> 02<br> 03<br> ...<br> 09<br> 10<br> 11<br> 12<br> ... </p>
javascript
[3]
4,291,080
4,291,081
jquery, perl, form and serialize command not working IE browser
<p>I have this form section with dynamic clone of select drop down menus.</p> <p>The form are passing the values into the serialize. </p> <pre><code> var data3 = $("#advance_mode_inputs").serialize(); </code></pre> <p>Firefox works but in IE, it isn't working. Any ideas? There were no errors reported by the IE brows...
jquery
[5]
3,025,643
3,025,644
I get the error: ‘cout’ was not declared in this scope when I try to use cout
<pre><code> #include&lt;iostream&gt;//test.cpp int main() { char t = 'f'; char *t1; char **t2; cout&lt;&lt;t; return 0; } </code></pre> <p>g++ test.cpp</p> <p>I get this error </p> <p>why?</p>
c++
[6]
4,709,982
4,709,983
White square after loading in Mozilla
<p>I'm running some beta tests in this URL: <a href="http://acquasports.esp.br/site/" rel="nofollow">http://acquasports.esp.br/site/</a></p> <p>Whenever I load the main page and the jquery is already loaded (when I click the company logo, per example), the browser Mozilla renders the menu area as a large white square....
jquery
[5]
174,793
174,794
class properties that can be assigned only when creating object?
<p>It's possible in C# to write things such way:</p> <pre><code>Instrument instr = new Instrument { ClassCode = "Hello", Ticker = "World" }; </code></pre> <p>However to do that you have to add <code>set;</code> in the corresponding class:</p> <pre><code>class Instrument { public string ClassCode { get; set; } ...
c#
[0]
5,024,833
5,024,834
Google Javascript tutorial like Mozilla developer Center
<p>I am just a beginner, so forgive me for any mistake.</p> <p>I am searching for JavaScript Documentation from Google such like Mozilla have their own.</p> <p>Please suggest...</p>
javascript
[3]
4,843,101
4,843,102
Transfering data from a sensor to the iphone
<p>I have an external device (some kind of sensor) that can do a measurment. This sensor can be connected to a PC via Bluetooth or USB cable, and it also comes with its own software. I want to develop an app for iphone that will analyze the data that this sensor is measuring (for example creating a graph, calculating s...
iphone
[8]
1,511,518
1,511,519
Android Platform Backwards Compatable
<p>I am importing an android app into Eclipse. I am receivng the following error</p> <pre><code>Unable to resolve target 'Google Inc.:Google APIs:8 </code></pre> <p>I have installed Android 4.0.3 (API15). Do I also need to install Android 2.2(API8)?</p> <p>Is Android 4.0.3 (API15) not backwards compatable?</p>
android
[4]
33,958
33,959
How to compare objects in C#
<p>How do you compare objects in C#. Here is a sample of my code</p> <pre><code>namespace MyService { public static class CurrentVCobj { public static string id { get; set; } public static string Month { get; set; } public static string Year { get; set; } } public static class ...
c#
[0]
2,066,477
2,066,478
filter select box options using jquery
<p>I have two selection boxes,one contains different country names and another contains all state names of all countries.</p> <p>Then if i select <code>India</code> from country selection box, the state selection box has need to show all states of <code>India</code> alone and remove all other states from it. </p> <p>...
jquery
[5]
5,586,632
5,586,633
how to check for Notice (8) Undefined index
<p>I know why I am getting this error, and this is because there currenly no ratings for this specific dish, so it is null or empty but I am not sure how to handle it.. I tried this but still the same error came up..</p> <pre><code> if(empty($rate_dishes[$j]["DishRating"]["dish_id"])) { echo $this-&gt...
php
[2]
184,446
184,447
class and private variables
<pre> class Test1: def __init__( self ): self.__test = 1 def getvalue( self ): return self.__test class Test2( Test1 ): def __init__( self ): Test1.__init__( self ) self.__test = 2 test = Test2() </pre> <p>Why print test.getvalue() return 1 ?</p>
python
[7]
1,643,891
1,643,892
How can I bold text in ASP .NET
<p>How can I bold my output like this</p> <p>Student "<strong>John</strong>" assigned to Officer "<strong>Mick</strong>".</p> <p>i want <strong>John</strong> and <strong>Mick</strong> bold in web</p> <p>This is my code aspx :</p> <blockquote> <p>this.lblAssignee.Text = " Student \"" + StudentAssign + "\" assign...
asp.net
[9]
1,079,908
1,079,909
Changing "/" to "\" [C#]
<p>I have already seen the other way around. But this one I can not catch. I am trying to get a part of a web resourcePath and combine it with a local path. Let me Explain a bit more.</p> <pre><code>public string GetLocalPath(string URI, string webResourcePath, string folderWatchPath) // get the folderwatcher path to ...
c#
[0]
4,615,113
4,615,114
How to extract javascript contents
<p>As we extract html contents using </p> <pre><code>alert(document.all[0].innerHTML); </code></pre> <p>how can i extract javascript contents.</p> <p>Anyone who knows the answer, please help me Thanks in advance.</p>
javascript
[3]
5,933,799
5,933,800
split python source code into multiple files?
<p>I have a code that I wish to split apart into multiple files. In matlab one can simply call a <code>.m</code> file, and as long as it is not defined as anything in particular it will just run as if it were part of the called code. Example (edited):<br> <strong>test.m</strong> (matlab)</p> <pre><code>function [] = t...
python
[7]
4,341,040
4,341,041
Uploading image to twitter using twitter api in android
<p>Is it possible to post image to twitter using twitter api?</p> <p>If possible how to do,please provide some information on this.</p> <p>Thanks</p>
android
[4]
167,268
167,269
Sorting files by creation/modification date in PHP
<p>In PHP, how to retrieve the files contained into a folder sorted by creation date (or any other sorting mechanism)?</p> <p><a href="http://uk3.php.net/manual/en/function.readdir.php" rel="nofollow">According to the doc</a>, the <em>readdir()</em> function:</p> <blockquote> <p>The filenames are returned in the ...
php
[2]
1,764,010
1,764,011
Dynamic radio buttons
<p>I have a page full of radio buttons and it won't display "Success: You have completed all questions" dynamically.</p> <p>html:</p> <pre><code> Question 1:&lt;br /&gt; &lt;label&gt;&lt;input name="income" type="radio" value="1" /&gt;10,000&lt;/label&gt; &lt;br /&gt; &lt;label&gt;&lt;input name="income" ...
jquery
[5]
2,026,773
2,026,774
Creating a guage in Android
<p>I want to create gauge, it should contain a semi circle and the pointer has to move according to my data. Drawing with canvas is the only solution? How to start with canvas? and How to move the pointer dynamically?</p> <p>regards,</p> <p>Krishna</p>
android
[4]
2,105,003
2,105,004
Show Yes/No-Dialog instead of OK/Cancel
<p>I hate the OK/Cancel dialogs, because if my application ask somebody if (s)he really want to do something you should never answer with "Cancel".</p> <p>A little example:</p> <pre><code>final AlertDialog.Builder b = new AlertDialog.Builder(this); b.setIcon(android.R.drawable.ic_dialog_alert); b.setTitle("Hello Worl...
android
[4]
643,792
643,793
Advanced Javascript form validation function
<p><a href="http://www.javascript-coder.com/html-form/javascript-form-validation.phtml#using" rel="nofollow">This</a> is what I'm using.</p> <p>It's great. I only need to add function that checks if one of "cp", "bp", "hp" input area is entered or not. If not it should give an error that says "Please enter at least 1 ...
javascript
[3]
5,896,404
5,896,405
When is it best to use the stack instead of the heap and vice versa?
<p>In C++, when is it best to use the stack? When is it best to use the heap?</p>
c++
[6]
3,205,510
3,205,511
UILongPressGesture in iphone sdk
<pre><code> UILongPressGestureRecognizer *longPressOnUndoGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPressOnUndoGesture:)]; [longPressOnUndoGesture setMinimumPressDuration:2.0]; [longPressOnUndoGesture release]; </code></pre> <p>i have the above code...
iphone
[8]
3,086,064
3,086,065
I keep on having problems with syntax and calculating the roots of the quadratic equation
<p>Hey I am having problems with calculating the roots of the quadratic equation with the quadratic formula, using python's complex number functionality.</p> <p>When I try</p> <pre><code>&gt;&gt;&gt; if root&lt;0: root=abs(complex(root)) j=complex(0,1) x1=(-b+sqrt(root))/2*a x2=(-b-j+s...
python
[7]
4,627,263
4,627,264
Data Parsing Question C#
<p>I am getting back data in a string like the following:</p> <pre><code>dog,cat,snake,bird,cow,parrot,lion grass,green,fruit,bag,car,melon,coat apple,orange,grape,butter,jelly,chips,milk </code></pre> <p>I want to put this data in a gridView where each of these rows stands for a row in a gridView, I also wanna take ...
c#
[0]
2,984,336
2,984,337
how come ![] is not true?
<p>Was just playing around with nodejs and chrome's console when I tested this:</p> <pre><code>[] == true // false ![] == true // false !![] == true // true </code></pre> <p>How come? Isn't it wrong?</p>
javascript
[3]
1,356,724
1,356,725
asp.Net + encrypted QueryString requested not reading '+' sign
<p>I have an encrypted query string passed from another page, it reads something like "/se73j+sef" but after receiving it, the '+' sign got omitted and became "/se73j sef". Is this normal? Please kindly advice. Thanks.</p>
asp.net
[9]
1,531,115
1,531,116
Split a text box in one form to multiple labels into another form
<p>I need to send information input into a text box in one form to labels in another form. I have it split at the moment, but since there is only one split If the user enters more that one space in the text box (lets say First, Middle, Last) the second form will only show first and middle. I need to split it twice time...
c#
[0]
1,389,895
1,389,896
Don't set variable if string does not start with six integers in c# 2.0?
<p>I have</p> <pre><code>string customer_id; </code></pre> <p>In a for loop I assign a value coming from a database request</p> <pre><code>customer = (Customer)records[i]; </code></pre> <p>I want to assign customer_id to customer.entityId only if entityId (a string) starts with six integers.</p> <p>So:</p> <pre><...
c#
[0]
1,777,317
1,777,318
What's the easiest way to generate a List<int> of ordered numbers in C#?
<p>This seems like a no-brainer:</p> <pre><code>List&lt;int&gt; steporders = new List&lt;int&gt;(); for (int i = 1; i &lt;= 10; i++) { steporders.Add(i); } </code></pre> <p>But I figure there's some simpler, better or more clever way I haven't thought of. Is there?</p>
c#
[0]
5,226,147
5,226,148
Getting values from a response based on an "expected response" expression
<p>I have an expected response, which <strong>could be in any format</strong>, but for example:</p> <pre><code>myfoo={FOO}&amp;mybar={BAR}&amp;mybaz={BAZ} </code></pre> <p>Then I have the response string:</p> <pre><code>myfoo=hello&amp;mybar=test&amp;mybaz=yup </code></pre> <p>So my question is, in JavaScript, how ...
javascript
[3]
5,811,720
5,811,721
Question about real_2d_array in alglib using c++
<p>I'm a bit confused about using the setlength() function of real_2d_array in alglib. Below is a code example:</p> <pre><code>int main() { using namespace alglib; int s=3, t=5, i, j; real_2d_array fmatrix; fmatrix.setlength(s,t); for(i=0;i&lt;s;i++) { for(j=0;j&lt;t;j++) fmatrix[i][j]=i+j;...
c++
[6]
5,544,795
5,544,796
Getting this error when running my web service
<blockquote> <p>Server Error in '/' Application. Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. </p> <p>Parser Error Message: Could not create ...
asp.net
[9]
2,235,322
2,235,323
Step 1 into Android Development
<p>I am yet to touch the whole android platform, jst getting my tools in order. I noticed that there is Android <a href="http://developer.android.com/sdk/android-4.0.html" rel="nofollow">4, 3, 2</a></p> <p>What should I start on? Any IDE that is prefered? </p> <p>I am reading "Learning Android By Marko Gargenta, O'RE...
android
[4]
5,489,736
5,489,737
jquery templating plugin - using a normal unnamed array?
<p>Does anyone know if it's possible to just use a normal array (e.g. [1,2,3]) with the jQuery templating plugin?</p>
jquery
[5]