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,541,487
2,541,488
Testing if either of two condtions are true
<p>I'm trying to test if either of two variables are true using the code below, but I the code always returns the true conditions even when the variable is blank. Have I done this correctly or is it possible the variables are always true?</p> <p>Thanks in advance for your help.</p> <pre><code>&lt;?php if (($gogo_tea...
php
[2]
3,557,171
3,557,172
How do I access javascript functions in the "object Window"
<p>I feel silly asking this in such a crude way, but in Firebug I see my current object (this) and below that a line then, "object Window," where the global namespaces seem to live (e.g., there's a <code>$</code> object, <code>jQuery</code> object ...). I have an object I created called "g" with a function called "Upda...
javascript
[3]
5,569,858
5,569,859
Android help in voice recognition!
<p>Hey I need some help with an app.What I want is to record a sound(word...) from the MIC ,name it and save it to a list in two rows,one containing the name of the recording and the other the sound. I'm new to android so if u can give me some code to start with,an example,anyting please.</p> <p>Misu</p>
android
[4]
3,121,065
3,121,066
Add some logo to all images in folder
<p>Can I add a logo to all my images which are in the <code>Images</code> folder? If yes, how can I place the logo at the bottom left of the image?</p> <p>On this picture you can see <code>cinepicks.com</code> in the middle of the picture. I want a logo on the bottom left of a picture and I want to do this only with P...
php
[2]
2,972,031
2,972,032
Difficulty with making a header file for C++
<p>I'm trying to make a header file called <strong>hippiewh</strong>. However, I have been running into some problems. </p> <p>here's the code for the header file:</p> <pre><code>#include &lt;iostream&gt; #include &lt;string&gt; using namespace std; #ifndef hippiewh_h #define hippiewh_h int askInt(string prompt) { ...
c++
[6]
1,457,356
1,457,357
How to specify a PHP version when using "php" command
<p>I have a server which have both PHP 5.2 and 5.3 on it, default version is 5.2 and whenever i uses command "php" it takes the 5.2 version. Is there any way i can specify the version while running command? php -v only display the version.</p> <p>For application i use .htaccess to set version, like <code>AddHandler...
php
[2]
259,206
259,207
How to get a date for a day in current week
<p>i need to set alarm for monday , Saturday ,friday etc... on every week repeatedly. </p>
iphone
[8]
4,705,466
4,705,467
How to remove multiple line breaks from RSS feed?
<p>How to remove multiple <code>&lt;br&gt;</code> tags from a RSS feed? I tried those two but it doesn't make any change.</p> <pre><code>str_replace("&lt;br/&gt;&lt;br/&gt;","&amp;",$entry-&gt;description); str_replace("&lt;br&gt;&lt;br&gt;","&amp;",$entry-&gt;description); str_replace("&amp;lt;br/&amp;gt;&amp;lt;br...
php
[2]
3,510,706
3,510,707
Where would I use a bitwise operator in JavaScript?
<p>I've read <strong><a href="http://stackoverflow.com/questions/276706/what-are-bitwise-operators">this</a></strong> (<a href="http://stackoverflow.com/questions/276706/what-are-bitwise-operators">http://stackoverflow.com/quest...</a>), so I know <strong>what</strong> bitwise operators are but I'm still not clear on h...
javascript
[3]
3,553,099
3,553,100
What is Page.LoadComplete meant for (in practice)
<p>In the ASP.NET <a href="http://msdn.microsoft.com/en-us/library/ms178472.aspx" rel="nofollow" title="MSDN Link">Page LifeCycle</a> there is the Page.LoadComplete event.</p> <p>The MSDN documentation says 'Use this event for tasks that require that all other controls on the page be loaded'. What exactly might this b...
asp.net
[9]
3,438,405
3,438,406
Moving inline code into function, with object name generation
<p>I am customizing Denis Gritcyuk's <a href="http://javascriptkit.com/script/script2/timestamp.shtml" rel="nofollow">Popup date picker</a>.</p> <ol> <li><p>This pop-up script uses inline Javascript in a <code>href</code> link, to set the selected date into the <code>input</code> field, in the parent window, that is w...
javascript
[3]
558,811
558,812
Javascript understanding
<p>This is probably a stupidly basic question for this community, but if someone could explain it to me I would be very great full, I am so confused by it. I found this tutorial on the net and this was example.</p> <pre><code>&lt;script type="text/javascript"&gt; function sports (x){ alert("I love " + x);...
javascript
[3]
1,643,038
1,643,039
New to C# Concepts
<p>I have been doing a crash course of C# OOP and am curious to know what the "LIST" keyword represents in the code below:</p> <pre><code>var actors = new List&lt;Actor&gt;(); </code></pre> <p>Thanks</p>
c#
[0]
2,686,702
2,686,703
search page work on my pc and doesn't on net
<p>I have a search page with gridview for searching in books all things are good in my PC when i make search with any part of book title the result appear when i published the page on net the page doesn't return any result I'm sure there are books with the criteria I search for ?</p>
asp.net
[9]
3,616,021
3,616,022
Android Photo Gallery from Amazon s3
<p>Im aiming to create an Android app that allows me to gather images from my Amazon instance and then scroll horizontally through them like a photo gallery.</p> <p>Ive currently got an app that scrolls through fragments, but im not sure how to place imageviews inside these fragments </p> <p>Im relatively new to Andr...
android
[4]
1,829,422
1,829,423
How to access javascript array values within a setinterval function
<p>EDIT: The correct way to do it is self.series[0].data[self.series[0].data.length-1].x to access the last x value</p> <p>How can I access the series data from within the function defined in setinterval. When I try to access any of the values, or even the array length, it says undefined.</p> <pre><code>events: { ...
javascript
[3]
1,522,088
1,522,089
Reloading tab activity onResume but don't want to reload on tab switch
<p>I'm not sure if my title is clear so let me explain.</p> <p>Tab A - contains a listview populated from a database Tab B - search form</p> <p>I need to update the contents of tab A after coming back from a search results screen. Using onResume() works great but this also reloads the Tab whenever I click back and fo...
android
[4]
3,732,474
3,732,475
Android Passing Bitmap Through Activity
<p>i currently have a class that uses bitmap. however it is not serializable due to bitmap. Right now i am wondering which are the best ways to deal with it.</p> <p>Should i be storing it on the cache or sdcard? How ong does bitmap saved in cache or sdcard stays? is there any tutorial for doing those</p>
android
[4]
524,488
524,489
Multidimensional Array to String
<p>I am trying to convert a multidimensional array into a string with a particular format.</p> <pre><code>function convert_multi_array($array) { foreach($array as $value) { if(count($value) &gt; 1) { $array = implode("~", $value); } $array = implode("&amp;", $value); } p...
php
[2]
5,451,058
5,451,059
Real World C++ library
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/777764/what-modern-c-libraries-should-be-in-my-toolbox">What modern C++ libraries should be in my toolbox?</a> </p> </blockquote> <p>I am starting to get serious into C++ development. To that end, I want to lear...
c++
[6]
4,422,842
4,422,843
PHP: Most efficient way to get the number of files within a directory
<p>Consider these two folder structures:</p> <pre><code>Foo/ Folder1/ File1.txt Folder2/ Folder3/ File2.txt Bar/ Folder1/ Folder2/ Folder3/ Folder4/ </code></pre> <p>I'd like to know the most efficient way in PHP to tell me that the "Foo" folder has two files in it and tha...
php
[2]
140,854
140,855
Programming practice sites for java
<p>Can anyone of you please give me the name of the websites where one can get practice problems of core java,j2ee,jsp,servlets</p> <p>Waiting for reply.</p> <p>Regards</p>
java
[1]
113,514
113,515
Calling aspnet Membership ResetPassword stored procedure
<p>I would like to call the aspnet Membership ResetPassword stored procedure called: <code>aspnet_Membership_ResetPassword</code> within the <code>aspnetdb</code> database.</p> <p>When I look at the <code>SqlMembershipProvider</code> class there is a ResetPassword method but this is not useful as I cannot pass the par...
asp.net
[9]
230,365
230,366
Opening a file without extension
<p>I'm having a problem opening a file in C#.<br> I got a file which I need to read and when I'm trying to open it using C#, for some reason file cannot be found.<br> Here is my code:</p> <pre><code> string fullpath = Directory.GetCurrentDirectory() + string.Format(@"\FT933\FT33_1"); try { ...
c#
[0]
5,185,939
5,185,940
Casting return type
<p>Does casting a variable to another type return a temporary copy of that variable? if so then why can't you reference the temporary variable to a function.</p> <pre><code>void func(int &amp;i) //error converting parameter 1 from int to int&amp; { } int main() { double d = 6.8; func(int(d)); } </code></pre>
c++
[6]
5,631,281
5,631,282
jQuery doesn't work without alert
<p>I have some JavaScript below, but it doesn't work unless I have the <code>alert</code> as shown below. I know this is some sort of timing issue, but I have no idea how to go about fixing it. Any thoughts?</p> <pre><code>$(function() { $("#search_field").tokenInput("/searches/suggest_gems.json", { onAdd: fun...
jquery
[5]
3,886,244
3,886,245
Change icon in android
<p>I would like to know how I can change image in imageview but in specific way. I would like to when I start application I have a default icon and when I click on them I change icon on the othe. But when I click again my icon return to default, and again.... This is what I got at this moment:</p> <pre><code> final...
android
[4]
5,625,755
5,625,756
Is there anything inherently wrong with dynamic downcasting in C++?
<p>I've heard it said several times that if you need to dynamically downcast then there may be something wrong with the design. I see it as a similar mechanism to COMs queryinterface, querying an object at run-time to see what interfaces it supports and then invoking the appropriate method(s) accordingly. </p> <p>Is t...
c++
[6]
3,920,588
3,920,589
The URL-encoded form data is not valid - Solution not working in some case
<p>This is in reference to the solution posted here:</p> <p><a href="http://stackoverflow.com/a/8684879/1004522">The URL-encoded form data is not valid Solution</a></p> <p>I have added this line in my web.config in appSettings section:</p> <pre><code>&lt;add key="aspnet:MaxHttpCollectionKeys" value="3000" /&gt; </co...
asp.net
[9]
4,569,190
4,569,191
Set margin in style and apply that style to TextView programmatically
<p>In my application, I want to set top and bottom margin of 8 dip to a textview. So if I do it like -</p> <pre><code>&lt;TextView android:id="@+id/tv_text1" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/settings_plain_text"/&gt; </code></pre> <p>it works fine where the style ...
android
[4]
922,626
922,627
how do i get index of an object in a custom class?
<p>I'm trying to an indexof method for a class that represents a list of objects.I would like to know the best approach. below is the code that I've come up with.</p> <pre><code>public int IndexOf(Product product) { Product p; for (int i = 0; i &lt; products.Count; i++) { ...
c#
[0]
2,101,764
2,101,765
What's the value of hw.machine for iPhone5?
<p>I used <strong>uidevice-extension</strong> to get the device type before. This is the value for iphone5 in <strong>uidevice-extension</strong>:</p> <pre><code>if ([platform isEqualToString:@"iPhone5,1"]) return @"iPhone5"; </code></pre> <p>I am not sure if the the value for iphone5 is correct since it is update...
iphone
[8]
388,803
388,804
asp input field on click clear value
<p>I'm wanting to change the value of my inputs with my asp form fields so that when clicked it clears the content and if someone doesn't type any value and clicks another field it will re-add the default value again, if changed it leaves the new text.</p> <p>eg. field:</p> <pre><code> &lt;asp:TextBox ID="NameInfo" ...
asp.net
[9]
2,806,592
2,806,593
how can i add another object to an already defined IQueryable object?
<p>I have IQueryable Products. now i want to add new product to this IQueryable object. so how do i do this?</p>
c#
[0]
5,789,069
5,789,070
Check whether timestamp to present has been 3 hours - php
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/8771981/check-if-timestamp-is-x-hours-old">Check if timestamp is x hours old?</a> </p> </blockquote> <p>How do I determine whether it has been 3 hours or more from a <code>timestamp</code> (formatted like <code>...
php
[2]
865,326
865,327
Easy way to change value of bolean
<p>A lot of time I have inverse logic between my forms and data, I am looking for easiest (most elegant) way to change some boolean from true to false and vice versa.<br> I know that a lot of people will get angy if see code like this:</p> <pre><code>if (c) { return false; } else { return true; } </code></pre> <p>Or...
c#
[0]
3,992,534
3,992,535
Javascript, escape is not a function - from firefox?
<p>I'm quite puzzled by this one, getting this error from firefox.</p> <pre><code>escape is not a function </code></pre> <p><img src="http://i.stack.imgur.com/EOknY.png" alt="enter image description here"> Looking at the W3C page, it says it is supported as I thought.</p> <p>I tried <code>escapeURI</code> instead an...
javascript
[3]
2,772,206
2,772,207
how can i retrieving text from input field as its entered in JavaScript??
<p>How can i retrieve the contents of an input field as they are entered with JavaScript?</p> <p>i know .onChange only works after the focus is changed from the input field? </p> <p>thanks </p>
javascript
[3]
5,503,253
5,503,254
Saving boolean return value into variable?
<p>Is there a way to save a boolean true/false value in a function to a variable?</p> <pre><code>function check() { if(1 = 1) { return false; } } $status = check(); if($status === false) { echo "sign in please"; } </code></pre> <p>As of now <code>$status</code> comes out to be null. I don't like h...
php
[2]
5,932,063
5,932,064
C++ question about setting class variables
<p>I'm not new to programming, but after working in Java I'm coming back to C++ and am a little confused about class variables that aren't pointers. Given the following code:</p> <pre><code>#include &lt;iostream&gt; #include &lt;map&gt; using namespace std; class Foo { public: Foo() { bars[0...
c++
[6]
1,117,583
1,117,584
Building a .net 1.1 project using msbuild
<p>The Web project we are working on is built against .net 1.1 framework.We would like to automate the build process for this project by using msbuild.However MSBuild only targets 2.0 framework. So how can this be done if we like to use MSBuild or MSBEE(this asks us to convert the web project to new version by opening ...
asp.net
[9]
3,168,455
3,168,456
ASP.NET websites are compiled but with more HTML markup generated!
<p>Everytime I view the source of ASP.NET website I found alot alot of HTML markup generated. I even tried Visual web Developer and design a simple page and then do the same thing with PHP and I found ASP.NET generates more HTML! </p> <p>Now, how can ASP.NET be faster if it is generating HTML in this way! </p>
asp.net
[9]
5,157,796
5,157,797
How do you explicitly initialize a reference in c++?
<p>I have the following code:</p> <pre><code>class SomeClass {}; class SomeOtherClass { SomeClass&amp; someObj; public: SomeOtherClass() {someObj = SomeClass();} }; </code></pre> <p>And I get an error on the constructor for <code>SomeOtherClass</code> saying <code>Constructor for 'SomeOtherClass' must explic...
c++
[6]
1,336,095
1,336,096
Remove non printable characters C# multilanguage
<p>I have a multi-language application in asp.net C#. Here I have to create a zip file and use some items from the database to construct file name. I strip out special characters from file name. However if the language is German for example my trimming algorithm will remove some german characters like Umlaut.</p> <p>...
c#
[0]
2,964,127
2,964,128
is it possible to write an app that is invoked by the phone ringing?
<p>I'm guessing the answer is no, but just in case, I'm curious if there's any way to write a receiver that would launch an app when the phone starts to receive a call. Even something as simple as a dialog activity that says "your phone is ringing". Or is the phone always going to suppress any other app that's trying ...
android
[4]
646,242
646,243
Base class access specification vs class member access specification
<p>How is base class access specification different from member access specification?</p>
c++
[6]
5,533,407
5,533,408
Conditional compilation in python
<p>Hi I am trying to implement conditional compilation in python similar to <a href="http://ideone.com/ttndK" rel="nofollow">this in C</a>,I have seen <a href="http://stackoverflow.com/questions/560040/conditional-compilation-in-python">this thread</a> and <a href="http://stackoverflow.com/questions/3496592/conditional...
python
[7]
5,075,790
5,075,791
running a stored procedure that takes a long type argument, execute returns false
<p>My call for stored procedure is</p> <pre><code>public void executePreProcssService() { try { Connection conn = null; MasterReportUtils masterReportUtils = new MasterReportUtils(); List&lt;Model&gt; masterReportList = masterReportUtils.getPendingMasterReportList(); if (mast...
java
[1]
1,460,096
1,460,097
Need a sample code which read content from .xls file and write to text file
<p>I Need a sample code which read content from .xls file and write to text file</p> <p>Thanks in advance</p>
javascript
[3]
2,779,484
2,779,485
Combined 2 array data
<p>I want to do something like bellow using php:</p> <pre><code>$turl=array(trim($params-&gt;get('c2'))); $tname=array(trim($params-&gt;get('cn2'))); </code></pre> <p>and want to display each <code>$turl</code> with each <code>$tname</code>.</p> <p>I tried like this:</p> <pre><code>$result=array_combine($turl,$tnam...
php
[2]
1,586,319
1,586,320
Java object error
<p>Ok I'm very new to Java and I'm trying to complete a homework assignment, but my object isn't working in my class. (Forgive me if I'm using wrong terminology, noobie here)</p> <p>So I'm making a basic stopwatch program that records 2 laps. I have gotten to the point of creating the 1st lap and it works great. Then ...
java
[1]
1,900,176
1,900,177
How can get CheckBox Array length in java script
<p>in my jsp form i have one checkbox Array in my form(jsp and struts).i want to know the length of checkbox Array in java script. ex: <code>&lt;input:checkbox property="chkbox[]"/&gt;</code> . in javascript i am calling <code>document.form[0].chkbox[].value.length</code> but it showing javaScript error null or undef...
javascript
[3]
136,091
136,092
onLocationChanged not getting called other than the first time for GPS
<p>I am using GPS on Android phone, and trying to get GPS coordinates from satellite. I have disabled wifi on my phone.</p> <p>I am using the following code snippet,</p> <pre><code>mlocManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, 0, (float)0.0, mlocListener); </code></pre> <p>the <code>onLocationCh...
android
[4]
4,466,730
4,466,731
Using DiskLruCache in android 4.0 does not provide for openCache method
<p>Have anyone worked on DiskLruCache?</p> <p><a href="http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html" rel="nofollow">http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html</a></p> <p>provides an example of using this caching method. But i observe the implementation for...
android
[4]
2,077,584
2,077,585
Why doesn't my PHP foreach work?
<pre><code>$start = true; $new = ""; foreach($array as $val) { if($start = true &amp;&amp; $val != " ") { $start = false; $new .= strtoupper($val); } elseif($val == " ") { $new .= " "; $start = true; } else { $new .= strtolower($val); } $st...
php
[2]
676,462
676,463
time zone example not working in emulator
<p> </p> <p>package com.broadcastreceiver;</p> <p>import java.util.ArrayList; import android.appwidget.AppWidgetManager; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log;</p> <p>public class Exampl...
android
[4]
2,473,926
2,473,927
How to create a custom Caller UI using Android API
<p>Does anyone know whether Android API libraries supports to create a custom Caller UI? For instance to add a new button on the Caller UI. </p>
android
[4]
2,754,443
2,754,444
Couldn't display a second word in my database output
<p>I have a strange problem here. I'm doing a admin page to edit movie info. I have a movie for exemple called "Blood Diamonds" in my database, but on the oage it only show "Blood" without the second word "diamonds", I couldnt find whyyy.</p> <pre><code>require('../classes/movie_class.php'); $moviecinemas = movie::get...
php
[2]
1,897,240
1,897,241
android bluetooth problems
<p>i have a problem in android Bluetooth i am creating a application for controlling the power supplies by digitally. according to my application i created 3 tabs in this 3 tabs i write three activity's but in last tab i am crating a Bluetooth connection, But my problem is how can i write the data to the Bluetooth from...
android
[4]
4,339,316
4,339,317
How to retrieve the user profile information using zend gdata
<p>I have authenticated a youtube user using oauth( zend gdata library used).</p> <pre><code>$url = Zend_Gdata_AuthSub::getAuthSubTokenUri($returnUrl, $this-&gt;scope, $this-&gt;isSecure, $this-&gt;isSession); $httpClient = Zend_Gdata_AuthSub::getHttpClient(Yii::app()-&gt;user-&gt;sessionToken); </code></pre> <p>How ...
php
[2]
4,662,616
4,662,617
making a textview clickable in android
<p>I am making an android application,I have 4 textviews namely ProductId,Title,description,image.I want when i click on each one of them product id should be displayed.I have a webservice for this.</p> <p>Output of webservice is </p> <pre><code>vmsc&gt; &lt;response code="0" message="Success"/&gt; − &lt;responseda...
android
[4]
669,578
669,579
How can i write a function which takes number(n) as input and automatically creates (n) number of objects for a class
<pre><code>for(int i=0; i&lt;n;i++) { Node "obj"+i =new Node(); } obj1.Node_val(2,3); obj2.Node_val(9,8); </code></pre> <p>i tried this, but not works.</p> <p>Please can you help. Thank you.</p>
java
[1]
2,260,576
2,260,577
Drag and drop javascript event
<p>I'm a java guy trying my hand in javascript and need some help. I came across an amazing tutorial on image uploads here <a href="https://developer.mozilla.org/en-US/docs/Using_files_from_web_applications" rel="nofollow">Mozilla Tutorial</a> and need some help figuring it out. I am currently working on the drag and d...
javascript
[3]
2,740,147
2,740,148
JavaScript Timestamp question
<p>What does these two lines do?</p> <pre><code>Math.floor(1293859512411 / 86400000) Math.ceil((new Date().getTime()) / 86400000) </code></pre> <p>I understand it is something to do with time since epoch, but please explain the two lines.</p>
javascript
[3]
1,225,688
1,225,689
How to group by in php?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2189626/php-how-to-group-a-multidimensional-array-by-a-particular-value">php how to group a multidimensional array by a particular value?</a> </p> </blockquote> <p>I have a sample code:</p> <pre><code>name ...
php
[2]
4,118
4,119
How to extend a Java class with a loaded class?
<p>I am injecting a Applet that way that it can't check on which website it is.<br /> The purpose is to load an external unmodified applet into mine so I can embed it into mine.</p> <pre><code> final URL[] appletURL = { new URL(Main.getBase() + "/loader.jar") }; final URLClassLoader classLoader = new URLClassLo...
java
[1]
3,717,682
3,717,683
jQuery wrong format :(
<p>I have that code</p> <pre><code>var p = document.createElement('p'); var a = document.createElement('a'); $(a).attr('href', 'http://www.my-site.com'); $(a).attr('title', 'My Site'); $(a).attr('target', '_blank'); $(a).attr('id', 'l'); $(a).html('&lt;strong&gt;m&lt;span style="color: #D70080 !important;"&gt;Y&lt;/s...
jquery
[5]
4,571,141
4,571,142
Check if a “run-time” multidimensional array key exists
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/6080991/check-if-a-run-time-multidimensional-array-key-exists">Check if a &ldquo;run-time&rdquo; multidimensional array key exists</a> </p> </blockquote> <p>Hi,</p> <p>I have a multidimensional array. I need a ...
php
[2]
3,703,294
3,703,295
member variable not an option
<p>I have many constants I need to move around in one of my classes but I'm not allowed to use member variables. What are some options?</p> <p>Here's my initial try:</p> <pre><code>private void MyConstants(out int textSize, out int paddingValue, out int borderType, ...) { //Set them here } private Method1() { in...
c#
[0]
3,605,977
3,605,978
what's the benefit of defining some class inside a method?
<p>Is there any benefit to define a class inside a method. I saw someone prefer to define some listener class inside a method, any real benefit to do this?</p>
java
[1]
749,452
749,453
How can i get a value from a string with an alternating name?
<p>I have the following code:</p> <pre><code>var currentCity = db.City.Find(player.Location); switch (TravelTo) { case 1: costs = currentCity.TravelCost.City1; break; case 2: costs = currentCity.TravelCost.City2; break; case 3: costs = currentCity.TravelCost.City3; ...
c#
[0]
5,324,363
5,324,364
How to read compressed HTML page with Content-Encoding : gzip
<p>I request a web page that sends a <strong>Content-Encoding: gzip</strong> header, but got stuck how to read it..</p> <p>My code:</p> <pre><code> try { URLConnection connection = new URL("http://jquery.org").openConnection(); String html = ""; BufferedReader in = n...
java
[1]
511,412
511,413
Parse error: syntax error, unexpected '=' (can't figure out which one)
<p>This is the line:</p> <pre><code>&lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); rel="bookmark"?&gt;" &gt;&lt;?php the_title(); ?&gt;&lt;/a&gt; </code></pre> <p>I checked and I can't see the problem.</p>
php
[2]
4,280,575
4,280,576
Providing feedback in a form using jquery
<p>I want to provide feedback to a user when they enter something into a textbox. A little tick if their input matches a RegEx and false if it does not.</p> <p>What event do I need to use for this? Key up?</p> <p>For example:</p> <pre><code>if (inputText.match(/regex/)) { document.write(input is correct); // or s...
jquery
[5]
3,354,392
3,354,393
Where can I find a list of all methods of javascript objects?
<p>I just learned that <code>alert()</code> is a method of the <code>window</code> object. I also just learned that <code>getElementById()</code> is a method of the <code>document</code> object.</p> <p>Is there a place where I can find documentation as to what methods belong to certain objects?</p>
javascript
[3]
5,724,200
5,724,201
Decode string into a list of integers
<p>How do I decode a string whose length is multiple of 4 into a list of 32-bit integers in javascript?</p> <p>Something that does the equivalent of struct.unpack('>16I, 16characterstring) in python. I'm okay with using common external libraries. I am looking for something clean and which hopefully avoids bit-shifting...
javascript
[3]
5,931,333
5,931,334
iPhone:Unable to run my iPhone program which has built with iOS 4.3 SDK in iPhone 3.x
<p>I have created a new project for iPhone using Xcode 4, iOS 4.3 SDK. It has just a button in it, nothing else. I am able to install that on my iPhone 4 device. I set "iOS Deployment Target" as "3.0" and trying to install on my iPhone 3.x 3G device using the same Xcode, but it is installing, but when i launch the appl...
iphone
[8]
5,939,030
5,939,031
Navigate without using sub ids
<p>i am just setting up the general template for my website and the little bit of php that i am doing is to just get the users id from page to page, in other words i want the user while logged in to go from page to page, without using the sub id in the header of user_id=3 for example, and then using the get function to...
php
[2]
2,535,169
2,535,170
Is there a way to express a generic handler in a generic way in C#?
<p>Imagine I have an interface that specifies some collection handler:</p> <pre><code>interface ICollectionHandler&lt;T&gt; where T : new() { ... } </code></pre> <p>I then have same other class that wants a collection handler, which it will use for various types, so I want to do something like:</p> <pre><code>class ...
c#
[0]
1,056,636
1,056,637
DSNLess database connection
<p>How to make a DSN less Connection in JAVA. I am trying to make SQL database connection in my java program. But i dont want to make DSN. Is there any alternative. Or how can i make DSN command line?</p>
java
[1]
196,253
196,254
Trace IP Adress in Wordpress
<p>I need to trace the ipadress (where my website access)for optional loading of my theme.Explanation: I want to add a share link to twitter and facebok in my application.i think in some countries like china;twitter blocked.Thats why i need to check from where my site is accessing.otherwise which affecting my site's pe...
php
[2]
3,487,950
3,487,951
Time delay in Javascript
<p>Function PS.Tick() is called every 100 milliseconds and its job is to call AI function of NPCs so they can move:</p> <pre><code>PS.Tick = function () { "use strict"; for (NPCid = 0; NPCid &lt; NPCnumber; NPCid++) { NPCAI(NPCid); }; }; </code></pre> <p>But I want the NPCs to not move simultaneously every 100 m...
javascript
[3]
1,131,536
1,131,537
Monitor location provider access on android without root?
<p>Is there a way to monitor which app or when an app asks a location provider for the current position without having root access?</p>
android
[4]
5,259,069
5,259,070
Python tool to balance parentheses, quotes, and brackets
<p>Does anyone know of an already-written Python script, tool, or editor that will check for unbalanced multi-line tokens? (parentheses, quotes, {}, [], etc.)</p> <p>I've been writing Python code in IDLE, and every so often I'll get "EOF token in multi-line statement" and start swearing, because it means that somewher...
python
[7]
4,772,621
4,772,622
jquery drag and drop functinality
<p>iam doing drag and drop functionality using jqury.I am getting "draggable" method not found error. script follows</p> <pre><code>&lt;script src="../Scripts/jquery-1.7.2.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $("#draggable").dr...
jquery
[5]
4,772,748
4,772,749
change the image name in php
<p>hello i have the following code to change the image name of upload picture <pre> $TARGET_PATH="pics/"; $TARGET_PATH =$TARGET_PATH . basename( $_FILES['photo']).'.jpg'; while (file_exists($TARGET_PATH)) { $TARGET_PATH =$TARGET_PATH . basename( $_FILES['photo']) . uniqid() . '.jpg'; }</pre></p> <p>This change the...
php
[2]
3,006,542
3,006,543
how to call .js after page is loaded
<p>i need to call customFormElements.js js function after aspx page is loaded, after submit button is clicked. can i do this and if yes how?</p> <p>window.onload option is not good...</p> <p>i need to call this file after i press submit button becouse aspx ajax library clear my js file logic and i need to reload it a...
c#
[0]
2,134,628
2,134,629
Best way to procedurally add Power-up items to an iPhone game
<p>To better explain this I'll use Doodle Jump as an example. Assuming that the platforms are recycled, when the character jumps up and the new platforms appear (by scrolling down) there is occasionally a propeller hat on one of them. is there a recommended method to manage this new object? Should I instantiate a singl...
iphone
[8]
4,170,301
4,170,302
Passing a bound object method in JavaScript
<p>For a Firefox extension, I'm trying to do the following:</p> <ol> <li>Setup an object with two methods and a field/property/attribute</li> <li>One of the methods has to be able to call the other method and access the attribute</li> <li>I want to register that method as an event listener.</li> </ol> <p>Right now, I...
javascript
[3]
793,165
793,166
Why use generic constraints in C#
<p>I've read an excellent article on MSDN regarding Generics in C#.</p> <p>The question that popped in my head was - why should i be using generic constraints?</p> <p>For example, if I use code like this:</p> <pre><code>public class MyClass&lt;T&gt; where T : ISomething { } </code></pre> <p>can't I switch ALL refer...
c#
[0]
3,486,067
3,486,068
Set a property as reference to an object
<p>I have a table that have a property named "recordsource" that will hold the name of the object that will fill the content of the table.</p> <pre><code>&lt;table id="tbl" recordsource="myobj"&gt; </code></pre> <p>Now here are my functions:</p> <pre><code>var myobj; function obj() { this.code = new Array(); th...
javascript
[3]
1,233,072
1,233,073
Floating point arithmetic in Javascript
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/588004/is-javascripts-math-broken">Is JavaScript&#39;s Math broken?</a> </p> </blockquote> <p>I have just started playing around with Javascript in the last couple of days and I have noticed something that appea...
javascript
[3]
1,354,743
1,354,744
google cse load after page complete loaded
<p>I have a question, how to make google cse to load after page have completely loaded.</p> <p>i have seen this on <a href="http://www.9lessons.info/" rel="nofollow">http://www.9lessons.info/</a> on top right.</p> <p>Thank you for your guidance.</p>
jquery
[5]
2,222,803
2,222,804
Can we put the lite version of any app on the app store after launching of sdk 3.0?
<p>HI all ,</p> <p>After launching the sdk 3.0 .Did apple refused to launch of the lite and the standard version of one app on the app store , i heard that apple will kill the app if any app have two version like one lite and another standard cause it is increasing the redundancy on the app store.if any one know or h...
iphone
[8]
1,315,513
1,315,514
C# easy math function
<p>I`m trying to calculate a percent of successful jobs in total. Code:</p> <pre><code>int total = valid + invalid; int percent = (valid / total) * 100; if (percent == 0) { MessageBox.Show(Convert.ToString(total) + ":" + Convert.ToString(valid)); break; } </code></pre> <p>If all job are successful, the percent is...
c#
[0]
1,743,157
1,743,158
Android: Write and Get Object
<p>I want to write a serializable object to file in internal memory. Then, I want to load that object back from that file later. How could I do this in Android?</p>
android
[4]
2,662,763
2,662,764
On image mouseover zoom
<p>Here is my jQuery code.. </p> <pre><code> $('img').live('mouseenter',function() { $(this).addClass('shown'); $('.shown').animate({width: '+=50',height: '+=50'}) }); $('img').live('mouseleave',function() { $(this).removeClass('shown'); ...
jquery
[5]
414,717
414,718
How to run a Runnable on UI thread from a custom class
<p>How can I run a Runable on the UI thread from a custom class? The method "runOnUiThread(Runnable)" would get the job done but it is a part of an Activity. I wonder if the Application class support something similar because its easy to get an instance of it. I have read about the annotation "@UiTread" from the andro...
android
[4]
2,250,403
2,250,404
Processing wikipedia dump file
<p>I want to process wikipedia dump file. In other meaning i want to extract title , category and text content for each article. what i want to ask about it is there any java api/tool that can help me in doing that. thanks in advance</p>
java
[1]
1,604,573
1,604,574
how to create listview in android? how many methods?
<p>hi i begginer of android programming. i want a new about basic to create ListView. How many methos to use the create ListView. </p>
android
[4]