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,604,951
2,604,952
LiveValidation js -- Change Text Message to Image
<p>LiveValidation is a nice little inline form validation plugin.</p> <p><a href="http://livevalidation.com/examples#exampleHomepage" rel="nofollow">http://livevalidation.com/examples#exampleHomepage</a></p> <p>I'd like to change the text confirmation message to an image.</p> <p>The line that I edit is:</p> <pre><c...
javascript
[3]
2,366,000
2,366,001
Android Conversion to Ordinal Format
<p>Before I go reinventing the wheel, does Android have any facility for converting an integer to an ordinal string with multi-language support? That is, it would convert the integer 3 to "3rd" in English and "3eme" in French.</p> <p>I can see how to do this myself using a bit of logic along with Android's automatic s...
android
[4]
1,681,795
1,681,796
Uploading Not Working
<p>i have an online application form. i have provided two upload options in the form, one is for uploading image and another is for uploading document. </p> <p>But the problem is that the uploading is not working, though i see no error in my code.</p> <p>Anyone Please help.</p> <p>here is my php...</p> <pre><code>i...
php
[2]
4,563,607
4,563,608
How to make Custom Delegate in iOS app
<p>In iPhone every UIContrrol has predefined delegate methods but how we will create our own custom delegate methods </p>
iphone
[8]
1,647,672
1,647,673
Jquery "find" problem
<p>Can anyone help with a problem with a JQuery Find? In the example below I want to find the select &amp; text objects within Div1. Here is the HTML:</p> <pre><code>&lt;div id="div1" style="border:solid 1px #c6c8dd; background-color:#ff0000; padding:5px;"&gt; &lt;div style="width:916px; padding-top:10px;"&gt; &lt;...
jquery
[5]
5,449,394
5,449,395
Moving A Method Inline - Resharper Possible
<p>I want to create an instance of <code>IEnumerable&lt;T&gt;</code> - I can do that by creating a method like</p> <pre><code>public IEnumerator&lt;T&gt; MakeEnumerator(){ yield return 1; } </code></pre> <p>But I need to pass this Enumerator to another class and so wanted to see whether I could create this inline...
c#
[0]
2,663,838
2,663,839
cannot scale images pulled from web
<p>Sorry for the newbie question, hope someone can put me on the right track...</p> <p>As a learning exercise, I am trying to build an app which pulls in images from the web (comic strips).</p> <p>My layout contains 3 HorizontalScrollViews, within each is an ImageView. In the layout I set the ImageView height to matc...
android
[4]
1,759,842
1,759,843
php : how to write $item$i
<p>how to write this correctly?</p> <pre><code>for($i=2;$i&lt;5;$i++) { $items{$i} = $doc{$i}-&gt;getElementsByTagName('url'); } </code></pre> <p>got an error: </p> <blockquote> <p>Fatal error: Call to a member function getElementsByTagName() on a non-object</p> </blockquote> <p>Thanks, bye</p>
php
[2]
2,809,463
2,809,464
Python Keyboard shortcuts
<p>So, I have a python script running I the background, and I want it to trigger X function whenever a key combination is pressed. How would I implement that? The problem is that the app will be running in the background, so it won't have focus from the OS.</p>
python
[7]
8,118
8,119
jquery an div tags used in a ordered list
<p>i'm not sure where my errors are lying but here is my scenario...</p> <p>i have an un-ordered list in html that handles my main link bar...</p> <pre><code> &lt;ul id="navlist"&gt; &lt;li&gt;&lt;a href="/" id="current"&gt;home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" id="search"&gt;search&lt;/a&gt;&lt;/...
jquery
[5]
3,836,632
3,836,633
Save variable amount of variables from PHP form into database
<p>All, I'm allowing my user to create questions which I'll need to save answers to. They can create as little or as many questions as they would like. My dilemma is how to save these variables and also retrieve and display them back to the user. </p> <p>When I output the form to the user I have the following PHP code...
php
[2]
2,070,562
2,070,563
Java : Removing First three characters from a String
<p>I am getting a String value as </p> <pre><code>String A = KS!BACJ String B = KS!KLO String C = KS!MHJU String D = KS!GHHHY </code></pre> <p>Is it possible to remove the KS! from the String so that it only looks like BACJ </p> <pre><code>public class Main { public static void main(String args[]) { Stri...
java
[1]
4,884,476
4,884,477
dialogresult does not work or partially work for some reason
<p>I made a form to be a dialog and the form only has one textbox, one OK button and one Cancel button. somehow, when the following does not work unless i change rnmForm.DialogResult!=DialogResult.OK), why is that???? </p> <pre><code> frmRename rnmForm = new frmRename(); rnmForm.ShowDialog(new Form()); ...
c#
[0]
1,124,727
1,124,728
to display image in modal pop
<p>I have a requirement where when a user clicks on the details view thumbnail image, then I need to pop up an image in a modal control along with data.</p> <p>Right now my code is like this:</p> <pre><code>&lt;asp:DataList ID="gvImages" runat="server" RepeatColumns="5" RepeatDirection="Horizontal" Width=...
asp.net
[9]
810,408
810,409
What does String [][] means in C#?
<p>EG. </p> <pre><code>String [ ][ ] LinesSplitByComma1 = File.ReadAllLines("Filepath").Select(s =&gt; s.Split(',')).ToArray(); </code></pre>
c#
[0]
4,295,056
4,295,057
Call-time pass-by-reference issue in php
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4665782/call-time-pass-by-reference-has-been-deprecated">Call-time pass-by-reference has been deprecated;</a> </p> </blockquote> <pre><code>function getLib($pfComponentType,$pfComponentCode,$componentCode) {...
php
[2]
55,067
55,068
Python issue in while statement
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/12090110/python-while-statement-issue">python while statement issue</a> </p> </blockquote> <p>hi guys I have to write a program that reads in multiple lines of text from the user until a blank line. Your program...
python
[7]
1,191,142
1,191,143
How to generate a fixed-length hash based on current date and time in Python?
<p>I want to generate a fixed-length (say 10 characters) hash based on current date &amp; time. This hash will be append to names of the uploaded files from my users. How can I do that in Python?</p>
python
[7]
5,623,362
5,623,363
Cannot write session data to file
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2005537/failed-to-write-session-data">Failed to write session data</a> </p> </blockquote> <p>I am having a problem with sessions on my server. Is this a server problem or a coding problem? I get this error messa...
php
[2]
2,009,428
2,009,429
Can JavaScript draw dashed lines?
<p>I am a JavaScript newbie. I know JavaScript can draw lines, but can it draw dashed lines? If it can, how can I do so? Can it draw anti-aliased lines? If so, how?</p>
javascript
[3]
4,482,626
4,482,627
Images not showing in device for Web view in iphone
<p>I am working on one application. I stuck with one problem. I have HTML page and some images are in Resource Directory. Whenever i run the application on Simulator it works perfectly fine. But when i run the application on the device the image are not displaying but text is displaying only and instead of image Questi...
iphone
[8]
4,431,680
4,431,681
how to keep on running the chronometer between switching the pages
<p>I have two pages.First page having chronometer.it works well.but when i go to second page and come back to the first page the timer has stopped working.Can any one help me to fix this issue. Thanks..</p>
android
[4]
2,243,863
2,243,864
Visual C++ 2010 error. Can't Find program.exe when running
<p>This is the message I get</p> <blockquote> <p>Unable to start program C:\Users\Documents\Visual Studio 2010\Projects\EULER'S Fixed\Debug\EULER'S Fixed.exe</p> <p>The system cannot find the file specified.</p> </blockquote> <p>Here is the Build Output</p> <pre><code>1&gt;------ Build started: Project: EULER...
c++
[6]
3,107,498
3,107,499
How to get the intermediate dates given the start date and end date?
<pre><code>start_date = '07_Nov_2011' end_date = '10_Jan_2012' </code></pre> <p>I want to print all the intermediate dates in the same format:</p> <pre><code>day_month_year </code></pre> <p>If I can somehow convert start_date to date type I can do this:</p> <pre><code>sdate+timedelta(1)).strftime('%d_%b_%Y') </code...
python
[7]
3,184,004
3,184,005
JQuery How to set attribute of element using other attribute of the same element
<p>I want to set title text of a link calling a function which receives as parameter the id of the element and outputs the text.</p> <p>something like</p> <pre><code>$(a).attr('title', function() {return $(this).id + "foo"}); </code></pre> <p>but a construct like this doesn't exist as far I know. What can I do? Than...
jquery
[5]
5,033,141
5,033,142
Linker error: Unresolved external '__Fastcall_Advgrid::TAdvstringGrid::AutosizeCol......referenced from ...name.OBJ
<p>I was compiling a project, and this project has a unit called Gamespaceframe, the header file was as follow:</p> <pre><code>: #include "Advdgrid.hpp" : </code></pre> <p>and the .cpp was as follow:</p> <pre><code>: #Pragma link "Advdgrid" : </code></pre> <p>When I recompiled this project, I got this linker error:...
c++
[6]
6,012,000
6,012,001
Android push notifications - should my service extend GCMBaseIntentService or IntentService
<p>The basic architecture of the push functionality that I am trying to create is </p> <p>1) I would get the phone id and store it in my db</p> <p>2) Only when something happened on the server I would try to create a push message</p> <p>So I do not need the part where the app tries to call the server to send it the ...
android
[4]
3,733,392
3,733,393
Why add void to method parameter list
<p>I've seen methods with the following signature:</p> <pre><code>void foo (void); </code></pre> <p>They take no argument, however I'm wondering whether doing this is useful or not. Is there a reason why you would want to do it?</p>
c++
[6]
1,741,634
1,741,635
jQuery basic structure
<p>i wanna understand what that line means: </p> <pre><code>var oViewport = { obj: $('.viewport', root) }; </code></pre> <p>it's a line out of the plugin tinyscrollbar. Can someone explain the values of this line to me? I really searched for an answer but didn't find one. I appreciate your help. </p>
jquery
[5]
407,038
407,039
how do i tell the android launcher to reload its icons?
<p>while testing, if i load a new version of my application onto my phone, the icon shown in the launcher isn't refreshed. is there any way to tell the launcher to reload its icons?</p>
android
[4]
5,790,376
5,790,377
How to SET jquery .attr(), not get it
<p>When I want to read an attribute, I use </p> <pre><code>$('#mydiv').attr('id'); </code></pre> <p>How do I write to this attribute instead, so that I can change the id of the div in the markup?</p>
jquery
[5]
3,190,594
3,190,595
Microsoft JScript runtime error: '0.scrollHeight' is null or not an object
<p>I use jQuery to scroll the div vertical bar to it's last line in my web chat application. I found that whenever there are several lines which don't need to scroll down to the last line, it comes out an error says: Microsoft JScript runtime error: '0.scrollHeight' is null or not an object. When there are more lines, ...
jquery
[5]
2,369,041
2,369,042
How to set the focus on button?
<p>Hi I have some EditTexts and a button at the bottom of the view. Upon starting the activity, the first EditText will gain focus and a keyboard will pop up. I want to upon starting the activity, the focus will be on the button instead of the EditText and the keyboard should not pop up. I tried running:</p> <pre><cod...
android
[4]
4,688,547
4,688,548
Generating the same random number in Java and Python
<p>Is it possible to generate the same random number in python as in java if given the same seed</p> <p>Explained in a more accurate way, Is it possible to use the linear congruential formula from java in Python?</p>
python
[7]
4,405,246
4,405,247
structures and pointers
<p>I'm not sure what I'm doing...</p> <p>Let say I have a structure</p> <pre><code>struct Inner{ exampleType a; int b; } struct Outer{ int current; int total; Inner records[MAXNUMBER]; } struct Outer2{ Outer outer; } </code></pre> <p>And I have the following functions:</p> <pre><code>void ...
c++
[6]
4,294,134
4,294,135
How to return a reference to a string in c#?
<p>I am looking to write a function like </p> <pre><code>ref String TestIt( int index ) { return this.TestArray[index]; }; </code></pre> <p>so that I could write code like:</p> <pre><code>MyClass.TestIt(0) = "Hello World"; </code></pre> <p>My goal is to mimic this c++ declaration</p> <pre><code>CString&amp; MyClas...
c#
[0]
3,299,664
3,299,665
Can I override the 'Home' button in my application?
<p>I want to create my own 'home' screen on my android, and I want to call that home screen from my application.</p> <p>How can I override the 'Home' button so that when it's pressed the application will be redirected to my home screen instead of the default home screen? Is it possible to override the home button?</p>...
android
[4]
5,569,948
5,569,949
making a class behave like a bunch of keyword arguments in python
<p>So I have a class that will have a lot of attributes. Is there a way to make this class behave in a way that I can pass it as a **kwarg to a function?</p> <pre><code>class Foo ( object ) : def __init__( self ) : self.a = 'a' self.b = 'b' foo = Foo() somefunc(**foo) </code></pre> <p>I cannot ...
python
[7]
6,032,634
6,032,635
jquery selector result is prevObject: e.fn.e.init[3] how do I get an element from that
<p>I have a selector <code>$('.element')</code> is returning <code>prevObject: e.fn.e.init[3]</code>. I looked into the results and the first object there is what I need. 2 questions here. What is <code>prevObject</code>? Also how can I select from the result the first object. Thanks for any help.</p>
jquery
[5]
2,082,925
2,082,926
Python- input string and prints indexes of vowels in string
<p>Implement the function vowels(s) that takes as input a string and prints the indexes of all vowels in the string. Hint: A vowel can be defined as any character in string "aeiouAEIOU"</p> <pre><code>vowels ('Hello WORLD') 1 4 7 </code></pre>
python
[7]
1,351,360
1,351,361
dream css image slider
<p>Does anyone ever use this slider: <a href="http://www.dreamcss.com/2009/04/create-beautiful-jquery-sliders.html" rel="nofollow">http://www.dreamcss.com/2009/04/create-beautiful-jquery-sliders.html</a>.</p> <p>I need someone's advice on how to remove the navigation and only show while on hover.. thanks</p>
jquery
[5]
5,233,041
5,233,042
creating sqlite database
<p>How to create a sqlite database in applications resource or assets folder?</p>
android
[4]
1,754,807
1,754,808
Capturing the Desktop wallpaper in the background of the Activity
<p>I have a problem that I want to create an Android App which captures the current wallpaper of Device Desktop, in the background. Which is already done in an App which is shown below in images. as:</p> <p><img src="http://i.stack.imgur.com/KwtFD.png" alt="enter image description here"></p> <p><strong>Desktop of Dev...
android
[4]
2,710,530
2,710,531
How could I use the Android LVL in my premium key app?
<p>It seems that the commonly accepted approach to implement a paid "premium key" application is to have a the free app check if the paid one is installed to unlock features. This part is straight forward as is the implementation of the LVL but I cannot figure out how to combine both. If the paid app is never intended...
android
[4]
2,147,475
2,147,476
get the size of data partition by coding
<p>i have test code using :</p> <pre><code> $ adb -s emulator-5554 shell # df df /dev: 47084K total, 0K used, 47084K available (block size 4096) /sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096) /system: 73600K total, 73600K used, 0K available (block size 4096) /data: 65536K tota...
android
[4]
4,807,389
4,807,390
file_put_contents, placing content between lines
<p>I am new to PHP and I am practicing the file_put_contents() function, and I was wondering if this was possible.</p> <p>I have a text file with the following copy:</p> <pre><code>--start placed content -- (content goes here) --end placed content -- </code></pre> <p>Is it possible to use file_put_contents to plac...
php
[2]
4,209,903
4,209,904
Is there any Listener for Media Recorder?
<p>Actually i am creating an application which starts recording when user start speaking and stop recording automatically when user stop speaking.</p> <p>so is there any way to find if user is speaking or not? is there any listener for Media Recorder for this?</p>
android
[4]
674,720
674,721
Android HtmlGet trouble
<p>I want to get source of webpage. And for now only display. I can't compile this code succesfuly. Eclipse saying Unhandled declaration type IOExeption. When i add "throws declaration" still have some problems. I'm sorry for my english. Thanks for answers. </p> <pre><code>package com.html; import java.io.Buffere...
android
[4]
1,239,323
1,239,324
TextView showing HexValue (0x0d0a) for CR LF in Android
<p>While saving data from textview, CR LF is storing like hex value 0x0d0a. But while showing same data in another text view <strong>which is inside list view</strong>, not showing return space for 0x0d0a. Instead of that it is directly printing /0x0d0a. Any help here. Thanks in advance. -- Raghav</p>
android
[4]
610,637
610,638
I need to remove the object of an image and fill with transparency in Android(removing background layer)
<p>I have a persons image which is taken from camera or gallery , In that image the background is a scenery. I need to remove that scenery and replace with some other image, So that it would look like the persons background is the the new replaced image not the old background.How this could be done in Android??? </p>...
android
[4]
4,339,960
4,339,961
populate select boxes from json string using jquery
<p>I have a list of select boxes with incremental numbers to identify then e.g.</p> <pre><code>&lt;select id="my-select-0"&gt; &lt;option value="1"&gt;first option&lt;/option&gt; &lt;option value="2"&gt;first option&lt;/option&gt; &lt; option value="3"&gt;first option&lt;/option&gt; &lt;/select&gt; &lt;select id="...
jquery
[5]
2,735,464
2,735,465
<identifier> expected. java
<p>I have this snippet of java code. I am a noob in java.. </p> <p>Error :</p> <pre><code>&lt;identifier&gt; expected cfg = new Config; </code></pre> <p>Code:</p> <pre><code>import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLEx...
java
[1]
2,739,539
2,739,540
Javascript help - combo box
<p>Hi I need some help understanding this code: It works well but can someone add some comments to help me understand it better? Thanks</p> <p>Here's the code:</p> <pre><code>function contractall() { if (document.getElementById) { var inc = 0 while (document.getElementById("dropmsg" + inc)) { ...
javascript
[3]
268,807
268,808
Mozilla display Problem with javascript
<p>I n an aspx page I am using a javascript function like</p> <p>function ReverseResult() {</p> <pre><code>document.getElementById("ctl00_ContentPlaceHolder1_txtIncrementAmount").value = parseInt(document.getElementById("ctl00_ContentPlaceHolder1_txtNewCTC").value) - parseInt(document.getElementById('&lt;%=lblCurrent...
javascript
[3]
5,717,069
5,717,070
Return "null" on primitive return type function?
<p>I have a function which returns an <code>int</code> value for a given key (from a <code>HashMap&lt;String, Integer&gt;</code>). If the key doesn't exist, I want to return something the caller can check for. It seems that, most commonly, this would be a "<em>returns -1 if key doesn't exist</em>" kind of thing. Howeve...
java
[1]
570,773
570,774
c# Splitting a string based on number of characters
<p>I'm looking through the functionality of the Split ability of Strings in c#, and I was wondering if there was a way that I could split a string based on number of characters rather than a specific delimiter?</p> <p>For example, can I split "cat dog" in a way that would fill the first 7 slots in an array, since ther...
c#
[0]
5,777,693
5,777,694
Generating an ascending list of numbers of arbitrary length in python
<p>I've been looking at how to do this for a bit and there has to be a fast way, is there a function i can call that returns a list of ascending numbers? ie. function(10) would return [0,1,2,3,4,5,6,7,8,9]? Its probably something I'm overlooking.</p>
python
[7]
2,077,761
2,077,762
FileWatcher on Private Folder
<p>I have a windows service that listens on a folder on a server for newly added files. Once a new file is added then the services executes a method to carry out a specific function. I don't want the watched folder to be viewable or editable by users' that log in to the server. I would like for another program to c# .e...
c#
[0]
2,528,825
2,528,826
permission for my php to create a dynamic file on the server
<p>For a project I need my php file to create a dynamic file (on remote server which I bought) which loads into a flash component. Everything is working fine on my localhost. But once I upload it to the server, it throws the following errors:</p> <pre><code>Warning: fopen(output.html) [function.fopen]: failed to open...
php
[2]
897,986
897,987
Javascript - Where i'm making a mistake?
<p>i'm creating that script if someone delete the text or link on footer of my template it will redirect to my site, but its redirecting without removing anything.</p> <pre><code>function loadBody() { var elem = document.getElementById("mycontent"); if(elem.innerHTML !== "MySite" || elem.href !== "http://mysite.com")...
javascript
[3]
4,682,337
4,682,338
Newlines are missing after downloading txt file through the browser
<p>I have a txt file that is generated on the server and contains newlines. If I view the file in my ftp editor, they are here. If I download it through my ftp client and open in it windows with notepad, I also see the newlines.</p> <p>But when I try to download it through the browser by forcing a download window, and...
php
[2]
5,848,544
5,848,545
can not stop NSTimer
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1031554/nstimer-doesnt-stop">NSTimer doesn&#39;t stop</a> </p> </blockquote> <p>I hope to stop a running NSTimer, below are my codes:</p> <pre><code>timer=[[NSTimer scheduledTimerWithTimeInterval:10 ...
iphone
[8]
5,026,316
5,026,317
How to stop an Activity in android
<p>My code looks as follows..</p> <pre><code>@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); try { Thread.sleep(3000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.prin...
android
[4]
26,561
26,562
Can I write this javascript more efficiently with jquery?
<p>Do you think jquery could help me get the following script work faster? Thanks!</p> <pre><code>window.onload=function colorizeCheckedRadios(){ var inputs = document.getElementsByTagName("input"); if (inputs) { for (var i = 0; i &lt; inputs.length; ++i) { if(inputs[i]...
jquery
[5]
5,012,217
5,012,218
Wrap text after particular symbol with jQuery
<p>What I'm trying to do, is wrap text into div inside ll tag. It wouldn't be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. </p> <p>This is my html:</p> <pre><code>&lt;ul&gt; &lt;li&gt;Some list text - Additional text&lt;/li&gt; &lt;/ul&gt; </code></pre> ...
jquery
[5]
4,838,253
4,838,254
$_POST and $_GET array data modification possible or not?
<p>I was confounded by a question whether $_POST and $_GET arrays data modification is possible for more than one time as I tried to assign some value to $_POST for making the posted data sanitized from single and double quote and backslashes and then again assigned $_POST array the trimmed value of the $_POST ar...
php
[2]
1,979,909
1,979,910
android webviewer doesn't displaying websites correctly
<p>I'm using a webviewer for displaying my website . The websites are in persian . The problem is that the contents are really messed up and it displays it very very bad .</p> <p>Is there anyway to solve this problem ? I've tried too many websites but non of them showed well .</p> <p>Thanks </p>
android
[4]
3,511,216
3,511,217
Exception when calling SchemaFactory.newInstance on Android 4.0
<p>I have an android 4.0 app which try to call the following as recommended in Android SDK:</p> <pre><code>SchemaFactory sf = SchemaFactory.newInstance(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI); </code></pre> <p>but this gives me the following exception: </p> <pre><code>java.lang.IllegalArgumentException: http...
android
[4]
2,912,897
2,912,898
JQuery: how to know the kind of form object we are dealing with?
<p>I am building a interactive form and loading the fields according to the answer of the user. Right now I just have two kind of objects "input radio" and "textarea". As I am getting the value of the answers via JQuery, how can I know what object I am dealing with inside the very LAST loaded fieldset?</p> <p>This is ...
jquery
[5]
1,125,122
1,125,123
How to create a detachable toolbar kind of thing
<p>I am developing a web based application where I need to have a detachable toolbar kind of thing. This way user would be able to move the toolbar to somewhere else in the browser while working.</p> <p>A site already has this kind of functionality. Here is a snapshot</p> <p><a href="http://skitch.com/neerajdotname/d...
jquery
[5]
5,536,515
5,536,516
How to find fast the number of files in directory?
<p>I have thousands log files in a few directories in my system. Mostly I need to know just number of these files in directory. I fear that this attitude:</p> <pre><code>$files = count(scandir("logs")) - 2; </code></pre> <p>Is not very effective (memory, filesystem). I am considering some global counter (incremented ...
php
[2]
3,623,672
3,623,673
How to get all children elements except one
<p>I have the following content:</p> <pre><code>&lt;input type='checkbox' id='inputCheckbox'/&gt;&lt;strong&gt;sdfsf&lt;/strong&gt;&lt;p&gt;dfsfsdsd&lt;/p&gt; </code></pre> <p>From the elements above, I only need to get these elements when the checkbox are selected and omit the input element:</p> <pre><code>&lt;stro...
jquery
[5]
2,415,087
2,415,088
JavaScript stripping the .00 from my decimal?
<p>Was wondering is anyone can shed some light onto why my subtotal is 1, and the .00 is being stripped off the subtotal.</p> <p>price is 1.00, and itemQty is 1.</p> <pre><code>var price = parseFloat(res.productPrice).toFixed(2); var subTotal = price * parseInt(res.itemQty); </code></pre>
javascript
[3]
4,086,244
4,086,245
How to filter a sub list which is part of another list in C#
<p>I want to filter the list which is already part of another list.</p> <p>Consider,</p> <p>Class MainClass</p> <pre><code> properties String Name String MainAddress List&lt;SubClass&gt; ExtraInfo </code></pre> <p>Class SubClass</p> <pre><code> properties String Address String ...
c#
[0]
4,989,422
4,989,423
app specific keyboard
<p>I don't want to replace the entire soft keyboard. I want to add a Next/Prev buttons when the soft keyboard is deployed when a field in my WebView in the fashion that looks like the display on mylogin.yahoo.com</p> <p><a href="http://imgur.com/a/zH0Ux" rel="nofollow">http://imgur.com/a/zH0Ux</a></p> <p>I have foun...
android
[4]
1,127,153
1,127,154
Call a method at fixed time in Java
<p>How do I call a method at a particular time?</p> <p>For example to call the method at 6:00 and 13:00.</p> <p>I'm working at a desktop application for Windows.</p>
java
[1]
4,252,477
4,252,478
How can I extract list items using dictionary keys?
<p>I have list and dictionary like this:</p> <pre><code>list_1 = ['if looks kill then i'm murdering] dic_1 = {"kill": -2, "murdering": -3} </code></pre> <p>I want to extract list items that matches the dictionary key and append it to a set. I have two problems: 1. I cannot extract the list items that matches with k...
python
[7]
5,386,757
5,386,758
how to parse php variable with html?
<p>Hi friends I have created newsletter system. In which I want to send person name like typing Hello %username% in html form, which will be coming from database $username. So when the person get email He will have "Hello Falana".</p> <p>Thanks</p>
php
[2]
5,617,975
5,617,976
Synchronizing android with the web
<p>I was wondering if there are some commonly used techniques for synchronizing an app with a server? I have looked at the socket-framework and maybe some http? I am thinking for instance when making a game or a grocery list, any developers out there who want to share?</p>
android
[4]
55,356
55,357
debug error : max must have union class struct types
<p>this is my code:</p> <pre><code>#include &lt;iostream&gt; using namespace std; class Sp { private : int a; int b; public: Sp(int x = 0,int y = 0) : a(x), b(y) { }; int max(int x,int y); }; int Sp::max(int a,int b) { return (a &gt; b ? a : b); }; int main() { int q,q1; cin &gt;&gt;...
c++
[6]
5,975,323
5,975,324
Function point count given source code
<p>Given the source code of a program, how do I analyze it and count the function points within it?</p> <p>Thanks!</p>
java
[1]
4,227,102
4,227,103
PHP Define security issues?
<p><strong>index.php:</strong></p> <pre><code>define("included", true); </code></pre> <p><strong>INCLUDED PAGES:</strong></p> <pre><code>if (included !== true) header('HTTP/1.1 404 Not Found'); </code></pre> <p>The purpose for the codes was to disallow access directly but allow it if included. I am not sure if thi...
php
[2]
2,328,292
2,328,293
jquery .load() doesn't work after hard refresh for some reason
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5323042/jquery-load-doesnt-work-after-hard-refresh">jquery .load() doesn&#39;t work after hard refresh</a> </p> </blockquote> <p>I have some code that when the page loads gets the height of an image and then res...
jquery
[5]
5,450,005
5,450,006
How to maintain and access javascript variable which is accesible from all the pages?
<p>I have a temp.js file containing global variable 'num' which is intially set to 0. It has a function Increment() which increments the num by 1.</p> <p>I have 2 html files Page1.html and Page2.html. Both are referring to temp.js file (). Both the pages are having a button on click of which I call a javascript and na...
javascript
[3]
4,479,318
4,479,319
applyTransformation method not invoked in custom animation
<p>The applyTransformation method in my custom Animation is somethimes not being called after I started my animation with view.startAnimation(myAnimation). Is this a known issue?</p>
android
[4]
1,130,617
1,130,618
What should be the Roadmap for JAVA EE
<p>I have done Java SE and want to start JAVA EE. But i am very confused, from where i have to start .So please tell me the roadmap from where to start Java EE ?</p>
java
[1]
3,855,346
3,855,347
Duplicate a DB file[Android]
<p>I'm working with an application that has to download a huge amount of data and insert them to database . I had it to work on a thread . But the problem is , when the thread is doing inserts , a db lock error occurs while my application reads from db . So I'm thinking about a way to avoid this : Copy the existing db ...
android
[4]
5,214,231
5,214,232
how to make select tag show options by default without clicking
<p>I had created a dropdown using <code>&lt;select&gt;</code> tag and now i want to show the options in <code>&lt;select&gt;</code> without clicking the dropdown(i mean when we open that html, we should be able to see all options instead of clicking on the select ). Is this possible using jQuery or is there any other w...
jquery
[5]
1,550,932
1,550,933
Getting response from Facebook to Android
<p>I am working on book activity App. I have to check whether the user has liked my FaceBook page. After the user pressed like button and sign in, the contents of the chapters will be opened. For that, I need to know whether the user liked my page and after that I need to open my next activity. How to get response from...
android
[4]
4,214,703
4,214,704
What to do after reading a beginner's book on C#?
<p>I am 16 years old and want to get a job in the programming field in the future. Since I will be applying for a foreign university, I want to start programming by myself and gain experience, both to increase my chances for quality education and for later employment. Last year I learned Java, but whatever motivation I...
c#
[0]
2,483,191
2,483,192
Shorter way to write my if statement in php
<p>Besides shortening the variable name, is there a shorter way to write this code. It hurts my eyes.</p> <pre><code>if($day &gt; 30 &amp;&amp; ($month == 1 || $month == 3 || $month == 5 || $month == 7 || $month == 8 || $month == 10 || $month == 12)) </code></pre>
php
[2]
2,302,157
2,302,158
ASP.NET Event OnAuthenticationFailed?
<p>Is there an event that gets fired right after ASP.NET authentication has failed to identify the user? I need to trigger an alarm every time that happens. Don't offer to implement custom membership provider nor to do it from the Login form's controller. I'm looking for native ASP.NET pipeline event. HttpApplication h...
asp.net
[9]
3,811,152
3,811,153
In JavaScript how can I use a function parameter as the key to an object?
<p>For example the following code prints </p> <blockquote> <p>{ key: 'b' }</p> </blockquote> <pre><code>function myFunc(key, value) { myFunc2({key: value}); } function myFunc2(obj) { console.log(obj); } myFunc('a', 'b'); </code></pre> <p>How would I get it to print </p> <blockquote> <p>{ 'a': 'b' }</p...
javascript
[3]
1,270,780
1,270,781
Architectural solution for jQuery - servlet - WS
<p>I have to develop an application with jQuery in the UI and which will make AJAX call to back end (servlet) which in turns calls another server which is implements restful web service and send response in XML. Servlet will pass the response back to the AJAX to create the UI.</p> <p>The UI will have several functiona...
jquery
[5]
2,294,229
2,294,230
To create generic method for various User defined class in java
<p>I am trying to achieve the following: I have this method</p> <pre><code>public String methodName(Userdefinedclass.class,Userdefinedclass obj) { //some code ......... method(Userdefinedclass.class); method2(obj); } </code></pre> <p>I want to generalise this method.</p> <p>The challenge is that the argument here...
java
[1]
5,530,515
5,530,516
C++: Repeat output i times without an explicit loop
<p>Is there is way to do so <strike>without a loop</strike> writing as less code as possible:</p> <pre><code>for (int i = 0; i &lt; 10; i++) std::cout &lt;&lt; 'x'; </code></pre> <p>Like in python:</p> <pre><code>print 'x' * 10 </code></pre>
c++
[6]
1,275,954
1,275,955
dynamical change td width with js
<p>I need to change the width of a td using javascript. The value of the width will be pulled in and then I need to multiple it to get a percentage. I just need to know how to write the js so far I have got to here but it is not working</p> <pre><code>&lt;script language="JavaScript"&gt; var divWidth = 66*0.4; docu...
javascript
[3]
4,666,981
4,666,982
Forward declaration issues
<p>Here is my issue.</p> <p>I have 2 classes which I want to implement in 1 h file</p> <p>lets call them class Foo and class Bar. My issue is that Bar has functions which have a return value of Foo and Foo has functions with a return value of Bar.</p> <p>Therefore, how do I properly forward declare these so they can...
c++
[6]
2,401,687
2,401,688
How can I replace newlines/line breaks with spaces in javascript?
<p>I have a var that contains a big list of words (millions) in this format: </p> <pre><code>var words = " car house home computer go went "; </code></pre> <p>I want to make a function that will replace the ENTER between each word with space. so the results would look like some like this:</p> <pre><code>car house ...
javascript
[3]
5,673,969
5,673,970
C# datetime midnight time Format
<p>I want to run a report where i want to pass parameters as starttime which is yesterday 12 am(midnight) and enddate as today 12 am (mid night), how to get midnight time in datetime format in c#</p>
c#
[0]