Unnamed: 0
int64
65
6.03M
Id
int64
66
6.03M
Title
stringlengths
10
191
input
stringlengths
23
4.18k
output
stringclasses
10 values
Tag_Number
stringclasses
10 values
2,340,632
2,340,633
Methods on File Object is undeclared
<p>When I wrote this method it gave me an error that the method exists() and canRead() is undeclared in the File Object: // TODO: Remove or fix this.</p> <pre><code>public static Pixa readFiles(File dir, String prefix) { if (dir == null) throw new IllegalArgumentException("Directory must be non-nul...
android
[4]
537,295
537,296
Why do I get this error: Cannot open include file: 'FL/Fl.h'?
<p>I've tried to compile a program on VSEXPRESS 2008 EDITION coupled with fltk-1.1.9 but I coutinuosly get the following error: fatal error C1083: Cannot open include file: 'FL/Fl.h': No such file or directory</p> <p>Can anyone one help me out? Thanks a lot</p>
c++
[6]
3,958,884
3,958,885
Why c++? Where to start?
<p>I know there was many questions like this one, but please hold on one more. All programming languages I know now are made for web purposes. I've been learning ActionScript, php and a bit of Javascript, AJAX, etc.. I've liked php very much but I'm still looking something I'll really love! That's why I want to try som...
c++
[6]
3,667,846
3,667,847
How to determine if a square is inside a rectangle?
<p>Higuys,</p> <p>In Java, I wonder how can I determine if a square is inside a rectangle, or touching at the edges or touching at one corner, if these are given:</p> <ul> <li>x and y coordinates of the square, width of the square</li> <li>x and y coordinates of the rectangle, width &amp; length of the rectangle</li>...
java
[1]
3,176,307
3,176,308
std::ostream printing address at end of function
<p>I have the following function:</p> <pre><code>std::vector&lt;double&gt;residuals; std::cout &lt;&lt; Print_res(std::cout); std::ostream&amp; Print_res(std::ostream&amp; os) const { os &lt;&lt; "\tresidual" &lt;&lt; std::endl; for (unsigned int i = 0 ; i &lt; 22 ; i++) { os &lt;&lt; "\t\t" &lt;&lt; residual...
c++
[6]
3,650,797
3,650,798
UIAlertview with advertiesment and message?
<p>Can we add advertisement in UIAlertview with some message? I know custom alert is possible but don't know how to add advertise in that.</p>
iphone
[8]
1,761,044
1,761,045
Does turning on/off GPS broadcast the android.location.PROVIDERS_CHANGED message?
<p>On Froyo:</p> <p>When turning on and off the GPS, is the android.location.PROVIDERS_CHANGED message supposed to be broadcast? I have an application that turns the GPS on and off, and a listener is set for this message (to verify that the action occurred), and the listener is never called even though the GPS is bein...
android
[4]
1,143,014
1,143,015
catch editing-Mode left and change label from UITableViewCell
<p>i have a little problem. when i enter the edit mode of my uitableview the a manuel added label should disappear. i realized this by setting the alpha of this label-field to 0 in following method:</p> <pre><code>- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexP...
iphone
[8]
2,953,104
2,953,105
IF- ELSE condition - run the code in the ELSE section
<p>I have got the following IF condition code:</p> <pre><code>if ((depth &lt;= min_depth ) &amp;&amp; (leaf_colour == "red")){ for (i = 0; i &lt; array_2D.length; i++) { var leaf_size = array_2D[i][1]; if (leaf_size == 10 || leaf_size == 11){ alert("Error message."); bre...
javascript
[3]
2,551,383
2,551,384
why we need interface instead of class and what we are achieving from interface
<p>As we know that we can declare only the method signature and also can not create the instance of a Interface. then why we need interface. Unnecessary its loading into JVM. This is also one performance degradation. We are creating the interface and several classes implementing that interface and defining all the meth...
java
[1]
1,388,880
1,388,881
Unfortunately android app has stopped
<p>I am doing a simple program for addition of two numbers which are input from EditText. But when user clicks the button 'Click to Add' leaving the fields empty, program exits saying 'Unfortunately, program has stopped.'</p> <p>Here is the code:</p> <pre><code>public class MainActivity extends Activity { long a, b,...
android
[4]
2,043,615
2,043,616
Validating e-mail address
<p>I am trying to validate an e-mail address using javascript. The problem is the if statements aren't executing correctly. If I delete the 'else statement' the code runs correnctly and the page does not load with errors. If I include the 'else statement' the else statement never executes and the status bar says that t...
javascript
[3]
1,163,216
1,163,217
Can a class method be both inline and static?
<p>Does it even make sense?</p>
c++
[6]
3,545,911
3,545,912
Convert Double to String without precision loss in javascript
<p>I would like to convert a floating point variable to a string without losing any precision.</p> <p>I.e. I would like the string to have the same information as my floating point variable contains, since I use the output for further processing (even if it means that the string will be very long and readable).</p> <...
javascript
[3]
2,943,620
2,943,621
Programmatically disable specific PHP functions for testing
<p>I have a function that makes HTTP requests with cURL that falls back to <code>file_get_contents()</code> if cURL is not available on the system.</p> <p>I would like to write unit tests for this function (utilizing PHPUnit) where cURL is available for some tests, and not available for others.</p> <p><strong>Is it p...
php
[2]
2,813,694
2,813,695
How to copy dictionaries with matching values for a given key from list to new list?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5762643/copy-dictionaries-with-matching-values-for-a-given-key">Copy dictionaries with matching values for a given key</a> </p> </blockquote> <p>With an interface like <code>a = copyf(dictlist, key, valuelist)</...
python
[7]
5,081,986
5,081,987
Keycode hooks in android
<p>I use my android tablet with a wireless bluetooth keyboard. This keyboard has a few built in "hot keys" to launch specific programs. For example fn+f10 launches gmail. I am wanting to add some custom hotkeys. Does anyone have an idea of how the android os catches these keycodes from a bluetooth device? I know t...
android
[4]
1,633,707
1,633,708
How can I encrypt a file (video/audio/image), save to SDCard, then decrypt that same file and play it via VideoView?
<p>I am trying to create an app that would download a file from a remote server and save it to the SD card. The file is quite confidential so I need an encryption for this. I would like it to be saved as encrypted. When I want to play the file, it should only be played on my media player which has the decrypt code. No ...
android
[4]
3,663,345
3,663,346
Why doesn't my object inherent the keys functions?
<p>If I have an object:</p> <pre><code>A = {a:true} </code></pre> <p>Why do I have to use:</p> <pre><code>Object.keys(A) </code></pre> <p>and not:</p> <pre><code>A.keys() </code></pre> <p>If keys is a method of Object, and everything inherits from Object, shouldn't A be able to call keys?</p>
javascript
[3]
4,427,990
4,427,991
Pygame using TKinter to make a popup menu?
<p>I need to have a pygame window check if the user right clicked (I can do) and then make a popup menu to display options using TKinter (?). Is this possible?</p>
python
[7]
2,918,533
2,918,534
How to update the pre-installed application programmatically in android
<p>I am working on an app where app installs .apk file which is available on my local server. and if there is any update notification for the installed local server application,its need to update the application. I am using GCM to send notification to the android device for update and get the <strong>versionCode</stro...
android
[4]
977,345
977,346
will Python ever have LINQ like thing
<blockquote> <p><strong>Possible Duplicate:</strong><br /> <a href="http://stackoverflow.com/questions/1085337/linq-in-python">LINQ in Python</a> </p> </blockquote> <p>Hi</p> <p>Will python ever have Microsoft LINQ ported to it . I find LINQ to be very cool</p>
python
[7]
5,583,625
5,583,626
get index of item in listbox c#
<p>I am trying to get index of each items in a listbox Here is my code</p> <pre><code> foreach (ListItem lstItem in lstCostCenter.Items) { int x = lstCostCenter.Items.IndexOf(lstItem); } </code></pre> <p>But each time its returning 0 only.</p> <p>Please some one help ...
c#
[0]
646,420
646,421
Getting the client's timezone in JavaScript
<p>How can I gather the visitor's time zone information? I need the GMT offset hours.</p>
javascript
[3]
3,967,268
3,967,269
Select A Specific Class In An Each Statement
<p>I the following code returns every text that has the "price" class associated to it. I just want to return the price of the specific item the each statement is on..</p> <pre><code>&lt;div class="item"&gt;     &lt;p class="price"&gt;$388.00&lt;/p&gt;     &lt;p class="part_number"&gt;VM2327T23A00T&lt;/p&gt;     &lt;p...
jquery
[5]
672,385
672,386
How do I return false if the typeof a function is equal to undefined?
<p>In JavaScript, is there a way to display a message or to return false if the type of an object or function is undefined? It seems as though if an object or function is not present, there's no way to display an error message on screen, but rather the error appears in the Web Console.</p>
javascript
[3]
4,219,127
4,219,128
QuickFlip JQuery Plugin
<p>I'm using quicklfip (<a href="http://jonraasch.com/blog/quickflip-2-jquery-plugin" rel="nofollow">http://jonraasch.com/blog/quickflip-2-jquery-plugin</a>) for Chinese character flashcards. The front panel will have the character and the back panel will have the definition. The problem I am having is that I want to s...
jquery
[5]
98,050
98,051
I just uploaded my first app to the Android Market, and I'm getting a 404 when I try to download it
<p>Here's the link to download my app from the play store:</p> <p><a href="https://play.google.com/store/apps/details?id=com.dgolder.BCDining" rel="nofollow">https://play.google.com/store/apps/details?id=com.dgolder.BCDining</a></p> <p>I'm getting a 404 when I try to install it and I'm not sure what could be causing ...
android
[4]
389,130
389,131
jquery checked checkbox on refresh and unique value query
<p>I'm trying to run a piece of code only when a <code>checkbox</code> is checked on refresh with the correct value? </p> <pre><code>if ($("input[name='business_group']").attr("checked")==true &amp;&amp; .val("accommodation")) { $(".acc_title").show(); $(".fd_title").hide(); $(".dest_title").hide(); $...
jquery
[5]
3,860,736
3,860,737
how to check a string is not null
<pre><code> if(string.equals("")) { } </code></pre> <p>how to check the string is not null </p> <pre><code> if(!string.equals("")) { } </code></pre> <p>???</p>
java
[1]
2,254,107
2,254,108
WeakValueDictionary for holding any type
<p>Is there any way to work around the limitations of WeakValueDictionary to allow it to hold weak references to built-in types like dict or list? Can something be done at the C level in an extension module? I really need a weakref container that can hold (nearly) any type of object.</p>
python
[7]
217,789
217,790
Difference between Javascript function declarations
<p>What is the difference between the following two examples?</p> <pre><code>setInterval(myFunc, 100); function myFunc() { alert('asdf'); } </code></pre> <hr> <pre><code>setInterval(myFunc, 100); var myFunc = function myFunc() { alert('asdf'); } </code></pre>
javascript
[3]
1,456,346
1,456,347
Can't get recursive function to work in Java
<p>I read docs about java recorsion and I thought I have understood it, but when I try to use it in the following example, it does not work as expected.</p> <p>I a class <code>account</code>, which has <code>amount</code> and can have forther subAccount. I would have implemented one method <code>getSum</code>, which h...
java
[1]
3,763,199
3,763,200
how to avoid deep sleep mode in android phone programmatically?
<p>I have develop one android application which will talk to server 24*7 over WiFi but when phone goes to sleep mode it stops talking to server means socket is getting closed so for resolving this I added code to acquire partial wake lock in service onCreate() and release it on OnDestroy() method o service so even tho...
android
[4]
750,075
750,076
Where should we use finish() to end the application?
<p>In my application after the user goes from one activity to another and vice versa. Im calling the activities using Intents on the event "onClick".</p> <pre><code>public void onClick(DialogInterface dialog, int whichButton) { Intent intent = new Intent(); intent.setClass(Field...
android
[4]
3,760,162
3,760,163
ideal resolution value for android application
<p>What is the ideal resolution value that can i choose for my android application.</p>
android
[4]
196,093
196,094
Preserving scroll position of PreferenceActivity across invocations
<p>Let's say I have a <code>PreferenceActivity</code> (which I cannot convert to use Fragments for compatibility reasons). One setting within that <code>PreferenceActivity</code> is for the current application theme, which I would like to apply instantly when changing the preference by calling <code>PreferenceActivity#...
android
[4]
5,923,553
5,923,554
Template Class Static Data Instantiation?
<p>Any one can tell me what on earth is going on in this code?</p> <pre><code>#include &lt;iostream&gt; class BBB { public: BBB() { std::cout &lt;&lt; std::endl &lt;&lt; "BBB()" &lt;&lt; std::endl; } ~BBB() { std::cout &lt;&lt; std::endl &lt;&lt; "~BBB()" &lt;&lt; std::endl; } }; template&lt;class T&...
c++
[6]
1,560,578
1,560,579
How to stop loop when user enters "quit", "end", etc?
<p>This is my code</p> <pre><code> #!/usr/bin/python3.1$ #Break Statement$ while True:$ ...
python
[7]
1,088,335
1,088,336
MKMapView Current Location Display
<p>I am Getting the pin which Display Current Location in english but i want to display in Different language so how can i do this?</p>
iphone
[8]
2,089,013
2,089,014
Trying to find the indexOf a string from an ArrayList filled with strings from hashtable, only returning -1
<p>I am trying to get the indexOf of a specific string from an ArrayList but the string is not matching when doing the check. I am filling the StringList from hashtable with the code below.</p> <pre><code>stringList = new ArrayList&lt;String&gt; Set st = hashtable.keySet(); Iterator itr = st.iterator(); while(itr.ha...
java
[1]
782,480
782,481
error! got undefined variable if sent empty post
<p>i got error message if sent empty post in my registration form</p> <p><strong>Notice: Undefined index: terms in /opt/lampp/htdocs/user/register.php on line 34</strong></p> <p>in the line 34 i have this </p> <pre><code>$terms = trim($_POST["terms"]); </code></pre> <p>and in the form i have this</p> <pre><code>&l...
php
[2]
5,206,545
5,206,546
Login Script problem
<pre> if (isset($_POST['login'])){ $query = mysql_query("SELECT id FROM users WHERE username = '".mysql_real_escape_string($_POST['username'])."' AND password = '".mysql_real_escape_string($_POST['password'])."'"); /* wrong login information? redirect to error message */ if (mysql_num_rows($query...
php
[2]
2,662,207
2,662,208
CurrentThread/ProcessThread objects
<p>In the .NET BCL, there is a CurrentThread and a ProcessThread object. What is the difference between these?</p> <p>Thanks</p>
c#
[0]
1,075,981
1,075,982
jquery: stop everything happening at once
<p>I am just learning jquery, and it took me ages of browsing the jquery api site to create these few lines of code. What I want to do is use ajax to load content from another page and put it into an existing div. currently, the code works but when I click on a link all the steps get executed in one go, so its doing th...
jquery
[5]
1,412,557
1,412,558
Alternative for PHP linter
<p>Basically, php -l does not detect any syntax error, given this code:</p> <pre><code>&lt;?php date®; ?&gt; </code></pre> <p>Obviously, it's an error when you execute it.</p> <p>Is there any alternative or additional linter to use for PHP?</p> <p>EDIT:</p> <p>Thanks alot guys. Apparently it <em>is</em> a valid co...
php
[2]
4,024,821
4,024,822
how encode a string using base64 and how to convert this encoded string into orginal string?
<p>i am new to iphone</p> <p>in my app i connect to twitter and send message in encoded form to display on message textfield to post but that code display in encoded form i want displat that in orginal textformate any help to how to convert it into orginal string formate, my code</p> <pre><code>NSString *str1 = twit...
iphone
[8]
3,783,646
3,783,647
get image height and width in file tag using javascript
<blockquote> <p><strong>Possible Duplicates:</strong><br> <a href="http://stackoverflow.com/questions/6633190/get-image-height-and-width-in-file-tag-javascript">get image height and width in file tag javascript</a><br> <a href="http://stackoverflow.com/questions/1310378/determining-image-file-size-dimensions-via-...
javascript
[3]
369,848
369,849
Best way to set master page properties in content page in asp.net?
<p>There are different ways to set the title for content pages from Master page </p> <ol> <li>by findcontrol</li> <li>by creating property in master page and setting the value in content page</li> </ol> <p>As both method requires an object creation of master page which will be little heavy<br> <code>myMasterPage myMa...
asp.net
[9]
6,004,334
6,004,335
PHP code Output
<p>I was studying for my finals and I came across this question: </p> <blockquote> <p>write the output after running this code.</p> </blockquote> <pre><code>&lt;?php function swap($x, $y) { $x = $x + 1; $y = $y + 2; return $x * $y; } $a = 3; $b = swap($a, $a); print "$a, $b"; $b = swap(&amp;$a, &amp;$a); pr...
php
[2]
4,176,479
4,176,480
Button Works Only for One Time
<pre><code>$("#button_title_delete").click(function(){ jQuery.ajax({type:'POST', url:'delete.php', data: 'id='+$("bid").val(), success: function(veri) { $("#delete_result").html(veri);} }); }); </code></pre> <p>When i click the button with "button_title_delete" id...
jquery
[5]
3,337,128
3,337,129
How to make numbers not repeated in a random number generated app in C++?
<p>I have an app that will display Lotto Max numbers, I need to make my app generate random numbers but I need the numbers to not repeat. I have my code done and would like to change a little as possible. But any help would be awesome!</p> <pre><code> #include &lt;iostream&gt; #include &lt;iomanip&gt; #inc...
c++
[6]
4,408,953
4,408,954
Two identical strings, yet different lengths. Trimmed, cleansed, etc
<p>I have two strings, one is generated by PHP and stored in a database at 128 characters. The generated string is e-mailed to the user and they must input the string.</p> <p>Now for some reason, the one from the user (with me testing), is 132 characters long through <code>var_dump</code>. When I <code>echo</code> the...
php
[2]
4,672,152
4,672,153
Android Service With Notification
<p>I have one android application in i have to create a service that run 24 hours a day it also use xml parsing based on that data it gives notification on the particular time?</p> <p>How can I do this?</p>
android
[4]
255,971
255,972
Javascript expression to define object's property name?
<p>I'd like to create this object...</p> <pre><code>object = { 'object[1][var_name_1]' : 'value1', 'object[1][var_name_2]' : 'value2', }; </code></pre> <p>I'm trying to it this way, but I'm getting error <strong>missing : after property id</strong>...</p> <pre><code>function getPrefix() { return 'object[1]'; }...
javascript
[3]
2,893,364
2,893,365
In Main function, after a try block throws an exception how can I make it keep on execute the next try block
<p>In Main function, after a try_block throws an exception the function is supposed to be break. My question is how can I make it keep on executing to the next try_block. Below I'm giving an example: </p> <pre><code>public static void main(String [] s){ ABC aBC = new ABC(); try { aBC.execute(); } ...
java
[1]
727,808
727,809
show/hide div using scrollTop
<p>I'm trying to create a script which would show div if 500px &lt; scrollTop &lt; 800px otherwise it would be hidden. So if my scroll is from 0 to 500 and from 800 and more it is hidden and between 500 and 800 it is shown. I'm new to javascript but this is what I have tried:</p> <pre><code>$(document).ready(function...
javascript
[3]
1,502,378
1,502,379
How to create string "Version 1.0" in C#
<p>I have to store versionName of a template. VersionName is autoincremented.If last versionName is "Version 1.0", next should be "version 2.0". First time when a template is created, I have to store "Version 1.0".</p> <p>I am using </p> <pre><code>VersionName = "Version "+((LatestVersion+1).ToString()) </code></pre>...
c#
[0]
3,655,845
3,655,846
ASP.NET: Could anyone provide some C# paging codes in Repeater or ListView controls for me to learn
<p>ASP.NET: Could anyone provide some C# paging codes in Repeater or ListView controls for me to learn. </p>
asp.net
[9]
271,443
271,444
Is text in code char or const char?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3303411/string-literals-vs-const-char-in-c">String literals vs const char* in C</a> </p> </blockquote> <p>Why i can do this?</p> <pre><code>void foo(char * cstr) { ... } </code></pre> <p>and in code</p> <...
c++
[6]
22,046
22,047
Jquery select class inside parent class
<p>I'm trying to select a class inside the same parent class of a link.</p> <p>This is the html:</p> <pre><code>&lt;div id="productList"&gt; &lt;ul&gt; &lt;li class="productListItem"&gt; Product 1 &lt;span class="smallText"&gt;stuff&lt;/span&gt; &lt;div class="skuFi...
jquery
[5]
3,612,877
3,612,878
Is it bad practice to create new objects without storing them?
<p>I've seen objects created in Java code without storing a reference to the object. For example, in an eclipse plugin I've seen a SWT Shell created like so:</p> <pre><code>new Shell(); </code></pre> <p>This new Shell object is not stored in a variable, but will remain referenced until the window is disposed which [...
java
[1]
4,115,310
4,115,311
What tools and/or libraries should I use to make an animated book
<p>I want to make a book rather like The Pedlar Lady for iPad. Each page has some rich text, and then an animation with sound effects that runs automatically after the user flips to a new page.</p> <p>I have some idea how I could do that programmatically - Cocos2D is looking pretty useful - but what I don't know is ho...
iphone
[8]
5,729,832
5,729,833
Custom menu in android
<p>Is it possible to create a menu of this type in android?</p> <p><img src="http://i.stack.imgur.com/OJDGN.jpg" alt="is it possible to create amenu of this type in android.?"></p>
android
[4]
2,312,723
2,312,724
Reading a file relative to an included file
<p>I need to load some text (shader code) from a file that is placed next to my library file. This way, I can <code>#include TextureBloomer.h</code> in several projects, and TextureBloomer will take care of loading its shader without needing to set paths through configuration or environment variables. The directory hie...
c++
[6]
2,072,737
2,072,738
PHP or PHPUnit. Select a random option from drop down excluding selected one
<p>If my drop down has 10 options to select from, and option 4 is selected, how can I write the code to select an option from 1-10 exluding 4?</p> <p>I know rand(1, 10) picks a random number from 1 to 10, but it sometimes can land on 4. How can I make sure that it doesn't pick the number 4, or any number that is alrea...
php
[2]
2,643,079
2,643,080
Why should some methods be invoked only from the main application thread?
<p>I read about <a href="http://developer.android.com/reference/android/speech/SpeechRecognizer.html" rel="nofollow">this class</a>:</p> <blockquote> <p>Do not instantiate this class directly, instead, call createSpeechRecognizer(Context). This class's methods must be invoked only from the main application threa...
android
[4]
1,429,376
1,429,377
Compress If Conditions
<p>Is there such a way to compress a block of conditions in an <code>if</code> statement? As you can see from the code, <code>itemKey</code> is a variable. I set the first letter to be lowercased so I can match it to another variable <code>letter</code>. The below works perfectly, but I would like to clean it up. Can ...
javascript
[3]
1,111,572
1,111,573
how to implement water animation in iphone(ripple animation)?
<p>I have implement one game application .In that game i want to implement wateer animation.PLease give me idea about that.</p> <p>same like:http://www.heikobehrens.net/2009/10/02/burlington-ducky-iphone-app/</p>
iphone
[8]
1,624,715
1,624,716
creating excel, powerpoint and documents in asp.net and saving the files
<p>I have a dropdownlist in my application with items document, excel and powerpoint. When i click on each of them say for example excel, an excel sheet should open and I write in it and I should be able to save the file in gridview. How can I do that?</p>
c#
[0]
1,786,224
1,786,225
using eval in Java
<p>I am new to Java. I have a string like the following:</p> <pre><code> str="4*5"; </code></pre> <p>Now I have to get the result of 20 by using the string. I know in some other languages the eval function will do this. How do I do this in Java?</p>
java
[1]
403,913
403,914
cookies handling on webrequest and response
<p>I have created a application that has a function <code>mainpost</code>. It is created to post data on a https sites. Here I want to handle cookies in this function. How can I do this task?</p> <pre><code>public string Mainpost(string website, string content) { // this is what we are sending string post_data...
c#
[0]
5,562,738
5,562,739
How to crawl markup with PHP, check if images exists and replace non-existing paths?
<p>I have some markup which I need to crawl for images, and check if the images exists in the paths they have specified. If an image does not exists in location A, the path should be replaced with location B.</p> <p>I'm wondering what would be the most efficient way of achieving this?</p>
php
[2]
3,970,041
3,970,042
How to start an Activity from a Service?
<p>Is it possible to start an Activity from a Service? If yes, how can we achieve this?</p>
android
[4]
4,348,572
4,348,573
accessing functions or methods of the non .net dlls
<p>how to access the methods of non .net dll in .net in c#? which class is used to access the dll methods.</p>
c#
[0]
857,909
857,910
Training Naive-Bayesian Classifier using 4J classifier java library
<p>I need to categorize input queries on mobile platform sent by users as SMS into ten pre-defined categories such as sports, finance, health etc.</p> <p>How do I begin and then go about training Bayesian Classifier, i.e. how do I prepare a training document, how extensive should it be, are there any assured directive...
java
[1]
2,536,503
2,536,504
Jquery dropdown control with tags
<p>Does anyone know a good Jquery plugin control for dropdown list. A user should be able to select multiple values from dropdown list and those selected values should be displayed as tags in the same control.</p> <p>Please see the attached image for reference.<img src="http://i.stack.imgur.com/k6bDF.jpg" alt="enter i...
jquery
[5]
1,997,745
1,997,746
Effective IPhone programing techniques
<p>While creating an IPhone application I always care about techniques which greatly effect working of an application on one side <em>and</em> understanding of code on the other. For instance, I prefer creating <strong>Singleton</strong> to manage data, which separates <em>Data</em> from <em>View</em>. Similarly, use o...
iphone
[8]
1,819,556
1,819,557
stack trace when debug on android device
<p>when I debug my android app using emulator, the stacktraces and error messages are shown in Eclipse's Logcat.<br> However, when I debug on my physical android device, when app crashes there is no stacktrace shown in eclipse. Is there anything i need to configurate in order to get stacktrace when debugging on physic...
android
[4]
4,716,669
4,716,670
how to restore contacts from vcf file with my own code
<p>I am abel to take backup of all the phone contacts into a vcf file by writing my own code. but how to restore contacts from a vcf file to the android phone with my own code. is there any way to not to use the android activity.</p>
android
[4]
4,515,037
4,515,038
convert byte[] to AES key
<p>i have a AESkey which encrypted by a public key, and later decrypted by a private key</p> <pre><code> Cipher cipher = Cipher.getInstance("RSA"); PrivateKey privateKey = keyPair.getPrivate(); // decrypt the ciphertext using the private key cipher.init(Cipher.DECRYPT_MODE, privateKey); byte[] dec...
java
[1]
5,795,065
5,795,066
Exception in checkAndLoadTargetData.Java heap space
<p>I tried increasing the heap size of JVM. But still no luck. I am getting this error when I open the eclipse and when Android SDk is getting loaded. Please help me regarding this.</p>
android
[4]
1,323,869
1,323,870
Elegant solution to retrieve custom date and time?
<p>I am currently using a date and time picker to retrieve a user-submitted date and time, and then I set a control's text to the date and time selected. </p> <p>I am using the following code:</p> <pre><code>new DatePickerDialog(newlog3.this, d, calDT.get(Calendar.YEAR), calDT.get(Calendar.MONTH), calDT.get(Calendar....
android
[4]
724,043
724,044
must press enter key twice to do the work
<p>I have a problem with the enter key in android, I have an edittext where I enter a value and then when I click on enter, I want it to make something. My problem is that I have to press enter twice to get the desired results.</p> <pre><code> editText1.setOnKeyListener(new OnKeyListener() { public boolean ...
android
[4]
3,089,378
3,089,379
Count lower case characters in a string
<p>What is the most pythonic and/or efficient way to count the number of characters in a string that are lowercase?</p> <p>Here's the first thing that came to mind:</p> <pre><code>def n_lower_chars(string): return sum([int(c.islower()) for c in string]) </code></pre>
python
[7]
624,158
624,159
Dynamic drop down list!
<p>I have edited the question as what I said before was two pieces of code together.</p> <p>I have the following code:</p> <pre><code> $f = "SELECT * FROM ".TBL_FIXTURES." WHERE compname = '$_POST[league]' AND home_user = '$_SESSION[username]' ORDER BY away_user"; $fixtures = mysql_query($f); ?&gt; ...
php
[2]
443,639
443,640
Exposing class types directly through another class
<p>I have a class called Config with the declaration <code>public class Config&lt;T&gt; where T : class, new()</code></p> <p>It contains some methods to save a configuration of type <code>T</code> as well as the actual configuration in property called <code>Configuration</code>.</p> <p>Is it possible to expose the co...
c#
[0]
1,163,305
1,163,306
Getting assembly error
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4693185/how-to-add-microsoft-visualstudio-teamsystem-data-unittesting-reference">How to add ‘Microsoft.VisualStudio.TeamSystem.Data.UnitTesting’ reference</a> </p> </blockquote> <p>I am getting an error in visua...
asp.net
[9]
4,086,878
4,086,879
Javascript two equals
<p>Trying to deepen my knowledge of JS, can someone tell me what this does/is please?</p> <pre><code>jQuery = $ = this.jQuery; </code></pre> <p>What exactly does two equal signs do here?</p>
javascript
[3]
589,425
589,426
problem of CGContext
<p>i want to draw a line in the rect of UIView when i touch screen. please can someone help me to check the code ! thanks </p> <pre><code>- (void)drawRect:(CGRect)rect { } - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLi...
iphone
[8]
5,305,421
5,305,422
Will not update the ID for a link on click
<p>I have this function to create a request to another file to update the database:</p> <pre><code>$('#thumb-up').live('click', function() { $('#loading').show(); $.ajax({ context: this, type: 'GET', url: '/gallery/configurations/required/photo-thumbs.php', data...
jquery
[5]
3,308,788
3,308,789
Could not find lvl License.apk
<p>I am getting this error message when I try to run my app that has the lvl installed as a library.</p> <p>I followed the steps outlined on the developer.android.com site for installing the lvl library:</p> <p>I copied the "market_licensing" folder into my project folder,</p> <p>I created a new library called "Lice...
android
[4]
1,146,142
1,146,143
Javascript/HTML, is it possible to create variable names from a loop
<p>Imagine i had: <code>&lt;div id names&gt;142,140,150&lt;/names&gt;</code></p> <p>could i then (in Javascript) write a forloop which declares variable names, with these values appended ie</p> <pre><code>var list = document.getElementById('names').innerHTML.Split(','); for(i=0; i&lt;list.Length; i++){ var 'begi...
javascript
[3]
1,637,314
1,637,315
responding to wifi availability
<p>how exactly should I configure my broadcast receiver to make my app respond to changes in the wifi availability. I do not really care about reacting to it when the app is not running though.</p> <p>What I am trying to accomplish here is that as the app is running I need to keep the local DB in synch with a copy on ...
android
[4]
4,424,099
4,424,100
python super question
<p>I have a syntax question about python's super() and multiple inheritance. Say I have class A and B, both of which have a method hello(). I have a class C that inherits from both A and B, in that order. </p> <p>How do I call the hello() method of B explicitly from C? Seems simple enough, but I can't seem to find the...
python
[7]
2,178,065
2,178,066
Javascript keeps undefining my vars, it's harshing my buzz. Help?
<p>This is my first experience with javascript, and... Well... Ugh. Here's what's happening:</p> <pre><code>function step_1(id) { //blah blah step_2(id); } function step_2(id) { //blah blah step_3(id); } function step_3(id) { //blah blah alert(id); } step_1(0); // I can stick any number here, ...
javascript
[3]
3,453,646
3,453,647
Execute some functions without submit and then submit
<p>I have two inputs the must be validate on submit. I'm trying this:</p> <pre><code>$("#phase1_form").submit(function(e){ var result1 = $("#phase1_responsVibleByFirstSignOff").isValid(); var result2 = $("#phase1_responsibleBySecondSignOff").isValid(); if ((result1 &amp;&amp; result2 )) { ...
jquery
[5]
133,659
133,660
Problems parsing a xml file
<p>I am editing a xml file that is originally like that:</p> <pre><code> &lt;SequencerLoopCommand id="1073" IterationCount="2" CommandList="1241 1242" Name="Loop Stream IDU64ToIDU63"&gt; &lt;IterateLoadSizeCommand id="1241" LoadType="STEP" LoadUnits="KILOBITS_PER_SECOND" ...
python
[7]
3,085,542
3,085,543
Why must I wrap a number to call its methods?
<pre><code>js&gt; (5).toString(2) 101 js&gt; 5.toString(2) js: "&lt;stdin&gt;", line 53: missing ; before statement js: 5.toString(2) js: ..........^ js&gt; </code></pre>
javascript
[3]
5,643,267
5,643,268
Comparing two lists and "looking back"
<p>How would you approach comparing two lists and "looking back"?</p> <p>I'm comparing the elements of two lists like this:</p> <pre><code>score = 0 for (x,y) in zip(seqA,seqB): if x == y: score = score +1 if x !=y : score = score - 1 </code></pre> <p>Now I would like <code>score + 3</code>...
python
[7]