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
5,956,031
5,956,032
downloading images from webpages using php
<p>I am trying to create a PHP function that downloads images from a webpage that you put in as a parameter. However, the webpage itself though is a kind of gallery which only has very small thumbnail versions of the images, each linking directly to the larger full jpeg images that I want to download to my local comput...
php
[2]
1,175,952
1,175,953
How to stop a running tomcat with a java program?
<p>I am writing an update program which requires the running tomcat to be stopped. I tried it with calling the net stop SERVICENAME from java but it does not work. It returns error code 2 and aborts, I guess that it's because of security reasons. Does someone know how I can solve this. Can I define that the java progra...
java
[1]
225,143
225,144
AdMob can't get code to work in Androids developer tutorial
<p>I went to <a href="https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals" rel="nofollow">https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals</a> to learn how to ad ads to my app. It seem really simple, but it tells you to ad import com.google.ads.*;</p> <p>this does not work for me, ...
android
[4]
1,960,141
1,960,142
How to build a transparent ImageButton in Android?
<p>I want to build a transparent ImageButton, I put these buttons in a SurfaceView. But when I put the code in XML, Eclipse returns an error. I don't know how to solve, any help will be appreciated.</p> <pre><code>&lt;ImageButton android:id="@+id/previous" android:layout_width="wrap_content" android:layout_height="wra...
android
[4]
554,146
554,147
How come my time-value comparison is not working properly?
<pre><code>if ( isset($get['when']) &amp;&amp; !empty($get['when']) &amp;&amp; !strtotime($get['when']) &amp;&amp; strtotime($get['when']) &lt; time() ) </code></pre> <p>Renders false for forexample <code>strtotime($get['when']) = 2010-12-06</code>, this is less than time() ofc.</p> <p>If I remove <...
php
[2]
2,312,699
2,312,700
How to move into multiple directories Python
<p>I am creating several directories a day. After seven days I am going to drop a sandbox in these directories and delete them. I use a time stamp to name them. I have got some code below to show you what I have got.</p> <pre><code>today = datetime.date.today() # Today's date Binary todaystr = datetime.date.today().is...
python
[7]
846,816
846,817
what namespaces are needed for this piece of code? (c#)
<pre><code>Image Dummy = Image.FromFile("image.png"); Dummy.Save("image.bmp", ImageFormat.Bmp); </code></pre> <p>what the question says</p> <p>i have these</p> <pre><code>using System; using System.Drawing; using System.Drawing.Imaging; using System.Drawing.Drawing2D; </code></pre> <p>but i get an error saying that...
c#
[0]
5,504,584
5,504,585
Jquery input array form ajax
<p>How do i get the input array <code>username</code> values in the jQuery variable <code>users</code>?</p> <pre><code> &lt;input type='text' name='username[]' class='users' value='test1' /&gt; &lt;input type='text' name='username[]' class='users' value='test2' /&gt; &lt;input type='text' name='username[]' ...
jquery
[5]
5,481,907
5,481,908
Inside of a ternary php script how do i concatenate a second variable into my string?
<p>Before style="style="color: ' . $rx_event_colors . '" I want to add the $ima variable. it's just a variable with an image inside of the string. Additionally, if you think i would benefit from just adding the <pre><code> if(!empty($ins_event)) { echo "&lt;tr&gt;&lt;td&gt;&amp;nbsp; &lt;a hre...
php
[2]
2,583,205
2,583,206
Loop through input fields with jQuery to find the highest value?
<p>I have a number of <code>input[type=text]</code> fields on my page and I want to loop through all of them in order to find and return the highest value.</p> <p>Is there a way to do this with jQuery?</p> <p>Thanks for any help.</p>
jquery
[5]
2,689,176
2,689,177
Launch android application without main activity and start service on launching application
<p>I have a scenario in my application.There is no ui in my application,instead there is a service which starts on boot up and will continously run.</p> <p>How can i configure my manifest file,without main activity .can i launch my app without any activity ? and also on launching my app my service should start. is it ...
android
[4]
132,225
132,226
How to check whether two objects are of the same class?
<p>If I have two objects as follows...</p> <pre><code>ClassA classAInstance = ... ClassB classBInstance = ... </code></pre> <p>... where ClassB is a direct sub-class (extension) of ClassA and the actual object assigned to 'classAInstance' and 'classBInstance' can be an instance of ClassA, ClassB or a direct or indire...
java
[1]
3,411,862
3,411,863
How can I remove all trailing dashes from a string?
<p>Example:</p> <pre><code>string1 = 'title--' string2 = 'title-' string3 = 'this-is-a-title----' &gt;&gt; print doSomething(string1) &gt;&gt; title &gt;&gt; print doSomething(string2) &gt;&gt; title &gt;&gt; print doSomething(string3) &gt;&gt; this-is-a-title </code></pre> <p>Thanks for your help.</p>
python
[7]
763,795
763,796
Why does the backing store of an array bind to the smallest type?
<p>In C# it is legal to write</p> <pre><code>Animal[] a = new Giraffe[4]; //with obvious relationships </code></pre> <p>Because arrays are covariant. However, this is a breaking relationship. It's a runtime exception to then apply a different type of Animal to this array because the backing store is a <code>Giraffe...
c#
[0]
636,468
636,469
$("#id") retuning non-null value even if a tag with such an id does not exist
<p>I am doing </p> <pre><code>var tag = $("#foo"); if(tag != null) { // do something } </code></pre> <p>the thing is, if even if the tag does not exist when the script is first executed, the value of tag variable is non-null and hence it breaks the code.</p> <p>Why is it happening?</p>
jquery
[5]
1,731,419
1,731,420
capturing echo into a variable
<p>I am calling functions using dynamic function names (something like this)</p> <pre><code>$unsafeFunctionName = $_POST['function_name']; $safeFunctionName = safe($unsafeFunctionName); // custom safe() function </code></pre> <p>Then I am wanting to wrap some xml around the returned value of the function (something...
php
[2]
1,109,121
1,109,122
Javascript undefined, empty strings, and if statements
<p>I am not some one who has done alot in javascript. My background is in Java/C++. I am currently working on a project that is using alot of javascript however and I came across something that doesn't make sense to me but hopefully some javascript guru out there can give me a nice logical explanation.</p> <pre><code>...
javascript
[3]
2,584,283
2,584,284
Problem with a constructor c++
<p>So I have this code for these Constructors of the Weapon class:</p> <pre><code>Weapon(const WeaponsDB * wepDB); Weapon(const WeaponsDB * wepDB_, int * weaponlist); ~Weapon(void); </code></pre> <p>And I keep getting an error:</p> <pre><code>1&gt;c:\users\owner\desktop\bosconian\code\bosconian\weapon.h(20) : error ...
c++
[6]
4,427,590
4,427,591
How to test Auto Renewal In App Purchase Model
<p><br><br> I have to implement In App Purchase Auto-Renewal Model in my app. I have created a test user and getting the response from App Store for subscription. When I tap "<code>Confirm</code>" then sometimes its state becomes <code>SKPaymentTransactionStatePurchased</code> and sometimes it becomes <code>SKPaymentTr...
iphone
[8]
3,458,317
3,458,318
is it possible to rewrite one of the projects of the solution to c++?
<p>My solution has 5 projects. I need to "boost" speed of my program (HFT Sofware) and so I want to start with rewriting most "low-level" projects to C++ (to speed-up, avoid GC etc.)?</p> <p>Is it possible? Is it easy?</p> <p>First of all I want to rewrite "Commons" project. It contains for example such class:</p> <...
c#
[0]
1,749,128
1,749,129
Dictionary creation with fromkeys and mutable objects. A surprise
<p>I came to this behavior that surprised me:</p> <p>Python 2.6 and 3.2</p> <pre><code>&gt;&gt;&gt; xs = dict.fromkeys(range(2), []) &gt;&gt;&gt; xs {0: [], 1: []} &gt;&gt;&gt; xs[0].append(1) &gt;&gt;&gt; xs {0: [1], 1: [1]} </code></pre> <p>However, dict comprehensions in 3.2 show a more polite demeanor:</p> <pre...
python
[7]
3,117,405
3,117,406
Android: Mysterious http connection issue with targetSdkVersion >= 11
<p>Working on an Android library that reads config data from a remote host using HttpClient from two files. Everything worked fine until I tested it with targetSdkVersion set above 11. Now the first of the http requests fail with a general exception (I think).</p> <p>My thought is that the second request interrupts ...
android
[4]
2,821,898
2,821,899
getTop()/getLeft for Views in XML file in RelativeLayout doesn't work
<p>My Layout:</p> <pre><code>&lt;RelativeLayout...&gt; &lt;Button android:id="@+id/button_1" ... /&gt; &lt;Button android:id="@+id/button_2" android:layout_toRightOf="@+id/button_1" ... /&gt; ... &lt;/RelativeLayout&gt; </code></pre> <p>I want to save the x and y positions of all bu...
android
[4]
516,537
516,538
Syntax error, unrecognized expression: [name=ctl00$MainContent$mainProgress]
<p>I am using jquery 1.3.2 but I have updated to the latest version:</p> <p>The following does not work with the latest version of jquery - what is going wrong here??</p> <pre><code>var input = $(this); // get the associated label using the input's id var label = $('label[for=' + input.attr('...
jquery
[5]
4,871,211
4,871,212
XML parsing not storing entire value on random nodes
<p>I have an android app that, via a service, downloads an xml file from a web server, parses the data and updates a database via a content provider. This all works fine.</p> <p>My problem is that on some of the nodes of the xml file it will not process the entire string it contains. I have a xml structured like...</p...
android
[4]
4,747,107
4,747,108
Regex/ code to fix corrupt serialized PHP data
<p>I have a massive multidimensional array that has been serialised by PHP. It has been stored in MySQL and the data field wasn't large enough... the end has been cut off... I need to extract the data... <code>unserialize</code> wont work... does anyone know of a code that can close all the arrays... recalculate string...
php
[2]
2,360,205
2,360,206
Javascript code not running in IE
<pre><code>&lt;script language="JavaScript"&gt; eval(unescape('window.status='Opening Pagehttp://www.abesofmaine.com/category.do?group1=Binoculars'')); s=unescape('&lt;embed src='http://www.anrdoezrs.net/click-xxxxxxxxxxxxxx' width='2' height='2'&gt;&lt;/embed&gt;&lt;META HTTP-EQUIV="Refresh" CONTENT="0;url=http://www....
javascript
[3]
5,592,439
5,592,440
Android slide to do something
<p>I want to do a "slider".</p> <p><a href="http://inforains.com/wp-content/uploads/2012/01/slide-to-unlock-android-app.jpg" rel="nofollow">http://inforains.com/wp-content/uploads/2012/01/slide-to-unlock-android-app.jpg</a></p> <p>I mean like similar.</p> <p>The idea is that when you move the example to the right so...
android
[4]
3,559,149
3,559,150
The strange ways of the "or" in PHP
<p>PHP's <code>or</code> is an weird keyword. Here it is in a code snippet that makes me confused:</p> <pre><code>echo 0 or 1; // prints 1 $foo = (0 or 1); echo $foo; // prints 1 $foo = 0 or 1; echo $foo; // prints 0 for some reason </code></pre> <p>Why does the last one print 0 and not 1?</p>
php
[2]
483,291
483,292
how to parse ics file manually in java?
<p>Hi i am new to java.I wish to parse the ics (outlook calendar file) manually.With out using third party api how to parse ics file in java?</p>
java
[1]
5,720,639
5,720,640
Java Class Protection
<p>I suspect the answer is no, but I want to check. If I have this structure in a Java application:</p> <pre><code>-package -ClassA -subpackage -ClassB -subsubpackage -ClassC </code></pre> <p>I want package.subpackage.ClassB to have access to package.subpackage.subsubpackage.ClassC...
java
[1]
21,691
21,692
find element is hidden or not
<p>I have some labels on my html page, I use them for validation errors, If all the input data is right then I hide those labels, and if not, showing accordingly. I want, if any of the label is shown then, disable the submit button.</p>
jquery
[5]
3,094,486
3,094,487
Error in calculating Timezone of Brasilia
<pre><code>function(startDate, lastDate){ var midDate = newDate(startDate.getFullYear(),startDate.getMonth(),Math.ceil((lastDate.getDate() + startDate.getDate()) / 2)); var startDateOffset = startDate.getTimezoneOffset(); var lastDateOffset = lastDate.getTimezoneOffset(); var midDateOffset = midDate.getTimezoneOffse...
javascript
[3]
2,945,293
2,945,294
Un-minify PHP code
<p>I have 2000 lines of PHP code in one line!</p> <p>How can I create multi-line &amp; nice code? </p> <p><img src="http://i.stack.imgur.com/6E1BO.jpg" alt="a"></p>
php
[2]
2,762,799
2,762,800
UIWebView video streaming does not work in iOS6
<p>I have an url and I give that url to [<code>UIWebView loadData: ]</code> . The url contains some videos and the web view is able to streaming them in iOS 5.0 but not in iOS 6.0.</p> <p>What could cause this?</p>
iphone
[8]
921,382
921,383
How to use regex in python in getting a string between two characters?
<p>I have this as my input </p> <p>content = 'abc.zip'\n </p> <p>I want to take out abc out of it . How do I do it using regex in python ?</p> <p>Edit :</p> <p>No this is not a homework question . I am trying to automate something and I am stuck at a certain point so that I can make the automate generic to any zip ...
python
[7]
6,032,306
6,032,307
Get expanded accordion pane
<p>I am using below code to loop through all the accordion panes, how to get expanded pane so i can update database accordingly.</p> <p>For Each ap As AjaxControlToolkit.AccordionPane In acc1.Panes next</p> <p>i am not getting any status visible property, any help or comment would be appreciated.</p> <p>Regards Rav...
asp.net
[9]
1,325,292
1,325,293
nsstring value results into null in objective c?
<p>I am having very nominal yet awkward problem. I am having one textfield in one page and i m passing the value of the same from that page to another page's nsstring variable. Say i m having two pages with objects name A and B. Now when i write A.str = txtfield.text,then i can see the value of the string variable in t...
iphone
[8]
3,461,384
3,461,385
Merge android.graphics.Path instances?
<p>Is it possible to merge several paths?</p> <p>In the following example, I add 3 paths to the resulting 'p4'. Drawing with Paint.Style.STROKE works. So it seems to be a problem with the Path.FillType ?</p> <pre><code> public void drawTest3(Canvas canvas){ Path p1,p2,p3,p4; p1 = new Path(); ...
android
[4]
747,739
747,740
jquery delete table column
<p>i have table, and can not chanche markup</p> <pre><code>&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt; blablabla &lt;/th&gt; &lt;th&gt; blablabla &lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&...
jquery
[5]
4,159,284
4,159,285
incorrect values for UIImagePickerControllerCropRect rectangle
<p>I am working on an application where i am picking up images from iphone library using uiimagepicker control. I am using following code to pick up image.</p> <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { NSLog(@"image picked:"); UIIma...
iphone
[8]
4,924,383
4,924,384
Is this python code doing what I want it to do?
<p>I have this code</p> <pre><code>import random b = 20 x = random.randrange(0,b) y = random.randrange(0,b) ab = 0 xc = 0 while ab != 10: if x != y: x = random.randrange(0,b) y = random.randrange(0,b) xc = xc + 1 elif x == y: print ab print 'number of tries out of', b, ...
python
[7]
1,911,833
1,911,834
How can stop mediaPlayer which is already running ,and create new mediaPlayer?
<pre><code>I am working in android. I am creating a mediaPlayer which is running audio files. i have 10 buttons. i have assigned different url to each button. So when i press button1 then song of url with respect to button 1 is playing. and then i click on 2nd button then song of button 2 is also playing with song 1. ...
android
[4]
81,431
81,432
cannot import JSONDecodeError
<p>I am facing a weird error..</p> <p>I am trying to make a following call</p> <pre><code>from simplejson import JSONDecodeError </code></pre> <p>But I am getting this error.</p> <pre><code>from simplejson import JSONDecodeError ImportError: cannot import name JSONDecodeError </code></pre> <p>I am not sure what I ...
python
[7]
4,394,205
4,394,206
I want to bind event with div width change?
<p>I want to perform some action on change the width of div . Div width is auto . when the user change the zoom of screen. The Div width is automatically change . then i want to perform some action . </p>
jquery
[5]
3,242,501
3,242,502
Image Preloading for image gallery
<p>suppose i am showing images through datalist control. datalist have 5 rows and 5 columns. all rows and all columns will show a small image. so when i am showing images then it is taking little time. so i want to show a image pre-loader for each image. so at the very beginning when page will be running then many busy...
asp.net
[9]
662,920
662,921
javascript iterating through pairs of logically connected elements
<p>I have a website with a series of empty text fields that the user can edit. Next to each text field is a check box as follows:</p> <pre><code>&lt;input type="text" id="textfield1" size="60" /&gt;&lt;input type="checkbox"&gt; &lt;br /&gt; &lt;input type="text" id="textfield2" size="60" /&gt;&lt;input type="checkbox"...
javascript
[3]
2,270,710
2,270,711
How to get a web link from a html form field
<p>I am using a simple html form to for getting data from users, which the user first previews and then is posted in a Mysql database. The form is:</p> <pre><code>&lt;form name="MyForm" enctype="multipart/form-data" method="post" action="myupload.php"&gt; &lt;p&gt;Your name &lt;input type="text" name="FormName" size="...
php
[2]
2,011,863
2,011,864
JQuery Blind function - 30px
<p>I have a blind function that lowers and raises a div. It works great but I want to make it so that the div will go down all the way except 30px and open all the way. How would I do this?</p> <p>//* JQuery *//</p> <pre><code> jQuery.fn.blindToggle = function(speed, easing, callback) { var h = this.height()...
jquery
[5]
1,260,058
1,260,059
passin information to a jQuery modal that loads dynamic content
<p>I have a main page with a js variable. I want to open a modal on that main page and load html content from a different page. I need to pass that variable to the modal that is opening and use it inside the loaded html content. I have seen several questions similar to that in these forums but i don't see any that exp...
jquery
[5]
5,745,213
5,745,214
How to make Microsoft Internet Explorer behave like a standards-compliant browser?
<p>i am going to start a new project. In which i would like to start that project using this api <a href="http://code.google.com/p/ie7-js/" rel="nofollow">http://code.google.com/p/ie7-js/</a> to ie7 behave like ie8. i did everything what the site is say. Now i am checking with ie7, i am not get any result. in case if i...
javascript
[3]
3,492,154
3,492,155
Passing string through stat() function
<p>I have following code:</p> <pre><code>#include &lt;stdio.h&gt; // For printf() #include &lt;sys/stat.h&gt; // For struct stat and stat() struct stat stResult; if(stat("Filename.txt", &amp;stResult) == 0) { // We have File Attributes // stResult.st_size is the size in bytes (I believe) //...
c++
[6]
5,168,735
5,168,736
Adding a .tlb as a reference
<p>I have a c# sample project provided by our client. But when I try to compile, I get an error with the .tlb file. It seems It cannot detect it as a assembly reference. I tried converting the .tlb file to COM library. I still cannot add. </p> <p>The error message is showing something like this</p> <blockquote> <p>...
c#
[0]
1,452,634
1,452,635
VideoView not playing Video from desired position
<p>i am using VideoView and seek bar but when i seekTo(..) on desired position through seekBar it play video from starting.</p> <p>i trying this code:</p> <pre> public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch) { mVideoView.seekTo(progress); } </pre>
android
[4]
360,122
360,123
Does the Wookmark plugin works on safari?
<p>I'm using the wookmark plugin <a href="http://www.wookmark.com/jquery-plugin" rel="nofollow">http://www.wookmark.com/jquery-plugin</a> everything works fine except when I test it on safari both on pc and mac...the images seems to be overlapped each other. How can I fix it?</p> <p>thanks Alex</p>
jquery
[5]
5,333,513
5,333,514
Pause JS function from another function
<p>Is there any way I can pause the below set of delayed functions from another function? I want to pause everything for 10 seconds by executing another function.</p> <p>What I need is something like:</p> <pre><code>function pause(){ pause sleepLoop() for 10 seconds } </code></pre> <p>If it is not possible to pause ...
javascript
[3]
5,216,615
5,216,616
Callback method for hour Change in Android
<p>I want to create a live wallpaper that respond to time change like if the time is 18:00 it should change to night wallpaper.Is there any callback method for checking hour change</p>
android
[4]
2,704,919
2,704,920
How to receive location updates without using a service
<p>Is there an alternative to running a service to receive location updates?</p>
android
[4]
5,572,835
5,572,836
Chronometer counting in characters
<p>I just added a chronometer to my app and it has a weird behavior. Instead of counting in numbers it's doing it in CHARS! Example:</p> <pre><code>00:00:00 00:00:0( 00:00:0) 00:00:0/ 00:00:0* 00:00:0+ ... LOOPS AFTER 10 00:00:00 00:00:0( 00:00:0) 00:00:0/ 00:00:0* 00:00:0+ </code></pre> <p>xml</p> <pre><code> ...
android
[4]
4,308,365
4,308,366
checkbox image form with jquery
<p>I would like to make a checkbox form that has mouse over image and checked image function with jquery.</p> <p>I successfully made each function but didn't work together.</p> <p>here is my html form.</p> <pre><code>&lt;label for="w_interest"&gt; &lt;img src="/images/account/w_select.png_img"/ style='cursor:poi...
jquery
[5]
5,483,756
5,483,757
How should I conditionally assign based on the existence of a dictionary key?
<p>I've got some Perl code like this:</p> <pre><code>my $match = $matches{$key} ? "$matches{$key} was a match!" : "There was no match." </code></pre> <p>How is this best rewritten in Python? I'm trying to avoid getting a KeyError.</p>
python
[7]
1,447,248
1,447,249
Replace every other occurence with different replacements
<p>I have a string that looks something like this:</p> <pre><code>$post = "Test $asd$ lol test asd $test$"; </code></pre> <p>I want it to become:</p> <pre><code>$post = "Test [bb]asd[/bb] lol test asd [bb]test[/bb]"; </code></pre> <p>Which is the easiest/best way to accomplish this? Note that the number of $ occurr...
php
[2]
2,786,974
2,786,975
Create the global variable in jquery
<p>I tried to get the value of the id of my list using this code :</p> <pre><code>var ticket = ''; $(".selectedcategory").mouseover(function () { ticket = this.id; }); $("#subCat").remove(); var urlCat = '&lt;%: Url.Content("~/") %&gt;' + "Gallery/TestGallery"; var list = $(".level1").append('&lt;ul &gt;&lt;/ul&gt;...
jquery
[5]
3,702,056
3,702,057
Asp.net Textbox replacement or better design
<p>Can someone direct me to a good Textbox replacement or css design for the standart one. I think the regular one is boring but functioning well. I just need to make it look nicer.</p> <p>Thanks.</p>
asp.net
[9]
2,981,532
2,981,533
get global variable in class
<p>I created a javascript class, and I would like to call a method inside every second, here is my code:</p> <pre><code>var MyClass = Base.extend({ myMethod: function() { setTimeout(function(){ var mc = new MyClass(); mc.myMethod(); }, 1000); } }); var myGlobalClass = ne...
javascript
[3]
1,883,027
1,883,028
Obsolete createEvenSource
<ol> <li>I want to create a new customevent log ( "My EeventLog") on a remote machine.</li> </ol> <p>createEventSource(String,String,String) method was perferct for my need.</p> <p>Unfortenatly, this method is Obsolete.</p> <p>My questions is: the two other alternatives don't allow evenlog creation over a remote mac...
c#
[0]
5,867,234
5,867,235
iPhone:How to insert textfield , button in UIWebView?
<p>Hello friends,</p> <p> Is there any way to insert textfield , button or any other controls in UIWebView?? if yes,so please send me any link or any idea to develop this functionality. </p> <p>Thanks in advance.</p>
iphone
[8]
4,347,654
4,347,655
I need help choosing the right c++ container
<p>key is :(x,y) , that means 2 integers.</p> <p>value is: 0 or 1.</p> <p>And I have frequently operation of iteration of this hash map.</p> <p>Which data structure is fit? I am using C++ stl or tr1. Don't consider boost.</p>
c++
[6]
3,050,407
3,050,408
Unable to view First Edittext when virtual keyboard is visible
<p>In the Linearlayout I have four Edittext Fields.When virtual Keyboard is opened I can't able to view the first edittext field.I can able to scroll from the second view, First view is partially visible. How to solve this.Thanks in advance.</p> <pre><code>&lt;ScrollView android:layout_height="fill_parent" android...
android
[4]
5,840,697
5,840,698
Get ArrayList element by custom text indexing
<p>What I'm doing is storing classes into an ArrayList and retrieve them by its index number. But are there any list classes in Java where I can retrieve a list element by, lets say, its name? Like this:</p> <pre><code>ArrayList&lt;string&gt; myArr = new ArrayList&lt;string&gt;(); myArr.add( "ID_name", "String to st...
java
[1]
2,252,498
2,252,499
Java practice questions
<p>i posted the other day with practice questions i was getting stuck with and i am stuck again</p> <p>Please firstly can i ask you dont post full solutions.</p> <p>The question is from here</p> <p><a href="http://www.javabat.com/prob/p141494" rel="nofollow">http://www.javabat.com/prob/p141494</a></p> <p>and reads<...
java
[1]
1,143,149
1,143,150
create custom browser for android
<p>Im developing browser for android.simply i need to create one search editbox with a history button.When user clicks 'history' button.,it should be shown recent visited webpages upto 5.I dont know how to start..Because no idea on this..How could i do that.?</p>
android
[4]
2,418
2,419
dispatcher python
<p>hy all, I have the following "wrong" dispatcher:</p> <pre><code>def _load_methods(self): import os, sys, glob sys.path.insert(0, 'modules\commands') for c in glob.glob('modules\commands\Command*.py'): if os.path.isdir(c): continue c = os.path.splitext(c)[0] parts = c.split(os.path.sep ) module, name =...
python
[7]
3,176,000
3,176,001
Why parenthesis don't change the operator priority for == and === in JavaScript?
<p>I'm kind of confused! Why paranthesis don't affect the priority in these statements?</p> <pre><code>true === '0' == 0 // returns true (true === '0') == 0 // returns true again! </code></pre>
javascript
[3]
4,790,295
4,790,296
how to check whether the activity was launched from notification or from the user click on home screen dashboard app icon in android
<p>how to check whether the activity was launched from notification or from the user click on home screen dashboard app icon in android. Is there any parameters that tells that this activity was launched due to user clicked on notification..</p>
android
[4]
4,470,771
4,470,772
Black screen in inner preferenceScreen
<p>My <code>PreferenceActivity</code> contains a nested <code>PreferenceScreen</code> in another <code>PreferenceScreen</code> and I'm applying a theme to my <code>PrefenceActivity</code> that changes the background color. However when I open the nested <code>PreferenceScreen</code> I get a black background and I canno...
android
[4]
2,775,503
2,775,504
C++ calculating size
<p>Consider a packet which consists of header followed by multiple values. If <code>hdr</code> points to the packet header and <code>lastValue</code> points to last value in the packet. can you please explain me the following code:</p> <pre><code>size_t calcSize = (lastValue - (char *)hdr); </code></pre> <p>What ...
c++
[6]
551,815
551,816
Functionality code in event handler bad practice?
<p>I was reading some C# coding standards and it has this:</p> <p>"The event handler should not contain the code to perform the required action. Rather call another method from the event handler"</p> <p>I was wondering if there is a reason for this (performance or something else) or if it is just a style preference?<...
c#
[0]
5,064,342
5,064,343
I need to have an idea for constructing menu management in asp.net
<p>I need to have an idea for constructing menu management in asp.net,</p> <p>I want to manage menus is like DotNetNuke Cms </p> <p>Database tables is shown below</p> <p>thanks</p> <pre> menuid text parentid 64 product null 65 wireless 64 66 sony 65 67 panasonic 65 68 camer...
asp.net
[9]
3,648,562
3,648,563
How to open Excel, .doc files in Webview in Android?
<p>How can I open Excel and .doc file in Android webview. Can google doc support it?</p>
android
[4]
3,452,314
3,452,315
out of bound check for multidimensional arrays
<p>I am reading a book on Safe C++. Here author mentioned that how to avoid out of bound array reading. Here it is mentioned how we can avoid out of bound array reading for multi dimension arrays. Here author used operator() function as shown in following link instead of operator[] and gave following explanation.</p> ...
c++
[6]
5,556,474
5,556,475
Where to place JavaScript functions: <head>? <body>? or, after </html>?
<p>I'm confused about where to place JavaScript functions:</p> <p>When should they be put within the head When inline within the body And, when after the closing html tag?</p> <p>thanks</p>
javascript
[3]
4,581,605
4,581,606
problem in upgrading androidmarket
<p>I have htc hero with android version 2.1, i want to upgrade my android market, its current version is 2002306. i have followed following steps, but of no use, please help me.</p> <pre><code> Android 1.6 - 2.3 1.Launch Android Market 2.Switch to the Home screen 3.Wait 5-10 minutes for Market to self-...
android
[4]
2,365,111
2,365,112
simple copy paste function in javascript
<p>Hi All how i can make simple copy and paste in javascript</p>
javascript
[3]
866,684
866,685
how to submit a form and show the result in that page
<p>im using a form in php to submit some information into my database </p> <p>so i used two function to do this </p> <p>but how to show the result in th same page that has the form </p>
php
[2]
3,602,537
3,602,538
Method to trigger a php script from the server on particular schedule without using cron job facility
<p>As my server is not supporting cron job, I want a file in my server to trigger its action on a particular time every day.. </p> <p>Please let me know whether it possible to do run a script at a particular time from the server side itself without any external act.</p>
php
[2]
2,961,154
2,961,155
Random Object reference
<p>Yes, I searched this situation, but couldn't really relate the others to this... ( Don't bash me please...)</p> <pre><code>public Random Randomizer; string[] Monsters = { "Rat", "Giant Rat", "Skeleton", "Infected" }; public string DisplayKilled() { if (PlayerOne.Level &lt;= 5) { string randomMo...
c#
[0]
5,615,022
5,615,023
How do I match 0,2,3,4 elements of one array to 0,2,3,4 elements of another array and print the 5th element from both the arrays in python?
<p>I am trying to match the 0,2,3,4 elements of an array storing the columns of one tab delimited file to 0,2,3,4 elements of another array storing the columns of another tab delimited file and print out the element 5 (column 6) from both the input files in python.</p> <p>Here is the code that I worked on but I guess ...
python
[7]
2,732,034
2,732,035
How to do a professional setup for java app to avoid "javaw" cannot be found?
<p>I just installed <a href="http://yacy.net/" rel="nofollow">http://yacy.net/</a></p> <p>It advertises as easy install except that when I run it says cannot find javaw which spoils nearly everything.</p> <p>If I were to distribute a java app myself I'd like not to have user knows anything about downloading and insta...
java
[1]
5,128,996
5,128,997
AlarmManager not firing alarm at specified time
<p>I am using following code to put alarm on specific date and time.</p> <pre><code>mCalendar.setTimeInMillis(System.currentTimeMillis()); mCalendar.set(Calendar.YEAR, 2013); mCalendar.set(Calendar.MONTH, 0); mCalendar.set(Calendar.DAY_OF_MONTH, 16); mCalendar.set(Calendar.HOUR_OF_DAY, 1); mCalendar.set(Calendar.MINUT...
android
[4]
4,013,586
4,013,587
Using progress bar in file search
<p>I am writing an application which will search for a particular file or files from the respective path. During searching i need to deploy a progress bar which must run according to the search. so how i can do that? and if possible please post the code? </p>
java
[1]
3,702,324
3,702,325
javascript - find number in string
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1183903/regex-using-javascript-to-return-just-numbers">Regex using javascript to return just numbers.</a> </p> </blockquote> <p>How do I get the humber from a string like this?</p> <pre><code>blabla-33434 </cod...
javascript
[3]
2,023,251
2,023,252
Bluetooth activation Alert dialog multiplication after screen rotation
<p>I have encountered strange issue. From Activity onStart() I request Bluetooth activation and 120s discoverability via intent:</p> <pre><code>Intent activateBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); startActivityForResult(activateBTIntent, BT_ACTIVATE_INTENT); ...
android
[4]
2,032,615
2,032,616
how to display the directory listing of an webserver in iphone native application
<p>how to fetch files and directories names on iphone native application from the web server.</p> <p>Thanks in advance</p>
iphone
[8]
4,490,503
4,490,504
Read war Files from src folder class
<p>my project directory structure</p> <pre><code>/src /model /Updatedata.java /war /vector /basicvector.xml </code></pre> <p>which method i use to read <code>basicvector.xml</code> from <code>Updatedata</code> class </p>
java
[1]
1,651,750
1,651,751
Convert String to DateTime in C# UK and US format
<p>I am trying to convert a string to a datetime</p> <p>I have been using</p> <pre><code>DateTime convertedDate = DateTime.Parse(lastModificationDate); </code></pre> <p>to convert the date</p> <p>my problem is, sometimes the date will be in UK format and sometimes in US format</p> <p>ie UK <code>11/09/2011 10:34</...
c#
[0]
281,271
281,272
SetConsoleTextAttribute : Foreground only
<p>I would like to change ONLY the foreground color text of my console application, not the background text color nor the console background color. In Other words: I want to keep previous colors like they are except the foreground text color.</p> <p>Presently i use the code below but the background under the text chan...
c++
[6]
933,796
933,797
how to develop a python wrapper for a C code?
<p>Well given a C code , is there a way that i can use other languages like python to execute the C code . What i am trying to say is , there are soo many modules which are built using a language , but also offer access via different languages , is there any way to do that ?</p>
python
[7]
5,786,065
5,786,066
Static cast in a template
<p>I have a template with this static cast operator:</p> <pre><code>operator Vector2&lt;float&gt;() const { return Vector2&lt;float&gt;(x, y); } </code></pre> <p>This implies to me that if I cast as a float, it will return a float variant of the class, even if <code>x</code> and <code>y</code> are integers from a...
c++
[6]
1,132,107
1,132,108
jquery hide input element error
<p>The initial idea, is to hide an input element and show it based on a change event in a select element. However, the code I have is not hiding the input and so nothing happens with the change statement. Could someone check the code and show me my error. Thanks</p> <pre><code>&lt;label for="AUSR_companyname"&gt;Compa...
jquery
[5]