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,910,249
3,910,250
Whats wrong with this jquery variable
<p>I'm kinda new to Jquery but doing my best to be better. </p> <p>I have a problem with a variable, so would like to have some help. Have tried and search the web for hours but can't get it to work. </p> <pre><code>$(document).ready(function() { $("a").click(function(){ var lek = "http://dif.se/wp-conten...
jquery
[5]
2,881,340
2,881,341
Java application - which all parts of my code are being fired up in production?
<p>I have a java web based application running in production. I need some way to be able to see which all parts of the code is being actually used, by the actions of the end user. </p> <p>Just to clarify my requirement further. </p> <ol> <li><p>I do not want to put a logging based solution. Any solution that needs m...
java
[1]
5,913,210
5,913,211
Execute PHP Code from File On Other Computer
<p>Is it possible, to include PHP code in a separate file on another computer. If so, how?</p> <p>For example:</p> <p>On the first computer:</p> <pre><code>#Host 1 Script $username = "dfgd"; $password = "sdff"; #Code I need help with </code></pre> <p>And then on the second:</p> <pre><code>#Host 2 Script #Code wh...
php
[2]
3,851,748
3,851,749
I need an explanation of when to use class variables?
<p>Suppose we have a class like:</p> <pre><code>public class test { int a=1; static int b=1; public int getA() { return a; } public void incrementA() { a++; } public void incrementB() { b++; } public int getB() { return b; } } </code></pre> <p>and I have a class with m...
java
[1]
3,702,902
3,702,903
Is there an Android Testing Service I can use to give me real debug information from a device?
<p>I need test my Android app on a Motorola Cliq but don't have one. Is there a testing service that will let me make a debug connection to that device so I can run some tests and find out where the code is failing. Video connections won't tell me that.</p>
android
[4]
682,442
682,443
I want to change MAC address of android device?
<p>I am getting MAC address of devices using wifi interface:</p> <pre><code>WifiManager wifiMan = (WifiManager) this.getSystemService( Context.WIFI_SERVICE); WifiInfo wifiInf = wifiMan.getConnectionInfo(); String macAddr = wifiInf.getMacAddress(); </code></pre> <p>Is there any way for retrieve mac add...
android
[4]
1,050,176
1,050,177
jQuery Calculation Problem
<p>I've been struggling trying to get jQuery to make a calculation for me, and i'm kinda pulling my hair out a bit now!</p> <p>I need to make a calculation to work out the theoretical weight of a given amount of steel sheets based upon the quantity and the dimensions. The output will be a weight in kg.</p> <p>The equ...
jquery
[5]
2,986,870
2,986,871
How does the regular expression match 3 in JavaScript?
<p>This is a statement from JavaScript regular expression description:</p> <blockquote> <p><code>^</code> has a different meaning when it appears as the first character in a character set pattern.<br> For example, <code>/[^a-z\s]/</code> matches the <code>'3'</code> in <code>"I have 3 sisters"</code>.</p> </blockq...
javascript
[3]
5,111,156
5,111,157
How can I remove some characters from a C# string?
<p>I have the string:</p> <pre><code>http://127.0.0.1:96/Cambia3 </code></pre> <p>The number 96 could be anything from 75 to 125. </p> <p>Is there a simple way that I could remove this number to get:</p> <pre><code>http://127.0.0.1/Cambia3 </code></pre>
c#
[0]
636,155
636,156
How to have app talk to a web page, ie send gps location
<p>I'm trying to write a app, where a webpage will have a button that when press will give the GPS location of the phone.</p> <p>I was going to have the android app create a thread that waits on a scket connection. The issue is that 1. Getting the ip addrs of the phone 2. I was told this would really drain the battery...
android
[4]
465,297
465,298
Is there any server configuration or anything that make __DIR__ failed
<p>I have develop a framework where most of its path depend on <code>__DIR__</code>. Is there any server configuration or anything that would make <code>__DIR__</code> unreliable?</p>
php
[2]
3,446,781
3,446,782
Create my own Unique ID
<p>I am trying to create a my own unique ID in C# for each document in my NoSQL database but I am not too sure how I would do that?</p> <p>My example UID would look something like this <code>######.entityType@######.contextName.worldName</code></p> <p>The hashes are alphanumeric characters.</p>
c#
[0]
1,461,083
1,461,084
Is this a wrapper script? What is the correct name for it? (Python)
<pre><code>execfile("es.py") execfile("ew.py") execfile("ef.py") execfile("gw.py") execfile("sh.py") print "--Complete--" </code></pre>
python
[7]
3,996,012
3,996,013
Rsa Cryptography in c#. i have encrypted an xml file and saved it
<p>Rsa Cryptography in c#. i have encrypted an xml file and saved it .after that i transferred this file to another pc .the main problem is that it couldn,t decrypt.i dont know why?? when iam decrypting on the same machine the xml file is decrypted..</p> <p><pre><code> public static byte[] decryptFile(XmlDocument Doc...
c#
[0]
659,902
659,903
PHP, included more than one time require include_once or include?
<p>I'am asking myself why should i use include or include_once.</p> <p>I know there is a question <a href="http://stackoverflow.com/questions/186338/why-is-require-once-so-bad-to-use">about it</a>, but i dont find my answer in it.</p> <p>In my case my problem is a little bit different, but it can summarize as followi...
php
[2]
4,822,431
4,822,432
noticed variations of %1$s being used in code, cannot google escaped charecters. Please link a resource
<pre><code>String.format("com.dummy.%1$s.", strVarName) </code></pre>
java
[1]
2,560,609
2,560,610
Android debugger in Eclipse IDE is not working properly
<p>when i proceed step by step debugging I got following things.</p> <p>Activity.class</p> <p>Class File Editor</p> <p>Source not found</p> <p>The JAR file E:\eclipse\android-sdk-windows\platforms\android-4\android.jar has no sourse attachment.</p> <p>But i have android.jar in the specified location</p> <p>This i...
android
[4]
5,457,658
5,457,659
Any danger of using PHP getimagesize function?
<p>I have this host that disables allow_url_fopen as they said it is a security risk which in turns prevents my use of getimagesize function because I am passing in a http.</p> <p>My site is on Wordpress and I am using getimagesize to pull in a image within the uploads folder of a Wordpress site which obviously contai...
php
[2]
5,685,643
5,685,644
what is apply doing here?
<p>What specifcially does <code>func.apply(this, arguments);</code> do in this code? I can see that it will not work to resize the elements dynamically without the <code>apply</code>, however, it seems as though nothing further is done with <code>this</code> or <code>arguments</code> after <code>apply</code> is used.</...
javascript
[3]
295,896
295,897
Including strings in class
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5578732/how-can-i-include-php-file-in-php-class">how can i include php file in php class</a> </p> </blockquote> <p>I have a PHP file that starts like this:</p> <pre><code>&lt;?php include("strings.php"); clas...
php
[2]
1,425,874
1,425,875
How to escape a path in PHP
<p>Basically I want to put C:\cameraTest\something\ into a single quoted string, but I'm not entirely sure how to properly escape the final backslash as it ends up escaping the single quote if I do so. Thanks for any help in advance! </p>
php
[2]
2,251,166
2,251,167
Python builtin function as keyword argument default?
<p>Are Python's built-in functions not available for use as keyword defaults, or should I be using some other way of referring to a function?</p> <p>I wanted to write a function like this:</p> <pre><code>def isPNGBlock(bytes, blockLen, pngOffset=0, pngErrorLogger=print): ... try: r.validate_signature(...
python
[7]
2,578,513
2,578,514
jQuery Animation on multiple items
<p>On the page i have multiple thumbs images, each has it's own id, generated by php.</p> <p>I need to do the jQuery animation for each element.</p> <p>I'm stuck here, how i can detect witch <code>thumb_id-??</code> the user is hovering, and animate it?</p> <p>I know i can do two simple js function for onmouseover/o...
jquery
[5]
2,197,208
2,197,209
Repeat ImageView in layout - Android
<p>I want to repeat image in a layout. Number of times the image should be repeated , will be given dynamically. Image should be displayed Horizontally. How can I do this?</p> <p>Please help me. Looking for your reply. Thanks.</p>
android
[4]
129,707
129,708
BSE/NSE quote in PHP
<p>I want to display NSE/BSE quote in my PHP website. please let me know what I have to do, if I get the webservices for this then how to use it in PHP. Please help</p>
php
[2]
4,785,296
4,785,297
Read end of line while looping word by word in c++
<p>Am reading a file which contains list of sentences , I need to read each word and try to figure out this word in which line number .. the file contains :</p> <pre><code>I am for truth no matter who tells it, I am for justice, no matter who it is for or against Malcom X </code></pre> <p>and I want the output to be...
c++
[6]
1,290,451
1,290,452
Sending a string to a Bluetooth serial port using android
<p>I need to send a string to a blue tooth serial port of a PC to a desktop application.the phone should be connected to the PC all the time.and when ever the mobile gets a call.the phone number should be sent to the PC using bluetooth.I need it in android </p>
android
[4]
1,164,863
1,164,864
How to set up a cron job via PHP (not CPanel)?
<p>How to set up a cron job via PHP (not CPanel)?</p>
php
[2]
3,220,985
3,220,986
Java : Bound mismatch error
<p>I'm learning Java and I have to create a program that implements an interface defined by the teacher to pratice ADT (using ArrayList). I got errors that I don't understand maybe new explanations can help me.</p> <p><strong>Interface :</strong></p> <pre><code>public interface A&lt;T extends C&gt; { ... } </code></p...
java
[1]
3,386,243
3,386,244
Dynamically loaded dropdownlist control doesn't fire SelectedIndexChanged event
<p>I have the control <code>dropdownlist</code> which has been loaded inside the template column of <code>RadGrid</code>.<br> While loading I have set <code>AutoPostBack='True'</code> for <code>dropdownlist</code> and also created the event <code>SelectedIndexChanged</code>.</p> <pre><code> DropDownList ddlConditions ...
asp.net
[9]
4,717,504
4,717,505
Generate a random string with a specific bit size in java
<p>How do i do that? Can't seems to find a way. Securerandom doesn't seems to allow me to specify bit size anywhere</p>
java
[1]
4,035,776
4,035,777
php date conversion
<p>How would i convert a format like:</p> <pre><code>13 hours and 4 mins ago </code></pre> <p>Into something i can use in php to further convert?</p>
php
[2]
3,047,599
3,047,600
Which MVC framework for my code
<p>MVC frameworks for javaScript (backbone ember etc) seem suited to web apps where data is the central component. </p> <p>I have a web page that has a fair amount of JS but no data at all. I'm doing lots of SVG, lots of API stuff with youTube and lots of animation. I'm using a <a href="http://is.gd/vkd07K" rel="nofol...
javascript
[3]
2,521,639
2,521,640
Best Place to Filter Inputs?
<p>I am wondering where the best place to filter user submitted input is. In regards to filter, I am talking about <a href="http://php.net/manual/en/function.filter-var.php" rel="nofollow">filter_var</a> and <a href="http://www.php.net/manual/en/function.filter-input.php" rel="nofollow">filter_input</a>.</p> <p>I've c...
php
[2]
5,845,581
5,845,582
How to load images from the Documents folder that have been saved dynamically?
<p>I have problem with loading images from the Documents folder of iPhone application into the tableView.</p> <p>In a separate request, I check on the server all the images available and download them into the "images" folder under Documents. I am pretty sure that the images are saved correctly.</p> <pre><code>NSStri...
iphone
[8]
4,659,857
4,659,858
how to create a program in java
<p>how to create a program that will sort the elements of array in ascending and descending order. sample output: Enter size: 4 Enter elements 11 26 8 30 Ascending 8 11 26 30 descending 30 26 11 8</p>
javascript
[3]
916,697
916,698
PHP: using an environment variable as a reference to a local constant
<p>My code:</p> <pre><code>const T = 'test'; const B = 'boat'; $const_var = getenv('FOO'); </code></pre> <p>In my VirtualHost section, I have:</p> <pre><code>SetEnv FOO T </code></pre> <p>Obviously $const_var evaluates to the character <code>T</code>.</p> <p>What I want to do is to be able to use the value of loc...
php
[2]
4,891,800
4,891,801
Does null have Object type?
<p>Why does this output: "inside String argument method"? Isn't null "Object" type?</p> <pre><code>class A { void printVal(String obj) { System.out.println("inside String argument method"); } void printVal(Object obj) { System.out.println("inside Object argument method"); } public...
java
[1]
3,290,156
3,290,157
NaN in multiplication
<p>I am trying this code, but i am getting NaN</p> <pre><code>a = unidade.val(); b = unitario.val(); //alert(a);5 //alert(b);50,00 $(total).val(a * b); //NaN </code></pre> <p>Why? because is a <code>int*float</code>?</p>
javascript
[3]
2,281,230
2,281,231
Toggle table row siblings
<p>I have a table structured like this:</p> <pre><code>&lt;table&gt; &lt;tr id="id1" class="parent"&gt;&lt;/tr&gt; &lt;tr class="id1"&gt;&lt;/tr&gt; &lt;tr class="id1"&gt;&lt;/tr&gt; &lt;tr class="id1"&gt;&lt;/tr&gt; &lt;tr class="id1"&gt;&lt;/tr&gt; &lt;tr id="id2" class="parent"&gt;&lt;/tr&gt; &lt;tr class="id2"&gt...
jquery
[5]
869,740
869,741
Convert NaN to 0 in javascript
<p>Is there a way to convert NaN values to 0 without an if statement:</p> <pre><code>if (isNaN(a)) a = 0; </code></pre> <p>It is very annoying to check my variables every time.</p>
javascript
[3]
5,153,534
5,153,535
Import from parent directory failed with ImportError
<p>I'm busy developing an application in python, my application is structured as follows</p> <pre><code>main.py pr/ core/ __init__.py predictor.py gui/ predictor/ __init__.py predict_panel.py __init__.py pr_app.py __init__.py </code></pre> <p...
python
[7]
5,931,339
5,931,340
textfile in string
<p>all i want is to display the contains from pageset.txt line by line.</p> <p>ok i have this code:</p> <pre><code>$lines = file('pageset.txt'); foreach($lines as $line) { // do something with $line. $hh = $line . "&lt;br/&gt;"; echo $hh; </code></pre> <p>now i want to display it line by line as you see there is <b...
php
[2]
5,916,060
5,916,061
Library for Image Filters In Android
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4280162/android-image-filter-libraries">Android image filter libraries</a> </p> </blockquote> <p>Can Anyone provide me the library file to filter image in Android like Black &amp; White, Sepia,vintage, polaroid ...
android
[4]
3,719,542
3,719,543
Read a large text file into Textview
<p>I want to read large file from sdcard into text view. I have idea but i don't know how to apply.</p> <p>I think this things need to use: Handler And Thread</p> <p>But i dont know how to apply. Anybody give some example or Tutorial.</p> <p><b>Updated:</b></p> <pre><code>Thread test=new Thread() { publ...
android
[4]
5,508,344
5,508,345
Listview using arraylist
<p>How can we create the listview using arraylist in a simple way</p>
android
[4]
5,999,891
5,999,892
Virtual Functions Dilemma in C++
<p>I have two questions to ask...</p> <p>a) </p> <pre><code>Class A{ int a; public: virtual void f(){} }; Class B { int b; public: virtual void f1(){} }; Class C: public A, public B { int c; public: virtual void f(){} // Virtual is optional here virtual void f1(){} // Virtual is optional here virtual void f2(){} ...
c++
[6]
1,230,227
1,230,228
How to call built-in camera app from my own application in Android?
<p>Being a newbie to Android I can't work out how to call the camera application (or you can say camera preview?) when I click a button in my custom application.</p>
android
[4]
2,926,114
2,926,115
Can we move the success function outside .ajax?
<p>In the jquery example , I saw it is usually to define success function inside $.ajax() can we move it outside the body.</p>
jquery
[5]
4,559,472
4,559,473
jQuery Hover not work in Chrome and Safari
<p>I have the HTML code:</p> <pre><code>&lt;span style="padding-right:100px;" class="tree_list"&gt; &lt;p&gt;Hover Here&lt;/p&gt; &lt;span class="admin_tools" id="tree_list_tool"&gt; &lt;a href="http://google.com"&gt;Google&lt;/a&gt; &lt;a href="http://facebook.com"&gt;Facebook&lt;/a&gt; &l...
jquery
[5]
149,358
149,359
sending data to server with javascript
<p>how can i send a string value to a sever with java script without submit method? i know i can use jquery or ajax but is there any other way to do that without any library? i searched in Google and i find some good links: <a href="http://stackoverflow.com/questions/5049635/how-to-send-data-to-remote-server-using-jav...
javascript
[3]
4,771,268
4,771,269
Using "eval" for user-supplied integration function?
<p>I am trying to understand eval(), but am not having much luck.</p> <p>I am writing my own math library and am trying to include integration into the library. I need help getting python to recognize the function as a series of variables, constants, and operators. I was told that eval would do the trick but how would...
python
[7]
1,713,317
1,713,318
why hackers can decrypt my encrypted Connection String in web.config(C#)
<p>My application is on the shared Hosting.I've encrypted my Connection String programmatically to make it secure. However, the hacker still is able to decrypt the encrpted Connection String adding scripts into the DB. Just wondering if there is a way to solve this problem? Many thanks !!! </p>
asp.net
[9]
4,769,760
4,769,761
Call a DOS executable file from Python
<p>Sorry if this question has been asked many times. I have a DOS .exe file. It works well by double clicking it in Windows, which generates some output files in the working folder. However, I need to call it from Python. I have tried the following commands (subprocess.Popen and os.system), but it only opens a DOS wind...
python
[7]
2,177,077
2,177,078
javascript's quotation mark question
<p>I have a very simple question.</p> <p>I have the following code</p> <pre><code>var replyName = "1"; var test = "&lt;div id=replyName&gt;&lt;/div&gt;" </code></pre> <p>I want to set the class name to replyName, what should I do?</p> <p>Thank you very much</p>
javascript
[3]
150,478
150,479
How do i use a BinaryReader im getting error?
<p>I need ot read a binary file. But getting error. How can i do it ? Im trying to explain what else can i write ?</p> <pre><code>using System; using System.IO; using System.Net; using System.Text; namespace BinaryReader { public partial class Form1 : Form1 { public Form1() { Init...
c#
[0]
5,012,709
5,012,710
Presenting a ModalViewController containing a TabBarController
<p>I have a problem with presenting and dismissing a modalViewController that contains a tabBarView controller (with two viewControllers). </p> <p>I have no problem in presenting and dismissing the modal, but I have a navbar setup at the top of each view controller with a done button that will dismiss the modal and re...
iphone
[8]
1,053,408
1,053,409
how do i print some string just below the loop simultaneously in python
<p>i want to do multi process simultaneously, for example i want to print some string just below the looping underway...</p> <pre><code>import time from threading import Thread print 'top' def foo(): for i in range(1,10): sys.stdout.write(str('\r%s\r'%i)) sys.stdout.flush() time.sleep(1) timer = Thr...
python
[7]
1,049,894
1,049,895
Is it possible to add shortcut key to button in app?
<p>I wrote an application with the multiple screens, one of the screen is LoginScreen containing two TextView's two EditText's &amp; two Buttons,</p> <p>my question is, is it possible to add a shortcut key for Button when you device has hard keyboard present.</p> <p>Best Regards, Anup</p>
android
[4]
1,027,854
1,027,855
How ASP.NET Web Pages Threading / Multi Tasking Works for Single user?
<p>This Might be a very basic Questing. (URGENT)</p> <p>I have a Web application with multiple pages.</p> <p>When a user is Logged in using Visual Studio(Development) / IIS (Production )</p> <p>If the user have opened a Page 1 from home page which is long running process (Lets say few minutes)</p> <p>Can the same u...
asp.net
[9]
1,340,162
1,340,163
What is the diifference between ScriptManager.RegisterStartupScript() and ScriptManager.RegisterClientScriptBlock(), as both does the same thing?
<p>Hi I am just wondering why some people suggest RegisterStartupScript() to call client side js while some suggests RegisterClientScriptBlock(). </p> <p>Please make me clear whats the difference between the two as they doing the same operations, for using js statement calls and which one is preferable if I only use ...
asp.net
[9]
5,539,264
5,539,265
How to open an activity using custom URI?
<p>I am trying to start an activity within my app from a custom uri returned from my service. </p> <p>For example my service is going to return me something like: "activity2". Basically I want to start the activity that has the correct filter listening for the "activity2" intent. I am kind of stuck on how I would do ...
android
[4]
4,964,055
4,964,056
how to configure the php mail function with SMTP server?
<p>I have used php mail function for sending mail to local mail id's and external mail id's. using this mail function I am able to send mail to my local mail id's but the mail function is not sending mail to external mail id's. like ss@gmail.com </p> <p>I have used the following methods to set the SMTP server address....
php
[2]
5,604,881
5,604,882
Why doesn't the value of my textbox change when I click on a radio button in ASP.NET?
<p>I'm trying to change the value of my textbox by clicking on a radio button. But when I click on that radio button, nothing happens! Does someone know why? Here is the code: </p> <pre><code>protected void rbOpgelost_CheckedChanged(object sender, EventArgs e) { tbEinddatum.Text = DateTime.Now.ToString(); } </code...
asp.net
[9]
5,069,133
5,069,134
Build a solution
<p>Why do server errors occur on running a solution, even if the solution is building successfully?</p>
asp.net
[9]
2,105,068
2,105,069
Windows service with queing
<p>I need to develop windows service, functionality is it should fetch the data from SQLServer database on specific intervals (ex: Every 4.5 mins) and pushing into the Access2003 database. But that access db is not always available, this is service needs to check the availability of access DB if it is there need to pus...
c#
[0]
5,764,519
5,764,520
Getting innerhtml value into the variable
<p>I am getting a value by using document.getElementById("forloop").innerHTML. And I am displaying that value in the file with some div id as </p> <pre><code>&lt;div id="forloop"&gt;&lt;/div&gt;. </code></pre> <p>But I want to asign that value to a variable in the file. Can you please how can I asign to the variable<...
javascript
[3]
2,737,739
2,737,740
Calling function defined in an object
<p>I have an object that defines the name and parameters of a function to be called in the click event of a page element.</p> <pre><code>object_array = [ { id: "id1", onclick: "load_file(filename.php);", }, { id: "id2", onclick: "open_url('http://url.com');", } ]; </code></...
javascript
[3]
1,041,946
1,041,947
Capturing setOnClickListener() and setOnFocusChangeListener()
<p>I'm writing an API for Android and I need to know when the developer using the API calls <code>View.setOnClickListener()</code> and <code>View.setOnFocusChangeListener()</code>. I don't want to override either because that would mean to extend <code>View</code> and I don't want to force the developer to use my subcl...
android
[4]
5,070,859
5,070,860
cheap reverse dns lookup
<p>Currently, I am running asp.net on a 4.0 Framework. I found one section of my code that is truly expensive for me to use. I currently get the IP Address and the reverse dns for users accessing my site, however, I am trying to keep performance in mind.</p> <p>Is there a cheaper alternative to this? </p> <pre><code...
asp.net
[9]
3,997,515
3,997,516
Send music control keys from my app in android
<p>Is there a simple way to tell the default media player to change track back or forward?</p> <p>I want the ability to send commands to the system media player (Music) to change track back and forward from within my app.</p> <p>Is there a simple way? Code examples or descriptive explanation please, I have not develo...
android
[4]
4,266,199
4,266,200
thread dump of a stand-alone java app
<p>I have a stand-alone java app running on linux + Java 6, which seems to be stuck (no logs being generated) How can i take thread dump of this, without using any other tool (eg. jstack)</p> <p>Tried below commands, but they are not doing anything</p> <pre><code>kill -3 &lt;pid&gt; kill -QUIT &lt;pid&gt; </code></pr...
java
[1]
2,054,524
2,054,525
java.lang.RuntimeException: Unable to start activity ComponentInfo: java.lang.NullPointerException
<p>My app gives me this error when using this onclicklistener</p> <pre><code>private OnClickListener btn_Config_Onclick = new OnClickListener() { public void onClick(View v) { Bundle bundle = new Bundle(); bundle.putString("Name", selected_Name); bundle.putString("Image", selected_Image); ...
android
[4]
682,327
682,328
how do display the another set of menu-items by selecting particular menu from menu list?
<p>In my application I am having 3 menu like options,setting and favorites. In that If I press 'favorites' means it should display another set of (new)menu and I want to hide the previous set of (old)menu. IS it possible with android? If anyone knows, help me please.</p>
android
[4]
2,235,036
2,235,037
trying to write a program by implementing single inheritance... need help please
<p>I want to get the values that i got from the mark class and evaluate in the result class. How can I do that?</p> <pre><code>import java.util.*; import java.lang.*; import java.io.*; class Marks{ float age,S1,S2,S3,S4,S5; String Name,Roll; void displayMarks() { ...
java
[1]
5,440,595
5,440,596
Print ">" on every line
<p>How would I do to print a ">" before every line?</p> <pre><code>if ($quoteid) { echo ' &gt; '.$quote['message'].' '; } </code></pre> <p>Currently It Looks like this:</p> <pre>> I would move Heaven and Hell and anything in between to get to you. You wouldn't be safe anywhere if I was mad at you. And that's not...
php
[2]
1,482,473
1,482,474
How to open URL from Android application and post values to the URL?
<p>I am newbie to Android development, can you please help me for below scenario</p> <ol> <li><p>From Android native application</p></li> <li><p>Open url into browser, along with</p></li> <li><p>Post some values to that page</p></li> </ol> <p>Share me if you have test code.</p>
android
[4]
4,189,835
4,189,836
Android ActivityManager showing every 2 secs that the application is open?
<p>Can anyone please help me ?<br>Here is my alarmmanager code that will open up the service after every 2 seconds..</p> <pre><code>AlarmManager alarmManager = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE); alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), 2*1000 ...
android
[4]
2,200,939
2,200,940
Using static class data in std::max and min
<p>I have a static class data member declared as:</p> <pre><code>static const float MINIMUM_ZOOM_FACTOR = 4.0; </code></pre> <p>I'm using this constant in a class member function like this:</p> <pre><code>zoomFactor_ = max(zoomFactor_, MINIMUM_ZOOM_FACTOR); </code></pre> <p>At this point, the compiler complains tha...
c++
[6]
1,306,414
1,306,415
python store variable in function and use it later
<p>is it possible to store a variable from a while loop to a function and then call that same variable from the fucntion at the end of the loop</p> <p>for eg:during while loop, problem here is that when i try to retrieve the variable from store() it fails...as it needs arguments to be passed..</p> <pre><code>def sto...
python
[7]
4,212,031
4,212,032
url obfuscator in php
<p>hello I need a url obfuscator that a spider should not extract my links like safe_mailto in codeiginitor... is it possible using PHP if so please give an example.</p>
php
[2]
1,127,099
1,127,100
Add Item into a generic List in C#
<p>I tried to insert an object into a generic BindingList. But if I try to add a specific object the compiler says: <em>"Argument type ... is not assignable to parameter type"</em></p> <pre><code>private void JoinLeaveItem&lt;T&gt;(BindingList&lt;T&gt; collection) { if (collection.GetType().GetGenericAr...
c#
[0]
5,112,013
5,112,014
How do you convert a stringed dictionary to a Python dictionary?
<p>I have the following string which is a Python dictionary stringified:</p> <pre><code>some_string = '{123: False, 456: True, 789: False}' </code></pre> <p>How do I get the Python dictionary out of the above string?</p>
python
[7]
2,321,523
2,321,524
Does alert('hello'); work in pageLoad() function?
<p>Alert does not work in pageLoad, why? thanks</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; function pageLoad() { alert('hello'); } &lt;/script&gt; &lt;/head&gt; &lt;body /&gt; &lt;/html&gt; </code></pre> <p><strong>Problem found:</stron...
javascript
[3]
5,338,116
5,338,117
Report viewer in Android
<p>Is there any report viewer tool or api in android for generating reports of any form. I want to create sales report, purchase report in my android phone. So i am looking an api or framework which makes my work easy.</p>
android
[4]
2,518,177
2,518,178
J query scroller asp.net
<p>I have to make a jquery scroller as given in <a href="http://www.isango.com/" rel="nofollow">http://www.isango.com/</a>. Look at the bottom of the site. Please Help me making this. </p> <p>Any help will be appreciated. Thanks</p>
jquery
[5]
2,823,641
2,823,642
Count from 0 to 100 in 7 seconds while doing an jQuery.animate() for a progress bar
<p>I've a simple progress bar that has to go from 0 to 100% width in 7 seconds. I've no problem handling operations, it just need to be 7 seconds long.</p> <p>The code is actually so simple:</p> <pre><code>$('.progress-bar').animate({width:'100%'}, 7000); </code></pre> <p>The width of the progress is 0% so just I ne...
jquery
[5]
5,450,751
5,450,752
jQuery menus with + and - for opening and closing submenus
<p>Does anyone know any good jQuery menu which has + and - for opening and closing submenus.</p> <p>I found in google only this:<br> <a href="http://berndmatzner.de/jquery/hoveraccordion/" rel="nofollow">http://berndmatzner.de/jquery/hoveraccordion/</a></p> <p>but this does not have + and - for opening and closing me...
jquery
[5]
2,808,200
2,808,201
My jQuery is not working
<pre><code>&lt;%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt...
asp.net
[9]
1,790,990
1,790,991
java outputstream java.lang.OutOfMemoryError: Java heap space
<p>I am trying to publish a large video/image file from the local file system to an http path, but I run into an out of memory error after some time...</p> <p>here is the code</p> <pre><code>public boolean publishFile(URI publishTo, String localPath) throws Exception { InputStream istream = null; OutputStream...
java
[1]
3,260,919
3,260,920
How do I make a dotted/dashed line in Android?
<p>I'm trying to make a dotted line. I'm using this right now for a solid line:</p> <pre><code>LinearLayout divider = new LinearLayout( this ); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT, 2 ); divider.setLayoutParams( params ); divider.setBackgroundColor( ge...
android
[4]
2,714,452
2,714,453
get size of dynamic pointer C++
<p>I want to write a dynamic pointer to a file in C++.</p> <p>This is my declaration in header file:</p> <pre><code>byte* buffer; </code></pre> <p>Then in Cpp file, I allocated it:</p> <pre><code>buffer = new byte[1000]; </code></pre> <p>However the size will be bigger than 1000 in dynamic allocation.</p> <p>Then...
c++
[6]
1,927,706
1,927,707
generating a grid in a function
<p>We made a little script in computer science class for finding the shortest path through a grid of nodes, some interlinked, some not. The griddata is stored in a way that doesn't require to define any new classes, namely in a nested list. For n nodes, the list should have n elements, each being a list with n elements...
python
[7]
4,555,358
4,555,359
what's the fastest way of converting a string time stamp into epoch time with python?
<p>I need to do lots of conversation from string time stamp like '2012-09-08 12:23:33' into a seconds which is based on epoch time.Then i need to get time gap between two timestamp.I tried two different ways:</p> <pre><code>date1 = '2012-09-08' time2 = '12:23:33' timelist1 = map(int, date1.split('-') + time1.split(':'...
python
[7]
314,553
314,554
Android: animation
<p>In my App I have an <code>ImageSwitcher</code>, and to buttons at the bottom (Next and Previous). I'm trying to set a smooth animation to <code>ImageSwitcher</code>, but everything looks awfully. Have any body knows smooth animation ? The best practice I think would be to create fade_in and fade_out animation...when...
android
[4]
899,346
899,347
Android - Download a folder from server or anywhere from internet and apply changes according to it in app
<p>I just finished one app, but i want to let user install different language packs (a folder containing mp3 files ), and also apply those mp3 files in my app ! how should i do it ? how to let user user download that folder ? and how to make changes in my app as they download ?</p> <p>(this is like google maps app, th...
android
[4]
1,586,054
1,586,055
iPhone - cleaning the context of a UIView outside drawRect
<p>I have this UIView that I subclassed and implemented my own drawRect method.</p> <p>When the drawRect method runs the first time, I grab the context in a variable using </p> <pre><code>ctx = UIGraphicsGetCurrentContext(); </code></pre> <p>later on the code, outside drawRect, I am trying to clean the whole context...
iphone
[8]
2,683,548
2,683,549
how do you pass a parameter to a function when it is called by reference?
<p>I've created a global variable to pass informatin to a method that is called via a method reference</p> <pre><code>d_g.onerror=i_bm_err_fix; </code></pre> <p>I tried passing it the variable like this(below) but it did not work.</p> <pre><code>d_g.onerror=i_bm_err_fix(d_g); </code></pre> <p>All I'm trying to do i...
javascript
[3]
1,280,408
1,280,409
strtotime calculates wrong when moving over to linux (webhost) from windows (localhost)
<p>I've some problem with make a simple PHP function to work on my webspace meanwhile it works like expected at my localhost server.</p> <p>The problem is the following calculation:</p> <pre><code>echo $Formated = date("Ymd",strtotime("last day of next month")); </code></pre> <p>This script dosen't seem to work b/c ...
php
[2]
2,564,336
2,564,337
php debug problem in hellios
<p>im trying to debug and im using eclipse hellios php version and i get this message "the debug session could not be started. please make sure that your debugger in properly configured as a php.ini directive"</p> <p>what do i need to do could someone help me?</p>
php
[2]