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
611,967
611,968
Example of Camera preview using SurfaceTexture in Android
<p>I am trying to render camera preview using <a href="http://developer.android.com/reference/android/graphics/SurfaceTexture.html" rel="nofollow">SurfaceTexture</a>. I read the document but unable to understand how it works.</p> <p>Can anyone provide one sample example(very basic one) or link which uses <a href="http...
android
[4]
3,225,660
3,225,661
Getting variable from function
<p>Is there a way for me to get the file url from this function without changing the javascript and without running the function? </p> <pre><code> jwplayer('jsCmgPlayer').setup({ flashplayer: 'http://website.com/player.swf', file: 'http://website.com/0015980.mp3', autostart: true, 'skin': 'http://www.web...
javascript
[3]
3,659,847
3,659,848
simple python list problem
<p>According to the docs:</p> <pre><code>list.append(x): Add an item to the end of the list </code></pre> <p>So, if I do:</p> <pre><code>list = [] list.append("banana") print list[0] --&gt; which is suppose to print the FIRST item of the list &gt; banana </code></pre> <p>So far so good, however if now I append anot...
python
[7]
4,705,609
4,705,610
Opening doc,docx,Excell files inline of Ie 7.0
<p>Problem :- I am dealing with doc,.docx,xls,.xlsx, Pdf, files with in a ASP.NET application.,</p> <p>While I am clicking a button of Gridview, I need to open that file with in IE 6.0/7.0 BROWSER window., Office files like .docx, .doc, .xls, .xlsx , asking for <strong>open and save</strong> .. or Opening out side of ...
asp.net
[9]
1,066,701
1,066,702
If I set MPMovieControlStyleNone to the property controlStyle at the MPMoviePlayerController, Why is the reference count goes up 2?
<p>If I set MPMovieControlStyleNone to the property controlStyle at the MPMoviePlayerController, Why is the reference count goes up 2? In addition, How can I release _player object ? </p> <p>I made a Class that inherits from UIViewController.</p> <p>Instance variable</p> <pre><code>NSString* _movieFilename; MPMovie...
iphone
[8]
376,901
376,902
How to get start and end of day in Javascript?
<p>How to get start ( 00:00:00 ) and end ( 23:59:59 ) of today in timestamp ( GMT )? Computer use a local time.</p>
javascript
[3]
4,098,198
4,098,199
to compare double and decimal should I cast double to decimal or decimal to double?
<p>I need to compare two values. One value is <code>price</code> which represents current price of something and so <code>decimal</code> because you actually can buy or sell something by this price.</p> <p>Another value is <code>estimatedPrice</code> which is the result of mathematical calculations and so <code>double...
c#
[0]
5,382,754
5,382,755
Remove clicked element, its parent and parent's previous element
<p>I'm trying to remove all elements below after clicking on the <code>p</code> element. Could you give me any pointers where am I going wrong?</p> <pre><code>&lt;h2&gt;Heading&lt;/h2&gt; &lt;a href="#"&gt; &lt;p&gt;Click me to delete everything&lt;/p&gt; &lt;/a&gt; $('p').click(function() { $(this).remove()....
jquery
[5]
1,355,295
1,355,296
which is better in such java code sample. util or has members due to method parameters both as telephone
<pre><code> public final class TelephoneUtil { private TelephoneUtil() { // no instance } public static void chooseEnglish(Telephone telephone) { SleepForAudioUtil.sleepForChooseLanguage(); telephone.getMediaManager().sendDtmf("1"); } pub...
java
[1]
3,506,192
3,506,193
comma in regex in String.replaceAll() method?
<p>My code tries to replace "," with "/" in a string. Should I escape "," in the regex string? Both of the two code snippets generated the same results, so I am confused.</p> <p>Code snippet 1:</p> <pre><code> String test = "a,bc,def"; System.out.println(test.replaceAll("\\,", "/")); </code></pre> <p>Code sn...
java
[1]
4,443,330
4,443,331
Disable 2 buttons on form submission ( ASP.NET )
<p>I have this solution for a single button:</p> <pre><code>myButton.Attributes.Add("onclick", "this.disabled=true;" + GetPostBackEventReference(myButton).ToString()); </code></pre> <p>Which works pretty well for one button, any ideas on how to expand this to 2 buttons?</p>
asp.net
[9]
4,137,764
4,137,765
How to write the following functions in python?
<p>Suppose there are only four drinks: tea, milk, coffee, and coke,</p> <p>a list of student drinking preference is given, and I want to count how many preferences ranking eg:</p> <pre><code> [['coke', 'milk', 'coffee', 'tea'], ['cola', ',milk', 'tea', 'coffee'], ['cola', 'milk', 'coffee', 'tea']] </code>...
python
[7]
3,396,885
3,396,886
I need to resize an array of pointers
<p>Lets say i want to resize an array of int pointers, i have a function that looks like this</p> <pre><code> template&lt;typename T&gt; static void Resize(T* arr, UINT oldsize, UINT newsize) { T* ret = new T [newsize]; memcpy(ret, arr, sizeof(arr[0]) * oldsize); delete[] arr; arr = ret; }; </cod...
c++
[6]
167,770
167,771
concat strings in array and other arrays
<p>I have three arrays:</p> <pre><code>htext[i], ptext[i], and ytext[i] </code></pre> <p>I was wondering how I can walk through these arrays and concat the strings stored in htext[i] and then take this glued string and concat it with strings in ptext[i], and ytext[i], while separating each string by a space. Right no...
php
[2]
4,810,033
4,810,034
Enable href navigation after JQuery addclass
<p>I need to use jQuery's <code>addClass</code> to change the selected anchor tag's style. It is working fine. But after changing the style I want to navigate to a link specified in the <code>href</code>. This is not working since I am using <code>return false;</code> or <code>e.preventDefault()</code>.</p> <p>Please ...
jquery
[5]
1,859,983
1,859,984
php strip_tags issue
<p>i want to strip all the html tags from a string except ( <code>&lt;img&gt; and &lt;br&gt;</code> ).</p> <p>i used strip_tags(); but it stript all the html tags.</p> <p>regards</p>
php
[2]
2,641,289
2,641,290
A basic animation not showing up
<p>I still try different basics with android, and now I'm stuck with animation. I'm trying to implement a simple animation. I've defined animation in xml file like this:</p> <p><code>alpha android:interpolator="@android:anim/accelerate_interpolator" android:fromAlpha="0.0" android:toAlpha="1.0" duration="3000" repeatC...
android
[4]
4,772,307
4,772,308
PreviousPage = null in crosspage posting
<p>I'm trying to pass post data from one page to the next but PreviousPage always equals null.</p> <p>This is what I have in the original page (inside an updatepanel )</p> <pre><code>&lt;asp:Button ID="mmGo" runat="server" Text="Merge" PostBackUrl="~/Default2.aspx?action=merge"/&gt; </code></pre> <p>Then in the foll...
asp.net
[9]
3,837,078
3,837,079
how may I access the option values withing an object
<p>I have an object which looks like</p> <pre><code> options = { offers : $$("div.sonan"), prev : offers[0], next : offers[1] } </code></pre> <p>where the property <code>prev</code> represent the first element of <code>offers</code> array and <code>next</code> represent the second el...
javascript
[3]
4,013,893
4,013,894
File upload via FTP gaieerror Python 2.6
<p>I'm trying to upload a text file to an FTP server, but I am getting this error:</p> <p><code>gaierror: [Errno 11004] getaddrinfo failed</code></p> <p>Here is my code.</p> <pre><code> s = ftplib.FTP("ftp://xbrera.co.cc", "myuser", "mypass") f = open(path + "LD.txt", "r") s.storbinary("STOR "...
python
[7]
5,405,821
5,405,822
please help with this error : Operator '^' cannot be applied to operands of type 'double' and 'int'
<p>i have the following C# code.</p> <pre><code>double a = 0; double d = 0; double er = 0; int N = numbers.Length; a=(N*N/6) + N d=(N-(N/2))*2 for(int aa=1;aa&lt;=data.length;aa++) { er=((10-aa)*(-a\) + d - (numbers[aa,12]))^2; } </code></pre> <p>numbers is a double array wi...
c#
[0]
5,857,659
5,857,660
put comma after values but not for last one
<p>I am just a beginner in php. I used the following code to display the user names fetched from the database.</p> <pre><code>$select_tl = "SELECT `varTeamleader` FROM `tbl_team` WHERE `intTeamid` = '" . $id . "'"; $select_tl_res = mysql_query($select_tl); $select_tl_num = mysql_num_rows($select_tl_res); if ($select_t...
php
[2]
1,730,711
1,730,712
How to find the closest descendants (that matches a selector) with jQuery?
<p>We can use <code>closest(selector)</code> to find the first ancestor element that matches the selector. It travels <strong>up</strong> the DOM tree until it finds a match for the selector. But what if I want to travels <strong>down</strong> the DOM tree until it finds a match for the selector? Is there any jQuery fu...
jquery
[5]
5,470,913
5,470,914
How to force the user to complete a task before pressing back?
<p>I show to user a list of categories, he must choose one.<br> How to force the user to choose before pressing back? </p>
android
[4]
2,834,452
2,834,453
Android Context menu with multiple check boxes
<p>Is it possible to generate a Context menu with multiple checkboxes on clicking a button?</p>
android
[4]
3,346,881
3,346,882
Is there a site with C# recipes similar to ActiveState Recipes for Python?
<p>I really like the way that ActiveState has a collection of recipes for various dynamic languages.</p> <p>Are there similar sites for static languages like C#?</p> <p>Besides the recipes, the discussions are also educational.</p>
c#
[0]
1,175,602
1,175,603
Dispose the handle on exit of application using c#
<p>I am using the below code to block the taskbar which is working perfectly. But since my application is running in background, the only way to exit the application is by killing the .exe from task manager. So while exiting like this, the blocked task bar remains at the same state. But actually it shud resume the task...
c#
[0]
3,422,690
3,422,691
Detect and Report typedef Errors... What's This Doing?
<p>I was reading about making code more portable by using fixed-width integers. I found <a href="http://www.netrino.com/node/140" rel="nofollow">this</a> article which helped explain things, and at the end it suggests using this anonymous union to detect and report typedef errors:</p> <pre><code>static union { cha...
c++
[6]
2,831,248
2,831,249
jquery select child elements
<p>I'm very new to jQuery.</p> <p>I wrote this code to select child TD elements.</p> <pre><code>$(this) .children("div.tablescroll_wrapper") .children("table.tablescroll_body") .children("tbody") .children("tr.first") .children() </code></pre> <p>It <strong>works fine but looks bad</strong>, Is t...
jquery
[5]
2,028,157
2,028,158
jQuery - Detect the div id automatically
<p>I'm trying to automatically detect what div is clicked, and then add the text for a specific div. </p> <p>So, here is what I'm trying to do: </p> <pre><code>$('#sjalland').live("click", function(e) { e.preventDefault(); $('#searchBoxBig').val('Sjælland, '); $('#searchBoxBig').focus() return false; })...
jquery
[5]
1,080,504
1,080,505
How to get the current dpi at run time in android
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3166501/getting-the-screen-density-programmatically-in-android">getting the screen density programmatically in android?</a> </p> </blockquote> <p>How can I get the dpi of the running device at runtime in android...
android
[4]
5,588,571
5,588,572
android filesharing with http
<p>I have two android phones.... On first - there is a server with shared folder through WebService.... Another phone is a client, which sends requests to server to download and upload files from android server with requests as Async tasks... </p> <p>When client tryes to download server is vibrating... Code is here.. ...
android
[4]
4,863,879
4,863,880
php regex or html dom parsing
<p>I use regex for html parsing but i need yours help to parse following table...</p> <pre><code> &lt;table class="resultstable" width="100%" align="center"&gt; &lt;tr&gt; &lt;th width="10"&gt;#&lt;/th&gt; &lt;th width="10"&gt;&lt;/th&gt; ...
php
[2]
5,292,681
5,292,682
What's your naming convention for the View IDs?
<p>I believe that many of us were bothered while naming the View IDs. Unlike the package mechanism, the IDs of the resources in a project are using one common namespace. Therefore, we have to figure out some ways to name the fields with the same functionality but in different layout files.</p> <p>My way is to add the ...
android
[4]
3,813,112
3,813,113
Probed Assembly Paths in code
<p>I'm trying to use the following block of code to force asp.net to look in a subdirectory in addition to the standard ~/bin directory for assemblies. I'm not having any luck getting it to find the assemblies in the sub directory.</p> <p>I'm getting an unable to load type when viewing a page that uses a page class i...
asp.net
[9]
4,510,114
4,510,115
python code slow skin detection
<p>This code changes the color space to LAB and using a threshold finds the skin area of an image. but it's ridiculously slow. I don't know how to make it faster ? </p> <pre><code>from colormath.color_objects import * def skinDetection(img, treshold=80, color=[255,20,147]): print img.shape res=img.copy() ...
python
[7]
5,916,534
5,916,535
How to prevent first onclick execution
<p>I'm writing a javascript function that dynamically creates an Iframe with a button that if pressed can delete its iframe.</p> <p>These are my javascript functions:</p> <pre><code> function createIframe (iframeName, width, height) { var iframe; if (document.createElement &amp;&amp; (iframe = document.create...
javascript
[3]
762,181
762,182
Java Main - Calling another method
<p>I have the following code below:</p> <pre><code>public static void main(String args[]) { start(); } </code></pre> <p>i get this error: Non-static method start() cannot be referenced from a static context.</p> <p>How can i go about doing this?</p>
java
[1]
4,412,240
4,412,241
jQuery Get Class Name
<p>I'm trying to get the class name from an selection of images when clicked.</p> <p>The code below retrieves the first images class name but when I click on my other images with different class values they display the first images class.</p> <p>How can I get each images class value?</p> <p>HTML</p> <pre><code>&lt;...
jquery
[5]
5,218,598
5,218,599
Returning object as null returns what?
<p>I have a class and a function that returns an object of that class, if i return NULL what exactly gets returned?</p> <p>Example:</p> <pre><code>class someclass { int a; int b; someclass::someclass(int a, int b) { this-&gt;a = a; this-&gt;b = b; } }; someclass functionname() { return NU...
c++
[6]
94,195
94,196
Continue statement not working
<p>I am new to java </p> <pre><code>int nop=o; BufferedReader scan = new BufferedReader( new InputStreamReader(System.in)); come_here: System.out.println("Enter length"); try{ int n=Integer.parseInt(scan.readLine()); nop=n; }catch(Exception sandy){ System.out.println("Please Enter Numericals only"); con...
java
[1]
519,492
519,493
parsing html file using jquery
<p>Hi I have extracted the html source code from a website using jquery. I am trying to extract link under a specific tag which is of the form <code>&lt;p class="title"&gt; &lt;a href="some link "&gt;</code> I am trying to extract the link under a href. To extract the html i did</p> <pre><code>$.get("link",function(...
jquery
[5]
5,410,038
5,410,039
string to binary
<p>I convert a character to binary using <code>std::bitset&lt;CHAR_BIT&gt; binary('c');</code> but this doesn't work for a string,</p> <pre><code>std::string str = "MyString"; std::bitset&lt;SIZE_OF_STRING_IN_BITS&gt; binary(str); //Error Exception </code></pre> <p>what should be the alternative?</p>
c++
[6]
2,757,623
2,757,624
Handling file reading and multiple values to a key in dictionary
<p>How can I code to read the first line from a file and put it as a key value of a dictionary and keep reading next values in a iterative manner and put them as the values to the particular key they fall into in the file. Like example:</p> <p><strong><code>Item Quality Cost Place</code></strong></p> <pre><code...
python
[7]
3,487,234
3,487,235
issue with a code received within an iframe to run a function
<p><img src="http://i.stack.imgur.com/I0Oqk.png" alt="enter image description here"></p> <p>this code has been recieved within <code>iframe</code> in order to run a function called <code>uploadingData(x,y)</code> in the main window but there is a problem as you can see. I cant get what is wrong!!</p>
javascript
[3]
201,159
201,160
strcmp(x, str) is wrong?
<p>As a beginner of C++, I feel so puzzled on this point for a long time, the program is to tell the appearing times of each word in a string.</p> <pre><code>#include &lt;iostream&gt; #include &lt;string&gt; #include &lt;vector&gt; using namespace std; int main() { string x; vector&lt;string&gt; str; vector&...
c++
[6]
4,222,781
4,222,782
File operations [.txt normal file] in javascript?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/585234/how-to-read-and-write-into-file-using-javascript">How to read and write into file using JavaScript</a> </p> </blockquote> <p>javascript functions for file manipulations like reading &amp; writing ? Im loo...
javascript
[3]
3,705,449
3,705,450
How can we add button in custom cell?
<p>I am working in a app and need to add button in cell by customcell. Can any one help me for this? Thanks in advance</p>
iphone
[8]
5,889,240
5,889,241
javascript add data to table cell
<pre><code>&lt;table border='1' id='output'&gt; &lt;tr&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>my javascript code</p> <pre><code> document.getElementById("output").childNodes[0].childNodes[0].nodeValue = ajaxRequest.responseText; </code></pre> <p>Doesnt work please help</p>
javascript
[3]
4,274,423
4,274,424
Why do I get an error in python saying that a method cannot be found even though I previously defined the method?
<pre><code>index = 0 def changeColor(): global index if index%2==0: label.configure(bg = "purple") else: label.configure(bg = "blue") index+=1 label.after(1000, changeColor) def Start (self): # command when start button is clicked in GUI self.root = Tk() self.root.geometr...
python
[7]
341,370
341,371
global and $_SESSION variables with the same name are the same
<p>I got a piece of code:</p> <pre><code>$_SESSION['cms_lang'] = 2; global $cms_lang; $cms_lang[1] = 'en'; </code></pre> <p>Error:</p> <pre><code>Cannot use a scalar value as an array </code></pre> <p>Problem is that, I really don't know why server sees my global variable as the same as $_SESSION variable. I used t...
php
[2]
4,201,239
4,201,240
PHP code not creating new line in rtf template
<p>I reduced a php script to the exact code necessary to solve a perplexing problem (at least to me!). All the script below is supposed to do is replace '++name' in an rtf template with a hard coded variable that will print 'me' on one line, and 'you' on the next line. Besides trying "\r\n" to create the new line, I'...
php
[2]
5,821,189
5,821,190
Multiple instances of class with static constructor
<p>I have existing design of sort of "singleton" implementation with static constructor. I want to be able to destroy and recreate new instance. </p> <p>Can this be done without changing the base design?</p> <p>This is simplified prototype: </p> <pre><code>public static void main(String[] args) { ClassA.doWork...
java
[1]
4,103,534
4,103,535
Android Tab Activity
<ol> <li>I have 4 tabs in activity group. </li> <li>In Each tab(Separate Activity group) there are around 5 activities and I'm switching between the activities without any problem. </li> <li>My problem is with the device Emulator device back button.</li> <li>Suppose ...
android
[4]
1,405,829
1,405,830
making a pyramide
<p>Trying to make a pyramide here, but I'm new to java and a little stuck.</p> <p>The pyramide figure I am trying to make have three parameters: one that show how many lines the pyramide should have, one that choose the symbol that should be used and one that shows if the peak should be down.</p> <p>The pyramide have...
java
[1]
5,418,190
5,418,191
Replace multi UTF-8 chars with one same acs ii char by preg_replace()
<p>I have to convert a UTF-8 string to non UTF-8 string, I want to replace:</p> <p><strong>Ậ,Ẫ,Ẩ,Ầ,Ấ,Â,Ặ,Ẵ,Ẳ,Ằ,Ắ,Ă,Ạ,Ã,Ả,À,Á</strong> to <strong>A</strong>,</p> <p><strong>Ự,Ữ,Ử,Ừ,Ứ,Ư,Ụ,Ũ,Ủ,Ù,Ú</strong> to <strong>U</strong>,</p> <p><strong>Ợ,Ỡ,Ở,Ờ,Ớ,Ơ,Ộ,Ỗ,Ổ,Ồ,Ố,Ô,Ọ,Õ,Ỏ,Ò,Ó</strong> to <strong>O</strong>... and much...
php
[2]
4,225,020
4,225,021
Char/String comparison
<p>I'm trying to have a suggestion feature for the search function in my program eg I type janw doe in the search section and it will output NO MATCH - did you mean jane doe? I'm not sure what the problem is, maybe something to do with char/string comparison..I've tried comparing both variables as type char eg char tem...
c#
[0]
5,923,862
5,923,863
how can I set the margin of a EditText using xml?
<p>hi all i have created layout using following code</p> <p> <pre><code> android:layout_height="wrap_content"&gt;&lt;/TextView&gt; &lt;EditText android:layout_height="wrap_content" android:padding="12dip" android:layout_width="wrap_content" android:text="EditText" ...
android
[4]
4,094,829
4,094,830
how to use Quaternions in android opengl?
<p>I studied about that Quaternion in android OPENGL ES2.0.</p> <pre><code>some what i understood about that. but, i did not get any clear idea about that Quaternion. can anyone give suggest any example for theoretically and android pro grammatically. Thanks Advance... </code></pre>
android
[4]
5,621,568
5,621,569
newline question
<p>I want to detect a carriage return or a newline character when a user enters data into a textarea. What is the best way to handle this? I've tried str_replace with escape characters but carriage returns and newlines are not detected.</p> <hr> <p>OK, say I type the following into a textarea:</p> <pre><code>The sum...
php
[2]
2,396,351
2,396,352
Jquery Page Timer
<p>Is this possible using jQuery/PHP? I am looking to have my webpage automatically go to a different web page at a certain time of day. For example, i have a 'breakfast' page that is supposed to auto-redirect to the 'Lunch' (www.mylunchpage.com) page at noon. Then the lunch page go to 'Dinner' (www.mydinnerpage.com...
jquery
[5]
4,342,144
4,342,145
JQuery test value coming back from select
<p>It has options with values <code>true</code> and <code>false</code>.</p> <p>I have some jQuery here:</p> <pre><code>$("#myselect").change(function () { var accepted = $(this)[0].value; alert(accepted); if(accepted == false) { alert("Hi"); } ...
jquery
[5]
4,762,573
4,762,574
Is there a browser on android accepting extensions?
<p>I know how to make java programs on android, and I've yet included Browsers in my programs, but I'm more looking for the kind of extension system (with code in javascript) that we have on our desktop versions of Firefox and Chrome.</p> <p>Is there something similar on Android ?</p> <p>My goal would be to port one ...
android
[4]
2,943,356
2,943,357
Reading from file in c++
<p>Im trying to learn a bit about c++ and have run in to some trouble.</p> <p>I have the following code:</p> <pre><code>char board[5][5]; ifstream myReadFile; myReadFile.open("c:/test.txt"); for(int i=0; i&lt;5; i++) { for(int j=0; j&lt;5; j++) { while (myReadFile.good()) { ...
c++
[6]
2,503,769
2,503,770
How to select more than one checkbox in gridview and show the details in another Gridview in asp.net with c#
<p>In my project i have a need to select some check boxes in a GridView and show the details in another gridview. I use an arraylist to keep all the values of the checkbox using the foreach loop, but i can't able to display the records in another Grid view. Any help will be highly appreciated.</p>
asp.net
[9]
2,744,778
2,744,779
Jquery Plus/Minus Incrementer
<p>I want to have a client side Plus / Minus system where a user can click the plus and a value is incremented by 1, minus and the value is decreased by 1, the value should never go below zero and should start on 0. Is there a way to do this simply in jquery? All the jquery plugins look at bit OTT for this operation.</...
jquery
[5]
4,723,156
4,723,157
Use Function in Javascript
<p>in the following javascript code I see there's a use of the command function, but it didn't specify the name of the function. What's this all about?</p> <pre><code>var getReview = function(movie) { switch (movie) { case "Matrix": return "good trip out"; break; case "Princess Bride": ...
javascript
[3]
2,014,785
2,014,786
Force inclusion of a header in project
<p>I have a header with a particular set of rules that the user must follow. If the user does not want to follow the rules, they must define a preprocessor macro which will disable the checks. If the user is using the library, the user must include the header in every one of their classes that uses any code from the li...
c++
[6]
3,540,493
3,540,494
How to type π (pi) in Java?
<p>Is there a character within the Math API that allows for representing the character <code>π</code>?</p>
java
[1]
1,230,932
1,230,933
C# Compile a class other than DLL
<p>I am new to <strong>C#</strong>. I am not a good programmer but I have worked on some projects which were in <strong>Delphi7</strong>. In Delphi there is one option; compile the class files to create <strong>.dcu</strong>. Those <strong>.dcu</strong> can be used without having the actual code with any other project ...
c#
[0]
2,309,743
2,309,744
Notify User when the installed app is
<p>I want to notify user in an alert dialog that if my app is updated in the market when the app launched by user. </p> <p>Is there any service to call and get the updates from market of particular app?.</p>
android
[4]
5,917,982
5,917,983
why does my 'join' function run wrong
<pre><code>b=','.join([1,2,3,4,5]) print b </code></pre> <p>I want it to print the string: <code>'1,2,3,4,5'</code></p> <p>In your answers, please try to use code examples rather than text, because my English is not very good. Thank you.</p>
python
[7]
5,700,028
5,700,029
Pass a dict to a function in python
<p>I have the following function:</p> <pre><code>def create_dict(dict={}): # build the dict receiver(dict) def receiver(dict): item_1 = dict[item_1] ... </code></pre> <p>How would I correctly pass the dict to the receiver function such that I can easily retrieve the values from the keys?</p>
python
[7]
1,405,786
1,405,787
How do I access a method in the root view controller from a different class?
<p>I apologize if this is an easy one.</p> <p>I have my root view controller NB_ViewController. I have another class named ShowScreen. How can ShowScreen access a method in NB_ViewController?</p> <p>Thank you so much in advance.</p>
iphone
[8]
1,851,910
1,851,911
How to make "int" parse blank strings?
<p>I have a parsing system for fixed-length text records based on a layout table:</p> <pre><code>parse_table = [\ ('name', type, length), .... ('numeric_field', int, 10), # int example ('textc_field', str, 100), # string example ... ] </code></pre> <p>The idea is that given a table for a message t...
python
[7]
1,201,044
1,201,045
Can i create message box which will be seen/popup on current screen/home screen in Android?
<p>i want to create message box which must be seen on current screen(Ex i am playing song or creating message on that screen also that message must got pop-up/seen)like notification.. so.please help me to achieve this.....</p> <p>Thanks in Advance--</p>
android
[4]
3,574,090
3,574,091
Can I use these PHP functions together?
<p>Can I use these PHP functions below:</p> <pre><code>$user = mysql_escape_string($user); $user = filter_var($user, FILTER_SANITIZE_STRING); $user = stripslashes($user); $user = trim($user); </code></pre> <p>together like this:</p> <pre><code>$user = mysql_escape_string(stripslashes(trim(filter_var($user, FILTER_SA...
php
[2]
4,510,470
4,510,471
error while moving an uploaded image
<p>Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phptMeFd4' to './photogallery/4bf2806a0d80c4ad68aa5e4e20dscn6842.jpg' in /some path/addsplashphoto.php on line 49</p> <p>am trying to upload photo to a destination folder in my server but each and every time an error like above is app...
php
[2]
3,990,016
3,990,017
How can I execute dynamic SQL in c#?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4629/c-eval-equivalent">C# eval equivalent?</a> </p> </blockquote> <p>how can i execute A command from some string on windows forms application like this:</p> <pre><code>string s=" MessageBox.Show(\"Hello World...
c#
[0]
2,717,485
2,717,486
C++: how to add int to current string in C++?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/191757/c-concatenate-string-and-int">C++ concatenate string and int</a> </p> </blockquote> <p>Hi,</p> <p>In C# I can write like this:</p> <pre><code>int i = 0; string text = "out.jpg"; while(true) { i++; ...
c++
[6]
2,948,003
2,948,004
How can I make it really difficult to bot a multiply tetris game?
<p>I thought about making a multiplayer tetris game using web technologies. However, as the source code is very public when writing a web-based JavaScript/HTML5 game, it would be fairly simple to program a bot to play a near perfect game. So, how could one make it really difficult to bot a tetris game?</p> <p>I figure...
javascript
[3]
2,779,726
2,779,727
Java Disable OSX Force Quit
<p>How can I disable force quit from within my java application? Either that, or how about disabling it from .plist?</p>
java
[1]
4,185,363
4,185,364
Typecasting method pointer to parent class method
<p>What i'm trying to do is somewhat obscure, so let me show on an example (this is not the actual code):</p> <pre><code>template &lt;class T&gt; class ArrayStorage { protected: void processStuff(void (ArrayStorage&lt;T&gt;::*procedure)(T *)) { for (int i = 0; i &lt; count; i++) (this-&gt;*proc...
c++
[6]
2,409,518
2,409,519
Debugging the EXEC_BAD_ACCESS on Iphone using Performance Tool, Allocations
<p>An error is caught, using Zombie CFString Foundation Library<br> caller {NSPlaceholderMutableString int] Malloc</p> <p>CFString Foundation Library<br> caller {NSPlaceholderString initWithFormat:locale} Zombie</p> <p>well it didn't drop to where I declared. I have no idea where that NSMutablestring is cal...
iphone
[8]
3,545,841
3,545,842
What does it mean to be a daemon thread?
<p>I'm fully aware of the impact of flagging a thread as a daemon thread on JVM exit (if all non-daemon threads exit, the JVM will exit.)</p> <p>Are there other side-effects to setting a thread as a daemon?</p> <p>(as a complete aside, which is really irrelevant except for semantics, is the meaning of a daemon thread...
java
[1]
5,883,012
5,883,013
Include if file exists
<p>I need an <code>include</code> function / statement that will include a file only if it exists. Is there one in PHP?</p> <p>You might suggest using <code>@include</code> but there is an issue with that approach - in case the file to be included exists, PHP will not output warnings if the parser find something wrong...
php
[2]
1,398,495
1,398,496
jQuery find() function current element
<p>I'm trying to move strings from name attributes to the src of each img. I'm using jQuery to do this:</p> <pre><code>$("#one").find("img").attr("src",$(this).attr("name"); </code></pre> <p>Now the problem is that $(this) is not the current manipulated element. So how do I get the current element that find() has fou...
jquery
[5]
4,226,783
4,226,784
running a function when another is clicked using jquery
<p>When i run this <code>$btns.first().click();</code> in the first function it doesnt action it where as if i click it (as per second function it works perfectly. The result is the slides all show when i click on a tab instead of just one. And then when i click one of the inner buttons the slides all disapear leaving...
jquery
[5]
3,965,601
3,965,602
What is the better approach to convert primitive data type into String
<p>I can convert an integer into string using</p> <pre><code>String s = "" + 4; // correct, but poor style or String u = Integer.toString(4); // this is good </code></pre> <p>I can convert a double into string using</p> <pre><code>String s = "" + 4.5; // correct, but poor style or String u = Double.toString(4.5); //...
java
[1]
5,838,126
5,838,127
Identifying each table row using SQl
<p>I have created a table using HTML that retrieves data from my database. At the end of each row, I have manually added a submit button which is inside the while loop as the data is retireved from the database. Once the button is clicked, the session username is inserted into a table in the database. I also want it to...
php
[2]
5,418,796
5,418,797
Sorting a dictionary by value then by key
<p>This seems like it has to be a dupe but my SO-searching-fu is poor today...</p> <p>Say I have a dictionary of integer key/values, how can I sort the dictionary by the values descending, then by the key descending (for common values).</p> <p>Input:</p> <pre><code>{12:2, 9:1, 14:2} {100:1, 90:4, 99:3, 92:1, 101:1}...
python
[7]
1,751,099
1,751,100
Calculate date/time difference in java
<p>I want to calculate difference between 2 dates in hours/minutes/seconds. I have a slight problem with my code here it is :</p> <pre><code>String dateStart = "11/03/14 09:29:58"; String dateStop = "11/03/14 09:33:43"; // Custom date format SimpleDateFormat format = new SimpleDateForm...
java
[1]
4,899,236
4,899,237
Using print_r in ob_start
<p>As mentioned in the manual it's not working. i tried var_dump it too suffers from the same problem. </p> <pre><code>ob_start() $debugdata=print_r ($var,true) </code></pre> <p>This prints the result on screen than storing to a variable </p>
php
[2]
2,796,747
2,796,748
Only variables should be passed by reference
<pre><code>// Other variables $MAX_FILENAME_LENGTH = 260; $file_name = $_FILES[$upload_name]['name']; //echo "testing-".$file_name."&lt;br&gt;"; //$file_name = strtolower($file_name); $file_extension = end(explode('.', $file_name)); //ERROR ON THIS LINE $uploadErrors = array( 0=&gt;'Ther...
php
[2]
4,430,539
4,430,540
How do I directly access a PHP file located in my themes folder?
<p>I have a file in my theme's folder called "test.php".</p> <p>If I go to www.mysite.com/wp-content/themes/my-theme/folder/test.php the theme loads which I assume is a 404 error handled by WP. If I change the file name to be test.html I can access it no problem.</p> <p>I tried adding the following code to my functio...
php
[2]
379,175
379,176
Is there a function to find the absolute root path in php?
<p>for example:</p> <p>/home/mydomain.co.uk/public_html/</p> <p>Something generic for windows or linux? Id like it to produce the root path only regardless of where i call the script from. So not the absolute root path to my script.</p> <p>Sorry is this is hard to understand.</p>
php
[2]
3,005,794
3,005,795
How to deploy a website to internet.(ASP.NET and SQL Server )
<p>I am new to the web development.I have built my website in visual studio 2008 using Sql server 2008 as backend.Now I want to know the whole process of deploying the website in some web domains and as well as my database to some database domain.I didn't purchase any domain till now.I want to know about web hosting ...
asp.net
[9]
3,775,932
3,775,933
Programing exercise
<p>Hi I have been doing the Javabat exercises and I have found myself in a bit of a snag with this problem:</p> <p>We'll say that a String is xy-balanced if for all the 'x' chars in the string, there exists a 'y' char somewhere later in the string. So "xxy" is balanced, but "xyx" is not. One 'y' can balance multiple '...
java
[1]
1,325,890
1,325,891
simple asp.net webforms ul li menu with selected class
<p>I have a simple unordered list with links in it.</p> <pre><code>&lt;body&gt; &lt;div id="topMenu"&gt; &lt;ul&gt; &lt;li&gt;&lt;a class="selected" href="../Default.aspx"&gt;Start&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../Category/ShowAll.aspx"&gt;Categories&lt;/a&gt;&lt;/li&gt...
asp.net
[9]
4,848
4,849
Manually Remove and Change WordPress Page/Post Title
<p>I have added custom metaboxes into the wp-admin page and post editors. There is a metabox with the ability to enter in a person's first name (ex. "John") and last name (ex. "Doe"). </p> <p>I want to set that particular post's/page's title to the combined values of those form entries (ex. "John Doe") without havin...
php
[2]