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,889,676 | 3,889,677 | what is ::* in C++ | <p>I was reading a basic C++ tutorial when I faced </p>
<pre><code>::*
</code></pre>
<p>in the following code. May I know what that is:</p>
<pre><code>class A {
public:
protected:
int i;
};
class B : public A {
friend void f(A*, B*);
void g(A*);
};
void f(A* pa, B* pb) {
// pa->i = 1;
pb->i = 2;
/... | c++ | [6] |
3,012,892 | 3,012,893 | Use of simple delegate | <p>a simple delegate just point a function and later when we call delegate then mapped function is invoke.</p>
<p>i hardly use delegate.so i just want to know why one should use simple delegate. here i am giving a sample code of use delegate.</p>
<pre><code>using System;
using System.Windows.Forms;
delegate void Dis... | c# | [0] |
327,830 | 327,831 | Android Move the whole screen upwards when softkeypad is opened? | <p>i just want to shift my whole activity screen upwards when the user clicks on the edit text...
i mean the screen will shift upwards and below it we can see the soft keypad...
I have tried using android:windowSoftInputMode="adjustPan|adjustResize" in my Manifest file but it doesn't make any sense..
thanks in advanc... | android | [4] |
3,193,354 | 3,193,355 | PHP File Injection? | <p>I have a script that calls a bash script that does some processing, but the script calls the bash script using user inputed data.</p>
<p>I am wondering if there is a way to make sure the person (it's a file upload) doesn't append like <code>;cd /;rm -rf *</code> to the end of the file. Or anything else like that. W... | php | [2] |
2,861,920 | 2,861,921 | Hiding a table row according to a value | <p>I do not find the right expression to select table rows that must be hidden according to the value ofe the cell on which the user has clicked. I have several rows similar to this:</p>
<pre><code><tr id='row2'>
<td class='col1'>val 1</td>
<td class='col2'>Val 2</td>
<td class='col3'&... | jquery | [5] |
1,915,431 | 1,915,432 | Broadcast receiver not called | <p>I know this a basic problem but it is still driving me crazy. I am setting a repeating alarm but the receiver is never called.</p>
<pre><code>Intent intent = new Intent(NewSchedule.this, RepeatingAlarm.class);
PendingIntent sender = PendingIntent.getBroadcast(NewSchedule.this, 0, intent, 0);
Calendar calendar = C... | android | [4] |
5,823,355 | 5,823,356 | Check whether list of number is sequential or not | <p>I have quite a layman question about Java programming.</p>
<p>I would like to write a function to check whether a list of number is sequential or not.</p>
<p>Say [1, 2, 3, 4, 5], the function will return true,</p>
<p>but for [1, 3, 4, 9, 10], the function will return false.</p>
<p>Could anyone help me?</p>
<p>T... | java | [1] |
3,422,280 | 3,422,281 | Bring multi-dimensional array down (unnest) one level | <p>Althoug this works well enough, I am curious if anyone knows of a prettier way of doing this as this situation seems to come up quite often. </p>
<pre><code><?php
//Initialy, data is nested up in $some_array[0] ...
$some_array = array(array('somevar' => "someValue", "someOtherVar" => "someOtherValue"));
... | php | [2] |
936,270 | 936,271 | Still no solution for sending android app from Win 7 to LG Optimus V | <p>We have a Dell MT560 running Windows 7 with Eclipse, JDK, and the Android SDK. At the other end of the USB cable is an LG Optimus V Android phone. We wrote a tiny app and all it does is display "Hello Ron". This works perfectly on the emulator, but we are having no success sending the app to the phone. The phone... | android | [4] |
1,312,550 | 1,312,551 | PHP to randomise image | <p>I'm loading a folder full of images in, to create a jQuery Image Gallery.</p>
<p>There are currently 100 images being loaded in to create the gallery. I've got all that to load without issue.</p>
<p>All I want to do is make the image(s) that are loaded, load in randomly.</p>
<p>How do I achieve this?</p>
<p>My c... | php | [2] |
141,092 | 141,093 | how to redirect to onother page after if condition is satified in php? | <p>I have used a php code for redirect to another page, but its not working.I am at loss. please help me. I am giving the code snippet.</p>
<pre><code>if($row->cnt==1){
echo "Succes.";
// header ('Location:HomePage.php);
header("Location:http://localhost/library/HomePage.php");
}
</code></pre>
| php | [2] |
1,383,109 | 1,383,110 | ArrayAdapter Help? | <p>Hi i want to display a list view in my application. Each row should contains a text and an image. i have used ArrayAdapter to display this, but how to insert an image after the text.Please help ?</p>
<pre><code>String lvr[]={"Android","iPhone","BlackBerry","AndroidPeople"};
super.onCreate(savedInstanceState);
setCo... | android | [4] |
541,036 | 541,037 | Creating a exponential function in python | <p>I want to write a function that takes a single floating-point parameter x and
returns the value of the function e(to the power of x) . Using the Taylor series expansion
to compute the return value, using a loop that terminates when the partial sum SN+1 of Eq. (2) is equal to SN.</p>
<p>Dont know how to make to the ... | python | [7] |
2,151,523 | 2,151,524 | Add a bookmark to a pdf using itextsharp | <p>I'm trying to merge pdfs and add bookmarks to them, I found a way to add a bookmark, by chapter, but the chapter aperse on the page, is there a way to add only the bookmark, or to make the chapter not visible.</p>
<p>Thanks.</p>
| c# | [0] |
4,617,324 | 4,617,325 | What's the difference between this two ways of defining a function in JavaScript? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/336859/javascript-var-functionname-function-vs-function-functionname">Javascript: var functionName = function() {} vs function functionName() {}</a> </p>
</blockquote>
<p>Way 1:</p>
<pre><code>function fancy_fu... | javascript | [3] |
4,972,573 | 4,972,574 | How to know how many event listeners there are on the page | <p>I am building a fairly large application in Javascript. It is a single page that can change different views. All the views have their own variables, events, listeners, elements, etc.</p>
<p>When working with large collections and multiple events it's sometimes good to know what exactly is happening on the page.</p>... | javascript | [3] |
4,233,296 | 4,233,297 | Calling char method into main method | <p>How do I call this method into my main method: </p>
<pre><code> public static char shiftLetter(char aLetter, int offset){
if((aLetter >= 65 && aLetter <= 90) || (aLetter >=97 && aLetter <=122)){
char shifted = (char) (aLetter + offset);
return shifted;
}else{
... | java | [1] |
5,888,521 | 5,888,522 | Replace a character in java? | <pre><code>public void sendData(){
try {
URL data = new URL("http://mywebsite.net/isvalid.php?username=" + usernameField.getText() + "&password=" + passwordField.getText());
BufferedReader in = new BufferedReader(
new InputStreamReader(data.openStream()));
S... | java | [1] |
1,512,005 | 1,512,006 | Best practice : Hide unused parameter | <p>This may sound a newbie question, anyway I would like to know how you are dealing with this.</p>
<p>I'm adding a method in class which has some parameters but still needs to be implemented later.</p>
<p>I.e. </p>
<pre><code>void AAA::doSmth(const int32_t status)
{
// TODO : Add implementation
}
</code></pre>
... | c++ | [6] |
91,582 | 91,583 | Selection Start Row in DatagridView | <p>I am using the windows DataGridView, in this grid i allowed the multiple rows selection.</p>
<p>When i am checking the <code>dataGridView1.SelectedRows[0].Index</code> it's giving last selected rows Index. Just i want from which row the selection started(Start Row).</p>
| c# | [0] |
1,862,964 | 1,862,965 | how to check in onCreate that the previous android process of the same activity has been killed? | <p>I have an activity in whose onCreate method an Init function is called (the function calls some native code involving lot of stuffs and calls to the openSLES audio api). The point is that this Init function makes the app crash when called again, which happens on a screen rotation or when i close the activity using B... | android | [4] |
852,439 | 852,440 | Slidetoggle a div based on the link clicked | <p>Trying to get the div with class sbox to slide up and down based on the stoggle that has been clicked. Can't figure this out. (I have hundreds of these so I'd like to set up something generic instead of multiple different classes.)</p>
<pre><code>$(".stoggle").click(function () {
$(this).slideToggle("fast");
})... | jquery | [5] |
5,950,083 | 5,950,084 | Java SQLException error | <p>I have got bellow error when I called a java method from from flex application.</p>
<pre><code>java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/testnew
</code></pre>
<p>How can I solve this issue?Please help me.</p>
| java | [1] |
5,736,281 | 5,736,282 | How to run android .apk file on Device or emulator from iMAC | <p>I have .apk file . And I just want to install that .apk file on device or emulator, to verify that application is running properly and ready to upload on Android Market.</p>
| android | [4] |
1,093,703 | 1,093,704 | Return XPath location with jQuery? Need some feedback on a function | <p>For the following project I will be using PHP and jQuery.</p>
<p>I have the following code:</p>
<pre><code>$('*').onclick(function(){
});
</code></pre>
<p>Once a user clicks on an element I want it to return the XPath location of that element.</p>
<p>What I want to do essentially is sort of a filtering system w... | jquery | [5] |
4,664,962 | 4,664,963 | Concatenation inside a parameter | <p>I'm trying to concatenate my increment variable inside the getElementById parameter. I can concatenate using createElement using the increment value, however when I try to concatenate the variable inside getElementbyId, its a no go.</p>
<pre><code>var newdiv = document.createElement("form");
newdiv.set... | javascript | [3] |
1,083,496 | 1,083,497 | Python: Alphanumeric Serial Number with some rules | <p>I am trying to create a alphanumeric serial number in Python, the serial number is governed by the following rules:</p>
<p>3-Digit Alphanumeric Series
Allowed values 1-9 (Zero is excluded) and A-Z (All Capitals with exclusions of I and O)
The code should be able to give the next number after getting the input numbe... | python | [7] |
2,652,336 | 2,652,337 | Will the same singleton instance be available after php script command line call? | <p>I have script with defined class (for instance, Singleton.php). This class implements classic singleton pattern as in PHP manual:</p>
<pre><code> class Singleton {
private static $instance;
public static function getInstance()
{
if (!isset(self::$instance)) {
$c = __CLASS__;
... | php | [2] |
4,044,680 | 4,044,681 | how to download the video using php script | <p>In my program I want to add a download option to download the currently straming video. I tried this code:</p>
<pre><code>$psp = "Tom_20_amp__20Jerry_20race-1.flv";
header("Content-type:application/octet-stream");
header("Content-Disposition:attachment;filename=$psp");
</code></pre>
<p>But I get this error:</p>
<... | php | [2] |
5,690,690 | 5,690,691 | Write ASP.NET aspx page output to server-side disk | <p>I am writing an application which produces reports. I want to save the generated html server side to the disk for another application to use.</p>
<p>The response objects only expose streams for writing data. I need to read the data from the response and write it to disk.</p>
<p>Is there a more graceful way of do... | asp.net | [9] |
4,820,200 | 4,820,201 | android video playback | <p>I'm new to android.
Can anyone help me how to display images from the Sd Card or play videos from Sd Card..
I tried it many ways but none of it is working..</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="f... | android | [4] |
4,894,169 | 4,894,170 | Exception problem when rebinding DataViewGrid | <p>I have a List<> that I bind to a DataViewGrid using a Binding source. Like this:</p>
<pre><code> private void BindGridView(DataGridView dgv, List<KeyTextPair> list, Func<KeyTextPair, int, bool> predicate)
{
BindingSource bs = new BindingSource();
bs.DataSource = list.Where(predi... | c# | [0] |
796,113 | 796,114 | Python read website data line by line when available | <p>I am using <code>urllib2</code> to read the data from the url, below is the code snippet :</p>
<pre><code>data = urllib2.urlopen(urllink)
for lines in data.readlines():
print lines
</code></pre>
<p>Url that I am opening is actually a cgi script which does some processing and prints the data in parallel. CGI scr... | python | [7] |
1,803,617 | 1,803,618 | Defining a dd/mm/yyyy field within an abstract table model | <p>I have defined an abstract table model but one of the columns should house date values
as dd/mm/yyyy format not sure how to do this.</p>
<p>I have a external global file and have hard coded the dates as dd/mm/yyyy.</p>
<p>How can I define this column within my abstract table model so that to only allow
only dates ... | java | [1] |
5,791,818 | 5,791,819 | website folder layout | <p>I'm not going to ask <em>what is the best way to ...?</em> since they might be several ways to do it, I just want to know from your experience how to manage folders and files when starting to build a website ? (note: I'm not english native that is why I request here, I can't find right places to be answered).</p>
<... | php | [2] |
2,513,513 | 2,513,514 | Recording screen activities | <p>I have a requirement in my app recording screen activities as a video file. i am new to android i dont know whether it is possible or not in andorid. if possible please suggest me a way to do that thanks in advance</p>
| android | [4] |
2,370,663 | 2,370,664 | How can php read this parameter | <p>If I have a stored input string that looks like this </p>
<pre><code>http://site.com/param1/value1
</code></pre>
<p>how can php extract <code>value1</code>?</p>
<hr>
<p>I know how to extract parameters that look like this </p>
<pre><code>http://site.com?param1=value1
</code></pre>
<p>but it doesn't work for th... | php | [2] |
5,787,016 | 5,787,017 | list header not showing | <p>hi guys check out this method.... the header view of the list view doesnot displays...</p>
<pre><code>private void displayResultList() {
TextView tView = new TextView(this);
tView.setText("This data is retrieved from the database and only 4 " +
"of the results are displayed");
... | android | [4] |
582,924 | 582,925 | Is this piece of Javascript inefficient? | <p>I was just wondering whether this snippet of Javascript is going to slow down my site:</p>
<pre><code>$(function(){
var realLink = location.href;
$( "#nav a" ).each(
function( intIndex ){
String.prototype.startsWith = function(str){
return (this.indexOf(str) === 0);
}
var pageLink = $(this).attr("h... | javascript | [3] |
1,601,298 | 1,601,299 | jquery $(document).ready and reading div content on load | <p>Anyone know why this isnt working?</p>
<p><strong>css</strong></p>
<pre><code>#test1
{
height: 50px;
border: 1px solid black;
}
#test2
{
height: 50px;
color: red;
border: 1px solid black;
}
</code></pre>
<p><strong>html</strong></p>
<pre><code><div id="test1">
test<br />
... | jquery | [5] |
3,104,646 | 3,104,647 | check if wifi is connected every 5 minutes after screen is off | <p>I have found good tutorial to for Handling Screen OFF and Screen ON Intents: <a href="http://thinkandroid.wordpress.com/2010/01/24/handling-screen-off-and-screen-on-intents/" rel="nofollow">http://thinkandroid.wordpress.com/2010/01/24/handling-screen-off-and-screen-on-intents/</a></p>
<p>but i want that after scree... | android | [4] |
3,369,395 | 3,369,396 | How can I prevent DataGridView double click to open a form more than one time? | <p>How can I open a form one time when I double click a dataGridView cell ?</p>
<pre><code>private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
{
//string queryString = "SELECT id, thename, address,fax,mobile,email,website,notes FROM movie";
int currentRow = int.Pars... | c# | [0] |
5,712,465 | 5,712,466 | Union of two iterators | <p>Consider the iterators <code>count(3,3)</code> and <code>count(5,5)</code>. How can I create a iterator that outputs only the numbers that occur in either <code>count(3,3)</code> and <code>count(5,5)</code>?</p>
| python | [7] |
5,592,772 | 5,592,773 | What's meant by result errors of SmsManager? | <p>When I send an SMS using <code>SmsManager</code>, the result intent broadcasted holds a value of 5</p>
<pre><code>Activity.RESULT_OK
SmsManager.RESULT_ERROR_GENERIC_FAILURE
SmsManager.RESULT_ERROR_NO_SERVICE
SmsManager.RESULT_ERROR_NULL_PDU
SmsManager.RESULT_ERROR_RADIO_OFF
</code></pre>
<p>What's meant by every o... | android | [4] |
4,272,225 | 4,272,226 | How can i compare a string and a char array in java? | <p>In my program I'm trying to compare my char array <code>asterixA[]</code> to string (word) in an if loop like:</p>
<pre><code>if (word.equals(asterixA))
</code></pre>
<p>but its giving me an error. Is there any other way i can compare them?</p>
| java | [1] |
5,060,786 | 5,060,787 | int? maxResults what does the ? means in this statement | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2699373/c-sharp-basic-question-what-is">C# - Basic question: What is ‘?’?</a> </p>
</blockquote>
<p>I have found this statement in a function arguments.</p>
<pre><code>public static SyndicationFeed GetDataFeed(... | c# | [0] |
1,251,259 | 1,251,260 | Should my business logic be in the fragment or the activity above? | <p>I'm trying to use fragments and a list view with an array adapter, and having trouble calling my method from the onClickListener in the array adapter.</p>
<p>If I understand the pattern correctly, a fragment should be self-sufficient, so I want to put my business logic in there. But I can't manage to call it from t... | android | [4] |
5,932,399 | 5,932,400 | Operator Functions as Member Functions and Nonmember Functions | <p>I am very confuse in getting the idea of operator overloading as a member and non member function.</p>
<p>What do we actually mean, when we overload operator as a non-member function and similarly what do we mean when we overload operator as a member fuctions. Although I know that the non-member functions are the <... | c++ | [6] |
496,932 | 496,933 | JavaScript: IF time >= 9:30 then | <p>I'm trying to write a statement that says "if time is this and less than that then". I can use get hours and get min. However, I'm having problems combining a time such as 9:30.</p>
<p>Example,</p>
<pre><code>var now = new Date();
var hour = now.getHours();
var day = now.getDay();
var mintues = now.getMinutes();... | javascript | [3] |
4,757,159 | 4,757,160 | how to select next instance of a selector with possibly intervening classes | <p>I'd like to be able to select the next instance of a specific selector such as .ajax-loader in the following. I tried .next('.ajax-loader') but didn't seem to work and since there could be intervening classes, just simply next() wouldn't work. Here's my markup and a fiddle:</p>
<pre><code>$(document).ready(function... | jquery | [5] |
2,446,722 | 2,446,723 | empty value of parameter - php | <p>I have this code:</p>
<pre><code>foreach($summary as $machine)
{
$hostname = $machine['node'];
$result = mysql_query("SELECT OS FROM machines WHERE ind='$hostname'");
while($row = mysql_fetch_array($result))
{
if($row == 'solaris')
{
$partition_os = 'export/home';
... | php | [2] |
581,861 | 581,862 | How to use Accelerometer Values to Move an Image in Android | <p>Hiii all i want to move an image using accelerometer values,but m not able to do it.can anyone plz help me to do dis, i hav already gone through sample code in android developers site but couldnt understand properly.
Thanks.</p>
| android | [4] |
4,443,933 | 4,443,934 | how to highlight a div for a few seconds using jQuery | <p>I want to be add the following to a a page:</p>
<p>When a div is clicked, I want to:</p>
<ol>
<li>change the background color of the clicked on div for a few seconds</li>
<li>revert back to the original background color after a few seconds</li>
</ol>
<p>I want to do this by using only jQuery available functions -... | jquery | [5] |
2,998,574 | 2,998,575 | How to take the larger value and use in PHP query | <p>I have a field on a real estate search form asking for Min to Max number of bedrooms. The PHP query extract to return the search results is;</p>
<pre><code>//check bedrooms
if(!empty($_GET["room_no_min"]) && is_numeric($_GET["room_no_min"])){
$query[] = "'No_Bedrooms' >= '".$_GET["room_no_min"]."'";... | php | [2] |
4,283,213 | 4,283,214 | inserting array elements into database | <p>I want to store Each element of each array into mysql database fields. how can i do that?</p>
<pre><code><?php
// primarily a method for storing data
// arrays are counted from 0
$hosts = array(
array("ronmexico.kainalopallo.com/", "beforename=$F_firstname%20$F_lastname&gender=$F_gender",
"Your Ron Mexico ... | php | [2] |
1,743,827 | 1,743,828 | Count for datetime object | <p>I'm trying to iterate over DateTime properties on objects in a List collection... </p>
<p>Ex. a tree view that lists the a Name with all its Courses underneath works fine:</p>
<pre><code> // Sorting on name with the courses beneath it:
// *list* is a List<ClsStandholder>;
private void ShowNameWith... | c# | [0] |
1,645,023 | 1,645,024 | Generate combinations (in specific order) of all permutations of the dict of lists | <p>I have a dict of lists</p>
<pre><code>d = {'A': [1,2,3], 'B': [4,5], 'C': [6]}
</code></pre>
<p>I need to produce all permutation of each list (A, B and C). This is OK.</p>
<pre><code>p = {}
for k in d.keys():
p[k] = [i for i in itertools.permutations(d[k])]
</code></pre>
<p>This results in <code>p</code></p... | python | [7] |
16,948 | 16,949 | Rotating an ImageView within a Layout... how? | <p>I have a layout with an image on it (embedded in an ImageView). I need to rotate the image (let's say) 90 degrees CCW.</p>
<p>I've written code to animate the image rotating...:</p>
<pre><code>public class MainActivity extends Activity
{
private ImageView mImageView = null;
private Animation mRotateAnimati... | android | [4] |
1,569,464 | 1,569,465 | How to connect global server from local server in asp.net? | <p>Any one idea about how to connect the global server from local server?
i mean entering data in local server also be placed into global server database.How to do this?</p>
| asp.net | [9] |
3,882,980 | 3,882,981 | Slashes and backslashes uniformity on UNIX / Windows | <p>I'm writing a PHP class, and I want it to be cross-platform compatible. I need to explode a path to find a particular folder name. What do I choose for the delimiter? The path will contain '/' on UNIX and '\' on Windows.</p>
<p>In this particular example, I want to get the name of the directory where an included fi... | php | [2] |
3,248,496 | 3,248,497 | Jquery find the text field by the text within it | <p>Is it possible to find a text field by the text entered inside. </p>
<p>My exact situation is that,</p>
<p>I have about 4-5 text fields, and i need to find those text fields which doesn't have any text entered, i.e whose value = "" .</p>
<p>Any help would be of great use.</p>
| jquery | [5] |
1,657,142 | 1,657,143 | custom bitmap icon to Statusbar notification icon | <p>my new question relate to my last <a href="http://stackoverflow.com/questions/8280179/write-text-on-image-and-show-it-to-a-imageview">question</a></p>
<p>i want create a custom bitmap and write a string on it and use it for StatusBar notification icon .</p>
<p>It's Possible, because <code>Battery Indicator Pro</co... | android | [4] |
193,848 | 193,849 | Getting a value from a different class | <p>I have a main class named <code>main.java</code> and 3 classes in a package <code>f.java</code>, <code>graphics.java</code> and <code>image.java</code></p>
<p>I have a private int R in f.java, with <code>setR()</code> and <code>getR()</code> there</p>
<p>Now i need to get that value (from getR()) in <code>graphics... | java | [1] |
2,888,228 | 2,888,229 | AlertDialog Closing on Overlay Click | <p>Trying to debug a bit of code. I have a AlertDialog with a positive and negative listener set. On an Android 2.3.3 device everything works as expected. A user has to choose between two options in order to continue. However, on my 4.1.1 device a user can click anywhere on the screen to dismiss the dialog. Not sure wh... | android | [4] |
5,292,867 | 5,292,868 | How to reinstall the iPhone app in ad hoc distribution | <p>I am using ad hoc distribution for my iPhone app. It works very well. The only problem is when I update my app or create a new binary and want to install this new version on device, I need to delete the old version. Like although I drag and drop the new version in iTunes application, it does not over write the previ... | iphone | [8] |
4,495,870 | 4,495,871 | Gender Field in java | <p>Im creating an employee class containing three fields nem, age and gender. I need to create a gender field but the user can only choose male or female. I'm guessing I'm going to have to do this in boolean form but I don't know how I'm going to do that can anyone help me out please. </p>
<p>So far i have </p>
<pre>... | java | [1] |
2,962,174 | 2,962,175 | read file matching lines using array using php | <p>I want to be able to read through a plain text file and match a number of lines without the need to iterate over the text file multiple times. I am passing in an array with a list of strings I would like to match, which ideally, I would like to put into an array.</p>
<p>I can achieve the desired result using the co... | php | [2] |
5,736,178 | 5,736,179 | Calculating time by the C++ code | <p>I know this question has been asked few times over SO but none of them is really helping me out, so asking again.</p>
<p>I am using windows xp and running visual studio c++ 2008.</p>
<p>All the code which i am looking is using time.h but i think may be its not working correctly here, because results are making me ... | c++ | [6] |
5,166,458 | 5,166,459 | scrollview scroll delegation | <p>Is there any delegate or some notification which tells that scroll view has been scrolled?</p>
| iphone | [8] |
3,012,109 | 3,012,110 | printing negative value in C++ base 8 or 16 | <p>How is C++ supposed to print negative values in base 8 or 16? I know I can try what my current compiler/library does (it prints the bit pattern, without a minus in front) but I want to know what is <em>should</em> do, preferrably with a reference.</p>
| c++ | [6] |
5,743,232 | 5,743,233 | if statement in loop not working | <p>For the life of me I can't figure out why my IF statement is not getting hit. There are plenty of cases where the remainder of n // the last number put in the results list is 0.</p>
<pre><code>n = 100
numbers = range(2, n)
results = []
results.append(numbers.pop(0))
print numbers
for n in numbers:
if n % re... | python | [7] |
5,988,914 | 5,988,915 | Java issue with object | <p>I have a class called</p>
<pre><code>public class UserSettings {
public static String sessionId;
public static int vrefresh;
public static int mrefresh;
}
</code></pre>
<p>Then in another class I have this method </p>
<pre><code>public static void parseBusinessObject(String input, Object output)
</... | java | [1] |
71,955 | 71,956 | c++ override operator and this | <p>I want to override the "="operator,but I have a problem,the class has a const member which I want to change when I use "=",I think deconstruct the object and construct a new object may be worked but "this" can not be change.so,would you help me?</p>
| c++ | [6] |
4,108,649 | 4,108,650 | how to set spinner item value according to the web service particular value in android | <p>I have some items on spinner adapter-{astro,pluto,sun}.I get a value from web service dynamically (ex)pluto.Then how can i set pluto value to spinner for user view.
Please help me </p>
| android | [4] |
3,705,952 | 3,705,953 | Run same exe twice | <p>I have the following code:</p>
<pre><code>foreach(string fileName in chunkFiles)
{
p = GenerateProcessInstance();
p.StartInfo.Arguments = string.Format("{0} {1} false {2}", fileName, Id, logName);
p.Start();
p.WaitForExit();
... | c# | [0] |
2,559,643 | 2,559,644 | Is there a fiddler like app for IPhone to see what HTTP calls are being made? | <p>This is for troubleshooting my app on IPhone.</p>
| iphone | [8] |
5,363,774 | 5,363,775 | jQuery - click on button shown on focusin | <p>I want to show a button on focusin, do some action when clicked or hide that button on focusout:</p>
<pre><code>$(".editableDiv").live('focusin', function(){
// show button under the .editableDiv div
$("#button").live('click', function(){
// do action
});
$(".editableDiv").live('focusout', ... | jquery | [5] |
5,201,646 | 5,201,647 | converting numbers in to words C# | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/554314/how-can-i-convert-an-integer-into-its-verbal-representation">How can I convert an integer into its verbal representation?</a> </p>
</blockquote>
<p>Can anybody give me a primer code I could work on in con... | c# | [0] |
2,270,543 | 2,270,544 | Events Handling For CustomListView | <p>Hi i want to know how the handle events ,such as selected item in the Custom List,</p>
<p>How To get the position ,name of selected item in customList</p>
<p>Regards
Rakesh shankar.P</p>
<pre><code>public class Adapter extends BaseAdapter{
int count=0; Context ctx;
List<InfoObject> obs;
Adapter(Contex... | android | [4] |
31,055 | 31,056 | how to compress lines of code with jquery? | <p>I have the following lines of code that I am using. But it just seems redunent and I was curious if there is an optimized alternative to the following...</p>
<pre><code>if(mkey[65]){ //this is left! (a)
var nextpos = $("#item").x()-player.speed;
if(nextpos > 0){
$("#item").x(nextpos);
}
}
if... | jquery | [5] |
5,939,296 | 5,939,297 | Would you recommend LearningTree for ASP.net training? | <p>I am a Windows app developer (drivers, fat client, etc) and did mostly C and C++ for the past 15 years. Now that I got laid off, everyone I applied to is asking about ASP.net. I looked through a few books and played around but I need some formal training. Hopefully something inexpensive b/c i am unemployed for 1 yea... | asp.net | [9] |
335,968 | 335,969 | What does this type of Object mean? | <pre><code>HttpEntity<?> requestEntity = new HttpEntity<Object>(json, headers);
</code></pre>
<p>I have a couple of questions here?</p>
<ol>
<li>What does the <code>?</code> mean here. Why have they put <code><?></code> instead of <code><Object></code></li>
<li>Why does the HTTPEntity Construc... | java | [1] |
5,829,859 | 5,829,860 | Given a string describing a Javascript function, convert it to a Javascript function | <p>Say I've got a Javascript string like the following</p>
<pre><code>var fnStr = "function(){blah1;blah2;blah3; }" ;
</code></pre>
<p>(This may be from an expression the user has typed in, duly sanitized, or it may be the result of some symbolic computation. It really doesn't matter).</p>
<p>I want to define <code... | javascript | [3] |
2,239,022 | 2,239,023 | Setting the value of a domain class defined in differen domain | <p>I have two domain classes (getter setter of two tables): <code>Contact Information</code> and <code>Address</code>.
I have some fields in Contact Information and some fields in Address.</p>
<p>I'm setting the values of the contact information in the controller class but I need to set the values of fields in Address... | java | [1] |
802,443 | 802,444 | Do I have to check LSRequiresIPhoneOS in Info.plist if my iPhone App may use the Cam but may work on iPod touch, too? | <p>In my XCode project under ressources there is a Info.plist file. It has an attribute like this:</p>
<pre><code>LSRequiresIPhoneOS
</code></pre>
<p>so my question is: Do I have to check that? What I want is that my app finds out itself wheater there is a camera or not. If not, the feature is disabled, and if yes: C... | iphone | [8] |
5,641,353 | 5,641,354 | extracting substring by lines | <p>I am fairly new to programming so please bear with me. Say I have a large string such as this.</p>
<blockquote>
<p>String story = "This is the first line.\n" <br>
+ "This is the second line.\n" <br>
+ "This is the third line\n" <br>
+ "This is the fourth line.\n" <br>
... | java | [1] |
2,810,291 | 2,810,292 | PHP: Timer for formular input | <p>I am coding a web based exam application in PHP.</p>
<ul>
<li>The examinee has to choose a set of modules with the according questions.</li>
<li>A module is represented as one-single-formular.</li>
<li>For each module he got for example 30 minutes.</li>
</ul>
<p>I will achive that if the 30 minutes are over, the s... | php | [2] |
57,582 | 57,583 | Last day of each month within a date range in php | <p>How to get last day of each month within a date range in PHP?</p>
<p>Input:</p>
<blockquote>
<p>$startdate = '2013-01-15'<br>
$enddate = '2013-03-15'</p>
</blockquote>
<p>The output that I want is:</p>
<blockquote>
<p><strong>2013-01-31</strong> <em>End date of January</em><br>
<strong>2013-02-28</stro... | php | [2] |
5,237,499 | 5,237,500 | error: passing xxx as 'this' argument of xxx discards qualifiers | <pre><code>#include <iostream>
#include <set>
using namespace std;
class StudentT {
public:
int id;
string name;
public:
StudentT(int _id, string _name) : id(_id), name(_name) {
}
int getId() {
return id;
}
string getName() {
return name;
}
};
inline bool ... | c++ | [6] |
1,205,582 | 1,205,583 | int[] qualifies as IList<T>? | <p>In a different question on stackoverflow somebody suggested to write an extension method for an array, but used the <code>this IList<T></code> interface in the extension method. I commented it should be an array but he declined. I tested it, and of course, he's right... :)</p>
<p>Extension method:</p>
<pre><... | c# | [0] |
109,339 | 109,340 | How many halfscreen images can I add to an animated UIImageView before performance would start to suck? | <p>Does anyone have experience with this? I didn't try because I have no appropriate imagery for this, right now. But I wonder if the iPod touch is capable of displaying a fluid, movie-like animation out of fullscreen images (300 x 270)? I fear performance would suck dramatically.</p>
| iphone | [8] |
3,026,746 | 3,026,747 | Renaming files according to a set of rules | <p>I'm using (or attempting to use) a python script to (at the moment) to remove and alter file names</p>
<p>I'm looking to have a bunch of renaming function all in one script.</p>
<p><strong>Q1</strong></p>
<p>I'd like to know how to do it so do file renames (like removing the '." without having to re-add it for th... | python | [7] |
2,631,332 | 2,631,333 | Simple Java Question | <p>Can same class exist in multiple packages ?
In other words, can I have <code>dummy.java</code> class in <code>com.test.package1</code> and <code>com.test.package2</code>?</p>
<p><strong>Update</strong></p>
<p>Now I copied class from package1 and placed in to package 2 and now I am creating an instance of that cla... | java | [1] |
4,449,018 | 4,449,019 | How to get Current window's "menubar" property using Javascript? | <p>Can we get the Window's "menubar" property value using javascript</p>
| javascript | [3] |
5,412,820 | 5,412,821 | WAMP hash not generating | <p>The following code is not generating an output in WAMP on windows.</p>
<p>Works fine on MAMP.</p>
<p>Guessing it's a missing module or something.</p>
<pre><code>$reportHash = str_replace(
array('+','/','='),
array('-','_',''),
base64_encode(file_get_contents('/dev/urandom', null, null, -1,... | php | [2] |
3,246,658 | 3,246,659 | Minimize browser window | <p>Thanks for your replies.
First I am explaining my requirement :-</p>
<p>I created my own minimize and maximize button in my Application.
When I click on minimize button, my application should minimize like
our application
(If we minimize any application in our PC, that application is
displaying in our taskbar)
I w... | javascript | [3] |
5,676,615 | 5,676,616 | android how to make native zip application | <p>I would like to create a zip file from files located on the sd card, I have managed to do that using java but I think that the result is too slow, so I thought of going native using the android NDK.</p>
<p>My questions are: </p>
<p>Does anyone know any C/C++ library to zip unzip files that will work on android?</p... | android | [4] |
3,744,022 | 3,744,023 | Design and development of a meeting scheduler in java | <p>Hey I guys I a complete newbie in JAVA. I was ask to design a meeting scheduler with 10people and the choice of time is 9am to 4pm. Each person can choose two time to have the meeting for an hour. I so far have </p>
<pre><code>public class Member {
private String name;
private VotingBox box;
public Member(String... | java | [1] |
5,559,877 | 5,559,878 | how can i divide numerator by any similar to 0.0110932 in PHP? | <p>I'm getting error like PHP </p>
<blockquote>
<p>Warning: Division by zero error.</p>
</blockquote>
<p>I'm still and want to calculate some problems. If you can tell me, how can calculate antilog / log inverse with examples, I'll be more satisfied.</p>
<pre><code><?
if(isset($_POST['submit']))
{
... | php | [2] |
2,896,709 | 2,896,710 | defining UI component's height as percentage(or relative) to screen height | <p>Need some help with a UI problem in android. I am trying to create an activity where a text view is supposed to fill all the space above the two buttons on the bottom right and bottom left.
<img src="http://i.stack.imgur.com/eAyKb.jpg" alt="layout"></p>
<p>I don't want to hardcode any height/width parameters but wa... | android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.