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,489,035 | 3,489,036 | Is a JavaScript object automaticaly created for every HTML id? | <p>I'm giving a JavaScript course, and one of my students came up with a weird syntax that works but I don't understand why. I understand what it does, but would like to know if it is part of the JavaScript standard to react this way, or if it's a Firefox "glitch".
The question was simply to have a paragraph turn gree... | javascript | [3] |
1,937,156 | 1,937,157 | how to read a line in C++ in a certain pattern and store it in a string? | <p>I want to read each line of txt file which resembles something like this </p>
<p>1190/2132 123/23123 45 </p>
<p>I want to read the whole line and then store them in three separate strings for future use to build a tree . I am using fgets right now , but getting errors regarding putting it into a string . How shoul... | c++ | [6] |
4,424,807 | 4,424,808 | Is there a lib to convert timestamp into time offset | <p>I am looking for a javascript library that takes unix timestamp string as an input and converts it to something like '5 minutes ago', '3 days ago', etc...</p>
<p>The purpose is to display time difference of the forum post but I don't want to apply this logic in the php script on the server, I want to send the data ... | javascript | [3] |
744,817 | 744,818 | android Not allowed to load local resource:file:///android_asset | <p>i come across a strange issue that when load html page from server, in the page contains a script that links to android sdcard js file. and it fails.</p>
<p>code like below :</p>
<p>java part code :</p>
<pre><code>String url ="http://192.168.84.86:8080/test/maw/js_load_test.html";
this.loadUrl(url);
</code></pre>... | android | [4] |
1,251,815 | 1,251,816 | Trying to list Android Bookmarks showing History as well | <p>I'm trying to list the system default bookmarks but when I run the app, it list not only the bookmarks but also show History URLs and Most Visited URLs.</p>
<p>How can I avoid this and show only the bookmarks?</p>
<p>here is the method: (imported everything necessary + permissions valid) </p>
<pre><code>public cl... | android | [4] |
1,426,374 | 1,426,375 | send sms to a particular number through Android App programmtically | <p>Actually my concept is with android application code message have to send a particular number..please any body help me..My code is</p>
<pre><code>public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
buttonSend = (Button) findViewById(R... | android | [4] |
5,520,591 | 5,520,592 | How to pass data between pages | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4100450/php-pass-non-form-variables-between-pages">PHP: Pass non-form variables between pages?</a> </p>
</blockquote>
<p>I have problem with passing data dynamically populated. The code below dynamically display... | php | [2] |
226,579 | 226,580 | why aren't the cookies saved ? | <p>why aren't the cookies saved when i run the following script:</p>
<pre><code>window.onload=init;
function init() {
var userName="";
if(document.cookie != "") {
username=document.cookie.split("=")[1];
}
document.getElementById("name_field").value = username;
document.getElementById("name_field").onblur = setCo... | javascript | [3] |
1,196,774 | 1,196,775 | Android: How I get amplitude from mediaplayer? | <p>I need to get amplitude from mediaplayer.</p>
<p>I try to use AudioManager, mAudioManager.getStreamVolume( AudioManager.STREAM_MUSIC );
but is not my need.</p>
<p>Thanks.</p>
| android | [4] |
2,091,502 | 2,091,503 | creating a multiplication table in python with user input | <p>I am extremely new to python so my question might seem a bit too trivial but believe me, its like rocket science right now for me. So, here it is. I have to create a program that reads single line of user input containing an integer, and print out the multiples of that number up to 12 times that number. For example:... | python | [7] |
4,152,678 | 4,152,679 | How Can i Call an application which is on Desktop? | <p>I have a Server
basically Apache Tomcat Server</p>
<p>My Desktop is connected to the server</p>
<p>I want my request which comes from browser to be redirected to the Desktop Via server</p>
<p>Can any one tell me how can i do it?</p>
<p>I got my solution...
I amUsing RMI or even Socket Programming is an option t... | java | [1] |
620,692 | 620,693 | Using VLSM, design an IP subnetting solution given the single class B IP addres | <p>Given: 130.0.0.0</p>
<p>and subnets:</p>
<p>A - 31000 hosts<br>
B - 16000 hosts<br>
C - 8000 hosts<br>
D - 4000 hosts<br>
E - 1500 hosts<br>
F - 120 hosts<br>
G - 60 hosts<br>
H - 10 hosts </p>
<p>I know and understand how to calculate for A - E... but I can't with F - H because it belongs to class C already.<br... | asp.net | [9] |
3,324,010 | 3,324,011 | How to get the index of particular view OR ViewGroup which is added to the ViewGroup(layout) | <p></p>
<pre><code><TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_margin="24dip"
android:text="Add Notes" />
<TableLayout android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_marginLeft="24dip"
android:layout_... | android | [4] |
3,197,294 | 3,197,295 | Want to develope multiple apk to upload on google play for single application of indic font | <p>I am developing indic font application for android but some devices not able to render indic fonts for that I am going to use images of indic text ,that will created on server side and my application going to fetch it at runtime this thing is doable for me.</p>
<p>I want to make two apk for upload on google play.</... | android | [4] |
4,631,396 | 4,631,397 | iPhone:How to insert placeholder in UITextView? | <p>Is there any way to insert placeholder in UITextView like UITextField i iPhone?if yes,then please send me any link or any idea to develop this functionality.</p>
<p>Thanks in advance.</p>
| iphone | [8] |
2,546,919 | 2,546,920 | android eclipse plugin can't find valid paths | <p>I just installed the latest galileo eclipse release. I added the
latest adt plugin and configured it to use my android sdk (r4).
Unfortunately, the eclipse plugin is wiggin out. for some reason, it
can't find(execute?) the android tools. I get this error on the
eclipse project:</p>
<blockquote>
<p>Error execut... | android | [4] |
1,977,449 | 1,977,450 | Static initializer on a inner class? | <p>How to allow static initializer on a inner class like this:</p>
<pre><code>public class MyClass {
public class InnerClass {
static {
// do something
}
public bar(){
// do something
}
}
// method stuff
public void foo() {
// do somethi... | java | [1] |
3,431,412 | 3,431,413 | Why can only newest button work ? I find that other button's onclick function is null | <pre><code>function B(sName) {
this.name = sName;
}
B.prototype = {
instanceCreatButtonCount: 0,
funA: function () { // alert instance's name
alert(this.name);
},
funB: function () { // create a button which clikced can alert this instance's name through funA;
var that = this;
... | javascript | [3] |
4,898,296 | 4,898,297 | c2Dm Registration | <p>when install the application on the phone it did not get the registration id of c2dm of first time .when run on the second time it will be get the registration id of the phone.whats problem.Please help me.</p>
| android | [4] |
1,529,466 | 1,529,467 | How can i make an API wrapper for a HTTP service that uses json? | <p>I want to make a HTTP wrapper for twitch.tv in python. How would I do this? I know how to use HTTP GET and that's about it. I would like it to work like this:</p>
<pre><code>import twichtvwrapper
twich = twichtvwrapper(useragent, username, password).
channel = twich.channel(channelname)
</code></pre>
<p>then all t... | python | [7] |
2,837,783 | 2,837,784 | How to cast vector<unsigned char> to char* | <p>I have a buffer like this:</p>
<pre><code>vector<unsigned char> buf
</code></pre>
<p>How can I cast it to char*?</p>
<p>If I do:</p>
<pre><code>(char *)buf
</code></pre>
<p>I get this error:</p>
<pre><code>/home/richard/Desktop/richard/client/src/main.cc:102: error: invalid cast from type ‘std::vector<... | c++ | [6] |
2,584,903 | 2,584,904 | How does Python sort a list of tuples? | <p>Empirically, it seems that Python's default list sorter, when passed a list of tuples, will sort by the first element in each tuple. Is that correct? If not, what's the right way to sort a list of tuples by their first elements?</p>
| python | [7] |
2,716,705 | 2,716,706 | Can not set UISwitch outside of controller class | <p>The iphone program is set up in the Utility Application model where you have a root view and two subviews (mainViewController & flipsideViewController) which are outlets. </p>
<p>If I try to set the UISwitch at rootViewController's viewDidLoad (with [flipsideViewController.switchInstance setOn:YES]), it doesn'... | iphone | [8] |
2,906,987 | 2,906,988 | onDownload complete notification - inapp purchase in Android | <p>In my Android application I am downloading a video through an application purchase from <a href="http://en.wikipedia.org/wiki/Urban_Airship" rel="nofollow">Urban Airship</a>.</p>
<p>When I click a particular button in my application the downloading gets started. In such a case, after the download completes fully I ... | android | [4] |
4,873,907 | 4,873,908 | prepend $ to a string to make it a variable | <p>How do I prepend the $ sign to a string to make it a variable?</p>
<pre><code>Eg:
$consumer = array()
$industrial = array()//These 2 are in a separate include file.
$var = $_GET['val'] // value here is 'consumer'
function ('$'.$var,$bar) //I'm trying to make consumer -> $consumer
</code></pre>
| php | [2] |
232,083 | 232,084 | IntSetArray implementation in c++ | <p>i have trying to imlement IntSetArray in c++ it compiles fine but result is wrong first 300 is ok and other numbers are below zero something very strange numbers .e.g -8231313 something like this)
what is wrong? it is code</p>
<pre><code>#include <iostream>
using namespace std;
int quantity=10;
class ... | c++ | [6] |
2,470,281 | 2,470,282 | How to change "ddd" datetime format to a number view | <p>I want to make that code to show me a current datetime on my pc clock when i click a button... i did it with that code listed down. But here is my question how can i make the "ddd" (day of a week) to be shown in number, not in words, I mean:
00-sunday
01-monday
and etc. ...</p>
<p>This is my code for the button:</p... | c# | [0] |
4,923,320 | 4,923,321 | Searching the Nested file | <p>How to serach for file inside nested folders?</p>
| asp.net | [9] |
3,531,524 | 3,531,525 | Python: loop through a file for specific lines | <p>I have the following lines in a file where I want to take the third column; In the file I don't have the numbers column:</p>
<ol>
<li>Red; Blue; Green; White; Orange;</li>
<li>Green; White; Orange;</li>
<li>Blue; Green; White;</li>
<li>Red; Blue; Green; White;</li>
<li>Blue; Green; White; Orange;</li>
<li>Orange</l... | python | [7] |
56,164 | 56,165 | Feature panel hover changer effect | <p>Haven't seen this before so hopefully someone has a easy solve, I have a 3 feature panel divs side by side, what I want happen is the 1st panel has a "hover" class added so I can change the background etc and then on a timed interval the hover class jumps to the next panel then the next panel then back to the start ... | jquery | [5] |
5,777,328 | 5,777,329 | Can pages loaded into an iframe from another domain be scrolled via JavaScript? | <p>If yes, could you please show me an example of how to do it?</p>
| javascript | [3] |
4,190,093 | 4,190,094 | android, Samsung 10.1, drawable image resizes | <p>I'm developing an app for Samsung 10.1.
Pictures are stored in drawable-hdpi folder.</p>
<p>when I use ImageView to show the picture, the image is somehow resized.
for example, 1280x60 size image is shown as a 853x43 image.</p>
<p>Any idea why the image is resized and how to prevent resizing?</p>
| android | [4] |
1,103,317 | 1,103,318 | C# + PostScript | <p>Is there a way to implement PostScript like page display for text files in C#??</p>
<p>ie a Print Preview for a bunch of text in a web page.
The requirement is to show a Print Preview like in Google Docs for a text displayed inside a label.</p>
| c# | [0] |
617,599 | 617,600 | Content Provider multiple app flexibility | <p>I've been training myself up in Android development. I have an idea for a series of apps that all relate to the same basic data store which stores similar/related hobby data. I suppose in my mind access to this data should be similar to how many apps make use contacts. So I started reading up on content providers bu... | android | [4] |
2,604,437 | 2,604,438 | Why is my string to string comparison failing? | <p>Ok so I have an Android app where I want to check to see if an app name that is installed matches a string passed to the function containing this code. The code and example is below:</p>
<pre><code>private Boolean checkInstalledApp(String appName){
PackageManager pm = this.getPackageManager();
Intent mainI... | android | [4] |
25,204 | 25,205 | How to detect co-ordinates of mouse pointer over a div | <p>Suppose there is a DIV with the following properties:</p>
<pre><code>top:100;
left:100;
height:200;
width:200;
</code></pre>
<p>Now, when i position the mouse pointer in the browser at co-ords(105,210), it means that the mouse pointer is on the div at (5, 110). So this is the thing that i want to calculate using <... | jquery | [5] |
3,145,978 | 3,145,979 | How to get default system style on C# progressbar | <p>In Windows Vista & 7 progressbars are green and have a glassy finish. But the one served up by Visual Studio 2010 has the system default of blue highlight (which appears flat and looks a bit Windows 98).</p>
<p>How do I get that glassy green look (or whatever the user's theme default is)?</p>
<p>(Using C# v4.... | c# | [0] |
1,443,751 | 1,443,752 | want to know about webapplication urls | <p>Im running a web application in visual studio 2008...
while running, my first web page url is <em>http://localhost/ABC/default.aspx</em>
while i run this in another system, it is <em>http://localhost:2435/ABC/default.aspx</em>
Really eager to know what is this all about...
because the images in root folder are displ... | asp.net | [9] |
2,899,155 | 2,899,156 | ajax autosuggest | <p>i can use auto-suggest with the text box <code>txtCode</code> like this...</p>
<pre><code>as_jsonReportingTo = new bsn.AutoSuggest('<%= txtCode.ClientID %>', optionsRe);
</code></pre>
<p>Now I will create text boxes dynamically, i want to bind autosuggest with the new created text boxes. What should I do?</p... | asp.net | [9] |
2,240,054 | 2,240,055 | How is the call getApplicationContext which returns a context type used in applications? | <p>I'm new to java and android development. After spending few days working with java I started with android development. I've this question with regards to the Context class.</p>
<p>Context is a abstract class. Which cannot be instantiated and cannot be used to call methods unless it refers to a concrete subclass. Ca... | android | [4] |
5,662,294 | 5,662,295 | Is it a good practice to calculate and override hashCode once for ever | <p>I work with the OpenSource OODB <a href="http://community.versant.com/Downloads.aspx" rel="nofollow">db4o</a> and my serialized classes inherit from a common abstract.class which have two fields :</p>
<pre><code>. . .
private final Long timeCreate = (System.currentTimeMillis() << 20) + (System.nanoTime() &... | java | [1] |
5,176,371 | 5,176,372 | How can I loop through a string, replacing sections that match a pattern? | <p>I have the following HTML markup</p>
<pre><code><p>xxxx</p>
<pre>xxx</pre>
<p>xxxx</p>
<pre>yyy</pre>
</code></pre>
<p>I need to be able to change this to:</p>
<pre><code><p>xxxx</p>
<pre>ABC xxx ABC</pre>
<p>xxxx</p>
<pr... | c# | [0] |
2,987,445 | 2,987,446 | PHP:Can't retrieve line by line text from a text file with php | <p>I have a text file in my server which changes dynamically and i wanted to print specific line of the text file in my php page also i wanted to trim the current line.
For example,Assume data.txt</p>
<pre><code>score=36
name=Football Cup
Player=albert
</code></pre>
<p>and i wanted to print like this in my page<br>
... | php | [2] |
4,104,187 | 4,104,188 | Can someone PLEASE find an error with this regular expression code? I used it to validate an email | <p>Is there a problem with this regular expression? I've got jquery enabled and all that, so nothing is a problem, except this regex doesn't work, for some reason. Thanks!</p>
<pre><code>var thereg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
return thereg.test($("email").value);
</code></pre>
| javascript | [3] |
4,288,329 | 4,288,330 | Creating Objects with jQuery: String Concat or Methods? | <p>When dynamically creating DOM objects in jquery is it better to use pure string concatenation or should I use the jquery methods? Which is the more "jQuery way"?</p>
<pre><code>var tr = $('<tr/>').addClass('foobar');
// or $('<tr class="foobar"/>');
tr.append('<td>' + someobj.property + '</... | jquery | [5] |
1,780,888 | 1,780,889 | Function not recognized from jQuery | <p>I've got a .js file that has this function in it:</p>
<pre><code>function showDialog(divID)
{
alert("got here");
var dialogDiv = $(divID);
dialogDiv.dialog
(
{
bgiframe: true,
modal: true,
autoOpen: false,
show: 'blind'
}
)
... | jquery | [5] |
606,350 | 606,351 | Graceful exiting of a program in Python? | <p>Hey all, I have a script that runs as a </p>
<pre><code>while True:
doStuff()
</code></pre>
<p>What is the best way to communicate with this script if I need to stop it but I don't want to kill it if it is in the middle of an operation?</p>
<p>Thanks!</p>
| python | [7] |
151,246 | 151,247 | How to make thread safe to servlet | <p>This questoion is realeated to the J2ee </p>
| java | [1] |
3,123,894 | 3,123,895 | A Java bounds-checking optimization example | <p>I have read that some of the JVMs out there can optimize code execution by removing bounds checking. What I am trying to figure out is what coding technique will work better.</p>
<p>In method <strong>example1</strong> below would the JVM ever figure it out and eliminate the bounds checking of the <strong>source[in... | java | [1] |
503,501 | 503,502 | Java regex to extract version | <p>I am trying to write a java regex to strip off java version from string I get from java -version command.</p>
<p>If the string is <code>"java version 1.7.0_17"</code> I need to extract 1.7 and 17 separately. Suppose if the string is <code>"java version 1.06_18"</code> I need to extract 1.06 and 18. Where first stri... | java | [1] |
4,060,295 | 4,060,296 | FadeIn element with .before Jquery | <p>How do I fade in an element after using jquery's .before?</p>
<p>jQuery </p>
<pre><code>$('.button').on("click", function(event){
var html = '';
html = '<div class="row new">Test</div>';
$('.content .row:first').before(html);
});
</code></pre>
<p>HTML</p>
<pre><code><a class="button">... | jquery | [5] |
5,054,948 | 5,054,949 | How can I cast double[] to System.Windows.Media.DoubleCollection? | <p>Is there any way to to it without copying values?</p>
| c# | [0] |
494,478 | 494,479 | Use accelerometer or not? | <p>I am developing my first app for Android, and I wanted to know whether it is feasible to use the accelerometer.<br>
I have heard that not all Android phones come built with an accelerometer. Is this true?<br>
If it is true, then is there a way for a customer to know (via Android market) that an accelerometer is requ... | android | [4] |
340,028 | 340,029 | Increasing security on imageUpload, issues with img src="image.php" | <p>Cant seem to get the php script to execute and fetch the image script, the image placeholder.jpg is sored outside of the public_html webroot, here is what i do</p>
<p>Show image .php file</p>
<pre><code><img src="image.php?image=<?php echo urlencode('placeholder.jpg') ?>"/>
</code></pre>
<p>image.php<... | php | [2] |
2,023,014 | 2,023,015 | " Couldn't get connection factory client" Android Problem | <p>Is there anybody solved this problem or stil is a bug? I checked <a href="http://groups.google.com/group/android-developers/browse_thread/thread/94e3d0454612d143" rel="nofollow">google site</a> but no good news..</p>
| android | [4] |
4,581,984 | 4,581,985 | Stanford CS106a: some java applet errors that do not allow to run the programs | <p>Wasnt able to solve the problems in this screen.</p>
<p><a href="http://s8.postimage.org/n5osf76ed/qestions.jpg" rel="nofollow">http://s8.postimage.org/n5osf76ed/qestions.jpg</a></p>
<p>All the code worked a month ago.
What have I changed: I have a different version of eclipse (now: Eclipse IDE for Java Develop... | java | [1] |
1,174,284 | 1,174,285 | Displaying <a> in Text-box value | <p>I am trying to display in a textbox value but it not displaying properly.</p>
<p>I am fetching following code from database</p>
<pre><code><a href="http://www.test.com" target="_blank">Click Me</a>
</code></pre>
<p>When i am displaying value in textbox it displays like</p>
<pre><code><input type=... | php | [2] |
5,813,356 | 5,813,357 | Can we detect what function to call on fly from parameters given at runtime? | <p>Say we have <code>N</code> function overrites, we receive argunments array, parsed it into some types (say first time we get <code>int</code>, <code>string</code>, <code>string</code>; second time we get <code>int</code>, <code>int</code>, <code>int</code>); Now we want to call for first set of arguments our <code>c... | c++ | [6] |
3,494,850 | 3,494,851 | How to programmatically trigger the click on a link Using jquery? | <p>How to programmatically trigger the click on a link using jquery?</p>
| jquery | [5] |
4,238,193 | 4,238,194 | Initialise a std::vector with data from an array of unions | <p>How might I initialise a std::vector from an array of structs, where the struct contains a union of different types. In other words, the array is used to store a number of values of a specific type, which can be int, char* etc.</p>
<p>This is my solution so far but I'm looking for a better approach:</p>
<p>The con... | c++ | [6] |
1,081,834 | 1,081,835 | Internet availability checking in android | <p>In my application there are 20 activities and about 30 webservice calls.I need to check that internet availability before calling the webservice.I think calling Networking availability function on every time before calling each webservice is not an efficient way.whats the efficient way to check Internet?</p>
| android | [4] |
891,650 | 891,651 | Best library/api for 2D android game development? | <p>I am looking into creating a 2D game for android.</p>
<p>Searching the web I see all kinds of libraries and game engines for this.
But, I don't see any one that stands out, or is most used.</p>
<p>What have you used, and what was good/bad about them?</p>
<p>Thanks for your help!</p>
| android | [4] |
2,677,594 | 2,677,595 | How to Cache css/js in one file and call that file from cache folder? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/10587376/cache-css-and-js-in-cache-folder-and-call-css-from-that-folder-is-it-possible">Cache css and js in cache folder and call css from that folder is it possible?</a> </p>
</blockquote>
<p>How to Cache css/j... | php | [2] |
2,884,187 | 2,884,188 | A text box appears when I load the page even though I have set its "style:display" to none | <pre><code><input type="text" name="otherPONumber" id="otherPONumber" maxlength="25" style="display: none;">
<script type="text/javascript">
function toggleField(val) {
var obj = document.getElementById('otherPONumber');
if(obj != undefined && txt != undefined) {
(val == 'Other... | javascript | [3] |
2,394,972 | 2,394,973 | List of lists value in dictionary? | <p>Input file 'test.txt':</p>
<pre><code>a 2012 fff
b 2011 ttt
a 2011 fff
b 2012 sss
a 2011 vvv
</code></pre>
<p>I have determined the following code to populate dictionary and sort values:</p>
<pre><code>from collections import defaultdict
res = defaultdict(list)
with open('test.txt','r') as file:
for line ... | python | [7] |
2,489,503 | 2,489,504 | How to retrieve an object from a Python Dictionary | <p>I'm trying to retrieve an object that I've placed into a dictionary, but every time I try to retrieve it I receive an error:</p>
<pre><code> class CSVEntry:
lat = []
lon = []
count = 0
# Create dictionary for tracking inputs
dict = defaultdict(list)
# Lookup the zipcode (returns an integer valu... | python | [7] |
2,903,818 | 2,903,819 | How to display a 2D table in java | <p>I try do disply a 2 D table but for some reason I can't, I don't see what i wrote wrong.</p>
<p>This is my code (I am working in vim):</p>
<pre><code> int [][] tab = new int [5][5];
for (int i= 0; i<tab.length ; i++){
for (int j =0; j<tab[i].length; j++){
... | java | [1] |
1,401,127 | 1,401,128 | How to get opposite boolean value of variable in Javascript | <pre><code>var a = true;
</code></pre>
<p>How to get opposite value of <code>a</code> (false) and vice versa?</p>
| javascript | [3] |
4,630,931 | 4,630,932 | How to save the contents of Data URI to image | <p>In Google Chrome the <strong>'chrome.tabs.captureVisibleTab(integer windowId, function callback)</strong>' method will return a data URL of the JPEG encoding of the visible area of the captured tab.</p>
<p>We want to save that content as image to hard disk without opening/passing the contents into new html page.</p... | javascript | [3] |
201,647 | 201,648 | Create a 3D array from a list | <p>I have the following list:</p>
<blockquote>
<p>1945/01/05 BA 87 34 1 59 50<br>
1945/01/05 CA 18 17 45 49 82<br>
1945/01/13 BA 6 66 1 16 48<br>
1945/01/13 CA 40 60 32 50 80</p>
</blockquote>
<p>and so on.... </p>
<p>I want to arran... | php | [2] |
2,027,703 | 2,027,704 | what is a commandline argument? | <p>I am a newcomer to python (also very sorry if this is a newb question but) i have no idea what a command line argument is. when <code>sys.argv</code> is called, what exactly are the arguments? Any help with understanding this would be a great service.</p>
| python | [7] |
2,573,168 | 2,573,169 | select last elements from parents | <p>I'm quite new to JQuery so this is probably an easy one...</p>
<p>Consider this HTML structure - I know it is not valid HTML but that's not the point:</p>
<pre><code><table id="mytable">
<tr>
<td><input type="checkbox" checked="checked" /></td>
<td>1.2</td>
<... | jquery | [5] |
4,287,208 | 4,287,209 | how to handle while loop and calculate multiple values | <p>hi im running a query to get total number of minutes used in a conversation in an hour on cell
query is</p>
<pre><code>$sql="SELECT COUNT(*) calls, AVG(cd.leg2duration) avg_dur
FROM call_detail cd
WHERE cd.cid_did = '".$this->cid."' AND cd.phonetype = '8'
AND cd.leg1start_date BETWEEN '{$th... | php | [2] |
4,848,646 | 4,848,647 | Getting .focus() to work in jQuery 1.4.2? | <p>I am trying to validate an input field when it loses focus and re-focus the field if the validation fails. But I cannot seem to get the field to re-focus. I have written a test case at <a href="http://jsbin.com/ahepo/edit" rel="nofollow">http://jsbin.com/ahepo/edit</a> . It is failing in Firefox 3.6.2 and IE 8, but ... | jquery | [5] |
2,193,337 | 2,193,338 | JavaScript: Rotate Polys | <p>My code doesn't work right:</p>
<pre><code>function rotate(Points, Angle) {
for (var i=0; i<Points.length;i++) {
Points[i] = [Math.cos(Angle) * Points[i][0] - Math.sin(Angle) * Points[i][1], Math.sin(Angle) * Points[i][0] + Math.cos(Angle) * Points[i][1]];
}
return Points;
}
rotate([[0, 0],... | javascript | [3] |
5,793,196 | 5,793,197 | PHP validation form data | <p>I've 10 fields,when user submits forms,i need to validate the data in form.</p>
<p>Two things,</p>
<ol>
<li><p>To check whether fields is empty.</p></li>
<li><p>Validating data,if present.</p></li>
</ol>
<p>x would allow only spaces,underscore,aplha numeric characters
y will check whether it is an image or not.</... | php | [2] |
4,122,587 | 4,122,588 | Software metric tool for Python | <p>I want a tool which can compute source code metrics such as lines of code, number of packages, classes, functions, cyclomatic complexity number, depth of inheritance tree etc. for my Python Code.
I have tried pylint, but it didn't offer much metrics.
pynocle seemed interesting but I dont know how to use it.</p>
<p>... | python | [7] |
826,840 | 826,841 | Python version recommendation | <p>I have developed some internal tools at work using Python. I have been using version 2.5 (or 2.6/2.7) for that and my personal projects as they would work fine with Django and GAE. My question is - should I be switching to version 3 or shall I wait and continue to work with 2.5/2.6/2.7. How stable is 3.0 as compared... | python | [7] |
4,901,434 | 4,901,435 | How to replace string in iPhone | <p>How do I search-and-replace the following string:</p>
<blockquote>
<pre><code> & ââÄô &’&lsquo;*amp;nbsp;
</code></pre>
</blockquote>
<p>Right now I'm trying</p>
<pre><code>NSString *str = [string stringByReplacingOccuranceOfString:@"&" withString:@"&"];
</code></pre>
<p>Can anyone help ge... | iphone | [8] |
3,303,716 | 3,303,717 | TraceView Android | <p>Before putting this question i have seen following links </p>
<p><a href="http://stackoverflow.com/questions/4850974/how-to-use-traceview-in-eclipse-for-android-development">how to use traceview in eclipse for android development?</a></p>
<p><a href="http://stackoverflow.com/questions/6491855/android-cant-use-trac... | android | [4] |
448,687 | 448,688 | PHP submit form button question | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/218907/how-to-handle-multiple-submissions-server-side">How to handle multiple submissions server-side</a> </p>
</blockquote>
<p>How can I stop the submit form button from being pressed multiple times resulting i... | php | [2] |
6,015,893 | 6,015,894 | How to get 12.6 with a=10.3 and b=2.3? | <p><a href="http://jsfiddle.net/DYKJB/2/" rel="nofollow">Tried</a> :</p>
<pre><code>var a=10.3;
var b=2.3;
alert(a+b);
</code></pre>
<p>but I get <code>12.600000000000001</code>. I know JavaScript is loosely typed, but I hope I can do a sum :)</p>
| javascript | [3] |
789,050 | 789,051 | Forms with a variable number of fields | <p>I'm attempting to create a sort of marketplace. Each item on the market has a type (i.e. the item being sold), a value, a quantity, a seller name, and an id, and all of this information is stored in a MySQL database.</p>
<p>When the user views the market, all entries in the market are returned. In addition, an inpu... | php | [2] |
4,841,020 | 4,841,021 | Variable passed to each() is not an array or object | <p>I really don't understand why I'm getting this error or how to fix it!
Variable passed to each() is not an array or object on line-</p>
<pre><code>while(list($key,$value) = each($_FILES['images']['name']))
</code></pre>
<p>Full code-</p>
<pre><code>$max_no_img=4; // Maximum number of images value to be set here
$... | php | [2] |
1,822,241 | 1,822,242 | How to modify private static variable through setter method | <p>I have the following variable in a class named Example:</p>
<pre><code>private static int number;
</code></pre>
<p>If I wanted to assign the variable a number using an outside class, which would I do?</p>
<p>1) Make the setter method in Example static so I can access it like this: </p>
<pre><code>Example.setNum... | java | [1] |
1,161,038 | 1,161,039 | Shell exec file runs in background process ??? | <p>Using ShellExec process, I have run a file with one argument. arguments we will get from a single txt file. That txt file has more than 75000 lines. So that file will run 75000 times. At that time, will the server handle that process??? </p>
| php | [2] |
623,324 | 623,325 | jQuery .get doesn't work in IE7 | <p>I have the following code which gets the top three pieces of news from a page (news.html). It works fine in all other browsers (IE8, FF, Chrome), except in IE7 where it loads the whole page rather than just the top 3 news. Have been googling all around, no help. So hopefully one of you could tell me where the proble... | jquery | [5] |
5,869,140 | 5,869,141 | Progress dialog in async task is not shown anymore after screen rotation | <p>I am using an async task for uploading pictures to a remote server. To show the progress to the user I am using a progress dialog. This progress dialog is created at the preExecute method of the async task class.</p>
<p>When the user rotates the screen, the progress dialog disappears but the async task is still run... | android | [4] |
2,383,705 | 2,383,706 | JavaScript constructor and prototype object | <p>I am curious as to what's going on here. As you can see, I have defined a constructor function called <code>range</code> to build new <code>range</code> objects. I've extended the <code>range</code> constructor through it's prototype, adding a simple <code>includes</code> method. I've created my new object and us... | javascript | [3] |
2,313,457 | 2,313,458 | close the command interpreter | <p>my requirement is the follwing.
I run the batch file using java code.
The batch file does the following</p>
<ol>
<li>one xml file using java and it takes some time.</li>
<li>After xml file is run the applet is displayed.</li>
<li>If the applet is closed manually then the command prompt will close.</li>
<li>I need t... | java | [1] |
1,063,017 | 1,063,018 | How do I simulate a scrollbar click with jQuery? | <p>How do I simulate a scrollbar click with jQuery? So, if a user clicks on a div that says "scroll down," it'll be the exact same behavior as if he/she clicked on the down arrow of the browser's scrollbar. Using the current browser's behavior would be optimal, vs. doing something like <code>$.browser.scrolldown(200,... | jquery | [5] |
3,558,652 | 3,558,653 | Open source C# examples of good code/spagetti code | <p>I'm looking for some code projects/examples that would be considered really good C# code and some that would be considered really bad/spaghetti deluxe code.</p>
<p>All links and ideas on where to find these kinds of examples are welcome.</p>
<p>/P</p>
<p>Edit: Code snippets are always nice. But What I'm really lo... | c# | [0] |
5,951,915 | 5,951,916 | jQuery animate when mouseover and mouseout | <p>I have the following code which moves a <code>DIV block</code> 20px down on mouseover:</p>
<pre><code>$('.outerDiv').mouseover(function()
{
$(this).animate({marginTop: "+=20px",},500);
});
$('.outerDiv').mouseout(function()
{
$(this).animate({marginTop: "-=20px",},500);
});
</code></pre>
<p>... | jquery | [5] |
4,067,515 | 4,067,516 | Why is possible to call nonstatic member-function without an object instance? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2533476/what-will-happen-when-i-call-a-member-function-on-a-null-object-pointer">What will happen when I call a member function on a NULL object pointer?</a> </p>
</blockquote>
<p>Well I think this code and prog... | c++ | [6] |
519,157 | 519,158 | Why this message: does not contain a definition for 'Controls' and no extension method 'Controls' accepting a first argument | <p><strong>Hi,</strong></p>
<p>What I'm doing is a method to display images from a specific folder but when I debug I'm getting this error on the last line of code and I have no idea why.**</p>
<pre><code>Error 3 'MBKiosk.classTools' does not contain a definition for 'Controls' and no extension
method 'Controls' ... | c# | [0] |
1,498,770 | 1,498,771 | Android: Customize Calling Screen | <p>Anybody knows how to Customize Calling Screen for incoming and outgoing calls?</p>
<p>Any sample code would be of great help.</p>
| android | [4] |
4,631,978 | 4,631,979 | python: class attributes and instance attributes | <p>I'm new to python and learned that class attributes are like static data members in C++. However, I got confused after trying the following code:</p>
<pre><code>>>> class Foo:
... a=1
...
>>> f1=Foo();
>>> f2=Foo()
>>> f1.a
1
>>> f1.a=5
>>> f1.a
5
>>&... | python | [7] |
5,282,211 | 5,282,212 | Hide Navigation Links From Non-Members | <p>I have an include file that stores the navigation links for my website. I just built a members-only section and I would like to make it so that some of the links in the navigation bar are visible only if someone is logged in. What are some good ways of going about doing this?</p>
| php | [2] |
3,415,496 | 3,415,497 | python working with files as they are written | <p>So I'm trying to create a little script to deal with some logs. I'm just learning python, but know about loops and such in other languages. It seems that I don't understand quite how the loops work in python. </p>
<p>I have a raw log from which I'm trying to isolate just the external IP addresses. An example line:... | python | [7] |
618,988 | 618,989 | Why is getProperty returning null via PHP ReflectionClass | <p>I am making a new <code>ReflectionClass</code>, then setting the protected property <code>_products</code> to accessible. It is always returning <code>null</code> Am I doing something wrong here? I am on 5.4.11</p>
<pre><code>$project = new ReflectionClass( $instance_of_object );
$property = $project->getProper... | php | [2] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.