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,323,414
5,323,415
Loop in java until the users pushes enter
<p>How do I loop in java until the user pushes enter, then stop?</p> <p>Something like</p> <pre><code>while(System.in != ""){ do x; } </code></pre>
java
[1]
3,763,936
3,763,937
Determining if an input is a number
<p>How do I find out if my user's input is a number?</p> <pre><code>input = raw_input() if input = "NUMBER": do this else: do this </code></pre> <p>What is "NUMBER" in this case?</p>
python
[7]
4,641,206
4,641,207
How to remove unnecessary tags?
<p>I have field "body" in my table (mysql) and there a lot of entries like:</p> <pre><code>&lt;/p&gt;&lt;p&gt; &amp;nbsp;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; </code></pre> <p>A lot of spaces, new line, &amp;nbsp, etc. How to remove it?</p> <p>This not work:</p> <pre><code>text.replace('...
python
[7]
573,774
573,775
ValueError: invalid literal for int() with base 10: '107.24'
<p>i am new in python, i just try to play a video in avg player through python. All the videos are played successfully, but one video has through this value error. i am not sure why this error was happened . if you know describe me.</p>
python
[7]
229,206
229,207
want to find all possible values for given number.(in C language)
<p>my output should appear as (ex- input is 4) [(1,1,1,1),(1,2,1),(2,2),(1,3),4]</p>
python
[7]
3,152,011
3,152,012
Download files from server php
<p>I have a URL where I save some projects from my work, they are mostly MDB files, but some JPG and PDF are there too.</p> <p>What I need to do is to list every file from that directory (already done) and give the user the option to download it.</p> <p>How is that achieved using PHP?</p>
php
[2]
1,091,724
1,091,725
Extract numbers from a string
<p>I want to extract the numbers from a string that contains numbers and letters like:</p> <pre><code>"In My Cart : 11 items" </code></pre> <p>I want here to get the number 11 or any other number...</p> <p>Thanks</p>
php
[2]
14,275
14,276
Object reference not set to an instance of an object. exception at string assignment
<p>This is my code to generate an autogenerating jobcode and fill it in a text box</p> <pre><code> public void newjobecodenoget(){ String jobcodeno = null; OleDbConnection oleDbConnection1 = new System.Data.OleDb.OleDbConnection(connString); oleDbConnection1.Open(); String ...
c#
[0]
2,216,252
2,216,253
computing RTT problem with javascript
<p>I want to measure how long an RTT is to the server... Here is the problem, when I have the following work it works perfectly:</p> <pre><code>var start = new Date(); var startTime=start.getMilliseconds(); document.write('&lt;img src="http://mysite.com/myfile.gif" onload="getEndTime()"&gt;'); function getEndTime()...
javascript
[3]
3,716,725
3,716,726
Trouble using reflection with setOverScrollMode
<p>I want to be able to turn off overscroll (the glowing effect when reaching the top or bottom of a page in 2.3+) however I also want my code to run in older versions of android that don't even have overscroll functionality. As per the documentation here: <a href="http://developer.android.com/resources/articles/backwa...
android
[4]
5,541,620
5,541,621
Building and maintaining an options array/object in JavaScript
<p>I'm building a faceted/filtering search for a project I'm currently working on and I'm looking for a function (or jquery plugin) to help me do this. Let's say I have an object like the following:</p> <pre><code>var options = { "country": 2, "Gender": 1 } </code></pre> <p>I then have a function called filte...
javascript
[3]
372,292
372,293
Security issue in device adminstrator app in android
<p>I was using the google's device administator feature in order to build an android app which is related to security and antitheft. So I used the sample code provided by google. The main purpose is that if the mobile is stolen, the thief should not be able to remove our security app, thus we could track our phone.</p>...
android
[4]
643,921
643,922
[PHP]: Error -> Too few arguments in sprintf();
<p>This line is giving error: "Too few arguments". What is the problem?</p> <pre><code>$InsertQuery = sprintf("INSERT INTO listing (ldate, places, company, designation, projectdetails, desiredcandidate, hrname, hrcontact, email) VALUES (DATE_FORMAT(%s,'%Y %m %d),%s,%s,%s,%s,%s,%s,%s,%s)", $ldate,$places,$company,$desi...
php
[2]
4,847,987
4,847,988
access animated elements via their queue key?
<p>Can I stop an animation in a custom-named queue without access to the animated elements?</p> <pre><code>$(complictedSelector).animate( {opacity: .5}, {duration: 10000, queue: 'hover'} ); </code></pre> <p>My naive attempt at using <code>$stop( 'hover' )</code> doesn't work :-)</p> <p>It seems I <strong...
jquery
[5]
4,941,242
4,941,243
Miller Rabin Primality test
<p>I have wrote a Miller Rabin primality test in C sharp, but it return false on every input.</p> <p>Here's the code:</p> <pre><code> static Boolean MilRab(UInt64 n) { UInt64[] ar = new UInt64[] { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 }; for (int i = 0; i &lt; 10; i++) { if (Ta...
c#
[0]
1,937,088
1,937,089
Capitalizaing a string in JavaScript
<p>Is there any method to captitalize a string in JavaScript? I want a JS equivalent of following Java:</p> <pre><code>String st = "aks"; String st1 = st.toUpperCase(); </code></pre>
javascript
[3]
2,549,717
2,549,718
Android : how to chose between background Thread with looper and Service
<p>by my understand about looper that it's can be a central for running by any request pass through handler in message and Service can do that too. So what is adventage of each(priority of thread,reliable,resource,...) to decided to use.Any suggestion?</p>
android
[4]
1,431,736
1,431,737
passing value from one text box to another in php
<p>I have two text boxes and one button. I want when i will type any value in 1st textbox and click on a button the value which i'll type in 1st text box should be the value of 2nd text box. And i was using this code. Can some one help me on this?</p> <pre><code>&lt;?php if(isset($_POST['sum'])) { $v1=$_POST['abc']; ...
php
[2]
1,518,596
1,518,597
Tcp/udp client/server Programs over Ipv6 in java
<p>i am struggling with</p> <p>IPV6 programing</p> <p>please help me or guide to me to ipv6</p> <p>if it is posible please send reference site for following programs</p> <p>Tcp/upd client /server examples over ipv6 </p> <p>Advanced Thanks</p>
java
[1]
3,660,161
3,660,162
Speech Recognition, ListView ArrayAdapter: What is the best way to use if("certain word spoken"){ } is there methods i can use?
<p>The Speech Recognition puts all the possibilities into the list view, im just wondering how i can use the values in ListView to use an if("word was spoken"){ "do something" }, do i have to make my own search or is there already methods, proper syntax</p>
android
[4]
3,693,900
3,693,901
Simple Question about NSObject class / Retain Count
<p>If I create an NSObject class with a method that returns an NSMutableArray do I need to release the array inside the class or does the Class never retain? </p> <p>Not sure on how to explain so here is some code:</p> <pre><code>@implementation PointsClass - (NSMutableArray *)pointsForLevel { NSMutableArray *_poin...
iphone
[8]
1,789,869
1,789,870
viewflipper not calling onCreate of page
<p>I am new to Android development. I would like to use the viewflipper to bring in pages of my application. It would go to the next or previous page depending on the recieved gesture event. I have the gesture working and pages scroll in and out. Cool! Problem: the onCreate of each page doesn't fire and hence I h...
android
[4]
2,046,918
2,046,919
Where to put snarfer.php?
<p>I followed these instructions: <a href="http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates" rel="nofollow">http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates</a></p> <p>My understanding of those instructions was that the file snarfer.php needed to be in the folder 'themes', so it appea...
php
[2]
5,098,193
5,098,194
How to compare date and year?
<p>i am implementing one graph related app.</p> <p>In that when application start i am getting present month,present year from calende and display on the screen with graph. like April 2012 and graph</p> <p>ok that is fine.</p> <p>In my screen i have two buttons like preview,next.</p> <p>when user clicks preview ,i ...
android
[4]
4,953,915
4,953,916
Encoding non-English characters
<p>I'm having a bit of trouble here and I was hoping someone throws me a hint :)</p> <p>I'm getting some GET VARS with JS but I have trouble with non-latin charsets: cyrillic for example. The cyrillic var appears correct in the url but when I retrieve it with JS I get some dummy string.</p> <p>I was wondering of a fu...
javascript
[3]
1,934,785
1,934,786
javascript function indexOf() not working in chrome with white space in string
<p>I want to search the string in anchor tag, When I simply search the "Happy" without space it works fine however when I search it with some space like "Happy " it does not work.</p> <p>Below is the code sample:</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;a style="color:#555555" href="Happy coding!!"&gt;test&lt;/...
javascript
[3]
3,710,298
3,710,299
Trying to have an array with 2 values in side by side
<p>I need to create an array where i can use 1,2,3 but have 1v1, 2v2, Clubs associated with them.</p> <p>I am going to use 1,2,3 for option value and 1v1,2v2 and clubs to display to the user.</p> <p>How can I store this in an array and then use foreach to extract? Thanks</p>
php
[2]
346,539
346,540
buffer size changed
<p>I am doing a simple communication between sockets and here is my C++ code</p> <pre><code>while(1) { string buffer = "23,45\n"; const char* foo = buffer.c_str(); cout &lt;&lt; "size of buffer is " &lt;&lt; sizeof(buffer)&lt;&lt;endl; send (s, foo, sizeof(buffer), 0); } </code></pre> <p>weird thing i...
c++
[6]
2,214,724
2,214,725
< is not working in a string with email
<p>I am making a script that sends some individual emails to specific users, since I need authentication, I am using PEAR mail function and its working great, but when I a try to put in the from address the name and email of my enterprise, I get an error, so I was testing and testing and went back to baby steps where a...
php
[2]
111,770
111,771
Session value expires too quickly in hosting environment.How to fix this in asp.nen
<p>Session value expires too quickly in hosting environment.How to fix this in asp.net</p>
asp.net
[9]
3,980,670
3,980,671
how to go to next Activity in androd
<p>I have three views main1.xml, main2.xml , main3.xml In main.xml I am putting three buttons when user click on first button I want it to show main1.xml, if second button then main2.xml etc.. I am done with the main.xml files how to do that view change </p>
android
[4]
5,973,673
5,973,674
Server-side Application to registration ID for Android device
<p>I am working on an application for android to get the Device Id from the respective devices of client.</p> <p>I am following <a href="http://developer.android.com/google/gcm/gs.html" rel="nofollow">this tutorial</a>.</p> <p>Here I am struck at the point where I need to make the server-side application to get devic...
android
[4]
1,917,684
1,917,685
CALayer w/ Animation as UIViews layer
<p>I have a UIView &amp; I want that view's layer to be a continuously looping animation but I'm having some trouble getting started. I have the following in my view subclass:</p> <pre><code>+ (Class)layerClass { return [CALayer class]; } </code></pre> <p>Then in my viewController I have:</p> <pre><code>CAGradient...
iphone
[8]
4,134,742
4,134,743
why echo does not show anything while php is busy
<p>PHP Echo or Print functions does not show anything when php is busy with something (like when surfing the web with curl or something like that).</p> <p>Later i discovered php does show the output when you execute your php on the command line:</p> <pre><code>php myscript.php </code></pre> <p>But right now i don't ...
php
[2]
4,950,717
4,950,718
Counting repeated characters in a string in Python
<p>I want to count the number of times each character is repeated in a string. Is there any particular way to do it apart from comparing each character of the string from A-Z and incrementing a counter?</p> <p><strong>Update</strong> (in reference to <a href="http://stackoverflow.com/questions/991350/counting-repeated...
python
[7]
3,741,862
3,741,863
Skype Script For Contacting Me On Skype
<p>I would like a link on my website that when somebody clicks on it, it either starts a chat with me on skype, or if I'm offline, it starts a chat with my friend and when he's offline, it sends a pop-up saying "Sorry, nobody is availible." The status has to be online, otherwise go to the next person. </p> <p>I found ...
javascript
[3]
3,020,150
3,020,151
Url rewriting in asp.net 3.5
<p>I am developing an asp.net 3.5 application.I need to rewrite the url.My current url is,</p> <p><a href="http://app.evetos.com/Areas/UserV1/Controllers/Order1.aspx?EventID=JRQlVFOQDYs=&amp;status1=true" rel="nofollow">http://app.evetos.com/Areas/UserV1/Controllers/Order1.aspx?EventID=JRQlVFOQDYs=&amp;status1=true</a...
asp.net
[9]
2,951,688
2,951,689
How do you organize resource dependent code?
<p>The code can be dependent upon other libraries or DOM content.</p>
javascript
[3]
2,714,883
2,714,884
my program doesn't accept time print out sentence
<p>Here's the code that what I have. I also have in my class file: <code>import java.util.*;</code> and <code>long time;</code> and two formulas to calculate time before and after my calculations, and there is no error.</p> <pre><code>import java.io.*; public class RhoMain { public static void main(String arg[])thr...
java
[1]
2,949,318
2,949,319
How does variable assignment work in JavaScript?
<p>So I was playing around the other day just to see exactly how mass assignment works in JavaScript.</p> <p>First I tried this example in the console:</p> <pre><code>a = b = {}; a.foo = 'bar'; alert(b.foo); </code></pre> <p>The result was "bar" being displayed in an alert. That is fair enough, <code>a</code> and <c...
javascript
[3]
1,160,361
1,160,362
Unable to download Android 2.3.3 in Android SDK Manager
<p>I've tried to install Android 2.3.3 so I can then install OpenSense for HTC phones.</p> <p>When I start the procedure to download Android 2.3.3 in the Android SDK Manager I get the followin messages:</p> <blockquote> <p>Preparing to install archives Downloading SDK Platform Android 2.3.3, API 10, revision 2 </...
android
[4]
57,143
57,144
Image Caching Problem in iPhone
<p>I have briefly described the working of my application to under stand my Question.</p> <p>I have an application, in which more than 1600 images are stored with in iPhone-Application-Document Directory. I have a tableView on Main Screen as follows. =>First Category =>Second Category =>Third Category</p> <p>=>if use...
iphone
[8]
176,374
176,375
Android game development - Java or flash development or flash animation?
<p>I'm trying to make an android game here, but I'm not sure what is it that I need to learn - J2ME or flash development? Also, if flash then is there a difference between flash development (coding) &amp; flash animation? I'd really appreciate any help here. </p>
android
[4]
1,015,367
1,015,368
How to increase hit area of Android button without scaling background?
<p>I have a button with a custom drawable.</p> <pre><code>&lt;Button android:layout_width="22dip" android:layout_height="23dip" android:background="@drawable/triangle" /&gt; </code></pre> <p>The drawable is a triangle with transparent background. </p> <pre><code>|\ | \ |__\ </code></pre> <p>I find this ...
android
[4]
627,701
627,702
Accessing data from another class Java
<p>Okay, this is total noob stuff, and this is a simple concept I just cannot grasp from everything I've looked at.</p> <p>Currently I have some a GUI with a JList, when you select the 1st, 2nd, 3rd or whatever thing in the list it gets the respective value from a list. However, I want to move this list to a 'data' cl...
java
[1]
193,075
193,076
Java ArrayList type issue
<p>I am new in Java. Now I want to generate an ArrayList containing some values.</p> <pre><code>"Circle","blue","red","yellow","1","2","3","4" </code></pre> <p>How can I code this. I found some tutorial from internet. Only int or string accepted? How about mix? Could someone should me the code that how to do this? Th...
java
[1]
5,569,870
5,569,871
Open file dialog box
<p>I wanna use the open file dialog box to choose a folder.</p>
c#
[0]
5,630,756
5,630,757
.trigger('blur') on collection of inputs?
<p>im trying to <code>trigger('blur');</code> on a collection of inputs but i does not seem to get this right.</p> <p>example is avaible here <a href="http://jsfiddle.net/VUUme/1/" rel="nofollow">http://jsfiddle.net/VUUme/1/</a></p> <p>im getting the collection and i got the blur method done but im not sure about the...
jquery
[5]
2,417,335
2,417,336
how to access serialPort1 in another form?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/8566/best-way-to-access-a-control-on-another-form-in-winforms">Best way to access a control on another form in WinForms?</a> </p> </blockquote> <p>how can I access serialPort1 which is in form2 in the MainForm(F...
c#
[0]
1,101,475
1,101,476
can't get startActivity() to work
<p>So I was trying to get a chooser as it is shown <a href="http://developer.android.com/training/basics/intents/sending.html" rel="nofollow">here</a>... but when I write <code>startActivity(chooser);</code></p> <p>I get this error on Eclipse</p> <p><code>The method startActivity(Intent) is undefined for the type myC...
android
[4]
5,369,941
5,369,942
Change class type at runtime
<p>I have two classes (let's call them <code>A</code> and <code>B</code>), both inheriting from a common superclass (<code>C</code>).</p> <p>Let's say I need to build a <code>List</code> of <code>C</code>s. My problem is that, depending on the data received by <code>C</code>'s constructor I need to put an <code>A</cod...
java
[1]
802,975
802,976
How to change startup layout from main.xml to another layout in Android
<p>I am new to android, is there any way to change this startup layout. actually application is already developed and later I implemented login layout for this, now how can I change startup layout to login layout?</p> <p>Thanks</p>
android
[4]
4,137,169
4,137,170
how to get current date time of the system in seconds
<p>how can I get current date time of the systems in seconds in C++?</p> <p>I tried this one:</p> <pre><code>struct tm mytm = { 0 }; time_t result; result = mktime(&amp;mytm); printf("%lld\n", (long long) result); </code></pre> <p>but I got: -1?</p> <p>Thanks in advance.</p>
c++
[6]
137,840
137,841
Change M.mysite.com to WWW.mysite.com in a URL
<p>I use a javascript function on mobile page to redirect users to main page(pc). So i want to change the url! Change M.MYSITE.COM/somepath/page.HTML to WWW.MYSITE.COM/somepath/page.HTML</p> <p>Mobie URL</p> <pre><code> m.mysite.com/pics/en/?wallpaper/super-man_w39.html </code></pre> <p>To main URL </p> <pre><code>...
php
[2]
76,810
76,811
Base class usage in c #?
<p>Good day. I am just wondering how to create a base class and use it for my business objects. The base class would have some attributes like IsNew, IsDirty etc.</p> <ol> <li>What I want to know is how to inherit this base class ?</li> <li>Also what does the 'base' syntax means ? Is it always required to use 'base' t...
c#
[0]
1,518,325
1,518,326
Is there any selector to do a perfect match against text?
<p>On jQuery, I'm looking to a similar selector to <code>:contains</code> but I need to do a perfect match against an element text. Is there any?</p> <pre><code>&lt;div&gt;1&lt;/div&gt; &lt;div&gt;12&lt;/div&gt; &lt;div&gt;13&lt;/div&gt; &lt;div&gt;135&lt;/div&gt; </code></pre> <p>so If I look for <code>text = 1</cod...
jquery
[5]
4,819,902
4,819,903
Withing last 7 days
<p>Just can't get this to work. I want to check if this user bought a $45 or more bid pack in the last 7 days.</p> <pre><code> $big_amount="45"; //check if the user has purchased bids $strFind="SELECT * FROM `prepaypal` WHERE `memid`=\"$curmemid\" AND `success`='Y' AND `pid`='0' AND `amount`&gt;=\"$big...
php
[2]
4,701,156
4,701,157
Can i Detect if .text() is called on a button?
<p>Suppose i have the following html:</p> <pre><code>&lt;button class="inforTextButton" id"myButton"&gt; &lt;span class="leftSlice"&gt;&lt;/span&gt; &lt;span class="centerSlice"&gt;Approved&lt;/span&gt; &lt;span class="rightSlice"&gt;&lt;/span&gt; &lt;/button&gt; </code></pre> <p>If i call the following comm...
jquery
[5]
3,953,912
3,953,913
check for null with HtmlAgilityPack
<p>How do you check for null with HtmlAgilityPack? I'm getting "Property or indexer 'HtmlAgilityPack.HtmlNode.HasChildNodes' cannot be assigned to -- it is read only" with the following.</p> <pre><code>if (Node.Element("TD").HasChildNodes = DBNull.Value) </code></pre> <p>I"m getting "Object reference not set to an in...
asp.net
[9]
939,088
939,089
assign onclick event to function
<p>I want to call a function onclick and pass the event object to the function:</p> <pre><code> progressBarOuter.onclick = function(e) { var x; if (!e) { x=window.event.clientX; } else { x = e.clientX } yt.clickedOffset = x; yt.progressBarClicked } </code></pre> <p>S...
javascript
[3]
5,872,789
5,872,790
C++ cout fresh array gibberish
<p>When I "cout" an empty array, I get gibberish. Why?</p> <pre><code>int main() { char test[10]; cout &lt;&lt; test; return 0; } </code></pre> <p>...returns some unicode blather. An easy answer I'm sure.</p>
c++
[6]
5,703,227
5,703,228
How to use BCEL in java programming?
<p>Is BCEL(Byte code Engineering Library) directly usable in normal java 1.6 or we need to download something for using it? Or is this an in built library in java1.6? </p>
java
[1]
5,929,527
5,929,528
Android Http get request with json response
<p>I am getting json response with special characters and symbols. How can i encode to that symbol €. Please give me answer.</p> <p>Thanks</p>
android
[4]
3,878,493
3,878,494
Android merge two images
<p>I have these two images, which I basically merge on canvas. Now i want to save that canvas into an image. How should i do it or if there is any other way to merge two images.</p> <p>My sample code is - </p> <pre><code> Bitmap bmp1 = BitmapFactory.decodeResource(getResources(), R.drawabl...
android
[4]
3,098,100
3,098,101
Avoid using global variables and functions in Javascript
<p>How to alter the JavaScript code below so that it can avoid exposing the variables and functions to the global scope?</p> <pre><code>var nMax = 10; var i = 0; var step = function(){ //do stuff i += 1; if(i &lt; nMax){ step(); ...
javascript
[3]
802,368
802,369
Adding Map to collection of maps
<p>I have collection of maps.</p> <pre><code>Collection&lt;Map&lt;String,Object&gt;&gt; xyz = (Collection&lt;Map&lt;String,Object&gt;&gt;) someMethod(); xyz.add(new HashMap&lt;&gt;()); </code></pre> <p>If I try to add another map to this collection it gives me run time exception as</p> <p>UnsupportedOperation.</p> ...
java
[1]
797,335
797,336
jQuery: Finding an element
<p>I'm having trouble with this little thing. I have a code that looks like this:</p> <pre><code>&lt;table&gt;......... &lt;td&gt; &lt;span class="editable" id="name"&gt;&lt;?= $name ?&gt;&lt;/span&gt; &lt;img class="edit_field" src="icons/edit.png"/&gt; &lt;/td&gt; ....... &lt;/table&gt; </co...
jquery
[5]
604,668
604,669
Is there possibility of sum of ArrayList without looping
<p>Is there possibility of sum of <code>ArrayList</code> without looping?</p> <p>PHP provides <code>sum(array)</code> which will give the sum of array.</p> <p>The PHP code is like</p> <pre><code>$a = array(2, 4, 6, 8); echo "sum(a) = " . array_sum($a) . "\n"; </code></pre> <p>I wanted to do the same in Java:</p> <...
java
[1]
4,168,404
4,168,405
How do i hide the <h2> if the <h1> appears
<p>I'm working on a WordPress site that automatically displays an <code>h2</code> on the page as what the page/post is titled. I want to manually create <code>h1</code> for some pages and have the <code>h2</code> to be hidden if the <code>h1</code> appears. </p> <p>Is there a way to do that?</p>
php
[2]
2,777,233
2,777,234
How can I disable firebug in my webpage?
<p>How can I disable firebug using Javascript? I want to do this to hide the workings of my webpage from visitors. Is there any option to do this? </p>
javascript
[3]
4,011,940
4,011,941
how to change time in the same line
<pre><code>int main() { time_t ltime; time( &amp;ltime ); tm * pTm = localtime(&amp;ltime); while(true) { for(int i=0;i&lt;1000;i++) { if(i==999) { printf("Program time is: %02d:%02d:%02d \r", pTm-&gt;tm_hour, pTm-&gt;tm_min, pTm-&gt;tm_sec)...
c++
[6]
3,589,293
3,589,294
SSL Error on Https Request
<p>with Https request and using a DefaultHttpClient, i'm always getting an error : NativeCrypto(20889): returned from sslSelect() with result 1, error code 2 What this means and how to fix it. Thx.</p>
android
[4]
3,751,817
3,751,818
Why is this consider bad practice? or is it? (ASP.Net)
<p>Would this code be considered bad practice:</p> <pre><code>&lt;div id="sidebar"&gt; &lt;% =DisplayMeetings(12) %&gt; &lt;/div&gt; </code></pre> <p>This is a snippet of code from the default.aspx of a small web app I have worked on. It works perfectly well, runs very fast, but as always, I am aware of the fact t...
asp.net
[9]
196,959
196,960
How can I use jQuery to get the value of a field and another field and send to ajax?
<p>How can I do an Ajax called based on a user updating a number in a text box?</p> <p>I have something like the following. I removed surrounding code to make it easier to follow. I'm showing here two rows of a much larger grid.</p> <pre><code> &lt;div class="rep_tr0"&gt; &lt;div class="rep_...
jquery
[5]
5,163,998
5,163,999
How to find element type in JQuery
<p>I have an array with different elements inside it. Like array contain input elements and select elements. I want to check for particular type. I tried this but it didn't work</p> <pre><code>var mandotaryElementsArray = $('.mandotary'); $.each(mandotaryElementsArray, function(index, element){ if (element == in...
jquery
[5]
498,012
498,013
How to make a basic Forum Thread on my website?
<p>How to make a basic Forum Thread on my website ? Like they click it shows the thread without going to a new page and what not. EDIT*** Like the user he clicks something that says Thread or a Programming* and it shows all the posts and they may view that post as if it were on a whole new page without the Programming ...
php
[2]
190,436
190,437
In php how to do session instances?
<p>I'm quite new on php and am trying to learn it.</p> <p>My question is rather simple but I've been a bit lost while googling for it.</p> <p>I just want to create an object to manage the database connection. I already did the object and now the problem I'm facing is:</p> <p>How do i keep it instanced to a session? ...
php
[2]
914,763
914,764
Deriving time complexity of a function
<p>This following program is for searching two dimensional square array of positive integers with sorted rows and columns in non-decreasing order. The program returns true if target (value) element exist in array, false otherwise. I need to design algorithm for this task which will be as efficient as possible. I wrote...
java
[1]
459,743
459,744
How to use custom color for each textview in listview that extends SimpleAdapter in Android?
<p>I have a listview with custom rows and that extends SimpleAdapter. Each row consist of two linear layouts : 1st having two textviews of which one is hidden in horizontal orientation, second having two textviews in horizontal orientation. Now depending on the value in hidden textview , I want to setcolor for the rem...
android
[4]
2,687,156
2,687,157
Is there a way to assign an object property to an array?
<p>Pretty sure there is a way to do this but what I tried so far does not work</p> <p>Consider we have an object $localDB with some properties, I was looking for a clean way to build the $connexionInfo array without casting $localDB or using a foreach loop.</p> <pre><code>// This would be too easy if it worked $conn...
php
[2]
2,105,981
2,105,982
Android List adapter with a button
<p>I need to implement a list with a custom list adapter view that contains a button. Once I add the button the onClick is not triggered.</p> <p>Is there a way to make this work?</p>
android
[4]
3,826,875
3,826,876
PHP debugging + development tool?
<p>Is there a tool for PHP development that automatically displays helpful debugging information (maybe in a toolbar or something), such as $_POST data for form submission? I often find myself using error_log() or var_dump() to display information that I think would be handy to always have available without explicitly ...
php
[2]
2,425,591
2,425,592
Javascript way to disable other script tags from executing?
<p>Is there a way to use JavaScript to "remove" a script tag from the DOM BEFORE the script tag gets a chance to execute.</p>
javascript
[3]
3,435,807
3,435,808
Why does parseInt("014") come out to 12?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/850341/workarounds-for-javascript-parseint-octal-bug">Workarounds for JavaScript parseInt octal bug</a> </p> </blockquote> <p>It seems as though leading zeroes should just be ignored when parsing for an Int. Wh...
javascript
[3]
4,063,311
4,063,312
URL encoding problem
<p>I'm writing my first web application (still!), and have a problem activating user accounts.</p> <p>The way I've got it set up is that the new user fills out a form with name, email address, and all that. They submit it, and my application sends a link to the email address they provide. They click that link, which p...
php
[2]
3,294,466
3,294,467
Response.WriteFile
<p>There is one URL with specific syntax to download a file.<br> <a href="http://www.hddownloader.com/?url=http://www.youtube.com/watch?v=N-HbxNtY1g8&amp;feature=featured&amp;dldtype=128" rel="nofollow">http://www.hddownloader.com/?url=http://www.youtube.com/watch?v=N-HbxNtY1g8&amp;feature=featured&amp;dldtype=128</a> ...
asp.net
[9]
2,526,978
2,526,979
HTML tags in Content
<p>I'm implementing full text search on a table named as <code>tbljobs</code> on the cloumn named as <code>jobdescription</code>. In front end I'm getting html tags in the description. I'm showing the records in <code>GridView</code> and on <code>Gridview</code>'s <code>RowDataBound</code> enent I'm decoding the text. ...
asp.net
[9]
746,137
746,138
Standard add-contact form
<p>Is there a standard add contact form available for someone to use in the sdk?</p>
iphone
[8]
1,905,968
1,905,969
iPhone SDK: Avoid Blank screen while launching my application
<p>I am retrieving some data from server when launching my application itself. So whenever launch my application it shows a blank screen for few seconds(means it is downloading data from server) and then launches the first view. I don't want to show the blank screen to user. I want to add an image and activity indicato...
iphone
[8]
1,939,493
1,939,494
how to get method argument list from mangled name?
<p>I have following information in cobertura.xml </p> <pre><code>&lt;method name="visitNode" signature="(Lchs/cof/drawplus/IJoint;Lchs/cof/logical/schem/ISegment;Lchs/analysis/GraphServices$IGraphVisitor;I)Z" </code></pre> <p>The signature is java's mangled name for the method. (<a href="http://asm.ow2.org/do...
java
[1]
4,651,318
4,651,319
Data reading and storing in c#, (Concept..no code)
<p>I want to translate my Matlab code (least squares plane fitting) into C#. I have many problems in understanding c#. Let me ask here. Reading a text file and storing data in xyz format in matrix (e.g., xyzdata= xyz) in Matlab is quite easy. Translating it into CSharp? How can I read [x y z] without knowing length of ...
c#
[0]
668,616
668,617
Multiple photo select uisng UIImagePickerController
<p>How to select multiple photos from photo album using <code>UIImagePickerController</code> ?</p>
iphone
[8]
3,903,333
3,903,334
Image to byte array from a url
<p>I have a hyperlink which has a image, i need to read/load the image from that hyperlink &amp; assign it to a byte array (byte[]) in C#</p> <p>Thanks.</p>
c#
[0]
3,607,842
3,607,843
By clicking on cancel in confirm box close my parent window . I want that on cancel it should be on same page
<p>Clicking on cancel in confirm box closes my parent window. I want that on cancel it should stay on same page. I have written the following code for it.</p> <pre><code>function closeEditorWarning(){ var r=confirm("This will close all the opened windows of application.Do you want to continue."); if (r==true) ...
javascript
[3]
4,158,801
4,158,802
Need a simple python script to divide a text file (based on the first row)
<p>OK, I should've learned python ages ago, but didn't. Now I need a script to divide a text file into multiple text files.</p> <p>The output files have to be exactly the same as the input, except they should only contain subsets of the information, based on the values in the first row.</p> <p>So, if I have a file sp...
python
[7]
1,157,315
1,157,316
When dealing cards over the internet, is it better to distribute seed values or actual objects?
<p>I am working on a spades game that connects players over the internet, but I don't know how I should distribute the cards to players:</p> <ul> <li><p>If I send the seed values for the SecureRandom object used for shuffling to each player, they could theoretically sniff their own traffic for the values and look at t...
java
[1]
2,777,726
2,777,727
{Object|Array|Anything} to string with respect to recursion limit in PHP?
<p>Is there a straightforward way in PHP to get an arbitrary complex value into a string without triggering recursion limits? For example, passing an hugely nested object and specifying I want only 2 levels deep. </p> <p>What I want to avoid is getting an error on var_export or var_dump, even if that means that I get ...
php
[2]
259,793
259,794
Pass href to jquery
<p>I use the following code to open external pages within a div on the current page:</p> <pre><code>$(document).ready(function(){ $("#content").load("content.html"); }); (function($) { $(function() { $('.load_link').click(function() { $("#content").load($(this).attr('href')); var $row = $(this)...
jquery
[5]
3,339,382
3,339,383
Create a file from drawable
<p>I have a large number of resources in my drawable folder.All are having big size more than 500KB. I have to load all these 25 images all at once in a srollView. As usual I ran out of memory. Is there any way to reduce the size of the image programmatically.</p> <p>I got this function but it's parameter is a File an...
android
[4]
1,066,990
1,066,991
Seeing a blank page on running Install.php?
<p>I am running on localhost the installation of a php based website. I got the following error</p> <pre><code>Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\testweb\install\install.php on line 65 </code></pre> <p>Line 65 has </p> <pre><code>$Install =&amp;new INSTALL(); </co...
php
[2]