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 |
|---|---|---|---|---|---|
422,181 | 422,182 | create CSV file in c#net Window application | <p>create CSV file in c#net Window application at button click event</p>
| c# | [0] |
3,523,088 | 3,523,089 | ASP.Net Add Control "Cannot get inner content of [control] because the contents are not literal." | <p>I am currently trying to dynamically add HTML controls in my web form, but each time I insert a control in another control the error <code>Cannot get inner content of [control] because the contents are not literal</code> pops up(when trying to look at innerHtml or innerText) and cannot seem to find the reason why.</... | asp.net | [9] |
454,069 | 454,070 | Why the output getting differed in hexadecimal integer to character conversion? | <p>Why the output varies in both of the following codes since i am applying the same explicit type conversion.</p>
<pre><code> int hex = (char)0xA;
System.out.println(hex);
int hex = 0xA;
System.out.println((char)hex);
</code></pre>
| java | [1] |
445,151 | 445,152 | Underlying type in an empty Observable Collection | <p>How to get the underlying type of an Observable collection using reflection?</p>
<p>Consider following classes:</p>
<pre><code>public class Order
{
public int OrderID { get; set; }
public string OrderDetails { get; set; }
}
public class Orders : ObservableCollection<Order>
{
}
</code></pre>
<p>Any... | c# | [0] |
3,763,570 | 3,763,571 | How to avoid typing <pre> when viewing arrays... any ideas? | <p>I often have the need to view data in arrays and use the html tag <code><pre></code> to do this. However, it becomes tedious and frustrating having to type the same thing out all the time.</p>
<p>My question, what is your technique for avoiding this annoyance of programming with PHP?</p>
| php | [2] |
389,623 | 389,624 | Why two for statements will not run together in python? | <p>I am trying to run a Python program to calculate the total and average charges that are contained within a CSV file. </p>
<p>I then want to calculate the total and average charge per invoice. The program calculates the total charges and average charges correctly, but the second for statement will not run. Both for ... | python | [7] |
276,978 | 276,979 | Submit form with jQuery modal dialog | <p>As per our project requirement we have developed the jQuery dialog and added 3 buttons </p>
<p>YES , NO and CANCEL</p>
<p>On Yes Button we required to submit the form
but the form is not submitted
Nothing Happen to YES and NO</p>
<p>code is as below</p>
<pre><code> $("#dialog-NurseTeam").dialog({
autoO... | jquery | [5] |
5,997,789 | 5,997,790 | Should I use several activities for an app with several screens? | <p>I'm new to Android and I'm building a simple application to start with. It consists of a client with three screens. In the first screen the user is prompted for an Ip to connect to a server (I use an EditText and a button). If the connection is successfully established, some data will be retrieved from the server an... | android | [4] |
873,407 | 873,408 | Android app that needs to use non-memory SD card | <p>I'm contemplating making an android version of my iPhone app. One of the attractions is the availability of a micro/miniSD card from Spectec that has an Ant+ radio in it, to communicate with Ant+ protocol devices. </p>
<p>The technical feasibility of this is not my question; but rather its practicality:</p>
<p>Thi... | android | [4] |
2,427,400 | 2,427,401 | Shouldn't this Python function return 6 all the time? | <p>I am new to Python and learning about functions. I came across the following function and at my wits end understanding how it works. It seems to me no matter the value of <code>b</code>, the answer should always be six but that isn't the case.</p>
<p><em><strong>CODE</em></strong></p>
<pre><code>def mult(a, b):
... | python | [7] |
4,288,870 | 4,288,871 | Android HTTPS streaming with 2.3.3 | <p>I was having an issue with a Video File hosted on a Amazon s3 server. I create a pre-signed URL and feed that URL to a video view. On ICS and above the VideoView plays the file, but in android 2.3.3 it fails to play the file. I remove the 's' from the https pre-signed url and now the videoview can play the file ? Wh... | android | [4] |
4,287 | 4,288 | Using lower_bound() and upper_bound() to select records | <p>I have a map of objects, keyed by a date (stored as a double). I want to filter/extract the objects based on date, so I wrote a function similar to the snippet below.</p>
<p>However, I found that if I provide a date that is either lower than the earliest date, or greater than the last date, the code fails. I have m... | c++ | [6] |
765,109 | 765,110 | A set of radio buttons are displayed first, and then the stars later appear | <p>I am using JQuery with the Star Rating Plugin from the following site <a href="http://www.fyneworks.com/jquery/star-rating/#" rel="nofollow">http://www.fyneworks.com/jquery/star-rating/#</a> . The page loading A set of radio buttons are displayed first, and then the stars later appear. I would like to just display t... | jquery | [5] |
1,760,163 | 1,760,164 | How to store a list of numbers generated as output in Python? | <p>Suppose I want to add several numbers together like:
1. Find even numbers between 1-100.
2. Find odd numbers between 2-200.
3. Add them.</p>
<p>So for this, I can check for even numbers and odd numbers respectively, but to add them, they must be stored somewhere. Now how can I do this?</p>
<p>i.e. store the output... | python | [7] |
5,814,599 | 5,814,600 | Dynamically change the URL passed to the YouTube player | <p>Dynamically change the URL passed to the YouTube player</p>
<p>YouTube’s player is great but how can we call this object multiple times in our script and pass a new URL to it each time?</p>
<p>For instance, a single copy of the object would sit in our script either hidden or in a container like so:</p>
<pre><code... | javascript | [3] |
5,776,370 | 5,776,371 | Cannot find symbol Date | <p>I'm getting an error "cannot find symbol method add(java.util.Date)", although what I'm passing it was declared a Date. What am I missing?</p>
<pre><code>import java.util.*;
import java.text.SimpleDateFormat;
import java.text.*;
class Entry {
Date date;
Entry(Date aDate) {
date = aDate;
}
}
... | java | [1] |
4,123,298 | 4,123,299 | Run codes for only 60 times each second | <p>I'm creating a directx application that relies on the system time (because it must be accurate),
and I need to run lines of code for 60 times each second in the background (in a thread created by boost::thread). that's equal to 60 FPS (frame per second), but without depending on the main application frame rate.</p>
... | c++ | [6] |
4,585,423 | 4,585,424 | Add link to image with <a href /> already set? | <p>I am new to all this and stuck on the following;</p>
<p>I have a banner slider on the home page set as follows;</p>
<pre><code><li><a class="thumb" href="img/index1.jpg" ><img src="img/sliderImg1.jpg" /></a></li>
<li><a class="thumb" href="img/index2.jpg" ><img src="i... | javascript | [3] |
4,623,713 | 4,623,714 | Servlet on startup that triggers an event after regular interval of time using timer class? | <p>I have a servlet that starts on start of tomcat. I need a functionality in that servlet that triggers the event after a regular interval of time i.e 1 hour and
runs in the back ground? Here is my code :-</p>
<p>in main method </p>
<pre><code>MyTask contentTask = new MyTask();
long interval = 60 * 60 * 1000;
Tim... | java | [1] |
987,904 | 987,905 | Parse html from loadHTML, how to loop through cols? | <p>I'm trying to parse HTML from loadHTML but I'm having trouble, I managed to loop through all <code><tr></code>s in the document but I don't know how to loop through the <code><td></code> s on each row.</p>
<p>This is what I did so far:</p>
<pre><code>$DOM->loadHTML($url);
$rows= $DOM->getElements... | php | [2] |
4,153,996 | 4,153,997 | Calling Python function from within function | <p>I am attempting to call two_byte_proc(payload,offset) from within process() but it does not write to the output file out_buf. The output from offset or payload may contain None so those iterations should be skipped and restart the process function with the next packet.</p>
<pre><code>def process():
pkts = sniff... | python | [7] |
1,795,305 | 1,795,306 | can i disable output escape in javascript? | <p>I realise that the title of this question may be inaccurate but I was wondering how I can use something like in XSLT to clean up characters in Javascript. For example I have a JSON which I use to extract certain information, one of which is a hotel name. The problem is the hotels that have an apostrophe in their nam... | javascript | [3] |
1,493,718 | 1,493,719 | Integer is String - how can that be? | <p>Something terribly wrong is happening.</p>
<p>I have </p>
<pre><code>ArrayList<Integer> activitiesToDelete;
</code></pre>
<p>I need to prepare array of objects to pass to Spring jdbcTemplate. However for some reason element in ArrayList is treated as String, so breaks at the point of execution of jdbcTempla... | java | [1] |
2,554,568 | 2,554,569 | catching std::exception | <p>I have a silly question. I read this article about std::exception <a href="http://www.cplusplus.com/doc/tutorial/exceptions/" rel="nofollow">http://www.cplusplus.com/doc/tutorial/exceptions/</a></p>
<p>On catch (exception& e), it says:</p>
<blockquote>
<p>We have placed a handler that catches exception objec... | c++ | [6] |
1,816,283 | 1,816,284 | javascript multidimensional Array and associative array | <p>i am new of javascript, i have been told by someone, he said "speak strictly, javascript doesn't have multidimensional Array and associative array ". but in a book, i saw the following </p>
<pre><code>var my_cars=Array();
my_cars["cool"]="Mustang";
$a=Array(Array(0,1),2);
</code></pre>
<p>so the opinion form he... | javascript | [3] |
327,239 | 327,240 | Valid Characters for JavaScript Variable Names | <p>Just wondering if anyone can point me to a webpage detailing the valid characters that can be used for naming a JavaScript variable. </p>
<p>I want to create a small 'extension library' for my non-javascript users here at work (who all seem to be squeamish when it comes to the language). I love how jQuery and Pro... | javascript | [3] |
1,411,890 | 1,411,891 | Help display image in single post using javascript zoom image..? | <p>Can someone helping me implement single post image with Javascript features with image zoom such i found here : <a href="http://www.housetohome.co.uk/galleries/bedroom/adult/Relaxed_country_bedroom_31391.html" rel="nofollow">http://www.housetohome.co.uk/galleries/bedroom/adult/Relaxed_country_bedroom_31391.html</a><... | javascript | [3] |
5,212,336 | 5,212,337 | Letting a third party app start my activity directly? | <p>I'm working on an activity which other 3rd parties want to use in their own apps, via intents.</p>
<p>Right now this activity is catching urls via an intent filter, like this:</p>
<pre><code><activity android:name=".MyActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW... | android | [4] |
2,783,211 | 2,783,212 | Garbage collector and finalize() method | <p>You people may think that within 15-20 minutes i have asked 4-5 questions on the same topic, so I may need a tutorial on this. But i am getting these questions by reading about GC.</p>
<p>So my question is GC will call a finalize() method on an instance only once of its life cycle even though if the same object is ... | java | [1] |
5,258,737 | 5,258,738 | Is PHP suitable for downloading large amounts of data? | <p>Is PHP suitable for downloading large amounts of data, usually via cron? Should I worry about the memory footprint when I am using PHP for downloading multiple zip files?</p>
| php | [2] |
3,108,226 | 3,108,227 | How to convert .NET dll to unsigned char array to use it from c++ | <p>I have .net dll, i want to convert its content to char array,
result will be like this</p>
<pre><code>int Length=10;
unsigned char MyArray[Length] =
{
0x4D, 0x5A, 0x90, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00
};
</code></pre>
<p>for dll this Length may be for example 300000. Do You know any software or other ... | c++ | [6] |
4,070,041 | 4,070,042 | JavaScript Prompt - Is it ok to use? Or does it act strange in some browsers? | <p>I'm interested in using a JavaScript Prompt to have the user enter data. Any concerns on using JS prompt? Will any browsers freak out?</p>
| javascript | [3] |
2,768,795 | 2,768,796 | Viewing the String Value of a Toast and changing it | <pre><code><string name="next_toast">Correct</string>
</code></pre>
<p>I want the value to change to a variable </p>
<p>for example</p>
<pre><code>next_toast = getNextQuestion();
</code></pre>
<p>How do I accomplish this</p>
| android | [4] |
191,292 | 191,293 | Can't launch app from URI | <p>I have already looked at most questions with similar topic and got how intent-filters work, but I cannot make android to launch my app. Here is the relevant part of manifest:</p>
<pre><code> <activity
android:name=".UriHandler" >
<intent-filter>
<action android:name="an... | android | [4] |
1,457,497 | 1,457,498 | virtual memory is increased a lot in my application | <p>I am running my application
when i run the <strong>TOP</strong> command it is showing too much virtual memory</p>
<p>Thu Oct 4 18:11:01 IST 2012
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31248 root 18 0 28.1g 73m 1772 S 12.8 7.3 14:53.12 commandserver </p>
<p>ThreadCount
... | c++ | [6] |
5,169,411 | 5,169,412 | Ensure method A is called after every call of B (an abstract implemented method)? | <p>Having this tasteful class </p>
<pre><code> public abstract class CakeSkill
{
//..
boolean cherry=false;
private void finalMandatoryTouch()
{
cherry=true;
}
abstract public void cook();
}
</code></pre>
<p... | java | [1] |
5,748,091 | 5,748,092 | Python, beyond the basics | <p>I've gotten to grips with the basics of Python and I've got a small holiday which I want to use some of to learn a little more Python. The problem is that I have no idea what to learn or where to start. I'm primarily web development but in this case I don't know how much difference it will make.</p>
| python | [7] |
1,495,951 | 1,495,952 | Pagination in a rdlc report | <p>How can I set the pagination or the number of items being displayed in a single page? Suppose there are 1000 items and at each page I want to show 100 and use a next button to navigate to the next page . How can I be able to do that, Please discuss it in c# context .
Thank You.</p>
| c# | [0] |
81,858 | 81,859 | Why Do try ... catch Blocks Require Braces? | <p>While in other statements like if ... else you can avoid braces if there is only one instruction in a block, you cannot do that with try ... catch blocks: the compiler doesn't buy it. For instance:</p>
<pre><code>try
do_something_risky();
catch (...)
std::cerr << "Blast!" << std::endl;
</code></... | c++ | [6] |
3,956,027 | 3,956,028 | Keep track of the lifetime of a child process in C# | <p>Part of our job is interfacing with an ERP system. Some of the processes within that system can be automated by calling a specific exe called IMPAUT.exe in the base directory of the ERP system. I pass the ERP sub program ID to IMPAUT and it fires off.</p>
<p>Now, what IMPAUT does is determines if the ERP installati... | c# | [0] |
5,340,650 | 5,340,651 | load html text of https (SSL) | <p>Does anyone know how to load the HTML element of https in asp.net?</p>
<p>say.. you have the following url: <a href="https://somesite.com/secure/site.aspx" rel="nofollow">https://somesite.com/secure/site.aspx</a>. How do I programatically load the html content of the this url?</p>
| asp.net | [9] |
4,005,477 | 4,005,478 | How to hide an iframe using a button in the content page? | <p>I am using an iframe for showing a page in my website. i want to hide that frame using a close button in the content page( the page which is showing in the frame)</p>
<p>How to do this? use jQuery
<a href="http://www.freeimagehosting.net/uploads/th.16304cfe1b.png" rel="nofollow">See this image</a></p>
| asp.net | [9] |
4,792,755 | 4,792,756 | In App Billing V2: Item not found, but purchase OK | <p>Have In App Billing V2 incorporated into my code and be able to buy one-time purchase item and yearly subscription item. But when purchasing one-time purchase item, always get the message "Item not found". Is this a Google bug? Any help? Thanks in advance.</p>
<blockquote>
<p>ps:even after the mobile reboot. It o... | android | [4] |
4,458,058 | 4,458,059 | How can I convert text into link using Jquery and assign a function using Jquery? | <p>How can I convert text into link using Jquery and assign a funtion? I have a table and I want to convert table’s last row’s first cell text into link and assign onclick function “DisplayDetails()”.</p>
<p>My table name is “ScoreCardDataCurrentTable”.</p>
<p>Thanks</p>
| jquery | [5] |
1,239,742 | 1,239,743 | PHP Strip_tags for div with a specific ID? | <p>Does anybody know if a modified strip_tags function exsists where you can specify the ID of the tags to be stripped, and possbile also specify to remove ALL THE DATA IN THE TAGS. Take for example:</p>
<pre><code><div id="one">
<div id="two">
bla bla bla
</div>
</div>
Running:
new_... | php | [2] |
2,232,166 | 2,232,167 | refresh image with jquery asynch | <p>I use the script beneath to refresh a webcam image. It refreshes every 18 seconds and after 8 refresh it stops refreshing. I have a feeling it does not cancel it correctly. Because after some time I see the loading sign going haywire. Is there something wrong with my script?</p>
<pre><code>var count = 0;
function C... | jquery | [5] |
912,042 | 912,043 | How to use javascript to move an object from one list to another on the same page | <p>I have a jsp I'm working on and I was wondering if there is an easy javascript function that can figure out which element in a list is selected and then move that element to another on the same jsp?</p>
<p>here is the screen shot of the jsp:</p>
<p><img src="http://i.stack.imgur.com/opG4W.png" alt="enter image des... | javascript | [3] |
5,489,372 | 5,489,373 | What's a good way to determine where POST information was sent from | <p>I am writing a Instant Payment Notifications script for paypal in PHP. There are going to be other payment processors down the road, but they're going to be handled by the same function.</p>
<p>So I need to find a good way to detect where the post information came from.</p>
<p>Anyone have any experience handling p... | php | [2] |
2,753,690 | 2,753,691 | Listview with image in android,when i click an item it should appear | <p>in listview i like to display one image,but when i click an item it should appear,if i click the same it should disappear,if i click some other item also it should disappear,only cureent item image should appear. </p>
<pre><code>public View getView(int position, View convertView, ViewGroup parent) {
Vie... | android | [4] |
297,987 | 297,988 | alias keyword (like typedef) in C#? | <p>I have 2 libs that have different case on different platforms :(. It seems like everything else is the same (method names, param order, etc). How can i create an alias so my current spelling for platform a will work when i compile for platform b (I would really hate to make a wrapper for case difference)</p>
| c# | [0] |
4,186,118 | 4,186,119 | jquery check this has content | <p>How to check this has content in a jquery test? I want to check if each li is not empty, do some stuff.</p>
<p><a href="http://jsfiddle.net/h8UXV/" rel="nofollow">Online demo</a> And code repeart:</p>
<p>HTML</p>
<pre><code><ul>
<li>list1</li>
<li></li>
<li>list3</il> ... | jquery | [5] |
1,158,861 | 1,158,862 | Initialize Object with different parameters | <p>Hello I have code which replaces <code>document.write</code>, makes a buffer and than pushes buffer into the document:</p>
<pre><code> var lazyLoad = (function () {
var counter = 0
var buffer = new Array()
function work(options){
window.d = document
var tmp_buffer
d.write ... | javascript | [3] |
4,970,110 | 4,970,111 | Overriding Canvas.drawTextOnPath | <p>In androids before ICS, implementation of Canvas.drawTextOnPath() does not support Right-to-Left. The full support of RTL text is now added in ICS and JB.</p>
<p>I want to know is there a way to extend Canvas class and override drawTextOnPath based on newer versions of android for my app? and if yes, where can I fi... | android | [4] |
3,775,930 | 3,775,931 | Private variables in inherited prototypes | <p>I think I have misunderstood how Javascript prototypal inheritance works. Specifically, the prototypes internal variables seem to be shared between multiple different sub-objects. It is easiest to illustrate with code:</p>
<pre><code>var A = function()
{
var internal = 0;
this.Increment = function()
{
ret... | javascript | [3] |
2,206,844 | 2,206,845 | How to change apk file name in android | <p>I need to change the name of apk file for my android application.
I am using Eclipse for the build.
How to achieve this ?</p>
| android | [4] |
2,124,749 | 2,124,750 | javascript function not working correctly | <p>I have the following simple javascript function to slide an object up and down.</p>
<p>When I first click it should slide down which it should do and alerts with true which it should do. However on the second click I want it to slideup however it detects firstclick to be true again. Any ideas</p>
<pre><code><... | javascript | [3] |
2,857,938 | 2,857,939 | Can not play video from youtube | <p>Hi I am new to android and I am trying to play youtube video using this code but I am not getting any result even not getting error.</p>
<pre><code>public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Uri uri = Uri.parse("http://www.youtube... | android | [4] |
5,570,161 | 5,570,162 | when i use textview.getid(),why the result comes out is not the the one i defined for textview in the xml | <p>Assuming i got 3 data:i=01,j=02,k=03 and i want to set these 3 data indiviually into 3 textViews that defined with ids:@+id/tv01,@+id/tv02,@+id/tv03. The following is what i have tried: </p>
<pre><code>if (textview.getid().contain(i))
textView.settext(i)
</code></pre>
<p>But when i use textview.getid(), why th... | android | [4] |
357,102 | 357,103 | php setting text | <p>I'm working on a site in php. Originally I had a lot of html pages but they were all very similar in that they had a heading, an image, and some text. I was able to consolidate my pages into one php page and pass in the heading and image name as GET variables. I wouldn't want to pass a lot of text this way though... | php | [2] |
2,860,862 | 2,860,863 | Need Jquery Plugin for 2-colomns Vertical tabs | <p>There are lot of plugins available for jquery tabs, but what I am looking for is vertical tabs.</p>
<p>That is, in only two columns where the first column has vertical tabs and second column has content.</p>
| jquery | [5] |
3,447,941 | 3,447,942 | Jquery: Content Rotator / Slider question | <p>I'm looking to overhaul a website for a friend of mine at <a href="http://gaonlinedriversed.com/" rel="nofollow">http://gaonlinedriversed.com/</a></p>
<p>They threw together the current site with Joomla. You might want to turn your sound off before going to the site, it has a pretty annoying video that starts up, ... | jquery | [5] |
5,983,184 | 5,983,185 | iOS 5 keyboardWasShown | <p>I add a negative and a period button through the code to the basic numeric keyboard for text fields that accept decimal values. i call this code from the keyboardWasShown method and it seems to add these two keys to the keyboard in iOS 4 series, but does nothing in iOS 5. The code is called and the method is execute... | iphone | [8] |
3,775,374 | 3,775,375 | How can I code a C# function to accept a variable number of parameters? | <p>I have a C# method that I would like to use to update some data. The method could be passed either a string, a double, an integer</p>
<pre><code>public void Update(string ac, string pr, string fld, Int32 intVal = null, double dblVal = null, string strVal = null)
{
</code></pre>
<p>Depending on the value of fld I w... | c# | [0] |
284,195 | 284,196 | 'An exception occurred during a WebClient request" while using C# ASP.NET | <p>So, I have built an auto update program to my program. </p>
<p>The code that is running in here is:</p>
<pre><code>new WebClient().DownloadFile("XXXX", checkingfolder.SelectedPath);
</code></pre>
<p>the XXX is my webserver that is running as a VPS server in verio, with the newest IIS and everything. </p>
<p>When... | c# | [0] |
3,889,967 | 3,889,968 | Virtual machine with Mac OS X | <p>I would like to develop an iPhone application, but I do not have a Mac. I would like to find out if it is possible to rent a virtual machine with a Mac OS so that I could develop on that machine. Does anyone offer that service? Would it not make sense because I couldn't connect my phone directly to that machine?</p>... | iphone | [8] |
4,710,174 | 4,710,175 | Chained PHP controls | <p>I'm making a form validation class and it works like this currently.</p>
<pre><code>$validator->setVar($_POST['Username'])
->standardFilter(array('XSS', 'SQL_INJECTION'))
->customRegex()
->replace('This', 'With this')
->getResult();
</code></pre>
<p>While it w... | php | [2] |
1,477,306 | 1,477,307 | C# Dynamic size indexers | <p>How to set up indexer that are dynamically grown in size ?Down,i used the fixed size array.
If i use <code>List<Employee></code> ,then there is no point to have indexers.so how can i keep the
array to grow dynamically?</p>
<pre><code>class Department
{
private Employee[] employee = new Employee[6];
... | c# | [0] |
2,599,346 | 2,599,347 | Career Confusion | <p>For someone who has not worked anywhere in Java Technology except learning just the core concepts in his Masters (MCA) and Graduation (BCA, bachelor degree course):</p>
<ol>
<li><p>Is it possible to get job anywhere in Java technology? Considering he/she has not studied it in regular college and not First Class thr... | java | [1] |
3,139,551 | 3,139,552 | How can I conditionally define a function in javascript? | <p>Consider the following script:</p>
<pre><code>if (false) {
function foo() {
alert("FOO");
}
}
foo(); // alerts "FOO"
</code></pre>
<p>As you can see, the function <code>foo</code> is defined and works even though the condition for the <code>if</code> fails.</p>
<p>The reason I want to do this is ... | javascript | [3] |
4,851,730 | 4,851,731 | full code from java in c++ | <p>here is full code from algorithm and data structure in java written in c++</p>
<pre><code>#include <iostream>
using namespace std;
class link {
public:
int idata;
double ddata;
link *next;
link ( int id,double dd){
idata=id;
ddata=dd;
}
public :
void display(){
... | c++ | [6] |
110,703 | 110,704 | Session object with WCF? | <p>Is it possible to use Session object with WCF to store session related data?
If yes the can you describe how?</p>
<p>Thanks</p>
| c# | [0] |
837,859 | 837,860 | Is it possible to put layout xml's in subdirectories under /res/layout? | <p>My layout files are growing and growing. So I came up with an idea of putting them in subdirectories. Is it possible? Simple code:</p>
<pre><code><include android:id="@+id/mLayout" layout="@layout/subdirectory/blahblah">
</code></pre>
<p>seem not to work.</p>
| android | [4] |
6,028,309 | 6,028,310 | preventing reinserting of data when press browser's refresh button | <p>I developed a web application in asp.net.I have a module for saving values to database after clicking the button event.Thats working successfully.After that when i clicked the browser's refresh button the values reinserted to the table each time.How can i avoid this .Which is the code for this solution?</p>
| asp.net | [9] |
4,582,488 | 4,582,489 | What am I doing wrong? /noob ?Learning to program | <p>I am trying to create a simple calculator in the console for single digit numbers.(Well I actually only care about multiplication)</p>
<p>So, here is my code and if someone could help me.</p>
<pre><code>class multiplythisnumber
{
static void Main()
{
int input, input1, output; //variable de... | c# | [0] |
1,774,321 | 1,774,322 | Java - Trouble Accessing ValueMap | <p>I've got a pretty simple script that simply accesses a resources properties via a ValueMap. Except for some reason I keep getting an <strong>unexpected token error</strong> were the if statement starts. This has to be something I'm just overlooking. </p>
<pre><code>public class headerComponent{
ValueMap property ... | java | [1] |
1,623,897 | 1,623,898 | Storing values from a vector to a string as comma seperated values | <p>how can I store the values returned from a function to a string as comma seperated values. Can anyone help me..?</p>
<pre><code>const myVector &vecList = obj.get_List();
vector<myNumVector *>::const_iterator iter;
for (iter= vecList.begin(); iter!= vecList.end(); iter++)
{
string myNum = (*iter)->get... | c++ | [6] |
913,874 | 913,875 | Is it a good practice to always define `value_type` when we define a template | <pre><code>template<typename T>
class Point
{
public:
typedef T value_type;
...
};
</code></pre>
<p>I have seen above code in the <a href="http://rads.stackoverflow.com/amzn/click/059600298X">book, pp176</a>.</p>
<p><strong>Question1</strong>> Is it a good practice to always add the definition for <code... | c++ | [6] |
3,863,472 | 3,863,473 | Controlling the access of method | <p>Is there a way to write a Web program when you would deliberately specify which classes are allowed to invoke this or that method? I am writing Web app in Java and using Spring Web MVC. If it is possible please tell me about the methods or technologies being used for that.
Best regards</p>
| java | [1] |
3,077,245 | 3,077,246 | unexpected T_IF error in PHP | <p>I have a small problem with this code and i cannot understand why is returning <code>unexpected T_IF</code></p>
<p>code:</p>
<pre><code>$get_gender = array($getGender->getMaleGender());
$gender =
if ($gender->getGender()) {
echo "Male";
} else {
echo "Female";
}
</code></pre>
<p>Any help is a... | php | [2] |
1,400,311 | 1,400,312 | Android: How to change hue of an Image? | <p>I'm looking to change the hue of my background image (PNG) programmatically. How can this be done on Android?</p>
| android | [4] |
516,963 | 516,964 | Android: getting system services from within a application level library class | <p>Hopefully someone can give me a pointer. I have an application that makes several web service calls. I'm in the middle of a refactor and I've pulled the actual calls out to a new class. The problem is that I can't seem to use:</p>
<p>SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
... | android | [4] |
5,554,670 | 5,554,671 | Out Of Memory Exception while uploading video to facebook in android | <p>while uploading the video to facebook i am getting the Out Of memory exception log cat showing the following exception:</p>
<pre><code>java.lang.OutOfMemoryError: (Heap Size=19783KB, Allocated=13705KB, BitmaSize=0KB)
at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:91)
at java.io.ByteArr... | android | [4] |
4,146,320 | 4,146,321 | Benefits of using "const" with scalar type? (e.g. "const double" or "const int") | <pre><code>///////////////////////////////////////
class A {
...
const double funA(void)
{...}
};
A a;
double x = a.funA();
// although the intention is to
// enforce the return value to be const and cannot be
// modified, it has little effect in the real world.
class A2 {
...
double funB(void)
... | c++ | [6] |
4,663,665 | 4,663,666 | C++ programing code counts[s[i] - '0'] ++; | <pre><code>for (int i = 0; i < s.length(); i++)
{
if (isdigit(s[i]))
counts[s[i] - '0'] ++;
}
</code></pre>
<p>what does this code means, any one can able to explain this code " counts[s[i] - '0'] ++;" exact opertion </p>
| c++ | [6] |
4,572,171 | 4,572,172 | Adding camera effects in android and save | <p>I am working on a new android application.In my app i have to add show effects on image preview [like sepia,pinch, mirror, etc] and capture and save image in that particular effect.eg: I f user select pinch effect then he can capture and store the image with pinch effect.
I had read some faq's. But they are telling ... | android | [4] |
259,697 | 259,698 | algorithm to compare numbers within a certain distance from each other | <p>So I have an array of numbers that look something like</p>
<pre><code>1,708,234
2,802,532
11,083,432
5,098,123
5,777,111
</code></pre>
<p>I want to find out when two numbers are within a certain distance from each other (say 1,500,000) so I can group them into the same location and have just one UI element represe... | iphone | [8] |
4,625,021 | 4,625,022 | How to compare two files based on datetime? | <p>I need to compare two files based on datetime..I need to check whether these two files were created or modified with same datetime..I have used this code to read the datetime of files...</p>
<pre><code> string fileName = txtfile1.Text;
var ftime = File.GetLastWriteTime(fileName).ToString();
... | c# | [0] |
1,010,476 | 1,010,477 | How can I switch between 2 characters? | <p>I am using python 2.7 and i'm trying to find a solution to this problem,
when i get a string from a certain function
i need to switch between the first and the last character.
for example if the string is "hello" it should return as "oellh"
slicing won't work and i cant just replace the characters like i will norm... | python | [7] |
2,748,987 | 2,748,988 | Get index of unordered list and scroll position (up and down) on click | <p>I have a schedule of events, the ul has a fixed height and overflow hidden, the li's also have a fixed height. Only four are visible at a time. I need to figure out how to scroll through the list, both up and down on click of the appropriate button. </p>
<p>I'm sure there are plug ins out there that can do this, bu... | jquery | [5] |
4,813,008 | 4,813,009 | How to create a new php file from template | <p>I am certainly not an expert in PHP, and have surfed SO thoroughly but didn't find anything related to this. Might mean that the question is stupid, but I was trying to create a new php file on sign up (so to provide rss feeds for each person who signs up) and I've managed so far to create a beatifully empty file. H... | php | [2] |
473,953 | 473,954 | What are the latitude and longitude of a circle? | <p>In Android, if I have a circle's radius and center value, how could I measure the latitude and longitude of about 1 km periphery of that circle?</p>
| android | [4] |
1,192,909 | 1,192,910 | Which sensors used for Sensor.TYPE_ROTATION_VECTOR | <p>I'm developing for Honeycomb Gingerbread and I was wondering, which physical sensors are used when I use the Sensor.TYPE_ROTATION_VECTOR?</p>
<p>Does it use a combination of compass and accelerometers? Or gyro + accel? Or all three? Or something else?
The reason I'm asking is that my app behaves differently on two ... | android | [4] |
4,671,494 | 4,671,495 | When JavaScript is called input text is deleted? | <p>Im using the following to update the Latitude and Longitude of a delivery postcode.</p>
<p>Code works perfectly except when the script is called it deletes the postcode from the input box.</p>
<p>Can someone tell me why this is?</p>
<pre><code><script type="text/javascript">
//<![CDATA[
var geo = new G... | javascript | [3] |
2,382,458 | 2,382,459 | What is the jQuery method to detect when audio has stopped playing? | <p>I want to toggle a function when the audio is done being played.</p>
<p>Here's the code I tried(without luck):</p>
<pre><code>$(function(){
if ($('#audio').get(0).stopped == true) {
$('div#switch').toggle();
}
});
</code></pre>
| jquery | [5] |
5,903,318 | 5,903,319 | calling python module dynamically using exec | <p>I have 2 modules</p>
<p>mexec1.py</p>
<pre><code>def exec1func():
print 'exec1'
exec 'c:/python27/exec2.py'
if __name__ == '__main__':
exec1func()
</code></pre>
<p>exec2.py</p>
<pre><code>def exec2func(parm=''):
print 'exec2 parm',parm
if __name__ == '__main__':
exec2func(parm='')
</code></... | python | [7] |
2,992,214 | 2,992,215 | pass values between two different pages using Jquery | <p>can any one tell me how to do this in JQuery?</p>
<p>i have two .aspx pages named default1.aspx and default2.aspx. default1.aspx has one textbox named as textbox1 and default2.aspx has one textbox named as textbox2. default1.aspx opens the default2.aspx by using window.showmodaldialog(). Issue is that While i am ch... | jquery | [5] |
2,775,825 | 2,775,826 | create header files in c++ | <p>I have the following question whether there is the possibility in c++ to create header files using the following rules. Let's take the header </p>
<pre><code>#include "sum.h"
</code></pre>
<p>where in sum.h i will declare functions or procedures and then use it in .cpp files?</p>
| c++ | [6] |
4,703,404 | 4,703,405 | Convert a Collection<String> into comma sepearted values | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/205555/the-most-sophisticated-way-for-creating-comma-separated-strings-from-a-collection">The most sophisticated way for creating comma-separated Strings from a Collection/Array/List?</a> </p>
</blockquote>
<p>I... | java | [1] |
2,723,889 | 2,723,890 | Watermark 2000+ images at once? | <p>I have a image hosting service and people upload offline (they upload to another computer like a station without internet access) and then we sync the images (they aren't watermarked at this stage) and they are not approved at this point.</p>
<p>There is an admin area where the user would go to approve an image, an... | php | [2] |
1,807,512 | 1,807,513 | Jquery render different data according to body id value | <p>I would like to load data according to the body id value, here is the code:</p>
<pre><code><body id="CN">
....
<body>
</code></pre>
<p>and the Jquery will take the value "CN" and load content,
the format of the content is below:</p>
<pre><code> <div class="menu">
<div class="links">... | jquery | [5] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.