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
4,612,222
4,612,223
set text between image in listview android
<p>hi ihave list of some items and each list have one image in left corner and text is appearing to its right i want to show text between between image in listview so how to do it my xml is...</p> <pre><code> &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizon...
android
[4]
451,924
451,925
Cannot print iframe using javascript in asp.net mvc
<p>I have an action in my controller and the view is calling the java script function to get data from my asp.net session to display by ajax.</p> <p>When I browsed the view in url, the data showed properly. But when I used the <code>iframe</code> with the javascript to print that view, there is no data in my PDF file ...
javascript
[3]
5,639,663
5,639,664
Delete SMS after displaying
<p>I am writing my own SMS application that will display a toast of my message once it arrive. Now is it possible to delete the message after the display of the toast, so that it will not go into the native SMS application?</p> <p>Thanks In Advance, Perumal</p>
android
[4]
5,073,393
5,073,394
Get first and last date of the previous month
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/10828398/how-to-get-the-first-date-and-last-date-of-the-previous-month-java">How to get the first date and last date of the previous month? (Java)</a> </p> </blockquote> <p>In java, how to get the first and last...
java
[1]
2,762,515
2,762,516
Problem uninstalling and installing Java on new pc running Windows 7 64 bit os
<p>I have a new Dell Studio XPS running Windows 7 64 bit os. I am attending online classes which require IE 8 and Java version 6 build 20. The pc came with IE 8 32 bit and Java 6 build 21 already installed. I tried to uninstall Java using add and remove programs but after about 45 minutes of "Preparing to remove app...
java
[1]
3,459,427
3,459,428
Javascript Initialization Closure
<p>I'm trying to create javascript closure that will tell me if the function has already been run: </p> <p>This is what I have so far:</p> <pre><code>function do() { var isInitialized = function() { var init = false; if (init == false) { init = true; return false; } ret...
javascript
[3]
5,497,854
5,497,855
I wanna get data from my listview wich displays information from the database, because i want that data to be automatically bound in text fields
<p>I get data from my sql lite database which is displayed in a list view. Now once a user clicks on the list view i want all the details to be automatically be fetched and should be bounded in text fields For ex, supposing i have a database of customer list having columns like name area address mobile and id as a prim...
android
[4]
608,411
608,412
File Permission
<blockquote> <p>How i can set <strong>owner and group</strong> to file in php , i write</p> <p>chgrp("dompdf/background_image.html",1122);</p> <p>but this is not working</p> <p>it Set <strong>99</strong> instead of <strong>1122</strong></p> </blockquote>
php
[2]
2,486,840
2,486,841
loop through posted values to see if any equal "no"
<p>How can i loop through a post and find if any of the answers are "no"?</p> <p>Here is my code so far:</p> <pre><code>if($_POST["minRequirementsForm"]) { foreach($_POST as $key =&gt; $value) { $_SESSION['minrequirements'][$key] = $value; } } </code></pre> <p>Thanks in advance.</p>
php
[2]
1,745,035
1,745,036
delay background effect with jquery?
<p>i am trying to change the background on hover of some divs, but for some reason i can not make it with jquery. what i want is give an effect that shows from the images to the image on hover, because with css the change is too fast and doesnt look good at all. any suggestion? this is my code</p> <pre><code>#siman{ ...
jquery
[5]
4,397,900
4,397,901
hide all elements wit specific alt value
<p>I want to be able to hide all elements which have an ALT value of <code>3</code> using jquery.</p> <p>hide all elements with attribute <code>alt="3"</code></p> <p>Is this possible? And if so, how can it be done?</p> <p>Thanks</p>
jquery
[5]
2,685,648
2,685,649
using zip function and getting errors using getcontext().prec =2
<p>I am experiencing a problem when trying to use the getcontext().prec = 2 function, trying to get decimal results with only 2 decimals. I have experimented with several variations, but don't know why I can't transform float to string inside one of my lists. I am new using Python (2.6), and have not been able to find ...
python
[7]
2,345,376
2,345,377
setTimeout in javascript question
<p>I understand that the <code>setTimeout</code> function spawns a separate thread that waits for x milliseconds before executing the JS function</p> <pre><code>setTimeout(functionName, timeInms); </code></pre> <p>My question is if there's a way to tell it to run <em>after the JS on the page has completed executing?<...
javascript
[3]
3,799,438
3,799,439
Preventing an app from exiting immediately?
<p>How can I prevent an application from exiting immediately? If the user press the home button while the application is saving a picture to the photo album, only a part of the picture is saved!</p> <p>Thanks! </p>
iphone
[8]
4,927,232
4,927,233
Jquery : make code work when scroll to the bottom of div
<p>I found this code. It'll work when you scroll to the bottom of the whole page . I want to change this code to detect when bottom of the div. </p> <p>And this is the code</p> <pre><code> $(window).data('ajaxready', true).scroll(function(){ if ($(window).data('ajaxready') == false) return; if($(window).scrollTop...
jquery
[5]
2,039,523
2,039,524
Why Object class methods are available in interface?
<p><strong>Following interface and classes are successfully compiled. Problem is mentioned in the output below :</strong></p> <pre><code>interface MyInterface{} class MyClass implements MyInterface{} class InterDoubt{ static MyInterface mi ;//= new MyClass() ; public static void main(String[] args){ ...
java
[1]
1,852,728
1,852,729
Remove white space from mysql data
<p>When I get some data from my database and output it to my html table, I get some "?" at the end of the data.</p> <p>Example</p> <pre><code>echo "&lt;td&gt;" . $row['data'] . "&lt;/td&gt;"; </code></pre> <p>gives</p> <pre><code>John Data�� </code></pre> <p>So, how to remove the funny "��"?</p>
php
[2]
5,784,558
5,784,559
search for a tuple value in a list of tuples
<p>My datastruture is actually a dictionary that has a integer key and a value that is a list of tuples. I want to find a particular index in that list. For example:</p> <pre><code> d = {} d[2] = [(1,-2),(2,4),(3,2)] d[1] = [(1,-2),(1,4)] </code></pre> <p>I want to find all tuples in a list with index 2 or -2 (they...
python
[7]
3,556,528
3,556,529
Error: Android SDK requires ADT version 17.0.0 or above
<p>I updated everything in eclipse but when I restart my eclipse I got this error <code>'Android SDK requires android developer toolkit version 17.0.0 or above'</code>.</p> <p>Then I Run software updates in Eclipse (Help > Check for Updates) and update the ADT but it says <code>'No updates were found.'</code>. Anyone ...
android
[4]
2,357,415
2,357,416
parsing url in json format
<p>I am developing an android application in which i have to parse data from url in json format.I HAVE TRIED THE CODE.I have parsed the url like as follows </p> <pre><code>private JSONObject jObject; private String jString = "{\"menu\": {\"id\": \"file\", \"value\": \"File\", \"popup\": { \"menuitem\": [ {\"value\...
android
[4]
2,342,997
2,342,998
real time data class in Java
<p>Is there a class in java for getting Real time data from a process?</p> <p>E.g. in Excel we use <code>=RTD(RealTimeServerProgID,ServerName,Topic1,[Topic2], ...)</code></p> <p>Thanks</p>
java
[1]
5,014,749
5,014,750
future in iphone development?
<p>i have done btech,nw i am searching job but one big question arise me in front of me several times that as a <strong>iphone developer</strong> i can survive or not ? i learned nowdays iphone development but my seniors said to me after learn iphone development you become miniority developer why dont you start from ja...
iphone
[8]
173,043
173,044
what is difference between __init__ and __call__ in python?
<p>I want to know what is difference between <code>__init__</code> and <code>__call__</code> methods? </p> <p>For example :</p> <pre><code>class test: def __init__(self): self.a = 10 def __call__(self): b = 20 </code></pre>
python
[7]
5,098,518
5,098,519
jQuery - Check If any select option is selected
<p>Basically I have a select option which pulls all the 'Tour Names' from a database as $touroptions. $touroptions can contain anything from 1-20 values (select options).</p> <p>What I need to do is have a jQuery function to do as follows so:-</p> <pre><code>If (any option) #sel-destination-tour is selected { //DO SO...
jquery
[5]
917,576
917,577
Disappearing after mouse out menu with jQuery/WordPress
<p>i have altered the script for jQuery menu in wordpress, and everything works fine except the menu item is not removing itself after mouse out. It remains over another selected menu item. My question is - if anyone can help mw with adding mouse out effect on this menu? here is the code</p> <p>jQuery(document).ready(...
jquery
[5]
602,715
602,716
Calling a virtual function from overloaded subscript operator
<p>I am trying to overload the subscript operator ([]) on an abstract class, the function called by the overload is implemented in the concrete object.</p> <pre><code>class CollectionBase { public: double&amp; operator[] (const int nIndex) { return getValue(nIndex); } virtual double getValue(i...
c++
[6]
3,293,999
3,294,000
How to understand the type of a request?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3124636/detect-ajax-calling-url">Detect Ajax calling URL</a> </p> </blockquote> <p>is it possible to understand if a request is sent using ajax(xhr) from a server side language like php? I should know if the req...
php
[2]
1,381,139
1,381,140
How should I handle application settings in C#?
<p>I am pretty new to the .NET framework so please bare with me. I am writing a time counter in C#, that counts the amount of time that has elapsed since a particular moment in time. That moment in time, as of right now, is hard coded. I would like that to be configurable. That and a couple of other values.</p> <p>So,...
c#
[0]
2,633,267
2,633,268
Open Source tool to create Class Diagram from jar files
<p>I have developed a tool in java "content based search", now i have to develop its fully functional class diagram. Can anyone please suggest me any good and easily accessible <strong>open source</strong> tool that can create <strong>Class Diagram</strong> from <strong>jar</strong> files.</p> <p>I have checked some p...
java
[1]
5,835,753
5,835,754
Sharing .NET application pools
<p>On an server running multiple ASP.NET sites, is it better to use one application pool per site or for sites to share a single application pool? What are the advantages or disadvantages inherent to each setup? Or is there a hard and fast rule here?</p>
asp.net
[9]
4,254,135
4,254,136
Not getting battery status at the beginning of the application
<p>I'm trying to control battery levels and power connection on my application with some listeners, but for some reason they are not getting updated neither at the beginning of the application. Is there any way of doing it manually?</p> <p>class PhoneStatusService</p> <pre><code>private BroadcastReceiver mPowerConnec...
android
[4]
3,835,481
3,835,482
little jquery calculation
<p>I need some simple calculations done using jquery.</p> <p>This example <a href="http://jsfiddle.net/tbL5r/" rel="nofollow">http://jsfiddle.net/tbL5r/</a> is pretty close. It just needs a little tweaking:</p> <ol> <li><p>the user should input the price.</p></li> <li><p>I need the sum of the all prices calculated.</...
jquery
[5]
4,255,700
4,255,701
GridView values not changing on value change of the combobox it is bound to
<p>I have two 2 dropdown lists D1 and D2 and a griview G1. D2 gets updated when selected value in D1 changes, through a postback. G1 gets updated when selected value in D2 changes.</p> <p>The problem is, Data in G1 gets refreshed only if I explicitely change the value in D2. When I change value in D1, D2 automaticall...
asp.net
[9]
113,733
113,734
Android-Broadcast Receiver
<p>I am new to android. I what to know the difference between <code>Intent</code> and <code>BroadcastReceiver</code>. I am more confused with <code>BroadcastReceiver</code> than <code>Intent</code>.</p> <p>Please help me out. Simple code will be helpful.</p>
android
[4]
4,376,508
4,376,509
Initialize an input (type="text") with the value of another input (type="hidden")?
<p>Cannot use onload on the body tag.</p>
javascript
[3]
3,771,385
3,771,386
Gridview having dynamic columns with ObjectDataSource, doesn't persist viewstate on postback
<p>Gridview having dynamic columns with ObjectDataSource, doesn't persist viewstate on postback.</p> <p>Here are the steps which I follows: - </p> <p>1) On aspx, I set the GridView DataSourceID to an ObjectDataSource (ObjectContainerDataSource to be specific)</p> <p>2) ON pageload, I add one dynamic column having ch...
asp.net
[9]
3,253,340
3,253,341
Why is a postback not being triggered?
<p>I have a simple web form, but when I submit the button postback is always false. This should all happen on the same page.</p> <pre><code>&lt;form runat="server" class="frm" method="post" action=""&gt; &lt;span&gt;&lt;input type="radio" name="options" value="Milk" /&gt;&lt;label&gt;Option 1&lt;/label&gt;&lt;/spa...
asp.net
[9]
566,894
566,895
The usage of jQuery 'end()' function
<p>i go to the site <a href="http://api.jquery.com/end/" rel="nofollow">http://api.jquery.com/end/</a> just to understand how end() use and how it works. unfortunately i just do not understand what it does. so i need to know in what kind of situation end() should be used.</p> <h2>here is small example</h2> <pre><code...
jquery
[5]
2,000,582
2,000,583
How to target a specific iPhone version?
<p>I've got some code I want to only execute on the latest iPhone SDK (3.0), however I can't seem to figure out a way to target just 3.0 and ignore 2.2.1 etc. There is an ifdef statement, but it just seems to cover the entire iPhone:</p> <pre><code>#if TARGET_OS_IPHONE </code></pre> <p>Any help is appreciated.</p>
iphone
[8]
5,483,327
5,483,328
search files in python based on header and footer patterns
<p>I would like to parse a file which looks like this:</p> <pre><code>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA HEADER body body body FOOTER BLABLABLABLA BLABLABLABLA BLABLABLABLA </code></pre> ...
python
[7]
4,389,526
4,389,527
Data Hog Notification
<p>I just like to ask how can you know that a certain application is using too much network? I wanted to create an android application that can notify the user if it is hogging your data. Thanks!</p>
android
[4]
3,595,852
3,595,853
Enable/disable button based on condition shows alert two times
<p>I have two input fields and two buttons in a row. Like that having 3 or more rows in a page. For each row i need to enable the two buttons only when the two input fields have any value. I gave id for two buttons like this.</p> <pre><code>&lt;a href="#" style="margin: auto;" id="first_link"&gt;&lt;/a&gt; &lt;a href=...
jquery
[5]
4,386,733
4,386,734
Correct way to store files on iphone and retrieving files by URL
<p>What is the correct/best way to store files on the iphone?</p> <p>I would like to save a file in some directory on the iphone. I have read that filing the users home directory isnt good practice. </p> <p>Where should the files be stored and how can an URL for these files be saved as well? So that after saving a nu...
iphone
[8]
3,995,826
3,995,827
Submit html form via Window form
<p>I need to automize login process of a widsite. After googling for a while, I wrote this code. But the problem is after running this code, no errors, no output. I am unable to know where I went wrong.</p> <pre><code>private void Form1_Load(object sender, EventArgs e) { WebBrowser browser = new W...
c#
[0]
1,222,434
1,222,435
Where to place a file if it is getting accessed using ClassLoader.getSystemResource in WebApplication
<p>I am using one third party jar in my code. In the jar file , in one of the classes, when I opened the class using de-compiler, the code below is written:</p> <pre><code> java.net.URL fileURL = ClassLoader.getSystemResource("SOAPConfig.xml"); </code></pre> <p>Now I am using this in my webapplication, where should I...
java
[1]
5,506,998
5,506,999
How to change richTextBox's right to left type?
<p>I wanna use a right2left language in my rich text box but faced a lot of problems with bullets etc. I want to make this</p> <p><img src="http://i.stack.imgur.com/C0aGD.png" alt="enter image description here"></p> <p>this is my problem <img src="http://i.stack.imgur.com/9v1k3.png" alt="enter image description here"...
c#
[0]
87,422
87,423
ASP.NET Expression is not a method
<p>I'm getting a build error, "Expression is not a method" for the following code</p> <pre><code>Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'LOOKUP SKU DATA ON BLUR Dim lookup As String = ClientScript.GetPostBackEventReference(txtSKU, "", False) ...
asp.net
[9]
1,378,535
1,378,536
What the selector means?
<p>Can you explain what the following selector mean?</p> <p><strong>$("input:checkbox.compbox")</strong></p> <p>Thank you.</p>
jquery
[5]
4,541,196
4,541,197
how to split JSON response into three different arrays
<p>This is my JSON data:</p> <pre><code>{ "SearchList": [ { "HeadLines NewsIds ": [ "1056305", "1285209", "3248204" ], "NewsText NewsIds ": [ "12328475", "12328324", "12328310...
iphone
[8]
552,642
552,643
Instanceof inconsistency
<p>Could someone please explain the following?</p> <pre><code>[] instanceof Array; // true '' instanceof String; // false </code></pre>
javascript
[3]
1,787,177
1,787,178
Arithmetic on datetime objects
<p><a href="http://docs.python.org/2/library/datetime.html" rel="nofollow">http://docs.python.org/2/library/datetime.html</a></p> <p>I use the today function to get current date, how to perform simple arithmetic on this object so that I can reduce or increase the current date by 1 or 2 (i.e. yesterday or day-before ye...
python
[7]
3,878,899
3,878,900
Can we execute multiple commands in the same command prompt launched by python
<p>There is an excel file which contains the paths of multiple scenarios. I am using <code>os.system(command)</code> in a for loop. In each iteration, a path is read from excel file and executes the scenario for that path. </p> <p>My problem is that every time, by using <code>os.system()</code>, a CMD opens, execute o...
python
[7]
2,628,481
2,628,482
How to get NetWork Strength in Android Application?
<p>I want to show a network strength of internet in mobile device.</p> <p>now I am able to check connection from wifi or not using code below, But further I need network Signal Strength. so please tell me what code I need to add?</p> <p>Thanks!</p> <pre><code>ConnectivityManager connectivityManager = (ConnectivityMa...
android
[4]
2,539,922
2,539,923
+ header file, include files in define block or just on the top of the file
<p>What is the best location for a file include in C++? For example:</p> <pre><code>/*Foo.h*/ #include &lt;string&gt; //Should I place this between the #ifndef #endif? #include "FooBar.h" using namespace std; #ifndef Foo_class #define Foo_class class Foo { /*XXX*/ } #endif /*FooBar.h*/ #ifndef FooBar_cl...
c++
[6]
3,115,964
3,115,965
How to disable controls within a page and prevent typing text
<p>I want to disable all controls in a page using jQuery:</p> <pre><code>$("form").attr("disabled", "disabled"); </code></pre> <p>But I can still type text on each input control.</p> <p>How can I solve it? thank you.</p>
jquery
[5]
4,647,141
4,647,142
Using Bitmap.createScaledBitmap doesnt always work
<p>So I'm using Bitmap.createScaledBitmap to scale and display in an imageview files that i have saved locally from my android application. It seemed like it was working perfectly, Yet now it seems that for some reason only certain files are able to be scaled and others it crashes. When i try with what seems like large...
android
[4]
4,018,536
4,018,537
How to convert view into Drawable
<p>I want to convert Android View into Drawable.</p> <p>I try below method:</p> <pre><code>View view1; view1 = getLayoutInflater().inflate(R.layout.layout1, null); view1.setDrawingCacheEnabled(true); ((TextView)(view1.findViewById(R.id.txt_number))).setText("98"); view1.setLayoutParams(new MapView.LayoutPa...
android
[4]
2,070,023
2,070,024
c++ can't compile a file
<p>I'm a beginner at c++ and I'm trying to write a program to find greatest common factor. In main i have:</p> <pre><code>#include &lt;iostream&gt; #include &lt;cstdlib&gt; #include "longgcd.cpp" int main(int argc, char* argv[]){ long gcd(long m, long n); long m,n,g; m=atol(argv[1]); n=atol(argv[2]); g=gcd(m...
c++
[6]
746,025
746,026
How to pass value from Broadcast receiver to Activity in android?
<p>I am developing the sample application in android.I want to know how to pass the variable from broadcast receiver to to the Activity class</p> <p>Please any one help me how to do that in android Thanks in advance</p>
android
[4]
4,251,185
4,251,186
How does new android Apps get discovered?
<p>I was wondering if there is some "New Apps" category in the Android market so that new Apps get the chance to be exposed. </p> <p>It exists in App Store and WF7 and I couldn't find such a category in Android. All it shows is the most popular paid/free Apps.</p> <p>If it doesn't exist, what chance does new Android ...
android
[4]
4,736,245
4,736,246
Why doesn't (int) Math.random()*10 produce 10 in Java?
<p>Why the following produce between 0 - 9 and not 10?</p> <p>My understanding is Math.random() create number between 0 to under 1.0.</p> <p>So it can produce 0.99987 which becomes 10 by *10, isn't it?</p> <pre><code>int targetNumber = (int) (Math.random()* 10); </code></pre>
java
[1]
4,279,824
4,279,825
Modification of FBreader project
<p>i download the project of fbreader from <a href="https://github.com/geometer/FBReaderJ" rel="nofollow">https://github.com/geometer/FBReaderJ</a>, i want to modify its FBreader class, to pass my epub file from asset is this possible?</p>
android
[4]
3,730,868
3,730,869
How to read muliple values from a config file using config parser
<p>I have made a Config file and have multiple values for a keyword as:</p> <p>[section]</p> <p>database: mysql , sqlite</p> <p>and i want to access the values separately..How to go about it??</p>
python
[7]
3,079,099
3,079,100
Zkemkeeper.Dll return Error Code -2(IO_Error)
<p>I have developed a windows application to read attendance data from bio metric device and to insert those values in database.i used "Zkemkeeper" free dll.During reading the data Some times i got the IO_Error with the error code -2.What cause this error.</p>
c#
[0]
5,374,920
5,374,921
tooltip in asp.net
<p>I have a gridview for which I am binding data from a Generic List collection. Currently not connected to DB. All the columns in the GridView are defined as properties(get;set.</p> <p>I want to have tooltip on one of the columns. The column has a very big description. I want to show only 3 words in the column and th...
asp.net
[9]
1,848,278
1,848,279
Creating a simple calculate class to output a total in Java
<p>The code is-create a calculate class with calcTotal, calcSalesTax, and calcSubTotal methods inside. The user should be prompted to enter in a quantity and price and the tax is 0.7. I need to call this class in Main and then output the subtotal, tax, and total.</p> <p>So far this is what I have in the calulator clas...
java
[1]
4,631,488
4,631,489
How to make php print out results based on a given time
<p>Is there a way to make php print out some results based on a given time? Say I tell it to </p> <p><code>echo"BEANS";</code></p> <p>at 12:00pm tomorrow. </p>
php
[2]
444,374
444,375
php - How do I sort a numeric data string into an array based on decimal values?
<p>I have a set of data which is a breakdown of call charges for international phone number prefixes. I need to parse the data so that I know the per minute cost of calling any number. The format is the cost followed by the prefixes. It is one big mess. the data looks like this: <code>cost,prefix,prefix,prefix,cost,pre...
php
[2]
5,495,457
5,495,458
admob ads not displaying when request.setTesting(false)
<p>When i place my pub id </p> <pre><code> AdView adView = new AdView(this, AdSize.BANNER, Publisher ID); </code></pre> <p>and</p> <pre><code> layout.addView(adView); AdRequest request = new AdRequest(); request.setTesting(true); adView.loadAd(request); iam getting the ads but when i set it to request.set...
android
[4]
1,291,680
1,291,681
Return First Part of HTML Class Name
<p>I have a number of table rows that are each assigned several classes. And one of those classes will be <em>IndexN</em>, where <em>N</em> is a number from 0 to 5 or so.</p> <p>What is the easiest way to get the value of <em>N</em> for a given row.</p> <p>I know I can use <code>hasClass()</code> but that would requi...
jquery
[5]
2,643,308
2,643,309
what's wrong with this python line?
<p>The following line in my source code:</p> <pre><code>a = testSourceDir.find("\\", testSourceDir.find("\\drv")+1) </code></pre> <p>is in the shell displayed as:</p> <pre><code>a = testSourceDir.find("\", testSourceDir.find("\\drv")+1) </code></pre> <p>but gives the following error:</p> <pre><code>SyntaxError: un...
python
[7]
1,987,957
1,987,958
REST method in calling google translate API
<p>i wants to access the google translate APIv2, following is the url</p> <p><a href="https://www.googleapis.com/language/translate/v2?key=INSERT-YOUR-KEY&amp;q=hello%20world&amp;source=en&amp;target=de" rel="nofollow">https://www.googleapis.com/language/translate/v2?key=INSERT-YOUR-KEY&amp;q=hello%20world&amp;source=...
php
[2]
4,373,190
4,373,191
Android: How can i refresh a view every time when a tab bar item is clicked?
<p>I am making an application with TabBar.In the Tab Bar there are 3 tabs. One of those tabs is a linked list which is linked with a another view which adds data. I want to refresh that view every time when i click that tab so that i can get updated my view. How can i do that? Thanks in advance.</p>
android
[4]
4,638,662
4,638,663
Why does my ASP.NET keep-alive logic not work?
<p>In order to ensure that my session always stays on, I created a simple stayalive.aspx page. The header of the page contains metadata to refresh the page every 5 minutes.</p> <p>In my page-load logic, I simply set a value into session.</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { System...
asp.net
[9]
5,796,069
5,796,070
how to replace all the occurrence in a string with a different number
<p>I have never used python in my life. I need to make a little fix to a given code.</p> <p>I need to replace this </p> <pre><code> new_q = q[:q.index('?')] + str(random.randint(1,rand_max)) + q[q.index('?')+1:] </code></pre> <p>with something that replace all of the occurrence of ? with a random, different number.<...
python
[7]
731,687
731,688
Deleting pointer before returning value from function
<p>If I have this:</p> <pre><code>double foo() { double* ptr = new double(0); return *ptr; } </code></pre> <p>If ptr is not deleted before returning, this will cause a memory leak? Therefore, what is the correct way to delete ptr before returning from the function?</p>
c++
[6]
2,411,942
2,411,943
WebClient.DownloadData returns 404 file not found. What causes this?
<p>I can open an image from <code>WebClient.DownloadData</code> but for some urls which am able to open via web-browser, can't able to get image byte array if used via WebClient.DownloadData.</p> <p>If i can view via browser, why do i get http 404 file not found exception. </p> <pre><code>WebException was unhandled. ...
c#
[0]
5,538,379
5,538,380
Classnotfound exception for working app
<p>I have a strange issue.I developed an android application with scan functionality.I reused some zxing code code for the scanning section. My app is working fine for all the device and emulater too.But after I uploaded it in market I am getting error on scan portion.My error report is </p> <pre><code>java.lang.Illeg...
android
[4]
3,059,650
3,059,651
Are double[] GenerateArray() and void GenerateArray(ref double[]) the Same
<p>Whenever c++ returns an object, all of the contents of the objects are copied to the new object once the method is returned, but in C# there is no such thing, AFAIK.</p> <p>My question is, in C#, are the below two equivalent in terms of speed and memory consumption?</p> <pre><code>double[] GenerateArray() </code><...
c#
[0]
1,413,285
1,413,286
How to handle “int i != ""” or “int i != null” statements in Java?
<p>As we know int is a primitive data type and cannot be null. In my program i want to do a condition check like int i != "" but it says operator != cannot be applied to int,null.</p> <p>Any solution?</p> <p>EDIT:</p> <p>I already know that it cannot hold these two things i was trying to present my requiremnet for ...
java
[1]
979,150
979,151
how to use one collection as a parameter to function call in another collection of the same size?
<p>I have two collections known to be of the same size:</p> <pre><code>List&lt;Drivers&gt; drivers; List&lt;Car&gt; cars; </code></pre> <p>I need to put driver from the <code>i</code> place to <code>i</code> car:</p> <pre><code>for (int i = 0; i &lt; drivers.Count; i++) cars[i].AssignDriver(drivers[i]); </code><...
c#
[0]
3,585,135
3,585,136
Create array printed with print_r
<p>I have an array:</p> <pre><code>$a = array('foo' =&gt; 'fooMe'); </code></pre> <p>and I do:</p> <pre><code>print_r($a); </code></pre> <p>which prints:</p> <pre><code>Array ( [foo] =&gt; printme ) </code></pre> <p>Is there a function, so when doing:</p> <pre><code>needed_function(' Array ( [foo] =&gt; print...
php
[2]
944,869
944,870
Web access to android application - price and category
<p>I am trying to collect information about Android apps. I am trying to build my program and I need to have a web access to price and category of android applications. Any idea about the API, how I can access the information?</p>
android
[4]
280,150
280,151
How can I access list of list in Python?
<p>Here is some code that I wrote:</p> <pre><code>class supClass: supList=[] def __init__(self): "" class MyClass: listt=[] code=None def __init__(self): "" instancelist = [ MyClass() for i in range(4)] for i in range(0,4): instancelist[i].listt.append(supClass()) instan...
python
[7]
4,920,218
4,920,219
how can I display saved data when I restart Activity
<p>In my Project I want to play audio files in mediaplayer and displays progressbar. If I exit the application then also player have to play audio file. If I restart The <code>Activity</code> I have to display progress bar with last activity progress.</p> <p>Here I tried using <code>onSaveInstanceState()</code> method...
android
[4]
1,205,129
1,205,130
Android MySQL Connection
<p>I am trying to connection with php-MySQL using below code </p> <pre><code>try{ HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://127.0.0.1/mytable.php"); // HttpPost httppost = new HttpPost("http://localhost/mytable.php"); httppost.setEntity(new UrlEncodedForm...
android
[4]
4,578,855
4,578,856
Suppress display of com errors in php
<p>I'm calling a function from a com object in php. This function can throw some errors which get displayed. How can I suppress displaying this errors?</p> <p>I tried:</p> <ul> <li>@ operator</li> <li>error_reporting(0);</li> <li>ini_set("display_errors", 0);</li> <li>try catch block</li> </ul>
php
[2]
2,075,064
2,075,065
Assign an operator symbol to a variable and use that variable for conditional check
<p>Can I assign an operator symbol to a variable and use that variable for a conditional check?</p> <pre><code>char operator= '&gt;'; int val1=10; int val2=24; if(val2 operator val1){ /* some code*/ } </code></pre> <p>Why cant I use the operator variable inside conditions?</p>
java
[1]
780,559
780,560
jQuery selecting deep non id element
<p>How i can select this deep non id element in jQuery ? And I do not want select first or last, just exactly by order (etc 3,4 "menu_transition" element in order ).</p> <pre><code> &lt;ul id="menu_container_content"&gt; &lt;li class="menu_item"&gt; &lt;div class="menu_background"&g...
jquery
[5]
2,542,737
2,542,738
Java code to convert rtf file to doc (97-2003) format
<p>I have used Jasper reports to create an word document using the JRTFExporter class. The code creates a file which has header information related to rtf files.</p> <p>The document created has to be uploaded to another system which will be parsing this document.</p> <p>Could someone please tell me if there is any op...
java
[1]
4,240,330
4,240,331
How to represent a blueprint with clickable areas in Android
<p>I need a direction how to achieve the following functionality: I have a blueprint that contains specific zones that can be clicked. I also need the blueprint to be zoomable (respectively the clickable zones). Is it better to use 2D graphics, plain Java code or XML representation, or other method?</p>
android
[4]
3,081,824
3,081,825
Jquery carousel in constant motion when pass the mouse over
<p>In this example of a jQuery UI continuous carousel <a href="http://ryrych.github.com/rcarousel/examples/margin.html" rel="nofollow">http://ryrych.github.com/rcarousel/examples/margin.html</a> i'd like to put an effect that when i pass the mouse on any arrows i would like that the carousel stay in constant motion wit...
jquery
[5]
5,072,328
5,072,329
jrew.exe has encountered a problem and needs to close
<p>I'm going to the web front end of an Oracle Applications 10.7 website which requires that I install JInitiator 1.1.7.32. Upon reaching the end of the installation for JInitiator, I get a Microsoft error stating that "jrew.exe has encountered a problem and needs to close". The installation never completes successfu...
java
[1]
5,612,847
5,612,848
Show Multiline View in GridView
<p>I have Stored a Data in database by multiline Textbox.. When i link it with the gridview.. It shows that data in a Single line.. I cant get the multiline view.. please give ur valuable suggestions for that.. Thanks in advance..</p>
asp.net
[9]
4,381,658
4,381,659
Javascript: Using a timestamp as a temporary ID # VS Using a counter as a temporary ID #
<p>I'm working on a project and we need a unique temporary number to identify a set of data. I want to use the timestamp, my coworker wants to use a counter variable. </p> <p>Which approach is better? My thought is less overhead as we just get the timestamp when the user clicks the add button when they want to add ...
javascript
[3]
3,356,720
3,356,721
How to continue in nested loops in Python
<p>How can you <code>continue</code> the parent loop of say two nested loops in Python?</p> <pre><code>for a in b: for c in d: for e in f: if somecondition: &lt;continue the for a in b loop?&gt; </code></pre> <p>I know you can avoid this in the majority of cases but can it be d...
python
[7]
376,151
376,152
Android Toast works in emulator but not on my device
<p>I use this code in several places in my app:</p> <pre><code>Toast.makeText(getApplicationContext(), "toast", Toast.LENGTH_SHORT).show(); </code></pre> <p>When running in the emulator they almost always show. The only times they don't show is when I'm debugging and take a long time to step through the code.</p> <...
android
[4]
410,079
410,080
array with dates between two different dates
<p>I am currently working on a calender script for my personal use. Therefore I need your help :-)</p> <p>I have two dates in format YYYY-MM-DD.</p> <p>for example:</p> <pre><code>2012-05-12 and 2012-05-16 </code></pre> <p>What I need is the dates between them:</p> <pre><code>2012-05-13 2012-05-14 2012-05-15 </cod...
php
[2]
4,549,426
4,549,427
C# namespace visiblity
<p>My situation is very simple. I have a class A, called through WCF service, which delegates it works to several 'helper' classes. These 'helper' classes are obviously internal. The problem is that I don't want that someone may call these classes directly. I would like that they always call the class A. This means tha...
c#
[0]
5,107,731
5,107,732
How can I change cursor while scrolling a div in JavaScript?
<p>I have scroll on a div. And I want to change my cursor sign, when user scroll that div. And for other page scrolls, that should remain the default one. </p> <p>How can I do that in jQuery or JavaScript?</p>
jquery
[5]