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,347,540 | 2,347,541 | Big delay using Intent.ACTION_HEADSET_PLUG when the device is sleeping | <p>I have some troubles using a <code>BroadcastReceiver</code> when the device is sleeping.
I use this code in the <code>OnReceive</code> metod:</p>
<pre><code>public void onReceive(Context context, Intent intent) {
Intent i = new Intent(context, ConnectionActivity.class);
PowerManager pm = (PowerManager) c... | android | [4] |
5,886,678 | 5,886,679 | Turn on Wifi using a Widget | <p>i need to toggle wifi on and off when user clicks a widget icon...</p>
<pre><code>WifiManager wifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
if(wifiManager.isWifiEnabled())
wifiManager.setWifiEnabled(false);
else
wifiManager.setWifiEnabled(true);
</code></pre>
... | android | [4] |
2,195,618 | 2,195,619 | Conditionally modify global variable | <p>I'd like to do something like this, but I get a SyntaxWarning and it doesn't work as expected</p>
<pre><code>RAWR = "hi"
def test(bool):
if bool:
RAWR = "hello" # make RAWR a new variable, don't reference global in this function
else:
global RAWR
RAWR = "rawr" # reference global... | python | [7] |
847,981 | 847,982 | soap based xml parsing using libxml2 | <p>i am using simple nsxml soap based parser but in the response it gives me 300 to 500 tunes of data so nsxml parser is not desirable in this scenario please guide how can i use soap based libxml2 parser along with a sample code would be a bost to me as i have no idea regarding the libxml2 parsing method </p>
| iphone | [8] |
2,206,381 | 2,206,382 | creating a coupon for ipassbook using passsource.com, does anybody know how iphone determines which application to open based on the url? | <p>i am working on creating a coupon for ipassbook using passsource.com, does anybody know how iphone determines which application to open based on the url?</p>
<p>I created a sample coupon with passsource.com API and it redirected me to the following URL
<a href="http://www.passsource.com/create.php?data=eNortjIxsVI... | iphone | [8] |
20,523 | 20,524 | Searching an element with specific text in jQuery | <p>I want to get an element that contains specific text. When I use the :contains selector, the result is also all of the parents elements of that specific element.</p>
<p>Also, if there is more than on element that actually contains the text, the result of the selector is very cumbersome. Is it possible to get only t... | jquery | [5] |
2,321,845 | 2,321,846 | Make Array From Checkbox | <p>I wan't to make an array from checkbox.</p>
<p>I've use <code>array($_POST[test],$_POST[test1],$_POST[test2])</code>
It works, but if once of array is NULL the array also NULL</p>
<p>So what I wan't is if once of array is NULL, it's not in array</p>
<p>Like this</p>
<pre><code>$_POST['test']=NULL;
$_POST['test1'... | php | [2] |
3,593,468 | 3,593,469 | Are anonymous functions more effecient over calling functions? | <p>I'm just starting to learn about jQuery. I'm more of a html+css web designer so you can probably tell functions will take a little bit to adapt to, especially anonymous ones. </p>
<p>So what's the difference if between </p>
<pre><code>$('p.expander').toggle(
function() {
$(this).prev().addClass('open');
... | jquery | [5] |
1,346,110 | 1,346,111 | JQuery - why does live work but click doesn't? | <p>We have a page with this structure:</p>
<pre><code><script type="text/javascript" src="/js/lots.of.javascript.js"></script>
<jsp:include page="html.jsp"/>
</code></pre>
<p>The JavaScript has lots of <code>$(function(){...}</code> blocks. In one block we tried a <code>$("#mylink").click(...)</cod... | jquery | [5] |
2,699,328 | 2,699,329 | JQuery dialog & dynamic data issue | <p>i know it is possible to load data dynamically into jquery dialog like</p>
<pre><code>(document).ready(function () {
$('a#popup').live('click', function (e) {
var page = $(this).attr("href")
var $dialog = $('<div></div>')
.html('<iframe style="border: 0px;... | jquery | [5] |
419,332 | 419,333 | FileVersionInfo.GetVersionInfo getting old version of an exe swapped at runtime | <p>I have a program executing in c# that is sometimes updated while it is running by swapping the exe to a new one. I want the program to routinely check if it has been updated and if so, restart. I use the following function to do this.</p>
<pre><code> public static bool DoINeedToRestart(string exe_name)
{
... | c# | [0] |
3,437,837 | 3,437,838 | mobile website design for android phones | <p>i want to design a website for android mobile phones using html.can any one please help me out.
Where should i start?</p>
<p>How to write css or should i recreate a new website for mobile phones?</p>
| android | [4] |
2,952,767 | 2,952,768 | Eclipse Swing to JavaC? | <p>I made a program using Eclipse, but I want to learn to compile it with JavaC.</p>
<p>I downloaded the JavaSDK jdk1.7.0 and installed it at C:\</p>
<p>My .java file is in C:\java</p>
<p>I then compiled the program using C:\jdk1.7.0\bin\javac Game.java</p>
<p>It uses a package layout manager so I downloaded swing-... | java | [1] |
4,039,675 | 4,039,676 | What is the difference between "string" and "String"? | <p>What is the difference between these two declarations?</p>
<pre><code>string str;
String str;
</code></pre>
| c# | [0] |
4,714,390 | 4,714,391 | Location Manager Error : (KCLErrorDomain error 0) | <p>Location Manager Error : Operation could not be completed(KCLErrorDomain error 0)</p>
<p>why this error occurs?</p>
| iphone | [8] |
2,735,734 | 2,735,735 | Stringify only a field in JavaScript | <p>I would want that at passing an object at JSON.Stringify, it checks if it has a field like "val" for stringify only that field, else been stringfied everything.</p>
<p>Is possible to change JSON.Stringify to stringy only a determined field?</p>
| javascript | [3] |
627,211 | 627,212 | Could not load file or assembly 'xxx' or one of its dependencies. An attempt was made to load a program with an incorrect format | <p>I just checked out a revision from Subversion to a new folder. Opened the solution and I get this when run:</p>
<p><strong>Could not load file or assembly 'xxxx' or one of its dependencies. An attempt was made to load a program with an incorrect format.</strong></p>
<p>This is the same code I had checked in a whi... | c# | [0] |
4,450,134 | 4,450,135 | Application doesn't execute Form1_load method when started by Scheduled Task | <p>I have an App in C# using Windows Forms. My application is working normally, but when I want to start it by OS (Windows 7) using Scheduled Task, it doesn't load Form1_load method. How could I solve this problem?</p>
<p>Here is a body of Form1_load method:</p>
<pre><code> private void Form1_Load(object sender, Ev... | c# | [0] |
1,397,377 | 1,397,378 | Result of expression 'this.getURL'[undefined] is not a function | <p>When i call a method directly without a setInterval the function works correctly</p>
<pre><code>slider.prototype.onTouchEnd = function(e){
clearInterval(this.inter);
this.getURL(this.url + '/' + this.eid.id + '/' + this.currX);
e.preventDefault();
}
</code></pre>
<p>putting the same function in a setI... | javascript | [3] |
4,179,106 | 4,179,107 | iPhone MapView gets removed | <p>I have a tabBar in my application. In one of the section i have two views which i toggle between using segment buttons.</p>
<p>In one of the view i have MapView which i use to display list of users using their pic as annotation. On the other view i have tableView which shows the same users in table format. </p>
<p... | iphone | [8] |
1,190,050 | 1,190,051 | .next() and .addClass() not working in jquery | <p>Hello friends following is my code</p>
<p>HTML</p>
<pre><code> <ul>
<li>
<div class="input"><input name="" type="checkbox" value="" id="a"/></div>
<div >Name of the survey goes here | 35 Points - <span>Begin Survey</span></div>
</li>
<... | jquery | [5] |
4,130,737 | 4,130,738 | C#: What are some things i need to know about opening and saving files (eg. validation) | <p>i am using the <a href="http://msdn.microsoft.com/en-us/library/microsoft.win32.openfiledialog_members.aspx" rel="nofollow">common file dialog</a>. i think there will be many things i need to know and validate eg. file type, file exists, not enough memory etc. </p>
<p>for file type, can i limit file types that can ... | c# | [0] |
5,484,551 | 5,484,552 | android how to draw triangle, star, square , heart on the canvas | <p>I am able to draw circle and rectangle on canvas by using path.addCircle() and path.addRect().Like that i want on touch i am able to draw triangle, star, square and heart.
How can I do that?
Give me a way with sample examples.
Thanks</p>
| android | [4] |
5,699,383 | 5,699,384 | Detect Phone Vendor at installation | <p>I am developing device specific application, Can anybody knows how to detect android phone vendor i.e <code>samsung</code> or <code>htc</code> etc in <code>android</code> ... Is this possible?.
That according to phone vendor i can decide to install application on that phone or not !!!!</p>
| android | [4] |
1,131,421 | 1,131,422 | PHP - Adding a character instead of a comma | <p>I have the following string, this is written froma database, so im not sure what the values are, but an example would be</p>
<pre><code>my name, his name, their name, testing, testing
</code></pre>
<p>What i want to do is take out the last comma and add a space and the word 'and' so it appears as follows:</p>
<pr... | php | [2] |
694,245 | 694,246 | Check if options is selected | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/149573/check-if-option-is-selected-with-jquery-if-not-select-a-default">Check if option is selected with jQuery, if not select a default</a> </p>
</blockquote>
<p>I have html like this:</p>
<pre><code><div i... | jquery | [5] |
3,559,224 | 3,559,225 | How to ignore case when comparing string? | <p>I am using linq to search through a list (user enters query in a textbox).</p>
<p>I want this to be case-insensitive and tried to use IgnoreCase, but I have no idea where to put it.... I know I could use upper or lower, but I would like to hear if anybody has any alternative methods? What would be considered best p... | c# | [0] |
4,327,056 | 4,327,057 | Remove all unused resources from an android project | <p>I want to remove all unused layouts, strings, drawables, colors, etc from my Android res directory. Are there any tools that will give me a list of files and I can remove from my repository and elements within specifics files (e.g. unused string entries) that are no longer used?</p>
<p>I use Eclipse/vim and would r... | android | [4] |
3,983,569 | 3,983,570 | Double Click to open file directory from an item in listview | <p>I hope that there is a very straightforward way to allow a user to do a <code>Doubleclick</code> event on either items inside a listview.</p>
<p>The items in my listview happens to have a filepath, so if possible, i want to draw out that filepath from the item that i've selected and open up as a windows to show whe... | c# | [0] |
1,999,828 | 1,999,829 | Getting the url of the loaded image in a rotator (Javascript) | <p>Quick version: I have a url that calls a separate server (that I have no access to) that then loads one of 100 images. Is there anyway in which to check which image it returns?</p>
<p>I was hoping for a js solution, but am flexible in that regard.</p>
<p>Slightly longer version: I have an image on my page that's ... | javascript | [3] |
2,413,308 | 2,413,309 | Direct access data in file | <p>How can I access 'directly' the data between 200th and 300th characters in a file in a secondary storage device?</p>
| java | [1] |
1,282,870 | 1,282,871 | Parent does not contain constructor that takes 0 arguments | <p>If I have this code in C#:</p>
<pre><code>public abstract class Parent
{
private int x;
public Parent(int x)
{
this.x = x;
}
public abstract void foo;
}
public class Child
{
public override void foo()
{
x = x + 10;
}
}
</code></pre>
<p>I get error that: </p>
<bl... | c# | [0] |
1,750,438 | 1,750,439 | Can't read the content of a property file by using the relative path | <p>My java class is residing in the folder <code>/webserver/tomcat-instance/webapps/shop/WEB-INF/classes/com/mobile/commons</code> but the actual property file is residing in the location
<code>/webserver/tomcat-instance/webapps/shop/WEB-INF/classes/resources</code> directory. Now in my java file i put the relative pa... | java | [1] |
1,512,569 | 1,512,570 | convert view to image in android | <p>hi everyone i m trying to send a chart via email in android application how can i attach that chart to email application. Thanks .....</p>
| android | [4] |
336,651 | 336,652 | Android device guidelines/requirements | <p>Are there any requirements/guidelines for an Android device? like numbers of buttons or minimum buttons required.</p>
<p>Also are there any android devices which do not have the menu and back buttons?</p>
<p>( I am aware that no menu/back buttons will kill most of the apps in terms of usability , I just wanted to ... | android | [4] |
2,925,888 | 2,925,889 | How to catch touch event of an dialog when it is clicked outside | <p>Actually i have <code>Dialog</code> in my activity, what i want is suppose the dialog is open, then on Touch of outside dialog i want to dismiss the dialog and at the same time i want to call a function which do some update in my activity.</p>
<p>Initially i used <code>MyDialog.setCanceledOnTouchOutside(true);</cod... | android | [4] |
3,947,466 | 3,947,467 | Changing step values in seekbar? | <p>I have a seekbar, while moving it I want to change values from 0 to 200. I have a TextView, where I display those values while moving the seekbar. But I don't want to have every value from that interval(0,1,2,3,4,5...), but to have 10, 20, 30...so on. So when I move the seekbar, I want to display 10,20,30,40....to 2... | android | [4] |
5,508,848 | 5,508,849 | how to display value of session variable in textbox in php | <p>in my project I need to take the value of selected link from one page to another page and it should be display in the textbox.</p>
<p>for this i have used session variable code is as below :</p>
<p>in caledar.php</p>
<p>This is not the entire script ... there is one class which generates the calendar code. below ... | php | [2] |
5,210,107 | 5,210,108 | Showing Selected Values on a Multiselect box | <p>I have made a single page for adding as well as editing data.
In the page i have a multiselect box. I want to know how can i display the selected values in case of editing? My code is :</p>
<pre><code>$categories=$objdb->select("vtiger_cf_601", false, "*", false, false);
$discountstudentInfo = $objdb->select... | php | [2] |
1,925,033 | 1,925,034 | C#: Is there a way to use expressions as a variable/parameter? | <p>I'd like to know if it is possible to use an expression as a variable/parameter in C#. I would like to do something like this:</p>
<pre><code>int x = 0;
public void g()
{
bool greaterThan = f("x>2");
bool lessThan = f("x<2");
}
public bool f(Expression expression)
{
if(expression)
return true... | c# | [0] |
4,326,989 | 4,326,990 | How to find the device details for android | <p>I want to find out about the name, android version, screen size, battery status, network status and other details of the device on which the app is running. Is there a specific inbuilt class for the device details or will I have to use some third party tool.</p>
| android | [4] |
1,082,519 | 1,082,520 | Read double value from a file C# | <p>I have a txt file that the format is:</p>
<pre><code>0.32423 1.3453 3.23423
0.12332 3.1231 9.23432432
9.234324234 -1.23432 12.23432
...
</code></pre>
<p>Each line has three double value. There are more than 10000 lines in this file. I can use the ReadStream.ReadLine and use the String.Split, then convert it.
I wan... | c# | [0] |
4,385,823 | 4,385,824 | Double icons in Applications list | <p>I'm noticing that there are double icons for an application I recently built. Is this being caused by an issue in my manifest? Or is this an artifact from a previously deleted rev of the apk?</p>
| android | [4] |
1,582,351 | 1,582,352 | How to make Custom Android ListView to read phone contacts? | <p>Include the standard <code>ListView</code> widget in your layout, invoke <code>setAdapter()</code> to provide your data and child views, and connect a listener via <code>setOnItemSelectedListener()</code> to find out when the selection has changed.</p>
| android | [4] |
2,233,816 | 2,233,817 | Polymorphic constructor.name property access | <p>Given the JavaScript code:</p>
<pre><code>function Parent() { ... }
function Child() { ... }
Child.prototype = new Parent();
// toString implementation on the parent object
Parent.prototype.toString = function() {
return this.constructor.name;
}
// And the code:
alert(new Child());
</code></pre>
<p>... will o... | javascript | [3] |
4,989,382 | 4,989,383 | references in c++ problem | <p>I heard references in c++ can be intitalized only once but this is giving me 1 is my output and not returning any error!</p>
<pre><code> struct f {
f(int& g) : h(g) {
h = 1;
}
~f() {
h = 2;
}
int& h;
};
int i() {
int j = 3;
f k(j);
return j;
}
</code></pre>
| c++ | [6] |
4,841,169 | 4,841,170 | How to display "username" and "password" as default in text boxes in javascript? | <p>I want two text boxes with default text in both i.e "username" and "password". When we click inside the text box the text should disappear so the user can type their own username and password.</p>
<p>However, the password field is not readable by default.</p>
<p>How is it possible, kindly help me??? Thanks in adva... | javascript | [3] |
4,204,216 | 4,204,217 | delaying asynchronous callbacks | <p>how to give delays for a asynchronous callbacks, is there any way to pause,or resume(current process for a certain time),or any availability of sleep mode</p>
| c# | [0] |
3,790,034 | 3,790,035 | Saving image on iOS 5.1.1 works randomly | <p>I am trying to save an image taken from UIImagePickerController using the following code:</p>
<pre><code>NSString *docsDirectory =
[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)
objectAtIndex:0];
NSString *path = [docsDirectory stringByAppendingPathComponent:@"myImage.png"]... | iphone | [8] |
1,266,165 | 1,266,166 | Python function confusion | <p>While programming with python I am often confused with the following ambiguity:</p>
<p>should it be: function(a) or a.function(). Although the question is too general and can someone tell me which situation happens when?</p>
| python | [7] |
1,182,590 | 1,182,591 | Run ActivityInstrumentationTestCase2 sub class programatically | <p>I have few testcases in the sub-class of ActivityInstrumentationTestCase2. When i run them using adb shell am instrument -w .... it works and launches my target activity. But as I have to launch the test on getting some broadcast I need to launch it programmatically, but I don't know how to do that.
Pls help</p>
| android | [4] |
4,232,834 | 4,232,835 | C++ introduction: self study | <p>I created the program to read from text file and remove special characters. I can't seem to code better the if statement. Please help. I searched online for the right code statements but they have all advanced code statements. The book I am learning from has the last(14th) chapter with strings and file open and clos... | c++ | [6] |
3,369,569 | 3,369,570 | GridView scrolling out of view and scroll bars disappears on Android | <p>I have a very strange bug in my gridview</p>
<pre><code><GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:numColumns="auto_fit"
android:verticalSpacing="10dp"
android:horizontalSpacing="... | android | [4] |
1,786,051 | 1,786,052 | How can we tell the difference between an actual and apparent type? | <p>If you have a class hierarchy and you'd like to determine what could be actual types that an object is pointing to, is the answer just any subclass of the object? If the object is an abstract class, can you still declare a pointer of that object that's apparent and actual type is that object?</p>
| c++ | [6] |
2,605,398 | 2,605,399 | creating simple server for android application | <p>I am currently working on an android application, and my application contains a lot of pictures and videos, that increase the size of the project.
Now, I want to have a simple server for my application, so that I save all the needed media on that server. But I don’t have any idea how to do that, can you please refe... | android | [4] |
4,636,903 | 4,636,904 | Android page control like book? | <p>I want to develop page control like <strong>book</strong>,means when user drags over page(left or right) control will <strong>move next page or previous page(with view also move)</strong>, depending on which way the user dragged using their finger.</p>
| android | [4] |
1,230,848 | 1,230,849 | Search function on listview | <p>I am altering the question now!</p>
<p>I have the search working using the following:</p>
<pre><code>//check the array for a match
foreach (Delivery d in mainForm.myDeliveries)
{
if (d.DeliveryName == searchValue)
{
ListViewItem item = lstDeliveryDetails.Item... | c# | [0] |
1,826,851 | 1,826,852 | Regarding the 3D model displaying issue of .3ds file in min3D android project | <p>I have display issue when I open 3d <strong>.3ds</strong> file through min3D android open source project.
The following given below is the approach and step involved before issue raised.
(1) I have developed the my own 3D modeling and save it as monster_high1.3ds</p>
<p>(2) Min3D project successfully able to pars... | android | [4] |
450,886 | 450,887 | How to get particular array value in php? | <p>I have the following <code>$qtips_messages</code> array,</p>
<pre><code>Array
(
[0] => Array
(
[id] => 1
[tips_title] => email_tips
[tips_message] => ex:xxxxx@xyz.com
[tips_key] => key_email
)
[1] => Array
(
... | php | [2] |
4,044,833 | 4,044,834 | Starting an external activity, getting permission error | <p>I'm trying to start the preferences activity in the native messenger client from my application. in AOSP Mms.apk does not have an intent filter setup on that activity. Regardless I'm trying to find a work around to launch the user into that screen.</p>
<pre><code> Intent intent = new Intent(Intent.ACTION_MAIN)... | android | [4] |
528,587 | 528,588 | UIWebView, quote characters with Arial font not showing up correctly | <p>I have some .html with the font defined as: </p>
<p><code><font color="white" face="Arial"></code></p>
<p>I have no other style applied to my <p> tag. In it, when I display data like:</p>
<p><code><b> “Software” </b></code></p>
<p>or </p>
<p><code><b>“Software”</b></code></p>
<p>... | iphone | [8] |
4,952,360 | 4,952,361 | actionbar nullpointer exception | <p>I am new to android. My minimum API level needs to be 7, so that I can test the app on my htc hero. My target API level is 17.
The error concerns the actionbar. Some code is added by eclipse and I guess I need it to propperly run my app on the latest android versions:</p>
<pre><code>getActionBar().setDisplayHomeAs... | android | [4] |
3,171,364 | 3,171,365 | I'm getting wrong String value | <pre><code>void displayId(PrintWriter stdOut, StringResources resources, IPatchBundle group, String[] ids){
for(int i=0;i<ids.length;i++)
System.out.println("Mids from cmdMds"+ids);
}
</code></pre>
<p>The above code produces <code>[Ljava.lang.String;@152cf21</code>.
I tried putting <code>.... | java | [1] |
5,034,718 | 5,034,719 | JQuery image fade speed | <p>What is the syntax to assign a speed to each fade?</p>
<pre><code> function fadeIn()
{
$(this).fadeIn( fadeOut );
}
function fadeOut()
{
$(this).fadeOut( fadeIn );
}
fadeIn.call($("#myImage"));
</code></pre>
| jquery | [5] |
4,527,387 | 4,527,388 | Crawl Images, Whole Web Pages and cache them | <p>I am starting a project and wonder the relationship between the characters in images and the whole web page where the images reside.</p>
<p>I want to crawl some images and their web pages. I need to save the crawl result in local disk for further analysis. I wonder if there is any open source for this issue? </p>
| python | [7] |
5,762,321 | 5,762,322 | Is there some way I could combine this C# code? | <p>I have the following code. It looks to me like there is a way I could combine it into one statement but I am not sure how to do this. </p>
<pre><code>List<SelectListItem> items = new List<SelectListItem>();
var emptyItem = new SelectListItem(){
Value = "",
Text = "00"
};
items.Add(emptyItem);... | c# | [0] |
1,798,820 | 1,798,821 | how to estimate a performance unit in a c++ program | <p>What I mean, to measure performance in some algorithm I need to do it in terms of some unit. So, basically if I ignore declarations and definitions of objects and consider only operations , how would you estimate the time each operation consums in run time?. </p>
| c++ | [6] |
2,452,705 | 2,452,706 | how can i remove "\n" in string in php? | <p>how to remove "\n" in string?<br>
I used 3 method bellow ,seams that only the "\s+" works , but I only want to remove \n,not all space ,how to do the job?<br>
need help, this question had puzzled me for a long time.</p>
<pre><code>$str="<p>
hello<br>
world
</p>";
//$str=str_replace("\n","... | php | [2] |
4,107,525 | 4,107,526 | Limiting double to 3 decimal places | <p>This i what I am trying to achieve:</p>
<p>If a double has more than 3 decimal places, only keep until the first 3 dec places (do not round.)</p>
<p>Eg.: 12.878999 -> 12.878</p>
<p>If a double has less than 3 decimals, leave unchanged</p>
<pre><code>Eg.: 125 -> 125
89.24 -> 89.24
</code></pre>
... | c# | [0] |
1,095,031 | 1,095,032 | php multidimensional arrays and foreach | <p>Hi everyone I am having an oddity where in my foreach loop the last element is the same as the 2nd to last</p>
<p>Here is my code so far
<a href="http://slexy.org/raw/s21pArCYrU" rel="nofollow">php code (pastbin site)</a></p>
<p>I threw a print_r just before the loop to see if it was an error in the construction o... | php | [2] |
2,394,504 | 2,394,505 | iPhone:How do i insert few rows in the middle of existing table? | <p>If i want to insert few rows in the middle of the existing table, how do i approach it? Where all that i should be careful when doing such thing? Is there any good sample source available?</p>
<p>Appreciate your helps.</p>
<p>Thank you.</p>
| iphone | [8] |
2,605,161 | 2,605,162 | several if else if conditions | <p>I have a java class inside there is a method which need to return some integer value based upon conditions met now, I have put some <code>if...else</code> conditions inside the method of class as shown below and in comment I have written when this conditions will be executed.</p>
<p>Please advise that my logic insi... | java | [1] |
1,908,548 | 1,908,549 | Could someone help me edit my first attempt at code for a blinking address replacement? | <p>So, I'm totally new to this and trying to produce an effect where an old address blinks a few times, then some new text replaces it. However, the minute I use .replaceWith(), it overrides all the other .fade and the .append calls.</p>
<pre><code> <div id="footer-address">
<strong>Address</strong&g... | jquery | [5] |
4,803,056 | 4,803,057 | textColor not applied when used as them | <p>I have a style that includes textColor, textSize, textStyle and typeface. When applied directly to an EditText widget, the color of the text is as specified (as well as the other attributes), but when applied as a theme to the activity or the entire application, the size is fine but the color is not applied. What ... | android | [4] |
1,819,070 | 1,819,071 | finally method with try in java | <p>class DaemonThread extends Thread {</p>
<pre><code>public void run() {
System.out.println("Entering run method");
try {
System.out.println("In run Method: currentThread() is"
+ Thread.currentThread());
while (true) {
try {
Thread.sleep(500);
... | java | [1] |
2,894,573 | 2,894,574 | extract line matching string in javascript | <p>If a string is( \n separating line)</p>
<pre><code>this is good string 1
this is bad string 1
this is good string 2
this is bad string 2
.
.
.
</code></pre>
<p>I want get string that has lines that match a phrase say "good string"</p>
<pre><code>this is good string 1
this is good string 2
</code></pre>
| javascript | [3] |
2,934,377 | 2,934,378 | MediaPlayer Service and Camera Service | <p>Can you please tell me if MediaPlayer Service and Camera Service are running in same process or different process? How can I find that out from Android source?</p>
<p>Thank you.</p>
| android | [4] |
12,330 | 12,331 | Excluding numbers from an array | <p>The code below returns a table with a row for every word or number that appears in <code>$commentstring</code>. Each word or number appears as <code>$word</code> in the table below. How can I exclude numbers?</p>
<pre><code>$words = explode(" ", $commentstring);
$result = array_combine($words, array_fill(0... | php | [2] |
731,503 | 731,504 | Recommendations for implicit versus explicit line joining | <p>I would like to know recommendations about <a href="http://docs.python.org/reference/lexical_analysis.html#implicit-line-joining">Implicit Line Joining</a> versus <a href="http://docs.python.org/reference/lexical_analysis.html#explicit-line-joining">Explicit Line Joining</a> in Python.</p>
<p>In particular, do you ... | python | [7] |
1,292,037 | 1,292,038 | composite keys in map | <p>Hello I cannot find any info on what I need to do to make two keys seems equal. That is, i need to provide a custom compare method that will be used by map.put() Implementing comparable doesnt help.</p>
<p>For example, this code doesnt work as intended - for the purposes of my program, two keys n and n2 ARE the sam... | java | [1] |
2,204,678 | 2,204,679 | Running Java application on server | <p>I have access to a server using SSH. I need to run a stand-alone Java application on it to access a MySQL server installed there. How do I go about in doing this?</p>
| java | [1] |
5,142,902 | 5,142,903 | When to use an Abstract Class and an Interface | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/761194/interface-vs-abstract-class-general-oo">Interface vs Abstract Class (general OO)</a> </p>
</blockquote>
<p>Please explain to me, with an example, in what situation to use an Abstract class and Interface. ... | java | [1] |
3,324,788 | 3,324,789 | Setting a default src to img element | <p>Some people set default src to img element in the following way:</p>
<pre><code><img src="foo.jpg" onerror="this.src='default.jpg'" />
</code></pre>
<p>I think it's not the best way because a additional http request will be sent when onerror event be fired, and our log component will log the worthless error ... | asp.net | [9] |
1,500,595 | 1,500,596 | my app can't open keycharmap file | <p>I created a function that enlarges an avatar when the user clicks on it. The function then generates a dialog. When I press the back button to remove the dialog then it's not possible any more to click on the avatar again. The dialog won't show again.</p>
<p>Why this happens? Someone help me please.</p>
<pre><code... | android | [4] |
4,510,384 | 4,510,385 | javascript check form for radio group | <p>HiExperts,</p>
<p>I am creating a form with a javascript validation function for a radio group. The idea is, when "None" is checked, no div pop up, and when "Monday" or "Tuesday" is checked, a div pop up:-</p>
<pre><code>//the form
<form name="form_sf" id = "form_sf" method="post" action="process.php" onSubmit=... | javascript | [3] |
3,313,528 | 3,313,529 | How to get the position of a span nested within a textarea | <p>I have a span that is nested within a textarea, and would like to get the offset of this span relative to the document. Zero is always returned for left and top, and I'm not sure why.</p>
<p>Here is a <a href="http://jsfiddle.net/c2J36/" rel="nofollow">jsFiddle</a> with the following code to demo</p>
<pre><code>$... | jquery | [5] |
5,018,746 | 5,018,747 | PHP don't wait for response / reply return immediately | <p>I have a web service written in PHP to which an iPhone app connects to. When the app calls the service, a series of notification messages are sent to Apple's APNs server so it can then send Push Notifications to other users of the app.</p>
<p>This process can be time consuming in some cases and my app has to wait a... | php | [2] |
4,739,180 | 4,739,181 | PHP pass a var into $_FILES inside function | <p>I am working on an admin area that will have file uploads on several pages. Regardless of the name of the form field I want to do some specific processes, but I'm a bit stuck on how to do this in a function. I have the code below, which I knew going in wouldn't be correct, but I'm not sure how to achieve what I'm ... | php | [2] |
3,871,582 | 3,871,583 | Android: How to do create custom EditText with a clickable arrow on the right | <p>I would like to have an EditText with one modification: on the right (still inside the EditText) there is an arrow pointing downwards, that I can set OnClickListener to. So when user clicks on the arrow it displays a menu. What is the best way to do this?</p>
| android | [4] |
4,972,809 | 4,972,810 | When I run following url on my browser it runs fine but when i use php function its getting 505 Page . Can any one help me with that | <p>$output = file_get_contents("http://www.canadapost.ca/cpc2/addrm/hh/current/indexa/caONu-e.asp");
var_dump($output);</p>
| php | [2] |
1,691,844 | 1,691,845 | Output to CSS multiple backgrounds using PHP | <p>On my template I have a number of fields where the user(s) can choose and select from few options to use as a background on their site.</p>
<p>There are two separate backgrounds, called from the ID's of <code>background-one</code> and <code>background-two</code>, stored in separate arrays.</p>
<p>To output the fir... | php | [2] |
1,417,667 | 1,417,668 | File Upload/Download module in PHP | <p>I have a online PHP application to which I want that the Admin should be able to upload files at file system using PHP / HTML forms and the other users can download the files. The application should log the number of downloads for a specific file. The files should appear in proper folders as organized by the admin.<... | php | [2] |
4,571,271 | 4,571,272 | Android surfaceview animation | <p>I'm trying to achieve animation on a surfaceview. But, my surfaceview's background is transparent, and I can't clear away the pixels of last frame.
Can I achieve some animations on transparent surfaceview? Maybe I only use 'Animation' class on a view.
Thanks!</p>
<hr>
<p>Maybe I didn't describe the question clea... | android | [4] |
5,313,249 | 5,313,250 | Regarding Better Approach of Handling Properties | <p>I need to read the two of the following attributes of user details through properties file.</p>
<pre><code>username and userid.
</code></pre>
<p>There may be <code>n</code> number of users inside the properties file.The number is not fixed.
In this case what is the best practice to handle this requirement using pr... | java | [1] |
3,033,224 | 3,033,225 | get the page a user viewed before current | <p>instead of</p>
<pre><code>login.php?ref=http://mysite.com/lastpage
</code></pre>
<p>could I get the before page somehow else? tried HTTP_REFERER but cant get it to work</p>
<pre><code>Notice: Undefined index: HTTP_REFERER in C:\test\login.php on line 18
</code></pre>
<p>// Newbie</p>
| php | [2] |
5,215,123 | 5,215,124 | is it possible to remove an html comment from dom using jquery | <p>just wondering if there was a way to remove an html comment using jquery.</p>
<pre><code><!-- <div id="main">Some text </div> -->
</code></pre>
<p>thanks </p>
| jquery | [5] |
1,851,200 | 1,851,201 | C# equivalent of Event Objects in c++ , winapi | <p>is there an equivalent in C# of the event objects created in c++ using the win api function "CreateEvent".</p>
| c# | [0] |
5,313,680 | 5,313,681 | What is the shortest way of checking if JS value exists? | <p>Assuming I have this :</p>
<pre><code>var a = parseInt(prompt("Enter A"));
var b = parseInt(prompt("Enter B"));
var c = parseInt(prompt("Enter C"));
</code></pre>
<p>What is the <em>shortest</em> way to check if a value exists in all 3 variables ?</p>
<p>Doing <code>if(a && b && c)</code> is... | javascript | [3] |
2,961,556 | 2,961,557 | java, swing, awt, remove focus from all objects | <p>I'm doing this project for school and for some reason one of by Buttons in one of my Panels has focus(i can change it with the tab button) Well whatever button has the focus is acting weird.</p>
<p>Is there a way that I can have no button have focus? ie. have nothing selected by the tab button?</p>
<p>notice the R... | java | [1] |
4,094,165 | 4,094,166 | How to add the different views for different segments in the segment control? | <p>Iam developing one application.In that i use the segment control with 5 segments.Every segment has separate view.So when we click on any segment another view will be appear below the segment control at the same view.Like this all segments print the different views in the same view.How to get this please tell me how ... | iphone | [8] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.