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,550,225
5,550,226
c++ basic problem
<p>hi everybody out there i have a problem in file handling i,m writing a code for file handling my code igs folowing </p> <pre><code>ofstream SaveFile("/home/core-site2.xml") //SaveFile&lt;&lt;"&lt;?xml version="1.0"?&gt;" ; SaveFile &lt;&lt;endl ; SaveFile&lt;&lt;"&lt;?xml-stylesheet type="text/xsl" href="configu...
c++
[6]
163,703
163,704
How to fix android.os.DeadObjectException android X
<p>When android unbind a service I created (service.MyService), I see the following DeadObjectException.</p> <p>Can you please tell me how what does this mean and can I fix this exception?</p> <pre><code>W/ActivityManager( 583): Exception when unbinding service com.mycompany/.service.MyService W/ActivityManager( 5...
android
[4]
3,158,216
3,158,217
Can I have a common Queue to queue up the requests received through function call?
<p>I will be happy, if you can give me some suggestions to solve my problem.</p> <p>I have to make a function call from one program to another program (separate package). Now my question is, can i have a common Queue in the called program in which all the calling requests will be queued up ???? is it possible to main...
java
[1]
2,306,755
2,306,756
I left Python learning because of Python 2 vs 3. Please Help
<p>I wanted To learn how to program for the first time. Because i`m mainly practice on IT and Security, I choose to start with Python.</p> <p>But, As is started to learn Python 3, I came to realize that Non of the modules I wanted to use were ported to Python 3, and even Django (one of the main reasons I wanted to le...
python
[7]
4,033,984
4,033,985
Best Place to Filter Inputs?
<p>I am wondering where the best place to filter user submitted input is. In regards to filter, I am talking about <a href="http://php.net/manual/en/function.filter-var.php" rel="nofollow">filter_var</a> and <a href="http://www.php.net/manual/en/function.filter-input.php" rel="nofollow">filter_input</a>.</p> <p>I've c...
php
[2]
2,124,529
2,124,530
Which one is better in terms of readability?
<p>If you have to check 3 conditions, and in an cases return the same value, like in this example:</p> <pre><code> if (designatorType != AttributeDesignator.ENVIRONMENT_TARGET) return new EvaluationResult(BagAttribute. createEmptyBag(attributeType)); ...
java
[1]
5,821,074
5,821,075
how to be easier to analyse the json
<p>i want to analyse the json just like:</p> <p>[{"id":"ssq","name":"双色球","term":"2010092","date":"2010-08-12 19:15","numbers":{"normal":"3,13,19,27,28,30","special":"2"},"jackpot":"30000000"},{"id":"3d","name":"3D","term":"2010216","date":"2010-08-12 19:55","numbers":{"normal":"6,8,8"},"jackpot":"-"},{"id":"qlc","nam...
android
[4]
43,126
43,127
select all options in select listbox by default -- javascript
<p>I have a form which has a select list associated with the field <code>players</code>.</p> <p>To populate the listbox, user clicks on a button on the form to display a popup and from that popup select players' names and then click another button on the popup which closes the popup and displays the selected values in...
javascript
[3]
4,362,686
4,362,687
Get multiple character positions in array?
<p>I want to get position of dots and commas in an array.</p> <p>w.wer,ads,</p> <p>should give something like:</p> <pre><code>[0] &gt; 1 [1] &gt; 5 [2] &gt; 9 </code></pre> <p>How can this be done with javascript?</p>
javascript
[3]
553,097
553,098
How does the Search Predicate of Findall work in a generic List
<p>I am able to work with the findAll and it's predicate...but I am wondering about the mechanics that makes it work.</p> <pre><code> List&lt;BradCollection&gt; b = myList.FindAll(SearchForMe); List&lt;BradCollection&gt; SearchForMe(string str) { if (str.Contains("brad")) return true; else return false; }...
c#
[0]
389
390
insatll php-fpm patch for php5.2.x
<p>I have php 5.2.17 and i download relevent php-fpmm file "php-5.2.17-fpm-0.5.14.diff.gz " form php-fpm.rg But I don't know how to install this patch i use slackware 13.1 x64</p>
php
[2]
4,332,656
4,332,657
recursive template types
<p>I want to make following code snippet to work</p> <pre><code>typedef boost::function&lt;result_type ()&gt; functor_type; typedef boost::variant&lt;int, functor_type&gt; result_type; </code></pre> <p>two types depend on each other, how to break the circular dependencies?</p> <hr> <p>The Motivation</p> <p>Basicly...
c++
[6]
4,755,400
4,755,401
How can I make some lines of code to run only one time
<p>Two classes in the same assembly: <code>Class A</code> and <code>Static</code> <code>Class B</code></p> <p>In a method of <code>ClassA</code>, I am calling a method in <code>ClassB</code>,... but I want that to be called only one time and not every single time that I am caling that method of <code>ClassA</code> ......
c#
[0]
1,131,094
1,131,095
pdf download from mysql database
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1204630/create-a-pdf-file-with-php">Create a PDF file with PHP</a> </p> </blockquote> <p>i need help..i want a php code to download information stored in the mysql database and save it in a pdf file.. so far, ...
php
[2]
4,178,182
4,178,183
sampling files from a folder
<p>I have a folder containing 100000 files, and need to get 1000 files from this folder through random sampling. Are there any sample functions that I can use to sample from folder? In addition, how to copy the sampled files to another folder?</p>
java
[1]
2,112,214
2,112,215
Launching application on iPhone for non-developer
<p>Say I have created an application, and I want my friend to have it. (I am not going to submit it to the App Store; I just want my friend to run it on her iPhone). </p> <p>I am not going to give the code, but is there any way I could create something like an <code>.exe</code> file, where she could launch it easily ?...
iphone
[8]
4,084,829
4,084,830
Is jQuery runs only client side controll and gives error when we add runat=server
<p>I am working on a Portfolio project in which I am displaying Images in a Div "Book" . For giveng it an effect am using a jQuery that set the Div's size to a fixed size(500*700). Everything was going fine.</p> <p>Now I need to controll the size of the division at runtime(new requirement). as soon as i add runat="ser...
jquery
[5]
3,734,981
3,734,982
How to check a clicked button's second class?
<p>If I have two button, one with an <code>apple</code> class and the other with an <code>apple</code> and and <code>orange</code> class:</p> <pre><code>&lt;button class="apple"/&gt; &lt;button class="apple orange"/&gt; </code></pre> <p>In my button click event for an <code>apple</code> button, how can I tell if the ...
jquery
[5]
4,950,762
4,950,763
Finding the second highest number in array
<p>I'm having difficulty to understand the logic behind the method to find the second highest number in array. The method used is to find the highest in the array but less than the previous highest (which has already been found). The thing that I still can't figure it out is why <code>|| highest_score == second_highest...
java
[1]
2,030,682
2,030,683
If you use a database to store $_SESSION with session_set_save_handler should you encrypt?
<p>If you use a database to store $_SESSION with session_set_save_handler should yoou encrypt? If you should encrypt any recommendations on what to use to encrypt?</p>
php
[2]
1,655,004
1,655,005
How do I access call log for android?
<p>I would like to recieve call log e.g numbers of call make by this person, number of minutes called, etc.</p> <p>How do I archieve this in android?</p>
android
[4]
1,971,159
1,971,160
find unique items in a set of arrays and remove non-uniques from arrays found
<p>Givven an object with <strong>Key</strong> as an Array (of position) and <strong>Value</strong> as an Array as well:</p> <pre><code>// Example Object 0,2 : [6, 8, 9] 0,3 : [1, 6, 8] 0,4 : [6, 8] 0,5 : [6, 8] 0,6 : [4, 5, 8, 9] 0,7 : [5, 8] 0,8 : [4, 5, 7, 9] </code></pre> <p>(it was created like this:</p> <pre><c...
javascript
[3]
76,362
76,363
Configuring Android app settings via its website. Any pointers?
<p>I need some guidance/tutorial links/code logic to know how can we use web to configure an android app installed on a non-rooted android phone.</p> <p>Eg. Disable some functionality of the app by logging on to the app's website and disabling the setting. What trigger does the website send to the app and how does thi...
android
[4]
5,577,479
5,577,480
Variable in load function SimpleImage class
<p>I have problem with SimpleImage class. </p> <p>In case I have in load filename.extension (like 51533b35b6096.jpg) it works. </p> <pre><code>$image = new SimpleImage(); $image-&gt;load('51533b35b6096.jpg'); $image-&gt;resize(900,700); $image-&gt;save("./images/b_" . $img_name); </code></pre> <p>If I add variable ...
php
[2]
3,108,943
3,108,944
Start and stop div scrolling between two other divs
<p>Someone else recently helped me out with the start of this question but I'm after a little more help. I currently have this working - </p> <pre><code>var windw = this; $.fn.followTo = function ( elem ) { var $this = this, $window = $(windw), $bumper = $(elem), bumperPos = $bumper.offset().top, this...
jquery
[5]
3,006,483
3,006,484
How to get similar records from database and show in popup using php
<p>I Have 3 html fields when entered the values and click on find similar records button we have to get the similar records which are present in database table.</p> <p>The 3 html fields were there in 3 different tables in database. How can i achieve this using php.</p> <p>HTML Code: User Form ...
php
[2]
357,242
357,243
How to Serialize unserializable object in .NET
<p>I have 3-rd party dll. From that I receive an object of some type (I know its interface, but not all the object). That object is not marked as serializable and I'm not related to that libruary development at all. </p> <p>I want to serialize it to some storage and then receive it from storage with <strong>the same s...
c#
[0]
3,964,970
3,964,971
Context menu by short click
<p>Sorry for stupid question, but what I should change/add in that code- to show context menu by short click on item in list view?</p> <pre><code>public class MyActivity extends ListActivity implements AdapterView.OnItemClickListener { static final String[] COUNTRIES = new String[]{ "Afghanistan", "Alb...
android
[4]
5,015,351
5,015,352
How do i use labels that are in Form1 dsigner at the new class?
<p>For example in my new class i have this:</p> <pre><code>if ((connectionStart[f] == i &amp;&amp; connectionEnd[f] == j) || (connectionStart[f] == j &amp;&amp; connectionEnd[f] == i)) // this checking dosent work good ! { //button2.Enabled = false; return; ...
c#
[0]
683,859
683,860
getting error in HTTPURLConnection while running program on linux server
<p>I am running a progrom which is successfully running on my local machine(Success 200 Ok) but when I upload this to my linux web server I am getting the 404 error code.</p> <p>My Code Is:</p> <pre><code>try{ String url = "http://sms.bazaardekho.com/ComposeSMS.aspx"; String charset = "UTF-8"; String username = "shai...
java
[1]
5,670,782
5,670,783
jQuery function not able to get values unless an alert is written
<p>I have </p> <pre><code> $j("input[id^='tab_name_edit']").each(function(){ var divcnt = $j(this).attr('id'); var divcnt = divcnt.split(/[_]/); nosoftabs = divcnt[divcnt.length-1]; var tabnm1 = $j(this).val(); addInputGroup(tabnm1); automateDynamicFields(nosoftabs); });...
jquery
[5]
5,375,551
5,375,552
How to set Id of dynamic created layout?
<p>I want to give ID to some views (textview ,imageview etc) in a layout that is programmetically created. So what is the best way to set ID. </p>
android
[4]
409,647
409,648
Return a new array with specified values?
<p>Is there a way to write the following function code</p> <pre><code>int* returnFilledArray() { int* arr = new int[2]; arr[0] = 1; arr[1] = 2; return arr; } </code></pre> <p>somehow like that? (create and fill the array as one liner).</p> <pre><code>int* returnFilledArray() { return new int {1,2}; } </code></p...
c++
[6]
5,262,658
5,262,659
return monodimensional-array from multidimensional
<p>I have a multidimensional array:</p> <pre><code>$array=array( 0=&gt;array('text'=&gt;'text1','desc'=&gt;'blablabla'), 1=&gt;array('text'=&gt;'text2','desc'=&gt;'blablabla'), 2=&gt;array('text'=&gt;'blablabla','desc'=&gt;'blablabla')); </code></pre> <p>Is there a function to return a mon...
php
[2]
2,921,484
2,921,485
Python: how to ensure method gets a list
<p>I have a method that takes a list of strings. Unfortunately, if the list is only one item long, Python treats this list as a string.</p> <p>This post has a method for checking whether something is a string, and converting it to a list if it is: <a href="http://stackoverflow.com/questions/10654377/python-how-to-defi...
python
[7]
981,408
981,409
how to display the number 1 each time user accesses the page
<p>I have a problem when it comes to displaying the correct number in my heading. When a user submits a page and navigates to this current page, I want the heading below to appear:</p> <p>CREATING QUESTIONS AND ANSWERS: SESSION (AAA) 1 OF 3</p> <p>As you can see it above it starts with the number 1 as the user is cr...
php
[2]
3,788,142
3,788,143
Unable to hide/show div
<p>I need to hide one div and show one div. I am new to Jquery but I've tried several methods that i could find. It still doesn't work and i have no idea. Anyone has any idea? Very much appreciated for your help.</p> <pre><code>&lt;div id="div1" runat="server"&gt; &lt;asp:Button ID="btnCalculate" runat="server" Text...
jquery
[5]
5,569,480
5,569,481
how to have multiple headers for different users of wishlist members (three different)
<p>I’ve a created wordpress membership site using wishlist member plugin. But I want to have different header.php based on different logins.</p> <p>Eg: Users are: Print, Web and Free</p> <pre><code>When Free user logs in – I want header1.php to load and stay till he logs out When Print user logs in – I want header2.p...
php
[2]
5,505,718
5,505,719
How to convert a result of one object to string object
<p>I am new to java. There is a method which return a value of type xxx.</p> <pre><code> public Cost getTotalCost() { return getCost(); } </code></pre> <p>I want to convert the getCost() to type string. How do I do it?</p>
java
[1]
916,974
916,975
Attaching events to two items in JQuery
<p>I would like to create a click event that will work when two different items are clicked. Is there a way to do this?</p> <p>For example, normally what I'd do is this:</p> <pre><code>&lt;a id="link1" onclick="doSomething()"&gt;link1&lt;/a&gt; &lt;a id="link2" onclick="doSomething()"&gt;link2&lt;/a&gt; </code></pre...
jquery
[5]
2,534,524
2,534,525
image url Concatenate string
<p>i want to achievet the following Url</p> <pre><code>ImageUrl='~/products_pictures/(imageId)_middle.jpg </code></pre> <p>im using gridview and datalist</p> <p>im trying the follwoing combination but it not working</p> <pre><code> &lt;asp:Image ID="Image1" ImageUrl='~/products_pictures/&lt;%#Eval("Id")%&gt;_midd...
asp.net
[9]
4,813,531
4,813,532
Does unbind('click') remove onclick?
<p>I'm running the following:</p> <pre><code>$("#myelement").unbind('click'); </code></pre> <p>When I view <code>$("#myelement")[0].onclick</code> in the VS.NET 2010 Watch window, I see <code>"{...}".</code></p> <p>Should <code>unbind('click')</code> remove <code>onclick</code> events?</p>
jquery
[5]
5,518,264
5,518,265
Mastermind game
<p>I'm a beginner in java programming. Now I'm doing a game called mastermind.</p> <p>It has many conditions and I'm using numbers instead of colours.</p> <p>I have no idea of how to solve this problem: I'm using if else statement to do my game but if the solution is 4444 and user input is 4444, the output answer is ...
java
[1]
2,954,101
2,954,102
How to format a double Value upto 2 decimal places in iPhone
<p>I am extracting double data from sqlite3 database. But I want to display it only upto two decimal places. So how to truncate it.</p>
iphone
[8]
5,977,161
5,977,162
Customize context menu?
<p>I wonder if it's possible and and how to customize a context menu in Android? I have set a title to the menu, but I get a black background and the corners are angular compared to a similar menu that I get when I press the screen on my device. That menu has a blue background color and the corners are round and it als...
android
[4]
4,139,454
4,139,455
jQuery: form and ajaxcall
<p>I would like to make an ajax call on submit.</p> <pre><code>&lt;form id="editMail" action="" method="post"&gt; &lt;input name="user_email" type="text" value="mail" maxlength="50" id="user_email" style="width:200px;"&gt; &lt;input name="submit" type="submit" id="submit_editMail" value="Ändra"&gt; &lt;/form&g...
jquery
[5]
5,777,974
5,777,975
iPhone, is it possible to remove the back button and make a view slide up?
<p>I have a view which I'm reusing (its a date range selection screen) it elsewhere in my app, its the only view and there isn't any other views to navigate too. So theres no back button.</p> <p>I'm trying to reuse the screen to select a date range in another part of my app. I call it from a done button on the previou...
iphone
[8]
2,763,183
2,763,184
I'm new to python, and trying to program a sales tax button for a calculator
<p>I just started programming in python not long ago, and I'm having trouble figuring out the rounding issue when it comes to tax and money. I can't seem to get decimals to always round up to the nearest hundredths place. for instance, in our state, sales takes is 9.5%, so a purchase of 5 dollars would make tax $.48,...
python
[7]
1,179,593
1,179,594
Possible to set transparency to XML gradient file?
<p>Is it possible to set transparency in gradient which is set in the XML file?</p>
android
[4]
570,248
570,249
Threadpool in c++ using Boost Library
<p>I would like to write a multithreaded merge sort using threadpool and hence downloaded the boost library. I am newbie to c++ and has difficulty in understanding how to run the example programs given with the source. here is the source from where i downlaoded.. <a href="http://threadpool.sourceforge.net/" rel="nofol...
c++
[6]
115,568
115,569
jQuery function sometimes doesn't run
<p>I have the following function, basically used to set an iframe height to the height of it's content:</p> <pre><code>$("#MSOPageViewerWebPart_WebPartWPQ1").load(function() { var Height = document.getElementById('MSOPageViewerWebPart_WebPartWPQ1').contentWindow.document.body.scrollHeight; ...
jquery
[5]
2,797,179
2,797,180
Can we make a listview behave like expandablelistview
<p>Can we make an <code>ListView</code> behave like an <code>ExpandableListView</code>? I have an header with a button, with <code>ListView</code> below it. On the click of the Header Button can i <code>expand/collapse?</code></p> <p><img src="http://i.stack.imgur.com/YYj4o.png" alt="enter image description here"></p>...
android
[4]
4,704,069
4,704,070
Javascript prototypal inheritance - descendants override each other
<p>I'm creating two objects (Inherits), both inherit from Base. The second object's property assignment overrides the value in the first object.</p> <p>Any thoughts? How to make a proper inheritance so that Base class will contain common members for its inheritance descendants, but the descendants could assign values ...
javascript
[3]
2,765,375
2,765,376
how to submit a from with validation in PHP?
<p>I want to submit this form through PHP. with validation for required field and validation for phone number and email field also</p> <pre><code>&lt;form action="" method="" id="get-protected"&gt; &lt;div class="row requiredRow"&gt; &lt;label for="txt_FirstName"&gt; First Name&lt;/label&gt; &lt;input ...
php
[2]
329,486
329,487
confused with BroadcastReceiver
<p>i have the following pgm which responds with a Toast with an incoming msg and also speaks out the received msg, however there seems to be no speech synthesis in background but i still can see the Toast though, so should i start a service from the onReceive method (don't know if that's possible) here and then in the ...
android
[4]
970,944
970,945
When to pull default values from a file?
<p>Not a specific coding question so much as program structure in general.</p> <p>I'm one of those poorly self taught hobby programmers and I've got no idea what the best route is here. I want to create an object with 4 variables (name, objID, a, and b). For example:</p> <pre><code>class myObj: def __init__(self,...
python
[7]
164,926
164,927
Printing a list of objects
<p>I am a Python newbie. I have this small problem. I want to print a list of objects but all it prints is some weird internal representation of object. I have even defined <code>__str__</code> method but still I am getting this weird output. What am I missing here?</p> <pre><code>class person(object): def __init__(...
python
[7]
4,056,212
4,056,213
Exporting dll functions to unmanaged programs
<p>How can I export my c# dll functions to be able to use them from unmanaged programs.</p> <ul> <li>For example : Dll in c# and the application in Delphi/c++ .</li> </ul> <p>I don't have the source of the exe because is not Open S. Can't use COM.</p>
c#
[0]
2,245,405
2,245,406
Remove duplicate in a string without using arrays
<pre><code> String input = "AAAB"; String output = ""; for (int index = 0; index &lt; input.length(); index++) { if (input.charAt(index % input.length()) != input .charAt((index + 1) % input.length())) { output += input.charAt(index); } } System.out.prin...
java
[1]
618,375
618,376
list fixed no of files from directory in java
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/354703/is-there-a-workaround-for-javas-poor-performance-on-walking-huge-directories">Is there a workaround for Java&#39;s poor performance on walking huge directories?</a> </p> </blockquote> <p>I created a utili...
java
[1]
20,280
20,281
How to get image path from images stored on sd card
<p>is it possible to get the path of all the images that are stored on the sd card of my android phone? also is it possible to check for other images stored on sd card or in the internal memory? I am currently doing this:</p> <pre><code>Cursor cur = this.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONT...
android
[4]
2,868,860
2,868,861
Draw circle inside a label
<p>I am trying to draw a circle using Windows Form at runtime inside a label control. I am trying to display green or red circle and display the text('L1' or 'L2') on top of it. Could you please help. </p>
c#
[0]
5,142,776
5,142,777
Is learncpp.com good for beginners?
<p>In my search for a good, freely available resource that will teach me C++ I stumbled on <a href="http://www.learncpp.com/" rel="nofollow">http://www.learncpp.com/</a>.</p> <p>My question is for intermediate to experienced C++ programmers...</p> <p><strong>Does this site seem to be a good resource for a beginner to...
c++
[6]
282,144
282,145
using volatile keyword in java4 and java5
<p>what is the difference in using <code>volatile keyword</code> in java4 and java5 onwards?</p> <p>and related to that, </p> <blockquote> <p>Read/write operations on non-atomic variables(long/double) are atomic when they are declared as volatile.</p> </blockquote> <p>Is this also true for java4 <strong>or</str...
java
[1]
627,558
627,559
JavaScript Internals 101: arrays are just a special type of objects
<p>Internally, JavaScript has only objects (and primitive types). Objects are <strong>unordered</strong> collection of <code>key:value</code> pairs, where <code>key</code> is string and <code>value</code> can be any JavaScript type.</p> <p>Arrays, though on the outside look like normal arrays of any other language, ar...
javascript
[3]
3,212,086
3,212,087
How to view all JavaScript functions called in real time?
<p>I want to figure out how a website reloads it's content using AJAX. Therefore i would like to see what JS functions are called in real time because I can't figure out what function is responsible for reloading the page dynamically. How to see all executed functions JS in real time in FF, Chrome, Opera or IE?</p>
javascript
[3]
2,584,435
2,584,436
Android 4.x and Dropbox - does not authenticate
<p>I've implemented a Dropbox interface in my Android app exactly as shown in the example on the dropbox dev guide - <a href="https://www.dropbox.com/developers/start/setup#android" rel="nofollow">https://www.dropbox.com/developers/start/setup#android</a></p> <p>It works perfectly on my Android 2.3.5 device, and works...
android
[4]
5,964,768
5,964,769
Applying style to li generated in loop of function
<p>@nrabinowitz</p> <p>I am now wondering how to get the map icon when clicked to apply a style to the LI that is created in the previous section. Is that possible? I attempted below in the code but does not work. </p> <pre><code>function(I) { // within the scope of this function, // "thismarker" will work as...
jquery
[5]
3,832,547
3,832,548
Adding UIViewController subclass with IBOutlet
<p>I have seen this example on Apple's website before, but for some reason, I cannot find it and am brainfarting. I created a TestViewController.h and .m file that subclass from UIViewController and have a .xib. In the TestAppDelegate.h, I have:</p> <pre><code>@interface TestAppDelegate : NSObject &lt;UIApplicationD...
iphone
[8]
2,324,876
2,324,877
Safe ways of using os.system
<p>I have a program which retrieves information from a feed (say, a download link), and then downloads it. I also wish to provide for the user to use her own download handler. In general, I would like to allow the user to provide an instruction with several placeholders (such as <code>{link}</code>, <code>{directory}</...
python
[7]
5,695,239
5,695,240
What do I have to do with the variable count in order to pass this tutorial about JavaScript function scopes?
<p>The <a href="http://nathansjslessons.appspot.com/lesson?id=1055&amp;lang=en" rel="nofollow">tutorial</a> says:</p> <blockquote> <p>Define a function named callFunc that takes one argument, a function f. It should return an array containing the values f(0), f(0), f(1), f(1). You can only call f twice.</p> </bl...
javascript
[3]
2,358,423
2,358,424
JavaScript math trouble
<p>well i was trying to hack storm8 scripting but it didnt work and it was annoying triyng to get the elements, that the gist of what was going on here but people didnt like the question...</p>
javascript
[3]
1,731,078
1,731,079
C# -- How to handle duplicate multicastdelegate?
<p>Since we register the callback function <strong>PrintOne</strong> twice, the following code will print the message "PrintOne" twice. Here are questions,</p> <p>Question 1> Why by default the operator+=(i.e. Combine) doesn't check duplicate method handler?</p> <p>Question 2> How to avoid this duplicated call in me...
c#
[0]
3,494,554
3,494,555
JQUERY if not hover
<p>Mouseenter of DIV A sets DIV B to show(). What I want is on mouseleave of DIV A if they are <strong>not</strong> hovering over DIV B, hide DIV B. But, on mouseleave of DIV A if they are hovering over DIV B keep showing DIV B.</p> <pre><code>$('#DIVA').mouseenter(function() { $('#DIVB').show(); }).mo...
jquery
[5]
369,985
369,986
prevent parent page from loading inside jquery dialog box on button click
<p>I have a jquery dialog box that loads a php file (shopping_cart_temp.php) via ajax. The php file has 3 ajax buttons, remove, add 1, or minus 1. The href for all 3 buttons is #. The problem is, when I click on any of the 3 ajax buttons, the parent page loads inside the jquery dialog box instead of completing the ajax...
jquery
[5]
2,382,034
2,382,035
Is it right to have a setter to set different type than the property type?
<p>e.g.</p> <pre><code> [XmlAttribute("Type")] public string DataTypeString { get { return _dataType.ToString(); } set { _dataType = Type.GetType(value); } } private Type _dataType; public Type DataType { g...
c#
[0]
1,034,575
1,034,576
Edit Mozilla configuration file in Python
<p>Settings for the Mozilla Firefox browser my be changed by entering <code>about:config</code> in the address bar, which will open a configuration file. I would like to be able to edit, delete and add parameters to this file in Python. How can I do this?</p>
python
[7]
4,301,591
4,301,592
A question related to UITextfield
<ol> <li>I have code that dynamically load 10 different textfields in viewdidload method</li> <li>now if i click on any UITextfield and then autorotate device then my cursor should directly come to that UITextfield when device rotates from portrait to landscape mode</li> <li>second case is that if i click on any UITex...
iphone
[8]
3,389,164
3,389,165
delete db entry using js
<p>i have three file... 1st index.tpl.php code of this is</p> <pre><code>&lt;td&gt; &lt;input type="button" name="checkbox" value="delete" onclick="selectAccess('&lt;?php echo __('are you sure you want to delete data')?&gt;','&lt;?php echo $sGroups['id_user']; ?&gt;')"&gt; &lt;/td&gt; </code></pre> <p>2nd is common.j...
php
[2]
2,006,357
2,006,358
run a servo motor
<p>I'm having trouble running a servo motor using java. I know the servo works because I can test it using the program that came with it. The circuit board I'm trying to use is motor bee. The instructions tell me how to do it in C++, but I'm not good at converting it to java.</p>
java
[1]
2,561,652
2,561,653
UserCollection? Cant locate dll
<p>Ive added the using Microsoft.SharePoint.Client;</p> <p>But still getting errors, is it some dll i need to download?</p> <p>This is the error:</p> <blockquote> <p>The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)</p> </blockquote>
c#
[0]
2,810,574
2,810,575
Simple Javascript loop that repeats each second
<p>I'm writing a code to move a character in a browser game. I managed to get the pixels it must move per second both horizontally and vertically.</p> <p>pxsecx is the number of pixels it must move horizontally per second pxsecy is the same but vertically</p> <p>Basically it should += them to the current horizontal a...
javascript
[3]
2,836,030
2,836,031
Early binding in final methods
<p>I have read in multiple places that final methods are early bound but none offers a satisfactory reason. I doubt how can it be so coz even in a final method called on parent class reference, compiler cannot say whether parent's non final or child's final method is called.<br> Please advice. </p> <pre><code>class ...
java
[1]
360,322
360,323
how to set android default title bar at Bottom with image on it?
<p>how to set android default title bar at Bottom with image on it ?</p>
android
[4]
426,562
426,563
Adding int to string
<p>Im triying to make a list which should look like this Pages = ["Page 1", "Page 2" ... "Page 48"]</p> <p>and im using this, Is there anything wrong with the following lines?</p> <pre><code>String[] Pages = {}; int i = 0; for (; i &lt; 47; i++) { String p = Integer.toString(i+1); Pages[i] = (...
java
[1]
355,430
355,431
add event once in jquery
<p><br/>How can I have something like this :</p> <pre><code>&lt;input class="myClass" id="a" type="checkbox" other="x"/&gt; &lt;input class="myClass" id="b" type="checkbox" other="x"/&gt; &lt;input class="myClass" id="c" type="checkbox" other="x"/&gt; &lt;input class="myClass" id="d" type="checkbox" other="y"/&gt; &lt...
jquery
[5]
2,918,870
2,918,871
Handling Shutdown Event
<p>Hi I have an Standalone application in which when an user logs in a abc.lck file gets created when the application is closed it gets deleted.I have used <strong>addshutdownhook()</strong> to delete the file when power supply is interrupted that is switching off the power supply when my application is running.My prob...
java
[1]
4,126,770
4,126,771
Defining >> operator
<p>I can not implement >> operator </p> <pre><code>ostream&amp;operator&gt;&gt;(Mode&amp;refMode,ostream&amp;os) </code></pre> <p>to perform chaining operations as </p> <pre><code>refMode.iMode&gt;&gt;(refMode.jMode&gt;&gt;os) </code></pre> <p>Would you please provide me an implementation of it ?</p>
c++
[6]
4,510,774
4,510,775
Is there a shorter way to write "x = not y" when y is a boolean without importing a module?
<p>Just wondering if there is a smarter, shorter way to write this in python.</p> <pre><code>y = False x = not y </code></pre> <p>In javascript I would:</p> <pre><code>y = false, x = !y </code></pre> <p>Thanks!</p>
python
[7]
3,891,919
3,891,920
How to check if a user is idle on a website using php
<p>How can I check if a user is idle for 10 minutes or more using php?</p> <p>Is this possible?</p>
php
[2]
4,370,451
4,370,452
invoking javascript for a input text which is part of dynamically added row in a table
<p>I need to have a datetimepicker to popup onclick of the date input fields, the date pickers are defined in a javascript function like this:</p> <pre><code> function loadcalendar(){ jQuery(function() { $('#ar_startdate').datetimepicker({ dateFormat: '...
jquery
[5]
3,452,013
3,452,014
anyway to tell if a user has app installed using facebook?
<p>Is there anyway to know if a user has a app installed dy using Facebook? I was thinking there may be a way because it asks for permissions from the user, so I'm sure its something that registers. I want to be able to tell a user if any friends on Facebooka particular app installed that uses Facebook. If so tell th...
android
[4]
5,074,917
5,074,918
jQuery delay not working
<pre><code>$('.transparent').removeClass('transparent').delay(2000).addClass('not_transparent').delay(4000) </code></pre> <p>I have a div that is semi transparent and then want to switch it to not transparent. But the jQuery .delay(); method doesn't seem to work here. I've tried .fadeIn(); instead and that works with ...
jquery
[5]
1,921,955
1,921,956
How to access child element out of children()?
<p>I'd like to get the # of immediate children an element has, and then get the class of a child at a particular index. Something like:</p> <pre><code>var index = 25; var children = $("#myListElement").children(); if (index &lt; children.length) { if (children[index].hasClass("testClass")) { alert("hi!"); ...
jquery
[5]
5,870,239
5,870,240
ASP.NET Configuration tool provider error
<p>I want to setup login roles for my application. When I go to the ASP.NET Configuration Tool and Click on the Provider Tab, I select: Select a single provider for all site management data</p> <p>I get this: AspNetSqlProvider When I click on the test hyperlink, I get this message:</p> <p>Could not establish a conn...
asp.net
[9]
3,740,615
3,740,616
How to recieve data from the server?
<p>I am trying to fetchg data from server like MP3 files, video files, etc. in my application. The application should show the list of video files received from the server. </p> <p>How can I do this?</p>
android
[4]
4,767,649
4,767,650
Naming the member variable beginning with m_ conforms to javabean style?
<p>Wondering if m_ naming convention conforms to Javabean property style?</p>
java
[1]
5,574,416
5,574,417
How to reference object properties in another module
<p>I am relatively new to Python having used C# for many years and I'm hoping someone can help me with this question. I have a module called actuators.py that contains a number of classes for defining properties and methods for the servos I use in a robot project. In another module called robot.py, I instantiate my a...
python
[7]
4,316,348
4,316,349
Android-Prev Next button MediaController
<p>I want to show prev next button on my video but I don't know how to This is my code:</p> <pre><code> public static void play() { mediaController.setAnchorView(mVideoView); Uri video = Uri.parse(path_uri); mVideoView.setMediaController(mediaController); mVideoView.setVideoURI(video); mVid...
android
[4]
3,242,945
3,242,946
JavaScript synchronise multiple function calls
<p>I have a document, which has two <code>javascript</code> functions <code>A();</code> and <code>B();</code>.The functions get called in no particual order, I want to do something upon the last call.</p> <p>I can accomplish the task by using local variables, but before doing so I'd like to confirm if there's more el...
javascript
[3]