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 |
|---|---|---|---|---|---|
361,217 | 361,218 | QFlags python alternative | <p>In PyQt4, what is the alternative for:</p>
<pre><code>class TestClass
{
public:
enum Option {
OptionA = 0x0, // 0x000000
OptionB = 0x1, // 0x000001
OptionC = 0x2, // 0x000010
OptionD = 0x4, // 0x000100
OptionE = 0x8, // 0x001000
OptionE = 0x10 // 0x0... | python | [7] |
2,389,119 | 2,389,120 | Nested type as function argument | <p>I have the following template class:</p>
<pre><code>
template<class T>
class C
{
typedef C_traits<T> traits;
typedef typename traits::some_type type;
//...
// use 'traits' and 'type' a lot
//...
};
</code></pre>
<p>where <code>C_traits</code> is a template struct that... | c++ | [6] |
1,056,666 | 1,056,667 | How to erase duplicate element in vector, efficiently | <p>I have</p>
<pre><code> vector<string> data ; // I hold some usernames in it
</code></pre>
<p>In that vector, I have duplicate element(s), so I want erase this/these element(s).Are there any algorithm or library function to erase duplicate element(s)?</p>
<pre><code>ex :
In data;
abba, abraham... | c++ | [6] |
923,734 | 923,735 | How do I alert users of an Android app when new data is posted to a remote server? | <p>I am developing an Android application for an already existing website. When ever a user enters some data into the website (like a forum post), all the other users should be alerted about that post. Is it possible?</p>
<p>I think this is possible with triggers. Am I correct? </p>
| android | [4] |
4,486,949 | 4,486,950 | When i develop my codes under Sun JDK and run my codes in Oracle JRockit JVM, am i using libraries from JRockit? | <p>When i develop my codes under Sun Standard JDK, and run my codes in Oracle JRockit JVM, am i using the implementation of the <code>String</code> class provided by Hotspot VM or JRockit VM?</p>
| java | [1] |
3,864,845 | 3,864,846 | Can I overwrite a constructor in javascript? | <p>I just learned that I <a href="http://stackoverflow.com/questions/13383345/how-do-i-access-this-javascript-property">can overwrite a method</a> in a Javascript class, as shown below, but what about the actual constructor?</p>
<p>If possible, how do I do it without instantiating the class?</p>
<pre><code>var UserMo... | javascript | [3] |
2,698,481 | 2,698,482 | How many ASP.NET developers program using pure OO? | <p>How many ASP.NET developers program using OO (e.g. using get, set)?</p>
<p>6 years ago I developed and maintained a .Net 1.1 Intranet application that had no get/set.</p>
<p>So how about today? Worth trying the pure OO route?</p>
<p>Thanks,</p>
<p>TDG</p>
| asp.net | [9] |
1,070,637 | 1,070,638 | Tuple conversion to a string | <p>I have the following list:</p>
<pre><code>[('Steve Buscemi', 'Mr. Pink'), ('Chris Penn', 'Nice Guy Eddie'), ...]
</code></pre>
<p>I need to convert it to a string in the following format:</p>
<pre><code>"(Steve Buscemi, Mr. Pink), (Chris Penn, Nice Guy Eddit), ..."
</code></pre>
<p>I tried doing </p>
<pre><code... | python | [7] |
3,070,244 | 3,070,245 | Can I run arbitrary javascript code in the javascript:void() function using the browser's address bar? | <p>I was wondering if I could run a block of code(which includes for loops and if statements) in a javascript:void() function through the URL box.</p>
| javascript | [3] |
4,786,902 | 4,786,903 | Custom Web Control in ASP.NET | <p>I want to create a custom web control with properties like Color, Text , border width.I am currently working on aproject where we are adding the custom control on the page from the drop down list and at the same time provide the user yo modify the custom control property.I just need an example to know how to create... | asp.net | [9] |
6,015,719 | 6,015,720 | make static buttons dynamic | <p>I have added 10 custom buttons using interface on view. Now I want to make visible that no of buttons only whenever user put value. e.g If user put 5 then on button click 5 buttons get visible. Can it be possible? If anyone know please give me the solution.</p>
<p>Thanks alot.</p>
| iphone | [8] |
1,431,965 | 1,431,966 | how to prevent client to access public function of base class | <pre><code>//cls_a is defined by system framework, so we cannot change its definition
public class cls_a {
public void method_a();
}
//I add a new cls_b implemenation and would like to
//add a new method_a(int) function
//and prevent client side to access cls_a.method_a()
public class cls_b extends cls_a {
public... | java | [1] |
5,557,288 | 5,557,289 | Javascript: which 'time processing' function is faster? | <p>I just created two versions of a function that can be used to process the date and time and return it to different HTML elements. These elements will be displayed a phone lockscreen. The function is called every second, to make sure it jumps to the next minute in time.</p>
<ul>
<li>v.1 works at once: it processes e... | javascript | [3] |
2,411,401 | 2,411,402 | Halting Execution of a program in C# | <p>In C++, I used to write a function that stops the execution of the program by the amount of the float parameter passed to it, there's the function:</p>
<pre><code>void wait(float sec){
clock_t endwait = clock() + sec * CLOCKS_PER_SEC; // CLOCK_PER_SEC == 1000
while(clock() < endwait);
}
</code></pre>
<p>is ... | c# | [0] |
4,403,788 | 4,403,789 | Prevent Default Jquery | <p>I'm trying to prevent the enter button when pressed on an input field that is within form tags to submit and and refresh the page. Instead I want to load an AJAX file. Now I know if I got rid of the form tags then this would work and I wouldn't even need the <code>e.preventDefault();</code> tags. What am I missing h... | jquery | [5] |
5,469,749 | 5,469,750 | String input, parsing, split | <p>I need to write a program that makes a user to type string date (ex. 10/21) once, and convert that string into integers. I suppose splitting is necessary before parsing?</p>
<pre><code>import java.util.Scanner;
public class ConvertDates {
public static void main(String[] args) {
Scanner input = new Scanner... | java | [1] |
2,147,246 | 2,147,247 | how can i fix this application? (begginer) | <p>Hello im new to android development and im trying to follow the instructions in this book..<a href="http://amzn.to/4nck80" rel="nofollow">http://amzn.to/4nck80</a> and i just cant get it to work!</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/... | android | [4] |
612,847 | 612,848 | $(this) vs this in jQuery | <p>What is the difference between <code>$(this)</code> and <code>this</code> in jQuery ? Here are two different usage :</p>
<pre><code> $(document).ready(function() {
$("#orderedlist").find("li").each(function(i) {
$(this).append( " BAM! " + i );
});
});
$(document).ready(function() {
// use this to ... | jquery | [5] |
2,001,127 | 2,001,128 | get collection of elements | <p>how to get a collection of elements?</p>
<pre><code>var tst = this.tbl_list.find('col');
alert('length = '+tst.length);
for(var key in tst){
alert(tst[key][0].tagName);
}
</code></pre>
<p>this alerts <code>length = 7</code> (which is the correct count), but each element is <code>undefined</code>!?</p>
| jquery | [5] |
3,071,604 | 3,071,605 | delete td and change cell data | <p>I have table with many rows. Each row is identified in UI with some ordered number such as 1, 2, 3 etc. This ordered number is also shown in UI.</p>
<p>When a row is deleted, the order should be changed dynamically</p>
<p>If second row is deleted. Then the other rows should be ordered again in sequence as 1, 2,... | jquery | [5] |
2,924,927 | 2,924,928 | In Java, how do I override the class type of a variable in an inherited class? | <p>In Java, how do I override the class type of a variable in an inherited class? For example:</p>
<pre><code>class Parent {
protected Object results;
public Object getResults() { ... }
}
class Child extends parent {
public void operation() {
... need to work on results as a HashMap
... results.put(resu... | java | [1] |
5,553,210 | 5,553,211 | eric5 autocomplete | <p>I've installed Eric5 for python dev. with my portage on gentoo. I can't get any autocomplete in it!</p>
<pre><code>#!/usr/bin/python3
import os
os. #<-I've pressed ctrl+space many times but don't get a menu :(
</code></pre>
<p>Also installed assistant and rope plug-in, but it didn't helped. Configured eric to s... | python | [7] |
915,430 | 915,431 | How to make soft keyboard enter button say “Search” in 3.2? | <p>all</p>
<p>I tried to use EditText's attribute </p>
<pre><code>android:imeOptions="actionSearch"
</code></pre>
<p>combined with </p>
<pre><code>android:inputType="text"
</code></pre>
<p>or with </p>
<pre><code>android:singleLine="true"
</code></pre>
<p>but have no luck.</p>
<p>Also i tried to set attributes ... | android | [4] |
2,327,560 | 2,327,561 | PHP Include DB Conn - Password not accessible | <p>I have a strange include file problem. I'm hoping its a simple fix due to being a 2-day-old, PHP noob.</p>
<p>I'm simply trying to include DB credentials in to my parent script, like this:</p>
<p><strong>db-conn.php</strong></p>
<pre><code><?php
$dbUsername = "xxx";
$dbPassword = "xxx";
$dbHostname = "localhos... | php | [2] |
1,257,172 | 1,257,173 | listing exceptions programmatically - Python | <p>Is there any way to programmatically determine which exceptions an object or method might raise?</p>
<p>Like <code>dir(obj)</code> lists available methods, I'm looking for the equivalent <code>dir_exceptions(obj)</code>.</p>
<p>As far as I know, the only way to achieve this would be to parse the source.</p>
| python | [7] |
2,819,831 | 2,819,832 | custom button images not applying | <p>Hi im applying custom images to button on different states, for which i create an xml file in appliication drawable folder in which i define states of button and images like this </p>
<p>Btn_enter_cutom.xml</p>
<pre><code><item android:drawable="@drawable/btn_enter" />
<item
android:state_pressed=... | android | [4] |
5,224,610 | 5,224,611 | question about opening a new activity from notification from current activity | <p>My current activity is MyActivity( used to display the data on the list ) and I am getting a new notification. What I am expecting is the data on the list will be refresh when clicking on the notification but It does work that way....There is also a picture of a issue. Any ideas are welcome. Thanks</p>
| android | [4] |
1,466,211 | 1,466,212 | Searching a List of Lists - Python | <p>Basically I have converted a tab delimited txt file into a list containing a bunch of lists for each book (title, author, publisher, etc) and I have figured out how to search for something using indexes, but how can I make it so it searches and returns anything that matches even partially.</p>
<pre><code>import csv... | python | [7] |
2,188,396 | 2,188,397 | How to query sqlite database from array in android | <p>I am using the following, where <code>AuthorName</code> column value i want to find on the basis of <code>AuthorID</code>. <code>catid</code> is an array that contains <code>AuthorID</code> </p>
<pre><code>public Cursor Authorname(String[] catid) {
myDataBase.rawQuery("SELECT AuthorName FROM AUTHOR_NAME WHERE ... | android | [4] |
1,093,781 | 1,093,782 | Add div to another div, then make some actions and then remove added div. How? | <pre><code>$div = $('<div>Here is my div!</div>');
$('#bar').append($div.html());
//do some actions
$div.remove();
</code></pre>
<p>But appended div isn't removed?</p>
<p>How can I do it?</p>
| jquery | [5] |
3,661,408 | 3,661,409 | Java JPane Option Window Problems | <p>This last program we did, stupid simple, was to just use a jpane and graphics to draw 3 non primative shapes but I need a way so that a message (JOptionPane) shows up AFTER the JPane is closed> if you have it after in the code, they both go at the same time</p>
| java | [1] |
4,892,701 | 4,892,702 | How to build a function on the fly in java? | <p>I'm parsing a text file that is being mapped to some java code like such:</p>
<pre><code>public void eval(Node arg)
{
if(arg.data.equals("rand"))
{
moveRandomly();
}
else if(arg.data.equals("home"))
{
goHome();
}
else if(arg.dat... | java | [1] |
1,101,120 | 1,101,121 | Find a class instance by given field object | <p>Is it possible to find a object instance using a public static method which expects a field object as parameter? </p>
<p>Thats what I search:</p>
<pre><code>public class Foo {
private Bar myObject;
public static Foo get(Bar bar) {
// return an instance of Foo which has stored a
// referenc... | java | [1] |
906,728 | 906,729 | How and where to register an email account to be used for sending emails from an app to the owner of the device? | <p>I have written an (android) app which can send emails to the user of the device. The user's gmail account is read from the device, and is used both as the email's sender and receiver address. The emails are currently sent via the gmail smtp server, via an email account registered by me (with a name corresponding to ... | android | [4] |
1,842,411 | 1,842,412 | Array initialization error | <p>I am doing java programming practice from a website. I have to display this out put using arrays.</p>
<pre><code>Enter the number of students: 3
Enter the grade for student 1: 55
Enter the grade for student 2: 108
Invalid grade, try again...
Enter the grade for student 2: 56
Enter the grade for student 3: 57
The av... | java | [1] |
393,160 | 393,161 | Improving __init__ where args are assigned directly to members | <p>I'm finding myself writing a lot of classes with constructors like this:</p>
<pre><code>class MyClass(object):
def __init__(self, foo, bar, foobar=1, anotherfoo=None):
self.foo = foo
self.bar = bar
self.foobar = foobar
self.anotherfoo = anotherfoo
</code></pre>
<p>Is this a bad ... | python | [7] |
3,989,719 | 3,989,720 | how to change the value of user.identity.name | <p>I think this is a very fundamental question - but i am not sure how to do it.</p>
<p>I am trying to test an application with different user login ID's (because these users have different roles).The application uses the login information of the system user and has no login of its own. The <code>user.identity.name</c... | asp.net | [9] |
1,056,507 | 1,056,508 | setting location.href does not work from a <a> click | <p>This is code I took over from a colleague who left:</p>
<pre><code><input type="text" class="value" placeholder="0"></span><br>
<a href="/model/act/id/'.$model->id.'" class="act act-a" url="/model/act/id/'.$model->id.'">Act Now</a>
<script>
$('.act-a').click(function()... | javascript | [3] |
4,989,030 | 4,989,031 | Difference between Utility and Helper classes | <p>Aren't utility classes really the same concept as helpers? I mean utility methods don't extend an existing class such as helpers but the two types of methods really could be referred to as "Helpers" in either case.</p>
| c# | [0] |
14,507 | 14,508 | C# Dynamic Method Call on Generic Functions | <p>I have the following two functions:</p>
<pre><code>public class MyClass
{
public void Save<TObject>(TObject object) where TObject : class
{
}
public void Save<TObject>(TObject object, String strValue) where TObject : class
{
}
}
</code></pre>
<p>I want to be able to dynamica... | c# | [0] |
413,323 | 413,324 | Adding the results to an arraylist | <p>I am facing some difficulties while assigning the values in an array list. My code is :</p>
<pre><code>while (answer.hasMore()) {
SearchResult rslt = (SearchResult)answer.next();
Attributes attrs = rslt.getAttributes();
System.out.println();
if (attrs.get("department") != null && attrs.get("telephon... | java | [1] |
3,970,057 | 3,970,058 | Android App Class Not Found Error | <p>I developed an Android project in the package:<code>com.anand.eprint</code>. </p>
<p>The package contains <code>ePrintActivity.java</code> and <code>GmailSender.java</code>. The <code>ePrintActivity</code> calls <code>GmailSender</code> internally. This is working successfully. </p>
<p>I exported the project, take... | android | [4] |
2,293,875 | 2,293,876 | typical memory usage of an iphone app | <p>According to Instruments 'Net Bytes' of my app are never more than 2MB yet sometimes I receive memory warning and the app crashes because some views on the stack are unloaded by force.</p>
<p>I'd like to know what is the typical memory footprint where system would not send you memory warning and unload the views ?<... | iphone | [8] |
5,672,586 | 5,672,587 | variable variables | <p>how do i create variable variables inside a for loop?</p>
<p>this is the loop: </p>
<pre><code>for ( $counter = 1; $counter <= $aantalZitjesBestellen; $counter ++) {
}
</code></pre>
<p>inside this loop i would like to create a variable $seat for each time it passes but it has to incrementlike so. first time i... | php | [2] |
1,273,068 | 1,273,069 | I need a uDIG tutorials | <p>Do you know any good tutorials - how to create plug-ins to uDIG application?</p>
| java | [1] |
286,813 | 286,814 | parent.history.back(); is not supported in firefox | <p>parent.history.back(); is not supported in firefox, i am using asp.net ajax history.</p>
| asp.net | [9] |
2,467,531 | 2,467,532 | Unexpected token ( error | <p>hello can anyone help me debug little error that my eyes seem to be skipping. error is: unexpected ( error. Are my array syntex correct?</p>
<pre><code>function SourceClusting()
{
// grabbing count
var table = document.getElementById('OSDataCount');
var counter= table.rows[1].children[0].innerHTML
/... | javascript | [3] |
5,477,369 | 5,477,370 | how to disable editing in a textbox and how to set default value of text box is eql to session variable | <p>I am editing a page and there i am asking again username and password for confirmation..
I want to pick username from session variable</p>
<pre><code>$_SESSION['employee']['password']=$row['Password'];
</code></pre>
<p>and want that username displayed there(i am setting username box value=session username variable... | php | [2] |
1,671,220 | 1,671,221 | Which is better in implementing click listener? | <p>Which is a good practice in implementing click listener and why? Or is there a better way other than the two? Thanks.</p>
<p>First :</p>
<pre><code> sampleButton.setOnClickListener(new View.OnClickListener(){
public void onClick(View v){
// do something
}
});
</code></pre>
<p>S... | android | [4] |
3,992,839 | 3,992,840 | Assigning a value to a object's property/variable in a callback | <pre><code>var obj1={
var1:"val1",
init:function(){
this.var1="val2";
var self=this;
setTimeout(function(){self.var1="val3"},1);
setTimeout(function(){obj1.var1="val3"},1);
}
}
obj1.init();
console.log(obj1.var1);
console.log(obj1);
</code></pre>
<p>How to set/assign a valu... | javascript | [3] |
2,555,260 | 2,555,261 | Error Writing a Copy constructor in C++ | <p>I am trying to write a copy constructor for a class but I get these two error messages, which I cannot decipher. Can somebody please tell me what I am doing incorrect?</p>
<pre><code>class Critter
{
public:
Critter(){}
explicit Critter(int hungerLevelParam):hungerLevel(hungerLevelParam){}
... | c++ | [6] |
4,481,595 | 4,481,596 | Issue with custom jQuery selectbox - keyboard navigation | <p>I have issues with customized select box, i've done customization with this solution for example:
- <a href="http://info.wsisiz.edu.pl/~suszynsk/jQuery/demos/jquery-selectbox/" rel="nofollow">http://info.wsisiz.edu.pl/~suszynsk/jQuery/demos/jquery-selectbox/</a></p>
<p>I've tryed many others aswell... It's always s... | jquery | [5] |
1,297,705 | 1,297,706 | Issue with JQuery Each function | <p>I have a jquery function to hide email ids on the webpage to avoid spambots.
I am trying to replace all the span tags with class 'mailme' to valid email ids with the help of this function. The code was working for 1 span tag but since its changed to multiple spans with the help of each method, its not working.</p>
... | jquery | [5] |
2,411,178 | 2,411,179 | Is this the right way to connect to a socket? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/563153/socket-create-vs-fsockopen-php">socket_create vs. fsockopen php</a> </p>
</blockquote>
<p>Is this the right way to connect to a socket in PHP.</p>
<pre><code><?php
$fp = fsockopen($ipaddress,$port, $e... | php | [2] |
2,720,700 | 2,720,701 | Splitting a string using a single delimeter | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/236129/splitting-a-string-in-c">Splitting a string in C++</a> </p>
</blockquote>
<p>I'm trying to split a single string object with a delimeter into separate strings and then output individual strings.</p>
<p>e... | c++ | [6] |
3,341,774 | 3,341,775 | manifest file not containing an attribute | <p>Thanks for your answers. I'm still having a fault saying manifest file does not contain a file/object attribute, after I had created my jar file for my application. I'm doubting maybe I didn't know what exactly the main-class represent in a manifest file while writing the code. please illustrate taking an example fr... | java | [1] |
616,368 | 616,369 | Arkanoid in C#, help needed | <p>I have searched on web, but dint find any tips how to do it. IDE to be used in Microsoft Visual Studio. What project type must I choose to make Arkanoid game?</p>
| c# | [0] |
1,767,734 | 1,767,735 | how can i send the data with the help of BeginSendTo function in UDP | <p>Actually i am quite new in UDP programming so i am not understanding how to use the BeginSendTo function....i have made a socket initiated all the relevant which is needed to make an connection then i used a array name buffer where i want to store my data..</p>
<p>Here is the sample of my code :-</p>
<pre><code>pu... | c# | [0] |
4,735,730 | 4,735,731 | Need to post JSONObject to PHP server through parameter | <p>From past couple of hour I was trying to send JSONObject to a PHP server. I need to send this object through a parameter.</p>
<p>Some what like this:</p>
<pre><code>message={"name":"Firstname","email":"test@test.com"}
</code></pre>
<p>here message is my parameter name.</p>
<p>Yes I am using HttpClient for postin... | android | [4] |
1,738,334 | 1,738,335 | To change the character to string | <p>Have to change the character "^" to "255E"</p>
<pre><code>String s_ysymbol = c1.getString(c1.getColumnIndex(DBConstants.YSYMBOL));
</code></pre>
<p>in this ysymbol starting charecter will be ^ have to change it to 255E and then have to do further process..
I tried the replace method</p>
<pre><code>s_ysymbol.repla... | java | [1] |
115,354 | 115,355 | Can i do the effect shown in this page using jquery? | <p>Please look at this page:</p>
<p><a href="http://www.nike.com/nikeos/p/nikegolf/en_US/" rel="nofollow">http://www.nike.com/nikeos/p/nikegolf/en_US/</a></p>
<p>In the slide number 2, there is a midpanel that does a growing effect onmouse over.Some panels step aside at the same time or simply grows over another. As ... | jquery | [5] |
4,626,455 | 4,626,456 | formatting double precision values in C# | <p>Say I have a <code>double</code> variable initialized as </p>
<pre><code>double dValue = 5.156365
</code></pre>
<p>I would like to show this in a textbox as 5.16 i.e only two decimal places.</p>
<p>How should I format? </p>
<p>Is <code>textbox.Text = dValue.ToString("F2", Culture.....)</code> correct? When I tr... | c# | [0] |
5,542,448 | 5,542,449 | Java Array Bulk Flush on Disk | <p>I have two arrays (int and long) which contains millions of entries. Until now, I am doing it using DataOutputStream and using a long buffer thus disk I/O costs gets low (nio is also more or less same as I have huge buffer, so I/O access cost low) specifically, using </p>
<pre><code>DataOutputStream dos = new DataO... | java | [1] |
1,923,590 | 1,923,591 | Best way of writing an expression in an if construct | <p>I have a question about something that I found among PHP best practises book that I read.</p>
<p>What is the best way to do the following test?</p>
<pre><code>if("value" == $variable){}
</code></pre>
<p>and</p>
<pre><code>if($variable == "value"){}
</code></pre>
| php | [2] |
739,520 | 739,521 | Python .replace() Error | <p>In Python, I open a text file and read it line-by-line, and strip() the line before evaluating it.
When I evaluate the line, I have an if statement to check if the line is "random", and then puts a random number into a variable called genRandom. I have another line in my code that looks like this:</p>
<pre>thisLine... | python | [7] |
2,164,883 | 2,164,884 | Getting location on first boot FC also and random FC's on some devices | <p>I am getting the current location with the following code but this is causing FC if there is no last known location. Also some devices like Motorola atrix crash if they open this activity.</p>
<pre><code>locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
locationManager.requestLo... | android | [4] |
4,703,895 | 4,703,896 | Why is the name of the variable declared twice on the same line? | <p>I have created the following function..</p>
<pre><code>function test(){
var el = el = document.body;
};
test();
</code></pre>
<p>Here what does the repeated <code>el</code> represent? is they return the same value? Can anybody explain this in short? Thanks in advance.</p>
| javascript | [3] |
1,311,950 | 1,311,951 | Call to undefined function using encoding in PHP | <p>i am getting <code>Call to undefined function basr64_encode()</code> Error of PHP is there some Library Missing ??? or any extension ? </p>
| php | [2] |
4,386,287 | 4,386,288 | Not getting the response after adding debug proxy | <p>I have an android application where i connect to server and get the data to be rendered. To show the maps I added '<strong>-http-proxy IP:port -debug-proxy</strong>' to 'Additional emulator command line options' in eclipse . Since i have added this I am unable to recieve the response properly.
I am using HTTP conne... | android | [4] |
2,700,413 | 2,700,414 | How to make all combinations of the elements in an array? | <p>I have a list. It contains x lists, each with y elements.
I want to pair each element with all the other elements, just once, (a,b = b,a)</p>
<p>EDIT: this has been criticized as being too vague.So I'll describe the history.
My function produces random equations and using genetic techniques, mutates and crossbreeds... | python | [7] |
5,920,970 | 5,920,971 | Android mainfest file | <p>my application contain some default intent and user defined ,i want my application to start always from the beaning when user resuming the application after pressing the home button</p>
| android | [4] |
4,353,737 | 4,353,738 | How to properly cancel pending alarms | <p>I can't seem to find an answer to this, but what is the criteria for passing in a matching <code>PendingIntent</code> to be removed from an alarm? It it based on the just the name like com.blah.package.myclass or do the <code>Extra</code>s matter?</p>
<p>For example, I'm doing something like this and all alarms fir... | android | [4] |
4,003,208 | 4,003,209 | Is it always OK to not explicitly initialize a value if you would only be setting it to its default value? | <p>Resharper just prompted me on this line of code:</p>
<pre><code>private static bool shouldWriteToDatabase = false;
</code></pre>
<p>indicating that I should not say " = false" because bools, apparently, <a href="http://msdn.microsoft.com/en-us/library/83fhsxwc.aspx">default to false in C#</a>. I've been programmin... | c# | [0] |
5,703,162 | 5,703,163 | Problems with mousewheel in jQuery | <p>I have the following code in the head-section:</p>
<pre><code><script type='text/javascript' src='/js/jquery.mousewheel.min.js'></script>
jQuery(function($) {
$('#box').bind('mousewheel', function(event, delta) {
var dir = delta > 0 ? 'Up' : 'Down',
vel = Math.abs(delta);
... | jquery | [5] |
5,990,052 | 5,990,053 | setTimeout scope issue | <p>I have a setTimeout defined inside of a function that controls the player's respawn (i am creating a game):</p>
<pre><code>var player = {
...
death:(function() {
this.alive = false;
Console.log("death!");
var timer3 = setTimeout((function() {
this.alive = true;
... | javascript | [3] |
1,027,882 | 1,027,883 | How do I generate test data for my Python script? | <p>A equation takes values in the following form :</p>
<pre><code> x = [0x02,0x00] # which is later internally converted to in the called function to 0x300
y = [0x01, 0xFF]
z = [0x01, 0x0F]
</code></pre>
<p>How do I generate a series of test values for this function ?
for instance I want to send a 100 o... | python | [7] |
3,367,634 | 3,367,635 | create a listener that will listen to an external push server | <p>is there any build-in mechanism in Android, which could create a service or app that actully listens to some server from the out side.. something that will "Wake up" the phone and makes him receaving a message from an outside server (i am asking this coz most of the appz are working the way aroound, when the phone s... | android | [4] |
2,876,932 | 2,876,933 | Replacing an element in an object array | <p>I want to replace the entire object in an array.</p>
<p><a href="http://jsfiddle.net/CWSbJ/" rel="nofollow">http://jsfiddle.net/CWSbJ/</a></p>
<pre><code>var array = [ {name: "name1" }, { name: "name2" } ];
var element = array[0];
element = {name: "name3"};
alert(array[0].name);
</code></pre>
<p>In this piece of ... | javascript | [3] |
258,533 | 258,534 | Step through wordpress code | <p>I was wondering if anybody knew how to setup step through code for Wordpress. I have tried <a href="http://xdebug.org/index.php" rel="nofollow">xdebug</a> but had no luck setting it up on my VPS. I managed to get it working on my localhost at one stage but it didn't track WP too well in conjunction with NetBeans. It... | php | [2] |
4,733,252 | 4,733,253 | JQuery unbinding a specific handler | <p>Given the code below, how can you get <code>unbind('click', h)</code> to work?</p>
<p>It doesn't currently work. I could make <code>h</code> a global variable but I don't know how to "set this up" given the <code>msg</code> variable is set within the function.</p>
<p>??</p>
<pre><code>function x(open) {
var ... | jquery | [5] |
1,374,442 | 1,374,443 | Multiple value to UIPicker View | <p>I have a UI picker view to store child details, i got the value through a web service.I was added child name to picker view , now it shows all childs.</p>
<p>I also have one more value child id to store in the picker view, when a user select a child i need to get the id of the corresponding child.How i add multiple... | iphone | [8] |
1,948,490 | 1,948,491 | Break multiple lines in a text file into a list of lists | <p>I am working with a text file ex:</p>
<pre><code>blahblahblahblahblahblahblah
blahblahblahblahblahblahblah
start
important1a important1b
important2a important2b
end
blahblahblahblahblahblahblah
</code></pre>
<p>What I want is to get an output like</p>
<pre><code>["'important1a', 'important1b'", "'important2a', 'i... | python | [7] |
1,401,366 | 1,401,367 | Valid value formats for android:padding? | <p>When writing xml files, I know following is working:</p>
<pre><code>android:padding="20px"
</code></pre>
<p>Are there other valid value formats available for <code>padding</code>? e.g.</p>
<pre><code>android:padding="10px 20px 10px 20px"
</code></pre>
| android | [4] |
379,488 | 379,489 | File uploading in asp.net? | <p>In web application [asp.net], when i am trying to upload a .doc file which is having 6 mb size, when i click ok button it is giving one empty tab in browser, where as when i upload small size .doc it is uploading, why it is like this, can you help me.</p>
| asp.net | [9] |
4,015,140 | 4,015,141 | Machine that can turn phone 90 degrees every few seconds? | <p>I want to detect memory leaks in my Android application. Some leaks could be detected while rotating the phone physically so that the activities are constantly recreated.</p>
<p>I'm looking of some sort of physical device that could turn the phone 90 degrees every X seconds. I could build something using lego Minds... | android | [4] |
5,601,559 | 5,601,560 | How do you simulate the press of a home button through terminal on a jailbroken iPhone? | <p>For iphone simulator , We can use AppleScript and can simulate the press of a home button through terminal. But for iphone, How do we can simulate the same?</p>
| iphone | [8] |
5,736,828 | 5,736,829 | Create Items via ECMA Script / JavaScript with SP.JS (CSOM) | <p>Im trying to create Items via ECMA Script & the client sided object model (CSOM).</p>
<p>Unfortunately I couldnt find an answer yet, can you tell me how to create it?
I want to translate this function to the CSOM world :</p>
<pre><code> function Create_Hyperlink(address, description, comment) {
var URL = a... | javascript | [3] |
3,590,637 | 3,590,638 | How to Add recurring events programatically? | <p>i am developing an application for adding events to calendar. i am using following code to insert recurring event but it force closes the application with an error "java.lang.IllegalArgumentException: DTEND and DURATION cannot both be null for an event."</p>
<p>code:</p>
<pre><code> ContentValues event = new Co... | android | [4] |
787,513 | 787,514 | Retry Task Framework | <p>I have a number of situations where I need to retry a task n-times if it fails (sometimes with some form of back-off-before-retry logic). Generally, if an exception is thrown, the task should be retried up to the max-retry count.</p>
<p>I can easily write something to do this fairly generically, but not wanting to ... | java | [1] |
827,043 | 827,044 | How do you display data from two tables that are connected via an id? | <p>I have two tables with the following:</p>
<pre><code>table 1
sid, schedule, stime, splace, stourid
table 2
tourid, tourname
</code></pre>
<p>I want to display the <code>table 1</code> in a GridView, but with field <code>stourid</code> I want <code>tourname</code> from <code>table 2</code> to be displayed instead ... | asp.net | [9] |
4,678,690 | 4,678,691 | Import program in other folders with Python | <p>I want to import a Python program from 2 different folders:</p>
<ul>
<li><code>Prog1</code> from the path <code>/home/francis/docs/folder1/</code></li>
<li><code>Prog2</code> from the path <code>/home/francis/docs/folder2/</code></li>
</ul>
<p>How do I import these two Programs in my main program situated in <code... | python | [7] |
115,137 | 115,138 | One assembly spanning multiple files | <p>I know that 1 namespace can span multiple assemblies and also that 1 assembly can contain multiple namespaces.</p>
<p>However, what foxes me is how can one Assembly span multiple files. Is it done by simply creating the multiple assemblies with the same name in separate directories? Is that all there is to it?</p>
| c# | [0] |
2,099,205 | 2,099,206 | Make URL as an anchor tag in JavaScript? | <p>I am getting an URL as a input which I want to assign it to an anchor tag.</p>
<p>Suppose the URL is </p>
<pre><code>var url = "http://www.google.com";
</code></pre>
<p>I want to put this url like this</p>
<pre><code><a href="http://www.google.com">http://www.google.com</a>
</code></pre>
| javascript | [3] |
2,443,469 | 2,443,470 | Update Gridview on treeview node checked | <p>I need to update or filter the records in gridview, when I check a node in treeview <strong>without postback.</strong>
I tried placing the gridview in update panel and registered ASYNCPOSTBACKTRIGGER for treeviews NODECHECKCHANGED event, but still the postback occurs.</p>
<p>How can I solve this or any other approa... | asp.net | [9] |
4,941,696 | 4,941,697 | What is the use of a web.config file in asp.net? | <p>What is the use of a web.config file in asp.net?</p>
| asp.net | [9] |
1,522,874 | 1,522,875 | how to split a string with ',' | <p>I have an array of some parameters like:</p>
<pre><code>arr=['abc','xyz','how are you, I am good'];
</code></pre>
<p>I want a result like:</p>
<ol>
<li>abc</li>
<li>xyz</li>
<li>how are you, I am good </li>
</ol>
<p>Using javascript only.</p>
<p>I am explaining again something was wrong in last question.
Her... | javascript | [3] |
2,537,122 | 2,537,123 | C# as a very first language? | <p>Is it possible to learn C# as your first computer language without any knowledge of the other three languages it combines? </p>
<p>I learned objective-c without knowing c first, but assuming I know nothing of C# or any other language is it possible to learn as a first language? </p>
| c# | [0] |
2,569,388 | 2,569,389 | SMS listener, best way? | <p>I need to make application that will catch EVERY SINGLE SMS that phone receives, and forward that SMS to email adress. So, i'm wondering how to perform that - should I make that as service or as application? User should open the application only once, and forget that it's running on his phone.
I really don't know ho... | android | [4] |
5,903,960 | 5,903,961 | php inverted comma in a variable | <p>I am trying to assign a string to a variable like that</p>
<p><code>$start "<?xml version="1.0" encoding="utf-8"?>"</code></p>
<p>Its giving me error
PHP Parse error: syntax error, unexpected T_DNUMBER</p>
<p>I think its because I am inserting " between and also ?
How to solve this ?</p>
| php | [2] |
2,836,774 | 2,836,775 | Android: safe way to hide navigation spinner in ActionBar? | <p>I would like to show a spinner in my ActionBar, using <code>ActionBar.NAVIGATION_MODE_LIST</code>, but I would like it to hide/show based on some application context. I have found that I can remove it from the ActionBar with <code>getActionBar().setNavigationMode(-1)</code>, however I don't know if this is a good i... | android | [4] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.