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
3,899,208
3,899,209
textview get overide by image from gallery
<p>I am trying to place text view on image view of particular size, but when i load the image from photo gallery my text view get over written and I am not able to write upon it . I guess, when I create a rectangle frame for bi then image from gallery get override to text view. what should I do?</p> <p>answer: this is...
iphone
[8]
5,420,219
5,420,220
Auto-generate class hierarchy and code structure in Eclipse
<p>How can I auto-generate class hierarchy diagrams and documentation from function/class headers in eclipse.</p>
java
[1]
2,672,579
2,672,580
checking if ace exists and if points >21
<p>In my blackjack program i have:</p> <pre><code>Card c = dealCard(deck); //deals the card updatePoints(players[i], c); // calls updatePoints below. </code></pre> <p>The updatePoints function looks like this:</p> <pre><code>public static void updatePoints(Player player, Card c){ int point = c.getValue();...
java
[1]
5,203,644
5,203,645
Connecting ASP.net with Access 2007
<p>Hi im a beginner and i want to know how to connect asp.net with access 2007. i need to add, update and delete data in a data grid. can you please help me out? im new and i need full instructions to do it. its really urgent... can you please provide me the complete steps to do this?</p>
asp.net
[9]
407,022
407,023
passing filename as arguments in c++
<p>I have to pass four different text files in an argument in c++ program. How do i pass??</p>
c++
[6]
611,033
611,034
How I can join compiled jasper file and my project in java?
<p>I have design my project in iReport and I have compiled successfully. Now I want to add the compiled jasper file to add in my java project. May any one help me?</p>
java
[1]
2,954,933
2,954,934
set the size of the tooltip dialog box depending on the text
<p>How do i set the size of the tooltip dialog box. the tooltip text must be displayed in one line rather than wrapping the text to other line.</p> <p>in firefox and IE7 tooltip text is showed in one line but in IE8 the tooltip text is wrapped . i.e text is displayed in 2 lines.</p> <p>asp:Image runat="server" ID="iU...
asp.net
[9]
3,892,986
3,892,987
Finding Controls In A Data-Bound Template
<p>I'd like to find out if a certain type of control exists on a page. It's easy enough to iterate through the Controls collection recursively but I'd also like to check on first load whether the control exists in any of the templates (ContentTemplate, EditItemTemplate, ItemTemplate, SelectedItemTemplate etc) containe...
asp.net
[9]
169,312
169,313
Javascript variables inherited by functions
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5555464/javascript-closure-of-loop">Javascript: closure of loop?</a> </p> </blockquote> <p>Pseudo javascript:</p> <pre><code>for (i, i&lt;10, i++) { new element.addEvent('click', function(){ alert(i) }).injec...
javascript
[3]
2,751,304
2,751,305
Android: odd behaviour on Galaxy Nexus S device, v 2.3.6
<p>So a bit of background: this device has a ton of apps and services running simultaneously. On this particular app I'm developing, sometimes odd things happen. Like I try creating a "game card" and select an image for the card from the gallery. Sometimes, when the image is pasted, the other attributes of the card go ...
android
[4]
1,582,848
1,582,849
Zoom some portion of UIImage to fill the entire screen iPhone
<p>What I want to do is to zoom some portion of the image into the entire screen.</p> <p>To accomplish that I have a UIImage on UIImageView, which in turn is a subview of UIScrollView. However if I use zoomToRect and specify the rect of the image portion I want to zoom, the portion is zoomed until one of its bounds re...
iphone
[8]
2,450,237
2,450,238
jquery when click on link, move position to textarea
<p>Whenever you press comment on facebook, u can see the page move to textarea in comment box.</p> <p>how do i achieve that? focus? any example?</p>
jquery
[5]
4,980,232
4,980,233
android - overriding the back button
<p>I have a <code>webView</code> inside an Activity's layout. If back button is pressed, I want that view to disappear and other views to become visible, to I did the following:</p> <pre><code> @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK &amp;&amp; web....
android
[4]
3,655,029
3,655,030
How to change the text of an alert message with JQuery icon
<p>I like to change the text of an alert message with JQuery. My code looks like:</p> <pre><code>&lt;p&gt;&lt;span id="tips" class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"&gt;&lt;/span&gt;&lt;/p&gt; var tips = translate("Verwijder") + " " + $('#oms' + uploadId).text() + "?"; $('#tips').text(ti...
jquery
[5]
5,967,500
5,967,501
Android:notification problem
<p>I have an application that will clear the missed calls displayed on the status bar. I can clear it but when you restart the phone, the missed calls on the status bar is still there? How can I permanently remove it using my app?</p>
android
[4]
1,666,231
1,666,232
AlertDialog.Builder is undefined
<p>Thought I had it working but I get another error! I'm still new to Android and can't seem to fix this issue no matter what. I know it's to do with using "new Builder(this);". However I don't know what else to use, any help would be appreciated!</p> <pre><code>changeDay.setOnClickListener(new OnClickListener(){ ...
android
[4]
3,004,097
3,004,098
how to make a separated copy of an ArrayList
<blockquote> <p><strong>Possible Duplicate:</strong><br /> <a href="http://stackoverflow.com/questions/715650/java-how-to-clone-arraylist-but-also-clone-its-items">Java: how to clone ArrayList but also clone its items?</a> </p> </blockquote> <p>I have a sample program like the following:</p> <p>ArrayList orginal...
java
[1]
2,980,515
2,980,516
AttributeError: 'DateTemplates' object has no attribute '_to_date'
<p>The code posted <a href="https://github.com/ceradon/cerabot-rewrite/blob/master/cerabot/tasks/date_templates.py" rel="nofollow">here</a>, I tried to compile the program but everytime I do it goves me this traceback:</p> <pre> Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 162, in _run...
python
[7]
3,254,439
3,254,440
Understanding re.search in Python
<p>I am trying to allow users to Enter alphanumerics,underscores and spaces for a name. I've been using <code>if not re.search(r'^[\w-]+$', name):</code> to check if the name has anything other than alphanumerics,underscores and spaces. But here I can just enter one word, not multiple. What am I doing wrong?</p>
python
[7]
4,857,510
4,857,511
How do I plot a STOCK historical graph in android app?
<p>I wanted to plot a stock historical graph based on google finance in my android app . The problem is I can't find the api for just the stock chart alone and I must try to find another ways to do it.</p> <p>I thought of a way but don't know what whether it works</p> <p>the steps are as follows.. 1) get the details ...
android
[4]
2,541,093
2,541,094
Development on sony xperia neo v
<p>I started android development.I have always made ​​use of emulators and eclipse. Because I'm doing more and more developing, I consider a device to buy.</p> <p>I already have tested applications on the HTC Desire and google nexus s.</p> <p>I want to buy a <code>sony ericson xperio neo v</code>, but do not know if ...
android
[4]
530,386
530,387
raising exceptions issue
<p>here is my code:</p> <pre><code>class longInputException(Exception): def __init__(self, length, max): Exception.__init__(self) self.length = len(length) self.max = max try: max = 3 s = raw_input('Enter something--&gt;') if len(s) &gt; max: raise longInputException(s,...
python
[7]
5,848,209
5,848,210
Get Selected HTML in browser via Javascript
<p>I have a requirement for my web app to allow the user to "Print Selected Only". In other words, a user selects text and potentially images and then clicks this option. I've seen examples of getting selected text with Javascript, but haven't found a solution for getting the selected html itself. </p> <p>As an exampl...
javascript
[3]
3,579,794
3,579,795
Language split to minimize .apk file
<p>I'm creating an app with 3 different languages. Every language contains a separate audio file (8 mb each). Is it possible to split/export the project to 3 different .apk files prior to release on Market? I really do not want to put everything in one .apk due to the 24+ mb file size.</p>
android
[4]
5,646,989
5,646,990
How to display previous day and next day dates in html using Javascript
<p>I am working on some simple Javascript to display the current date with previous and next date links.</p> <p>my code snippet as follows</p> <pre><code>&lt;script type="text/javascript"&gt; var currentTime = new Date(); var month = currentTime.getMonth()+1; var day = currentTime.getDate(); var year = currentTime.g...
javascript
[3]
5,135,291
5,135,292
onPrepareOptionsMenu android app
<p>I am trying to use the onPrepareOptionsMenu and when I press the menu, it does nothing!! Where am I going wrong?</p> <p>Also, am I using the finish (); command right? When the user presses exit(menuX) I want them to exit the application completely, not the activity.</p> <p>Thanks! :)</p> <pre><code>public boolean...
android
[4]
3,684,769
3,684,770
dir() function in commandline vs IDLE
<p>I've tried running the following code in IDLE:</p> <pre><code>import sys dir(sys) </code></pre> <p>There is no result:</p> <pre><code>&gt;&gt;&gt; </code></pre> <p>But when I run it in the command line, i get this:</p> <pre><code>&gt;&gt;&gt; dir(sys) ['__displayhook__', '__doc__', '__excepthook__', '__name__',...
python
[7]
5,820,330
5,820,331
Facial Expression recognition
<p>I want to do project on Facial Expression Recognition.It will be to detect the expressions of a person using neural networks e.g happy,sad etc.Is it possible in java?? </p>
java
[1]
4,468,938
4,468,939
Why should I not instantiate a string object with a constructor?
<p>In Java, apparently, <code>String s = "foo"</code> is preferred over <code>String s = new String("foo")</code>.</p> <p>Why? Isn't a new string object created in both cases? Why would the first case preclude calling a constructor?</p>
java
[1]
5,667,960
5,667,961
Sending Variable from one function to another php function
<p>I am trying to send a variable from a public function to a private static function as follows:</p> <pre><code>public function getAirportFare($fare) { $fare2 = 1000; return self::getFinalFare($fare, $fare2); } </code></pre> <p>TO:</p> <pre><code>private static function getFinalFare($fare, $fare2) { ...
php
[2]
217,250
217,251
Compile Error: illegal start of expression
<p>I'm learning Java (The Gaming Side). I bought a book and it has some code in which I tried to copy and test it. The only problem is that it comes up with errors when I try to compile it.</p> <pre><code>C:\Users\James\Desktop\Java&gt;Javac GamePanel.java GamePanel.java:57: ill...
java
[1]
1,124,394
1,124,395
string inside array, quotes or no quotes
<p>When i assign a key value into an array of type string, does it have to be in quotes?</p> <pre><code>define('ALBUM_COVER_50', '../discography/artwork/cover/50/'); define('ALBUM_COVER_ZOOM', '../discography/artwork/cover/800/'); $selected_artwork = array(); $cover = 'greatesthits_cs23409.jpg'; $selected_artwork[AL...
php
[2]
1,944,339
1,944,340
Problem with Synchronization
<p>I have the following sample piece of code,</p> <pre><code>public class test implements Runnable{ public void run() { synchronized(this) { for(int i=0;i&lt;10000;i++) System.out.println(i); } } public static void main(String args[]) throws Exception { Thread t=new Threa...
java
[1]
2,674,513
2,674,514
Javascript syntactic sugar for object value setter
<p>Is there an easy way to do this in one line</p> <pre><code>( node.innerText || node.textContent ) = text // node = DOM node // text = string </code></pre> <p>Obviously the above does not work. </p>
javascript
[3]
4,278,675
4,278,676
Using issue, why do I have to use using global::MyName.SubName?
<p>I have a library project in my solution that I just added, and whenever I need to reference a class/enum I have to use:</p> <p><code>using global::MyName.SubName;</code></p> <p>(Resharper automatically suggests this)</p> <p>Why is this? Why can't I just do:</p> <pre><code>using MyName.SubName; </code></pre> <p...
c#
[0]
4,426,029
4,426,030
Is there a way find to find out if a software keyboard is shown?
<p>My actual <code>UITextField</code> control is embedded many layers down in an external library. Therefore I am unable to detect if it is being edited by calling </p> <p><code>control isFirstResponder</code>. </p> <p>Is there another way to detect if the software keyboard is shown?</p>
iphone
[8]
4,127,177
4,127,178
Function only works with jquery 1.1.2 anyone know why?
<p>hey guys, I am starting to get frustrated. I have a function I am using to fade a comment in after it is inserted. It works only with jquery 1.1.2 however, so none of the other functions on my page will work. If I try to use it with a newer version, comments will not show up since display is set to none in css so th...
jquery
[5]
1,557,161
1,557,162
ASP.NET Grid View Problem
<p>I have one gridview where I am passing the command argument as gridview row id for the Button I created for every row.</p> <p>I want to display all the details of that row in the textbox according to the Row clicked.</p> <pre><code>&lt;asp:GridView ID="gvCategory" runat="server" AutoGenerateColumns="false" ...
asp.net
[9]
2,580,642
2,580,643
jquery - select the next item of this in each() function
<p>I want to select the next element of this in each() function. check out the code comments</p> <pre><code>$(function(){ var selects = $('body').find('span'); selects.each(function(index,el){ if(index==0){ //remove the next span of this, which is span2 } }); }); &lt;bo...
jquery
[5]
5,061,667
5,061,668
Can't delete a file
<p>A have such a problem: there are some RandomAccessFiles which are opened through the algorithm. The function they are used in is recursive. SO I can't close them (if I do, I will crash the algorithm). Are there any way to close them (to delete afterwards)? </p>
java
[1]
2,800,471
2,800,472
Base64 encode uploaded file then save in database
<p>I want to base 64 encode uploaded file then save this into Blob type column of a table in MySQL database.</p> <p>I have tried built in PHP function base64_encode with file variable but this does not seem to work.</p> <p>Is there a way we can do this?</p> <p>The reason is that I do not want to use moveuploaded fil...
php
[2]
380,377
380,378
What is "Integer.valueOf().intValue()" supposed to do?
<p>Here is a java line of code that i have failed to understand. </p> <pre><code> String line = "Some data";//I understand this line int size;//I understand this line too size = Integer.valueOf(line,16).intValue();//Don't understand this one </code></pre> <p>What i know is <strong>Integer.ValueOf(line</strong>) is...
java
[1]
2,580,028
2,580,029
Android textview gravity center
<p>I have this layout:</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#222222" android:gravity="center_horizontal" android:layo...
android
[4]
3,729,779
3,729,780
bind mouse event with fading
<p>I am using the following code to fade between images in my menu items on mouseover...</p> <pre><code> $(document).ready(function() { $('nav li').each(function() { var bgPos = $(this).css('background-position'); $(this).css('background-position', bgPos); $(this).removeAttr('id');...
jquery
[5]
1,791,431
1,791,432
TimeStamp Standard PHP
<p>I am working on creating a log file where log details including timestamp should be written to the log file. But is there any standard timestamp function which I can use in the php code which does not show any sort of errors like "You cannot rely on SYstem's timezone' etc . Thanks</p>
php
[2]
2,580,205
2,580,206
find caller script path from a library
<p>When execution a script that includes a library, I whant to find from whithin the library the caller script, in Perl I'm using env: <code>$0</code> that gives me the path to the caller script. In PHP <code>__FILE__</code> gives me the current script, so in the library it gives me the library path not the caller scri...
php
[2]
5,412,610
5,412,611
custom listview with popup problem in android
<p>my custom listvalues are coming from java bean I have popup inside custom list view with textview, check box and I have list view in activity if user select check box in popup I have to add checked value in list view can anybody tell how to do give example </p> <p>Thanks</p>
android
[4]
3,118,876
3,118,877
replace child at particular index of viewflipper android
<p>In my android application i am using view flipper for implementing pagination.<br> I am normally adding listviews as child for view flipper.If the user click on change view button this listviews should be deleted and replaced with gallery view. </p> <p>Please let me know as how can i delete child at particular ind...
android
[4]
2,846,133
2,846,134
output the result of a query of a database?
<p>Hello i got a problem with my mysql code it gives the following error upon trying to output:</p> <pre><code>Parse error: syntax error, unexpected $end in C:\xampplite\htdocs\learncent\acksearch\search.php on line 25 </code></pre> <p><br /></p> <pre><code>&lt;?php $db = new mysqli("localhost","root","","ackso...
php
[2]
2,031,385
2,031,386
Setting include path in PHP intermittently fails. Why?
<p>I have tried both </p> <pre><code>ini_set('include_path', '.:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes'); </code></pre> <p>in the code itself and also</p> <pre><code>php_value include_path ".:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes" </code></pre> <p>in the .htaccess file.</p> <p>Both met...
php
[2]
5,214,702
5,214,703
How can i add contact info to iphone app
<p>I have developed an iphone app. How can i add my developer email to the app? So that users can contact me? I dont see any option like android market where you can add your contact email so that if any users have questions they can contact you directly?</p>
iphone
[8]
2,225,813
2,225,814
Jquery - Read all Classes from a div
<p><br /> i try to read all classes.</p> <p><strong>HTML</strong></p> <pre><code>&lt;div id="test" class="fff aaa ccc" &gt;hello world&lt;/div&gt; </code></pre> <p><strong>JS</strong></p> <pre><code>if ($('#test').attr('class') != '') { // Read classes var all_classes = $('#test').attr('class'); // Outp...
jquery
[5]
5,976,929
5,976,930
Java: Converting data types
<p>I'm working with a <code>JTable</code>, whose cells data are contained in <code>Object</code>. One column shows a <code>float</code> number. I want to GET the value into a<code>float</code>, limit decimal places to 3, and then I want to reload the correct data in the cell, so I want to SET the value into the cell ag...
java
[1]
2,736,991
2,736,992
How to learn C++ for the purposes of debugging
<p>Some background: My job involves maintaining a large multi-threaded multi-process C++ / C# application, and so I'm often tasked with understanding access violations, memory leaks, heap curruption issues and the like.</p> <p>I quite enjoy this, and I've amassed quite a good understanding of various low level concept...
c++
[6]
3,951,581
3,951,582
Detect click on a specified area
<pre><code>&lt;div id="main"&gt; hello world &lt;div id="second-div"&gt; bye &lt;/div&gt; &lt;/div&gt; jQuery('#main:not(second-div)').click(function() { alert('works!'); }); </code></pre> <p>I want to detect mouse click on the "main" div, but the click event shouldn't trigger when I click on the "second-div" div. I'...
jquery
[5]
4,170,867
4,170,868
know of a good tutorial for posting status updates to facebook?
<p>I'm looking for a tutorial for updating Facebook status in PHP. Any suggestions?</p>
php
[2]
5,293,589
5,293,590
How do I remove this div from the dom?
<p>Using jQuery, how do I remove the #hello div below and just keep the <code>a</code> element within the outer div tags?</p> <p>I want to go from this:</p> <pre><code>&lt;div&gt; &lt;div id="hello"&gt; &lt;a href="http://google.com"&gt;&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>To this:</p> <pre...
jquery
[5]
1,243,050
1,243,051
android: radiobuttons aligned vertical and horizontal in same radiogroup
<p>I would like to have radiobuttons in one radiogroup divided into 2 columns and several rows. So far i have been able to divide them in a way that i put LinearLayouts inside radiogroup. Problem is they are not exclusive when I click on them (I can check all of them at the same time). Is there a way to make them exclu...
android
[4]
5,820,369
5,820,370
How to Convert image to NSData And that NSData To NSString
<p>Here is the code i am Trying </p> <pre><code>NSData *imageData = [[NSData alloc]initWithData:UIImagePNGRepresentation(myImage.image)]; imageClass.imageString = [[NSString alloc]initWithData:imageData encoding:NSUTF8StringEncoding]; NSLog(@"String is :%@",imageClass.imageString); // getting NULL </code></pr...
iphone
[8]
1,688,949
1,688,950
Getting started with python development?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/17988/how-to-learn-python">How to learn Python?</a> </p> </blockquote> <p>I'm looking for some good resources (books, tutorials, sites, etc) for getting started with Python development.</p> <p>Note, not <a href...
python
[7]
4,899,410
4,899,411
How to run two netbeans project on different systems
<p>I am working on a project on the topic implementation of parallel query processing features in PostgreSQL. As a part of my project i would like to connect two netbeans project on different systems and run them simultaneously. Can any one help me.</p>
java
[1]
1,381,471
1,381,472
Print out everything inside array in php
<p>can anyone explain why I can't see what's inside the array? I think it supposed to be able to have multiple numbers (subscriptions) so maybe that's why I'm having trouble? Here's the code. </p> <pre><code> $num = $_SESSION['subscription_ids']; if(is_array($num)) { print_r($num); } else { echo "not an arr...
php
[2]
1,791,711
1,791,712
Best way to reset keys which expires in few minutes in python
<p>I have to reset my key (something like session key) every two hours, which is going to expire after that. which is the best way to implement a reactivation feature in my code?</p> <p>there is no method available for me to check whether my key is still valid other than checking the status by performing some actions ...
python
[7]
2,551,283
2,551,284
User defined number ranges
<p>I have a function where for a specific number range a percentage has to be applied:</p> <ul> <li>0-100 EUR: 5%</li> <li>>100 EUR: 3%</li> </ul> <p>This number ranges and percentages should be <strong>user-defined</strong>.</p> <p>The implementation should be as simple as possible.</p> <p>What would you suggest f...
php
[2]
628,578
628,579
Library not found for -lclientrt
<p>I am trying to deploy Sample application(SUP101Sample) on iPhone device. I am using Sybase unwired platform 2.1 ESD #1.</p> <p>I tried to build the app on both simulator as well as in iOS device but in both the cases it is giving the common error </p> <blockquote> <p>library not found for -lclientrt</p> </block...
iphone
[8]
1,321,893
1,321,894
Add more than two variable into one variable in jquery
<p>Hi I am getting all the a tag attributes using jquery function, now I want to store them into one and append in body, but cant find the way how to get it done. Here is <a href="http://jsfiddle.net/cuyfK/" rel="nofollow">fiddle</a> link</p> <pre><code>&lt;head&gt; &lt;script type="text/javascript"&gt; $(function(){ ...
jquery
[5]
3,163,759
3,163,760
How to read Unsigned integer from binary file?
<p>How to read "Unsigned 8/16/24/32/64-bit integer" from binary file ? ( big-endian byte order ) unpack ? any examples ?</p>
python
[7]
3,879,805
3,879,806
How can I, in python, iterate over multiple 2d lists at once, cleanly?
<p>If I'm making a simple grid based game, for example, I might have a few 2d lists. One might be for terrain, another might be for objects, etc. Unfortunately, when I need to iterate over the lists and have the contents of a square in one list affect part of another list, I have to do something like this.</p> <pre><c...
python
[7]
3,863,167
3,863,168
Service exiting after last client unbinds, even though startService() called beforehand?
<p>I have an app that has a client Activity and a long-running Service. The Service may be started by the alarm manager or by the Activity itself. </p> <p>The alarm intent calls startService(). The Activity calls startService, and then binds itself to the service so it can get information from it.</p> <p>When I back-...
android
[4]
3,682,887
3,682,888
python, how to call function in as parameter in self.response.out.write()
<pre><code>class GuestBook(webapp.RequestHandler): def post(self): self.response.out.write( '&lt;h2&gt;You wrote:&lt;/h2&gt; %s' %self.request.get('content') ) </code></pre> <p>I want to pass this: <code>%self.request.get('content')</code> into a function. And use function return in the ...
python
[7]
1,718,825
1,718,826
Retrieve and Remove elements from string
<p>Say I have a list of string </p> <pre><code>List&lt;string&gt; lst=new List&lt;string&gt;(new string[]{"a","b","c","d"}); </code></pre> <p>I wish to get element from index 0 to index 2 assign it to another List lst1(i.e. the element of lst is <code>{"a","b"}</code>), then remove it from lst (i.e. lst becomes <co...
c#
[0]
150,703
150,704
How to round up a number
<p>I have variable like float num = (x/y); I need to round up the result whenever num gives result like 34.443. So how to do this in c#? </p>
c#
[0]
4,081,831
4,081,832
Count how many strings in an array have duplicates in the same array
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/8607455/array-value-count-javascript">Array value count javascript</a> </p> </blockquote> <p>I have an array which contains several duplicates, what I'm trying to achieve is to count how many duplicates each uni...
javascript
[3]
5,478,575
5,478,576
Which PHP function to use to read a binary file into a string?
<p>Which PHP function to use to read a binary file into a string?</p>
php
[2]
4,216,990
4,216,991
Are public accessors needed for an inner class, if only accessed from the outer class?
<p>Since i can access <code>private</code> variables of an inner class directly and ... the only way to access <code>inner</code> class is via the <code>outer</code> class .. <strong>is there any value in having public accessor/ mutator methods for an inner class?</strong></p> <pre><code>public class Outer { Inner...
java
[1]
2,920,150
2,920,151
Convert character value to hexa in java
<p>I have method to covert character to haxa like </p> <pre><code>private static String convert(char str) { StringBuffer ostr = new StringBuffer(); String hex = Integer.toHexString(str &amp; 0xFFFF); for(int j=0; j&lt;4-hex.length(); j++) ostr.append("0"); ostr.append...
java
[1]
2,798,755
2,798,756
How to add image Bitmap in the Gallery component?
<p>Is there any way to insert a bitmap image in the gallery component?</p>
android
[4]
22,709
22,710
Hiding divs dynamically using a search
<p>JSFiddle for what I have done so far <a href="http://jsfiddle.net/chQ2T/3/" rel="nofollow">http://jsfiddle.net/chQ2T/3/</a></p> <p>As you can see, I have some divs arranged thus</p> <p></p> <pre><code>&lt;div id = "container"&gt; &lt;div id = "abc" class = "box"&gt; ABC &lt;/div&gt; &l...
javascript
[3]
1,640,639
1,640,640
Java text highliting
<p>I did a code in java for file comparison. This compares two file contents and gives a result like : modified line and deleted lines and blank lines. I want them to highlight with different color. (Same as a file compare software does).</p> <p>Thanks in advance.</p> <p>Nitin</p>
java
[1]
3,978,638
3,978,639
CallLog.Calls Query By Date
<p>I am querying CallLog.Calls content provider for call details. Everything works fine except when I try to query by dates. That is, to get call details for a particular date or date range etc. I know the date are stored as long (millisecond format) so I tried to convert the date first and then query by it, but I must...
android
[4]
4,788,823
4,788,824
PHP if statement ELSE not working
<p>I am having an odd problem. This if statement is running as if the condition is being met.. It is not being met. I want the else statement to get executed but it won't. What am I doing wrong?</p> <pre><code>&lt;?php $count=2; if ($count=1) { echo "hello"; } else { echo "goodbye"; } ?&gt; </code></pre>
php
[2]
5,932,055
5,932,056
Function with return value char* returning garbage
<p>I'm trying to build a utility class that I can re-use, that converts a <code>std::string to a char*</code>:</p> <pre><code>char* Foo::stringConvert(std::string str){ std::string newstr = str; // Convert std::string to char* boost::scoped_array&lt;char&gt; writable(new char[newstr.size() + 1]); ...
c++
[6]
5,843,701
5,843,702
scattering effect
<p>I went through all my resources but I am not getting the scattering effect of an image smoothly. However, I am able to zoom it and I had scattered it but it is not as smooth as I want. I just want to click on a button and it should zoom and the other image should get scatter</p> <p>I want the image to be scattered ...
iphone
[8]
2,239,852
2,239,853
Generating a random turtle function in python
<p>I'm trying to write a function called randomTurtle():</p> <ul> <li>generate a random number between 0 and 100 (0 and 100 included) that will determine the total number of moves the turtle will make (in other words, how many times the turtle will loop through)</li> </ul> <p>Then For each repetition of the sequence)...
python
[7]
4,010,103
4,010,104
Android: Convert pdf to images
<p>i m receiving a <strong>pdf</strong> file from the server &amp; want to display it as images..</p> <p>So is der a way to convert this pdf file to Images?</p> <p><strong>UPDATE:</strong></p> <p>Can i do this thru <a href="http://developer.android.com/reference/android/provider/MediaStore.Files.html" rel="nofollow"...
android
[4]
32,997
32,998
Cannot update the project in android ndk
<p>I'm using linux and i have successfully installed ndk and configured it. with the help of <a href="http://developer.android.com/sdk/ndk/index.html" rel="nofollow">Android NDK installation</a> But i can't able to generate build.xml file</p> <pre><code>root@ndot-173:~/Desktop/NDK4/samples/bitmap-plasma# android updat...
android
[4]
5,235,363
5,235,364
Python - Prime Number exercise
<p>Note, this is not my homework assignment! I'm just trying to understand Python (and math, sadly) at the same time. I know the ultimate goal of this program is to get a list of prime numbers in the range 1 to 20, however, once it gets to the "for x in range..." line, I'm getting lost and the tutorial doesn't explain ...
python
[7]
5,604,294
5,604,295
string array in string.xml in Android
<p>I want to create a string array in string.xml in values folder for my android application. How to do this.. can anybody help..</p>
android
[4]
1,725,665
1,725,666
How to find first non-uppercase letter in the string using python
<p>I'm a python newbie but have programmed a while in other languages. I have a long string of DNA (lower case) and AA sequences (upper case). Further at the start of the file I have a protein name all in upper case. Thus my file looks like this.</p> <p>PROTEINNAMEatcgatcg... JFENVKDFDFLK</p> <p>I need to find the fi...
python
[7]
4,022,107
4,022,108
stream_context_get_params() in PHP 5.2.6
<p>could you help me please with this problem: </p> <p>i need to use this <strong>function stream_context_get_params()</strong> but it is available only from <strong>PHP 5.3</strong> or bigger. Our server is <strong>PHP 5.2.6</strong> and gives the following error: *Fatal error: Call to undefined function stream_conte...
php
[2]
2,955,862
2,955,863
jQuery - radio buttons that add/remove a class to their labels
<p>I know this may sound too easy for many but I just can't figure this one out on my own, I don't get what I'm missing.</p> <p>I have a set of radio buttons grouped in pairs. Each pair corresponds to an opt-in / opt-out section.</p> <p>What I need is to toggle a class <code>.active</code> on the <code>&lt;label&gt;<...
jquery
[5]
436,593
436,594
Can not unzip/decompress the file from assets in nexus
<p>Can not unzip/decompress the file from assets in nexus. But if the device is not a problem other than nexus. Just in nexus cannot unzip, approximately where the fault. below is the code:</p> <pre><code>try { final int BUFFER = 8192; ZipInputStream inputStream = new ZipInputStream(context .getAs...
android
[4]
2,773,153
2,773,154
List formation in python
<p>I need to put 3 items in the list.</p> <ol> <li>state..eg(1,2)</li> <li>action...eg..west</li> <li>cost....5</li> </ol> <p><code>list=[(state,action,cost), (state,action,cost).........]</code></p> <p>how can i make it in a form of list. For a particular state , action and cost is there. Moreover, if i need only s...
python
[7]
4,209,092
4,209,093
Randomize two arrays the same way, javascript
<p>I'm using javascript and trying to sync two arrays so that both arrays have the same index location.</p> <pre><code> var array1 = ["word1","word2","word3","word4","word5"]; var array2 = [1,2,3,4,5]; array2.sort(function(){ return Math.random() -.5}); </code></pre> <p>This scrambles array2 into somethin...
javascript
[3]
472,051
472,052
Detecting non-dictionary words in messages
<p>I need to check if the word is in the dictionary (correctly spelled) or not in dictionary (misspelled). Is there any bulit-in dictionary / spell checking function I can use to achieve this?</p>
android
[4]
4,525,917
4,525,918
Read li values and insert them in an array?
<p>I have a ul with id ul1. In the UL I have 3 li, each containing a textbox. How do I read each and every li of the ul to retrieve the values of the textbox in the li and put them in an array?</p>
jquery
[5]
5,897,264
5,897,265
newline question
<p>I want to detect a carriage return or a newline character when a user enters data into a textarea. What is the best way to handle this? I've tried str_replace with escape characters but carriage returns and newlines are not detected.</p> <hr> <p>OK, say I type the following into a textarea:</p> <pre><code>The sum...
php
[2]
3,958,182
3,958,183
jQuery: how to detect form by name
<p>I have problem to add jQuery to some existing code, please help.</p> <p>We have the same form (same form name, same fields, same submit button, no id or class defined for the form) appeared couple of times on a page, now I need to validation the form with jQuery, without passing in the form object, can jQuery tell ...
jquery
[5]
762,334
762,335
shorthand variable assignment
<p>In java I'm trying to use shorthand variable assignment like below. Currently <code>owner</code> is assigned on a different line but I'd like to put it on the same line as below. This isn't working - is it not possible or is there another route?</p> <pre><code> if ((User owner = search.getOwner()) instanceof U...
java
[1]
3,825,497
3,825,498
integrating 2 androids project into a third project
<p>I am having 2 android projects.Can anyone help in integrating both these project into a single one. Actually I am trying to operate both projects from a single page which contain an option in its user interface to run either of these projects(application).</p>
android
[4]