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 |
|---|---|---|---|---|---|
2,607,298 | 2,607,299 | Pass 0 via URL as parameter | <p>for some reason whenevever i try to pass 0 using a url parameter variable, on the other end it ends up as empty or null. How do i pass 0 from let's say page A to page B using url parameters?</p>
<p>In symfony<br>
<code>echo form_tag('application/recognition?step=0')?></code> </p>
<p>ends up being like</p... | php | [2] |
2,598,507 | 2,598,508 | Android button hard to hit in 2.2 | <p>Hi
in my app contain a Button ,currently i customized using xml for changing the background and it work fine in 2.1 but when am reach to 2.2 ,The button is hard to hit ,how can i solve the issue?</p>
<p>my button xml code given below</p>
<pre><code> <Button
android:id ="@+id/Button_Continue1"
android:backg... | android | [4] |
4,155,623 | 4,155,624 | want to know the exact size of a data contend in any specified url | <p>hi all i want to know that while specifying url in my iphone native application for downloading purpose it works fine but if i want to know the exact size of data either in kb or in Mb coming from that url how could i do that plz guide me to do that demonstarting a sample code would be a big boost
thanks </p>
| iphone | [8] |
3,757,915 | 3,757,916 | Java: get specific ArrayList item | <pre><code>public static ArrayList mainList = someList;
</code></pre>
<p>how can I get a specific arrayList item ? mainList[3] ?</p>
| java | [1] |
4,871,368 | 4,871,369 | Best practice for giving back extra information from a Validate function | <p>I have a class Employee. I want to be able to Validate() it before I save it to make sure all the fields have been populated with valid values.
The user of the class may call Validate() before they call Save() or they may call Save() directly and Save() will then call Validate() and probably throw an Exception if va... | c# | [0] |
1,408,639 | 1,408,640 | undefined behaviour with an un intialised member variable in javascript | <p>It's 20:30 and I'm after a 6 hour bug hunt of an irritating bug caused by an uninitialized member variable.</p>
<p>In the our previous version we had the next few lines of code:</p>
<pre><code>var aList = new Array;
for (var iDx=0; iDx < nNumOfElements; iDx++)
{
// Some code
aList.nCount = someValue; ... | javascript | [3] |
4,749,587 | 4,749,588 | Difference between "0" and "new int()" in C# | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/5746873/where-and-why-use-int-a-new-int">Where and why use int a=new int?</a> </p>
</blockquote>
<p>What's the difference between these two below?</p>
<pre><code>int i =0;
int i = new int();
</code></pre>
<p>... | c# | [0] |
252,130 | 252,131 | Session expire for popup aspx page | <p>I have query over session expire on popup aspx page.</p>
<p>I have asp.net project where session expire funtionality is working. now i have add one new aspx that will open as popup on certain</p>
<p>event on the login page after sign-in process.</p>
<p>Now question is session expire funtionality will also work fo... | asp.net | [9] |
3,008,695 | 3,008,696 | Duplicate case in Switch | <pre><code> protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
switch(requestCode)
{
case BOOK_SELECT:
if (resultCode == RESULT_OK)
{
String name = data.getStringExtra("SelectedBook");
Toast.makeText(this, ... | android | [4] |
2,221,724 | 2,221,725 | reference objects on the stack | <p>Does C# allow you to put reference objects on the stack? Why would you want to do that? What does this mean?</p>
| c# | [0] |
1,115,279 | 1,115,280 | How to disable the orange highlight of checkbox when pressing | <p>I have a checkbox in the a listview. I disabled the highlighting of listview upon pressing. Also, I disabled the focus of the listview as I have buttons in the row itself.</p>
<p>This worked perfect. However the problem is that the checkbox still shows Orange highlight.</p>
<p>Is there anyway to disable this orang... | android | [4] |
4,804,419 | 4,804,420 | Change background color and font of tool tip for ASP. Net controls | <p>For ASP.Net controls, how to change background color, font name, size, font color for tool tips? Is it possible to add background image for tool tips instead of the default yellow color background? </p>
| asp.net | [9] |
5,055,985 | 5,055,986 | jquery emulate key press "ctrl and +" | <p>I know the tecnique for zoom the page using the shift of css......</p>
<p>I wanna make a button for emulate the user that press "CTRL" and "+" in same time...</p>
<p>explain well with an example...</p>
<p>in firefox if i press CTRL and + in the same time the page ZOOM...i wanna write a function that i call and i ... | jquery | [5] |
5,368,919 | 5,368,920 | Android java.net.UnknownHostException: Host is unresolved | <p>This code doesn't work:</p>
<pre><code>URL url = new URL( xmlPath );
InputSource input = new InputSource( url.openStream() );
</code></pre>
<p>all the time, resulting in an UnknownHostException, even when the host exists, has been hit successfully using the same code if from a different development host ... | android | [4] |
5,157,539 | 5,157,540 | Result is maintained in javascript array | <p>If I search in an array of objects in javascript, why is the previous result still in memory? I got the following code:</p>
<pre><code>function findTasks( date ) {
var result = $.grep( tasks[current].tasks, function( task ) {
return task.date == date;
});
return result;
}
</code></pre>
<p>When I... | javascript | [3] |
3,410,694 | 3,410,695 | Unable to set background for a surface view in android | <p>I am streaming video from a http url.i have a surface view for this purpose which u can see below</p>
<pre><code> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fi... | android | [4] |
3,248,440 | 3,248,441 | How to perform some action on background when the app exit | <p>I have build an app which store dates enter by the user in the an array. Now i want to perform some action on background of my app. In the background i want a check, which check the current date of the device with the date stored in an array. When the match found i want to pop an dialog. Is it possible to do some t... | android | [4] |
3,594,819 | 3,594,820 | Better to return an empty string or null value | <p>If I were writing the below method (for example) is it considered good practice to either:</p>
<p>A: return an empty string if the document didn't exist</p>
<p>B: return a null value?</p>
<p>Having done a lot of Java, and methods in Java requiring a return type I'm under the impression it is best practice to retu... | php | [2] |
1,508,672 | 1,508,673 | Include HTML file in C# code | <p>I have a page that has a left menu in it. This left menu is an HTML file [LeftFrame.htm] and is included in the aspx page using the following code.</p>
<pre><code><!-- #include file="LeftFrame.htm"-->
</code></pre>
<p>Now I need to change the file name to LeftFrameOthers.htm from C# code.</p>
<p>Eg:</p>
<p... | c# | [0] |
2,769,203 | 2,769,204 | Android adapter list not working inside thread() for ProgressDialog | <p>Below is my code that is not working and i dont understand why it says <strong><em>"Only the original thread that created a view hierarchy can touch its views."</em></strong> when i want to set the adapter for my listview inside LoadValues() method.. <strong><em>"listView.setAdapter(adapter)"</em></strong> </p>
<pr... | android | [4] |
4,257,137 | 4,257,138 | how to hide header redirect on address bar? | <p>I do have a redirect from <code>search.php</code> to <code>get.php</code> using header command and then redirect back to <code>search.php</code> the whole process takes only around few seconds.</p>
<p>what I want is I want to hide this redirect on address bar. say this redirect must happened behind the screen. so a... | php | [2] |
5,557,490 | 5,557,491 | how to display complete Bitmap in android using Canvas? | <p>friends,</p>
<p>i am using following onDraw method to display bitmap on screen.</p>
<pre><code> @Override
public void onDraw(Canvas canvas) {
Bitmap _scratch = BitmapFactory.decodeResource(getResources(), R.drawable.icon2);
//ImageView img= new ImageView(Tutor... | android | [4] |
1,169,355 | 1,169,356 | Name of emulator I'm using? | <p>I'm developing a project in Android. I know every emulator has some specific name like Gameboid,Frodo, Gearoid etc. How can I get to know the name of Emulator on which i am working??</p>
| android | [4] |
832,779 | 832,780 | jquery event handlers on HTML redraw | <p>Suppose I have the following HTML and js</p>
<pre><code><div>
<div class="testdiv" id="test1">test</div>
<div class="testdiv" id="test2">test</div>
</div>
function DynamicEvents() {
$('.testdiv').click (function () {
DoSomething();
});
}
function RedrawHTML() {
... | jquery | [5] |
2,122,305 | 2,122,306 | How to send Email through ASP.net using localhost | <p>I am creating a banking application in asp.net v 2.0.I need to send confirmation email when a user creates the new account.</p>
<p>I am running the application in localhost.DO I need any special rights to send SMTP email?</p>
<p>provide me a proper way to send email from my application.</p>
<p>Regards
Jeyaganesh<... | asp.net | [9] |
243,165 | 243,166 | Anyone knows what `cimg::exception_mode() = 0;` does? | <pre><code> const unsigned int omode = cimg::exception_mode();
cimg::exception_mode() = 0;
</code></pre>
<p>Never see this kinda syntax before.</p>
| c++ | [6] |
4,780,663 | 4,780,664 | sending variables to a JQuery function | <p>I'm a novice in jQuery, but I hope somebody will be able to help me out. I have searched this forum (and others) but haven't been able to find an answer that I could make work.</p>
<p>I have a link like this:</p>
<pre><code><a href="#">
</code></pre>
<p>and a jQuery script:</p>
<pre><code>$("div.show_dial... | jquery | [5] |
3,414,852 | 3,414,853 | Compare two sound in Android | <p>Is possible to compare a voice with already recorded voice in the phone.Based on the comparison we can rate like Good, Very Good , Excellent etc. Most closed sound get high rating.</p>
<p>Anybody know is it possible in Android?</p>
<p>Help is highly appreciable.</p>
| android | [4] |
3,086,010 | 3,086,011 | Action<T> is different event Action<T>? | <pre><code>public class TestA
{
public event Action<int> updateEvent;
...
if(updateEvent != null)
{
Actin<int> tempEvent = updateEvent;
updateEvent(1);
}
}
public class TestB
{
public Action<int> updateEvent;
...
if(updateEvent != null)
{
Ac... | c# | [0] |
1,715,717 | 1,715,718 | android: eclipse compile error | <p>I create ninepatch image and copy it into drawable folders, the project becomes error, seems that the file cause error and not supported. I use photoshop to create PNG image then edit it using draw9patch tool.I'm using Eclipse 3.5 on win7 with latest sdk update.</p>
<p>Another thing is that he accept another ninepa... | android | [4] |
3,825,920 | 3,825,921 | substr the date function in php from the full representation of the day of the week to the first letter | <p>I'm uncertain on how to do it and it seems a bit tricky, is it possible?</p>
<pre><code>date('l/m/d')
</code></pre>
<p>Using this date function it returns </p>
<p>Tuesday 4/30</p>
<p>I only want to return the first letter of the day of the week.</p>
<p>T 4/30</p>
<p>As usual any help would be greatly appreciat... | php | [2] |
6,014,886 | 6,014,887 | Why Activity keeps extras after orientation change | <p>Let's imagine the <code>ActivityB</code> invoked from <code>ActivityA</code> with extras in it. When <code>ActivityB</code> starts we check in <code>onCreate()</code> method the <code>bundle</code> holds these extras we put in <code>ActivityA</code>. I've noticed that <code>ActivityB</code> still holds extras after ... | android | [4] |
569,827 | 569,828 | Differences between static and instance variables in python. Do they even exist? | <p>A random class definition:</p>
<pre><code>class ABC:
x = 6
</code></pre>
<p>Setting some values, first for the abc instance, later for the static variable:</p>
<pre><code>abc = ABC()
abc.x = 2
ABC.x = 5
</code></pre>
<p>and then print the results:</p>
<pre><code>print abc.x
print ABC.x
</code></pre>
<p>whi... | python | [7] |
4,782,729 | 4,782,730 | How to encrypt SQLite DB using SQLiteCrypt | <p>I wanted to ecrypt the db file that i am storing on the sdcard. I have looked into SqliteCrypt library for serving my purpose but its using C libraries to perform the encryption/decryption.</p>
<p>I would like to know if anyone has successfully included the library in their project? If yes, please guide me through ... | android | [4] |
3,838,940 | 3,838,941 | Undefined variable when checking if variable is defined in Kohana view | <p>I'm running into this error when loading up my view:</p>
<blockquote>
<p>ErrorException [ Notice ]: Undefined variable: errors<br>
APPPATH\views\admin\category\add.php [ 2 ]<br>
<code>1 <h3>Add</h3></code><br>
<code>2 <?php if( $errors ): ?></code><br>
<code>3 <p><?=$errors?>... | php | [2] |
460,558 | 460,559 | ArrayList objects | <p>Need some inputs:</p>
<p>Lets say i have N <code>ArrayList</code> and in each i am adding foo() object.</p>
<pre><code>Foo foo = new Foo()
A.add(foo);
B.add(foo);
N.add(foo);
</code></pre>
<p>Now modification done on any one <code>foo()</code> object will reflect in all the other arraylist?</p>
<ol>
<li><p>If... | java | [1] |
4,286,516 | 4,286,517 | How to make Radio Button in Alert Dialog display very long text? | <p>How do I make a Radio button display a really long label inside an AlertDialog?</p>
<pre><code>String[] labels = new String[]{"My Super Long Label That Will Result in an ellipses Garbage 1234567890"};
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setSingleChoiceItems(labels, 0 , new DialogI... | android | [4] |
5,654,888 | 5,654,889 | Assign output of os.system to a variable and prevent it from being displayed on the screen | <p>I want to assign the output of a command I run using <code>os.system</code> to a variable and prevent it from being output to the screen. But, in the below code ,the output is sent to the screen and the value printed for <code>var</code> is 0, which I guess signifies whether the command ran successfully or not. Is t... | python | [7] |
1,061,990 | 1,061,991 | How to insert table row if and only if first cell value of a row is not equals to first cell value of next row? | <pre><code> <table>
<tr>
<td>aaa</td>
<td>111</td>
</tr>
<tr>
<td>aaa</td>
<td>222</td>
</tr&... | jquery | [5] |
1,159,484 | 1,159,485 | Assigning "active" class to parent issue | <p>I have a three level deep menu and what I want is that the active class goes on the parent li, this code below works on two levels, it shows the top menu item as active and the one below it, but when go to a page on the third level (ul ul ul li) all those list items in that last ul menu are active. Any ideas. I'm RE... | jquery | [5] |
5,650,165 | 5,650,166 | handling Application_Error in ASP.NET app's global.asax | <p>I wish to send mail to an administrator when the application crashes.
So I simply do this in <code>global.asax</code>:</p>
<pre><code>void Application_error(object sender, EventArgs e)
{
SendMessageToAdministarator(Server.GetLastError().ToString());
}
</code></pre>
<p>But actually many times <code>Application_... | asp.net | [9] |
4,675,214 | 4,675,215 | multicast receiver only to my application in android | <p>Is it possible in android to multicast a message (not broadcast) to all my activities of current application i.e. current PID (without using observer observable pattern), so that, current running activity will receive the message and perform task based on that.</p>
<p>Thanks,</p>
<p>Biplab</p>
| android | [4] |
251,517 | 251,518 | No overload for method 'OnTimerEvent' takes '1' arguments | <p>I want to show a text in a label for a particular time in my form and this is the code i tried so far :</p>
<pre><code>private void ShowTextForParticularTime(String caption)
{
Timer t = new Timer { Interval = 2000, Enabled = true };
t.Tick += new EventHandler(OnTimerEvent(caption));
... | c# | [0] |
3,042,438 | 3,042,439 | Difference between this and var in a function | <p>I have a javascript class that I'm creating. This class has private and public functions/properties. My understanding of private and public was that <code>this</code> was public and <code>var</code> was private to that function and its members. However, within the local function <code>buildFramework()</code>, when ... | javascript | [3] |
2,725,925 | 2,725,926 | How to get call duration in android | <p>"I want to know the call duration, when I called to other number and when that call-ends. In android is it possible?"</p>
<p>Thanks in advance.</p>
| android | [4] |
2,014,879 | 2,014,880 | How to know whether a property exists or not in a property file? | <p>How to know whether a property exists or not in a property file in java?</p>
| java | [1] |
2,485,042 | 2,485,043 | iPhone apps for company-internal use - possible? | <p>I hope this is still programming related, as SuperUser doesn't seem the appropriate place.</p>
<p>Basically I wonder if it is possible to have Applications that are internal to a company on the iPhone? That is something like a companion Application to an Intranet (when Safari and Mail just don't cut it) which would... | iphone | [8] |
1,250,944 | 1,250,945 | Xcode Deployment Target: Should I trust "Compiler Default"? | <p>I have set my target deployment target to be: "Compiler Default". Should I trust that Xcode will do the right thing? The right thing being:</p>
<blockquote>
<p>Compiler Default - Code will load on
any iPhone OS system that supports the
APIs that are used.</p>
</blockquote>
<p>I'd like my app to run on any ... | iphone | [8] |
4,760,119 | 4,760,120 | Input Output API | <p>I need help with a program where I must take string inputs from user continuously until the user enters string "end". Then I must print all the inputs that the user entered till "end". I tried using a for loop but I can't get it.</p>
| java | [1] |
2,946,662 | 2,946,663 | Android Sound Verification | <p>I would like to create an application, which will response on "Clap" sound.</p>
<p>Means, if I have kept my mobile somewhere in my room, and if a clap it will start ringing.</p>
<p>I would like to know how can I compare two sound [incoming sound of clap] and already stored clap sound?</p>
<p>I think I need to cre... | android | [4] |
1,423,737 | 1,423,738 | I am calling a function in jQuery, using 'enter' event as well 'blur' event is it possible to shorten it? | <p>I would like to trigger a function when my user blurs or enters a text box. I wrote this code to implement that:</p>
<pre><code>text:function(input,el){
var textCheck = function(){
var value = $.trim(el.val());
if(!value){
el.addClass('error');
}else{
el.removeC... | jquery | [5] |
3,535,478 | 3,535,479 | Capture output from unrelated process | <p>I was just wondering if it is possible to capture the output of a separate process running on windows?</p>
<p>For instance if i have a console app running, could i run a second app, a forms app, and have that app capture the output from the console app and display it in a text box?</p>
| c# | [0] |
5,637,553 | 5,637,554 | Give a parent li a background image? | <p>what im trying to do is give the parent li of a ul a background image.</p>
<p>so i have a submenu within a menu.</p>
<p>this is the jquery i am attempting..</p>
<pre><code>$('li.on').closest('ul').parent('li').css({ backgroundImage: 'url(/content/images/point.png)', backgroundRepeat: 'no-repeat' }); ;
</code></... | jquery | [5] |
5,054,033 | 5,054,034 | Can I have a part of a scrollable Listview (implemented using hashmap) non-scrollable? | <p>Im trying to make a list to enter the marks of students.
I have an xml layout file which has the name of student as a textview and marks of 5 subjects as edittexts.
Then I have another xml layout file which has a listview which is horizontally scrollable.
Now in the java file Im using Hashmap to duplicate this layo... | android | [4] |
3,151,024 | 3,151,025 | button is not responding to click event, | <p>I am working on the table view and do customization for <code>tableFooterView</code>.What I am doing is :</p>
<p>ClassA.m</p>
<pre><code>- (void)viewDidLoad
{
FooterViewController *footerView = [[FooterViewController alloc] initWithNibName:@"FooterViewController" bundle:nil];
// Add selector of ... | iphone | [8] |
5,629,341 | 5,629,342 | usage of (object) in assigning values for hashmap | <p>I saw a piece of java code using Hashmap as follows:</p>
<pre><code>Map indata = new HashMap(12);
//load data
indata.put(“checking”, ((object) new Double(1.0)));
indata.put(“PURPOSE”, ((object)"2”));
</code></pre>
<p>What confuse me is the two useages of "put" method, in which we have <code>((object) new Double(... | java | [1] |
89,791 | 89,792 | jquery fadeIn not working | <p>Can someone please tell me what I'm doing wrong:</p>
<p>style:</p>
<pre><code>.warning{border: 1px solid #F0AAAA; background:#FFBABA; color: #C90000;}
</code></pre>
<p>markup:</p>
<pre><code> <p class="warning">A successful authorization already exists.
Further authorizations are not a... | jquery | [5] |
3,666,299 | 3,666,300 | Alternative of GetGlobalAsaxType in .NET 3.5? | <p>I am checking out a sample application source code and there is:</p>
<pre><code>var assembly = BuildManager.GetGlobalAsaxType().BaseType.Assembly.GetName().Name;
</code></pre>
<p>But in .NET 3.5, there is no BuildManager.GetGlobalAsaxType(). Is there any alternative way to do so in .NET 3.5? </p>
| asp.net | [9] |
5,103,391 | 5,103,392 | How to bring user further down the page using jQuery? | <p>When the user performs a certain action I want to bring them further down the page. Kind of like how an a-name link works. Except obviously it needs to happen without any additional parameters being added to the url or refreshing the page.</p>
<p>So what would be the jQuery way of doing this:</p>
<pre><code><a ... | jquery | [5] |
1,653,906 | 1,653,907 | Shifting or moving tab positions on Tab control in C# | <p>I am using tabcontrol in c# widows form app. My requirement is as shown in the image.</p>
<p><img src="http://i.stack.imgur.com/iYYu0.png" alt="enter image description here"></p>
| c# | [0] |
3,605,534 | 3,605,535 | Can an external Javascript file be called and executed depending on a conditional? | <p>I know that I can run an external Javascript file from within HTML with the following syntax:</p>
<pre><code><script type="text/javascript"
src="http://somesite.com/location/of/javascript.js">
</script>
</code></pre>
<p>This will result in <code>http://somesite.com/location/of/javascript.js</code> bein... | javascript | [3] |
3,952,672 | 3,952,673 | How to get the date from a timeStamp long value? | <p>I tried to compare date and time of two timeStamp long values as follows. </p>
<pre><code>Timestamp st1 = new Timestamp(1313045029);
Timestamp st = new Timestamp(1313045568);
System.out.println("Date:"+st.getDate());
System.out.println("Day:"+st.getDay());
System.out.println("Year:"... | java | [1] |
4,652,509 | 4,652,510 | Enable Media Volume Slider in Android application | <p>Some Android programs trigger the "media volume" slider when the hardware volume up/down buttons are pressed. My application seems to set the ringer volume when the hardware buttons are pressed.</p>
<p>How would I enable the media volume slider? </p>
<p>I would hate for users to have to go into their settings to c... | android | [4] |
5,518,022 | 5,518,023 | Insert values in an associative array but only if have value | <p>I've this bucle:</p>
<pre><code>foreach($jsonU as $j) {
$jsonUId = $j->id;
$jsonUName = $j->name;
$jsonUDescription = $j->description;
$jsonUDate = $j->date;
$jsonUStatus = $j->status;
$jsonUPicture = $j->picture;
$jsonUncompleted[] = array(... | php | [2] |
1,730,457 | 1,730,458 | redirect to a new page once file upload is finished | <p>I have got the following php file for my file upload, how do I redirect to a new page once the file is finished upload, thanks in advance.</p>
<pre><code><?php
echo <<<_END
<html>
<title>PHP Form Upload</title></head><body>
<form method = 'post' action='testupload.php' ... | php | [2] |
282,981 | 282,982 | Error exception must derive from BaseException even when it does (Python 2.7) | <p>What's wrong with the following code (under Python 2.7.1):</p>
<pre><code>class TestFailed(BaseException):
def __new__(self, m):
self.message = m
def __str__(self):
return self.message
try:
raise TestFailed('Oops')
except TestFailed as x:
print x
</code></pre>
<p>When I run it, I g... | python | [7] |
100,941 | 100,942 | Remove image and use CSS instead for data from database using PHP | <p>I have the PHP code as below:</p>
<pre><code> <?php
for ($i = 1; $i <= 5; $i++) {
$checked = ($value['2.Capacity'] == $i) ? ' <img src="img/tick.jpg" width="20px" />' : '';
echo '<td>'.$checked.$i.'</td>';
}
</code></pre>
<p>... | php | [2] |
4,857,892 | 4,857,893 | How to cast a generic parameter? | <p>Here's what I am trying to write:</p>
<pre><code>public void Foo<T>(T parameter) {
otherObject.Bar<T>(parameter);
}
</code></pre>
<p>The signature of the Bar() method is:</p>
<pre><code>public void Bar<T>(T parameter) where T: class
</code></pre>
<p>So I get a compile error because the T in ... | c# | [0] |
5,083,862 | 5,083,863 | Back button and last activity | <p>My app chains some activities. </p>
<p>if you press the back button, you go back through old activities then you suddenly quit the application !</p>
<p>so I need to show a message like "do you really want to exit" if it's the last activity on stack</p>
<p>I know how to override the back button but i can't figure ... | android | [4] |
1,284,857 | 1,284,858 | Values changing when app turns from portrait mode to landscape mode in android | <p>I am working on android apps. My app should work both in portrait and landscape mode. I adjusted all the layouts by keeping all layout files in layout-lan folder. But now my issue is with functionality i.e when the app is changed to landscape mode the values of my parameters are changing and due to this I am getting... | android | [4] |
1,269,664 | 1,269,665 | reading from file and storing as integer | <p>i am trying to read from a file and store the data in three integers, red, green and blue
the data in the file is set as:</p>
<pre><code>255,0,0
0,255,0
0,0,255
0,255, 255
</code></pre>
<p>i have tried may methods of doing this but i am having no success could anyone help here is a copy of the method so far:</p>
... | java | [1] |
3,905,300 | 3,905,301 | Nested if-statement in loop vs two separate loops | <p>Here is the source code:</p>
<pre><code>public int indexOf(Object o) {
if (o == null) {
for (int i = 0; i < size; i++)
if (elementData[i]==null)
return i;
} else {
for (int i = 0; i < size; i++)
if (o.equals(elementData[i]))
retur... | java | [1] |
2,557,669 | 2,557,670 | Android write to file - can't find file | <p>I am a newbie in Android development. I try to write something to a file.
I am using the code:</p>
<pre><code>try {
FileOutputStream fOut = openFileOutput(
"out.txt", MODE_WORLD_READABLE);
OutputStreamWriter osw = new OutputStreamWriter(fOut);
... | android | [4] |
4,570,377 | 4,570,378 | Streaming Using Video View works fine but after playing some video Gives Dialog Can Not Play this video | <p>I am using Video View To stream Video.</p>
<p>I am able to start video successfully But what happens is after playing some video I am getting Dialog Box saying Can not play this video.</p>
<p>When I tried multiple times then I realized that It shows me dialog at random length of video played.</p>
<p>I don't able... | android | [4] |
2,668,607 | 2,668,608 | Calling C++ function pointers from C libraries | <p>I have a class that only has static members.</p>
<p>I would like to register one of its member functions (VerifyClean in the code below) to be called at exit, using the "atexit" library function.</p>
<p>The <a href="http://yosefk.com/c++fqa/function.html#fqa-33.2" rel="nofollow">C++ FQA</a> says that i must specif... | c++ | [6] |
1,613,192 | 1,613,193 | How to execute "del data.txt" using Process? | <p>The following trivial code is just an example that does not reflect my real scenario.
I have tried it and it did not work. </p>
<p>I want to delete <code>data.txt</code> using <code>Process</code> rather than using <code>File</code> class.</p>
<pre><code>using System;
using System.Diagnostics;
namespace Tester
{... | c# | [0] |
4,144,499 | 4,144,500 | Selecting hidden field value in same div in jQuery | <p>This should be simple, not sure why I'm having issues. </p>
<p>I've tried <code>$this.closest('.image_id').val()</code> but I keep getting <code>undefined</code>.</p>
<p>Here's the jQuery I'm using:</p>
<pre><code>$('#image_container').on('change', '[name="image-type"]', function() {
$this = $(this);
co... | jquery | [5] |
2,106,943 | 2,106,944 | Uploading Files with Size and delete option in Javascript | <p>How can i upload files directly by selecting the files as an attachment and display it an email with a delete option and size like our outlook.
Please share the Javascript Code.</p>
| javascript | [3] |
3,446,827 | 3,446,828 | .blur() on every select element after selection | <p>I was wondering if there's a way, using jquery, to unfocus EVERY select element after a selection triggered ?</p>
<p>Thanks.</p>
<p><em>Note: I know how to do it for one element at a time, this question is for global behavior of select elements</em></p>
| jquery | [5] |
387,070 | 387,071 | C# interview question | <p>In one of the interview, i got asked the following question but i am not sure what is that, Please help me to understand about the question</p>
<p>Use C# to turn an 4th and 7th bits of a said byte myFlag in which write most bit is first bit.</p>
| c# | [0] |
3,083,183 | 3,083,184 | detect power state change | <p>What is the best way to detect when Windows power state is changing?</p>
<p>I need to preform some actions depending on wether the computer is going to Stanby/Hibernate/Shut Down</p>
<p>Thanks
Sp</p>
| c# | [0] |
5,264,367 | 5,264,368 | Disable a particular application (like Youtube) using an Android Program code . | <p>I want to only disable an application (not delete it) using android code.</p>
<p>Please provide me some sample code to block or disable application using android code.</p>
<p>It will be very needful for me.</p>
<p>Thanks in Advance.</p>
| android | [4] |
5,856,263 | 5,856,264 | Convert .db to binary | <p>I'm trying to convert a .db file to binary so I can stream it across a web server. I'm pretty new to C#. I've gotten as far as looking at code snippets online but I'm not really sure if the code below puts me on the right track. How I can write the data once I read it? Does <code>BinaryReader</code> automatically o... | c# | [0] |
1,202,109 | 1,202,110 | what is a reason for which RTTI is considered as a bad design? | <p>what is a reason for which RTTI is considered as a bad design?<br/>
Stroustrup has written in his book TC++PL that the most common case of usage RTTI technique is with switch instruction, when one want to decide what code should be executed basing on what is a "real" type of a passed object. There is given an exampl... | c++ | [6] |
448,782 | 448,783 | How to use Switch case In the Java | <p>I am using Neatbeans 7.0 for Java programming. I have written a Switch case for selection of the program.</p>
<pre><code>switch(menu)
{
case 1:
{
//stmt
}
default:
{
//stmt
return;
}
... | java | [1] |
5,520,561 | 5,520,562 | change string into var datatype in c# | <p>I am reading data from file like this</p>
<pre><code>using (StreamReader r = new StreamReader("newfile.txt"))
{
string lines1;
lines1 = r.ReadLine();
var lines = lines1;
foreach (string line in lines)
{
var dictionary = new Dictionary<... | c# | [0] |
5,389,970 | 5,389,971 | Get the width of an image specified by an url jquery | <p>I want to read out the width (orgWidth) of an image specified by an url within a for-loop, calculate its new width (calcWidth) for a height of 480px.</p>
<pre><code>for (var i=1; i <= item.length; i++) {
url = document.images[i].rsc;
orgWidth = some-fancy-thing-that-reads-the-width;
orgHeight = some... | jquery | [5] |
303,417 | 303,418 | filtering in c# using sql server as database | <p>filtering in c# using sql server as database</p>
<p>for example choosing first what to filter in the combobox by choosing student number and in the textfield entering 1001 ...den only 1001 will appear in the datagrid...</p>
<p>we are using ssql server</p>
| c# | [0] |
4,925,937 | 4,925,938 | How can you restrict certain apps from launching on Android? | <p>I'm trying to build a sandboxed environment in which only certain apps are allowed to be launched.</p>
<p>I had originally decided to try polling all running apps in the background to see which ones were running, then killing any that weren't on the whtielist. However, I discovered that you can only kill background... | android | [4] |
2,822,355 | 2,822,356 | C preproccessor problem | <p>I have a program to find the reciprocal of a number but the main program is written in C and the <code>reciprocal</code> function is written in c++.Next I have a header file <code>reciprocal.hpp</code> that has some of the conditional compilation code that makes the <code>reciprocal</code> function an extern functio... | c++ | [6] |
5,533,979 | 5,533,980 | line breaks on comments textareas | <p>A user post a comment on a forum using a textarea, he presses enter to format his text wich means line breaks, how can i convert those line breaks to html breaks when inserting its message on the database so the message is echoed with the line breaks formatting?</p>
<p>cheers</p>
| php | [2] |
4,740,683 | 4,740,684 | Fade DIV with cool animation | <p>I am fading a DIV slowly, </p>
<pre><code>$(ele).fadeIn('slow');
</code></pre>
<p>How can i create a very good animation along with the fadeIn to show real animation power of jquery</p>
| jquery | [5] |
4,398,775 | 4,398,776 | Speech Recognition/Identification | <p>What am I up against if I want to do comparisons in voices? I have an audio source that I want to track who's talking based on their voice (voice pattern?) - are there any C# libraries to get me close?</p>
| c# | [0] |
638,675 | 638,676 | Reading text file and removing specific characters | <p>After someone inputs a text file, I have to make it so it will read the text file that the user inputted.</p>
<p>Using a switch statement, how do I make sure the first word and last word doesn't have a specific character?</p>
<p>The first word should not have a single-quotation mark, double-quotation mark, a dolla... | java | [1] |
1,997,177 | 1,997,178 | How to create an array in javascript using attributes set in the request object? | <p>I need to creata an array in javascript, elements for the array should come from server side.</p>
<p>For this what i did was,
In servlet,</p>
<pre><code>String[] valuesArray = {"val1","val2","val3"};
request.setAttribute("valuesArray",valuesArray);
</code></pre>
<p>In Jsp/javaScript:
<code>var arrayObj = new Arr... | javascript | [3] |
5,370,427 | 5,370,428 | php image type, mozila and IE7 | <p>i insert image in page and strangely I get a picture of the types.</p>
<p>show type with: $_FILES['img']['type'].</p>
<p>Result:</p>
<pre><code>Firefox: image/jpeg
IE7: 'image/pjpeg'
Firefox: image/png
IE7: image/x-png
</code></pre>
<p>Now i use this filter:</p>
<pre><code>$type_filter = array('image/gif', 'im... | php | [2] |
2,372,833 | 2,372,834 | showing images moving using java script | <p>i want to Create new page named “MySlidShow.htm”, and put link to in PhotoGallary page. The slide show page has four links (previous, Start SlideShow, End Slide Show, Next). When user put the mouse over an image show this image description and date taken below it and pause the slide show if it is running, and when t... | javascript | [3] |
5,201,399 | 5,201,400 | how to give action to progress bar | <p>hi i am new to iphone. what i am doing is cretating a imageview and a progressview i create iboutlet for both imageview and progressview and take a timer after 4 min i will call imagepicker.All is well but the progressview is no action only display as idle i am writing code for that is <code>progressview.progress=0.... | iphone | [8] |
5,547,141 | 5,547,142 | Recycled bitmap exception | <p>I'm getting this exception:</p>
<p>Exception: java.lang.IllegalStateException: Can't copy a recycled bitmap</p>
<p>My code is:</p>
<pre><code> int width = bitmap.getWidth();
int height = bitmap.getHeight();
int newWidth;
int newHeight;
if (width >= height) {
newWidth = Math.min(width... | android | [4] |
4,410,191 | 4,410,192 | Displaying the Length of Individual Sequences in File | <p>I have a file that contains two sequences. I have a program that could read all sequences, combine them together, and display the length of both sequences together. Now I want to display the length individually. The two sequences are separated by the symbol <code>></code>.</p>
<p>Example:</p>
<pre><code>SEQ1 &... | python | [7] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.