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 |
|---|---|---|---|---|---|
5,135,176 | 5,135,177 | Asp.Net 4.0 gridview to show Display attribute value | <p>I have been displaying list of some class in gridview with AutoGenerateColumns = true.</p>
<p>The class has nearly 70+ properties.</p>
<p>Now I need to change the column header of the gridview. For example, class has property called "ProductName" but in the gridview I just need to show "Name".</p>
<p>One way is t... | asp.net | [9] |
870,321 | 870,322 | What does the abbreviation “ccb" stand for when used in stream reading | <p>I am not native English. I am often curious about variable's real meaning when it was named in shortening. I think that may help me to understand better of the code. For example, when overriding the operator, the lhs and rhs are often used. Once I was very exciting to find out that lhs means "left hand side" and rhs... | c# | [0] |
2,730,025 | 2,730,026 | HOWTO: Fix Python Indentation | <p>I have some python code that have inconsistent indentation, there is a lot of mixture of tabs and spaces to make the matter even worse even space indentation is not preserve. The code works as expected but its difficult to maintain.</p>
<p>I'm looking for a tool that will fix the indentation (like html tidy but for... | python | [7] |
5,746,184 | 5,746,185 | PHP Variable not working the way I am sure it worked before | <p>Hi there I hope someone can help me</p>
<p>I have this variable</p>
<pre><code>var $page_slug = "posts";
</code></pre>
<p>and want to make insert a dynamic value into the "posts" section but for some reason I keep getting an error that the code is not formatted correctly?</p>
<pre><code>var $page_slug = $_SERVER... | php | [2] |
2,554,707 | 2,554,708 | How do i Get Classes name of classes in entire solution in c# | <pre><code>ProcessStartInfo info = new ProcessStartInfo(@"D:\\ss\\Class1.cs");
</code></pre>
<p>i have a this type of code but i want to get "class name" like how many classes in my solution code will count the no of class and get the name by code in c#.</p>
| c# | [0] |
1,454,750 | 1,454,751 | Check for an empty map | <p>I'm having an interesting issue that I'm sure is easily explained, but the explanation is eluding me.</p>
<p>An undefined or null object in javascript is equal to false.
</p>
<pre><code>var x;
alert(!x); //returns true
alert(x==true); //returns false
</code></pre>
<p>What about an empty array object? Is that the ... | javascript | [3] |
4,317,128 | 4,317,129 | iPhone: Handle action event from webview page | <p>I am loading a html page using loadHTMLString.</p>
<pre><code>[myWebview loadHTMLString:myHtmlStr baseURL:nil];
</code></pre>
<p>Its loading properly. In this html web page, i'm also adding buttons, drop down(with selection) etc. I want to catch the action events in my code now for these web page controls. For exa... | iphone | [8] |
2,463,962 | 2,463,963 | similar functionality like uitableview in iphone to in android? | <p>can anybody please give me example of using similar functionality like uitableview in iphone to in android?</p>
| android | [4] |
2,868,392 | 2,868,393 | How do I get the return value of DispatcherOperation inside the callback | <p>I am subscribing to DispatcherOperation's Completed event when the delegate finishes processing. Can any one please tell me how to get the value returned by the delegate inside the Completed event handler. I think it is only possible to not to block the main thread by accepting the return value inside the Completed ... | c# | [0] |
1,368,177 | 1,368,178 | Android emulator crash on Mac osx 10.7 lion, causing kernel panic | <p>I am using Android emulator with an intel x86 based image for version 2.3 and developing on a Mac 10.7 lion system.
I have also installed intel hardware execution manager due to which the emulator runs at faster speed than normal. However while using the emulator it crashes randomly causing a kernel panic.
This happ... | android | [4] |
2,382,316 | 2,382,317 | How to find all image tags using Regular Expressions | <p>I need to find all the image html tags that are included in a page using PHP regular expressions</p>
<p>Example</p>
<pre><code><img src="images/image.jpg" />
</code></pre>
<p>My code</p>
<pre><code>preg_match('/<img src=\"images\/.*/',$tags,$matches);
</code></pre>
<p>The strange thing is it only finds... | php | [2] |
2,626,838 | 2,626,839 | I need to validate a checkbox | <p>this is my code:</p>
<pre><code><script>
function validate(form) {
fail = validate_department(form);
if (fail == "") {
return true;
} else {
alert(fail);
return false;
}
}
</script>
<script>
function vali... | javascript | [3] |
5,664,248 | 5,664,249 | Adjusting 1 space between two strings using python | <p>I have two strings:</p>
<pre><code>>>> a = "abcd"
>>> b = "xyz"
>>> c = a + b
>>> c
abcdxyz
</code></pre>
<p>How can I get <code>abcd xyz</code> as a result instead when adding <code>a</code> and <code>b</code>?</p>
| python | [7] |
798,360 | 798,361 | Try/Catch block in PHP not catching Exception | <p>I am trying to run Example #1 from this page: <a href="http://php.net/manual/en/language.exceptions.php" rel="nofollow">http://php.net/manual/en/language.exceptions.php</a></p>
<p>However instead of the desired output I get:</p>
<pre><code>0.2
Fatal error: Uncaught exception 'Exception' with message 'Division by z... | php | [2] |
5,330,839 | 5,330,840 | PHP syntax for variable number of parameters to be passed to function pointer | <p>May I ask is there a PHP way to write a variable number of parameters to a function pointer?</p>
<p>For example (psuedocode)</p>
<pre><code>$args = $request->get_args(); // get an array of arguments
$request->$func_pointer(foreach $args write $arg);
</code></pre>
<p>My objective is to allow the API user to ... | php | [2] |
5,459,247 | 5,459,248 | 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] |
4,818,535 | 4,818,536 | android converting code java to android | <p>I want to convert this line into Android.</p>
<pre><code>BufferedImage input=new BufferedImage();
WritableRaster raster=input.getRaster();
</code></pre>
<p>Thank you.</p>
| android | [4] |
5,910,091 | 5,910,092 | Blocking access to Application When User leaves the company | <p>I am building an app which will be distributed using enterprise distribution.So we need to disable the app whenever the user leaves the company.
I can have a web service through which I can check the status of user.
What would be a nice way to disable the app.Should I stop loading my root view or should I present a ... | iphone | [8] |
1,741,624 | 1,741,625 | Peer to peer chat application in php | <p>I am new to PHP, I need some information about how to develop peer to peer chat for the organization.
What are the things I need to do?</p>
<p>Where do I need to store the chatting information? </p>
<p>Could you please give some suggestions on this? </p>
| php | [2] |
4,380,140 | 4,380,141 | Using not defined variable in function body | <p>There is this code:</p>
<pre><code>def f():
x = m
m = 2
def g():
x = m
f() # UnboundLocalError: local variable 'm' referenced before assignment
g() # NameError: global name 'm' is not defined
</code></pre>
<p>In both function bodies there is used variable <code>m</code> which is not defined when used but... | python | [7] |
5,633,248 | 5,633,249 | Control amount of scroll in browser, jQuery | <p>Is there a way to control the amount that the browser is scrolled in jquery? For example, if I wanted to add content to the bottom of a page and have it always be at the bottom, with everything else scrolling up (like a terminal)</p>
| jquery | [5] |
1,208,554 | 1,208,555 | Understanding prototyping and augmentation | <p>I have a <a href="http://jsfiddle.net/zcWQ8/1/" rel="nofollow">fiddle</a> to help me in my understanding of JavaScript prototyping and inheritance. The comments tell the story. </p>
<pre><code>//From Douglas Crockford's "Javascript: the good parts": a helper to hide the "ugliness" of setting up a prototype
Funct... | javascript | [3] |
521,103 | 521,104 | PHP Parsing Conundrum - "Missing Symbols Listed" | <p>I am trying to access the Yahoo site by getting Stock quotes:</p>
<pre><code>http://de.finance.yahoo.com/d/quotes.csv?s=^DJI&f=nsl1op&e=.csv
</code></pre>
<p>and it doesn't seem to be downloading any data. I get "Missing Symbols Listed.". Weird b/c this used to work!</p>
<pre><code><?php
function mar... | php | [2] |
5,876,687 | 5,876,688 | Android Opengl-es make transparent background on a texture, how? | <p>I have a texture with a black background. </p>
<p>I d like to make a pixel color key transparency. </p>
<p>My picture is a png file, but the background is not transparent, it is a BLACK(or red or yellow, etc) color.</p>
<p>How can i draw that texture without my background? </p>
<p>this code not work:</p>
<pre><... | android | [4] |
5,770,586 | 5,770,587 | What class parameter type should should be passed for variable arg Object array | <p>If I have to pass an Object... var arguments parameter as input to the <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/reflect/Method.html#invoke%28java.lang.Object,%20java.lang.Object...%29" rel="nofollow">Method.invoke</a> call, what should I specify as the parameter type for the <a href="http:... | java | [1] |
2,600,871 | 2,600,872 | javascript array within an array error | <p>Hey Guys my goal for this multi dimensional array is to document the answers (right or wrong) for a test that the user is taking. In the beginning the test array is set up. as the user goes throught the questions the app should add to the array. Note: the page doesnt reload, the questions come via ajax.</p>
<p>Here... | javascript | [3] |
3,892,571 | 3,892,572 | Script disable in text boxes | <p>How can I prevent a script from executing in text boxes, by using jQuery?</p>
<p>Here is my complete problem:</p>
<p>I want to send a message to someone using jQuery; if I entered a script tags like <code>a</code>, <code>href</code>, <code>script</code>, etc. they are not appearing in the other's message. How ca... | jquery | [5] |
1,456,342 | 1,456,343 | What's the preferred operator when comparing indexOf result with -1, "!=" or ">"? | <p>What's the preferred operator when comparing the result of indexOf with -1, "!=" or ">"? Is there any difference?</p>
| javascript | [3] |
3,482,312 | 3,482,313 | Android Getspeed using maps | <p>i am implementing <code>getspeed</code> to get speed of the device while moving in phone.why <code>getSpeed()</code> always <code>return 0</code> on android ..?..i am using gps to get coordinates.</p>
<pre><code>if(location.hasSpeed() == true)
{
Toast.makeText(ProxAlertActivity.this, "Speed:"+ location.getSpeed... | android | [4] |
1,299,575 | 1,299,576 | what is the meaning of word this near the property in JavaScript | <p>Hello I'm a newcomerin JavaScript language.
I started to see some examples of JavaScript code.</p>
<p>and i cant understand the following code segment:</p>
<pre><code>function Employee(name,salary)
{
this.name=name;
this.salary=salary;
this.paycheck=function()
{
var monthly=this.salary/12;
document... | javascript | [3] |
496,347 | 496,348 | how to hide console window of another executable? | <p>Our C# application will launch a console application executable by doing this: <code>Process correctionProcess = Process.Start(exePath, rawDataFileName);</code></p>
<p>Customer wants to hide that console window which is from their application. Is that possible for us to do that?</p>
| c# | [0] |
2,563,013 | 2,563,014 | Java - try & catch in calling methods | <p>I have a basic question in Java:</p>
<p>I have two methods: <code>functionA</code> & <code>functionB</code>. <code>functionA</code> calls <code>functionB</code>, and <code>functionB</code> rise an exception. The call to <code>functionB</code> is in try scope of <code>functionA</code>.</p>
<p>Now I also want th... | java | [1] |
4,065,953 | 4,065,954 | Saving Information For The Duration The User Has A Site open | <p>How woulld I set this up:</p>
<p>I wanna save what links a user clicks on in a website. I thought of creating a jquery function that would save the link name everytime a link is clicked , then ajax the info to the db after the user closes the site.</p>
<p>Does that sound like a proper way. Anyone have samples of t... | asp.net | [9] |
3,170,098 | 3,170,099 | How to get cursor position (x,y) in EditText android | <p>I have ploblem:get cursor position x,y in EditText android?
You can help me?</p>
| android | [4] |
3,771,055 | 3,771,056 | Searching Outlook Global Address List | <p>I'm pulling up the Global Address List from Outlook like so...</p>
<pre><code> Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application();
AddressList gal = oApp.Session.GetGlobalAddressList();
</code></pre>
<p>...with the aim of eventually being able to search through ... | c# | [0] |
3,524,904 | 3,524,905 | Creating a list of links | <p>I want to create a PHP file that checks the current directory for any files ending in .jpg, and then I want to generate a page of links to all of those files.</p>
<pre><code><?php
$files = glob("./*.jpg");
if ($files) {
foreach ($files as $file) {
?>
<a href=<?php echo $file;?>"></a>
<?... | php | [2] |
6,016,942 | 6,016,943 | which method in ASP.NET life-cycle is only called once? It is not fired during postback | <p>Can we avoid using</p>
<p>If (!Postback) {.....code runs once....} </p>
<p>in Page_load()</p>
| asp.net | [9] |
855,607 | 855,608 | How can I tell what events are bound to an object? | <p>I am using jqGrid (<a href="http://www.trirand.com/blog/" rel="nofollow">http://www.trirand.com/blog/</a>) to display some read-only data. The resizeable columns are interfering with other draggable elements on the page (they get stuck when dragged over the region where the columns can be resized).</p>
<p>I want t... | jquery | [5] |
5,076,912 | 5,076,913 | Why do I get: Invalid Syntax | <p>I am getting invalid syntax on the following:</p>
<pre><code>rootdir = 'c://temp/test//files//'
for subdir, dirs, files in os.walk(rootdir):
for file in files:
fileParts = file.split('.')
if len(fileParts) > 1:
stripper = fileParts([len(fileParts)-2]
print(stripper)
</... | python | [7] |
3,517,113 | 3,517,114 | Python's __getattr__ in Javascript | <p>Is there a way to simulate Python's <code>__getattr__</code> method in Javascript?</p>
<p>I want to intercept 'gets' and 'sets' of Javascript object's properties.</p>
<p>In Python I can write the following:</p>
<pre><code>class A:
def __getattr__(self, key):
return key
a = A()
print( a.b )
</code></p... | javascript | [3] |
3,901,427 | 3,901,428 | JavaScript enumerator? | <p>I want to define a list of constants that have continuous integer value, for example: </p>
<pre><code>var config.type = {"RED": 0, "BLUE" : 1, "YELLO" : 2};
</code></pre>
<p>But it's boring to add a <code>"XX" : y</code> every time I need to add a new element in it.<br>
So I'm wondering is there something like ... | javascript | [3] |
2,118,256 | 2,118,257 | How to Create Custom Tab In Android Application | <p>thanks advance..</p>
<p>when i create custom tab in android application so no one tab display in main screen</p>
<p>how to solve this problem please any one tell me?</p>
| android | [4] |
3,838,097 | 3,838,098 | Trying to get the width of an h1 tag with Javascript | <pre><code><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org /TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</tit... | javascript | [3] |
3,283,163 | 3,283,164 | How can I "get" the return value of a function? | <p>What is the syntax to find out in method2 whether method1 one returned true or false?</p>
<pre><code>class myClass{
public function method1($arg1, $arg2, $arg3){
if(($arg1 + $arg2 + $arg3) == 15){
return true;
}else{
return false;
}
}
public function method2(){
// how to find out if method1 ... | php | [2] |
3,715,202 | 3,715,203 | c# messenger, send commands over network, protocol? | <p>I'm making a c# messenger application just for fun, but I wanna do it good.
I want the possibility to send commands like a chat message, kick comand etc, but i dont know a good way to control it.</p>
<p>I could send an object over the networkstream, or I could send a string like: stream.write("command##");</p>
<p>... | c# | [0] |
1,163,716 | 1,163,717 | What can be used instead of tooltip in iphone app? | <p>What can be used instead of tooltip in iphone app?</p>
<p>Best alternative of tooltip in touch screen systems?</p>
| iphone | [8] |
113,874 | 113,875 | size of Two-dimensional arrays in Java | <p>I want to make a loop on Two-dimensional array in Java.</p>
<p>How I do that? I wrote:</p>
<pre><code> for (int i = 0; i<=albums.size() - 1; i++){
for (int j = 0; j<=albums.size() - 1; j++){
</code></pre>
<p>But it didn't work. Thanks.</p>
| java | [1] |
3,728,938 | 3,728,939 | Conceptual Question About Java Concurrency | <p>If I I have a class whose run() method sleeps for 1000 ms and then print "Thread". And I start this thread from my main program, then have my main program immediately sleep for 2000 ms, and then print "Main Thread".</p>
<p>Is it guaranteed that Thread will be printed before Main Thread?</p>
| java | [1] |
3,283,072 | 3,283,073 | inet_pton not working | <p>I am trying to use to turn an IP address into a numerical string for mysql storage using the inet_pton() in the PHP code, yet this function either returns nothing or this: '�?i'
NOTE: The IP address is a standard IPv4 (and not my localhost)</p>
<p>My code is: echo inet_pton($_SERVER['REMOTE_ADDR']);</p>
| php | [2] |
3,311,261 | 3,311,262 | points aren't aligned with the x axis on flot chart | <p>I've got flot data where the points on the xaxis aren't aligned with the lines. </p>
<p>specifically, take a look at this photo:<img src="http://i.stack.imgur.com/NLKKJ.png" alt="flot chart"></p>
<p>this is the raw data that I'm using:</p>
<pre><code>[0] : [1327305600000,1989],
[1] : [1327392000000,3222.33333333... | javascript | [3] |
1,348,757 | 1,348,758 | How to iterate over all input hidden values using $.each | <p>I want to do something with each hidden input value, so I coded the following javascript using <a href="http://api.jquery.com/jQuery.each/" rel="nofollow">jQuery</a>.</p>
<pre><code>$.each($("input[type='hidden']"), function (index, value) {
alert(value.val());
});
</code></pre>
<p>But I get he following execu... | jquery | [5] |
1,275,893 | 1,275,894 | String present in Data Table or not in c# | <p>I want to find the specific string in specific column of data table so that it is present or not in all rows</p>
| c# | [0] |
1,301,953 | 1,301,954 | Method inside Object undefined? | <p>I'm still learning how to use Javascript properly and have got stuck trying to set an interval on a function which is inside an object.</p>
<p>Here is my code: </p>
<p><a href="http://pastebin.com/hJAtaqKi" rel="nofollow">http://pastebin.com/hJAtaqKi</a></p>
<p>On line 36 I am calling the function which is furthe... | javascript | [3] |
3,770,771 | 3,770,772 | sign in view controller , iphone | <p>I have 2 text fields, one is for usrname and the other one is for password. </p>
<p><strong>Question</strong> : after entering a username and hit next from the keyboard, how can I jump to the password field for typing a password..</p>
<p>Any comments are welcomed here.</p>
| iphone | [8] |
394,498 | 394,499 | Managing bidirectional associations in my java model | <p>I have a java model where the classes have associations (1 to 1, 1 to n, n to n) that should work in both directions.</p>
<p>Example:
class A has a collection of class B</p>
<p>All instances of B must know, who their parent (A) is. If I change the parent property of B, the association needs to be updated on the ot... | java | [1] |
210,714 | 210,715 | What does this statement mean in Java? | <p>Suppose there is an array declaration:</p>
<pre><code>int [] a = new int[3];
</code></pre>
<p>I'm reading a book that says the reason we need to explicitly create arrays at runtime is because we cannot know how much space to reserve for the array at compile time. So, in this case above don't we know we need to r... | java | [1] |
836,404 | 836,405 | Using multiple forms and passing information between them | <p>I've been messing around with Android development.</p>
<p>I made a simple form that has two fields for numbers, and when you press the Calculate button, it multiplies them. </p>
<p>What I would like to do is when I press Calculate to open another form, and pass that multiplied number to it to display it.</p>
<p>I... | android | [4] |
1,018,580 | 1,018,581 | mvc is not working on my host | <p>I`m using PDO databaseconnect
PHP programming with classes and objects in a MVC-model.</p>
<p>i made a website that works 100% on my own localhost
but when i uploaded it to my host (and ofcourse changed the database connection data),
it didn`t work. the html i include in my view.php(MVC) is not been added to the p... | php | [2] |
4,859,351 | 4,859,352 | PayPal Returns empty response | <p>I am using PayPal in my site. Found that when we run the papal in the local server it is giving the correct response codes but the problem is when my site has been to production server the response received from the papal is empty(sometimes).</p>
<p>These empty responses are occurring only in production site.</p>
... | asp.net | [9] |
5,962,297 | 5,962,298 | How to post a photos on facebook through iPhone app? | <p>I am trying to post image on facebook but not successful yet,
my codes are:</p>
<pre><code>- (void)postToWall{
int im = 1;
NSData *myimgData;
myimgData = [NSData dataWithContentsOfFile:saveImagePath];
//pstimg = myimgData;
NSArray *chunks = [pstimg componentsSeparatedByString: @"."];
NSString *atch= [chunks objec... | iphone | [8] |
2,734,896 | 2,734,897 | Java input parameter from text file | <p>I want to know how I can get data from a text file to a java program from the command line. I am using windows.</p>
<p>I used </p>
<pre><code>Java myprogram < c:\inputfile.txt
</code></pre>
<p>it doesn't work, but when I used </p>
<pre><code>Java myprogram good
</code></pre>
<p>it works. 'good' is the word t... | java | [1] |
4,714,773 | 4,714,774 | Reading from comma or tab delimited text file | <p>I need to read the data from a file that can be either comma or tab delimited. I now that there is a function getcsv but it accepts only one possible delimiter.</p>
<p>Any ideas how to handle this?</p>
<p>Thanks.</p>
| php | [2] |
1,572,072 | 1,572,073 | Visible false of button in gridivew while data binding? In Asp.net? | <p>In web application, i am going to disable the button while binding data, is it possible visibling false like this? </p>
<pre><code> <asp:Button ID ="btn" runat ="server" CommandArgument='<%# Eval("id").ToString() == "1"? visble false: Visible true %>' />
</code></pre>
<p>can you help me. Thank you.</... | asp.net | [9] |
3,013,564 | 3,013,565 | Visual studio 2008 release build : application crashes on basic string or basic pointer operations | <p>I have a application compiled in Visual studio 2008,which runs fine in debug build. In release build , the application crashes when std::wstring assignment is done or when shared pointer is accessed. Any idea why this happens in release build.
crash at :
eg: m_name = name; //m_name and name are of type std::wstring... | c++ | [6] |
4,195,322 | 4,195,323 | ASP.NET Cannot initiate instance object of a Class I created | <p>So I created a class file Persons to my website project and placed this in a folder called <code>App_Code</code>.</p>
<p>But now in my <code>default.aspx.cs</code> I cannot seem to create i.e. <code>Persons test = new Persons();</code></p>
<p>Says </p>
<blockquote>
<p>Type or Namespace Persons not found</p>
</b... | asp.net | [9] |
3,750,713 | 3,750,714 | nl2br doesn't work with text from the database | <p>I try this:</p>
<pre><code>echo nl2br($row['content']);
</code></pre>
<p>But what I get is:</p>
<blockquote>
<p>Hello everybody\n Good luck!</p>
</blockquote>
<p>Why doesn't it convert the <code>\n</code>? the database is storing data as UTF-8.</p>
<p>In addition, I check it with a test string, and found out ... | php | [2] |
4,179,902 | 4,179,903 | Get the north pole , South Pole. using TYPE_MAGNETIC_FIELD or TYPE_GYROSCOPE | <p>Actually i need to get the device current position. like device is in south-west corner or device is in north-west corner. just like compass. I do not have any idea how can i get this done. I think i need to use sensor with type TYPE_MAGNETIC_FIELD. Please guide. </p>
| android | [4] |
2,569,159 | 2,569,160 | JQuery extract subdomain and pass to a variable | <p>I need to extract a sub domain and pass to a variable to then add into a url so that a link will work on a number of different environments</p>
| jquery | [5] |
2,949,772 | 2,949,773 | Converting to double is giving not accurate number | <p>Convert.ToDouble is adding zeros and 1 like in this picture:</p>
<p><img src="http://i.stack.imgur.com/la7QD.png" alt="enter image description here"></p>
<p>Why it is turning from 21.62 to 21.620000000000001 ?
Is this about floating point issue?</p>
| c# | [0] |
4,841,389 | 4,841,390 | limiting number of letters for registering a new user name | <p>I have a forum and visitors can register user names with more than 20 letters, how can I deny those visitors to register with a (long) user names?</p>
<p>the registration form is using PHP language.</p>
<p>thanks,</p>
| php | [2] |
355,392 | 355,393 | Doesn't search any discoverable devices | <p>Can any one describe what is wrong with this code. It didn't search devices, and it showed some paired devices. </p>
<p>Project hosted <a href="https://github.com/luugiathuy/Remote-Bluetooth-Android/tree/master/RemoteBluetooth" rel="nofollow">here</a> in Github.</p>
| android | [4] |
106,041 | 106,042 | List adapter display text vs. saved text | <p>what I have now is a listView with 3 items in it: Audience, Choosing topics, and Interviewing strategies. I want to be able to save these items as strings to open url with associated item name in the path, but the problem comes when the path has a different item name than the one I have in the listview items; we hav... | android | [4] |
2,729,244 | 2,729,245 | Pulling an array from resource file to populate list in android | <p>I'm working through the listbox building example and wanted to alter it to pull an array from the arrays file (going on the separation of code and data thing)</p>
<p>So instead of declaring the array within the class like so</p>
<pre><code>private static final String[] items={"A", "B", "C","D", "E", "F"};
</code><... | android | [4] |
3,212,774 | 3,212,775 | Add Project Reference vs Add DLL Reference | <p>I am newbie in .net.Today I have created a sample. In that sample, I have stored data in database using N Tier architecture. If I want to use to Use BL or DAL method in other project(I mean BL method in UI or DAL method in BL), I found two ways.</p>
<p><strong>First one is</strong> - Right click on project <<... | asp.net | [9] |
304,654 | 304,655 | Moving text in tableview cell iphone | <p>I have table view cells with cell image and text label and detailed label.
Problem is cell image is too near to edge of cell(to the left). I want to put some space between edge and cell image. i.e. wants to move image bit away from corner. I have moved that with creating subview and putting image in that. But probl... | iphone | [8] |
1,318,129 | 1,318,130 | Expand text field when text gets close to the end | <p>I want to make the textfield expand when the text nearly gets to the end, it works but when i type the first letter in it shrinks and then it expands </p>
<p>i.e <a href="http://jsfiddle.net/Y3rMM/" rel="nofollow">http://jsfiddle.net/Y3rMM/</a></p>
<p>How can i keep the textfield the same size until it reaches the... | jquery | [5] |
5,085,664 | 5,085,665 | Extending Linenarlayout height | <p>I have problem in displaying content in Linearlayout,how to extend layout height.when large number layout used for displaying content..</p>
| android | [4] |
5,940,422 | 5,940,423 | How to convert .live to .on in jQuery | <p>I want to convert <code>.live</code> to <code>.on</code> method as <code>.live</code> is not used much but I am not able to convert it. Please help me to change it.</p>
<pre><code>$(".delete").live('click', function () {
var id = $(this).attr('id');
var b = $(this).parent().parent();
var dataString = 'i... | jquery | [5] |
5,303,805 | 5,303,806 | I cam I execute mysql functions eg $=mysql_num_raws($result) on $result on wampp? On Xampp I am doing fine | <pre><code>function exesql($database,$database_user,$data_password,$sql)//returns result of execution of a suplied sql
{
$con = mysql_connect("localhost",$database_user,$data_password);
mysql_select_db($database,$con);
$result = mysql_query($sql);
mysql_close($con);
return $r... | php | [2] |
822,871 | 822,872 | Unable to build Eclipse library projects after ADT update | <p>I have a main project (mainapp) I am developing for Android under Eclipse. It uses the facebook-android-sdk library (fblib) which is a separate Eclipse project with it's project properties checked as "Library". Under the project properties > android section for mainapp, I have fblib added as a library. everything wo... | android | [4] |
5,420,409 | 5,420,410 | Can I add a variable value to a passed function parameter in php? | <p>I have the following variable:</p>
<pre><code>$argument = 'blue widget';
</code></pre>
<p>Which I pass in the following function:</p>
<pre><code>widgets($argument);
</code></pre>
<p>The widgets function has two variables in it:</p>
<pre><code>$price = '5';
$demand ='low';
</code></pre>
<p>My questions is how c... | php | [2] |
5,617,478 | 5,617,479 | Android: How do I get file's last modification date? | <p>The application need write file's last modification date.</p>
<pre><code> void Dater(String DateFile) {
File file = new File(DateFile);
if(file.exists()){
Long lastModified = file.lastModified();
Date date = new Date(lastModified);
textView2.setText(Stri... | android | [4] |
4,481,964 | 4,481,965 | Remove curly bracket from a string | <p>I have a string as :</p>
<pre><code> $string={"name":"simon","age":"23"}
</code></pre>
<p>I want to remove the curly bracket from the string.Output should be like this :</p>
<pre><code>$string="name":"simon","age":"24"
</code></pre>
| php | [2] |
5,003,672 | 5,003,673 | Tree panel error in extjs4 | <p>In ExtJS4, a tree panel was created with Ext.tree.Panel. When it is clicked multiple times (around 8 to 16) to expand or collapse the tree nodes, It gives error 'event' is null or not an object at line 10708 of ext-all-debug.js. On each click it creats another node below the clicked one. This problem is seen only in... | javascript | [3] |
684,419 | 684,420 | weird php behaviour with classes and static methods | <p>I maintain an application that uses a (to me) surprising PHP quirk/bug/feature. Consider this code:</p>
<pre><code><?php
class Bar {
// called statically
public function doStuff() {
print_r($this);
}
}
class Foo {
public function main() {
Bar::doStuff();
}
}
$foo = new Foo()... | php | [2] |
3,446,955 | 3,446,956 | Android drawable folders clarification | <p>I got images prepared for 7 inch and 10 inch tablets now i want to put them into corresponding drawable folder.I have searched some sources and got some information that both 7inch and 10inch tablets densities are <strong>mdpi</strong>. I can't put both images of different resolution on the same mdpi folder.Can anyb... | android | [4] |
4,204,134 | 4,204,135 | How should I be reading this code? | <p>So I'm trying to read this legacy code - am I reading this wrong, or is the code repeating itself multiple times? It seems like it is assigning $cuid multiple different times in multiple different ways - is it getting different values somehow? The only two ways I can see are via cookie and via GET request.</p>
<pre... | php | [2] |
5,355,970 | 5,355,971 | Emulate Array Objects | <p>Question from Object-Oriented JavaScript book: <strong>Imagine Array() doesn't exist and the array literal notation doesn't exist either. Create a constructor called MyArray() that behaves as close to Array() as possible.</strong></p>
<p>I thought it would be a good challenge to test my skills. This is what I came ... | javascript | [3] |
1,842,120 | 1,842,121 | How to iterate on GridLayout cells? | <p>I would like to iterate programmatically over a GridLayout cells, the iteration should be applied on the layout bounds, where each cell contains an ImageButton, i understand that the layout is a mix of LinearLayout and TableLayout.</p>
<p>Is there a way to iterate over the GridLayout cells?</p>
<p>Or, what is the ... | android | [4] |
2,326,298 | 2,326,299 | Cannot understand how add operation works on decimal numbers in javascript | <p>I have always been coding in java and have recently started coding in javascript (node.js to be precise). One thing that's driving me crazy is add operation on decimal numbers;</p>
<p>Consider the following code</p>
<pre><code>var a=0.1, b=0.2, c=0.3;
var op1 = (a+b)+c;
var op2 = (b+c)+a;
</code></pre>
<p>To my a... | javascript | [3] |
5,430,687 | 5,430,688 | Ajaxify not working? | <p>So I have the latest jQuery loaded. I've loaded Ajaxify. I gave the links the class of ajaxify and a target, but nothing happens?? I just don't know where to look anymore. Any suggestions? <a href="http://www.heinesiebrand.nl/demo/" rel="nofollow">Here's the link with source</a>.</p>
<p>Is it maybe because of Wordp... | jquery | [5] |
4,463,296 | 4,463,297 | image is to be aligned in right of a long text | <p>I have a long single text and image, and I have to align image to the left of text in a way like text is wrapping the image means when image height finished then text should start from left like there is no image problem is that blank space of image width is left through out the screen in the left side. how to break... | android | [4] |
5,367,022 | 5,367,023 | Conditionally trigger a full page postback from a link button inside an update panel | <p>How do I conditionally trigger a full page postback from a link button inside of an update panel?</p>
<p>I have a custom control that contains its own updatepanel with a link button nested inside of it. When the link button is pressed I want its event handler to have the option of either letting the control update... | asp.net | [9] |
5,684,350 | 5,684,351 | How to create a new activity and then display text in it with android programming | <p>I managed to have a button and then when I click on it, I go to a new activity that is called "TUTORIALONE"</p>
<p>and then I want to display some text in this new activity</p>
<p>so I have something like this</p>
<pre><code> Button b = (Button) findViewById(R.id.tutorial1);
b.setOnClickListener(new Vie... | android | [4] |
4,027,159 | 4,027,160 | CALL_PHONE vs CALL_PHONE_PRIVLEGED | <p>What is difference between permissions CALL_PHONE and CALL_PHONE_PRIVLEGED. After reading there definitions it appears they do more or less the same things.</p>
<p>CALL_PHONE: Allows an application to initiate a phone call without going through the Dialer user interface for the user to confirm the call being plac... | android | [4] |
2,394,999 | 2,395,000 | Android - Share browser url to app | <p>I am writing an app for a community, which has the ability to share URLs.</p>
<p>In the android browser, there is the possibility to forward URLs, for example from my HTC Desire to a BlueTooth Target, to Facebook, to Friend Stream, to Google Mail, to Google+, Mail, SMS and Peep. What I want to achive is to add my a... | android | [4] |
6,002,312 | 6,002,313 | Change background color when slideToggle back? | <p>When I click on a element to slideToggle some other elements, I also change the background color of the element that I clicked on to indicate that this is the selected. But how do I remove the background color when I click and slideToggle back the elements?</p>
<pre><code>$(".c756:eq(0)").click(function(){
$(".... | jquery | [5] |
2,501,079 | 2,501,080 | Jquery failing to detect change in select in IE7&8 but works in FF | <p>I can get this to run in IE9 and FF but does not work in IE7&8 can anybody point me in the right direction. Any ideas what to look out for?</p>
<p>JQuery</p>
<p></p>
<pre><code>$(document).ready(function() {
$('#page').change(function(){
alert('--not-calling-in-IE8-or-IE7-Mode-Works-Fine-In-FF... | jquery | [5] |
665,892 | 665,893 | Implementation of barrier in Java | <p>How can a barrier be implemented <strong>with semaphores</strong> in Java. Will the following pseudo code work? How can it be written using java Semaphore class.</p>
<p><code>N</code> is the number of threads to be waited for at the barrier.
<code>EveryoneHasReachedBarrier</code> is a conditional variable.</p>
<pr... | java | [1] |
3,478,529 | 3,478,530 | unset session php | <p>According to the manual "Do NOT unset the whole $_SESSION with unset($_SESSION) as this will <strong>disable the registering of session variables</strong> through the $_SESSION superglobal."</p>
<pre><code><?php
session_start();
$_SESSION['name'] = 'my_name';
unset($_SESSION);
echo $_SESSION['test'] = 'ok';
<... | php | [2] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.