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,543,490
2,543,491
How do I incorporate the AutoAnchors jquery plugin into my web page?
<p>I'm very new to the HTML5 world and I could use some help with how to use this javascript file. </p> <blockquote> <p>jquery.autoanchors-0.3</p> </blockquote> <p>It is found here. <a href="http://fredibach.ch/jquery-plugins/autoanchors.php" rel="nofollow">http://fredibach.ch/jquery-plugins/autoanchors.php</a></p>...
javascript
[3]
3,019,734
3,019,735
handling php eval syntax error for mathematic equations
<p>suppose I do this in php:</p> <pre><code> eval("\$answer=1--1;"); </code></pre> <p>The expression 1--1 will lead to a syntax error in eval, my question is how do I detect the error and handle it gracefully? ie: catch error in eval and then print out a helpful message. Right now, it just spits out "Parse error: syn...
php
[2]
2,473,419
2,473,420
For Question About a Warning In Objective-c Coding
<p>I have one file viewcontroller.h and .m and viewcontroller1.h and .m</p> <p>In viewcontroller1.m file , i write function like BOOL rechable = [viewcontroller functionrechable];</p> <p>it gives me warning like warning:initialization makes integer from pointer without a cast</p> <p>how to remove this warnin...
iphone
[8]
2,127,768
2,127,769
how to pass, from a class to another, the name of a variable (NOT the value)
<p>I need to pass name of a variable created in <code>Class A</code> to the <code>Class B</code>, so I can put a value in that variable (in <code>Class B</code>). But, in Class B I do not know the name of that variable. The code is something like this:</p> <p>Class A</p> <pre><code>public class A { int valore; ...
android
[4]
1,839,656
1,839,657
How to convert 2 dimensional float array to byte array and viceversa
<p>I have data in the form of </p> <p><code>float [1000,2]</code> data.</p> <p>I want to convert that data in the form of byte []b.</p> <p>and again I want to convert <code>byte []b</code> to 2 dimensional array of <code>float [1000,2]</code> data</p> <p>I want to do this because i can save data to server in the fo...
c#
[0]
1,278,551
1,278,552
How to find UILabel's number of Lines
<p>I displayed the text in UILabel by using wrap method. Now I want to need to find the how many number of line is there in UILabel.</p> <p>If there is any possible way to find the UILabel's number of lines count.</p> <p>Thanks.</p>
iphone
[8]
5,171,068
5,171,069
how to connect android phone(client) to laptop using only one ip address(static)?
<p>I am doing a android project. I want to connect my client(android phone) using ip address to my laptop(server). I am using ip address of wireless modem(MTS). Each time i reconnect the ip address changes. So how can I keep this ip address constant so that only one ip address can be used for connection via wireless in...
android
[4]
3,883,322
3,883,323
Implementing Fisher–Yates shuffle loop not working
<p>I am trying to implement the Fisher–Yates shuffle but when I test this code just with alert, it doesn't seem to loop, stops after first time I think.</p> <pre><code>function scrambleWord() { var letterArray = currentWord.split(""); var m = letterArray.length, t, i; while (m) { x = Math.floor(Mat...
javascript
[3]
4,726
4,727
Adding suffix to a number using cultures
<p>I have a need to write dates in various languages. Is it possible to write a date like 1st July -3rd October using cultures?</p> <p>Cannot find a way to do it Any suggestions?</p> <p>EDIT</p> <p>What I Mean is that if the choosen culture is English it should show 1st October 2010 if Spanish should show the equiva...
c#
[0]
4,428,899
4,428,900
jQuery intercept slideToggle()
<p>I'm doing a very simple slideToggle() here:</p> <pre><code> $("#loginBtn").click(function(){ $("#login").slideToggle(); return false; }); </code></pre> <p>What i'm asking is, how do i intercept the slideToggle, so once the user clicks #loginBtn and #login slid...
jquery
[5]
1,779,830
1,779,831
how to control the buttons or tabs in the launch application using python
<p>i launched the application using the following code i.e.</p> <p>import os</p> <p>cmd = r'start C:\WindowsMediaPlayer\wmplayer.exe'</p> <p>os.system(cmd)</p> <p>say i launched win media player.. now i want to control the buttons/the menus to open a file . or do some audio settings.. any thing that is related to m...
python
[7]
1,508,843
1,508,844
Looping each() loop infinitely
<p>I am using jQuery to loop through each li element under a ul displaying them one by one. Here is the code:</p> <pre><code> $('.article_ticker li:first').siblings().hide(); var list=$('.article_ticker li:first').siblings(); list.each(function(index) { $(this).siblings().hide().delay(2000).fadeOut(); ...
jquery
[5]
2,825,860
2,825,861
Jquery multiselect DDCL not refreshed after database change until manual refresh
<p>Hi I have a Jquery DDCL widget with multiselect list box for users. When I delete or add users the same is not replicated in the list box untill i manually refresh the application.</p> <p>I can see that the list is updated in the model every time the call is made but the DDCL displays the same data untill manual re...
jquery
[5]
2,560,240
2,560,241
if setInterval is cleared?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2679141/is-there-a-way-to-check-if-a-var-is-using-setinterval">Is there a way to check if a var is using setInterval() ?</a> </p> </blockquote> <p>how can I check if a setInterval is cleared?</p> <pre><code>var...
javascript
[3]
2,197,328
2,197,329
anchor title attribute
<p>The title is showing only the first word when you mouse over the link. How can I get the whole order description to show? Thanks</p> <pre><code>&lt;a title=$row[order_description] href=order.php?order_id=$row[qid]&gt;&lt;font class=fontblueData_sub&gt; $row[prod_title]&lt;/font&gt;&lt;/a&gt; </code></pre>
php
[2]
2,875,047
2,875,048
In python, how to convert a hex ascii string to raw internal binary string?
<p>In python, how to convert a hex ascii string to binary string?</p> <p>Example, "01000001B8000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435362021222324"</p> <p>Need to be converted to a binary string.( "0A" need to be converted to 1010, not to ascii bit 1...
python
[7]
3,743,392
3,743,393
PHP Create and delete cookies using query strings
<p>I have the following two links:</p> <pre><code>&lt;a href="index.php?showDesktop=true"&gt;Show Desktop&lt;/a&gt; &lt;a href="index.php?showMobile=true"&gt;Show Mobile&lt;/a&gt; </code></pre> <p>What I want to do is make it so that if the showDesktop query is clicked then create a cookie called showDesktop and del...
php
[2]
3,523,969
3,523,970
Why won't jQuery accept this string?
<p>When I run this function:</p> <pre><code>onUnCheck: function(el) { var thenames = "icon-"+el.find("label:first").text().replace(/ /g,'').toLowerCase(); alert(thenames); $("'."+thenames+"'").hide("fast"); } </code></pre> <p>I generate a string. I can see in the alert() that it is indeed the corr...
jquery
[5]
3,578,365
3,578,366
JavaScript - How to get at specific value in a string?
<p>I have a string from which I am trying to get a specif value. The value is buried in the middle of the string. For example, the string looks like this:</p> <pre><code> Content1Save </code></pre> <p>The value I want to extract is "1";</p> <p>Currently, I use the built-in substring function to get to remove the le...
javascript
[3]
3,481,970
3,481,971
java middleware webservices - exception handling
<p>I usually see a code, which pretty much wraps with try block for the entire operation of a web service. The reasoning is to take care of un-expected results. What is the best way to convince programmers not to follow such styles? </p> <p>Of course, we do want to provide meaningful message to the client. How can...
java
[1]
3,664,472
3,664,473
jQuery focus/blur on form, not individual inputs
<p>How could this be achieved via jQuery?</p> <p>When the user clicks on any input in the form, it is focussed. When a user clicks out of the form from any input it is blurred, but, the blur does not get triggered between tabbing between inputs in the form itself.</p> <p>For something like this, we're looking at this...
jquery
[5]
4,095,709
4,095,710
1000 by 1000 for loop in android sep
<p>I have a code like this running on Android 2.3.3 (Nexus One)</p> <pre><code>for(i=0; i&lt;1000; i++){ for(j=0;j&lt;1000;j++){ do AND calculation do XOR calculation } } </code></pre> <p>Is this too much calculation for android? I went through the debugger and the debugger lost its control...
android
[4]
1,134,300
1,134,301
image quality is missing while using thumb.php
<p>I am using thumb.php to restrict image sizes.</p> <pre><code>&lt;img src="thumb.php?src=&lt;?php echo $imgurl; ?&gt;&amp;h=150&amp;w=180&amp;z=0" alt="&lt;?php the_title(); ?&gt;" width="180" height="150" /&gt; </code></pre> <p>The problem is image quality. If i do not use thumb.php and mention the width and heigh...
php
[2]
4,410,800
4,410,801
100K curl requests
<p>I am using curl_multi_exec to process over 100K requests. I do 100 requests at a time because curl_multi_exec can only handle 100 requests at a time to eventually get to 100K requests. We have added multiple servers to this system to spread the load [we are using load balancing]. What is the best way to have curl ha...
php
[2]
3,321,062
3,321,063
Determine minimum required PHP version
<p>I have to find out the earliest PHP4 version my code will run under (I already know it runs on PHP5 and on PHP 4.4.9 (the last PHP4 version -- included in MAMP).</p> <p>Are there code inspection tools that will do this? Do I need to install each PHP version and see what happens :-)</p>
php
[2]
313,932
313,933
Android android.media.audiofx not importing
<p>I am not able to import android.media.audiofx in my project.</p> <p>Is audiofx have some dependency with android version. I'm currently working on 2.2.</p> <p>Thanks in advance.</p>
android
[4]
1,428,171
1,428,172
How to go back to the last accessed activity?
<pre><code> back = (Button) findViewById(R.id.back); back.setOnClickListener(new View.OnClickListener() { public void onClick(View v1) { Intent setIntent = new Intent(Intent.ACTION_MAIN); setIntent.addCategory(Intent.CATEGORY_HOME); setIntent.setFlags(Intent.FLAG_A...
android
[4]
5,593,235
5,593,236
how to turn 'C:\Music\song.mp3' into r'C:\Music\song.mp3'
<p>I have been making an mp3 player with Tkinter and the module mp3play.</p> <p>Say i had the song to play: C:\Music\song.mp3</p> <p>and to play that song i have to run this script:</p> <pre><code>import mp3play music_file=r'C:\Music\song.mp3' clip = mp3play.load(music_file) clip.play() </code></pre> <p>Easy enough...
python
[7]
4,364,767
4,364,768
Strange behavior with ++i twice in single std::cout <<
<p>Can someone please explain this to me. </p> <p>below is the simplest of all codes, I am running a while loop 9 or 10 times and inside it I am displaying a variable incrementing it everytime the loop runs. But I do not understand the output or the warning message I get during compilation.</p> <p><strong>code- with ...
c++
[6]
545,251
545,252
jQuery: missing ] after element list
<p>I have that error in the code below. What's wrong ? I have no ideas left.</p> <pre><code>missing ] after element list [object XMLHttpRequest] $(function () { setInterval($.post('/Sale/UpdatePrice', {SaleId : @Model.Id}, function(dat...
jquery
[5]
861,842
861,843
Stop scheduled JavaScript execution
<p>I have a function, where I define lots of setTimeout() functions . When user presses the button, it's starting the execution.</p> <p>How can I cancel it ?</p> <p>Is there any way to cancel ALL timeouts (assuming that I have multiple without the name)</p>
javascript
[3]
1,689,838
1,689,839
Combine 3 strings into one
<p>I've been trying to combine 3 strings into one and having trouble doing so.</p> <p>the strings are below.</p> <pre><code>$from="/2/3/4/5/6/"; $to="/30/31/32/33/34/"; $sub="/2/3/4/5/6/7/8/9/10/11/12/";#this is dynamic, ever changing past &gt; (/2/3/4/5/6/) </code></pre> <p>the output must look like this below.</p>...
php
[2]
5,896,155
5,896,156
Help with expandable div in javascript
<p>Hi i'm new to JavaScript and i am looking to learn how to put a <code>&lt;div&gt;</code> within a <code>&lt;div&gt;</code> so when the user clicks on the first one it opens the content of the second(hidden until clicked) and closes so my page wont be a million miles of scrolling down . but my problem is the all the ...
javascript
[3]
1,413,499
1,413,500
Call a function based on the device's screen size (hdpi/ldpi/mdpi)
<p>On mdpi device I would like to call this method:</p> <pre><code>final float scale = getResources().getDisplayMetrics().density; double height_px = 45 * scale + 0.5; </code></pre> <p>but I want to ignore the method when the app is run on hdpi devices, how am I able to determine the screen size on my class?</p>
android
[4]
1,691,481
1,691,482
When I prepend data to an existing page, it doesn't perfom any jQuery actions
<pre><code>&lt;div id="partition"&gt; hello &lt;input type="button" id="btn" value="submit"&gt; &lt;/div&gt; &lt;!-- partitions ends --&gt; &lt;!-- this posts the data and prepends the return data to partition div --&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $('#butt...
jquery
[5]
5,134,592
5,134,593
php - Website cannot be displayed
<p><strong>Below is the Code</strong></p> <pre><code>&lt;? include('config.php'); // table name $tbl_name=temp_members_db; // Random confirmation code $confirm_code=md5(uniqid(rand())); // values sent from form $name=$_POST['name']; $email=$_POST['email']; $country=$_POST['country']; // Insert data into databa...
php
[2]
5,045,243
5,045,244
Virtual templates members of class workaround
<p>Let's say that I want to implement some classes for containers. All of them should implement such functions like insert, remove etc. So I write some interface:</p> <pre><code>template &lt;class T&gt; class ContainerInterface { public: virtual void insert(T element) = 0; template&lt;class Predicate&gt; vir...
c++
[6]
2,695,879
2,695,880
alert when not satisfying the condition should stay on the same pane in a wizard
<p>I am trying to check if the user entered particular info or not...if entered on click of the next button on a wizard pane that should be redirected to next pane or else should be on the same pane..</p> <p>I tried the below code..but when the user doesn't enter info the alert message is popped but it is redirected t...
javascript
[3]
1,464,086
1,464,087
Multiple Web.Config files - from a code point-of-view
<p>ASP.NET allows for Web.Config files at sub-levels within a site structure. However, I can't find any articles discussing how this looks from code.</p> <p>In the Orchard CMS there are config files all over the shop. There's even a config file in a folder containing only .CSS files! I'm new to larger-scale ASP.NET ap...
asp.net
[9]
2,674,087
2,674,088
C++: overloaded destructor?
<p><a href="http://www.boost.org/doc/libs/1_46_1/libs/utility/enable_if.html" rel="nofollow">enable_if doc page</a> says:</p> <blockquote> <p>Constructors and destructors do not have a return type; an extra argument is the only option.</p> </blockquote> <p>Are destructors overloadable?</p> <p>Thank you.</p>
c++
[6]
985,154
985,155
best way to reference event arguments in asp.net
<p>Best practices question.</p> <p>While I was writing some event handlers, I ran into an issue where I as looking at the incorrect event (GridViewRowEventArgs) when I should have been looking at something else.</p> <p>Now to solve my problem, instead of referencing the very specific event I was looking at, I just us...
asp.net
[9]
4,343,383
4,343,384
Why are my objects showing up as "[object Object]"?
<p>I'm trying to bubble sort an array of records by age but all I get is: </p> <blockquote> <p>[object Object], [object Object], [object Object]</p> </blockquote> <p>How can I get it to display the values of the record?</p> <pre><code>students = [ {name: "timothy", age: "9"}, {name: "claire", age: "12"}, ...
javascript
[3]
2,348,402
2,348,403
c++ program gets segmentation fault
<p>I've been working on some coding and I ran into a segmentation fault. I've tried my best to make it work but I kept failing. Now I am asking for help. This is my code:</p> <pre><code>#include &lt;iostream&gt; #include &lt;string&gt; using namespace std; int main() { string symbols = "ABCDEFGHIJKLMNOPRSTUVYZ_...
c++
[6]
2,137,035
2,137,036
Restrict additional pagehead in sharepoint popup window
<p>hi i have added additionalpagehead in sharepoint which will run a javascript functions to show some texts. It is working fine in all the sharepoint pages but it is working in sharepoint popup window also. How can i restrict it from popup windows</p>
javascript
[3]
4,628,809
4,628,810
javascript executing then undoing
<p>I have an aspx page where I'm trying to hide a div based on a button click. It seems as though the javascript executes but then the div shows back up immediately. It seems like the page is refreshing as well.</p> <pre><code>function hideDiv2() { document.getElementById("div2").style.display = "none"; ...
javascript
[3]
5,831,417
5,831,418
Loop json parsed data
<p>I have this data:</p> <pre><code>[ [ {"id":"1", "sentiment":"0", "name":"Company 1", "count":"10"}, {"id":"2", "sentiment":"0", "name":"Company 2", "count":"5"}, {"id":"3", "sentiment":"0", "name":"Company 3", "count":"7"} ], [ {"id":"1", "sentiment":"1", "name":"Company 1", "cou...
jquery
[5]
4,103,321
4,103,322
How decode url to windows-1251 in python
<p>How decode url to windows-1251 in python 2.7 and python 3.2?<br> Example:</p> <pre><code>a = "пример" urllib.quote_plus(a) '%D0%BF%D1%80%D0%B8%D0%BC%D0%B5%D1%80' (unicode) </code></pre> <p>How to make It in windows-1251 (%EF%F0%E8%EC%E5%F0)</p>
python
[7]
4,851,609
4,851,610
cover flow in iphone
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/718984/open-source-iphone-coverflow-like-library">Open source iPhone Coverflow like library</a> </p> </blockquote> <p>hello all i want to develop cover flow application in my native iphone application please gui...
iphone
[8]
5,094,535
5,094,536
Class member functions static and private
<p>Does it make sense to have some class member function say f() both private and static? e.g.</p> <pre><code>class MyClass { ... private: static int foo(); } </code></pre> <p>Thanks.</p> <p>Hi thanks for all your comments! Ok, I got it. Yes, indeed initially I started using static functions in my class because th...
c++
[6]
4,656,455
4,656,456
Java: How do I check if array has been initialized?
<p>I want to check if a certain element in an array has been initilized, how can I do this?</p>
java
[1]
546,372
546,373
Can't store too lengthy int type
<p>Consider the problem:</p> <pre><code>It can be shown that for some powers of two in decimal format like: 2^9 = 512 2^89 = 618,970,019,642,690,137,449,562,112 </code></pre> <p>The results end in a string consisting of 1s and 2s. In fact, it can be proven that for every integer R, there exists a power of 2 such that...
c++
[6]
5,680,836
5,680,837
list within a list within a list in python
<p>I wrote this but I don't understand why it is not working. By the way I am a beginner in programming.</p> <pre><code>fav_colours=[["bob"["likes:blue, hates:red"]],["john"["likes:red,hates:black"]], ["adam"["likes:purple,hates:pink"]]] print fav_colours </code></pre> <p>I don't think there is any error.Thanks in ...
python
[7]
373,415
373,416
MVC pattern with SimpleData ( mapping class )
<p>I writing application based on database and framework SimpleData. This is my classes:</p> <pre><code>public class Clients { public int ID_C { get; set; } public string Corporation { get; set; } public string Name { get; set; } public string Surname { get; set; } public string Note { get; set; } ...
c#
[0]
2,845,952
2,845,953
DataTable.Select() Distinct then add values
<p>I just need to SELECT Distinct values from columnA then ADD the values that has joined to columnB</p> <p>Sample:</p> <pre><code>columnA | columnB A 3 B 4 A 3 A 2 B 1 C 3 </code></pre> <p>Result:</p> <pre><code>column...
c#
[0]
3,702,378
3,702,379
Autocreate object when property is called
<p>Im wondering if there is a way to autocreate object if a property is called. An example:</p> <pre><code>&lt;?php echo $myObj-&gt;myProperty ?&gt; </code></pre> <p>This code will of course fail because i did not initiate $myObj before reading the property. What im looking for is a way to automaticly initiate $myO...
php
[2]
5,524,646
5,524,647
java find a biginteger within specific range
<p>Im developing an application with java which needs to find two big integers (Y and Z) that meet this two conditions:</p> <pre><code>Y^k &lt; N and Z^j &lt; N &lt; Z^(j+1) </code></pre> <p>N, k and j are known. N is a big integer(1024bit). </p> <p>My current implementations finds Y and Z by choosing a random Big...
java
[1]
901,774
901,775
onActivityResult() Intent data is always null
<p>Can somebody tell my why the <code>Intent data</code> is always null?</p> <pre><code>@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode == RESULT_OK) { if (requestCode == UPDATE_PROFILE_REQUEST_CODE...
android
[4]
168,861
168,862
Pass a variable from one file to another c#
<p>I have two .cs files (<code>Hex2Bin.cs</code> and <code>Program.cs</code>) and I want to pass the variable <code>end_addr</code> from <code>Program.cs</code> to <code>Hex2Bin.cs</code></p> <p>My code in Program.cs:</p> <pre><code>class Program { enum to_exit { exit_ok = 0, exit_invalid_args, ...
c#
[0]
2,270,879
2,270,880
How to remove black border from AlertDialog builder
<p>Actually i have created an custom dialog using AlertDialog.builder.In this dialog i am not displaying the titile.All works fine but there is an black border appear in the dialog.so can anyone tell me how can i remove this black boder.The code and screenshot are below.</p> <p><strong>code in java:</strong></p> <pre...
android
[4]
1,825,603
1,825,604
Errors while using VideoView in Android
<p>The following sample code I am using from the API demo app for playing the streaming videos</p> <p>public class VideoViewDemo extends Activity {</p> <pre><code>/** * TODO: Set the path variable to a streaming video URL or a local media * file path. */ private String path = ""; private VideoView mVideoView; @Ov...
android
[4]
2,623,836
2,623,837
Prevent imagecreatefromjpeg from stopping script
<p>I am using imagecreatefromjpeg on a shared host, so if the image is to big then imagecreatefromjpeg will give me an "out of memmory error" and terminate the script.</p> <p>Is there anyway to catch the out of memmory error, and simply let imagecreatefromjpeg fail(Return false) instead of terminating the script?</p>
php
[2]
1,701,899
1,701,900
Maintain usercontrol state accross pages
<p>i want to maintain user control state accross two to three pages,</p> <p>how can i do it?</p> <p>that two to three pages have same user control(with out session)</p> <p><em>flow</em></p> <p>i have two pages one for listing page ,whaen clicking on any listing goes to detail page so with these two pages left side ...
asp.net
[9]
3,415,587
3,415,588
How to call .html() within .html()?
<p>I need to create something like this. when I click on an image, it will fire the script below.</p> <pre><code>$("#txtHint").html("&lt;form action='inline_spec.php' id = 'upLoadForm' method='post' enctype='multipart/form-data'&gt;&lt;center&gt;&lt;input type='text' id='file' name = 'file' style='visibility:show' &gt...
jquery
[5]
1,065,431
1,065,432
Decrement 2 in For C++
<p>I decrement a number twos, but over all I can do FOR 1.</p> <p>How I can do? Here is the basic FOR</p> <pre><code>for (i=n;i&gt;0;i--) </code></pre> <p>But decrement 1. </p> <pre><code>int main(int argc, char *argv[]) { int n,i,e; char op; cout&lt;&lt;"ingrese un numero para realizar las operaciones descript...
c++
[6]
5,149,136
5,149,137
Show time from microtime in top of page
<p>I am using microtime to get the script execution time</p> <pre><code>$time_start = microtime(true); .... .... //many process here, many result be printed here $time_end = microtime(true); $time = substr(($time_end - $time_start),0,5); echo time; </code></pre> <p>is it possible to print <code>$time</code> in above ...
php
[2]
5,861,472
5,861,473
How to get numerical value from String containing digits and characters
<p>Is there any built in method to get which can parse int from string ("23px")?</p> <p>I know I can use <code>substring</code> and then <code>parseInt</code> but I want to know if there is any other way available to do this.</p>
javascript
[3]
627,472
627,473
forward declaration of class in c++
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1885471/c-forward-declaration-of-class-doesnt-seem-to-work">C++: Forward declaration of class doesn&#39;t seem to work?</a> </p> </blockquote> <pre><code>#include &lt;iostream&gt; #include &lt;string&gt; class...
c++
[6]
5,505,293
5,505,294
how to use include tag for setting herder in all activity android?
<p>i want toe create common template for my android application.i don't know how? some body told use include tag.I need some example for this.</p>
android
[4]
1,741,755
1,741,756
Build android source in user mode
<p>I want to build the android sdk in user mode .Could any one guide me in this.Please tell me the steps in achieving this.</p> <p>Thanks in advance</p>
android
[4]
4,018,022
4,018,023
Android ServerSocket Authentication, how?
<p>I made a serversocket, what is connected to my WIFI's inner IP. 192.168...:8080</p> <p>i'd like to make a basic authentication, how Can i do that? (name, pass authentication)</p>
android
[4]
2,009,039
2,009,040
write formated file
<p>I want to to write <code>np.double</code> to formated file:</p> <pre><code>import numpy as np a='12 45 87 34 65'; s=np.double(a.split()) fid=open('qqq.txt','wt') fid.write('%5.1f %5.1f %5.1f %5.1f %5.1f ' %(s[0],s[1],s[2],s[3],s[4])) fid.close() </code></pre> <p>Can this "write" row be written in a shorter way?</p...
python
[7]
2,612,649
2,612,650
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]
4,838,101
4,838,102
javascript syntax $
<p>i'm reading a javascript source code , and i haven't written javascript before. i'm confused about some syntax of it. </p> <pre><code>&lt;script id="source" language="javascript" type="text/javascript"&gt; $(function () { window.onload=function() { mkAjaxObj(0,0); } }); &lt;/script&gt; </code></pre> ...
javascript
[3]
2,415,107
2,415,108
How to implement search function on Android?
<p>I am trying to have a simple search function be it a bar or what ever with suggestion or do you call it autocomplete. And when i tab/click on these suggestions, it brings me to the xml(layouts) pages i already created.</p>
android
[4]
3,327,779
3,327,780
Adding calendar source files in Java problem
<p>I am trying to create a calendar instance.</p> <p>I have imported the java.util.calendar but when I mouse over my code to create a calendar instance, it tells me that it cannot find the element in the attached javadoc or the source file.</p> <p>From researching on google, I tried adding rt.jar but it hasn't change...
java
[1]
4,769,692
4,769,693
in java how to make sure the passed object is modified by only object to which it is passed?
<p>Suppose that I have a class which takes an array of Key object to construct an object of class keyHandler, like this:</p> <pre><code>class KeyHandler { Key[] keys; public KeyHandler(Key[] keys) { this.keys=keys } //more methods which modify key; } </code></pre> <p>now I call this construct...
java
[1]
1,925,854
1,925,855
How can I use / in strings in java?
<p>I would like to know how I can use <code>/</code> in java because it doesn't consider it as a simple <code>/</code> .</p>
java
[1]
2,624,275
2,624,276
looping .load jquery setting rel
<pre><code>var resultValue = $("#"+temp+" .panId").val(); for(var i=0; i&lt;totalPanel;i++) { $("#"+temp+" .panelDiv").append('&lt;div class="panelDiv' + resultValue + '"&gt;&lt;/div&gt;'); $("#"+temp+" .panelDiv" +resultValue ).load("Panel.html #w", function(){ $(".panelDiv"+(resultValue-1)+" .txtWidth...
jquery
[5]
3,031,022
3,031,023
Notifications in android by comparing the system time with database values using background service
<p>I am developing an android app.I wan to provide five notifications per day.I will store the notification time in sqlite database.Then I compare this db notification time with the devices time in a repeating loop using service.But the notification will not work properly.Forceclose appeared.....I need the help</p>
android
[4]
3,693,346
3,693,347
Searching text files to get specific double
<p>I am writing a bank account program for my Comp Sci class, and need to search a .txt file for a account number a user enters (which is an int) and then pull out the next row which is the balance. i.e. the user enters the account #12345679 and i need to pull out the balance of it. Below is an example of the txt file<...
java
[1]
2,356,643
2,356,644
How to find an element with a specific "left" value in jQuery
<p>So lets say i have the following html:</p> <pre><code>&lt;div class="con"&gt; &lt;ul&gt; &lt;li class="a"&gt;1&lt;/li&gt; &lt;li class="b"&gt;2&lt;/li&gt; &lt;li class="c"&gt;3&lt;/li&gt; &lt;li class="d"&gt;4&lt;/li&gt; &lt;li class="e"&gt;5&lt;/li&gt; &lt;li cla...
jquery
[5]
4,336,162
4,336,163
to show an error message while entering duplicates when column is primary key
<p>As in table named Emp i have Name Column is Primary key,when i add duplicate name like (Bharat Mali) which is already present in database,this record is not get added in database,but showing me this message( employee added successfully) i want to show a message to user like(duplicate values can't be stored). I am u...
c#
[0]
2,915,240
2,915,241
Easy way (with out eval) to turn a passed string into an object refereance in JS?
<p>So let's say I have a in page function:</p> <pre><code>&lt;img src="someImage.jpg" onclick="doSomething(this.id)" id="someVar" alt="blah" /&gt; </code></pre> <p>and I have a class set up:</p> <pre><code>function anObject(someProp) { this.someProp=someProp; } someVar=anObject("prop"); </code></pre> <p>Where I hav...
javascript
[3]
1,426,469
1,426,470
Question about references
<p>I think the following is really basic but I don't really get what would be the "advantages" of one of these code.</p> <p>Having this:</p> <pre><code>int main() { int a = 10; f(a); return 0; } </code></pre> <p>What would be the difference between</p> <pre><code>void f(int&amp; a) { int&amp; b = a;...
c++
[6]
2,552,558
2,552,559
Caller function in PHP 5?
<p>Is there a PHP function to find out the name of the caller function in a given function?</p>
php
[2]
1,694,848
1,694,849
Create folder during application installation in android
<p>Can we create a directory on the internal storage of the device during application installation .Also after creating that i need to copy some images and music to that directory from our res folder. Does anyone have any ideas as to create a directory at install time? Thanks in advance </p>
android
[4]
5,305,319
5,305,320
Multiply 2 input fields on keyup?
<p>I've got 2 fields </p> <pre><code>&lt;input id="E_Item1" name="E_Item1"&gt; &lt;input id="E_CCNM" name="E_CCNM"&gt; </code></pre> <p>In JQuery, how would I go about multiplying the values of these fields together on keyup into a div?</p>
jquery
[5]
5,308,432
5,308,433
Jquery .flv player
<p>I already google this but unfortunately couldn't find any answer! can you please let me know if you are aware of any jQuery plugin or tuto which is able to display ".flv" videos? I have lots of .flv video and no time to convert them to other html5 supported formats.</p> <p>Thanks alot</p>
jquery
[5]
198,930
198,931
How to remove strings with numbers and special characters using javascript regular expressions?
<pre><code>var string = "[Account0].&amp;[1]+[Account1].&amp;[2]+[Account2].&amp;[3]+[Account3].&amp;[4]"; var numbers = string.match(/(\d+)/gi); alert(numbers.join(',')); </code></pre> <p>here outpout is : 0,1,1,2,2,3,3,4</p> <p>Here I need to elimanate all the strings with numbers and special characters.</p> <p>c...
javascript
[3]
2,707,329
2,707,330
Accessing object properties by variable
<p>I've seen this asked before, but my particular case appears to be someone odd, and I'm unable to resolve it - any insight would be appreciated.</p> <p>I'm trying to access an object property with a variable value, ie.</p> <pre><code>$foo = new Object(); $foo-&gt;first = 'bar'; $array = array(0 =&gt;'first', 1 =&g...
php
[2]
1,974,916
1,974,917
script is send then Page is not redirect
<p>If click the submit button, then this code should execute, but this is not working.</p> <pre><code>header('Location: http://www.yourtargeturl.com'); //script api echo '&lt;script&gt;window.open("'.$_SERVER['PHP_SELF'].'","_self")&lt;/script&gt;'; </code></pre>
php
[2]
4,669,373
4,669,374
convert .gif image from an url to .png
<p>how to convert .gif image from an url to .png ?, i have a url containing .gif images. Do simulator support .gif image?</p> <pre><code>self.imageView.image = [UIImage imageWithData: [NSData dataWithContentsOfURL: [NSURL URLWithString: [dic objectForKey:@"PictureURL"]]]]; </code></pre>
iphone
[8]
1,119,922
1,119,923
JavaScript - Get calling object
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/280389/javascript-how-do-you-find-the-caller-function">Javascript how do you find the caller function?</a> </p> </blockquote> <p>Hi guys!</p> <p>Is there a way to get the value of <code>this</code> from the fun...
javascript
[3]
2,743,064
2,743,065
Switching out an object's prototype
<p>I'm trying to understand how prototypes work. Why does the following break?</p> <pre><code>var A = function A(){this.a = 0}, aa = new A; A.prototype = {hi:"hello"}; aa.constructor.prototype //-&gt;{hi:"hello"} ok so far :) aa.hi //undefined?? why? :( </code></pre> <p>Thanks in advance!</p>
javascript
[3]
5,111,183
5,111,184
Closure confusion
<p>I am having some confusion regarding this Closure thing. I have two separate codes below that look similar but their output are different. </p> <pre><code>function setup(x) { var array = []; for(var i=0;i&lt;arguments.length;i++){ array[i]= arguments[i]; } return array; } console.log(setup('a','b')); // will o...
javascript
[3]
513,254
513,255
Crashing issue in differnt Kernel version of Android SDk 2.2
<p>I have my application working fine with : Firmware Version : 2.2 Model Number GT-P1000 Kernel Version 2.6.32.9 root@SE-S605 #4 Build Number :FROYO.DDJK3</p> <p>But same application is getting crash with details:</p> <p>Firmware version 2.2 Build number FROYO.VFJM2 Kernel version 2.6.32.9 root@SEI-27#1</p> <p>The...
android
[4]
3,784,056
3,784,057
how do I check image size in android while uploading from phone gallery?
<p>i want to check image size once user select an image from gallery.Because big size images are not allowed in my app. Can anyone help me ?</p>
android
[4]
1,261,465
1,261,466
Using (void)awakeFromNib
<p>I am trying to run an action when the application starts. The action checkAtStart is supposed to display an alert if there is no text in field1 and hide startView if there is text in field1. checkAtStart works fine if assigned to a button, but when I try to run it using (void)awakeFromNib, the alert will display no ...
iphone
[8]
2,918,694
2,918,695
How to hide ajax modal popup extender when clicking browser's back button?
<p>I have shown one confirmation message using ajax modal pop up extender during button click in server side in asp.net. After showing that confirmation message, when i click browser's back button, the same pop up confirmation message coming again. How to hide that pop up message when i click browser's back button?</p>...
asp.net
[9]
4,939,978
4,939,979
python function that modifies parameters
<pre><code>def add(a,b): for i in range(len(a)): a[i] = a[i] + b def main(): amounts = [100,200] rate = 1 add(amounts,rate) print amounts main() </code></pre> <p>The function add does not have a return. I read that changes are available to only mutable objects like list. But why did the p...
python
[7]