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 |
|---|---|---|---|---|---|
747,808 | 747,809 | AutoComplete with vectors - android | <p>I've have a Vector like this in my app:</p>
<pre><code> Vector<Firm> firmVector= new Vector<Firm>();
</code></pre>
<p>As you may see, this is a vector of objects from my own class <code>Firm</code></p>
<p>So to my question, is it possible to add a <code>AutoComplete</code> to this `Vector?</p>
<p>Li... | android | [4] |
1,331,252 | 1,331,253 | Parse input from string containing ints | <p>I am trying to get input from a string containing ints. So when a user types in the command "getrange(1,12)" I need to read the inital command as a string, and the two numbers inside it as an ints. I was thinking I could do a number of Splits() but I think that might get messy. In addition Split() keeps them as stri... | java | [1] |
5,036,620 | 5,036,621 | Average of an array will fail if I have int.MaxValue in the array | <p>I have defined the following method which calculates the average of an array:</p>
<pre><code>public int AverageOfArray (params int[] arr)
{
if (arr.Length > 0)
{
double avg = Sum(ints) / arr.Length;
return (int)avg;
}
return ... | c# | [0] |
2,919,086 | 2,919,087 | What is the difference between an Intent Service and a Service | <p>Can you please help me understand what is the difference between an Intent Service and a Service in android?</p>
<p>Thank you.</p>
| android | [4] |
3,475,515 | 3,475,516 | Flat File Database in C++, Is it possible? | <p>Flat File Database in C++, Is it possible? </p>
| c++ | [6] |
4,747,802 | 4,747,803 | twitter integration using OAuth sign post | <p>I want to integrate twitter in my application.Can anybody suggest how should i proceed using
the cosumer key,token,token secret.I got some code but could not understand the use of the
cosumer key,token,token secret,callbackurl.can anybody help me giving the complete explanation of each functions,variable used ?</... | android | [4] |
2,383,859 | 2,383,860 | How to get the executable name or process id clicking a window | <p>Is there a way to get the executable name or id of a process clicking a window? I want to do a counter that counts the time a user uses an application (game). It's only for Windows and done in java.</p>
<p>Thanks.</p>
| java | [1] |
3,977,543 | 3,977,544 | Why doesn't my variable return the answer? | <p>So I'm trying to construct a program. Everything works but my math portion of the program. I want the time in mins entered to be converted to hours. This should be a decimal number like 30 mins=.5 hrs. I'll try to omit as much code as I can that I don't think is relevant to make it easier to read.</p>
<pre><code>pu... | java | [1] |
3,429,432 | 3,429,433 | Pausing iPhone game from applicationWillResignActive | <p>I am trying to pause my app when the user hits the home button.</p>
<p>Here is how I pause the game in the GameViewController:</p>
<pre><code>- (void)pauseGame
{
if (!gamePaused) {
[gameTimer invalidate];
[self pauseLayer:self.view.layer];
gamePaused = TRUE;
}
}
</code></pre>
<p>AppDeleg... | iphone | [8] |
2,109,894 | 2,109,895 | float number is not the expected number after subtraction | <p>I have the following statement:</p>
<pre><code>float diff = tempVal - m_constraint.getMinVal();
</code></pre>
<p><code>tempVal</code> is declared as a float and the <code>getMinVal()</code> returns a float value.</p>
<p>I have the following print out:</p>
<p><strong>diff=0.099999905, tempVal=5.1, m_constraint.ge... | java | [1] |
4,019,198 | 4,019,199 | List boundaries - what is the most Pythonic way? | <p>I have a Python list and I want to check if a given index is out of bounds. Since I'm accepting user input I want to restrict the index to integers greater than or equal to 0. What is the most Pythonic way to do this? Currently, this is my solution:</p>
<pre><code>def get_current_setting(self, slot):
if slot &l... | python | [7] |
4,162,458 | 4,162,459 | Python - Check If Multiple String Entries Contain Invalid Chars | <p>Using Python v2.x, I have 3 variables that I want to ask the user for, as below:</p>
<pre><code>def Main():
Class_A_Input = int(raw_input('Enter Class A tickets sold: '))
Class_B_Input = int(raw_input('Enter Class B tickets sold: '))
Class_C_Input = int(raw_input('Enter Class C tickets sold: '))
</code>... | python | [7] |
722,169 | 722,170 | trace keyboard inputs | <p>I hope to create application in c# to trace the keyboard raw inputs and replace that inputs
ex: if keydown > crtl+A then output> B
or input AB then out put > C</p>
<p>this is for support to local language typing.</p>
| c# | [0] |
4,398,853 | 4,398,854 | Find all views with tag? | <p>I am looking to find all the views in a specified activity that have the tag "balloon" for example then hide them using setVisibility to GONE.</p>
<p>Does anyone know how to retrieve a list of views with a given TAG?</p>
<p>Thanks,
Kevin</p>
| android | [4] |
3,862,956 | 3,862,957 | differentiate admin and user of android apps | <p>i cant get the idea of it..
How to differentiate admin and user of the android apps if the apps do not provide the login function?
how the admin manage the database of the apps? </p>
| android | [4] |
3,806,842 | 3,806,843 | A connection attempt failed | <p>I have an ASP.NET application that is trying to connect to Twitter. When I try to connect, I receive the following stack trace:</p>
<pre>
[SocketException (0x274c): A connection attempt failed because the connected party did not
properly respond after a period of time, or established connection failed because conne... | asp.net | [9] |
5,460,092 | 5,460,093 | What does [literal] in [array/object] mean? | <p>What does the following syntax mean:</p>
<pre><code>1 in [1,2,3,5]
</code></pre>
<p>I know it doesn't search for 1 in the array. But what does it do? </p>
<p>I've seen it used in loops:</p>
<pre><code>for (var i in testArray)
{
}
</code></pre>
<p>But have also seen this used by itself. Does it mean check if th... | javascript | [3] |
5,213,484 | 5,213,485 | How to show a cold pic when its cold and show a warm pic when its hot? | <p>Im using C# and i have to show a cold picture if the F or C is below 50F and a hot pic if the F or C is above 50F. i know i have to use an if statement but cant figure out how to write the if statement to show one pic or the other?</p>
| c# | [0] |
1,680,725 | 1,680,726 | Last clicked element | <p>I have a list of divs like this:</p>
<pre><code><div class="item">Click</div>
<div class="content">Hidden Content</div>
<div class="item">Click</div>
<div class="content">Hidden Content</div>
<div class="item">Click</div>
<div class="content">Hidden ... | jquery | [5] |
4,327,650 | 4,327,651 | Marker Interfaces in Java | <p>Is there a list of standard marker interfaces in Java? I've read (in some Java book) that marker interfaces do not have any methods to implement , however when I did a google search - there are certain answers which specify that marker interfaces can indeed have methods. If that is the case then I think there is no ... | java | [1] |
1,309,172 | 1,309,173 | copying pointer to member functions from a structure | <p>I have my code organized as following</p>
<pre><code>class MyClass
{
public:
typedef void (MyClass::Ptr2func)();
}
struct abc
{
MyClass::Ptr2func ptr;
bool result;
}
void main()
{
MyClass myCls;
abc var;
//here is a lot of decision making code and pointer initializations
//I want to c... | c++ | [6] |
720,473 | 720,474 | .animate() with two complete functions? | <p>I wondered about if it's possible to add two or more <code>complete</code> functions to the <code>.animate()</code> event, like this:</p>
<pre><code>.animate(properties [, duration] [, easing] [, complete][, complete][, complete])
</code></pre>
<p>because I don't want to have all the things that happened in one fu... | jquery | [5] |
99,796 | 99,797 | Random permutation of letters | <p>I have cities: A, B, C, D, E</p>
<p>How can I generate an initial solution in Java that contains all of these elements once? For example: BCDAE</p>
<p>Currently I'm generating a solution in order ABCDE then mixing it up, is there an easier way to do this I'm just not thinking of?</p>
| java | [1] |
3,424,292 | 3,424,293 | Spinner disable is not working | <p>I tried to disable the spinner control, but its not working. I have given <code>spinnerControl.setEnable(false);</code> this code disable spinner process but, it will not put spinner in gray color(ie) disabled manner.</p>
| android | [4] |
5,641,775 | 5,641,776 | move UITableCell | <p>I used codes below to move an UITableCell</p>
<pre><code>- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
NSMyObj *newObj=[myArray objectAtIndex:[fromIndexPath row]] ;//myArray is the array to store NSMyObj
[myArray remove... | iphone | [8] |
4,021,811 | 4,021,812 | I could not able to access a <div> through Javascript,if there is only a <div></div> in a HTML page | <p>I have written below code in a HTML file name as test.html</p>
<pre><code><div id="dd"></div>
<script type="text/javascript">
document.getElementById("dd").innerHTML="fdfdfd";
alert(document.getElementById("dd").innerHTML);
</script>
</code></pre>
<p>The above code is not working. Can s... | javascript | [3] |
5,052,021 | 5,052,022 | Divide single value into an array | <p>Is it possible to divide a number into an array based on its value? </p>
<p>For example:</p>
<pre><code>$val = 3;
// do something here to convert the number 3 into 1's
Array
(
[0] => 1
[1] => 1
[2] => 1
)
</code></pre>
| php | [2] |
1,284,648 | 1,284,649 | How to find a function by function name | <p>I need to find a function handler on the page by only using a function name.
How can I do it in javascript?</p>
| javascript | [3] |
5,713,919 | 5,713,920 | onTouchEvent() will not be triggered if setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) is invoked | <p>I call </p>
<pre><code>getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION)
</code></pre>
<p>when my app starts to make my app able to display the full screen. </p>
<p>I want my app's UI to pop up when screen is touched, but <code>Activity.onTouchEvent()</code> is not triggered u... | android | [4] |
4,180,427 | 4,180,428 | How to workaround same origin problem | <p>The following JS will fail if the URL in mainFrame from <strong>a.abc.com to b.abc.com</strong>.</p>
<p>top.frames["mainFrame"].location.href = "/Users/xuenn.aspx?backUrl=" + top.frames["mainFrame"].location.href.split("?")[0];</p>
<p>This is the error message:
Permission denied for <a href="http://a.abc.com" rel=... | javascript | [3] |
2,039,993 | 2,039,994 | php conditional problem | <p>Goal:
User only selects <strong>one</strong>, <strong>only one</strong> option at a given time for the <strong>denomination</strong>, either some value of Nickels <strong>only</strong>,
some <strong>value of Dimes</strong> <strong>only</strong>, or some <strong>value of Quarters only</strong>.</p>
<p><strong>Proble... | php | [2] |
1,017,915 | 1,017,916 | How to check which one of the username or password is incorrect? | <p>I want to check which one of the username or password is incorrect in a single mysql query.</p>
<p>Scenario:</p>
<p>When a user types a username and password and clicks submit, I want to show an error message which one is incorrect. I need a simple and optimized query for this.</p>
| php | [2] |
5,126,868 | 5,126,869 | XCode can't find headers in /usr/include for openSSH | <p>I know its Repost but i still dont have proper ans to this question</p>
<p>i am including this </p>
<pre><code>#include <openssl/x509.h>
</code></pre>
<p>but it says </p>
<pre><code>"Openssl/x509.h: No such file or directory"
</code></pre>
<p>i did my best , added OpenSSl folder ( both way blue color fold... | iphone | [8] |
3,446,037 | 3,446,038 | Problems running a java program from the command line interface | <p>I created a java program in Eclipse. When I run the program in Eclipse ("run as -> Java Application") the program runs fine and I have the correct output. However, when I try to run the program in the command line interface I got this error:</p>
<blockquote>
<p>Exception in thread "main" <code>java.lang.NoClassDe... | java | [1] |
4,550,751 | 4,550,752 | Jquery - Accordion | <p>How to make an accordion in jquery to select none of the menu while loading</p>
| jquery | [5] |
2,256,089 | 2,256,090 | android media not working | <p>I create a raw folder within res folder and I past a mp3 song but in eclipse show error R.raw cannot be resolved and in console shows Invalid file name: must contain only [a-z0-9_.]
my mp3 file name is MaidwiththeFlaxenHair.mp3 after the build the project the same is come</p>
<p>this the code </p>
<pre><code>Medi... | android | [4] |
2,160,404 | 2,160,405 | Code optimization in PHP | <ol>
<li><p>I need 3 temporary variables is there any difference between this codes ?
<code>$temp1</code>, <code>$temp2</code>, <code>$temp3</code> vs <code>$temp[0]</code>,<code>$temp[1]</code>,<code>$temp[2]</code>;</p></li>
<li><p>If i have a variable name <code>$X</code> in page1.php and in page2.php and the... | php | [2] |
3,348,088 | 3,348,089 | Android App only for Tablets | <p>I have designed my app for Android Tablet. But <strong>it should be installed only on Android Tablet</strong>. For this I have tried the following.</p>
<ol>
<li><a href="http://stackoverflow.com/questions/10540646/designing-an-android-tablet-only-app">supports-screens</a></li>
<li><a href="http://stackoverflow.com/... | android | [4] |
2,204,665 | 2,204,666 | Use class member functions as callbacks? | <p>I would need a member function to be passed into a third party external method:</p>
<pre><code>box_self_intersection_d(mycallback);
</code></pre>
<p>The <code>box_self_intersection_d</code> is a third party external static method, and I cannot modify it. <code>mycallback</code> is a method I want to pass it into t... | c++ | [6] |
2,418,552 | 2,418,553 | How can I read a file that is in use by another process? | <p>I need to read a file that is in use by another process. How can I achieve that in C#?</p>
<p>Thanks!</p>
| c# | [0] |
5,163,837 | 5,163,838 | Application should give a prompt on pressing back button | <p>I am developing an android application. I wish that when I press back button in my application, it should give me a prompt(kind of alert dialog) if I really wish to exit.
I dont know where to put this alert dialog and what to write in the Yes button, where user wants to quit the application. Please help me.</p>
| android | [4] |
3,761,313 | 3,761,314 | iPhone tab bar Item image resolution? | <p>what is the resolution of the image for tab bar item?
and also please provide some other usefull information regarding that tab item image.</p>
<p>Thanks in advance.</p>
| iphone | [8] |
1,105,963 | 1,105,964 | Freeze background activity when Progress Bar is running | <p>I am a facing a problem in my app.Actually,there is an activity in which i send an image to server.In xml layout file i use a progress bar view.The progress bar start loading when image is loading to server and dismiss when the work done.Everything working fine.The problem is that when progress bar is in running sta... | android | [4] |
4,257,447 | 4,257,448 | How can add Tab widget to the botton in android? | <p>I am working on android, i want to add tab widget to the bottom of page. this is the code of my xml file:-
</p>
<pre><code> <HorizontalScrollView android:id="@+id/ScrollView01" android:layout_width="fill_parent" android:layout_height="wrap_content" android:fillViewport="true" android:scrollb... | android | [4] |
5,990,367 | 5,990,368 | intersect function | <p>i am checking intersection of two objects.. and i have a class MBR with data meembers low[2] and high[2].. but i am not getiing intersect..c an you explain this function.. </p>
<pre><code>intersects(const MBR* h) const
{
for (int i = 0; i < 2; i++)
{
if (low_[i] > h->high_[i] || high_[i] < h->l... | c++ | [6] |
1,495,999 | 1,496,000 | Simulate button press | <p>I have this resource for a <code>Button</code></p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<solid android:color="@color/CLR_GREEN" />
... | android | [4] |
338,825 | 338,826 | splitting the java string | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3764687/string-split-not-returning-empty-results">String split not returning empty results</a> </p>
</blockquote>
<p>I am having a string of words separated by comma(,) and I need to tokenize or split the main s... | java | [1] |
5,735,686 | 5,735,687 | Saving thumbnails images to certain directory | <p>I'm willing to use thumbnails into my website which is mainly like websites directory.
I've been thinking to save url thumbnails into certain directory !</p>
<p>Example :-</p>
<p>I'm going to use free websites thumbnails service that gives me code to show thumbnail image of any URL as follow</p>
<pre><code><im... | php | [2] |
697,916 | 697,917 | Masonry - Expanded box on document ready | <p>Does anyone know how to set the first box to an expanded state when document is ready in Masonry? </p>
<p><a href="http://jsfiddle.net/vDGTC/" rel="nofollow">http://jsfiddle.net/vDGTC/</a></p>
<p>Also would be great to know how to animate certain boxes up, as opposed to down which seems to be the default. I need t... | jquery | [5] |
4,895,877 | 4,895,878 | How can I use http://translate.google.com/ to translate the string in Java program? | <p>I want to use <a href="http://translate.google.com/" rel="nofollow">http://translate.google.com/</a> to translate the string.
And now I want to sent a string from a java program in <a href="http://translate.google.com/" rel="nofollow">http://translate.google.com/</a> to translate the string from english to bangla .
... | java | [1] |
1,561,328 | 1,561,329 | Can I listen to keyboard and mouse events without activating any window? | <p>I want to track number of keys pressed and mouse clicks in background, i.e., without activating any window.</p>
<p>Please, help me to solve my problem?</p>
<p>Thank you.</p>
| java | [1] |
5,345,347 | 5,345,348 | How to divert the iPhone on Voice Mail programmatically? | <p>In my iPhone application I want to divert my phone on voice mail if any callers call me, which I have to do programmatically for my app. </p>
<p>Is it possible in iPhone? If so please guide me.</p>
<p>Thanks,<br>
Panache</p>
| iphone | [8] |
2,341,154 | 2,341,155 | IDisposable Question | <p>Say I have the following:</p>
<pre><code>public abstract class ControlLimitBase : IDisposable
{
}
public abstract class UpperAlarmLimit : ControlLimitBase
{
}
public class CdsUpperAlarmLimit : UpperAlarmLimit
{
}
</code></pre>
<p>Two Questions:</p>
<p>1.
I'm a little confused on when my IDisposable members w... | c# | [0] |
4,000,622 | 4,000,623 | Pre-made delegates for operators? | <p>Supposing I want to use the addition operator (<code>+</code>) as a delegate, how would I pass that to a method?</p>
<p>Looking for something similar to Python's <a href="http://docs.python.org/release/3.1/library/operator.html#operator.add" rel="nofollow"><code>operator.add</code></a>.</p>
<p>e.g., instead of</p>... | c# | [0] |
5,141,936 | 5,141,937 | Implementing Non -Renewable subscriptions Using MKstorekit4? | <p>I have Iphone application in which i wanted to use Non_Renewable subscriptions.As per docs MKstorekit supports Non Renewable subscriptions.But everywhere saying about Auto_renewables only.Can anybody knows how to implement Non-renewable subscription with MKstorekit4.I have been googling for the entire day.But with n... | iphone | [8] |
485,400 | 485,401 | Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done | <p>Hello I'm still getting this error and I try different solutions but it's not work !
Here are my code </p>
<p>I put the connection string in app.config file like this :</p>
<pre><code><connectionStrings>
<add name="ComputerManagement"
connectionString= "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=.. ;... | c# | [0] |
1,192,259 | 1,192,260 | All C# Syntax in a single cs file | <p>I heard about there being a cs file on the internet from a couple different sources that has all of the syntax in C# in a single file, which would be really good for a crash course to get ready for a job I have. Unfortunately no one could point me to the exact file, has anyone heard or seen anything like this?</p>
| c# | [0] |
1,961,377 | 1,961,378 | is DOMDocument::loadHTMLFile() secure? | <p>Can someone inject some malicious code into my script through this method? and if someone might, what is the best practice? </p>
<p>I am trying to create a similar to reddit way of suggesting title.</p>
| php | [2] |
5,768,625 | 5,768,626 | Passing variable with URL but not able to make decision with Switch statement | <p>On page1.php, i use </p>
<pre><code><a href="page2.php?choice=<?php echo $value?> & item1=<?php echo $abs1?> & item2=<?php echo $abs2?>" title="Link to next page">Download</a>
</code></pre>
<p>On page2.php, i receive these variables correctly as iam able to echo those. But Swi... | php | [2] |
2,031,386 | 2,031,387 | Find last value of array in foreach cicle | <p>I've data stored in a array ($rows).
For read the array and genarate a dinamic table I use foreach function.</p>
<pre><code><table>
foreach ($rows as $row) {
echo "<tr>";
echo "<td>" . $row['field1'] . "</td>";
echo "<td>" . $row['field2'] . "</td>";
... | php | [2] |
5,675,408 | 5,675,409 | Generate random certificates | <p>I am looking for a utility class that can generate random certificate strings for testing purposes. Any idea if there is one already implemented?</p>
| java | [1] |
765,515 | 765,516 | Cannot reset OpenFlow | <p>I'm using OpenFlow on IPhone to create a "slideshow" of images. My problem is that I cannot reset the OpenFlow view, when I want to add a new set of images. Can anybody help?</p>
| iphone | [8] |
5,809,126 | 5,809,127 | What are Class methods in Python for? | <p>I'm teaching myself Python and my most recent lesson was that <a href="http://dirtsimple.org/2004/12/python-is-not-java.html">Python is not Java</a>, and so I've just spent a while turning all my Class methods into functions.</p>
<p>I now realise that I don't need to use Class methods for what I would done with <co... | python | [7] |
537,340 | 537,341 | Script for downloading weather data, day by day? | <p>Here's my problem: I'm not a programmer or have very little to no experience with scripts, however I've been tasked with downloading a .csv file of every single day of weather information from a university website. I'm guessing the only way from making this a painful experience is to get a script for it, or ask the ... | php | [2] |
602,274 | 602,275 | Search results from billboard api | <p>I have to show the lists of songs from Billboard Api like the page </p>
<p><a href="http://www.billboard.com/charts/r-b-hip-hop-songs#/charts/hot-r-and-b-hip-hop-airplay" rel="nofollow">http://www.billboard.com/charts/r-b-hip-hop-songs#/charts/hot-r-and-b-hip-hop-airplay</a></p>
<p>I try to use many api of Billboa... | php | [2] |
2,132,498 | 2,132,499 | how to check a string for a special character in Java | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1795402/java-check-a-string-if-there-is-a-special-character-in-it">JAVA: check a string if there is a special character in it</a> </p>
</blockquote>
<p>I'm testing a method that transforms a string into another ... | java | [1] |
1,807,296 | 1,807,297 | passing arguments as array of integers | <pre><code>struct G{
G&operator()(const int**a)
{
v<<a;
std::copy(v.begin(),v.end(),std::ostream_iterator<int>(std::cout, " "));
return *this;
}
friend std::vector<int>&operator<<(std::vector<int>&v,const int** n);
std::vector<int>... | c++ | [6] |
342,088 | 342,089 | Migrate android code error on eclipse | <p>I have been working on a project and it was running error free. However, when I copied the files to another project, it showed error and as a fix eclipse suggested "Migrate android code". But it didn't work .in the logcat there is no error and on pointing at an error it saya '--- cannot be resolved'. i have been wor... | android | [4] |
3,408,617 | 3,408,618 | using jquery's each() to add click events to imgs | <p>I'm using jquery's each() to add click events to a set of imgs , this works fine but i want each img to have a different effect on click it . </p>
<pre><code>$('#worksfoot img').each( function() {
$(this).click( function() {
$('#entrycontainer').animate({
marginLeft:
},500); })
... | jquery | [5] |
5,503,865 | 5,503,866 | How to make the below code generic? | <p>I have a method as under</p>
<pre><code> private int SaveRecord(PartnerViewLog partnerViewLog, PortalConstant.DataSourceType DataSourceType, Func<IDataAccess, PartnerViewLog, int> chooseSelector)
{
int results = -1;
var dataPlugin = DataPlugins.FirstOrDefault(i =&g... | c# | [0] |
939,000 | 939,001 | Test if on a certain page with php? | <p>Using PHP, is there a way to test if the browser is accessing a certain page?</p>
<p>For example, I have a header file called header.php which is being pulled into a couple different pages. What I want to do is when I go to a different page, I want to append certain variable to the title.</p>
<p>Example.</p>
<p>... | php | [2] |
2,767,845 | 2,767,846 | Is there a way to exit only the php file being included? | <p>So, I have a sidebar.php that is included in the <code>index.php</code>. Under a certain condition, I want <code>sidebar.php</code> to stop running, so I thought of putting <code>exit</code> in <code>sidebar.php</code>, but that actually exits all the code beneath it meaning everything beneath <code>include('sidebar... | php | [2] |
32,018 | 32,019 | Language split to minimize .apk file | <p>I'm creating an app with 3 different languages. Every language contains a separate audio file (8 mb each).
Is it possible to split/export the project to 3 different .apk files prior to release on Market? I really do not want to put everything in one .apk due to the 24+ mb file size.</p>
| android | [4] |
3,439,959 | 3,439,960 | Code of .Where() and .All() | <p>I'm searching for the code of .Where(), .All or at least one of the other "special" methods in some object. I'd like to learn how to write such, because I find them useful.</p>
<p>Also 1 question - Why some objects contain those methods and others do not, how do I inherit them in a class of mine for example?</p>
| c# | [0] |
845,173 | 845,174 | Do I have to hash twice in C#? | <p>I have code like the following:</p>
<pre><code>class MyClass
{
string Name;
int NewInfo;
}
List<MyClass> newInfo = .... // initialize list with some values
Dictionary<string, int> myDict = .... // initialize dictionary with some values
foreach(var item in newInfo)
{
if(myDict.ContainsKey(i... | c# | [0] |
1,104,753 | 1,104,754 | Is there any way to make Jquery automatically detect changes in DOM and act accordingly? | <p>I have a lot of dynamically added elements in my html page. And each time Jquery fails to detect them. I tried using live function, but it's functionality seems to be very limited. Can you please suggest me some way of making Jquery go through my DOM everytime I want to execute some work?</p>
| jquery | [5] |
5,313,608 | 5,313,609 | Problem with each() | <pre><code><script type="text/javascript">
//<!--
$(document).ready(function() {
$('ul.course-nav li a').each(function() {
alert(5);
if ('#' == $(this).attr('href')) {
$(this).addClass('lessOpacity');
}
});
}); //-->
</script>
</code></pre>
<p>HTML of course contains searched elem... | jquery | [5] |
140,043 | 140,044 | Inconsistent page redirections in php | <p>I have set the session on all pages in my admin panel like so:</p>
<pre><code>session_start();
if(!isset($_SESSION['username']))
header("Location: login.php?e=please+login+first");
</code></pre>
<p>This seemed to be working properly on all my pages, but now when I refresh my page or click on a link, the page a... | php | [2] |
2,305,729 | 2,305,730 | what is the meaning of this php code in facebook style chat script freichat? | <p>This question is about the facebook style chatting script <a href="http://evnix.com/drupal2/" rel="nofollow">freichat</a> .
The following line is found in arg.php file. Please notice that arg.php is also used in the argument of str_replace(,,.,,) function.</p>
<pre><code> $parameters=
unserialize(file_get_conten... | php | [2] |
4,513,725 | 4,513,726 | Need a working example on how to insert text at the cursor position in a html text area using jquery? | <p>Need a working code example on how to insert text at the cursor position in a html text area using jquery? Read somewhere there is a plugin to accomplish but not sure how plugins work.</p>
| jquery | [5] |
4,271,303 | 4,271,304 | Literal period in Python dict | <p>I'm using this code:</p>
<pre><code>import urllib2
submit = urllib.urlencode(dict(sign.username='example'))
</code></pre>
<p>But i get this error:</p>
<p><code>SyntaxError: keyword can't be an expression</code></p>
<p><code>sign.username</code> is a parameter in the URL which I am encoding, but Python won't let... | python | [7] |
5,569,905 | 5,569,906 | How to refresh the src of <img /> with jQuery? | <pre><code><img src="test.php" />
</code></pre>
<p>where test.php generates an image with a random number.</p>
<p>Itried :</p>
<pre><code>$('#verifyimage').click(function() {
$(this).attr('src',$(this).attr('src'));
});
</code></pre>
<p>But it doesn't work.</p>
| jquery | [5] |
1,807,671 | 1,807,672 | Is it possible to create an associative array which holds instances of a custom class? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2702863/initializing-php-class-property-declarations-with-simple-expressions-yields-synt">Initializing PHP class property declarations with simple expressions yields syntax error</a> </p>
</blockquote>
<p>Is it ... | php | [2] |
1,296,879 | 1,296,880 | When to only abstract class but not interface | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1221512/when-to-use-abstract-class-or-interface">When to use abstract class or interface?</a> </p>
</blockquote>
<p>I know about abstract classes and interfaces. But I wish to know a real time scenario in which ... | java | [1] |
4,548,814 | 4,548,815 | Self scanning code to prevent print statments | <p>I have a python project I'm working on whereby instead of print statements I call a function say() so I can print information while in development and log information during production. However, I often forget this and put print statements in the code by mistake. Is there anyway to have the python program read its... | python | [7] |
308,845 | 308,846 | Parsing specific contents in a file | <p>I have a file that looks like this</p>
<pre><code> !--------------------------------------------------------------------------DISK
[DISK]
DIRECTION = 'OK'
TYPE = 'normal'
!------------------------------------------------------------------------CAPACITY
[CAPACITY]
code ... | python | [7] |
5,317,005 | 5,317,006 | Cannot set boolean values in LocalStorage? | <p>i noticed that i cannot set boolean values in <code>localStorage</code>?</p>
<pre><code>localStorage.setItem("item1", true);
alert(localStorage.getItem("item1") + " | " + (localStorage.getItem("item1") == true));
</code></pre>
<p>always alerts <code>true | false</code> when i try to test <code>localStorage.getItem... | javascript | [3] |
474,474 | 474,475 | what are best practices for showing help information | <p>I would like to put fairly extensive help information within my app - both "how to use" and explanation of what one is seeing.</p>
<p>The app (map oriented) has a row of buttons at the bottom, and I was considering adding a help button.</p>
<p>Context sensitive help is mostly not appropriate, btw.</p>
<p>What are... | android | [4] |
3,827,695 | 3,827,696 | how to capture internet file download file info in dot net | <p>hello i am developing an dot net application in C# and i want to get the file download information like name,size etc
so can any one tell me how i can do this ....Thank you...</p>
| c# | [0] |
1,580,911 | 1,580,912 | Does a std::vector constructor not call object constructors for each element? | <p>My code resembles something along these lines.</p>
<pre><code>class A
{
public:
A(int i) { printf("hello %d\n", i); }
~A() { printf("Goodbye\n"); }
}
std::vector(10, A(10));
</code></pre>
<p>I notice that hello prints out once.
It seems to imply that the vector only allocates space for the element
but... | c++ | [6] |
3,110,753 | 3,110,754 | Watermark image on real time on camera view in iphone | <p>Special Thanks in advance......
I m the beggininer in iphone software development. </p>
<p>Just looking for how to programmatically add real time a watermark image to camera view using cocoa. Not looking for a step by step ( although that would awesome ), but more or less looking for where I should start looking to... | iphone | [8] |
4,482,606 | 4,482,607 | How to turn on/off my Android device with an APP | <p>Is there a way to create an Android application to turn on/off the device? The "turn on" part based, for example, on a timer. I would like to know if exists some functions to do this. Thanks for every reply.</p>
<p>Matteo </p>
| android | [4] |
1,442,249 | 1,442,250 | C# Parallelizing CSV Parsing | <p>Please look at the code below.</p>
<pre><code>void func()
{
for(;;)
{
var item = new Item();
}
}
</code></pre>
<p><code>Item</code> is a class in whose constructor I read several csv files, as follows</p>
<pre><code>List<string> data = new List<string>();
Item()
{
//read from c... | c# | [0] |
3,377,553 | 3,377,554 | jQuery: Is it possible to clone a file input? | <p>Is it possible to clone a file input so that I can have multiple copies of it and delete them while the original stays intact?</p>
| jquery | [5] |
3,906,409 | 3,906,410 | failing to open alert box before redirection.ASP.NET | <p>I'm trying to show an alert box before redirecting,but it's not working.The alert box only works if the
redirection is not done.</p>
<p>i modified the popular Alert.Show("string") class from Mads Kristensen as below....</p>
<pre><code>public static class Alert
{
/// <summary>
/// Shows a client-si... | asp.net | [9] |
3,083,239 | 3,083,240 | Can a function return two values? | <p>Can a function return two values? </p>
<p><a href="http://stackoverflow.com/questions/5139072/can-a-function-return-two-values">Can a function return two values?</a> { I came across this in C} Any possibility of something in JavaScript</p>
| javascript | [3] |
2,869,160 | 2,869,161 | ASP.NET InitComplete event | <p>Can i Consider the responsibility of InitComplete event as follows</p>
<p>1) It is the last stage of page initialization</p>
<p>2) If ViewState is enabled at page level it will calls Page.TrackViewState() method inorder to make the view state to be ready for persisted across postback.</p>
<p>Thanks
B... | asp.net | [9] |
5,915,026 | 5,915,027 | PHP : how do i access a request variable outside of a class? | <p>I have a form passing a variable $oid to a php script. the form variable is pulled and needs to be passed into a function called get_name(). The header() function in the class implements an interface called header() in the parent class. </p>
<pre><code> require 'pdfclass.php';
$oid = $_REQUEST['oid'];
... | php | [2] |
1,784,397 | 1,784,398 | remove everything after the last occurrence of numerical value | <p>I need to remove everything after the last occurrence of a numerical value some examples below: </p>
<p><code>1234D</code> Should be <code>1234</code><br>
<code>ABCD1234A_BC</code> Should be <code>ABCD1234</code></p>
| c# | [0] |
5,219,273 | 5,219,274 | UIActionSheet is taking longer to load | <p>are their any reasons why my UIActionSheet would be taking a while to load. It works fine just after lauch, but as soon as I loop through some actions once or twice, is loads very slow, and you can see the grey backdrop crawl down to finish drawing the sheet.</p>
<p>help?</p>
<p>Sam</p>
| iphone | [8] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.