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,270,151
5,270,152
getting images from external sd card folder and displaying them in a list
<p>Im trying to get images from a particular folder inside the external <code>SD card</code> and trying to show them inside a list when im running the app. No error provided, nothing happens. Just a blank page any suggestion.</p> <p>i'm getting the list of images with the extension but how can i view the images! </p...
android
[4]
5,297,985
5,297,986
Redirect 404 or just 404 header
<p>I'm currently coding a site and I want to know the best alternative.</p> <p>Should I add <code>header("HTTP/1.0 404 Not Found")</code> without redirecting or should I redirect and add a 404 header?</p>
php
[2]
1,056,461
1,056,462
PHP simplexml_load_file() does this need a @ prefix
<p>I am working with a previous developers code and a lot of his code hide errors with the <code>@</code></p> <p>One example being: </p> <pre><code>if(!file_exists($filename)) throw new Exception("file '$filename' does not exist."); $xmlObject = @simplexml_load_file($filename); if($xmlObject === false) ...
php
[2]
3,050,247
3,050,248
404 error page not showing
<p>I've got this in my web.config and it's being hosted by the DiscountASP.net ISP</p> <pre><code> &lt;customErrors mode="On" defaultRedirect=""&gt; &lt;error statusCode="404" redirect="404.aspx"/&gt; &lt;error statusCode="500" redirect="404.aspx"/&gt; &lt;/customErrors&gt; </code></pre> <p>I am h...
asp.net
[9]
2,109,761
2,109,762
ASP.net: Weird web user control problem
<p>This is weird. I declare a web user control on a asp.net web page like so</p> <pre><code>print("&lt;%@ Register Src="~/Controls/blah.ascx" TagName="blahCtrl" TagPrefix="cc" %&gt;"); </code></pre> <p>I don't have problem with it until today in the code behind where it give me name blah is not declared error. does a...
asp.net
[9]
1,143,779
1,143,780
python, psycopg2, and bound parameters
<p>I have this guy:</p> <pre><code>query = 'DELETE FROM boyd.%s WHERE teamid = %s AND id = %s AND year = %s' % (statstype, '%s', '%s', '%s') self.executequery(query, values[0:3]) </code></pre> <p>Which strikes me as ugly. The first %s is actually supplied by the variable, the other three are bound variables: do I rea...
python
[7]
5,815,076
5,815,077
How to import modules from different folders in Python?
<p>How to import modules from different folders? I have the following</p> <pre><code>cgi-bin | py | __init.py__ http | __init.py__ HttpFormParser.py xml | __init.py__ XmlDocumentCreator.p...
python
[7]
481,104
481,105
Schedule a single-threaded repeating runnable in java, but skip the current run if previous run is not finished
<p>Sometimes the duration of a repeated task is longer than its period (In my case, this can happen for hours at a time). Think of a repeated task that takes 7 minutes to run and is scheduled to run every 10 minutes, but sometimes takes 15 minutes for each run for a few hours in a row.</p> <p>The Timer and ScheduledTh...
java
[1]
4,822,208
4,822,209
JavaScript Converting string values to hex
<p>I have an array of string-encoded hex values. I need to convert those strings to actual hex values and then be able to compare them (using standard less-than/greater-than/equals). What is the best way to accomplish this?</p>
javascript
[3]
3,985,167
3,985,168
parsing and execute lines in C++
<p>I am having a series of c++ functions to be executed in C++ in one text file</p> <pre><code>LHAPDF::alphasPDF(pow(1* 0.25471686e+03,0)) LHAPDF::alphasPDF(1*0.18014950e+03) LHAPDF::xfx(0.86084175E-01,0.17014950e+03,0) LHAPDF::xfx(0.39435938E-01,0.25471686e+03,0) LHAPDF::xfx(0.29,1*0.15,0) </code></pre> <p>How can I...
c++
[6]
1,954,067
1,954,068
Droid camera screen upside down display
<p>I have this App, which will help tune camera to to zoom in or zoom out and adjust contrast and stuff, but the image that camera focuses on is displayed with swapped vertical and horizontal axis. So when I run this app and focus on vertical text it is displayed as portrait and vice versa. It is not problem with the w...
android
[4]
5,476,703
5,476,704
UITextView memory leak
<p>Can somebody can please verify that they can also reproduce that memory leak.</p> <p>Create a new "Utility Application". Open the FlipsideView.xib and add a UITextview. Using the inspector, uncheck "Editable" and check "Detects Phone Number" and "Detects Links".</p> <p>Run the app using the Leak instrument on an i...
iphone
[8]
2,030,461
2,030,462
How can I retrieve the current error handler?
<p>I'd like to find out what error handler is currently, well, handling errors.</p> <p>I know that <a href="http://php.net/manual/en/function.set-error-handler.php" rel="nofollow"><code>set_error_handler()</code></a> will return the previous error handler, but is there a way to find out what the current error handler ...
php
[2]
1,080,618
1,080,619
jQuery cross domain aAax plugin won't work with facebook.com
<p>I don't know why but when I do:</p> <pre><code>$('body').load("http://facebook.com/"); </code></pre> <p>It returns in console log:</p> <blockquote> <p>Error: data.results[0] is undefined</p> </blockquote> <p>But if I do:</p> <pre><code>$('body').load("http://google.com/"); </code></pre> <p>it works fine. Any...
jquery
[5]
196,745
196,746
how to give time gap between two activities in android?
<p>this is my code.I used one one popup message while clicking on button for that i used Toast after that i want to move next screen</p> <pre><code>Button Replybutton = (Button) findViewById(R.id.Reply); Replybutton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) ...
android
[4]
5,019,203
5,019,204
How to not delete an already existing SQLite database during a patch update
<p>I have installed my Android application with a blank database during the initial stage. The installation will then create a database with the name Inventory and copy the database already created with different tables using SQLite browser into the newly created database. After some days data will be stored in the SQL...
android
[4]
1,969,358
1,969,359
Is there any difference when calling a javascript function onclick="fn1()" and onclick="javascript:fn1()"
<p>What is the difference between calling a function directly onclick="fn1()" and onclick="javascript:fnq()"?</p> <p>What would be the best approach?</p> <p>Thanks</p>
javascript
[3]
1,179,115
1,179,116
How to add activity within tab root activity in android
<p>I implemented tab layout using activities, I write one root activity In that activity initially I add three tabs in which I add three activities in it.but After I want to also add activity in the same tabs </p> <p>How I can achieve this please help me.</p>
android
[4]
5,545,861
5,545,862
cannot convert from 'System.IO.TextWriter' to 'System.IO.Stream'
<pre><code> var ssh = new SshClient("ip", "user", "pass"); var input = new MemoryStream(Encoding.ASCII.GetBytes("exit\r\n")); var shell = ssh.CreateShell(input, Console.Out, Console.Out, "xterm", 80, 24, 800, 600, ""); shell.Stopped += delegate(object sender, EventArgs e) { ...
c#
[0]
5,970,613
5,970,614
Using window object
<p>I've seen lots of people using <code>window.</code> when calling some variable. But aren't all the variables of a same window actually in <code>window</code>?<br> Example:</p> <pre><code>window.onorientationchange = function() { var orientation = window.orientation; // &lt;-- WHY? switch(orientation) { /* ....
javascript
[3]
4,223,712
4,223,713
How do I know where "Program Files" are?
<p>I'm working on a custom installer / launcher in pure Java. How can I tell the path to "Program Files" or its equivalent?</p>
java
[1]
2,580,480
2,580,481
twitter oath authentication android
<p>i am developing app.its having post message on facebook and twitter.i searched on net and got many example but i confused with twitter.</p> <p>if i am using oath authentication how should i provide login screens for clients.many example </p> <p>what i found just they are using consumer and secret key where i need ...
android
[4]
454,554
454,555
realtime collaborative editing: mobwrite on windows7 x64
<p>I have set up <a href="http://code.google.com/p/google-mobwrite/" rel="nofollow" title="MobWrite">Mobwrite</a> on my Win7 development machine using the daemon and q.py listener. The client test suite passes, but when I run the server test suite, everything fails with this sort of response:</p> <pre> Question: U:us...
python
[7]
5,991,785
5,991,786
Get span contents but ignore H2. JQUERY
<p>I have a <code>span</code> that contains text that I would like to use. But within this <code>span</code> there is a <code>h2</code> that I want to ignore. (This isnt my mark up and I cant change this so moving the <code>h2</code> outside of the <code>span</code> is not an option)</p> <p>Here is the mark up:</p> <...
jquery
[5]
2,020,159
2,020,160
Simple Login System Issues
<p>So I'm learning how to make a simple login system for a website I'm making and I'm getting this error.</p> <p>Notice: Use of undefined constant myusername - assumed 'myusername' in /home/dkitterm/public_html/index.php on line 4</p> <p>These are lines 3-6.</p> <pre><code> session_start(); if(!session_is_reg...
php
[2]
3,673,049
3,673,050
MediaPlayer cant play audio files from program data folder?
<p>When i record my audio from MIC and store file in /data/data/..... why MediaPlayer can't play this file ? If i change destination to / sdcard/..... - all works great. I do something wrong ? I not found limitation for MediaPlayer. Device - Samsung T959 (Galaxy S) Thanks, i hope anybody know solution....</p>
android
[4]
608,155
608,156
jQuery: When clicking on checkbox, input box below will be visible
<p>I am not very good at jQuery, so I have a question; is there a quick way to code so when you click on a checkbox (equally to 1), there will appear a text box below. </p> <p>I am currently learning jQuery, so this would be a great example.</p> <p>Thanks in advance!</p>
jquery
[5]
1,063,118
1,063,119
Read file line by line and print if it contains two different strings
<p>So I have a file called 'clears' and I want to see if a line contains two different strings that are in a list and if so to print those lines I cant get it to work.</p> <pre><code>for pos in positions: for line in open('clears'): if pos[0] and pos[3] in line: print line </code></pre> <p>I a...
python
[7]
4,686,863
4,686,864
Count down timer speeds up
<p>I have a timer that counts down every second. The timer is used for a game: the user has up to 15 seconds to answer to a question. Let's say the game has 10 questions. The timer works great for the first question , but then, speeds up more and more with every question. Any suggestion is more then welcome. Thank you!...
javascript
[3]
3,925,158
3,925,159
How to validate the excel sheet value so that only correct data type value insert in to mysql database through php
<p>I want to actually import the .csv file to a database, my problem is that when I validate the data of excel sheet, only actual data should get inserted to the database. If one of the row does not match with the actual data type then it should show the message <code>this rows can not be insert in to database</code> u...
php
[2]
4,747,923
4,747,924
Google map displayed in my Ubuntu machine ,not displayed in Xp machine
<p>I am developed application with google map in android 2.2 version using eclipse in ubuntu machine.In that case I can get the google map as well as the location perfectly.</p> <p>But now i have to run that same apps in Xp machine,there also am having android 2.2 .The apps run properly but the google map not displa...
android
[4]
3,632,527
3,632,528
PHP: convert date into seconds?
<p>I've a date like <strong>Tue Dec 15 2009</strong>. How can I convert it into seconds?</p> <p>Update: How can I convert a date formatted as above to Unix timestamp?</p>
php
[2]
144,902
144,903
Explain this loop, please: for i in l: l.remove(i)
<p><strong>Example:</strong></p> <pre><code>l = [1,2,3,4,5,6,7,8,9,0] for i in l: print i,l l.remove(i) </code></pre> <p><strong>Returns:</strong> </p> <pre><code>1 [1, 2, 3, 4, 5, 6, 7, 8, 9, 0] 3 [2, 3, 4, 5, 6, 7, 8, 9, 0] 5 [2, 4, 5, 6, 7, 8, 9, 0] 7 [2, 4, 6, 7, 8, 9, 0] 9 [2, 4, 6, 8, 9, 0] </code></p...
python
[7]
3,829,614
3,829,615
create .msi or setup file in C# 2010
<p>How can I create either .msi file or setup file from the application I have created in VC# 2010. Please help me.</p>
c#
[0]
865,070
865,071
Get and set value spinner from other activity in android
<p>I have code like this -mainclass-</p> <pre><code> Spinner pilihtype; ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(this, R.array.typestore, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); pilihtype=(Spinner)fin...
android
[4]
5,198,631
5,198,632
How to get CheckBox or RadioButton textAppearance?
<p>I have some radio buttons and/or check boxes in my layout and I would like that my <code>TextViews</code> that are around have the same text appearance (size, color, etc.).</p> <p>Basically, I am looking for something like the following:</p> <pre><code>&lt;TextView android:textAppearance="?android:attr/textApp...
android
[4]
4,355,784
4,355,785
How to test if an element resides in an iFrame using jQuery?
<p>How to test if an element resides in an iFrame using jQuery and if it does, how to select that iFrame?</p>
jquery
[5]
2,880,318
2,880,319
change event of html hidden field
<p>I want to check the change of html hidden field using jquery and i tried for this but the change event did not worked.</p> <p>Somebody has and idea how to handle this? </p>
jquery
[5]
2,378,634
2,378,635
FaultException`1: <nativehr>0x80070057</nativehr><nativestack></nativestack>
<p>I create a Issue Tracking list using following code:</p> <pre><code> var siteUrl = "http://win-2kshuvjl9qh/sites/meroteamsite/blanksite"; var listUrl = "My Issue Tracking List"; var listDescription = "aaa"; int listTemplateId = 1100; SPWeb web = DEUtilityInternal.CreateSPWebObject(...
c#
[0]
2,062,106
2,062,107
how to read char from a string in c#
<p>I have a string <code>a = "aabbbffdshhh"</code>. I want to write a program which will give me output of <code>"a2b3f2d1s1h3"</code>. I want to return each letter in the alphabet present and it's count.</p> <p>The code I am currently using is:</p> <pre><code>int cnta;int cntb; int cntf; int cnth; for (int i=0;i&...
c#
[0]
1,294,553
1,294,554
javascript property value dependent of other property
<p>I made an object called Fullscreen, and within the object another object called directions. so my code looks like this:</p> <pre><code>FullScreen = { directions: { prev: -1, next: 1 } } </code></pre> <p>but i want to be able to set FullScreen.directions.prev from outside the object, and change FullScre...
javascript
[3]
2,925,579
2,925,580
jQuery Code for click event
<p>I attach a click handler to a button on my page. Is there anyway to find out what code is using jQuery?</p> <pre><code>$("#dreport").click(function() { var str = "hello"; }); </code></pre> <p>Is there a anyway to get the var <code>str = "hello"</code> in the firebug debugger, or anywhere?<br /> I've tried alert...
jquery
[5]
1,598,478
1,598,479
Substract array from another array
<p>I have an array with eight values inside it. I have another array with the same amount of values. Can I simply substract these arrays from each other?</p> <p>Here is an example:</p> <pre><code>var firstSet =[2,3,4,5,6,7,8,9] var secondSet =[1,2,3,4,5,6,7,8] firstSet - secondSet =[1,1,1,1,1,1,1,1] //I was hoping f...
javascript
[3]
3,885,876
3,885,877
How to launch Application without Launcher Icon?
<p>I want to launch an Activity without having an Launchericon. So I removed the </p> <pre><code>&lt;category android:name="android.intent.category.LAUNCHER" /&gt; </code></pre> <p>from the Manifest. Now my Icon does not show up in the Launcher, but I my App to start for the first time, after this the User does not n...
android
[4]
1,325,866
1,325,867
remove ColorFilter / undo setColorFilter
<p>How can a ColorFilter be removed or setColorFilter on a view be undone?</p>
android
[4]
1,438,403
1,438,404
Context in a PreferenceFragment
<p>taken from <a href="http://developer.android.com/guide/topics/ui/settings.html" rel="nofollow">http://developer.android.com/guide/topics/ui/settings.html</a>:</p> <blockquote> <p>Note: A PreferenceFragment doesn't have a its own Context object. If you need a Context object, you can call getActivity(). However, ...
android
[4]
3,844,247
3,844,248
Reading string more efficiently
<p>I'm getting pretty big input string into my method, but what I actually need is just first line of that string. Is it possible to extract just the first line of an already existing string?</p>
java
[1]
4,674,783
4,674,784
How to properly handle default variables values being incorrect
<p>This is probably a basic question, better explained through code:</p> <pre><code> public void checkStatus { int status = UNKNOWN; if (somecondition) { status = STATUS_UP; } elseif (someothercondition) { status = STATUS_DOWN; } } </code></pre> <p>So t...
java
[1]
5,842,875
5,842,876
Passing a variable to another function in Javascript
<p>I asked a question a while back about how to get the current variable in a loop and I got the solution :</p> <pre><code> for (i in ...) { ... href:"javascript:on_click('+i+');"...} </code></pre> <p>When i run this, the loop is sending the on_click function the string 'i' instead of the...
javascript
[3]
2,283,547
2,283,548
Include Javascript / CSS min version on production and full on dev in ASP .NET Web Forms
<p>Is it possible to achieve a goal specified in the question topic in ASP .NET for instance with existing controls like ScriptManager or any other controls? I'm using ASP .NET Web Forms 3.5.</p>
asp.net
[9]
3,760,928
3,760,929
A application with password
<p>How can Write and Create Safer Windows Applications with lock key in C#?</p>
c#
[0]
3,179,868
3,179,869
what is the equivalent component in android like table view in iphone
<p>can anybody tell what is the equivalent component in android like table view in iphone?</p> <p>How to implement table view component like iphone in android?</p> <p>give example</p> <p>Thanks</p>
android
[4]
3,182,548
3,182,549
jQuery adding a function to a link question
<p>I have a dynamically created table which in the last <code>&lt;td&gt;</code> there is a hidden <code>&lt;div&gt;</code> which is shown when the user hovers over a link in the <code>&lt;td&gt;</code>. That all works fine but there are several links in the div that I want to fire a function based on the id of the link...
jquery
[5]
264,816
264,817
JavaScript onresize event fires multiple times
<p>I'm having some trouble trying running a function only once when onresize event is triggered, I have looked at this questions <a href="http://stackoverflow.com/questions/1500312/javascript-onresize-event">Javascript onresize event</a> but I'm not using jQuery and can't get that function to work without. Any suggesti...
javascript
[3]
291,834
291,835
getting a url querystring's values
<p>Using jquery, how do I get the values of each field in a url querystring? (I'm referring to the search= value and offset= value etc.) Sometimes its more than just these three.</p> <pre><code>&lt;a href="search=sony&amp;offset=20&amp;lang=en" class="more_info"&gt;Read More&lt;/a&gt; &lt;a href="search=sony&amp;offse...
jquery
[5]
2,669,494
2,669,495
Which brand or type of computer should I buy for android development ?
<p>I got lots of driver and kernel development and some HAL\Java . So I want to buy a laptop to work at home。 Thanks for any suggestions.</p>
android
[4]
3,261,482
3,261,483
Why they created a timeout
<p>if u add this to web.config, then if a page have gone through long process, the client will not have a timeout exception.</p> <pre><code>&lt;httpRuntime maxRequestLength="1024000" executionTimeout="36000"/&gt; </code></pre> <p>they are timing out things for a purpose, what is it?, I tried to create a website with ...
asp.net
[9]
895,402
895,403
List view not rendered on postback
<p>I recently created a Usercontrol which contains a Listview (databound to a LinqDataSource) added the user control to an existing aspx page (loading the usercontrol dynamically).</p> <p>I'm seeing an unexpected behavior where the usercontrol is being loaded and listview displayed when we initially load the page, but...
asp.net
[9]
961,578
961,579
how to use horizontalscroll view component?
<p>i want to create a horizontal scroll view just like the one shown in image<img src="http://i.stack.imgur.com/w8ITN.png" alt="horizontal scroll view"></p> <p>In android widgets i found Horizontal Scroll View widget in composite section but dont know how to use it.Please help</p>
android
[4]
2,561,669
2,561,670
Using div background image as link using jQuery
<p>I have put a logo as the background image in a div</p> <pre><code>&lt;div id="logo" style="background-image:url(images/logo.jpg); position:absolute; top:20px; left:18%; width:275px; height:100px; cursor:pointer;"&gt;&lt;/div&gt; </code></pre> <p>I want to use this as div as a link using jquery</p> <p>//jQuery cod...
jquery
[5]
2,161,634
2,161,635
Python: Deleting files of a certain age
<p>So at the moment I'm trying to delete files listed in the directory that are 1 minute old, I will change that value once I have the script working.<br> The code below returns the error: <code>AttributeError: 'str' object has no attribute 'mtime'</code></p> <pre><code>import time import os #from path import path s...
python
[7]
5,771,752
5,771,753
Free Commercial Mapping Services
<p>Anybody had experience using either of the following;</p> <p>MapQuest platform: <a href="http://platform.mapquest.com" rel="nofollow">http://platform.mapquest.com</a></p> <p>OpenLayers: <a href="http://openlayers.org" rel="nofollow">http://openlayers.org</a></p> <p>Which of the above would you recommend, any feed...
asp.net
[9]
3,066,941
3,066,942
Finding index of list item which is assembled by Fraction class
<p>I'm trying to find the index of specifyed element in my list that looks like this for example Which is generated by xrange with Fractional.</p> <pre><code>&gt;&gt; print lst [Fraction(1, 8), Fraction(1, 7), Fraction(1, 6), Fraction(1, 5), Fraction(1, 4), Fraction(2, 7), Fraction(1, 3), Fraction(3, 8), Fra...
python
[7]
5,974,053
5,974,054
How to get javascript object method name?
<p>I'm currently building a bigger object and need to get faster and more specific with debugging/inspecting values/results/returns.</p> <p>Now I thought about the following:</p> <pre><code>var myObject = { whatever: null, whereever: null, debug: false, someFunction: function( arg ) { // Gene...
javascript
[3]
103,921
103,922
re-arranging views
<p>Hi i am developping an android app making my first steps in mobile applications.I have already implemented drag N drop in a listView.So to make it fancier i won't to make perform an action that i have seen on i-phone but also happens in android phones.I need to make my buttons wiggle when they are long-pressed and t...
android
[4]
689,822
689,823
Commutative property a[i] == i[a]
<p>For a built in type integer array say</p> <pre><code>int a[10]; int i = 2; a[i] = 10; </code></pre> <p>alternatively</p> <pre><code>i[a] = 10; </code></pre> <p>because </p> <p><code>a[i]</code> is a postfix expression that is <code>*(a+i)</code> or <code>*(i+a)</code> because commutative property of addition.</...
c++
[6]
1,512,094
1,512,095
Is there a way to test for enum value in a list of candidates? (Java)
<p>This is a simplified example. I have this enum declaration as follows:</p> <pre><code>public enum ELogLevel { None, Debug, Info, Error } </code></pre> <p>I have this code in another class:</p> <pre><code>if ((CLog._logLevel == ELogLevel.Info) || (CLog._logLevel == ELogLevel.Debug) || (CLog._logLev...
java
[1]
2,818,531
2,818,532
Static class member
<p>What's wrong with the code below? Latest version of g++ and clang both give error. I am sure I am missing something basic here.</p> <pre><code>#include &lt;iostream&gt; struct Z { static const int mysize = 10; }; Z f2(); int main() { std::cout &lt;&lt; f2()::mysize &lt;&lt; std::endl; } </code></pre> <p>...
c++
[6]
5,471,433
5,471,434
Access another view's content from another view
<p>I have an activity with two view.One view has the buttons and the other is main view.I must disable buttons for some circumstances inside main view.I couldn't figure out how to do that. </p>
android
[4]
4,085,928
4,085,929
How to create 3 spliters in windows Form
<p>Now I am develop one project with windows form (C#). and I want to separate my form into 3 parts. So, can anyone tell me how to create 3 spliters in window form (C#)?</p>
c#
[0]
3,955,737
3,955,738
What's the difference between inline member function and normal member function?
<p>Is there any difference between inline member function (function body inline) and other normal member function (function body in a separate .cpp file)?</p> <p>for example,</p> <pre><code>class A { void member(){} }; </code></pre> <p>and </p> <pre><code>// Header file (.hpp) class B { void member(); }; // I...
c++
[6]
4,302,848
4,302,849
Assembly Code in C++
<p>I would like to learn reading the assembly code generated by the compiler. Where and how could I assess the assembly code generated from C++ ?</p> <p>Thanks</p>
c++
[6]
1,856,633
1,856,634
Setting properties of Button
<p>How to set Button <strong>"Layout below"</strong> properties by <strong>code</strong> in android inside an <strong>Relativelayout</strong> i have defined relative layout by using findviewby id. </p>
android
[4]
718,382
718,383
"_KUTTypeMovie_" Referenced from: Error in xcode
<p>Hey guys I'm trying to create an app in xcode that in long story short records video, and xcode is proclaiming the following: "<em>KUTTypeMovie</em> Referenced from:"</p> <p>Any help would be awesome, thanks!</p> <p>Here is my code.</p> <p>#import &lt; MobileCoreServices/UTCoreTypes.h></p> <p>@implementation Ove...
iphone
[8]
1,265,786
1,265,787
how to get the result from a php file into a string
<p>example i have a file template.php with:</p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;td&gt;&lt;?php echo $data['nombre'] ?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php foreach($data['values] as $value): ?&gt; &lt;tr&gt; &lt;td&gt;&lt;?php echo $value ?&gt; &lt;/td&gt; &lt;/tr&gt;...
php
[2]
1,869,928
1,869,929
Java : Can we use DAO as a singleton instance
<p>This is a general question , not specific to my current application .</p> <p>In a heavy Traffic MultiThreaded application , what is the approach to do </p> <p>Assume that there is a DAO which containes a method (say UpdateDatainDb) to update Data inside a Database , now my question is </p> <ol> <li><p><strong>I...
java
[1]
435,831
435,832
Passing additional arguments to preg_replace_callback using PHP 5.2.6
<p>I've been researching similar questions, but I'm still a bit unclear if it's possible and/or best way to pass additional arguments in preg_replace_callback using PHP 5.2.6</p> <p>In this case I'm also looking to pass the $key from the foreach loop along to the if_replace function.</p> <pre><code>public function ou...
php
[2]
1,875,174
1,875,175
Multi Threading in c#
<p>In my main thread i have created new Thread i want call this new thread after a some interval until that thread return status true and also pausing my main thread </p>
c#
[0]
1,207,740
1,207,741
Java: moving ball with angle?
<p>I have started to learn game physics and I am trying to move a ball with an angle. But it does not change its angle. Java coordinate system is a little different and I think my problem is there. Here is my code.</p> <p>This is for calculating x and y speed:</p> <pre><code> scale_X= Math.sin(angle); scale_Y=Math.c...
java
[1]
16,728
16,729
Matching numbers
<p>I'm trying to finish a homework assignment and I can't find this anywhere. I'm trying to match input numbers with randomly generated numbers and displaying how many of the 5 are correct (also with a win/lose message). This is what I have so far and any help would be appreciated.</p> <pre><code>#include &lt;iostream...
c++
[6]
1,153,833
1,153,834
Simple Network Programming in C# for Beginners?
<p>I am currently new to C# and I need to understand simple server-client architecture!</p> <p>I am currently trying to write a simple server/client program where basically a client can send a variable to a server and the server can send it to another client. Problem is that I am really blind to this as I am still ver...
c#
[0]
316,458
316,459
Jquery session - one time execution of a script?
<p>I have this slider that opens / closes when you click on it, but I also made it so that it opens on page load as well, but now the problem is <strong>it opens on every page</strong> (since it's on every page).</p> <p>Is it possible to somehow make it start automatically only <strong>once</strong> per session?</p>
jquery
[5]
4,579,919
4,579,920
How to play a custom sound after the countdown timer ends?
<p>I am trying to implement the following functionality in my application</p> <ol> <li>The user selects a music file in one input field and time duration ( Seconds only ) in the other. </li> <li>After the user presses ok, the count down timer starts and runs till the entered time duration expires and then the chosen m...
android
[4]
1,188,743
1,188,744
Android refresh current activity
<p>I want to refresh my current activity. I have one refresh button on the top. when i click on button my activity should reload again. It should start again and delete all the instances of previous current activity.</p> <p>Thanks Vivek</p>
android
[4]
2,814,596
2,814,597
Which is better for a background service WakeLock or startForeground
<p>Admittedly I am just kind of hacking here so I would like some knowledge.</p> <p>I have a service I run in the background connected to another thread that counts down a timer. I was having problems with the count down dying after a while and presumed it was due to garbage collection of the service. I seem to have f...
android
[4]
4,501,189
4,501,190
How to connect global server from local server in asp.net?
<p>Any one idea about how to connect the global server from local server? i mean entering data in local server also be placed into global server database.How to do this?</p>
asp.net
[9]
188,296
188,297
explain this java code please
<p>In this program if I enter 10 when it says enter a value what would be the output? <code>num1</code> becomes 10, while <code>num2</code> is 6, I don't understand what <code>num1 = num1</code> mean? <code>10 = 10 + 2 = 12</code>?</p> <p>I think I understood it, it takes 10 from the user, <code>num1</code> is then as...
java
[1]
2,298,330
2,298,331
how to set width of an element in jQuery
<p>How do I set the width of the #book to width of #clickme a ? If I say $(this).width() in the callback function it gives me the width of #book.There are more than one anchor tags in #clickme.I need to increase the width at the end of the animation,please have a look at let me know</p> <pre><code>$('#clickme a').clic...
jquery
[5]
4,756,106
4,756,107
Android Hidden Process
<p>creating a process in android which must not be listed in the PROCESS LISTING / TASK MANAGER etc ...</p> <p>Or a method of code injection were i can start a new PROCESS from another APK</p> <p>Thanks in advance.</p>
android
[4]
4,124,876
4,124,877
How to get a substring from string through PHP?
<p>Hi want to change the displayed username like abcd@somedomain.com to only abcd. so for this i should clip the part starting from @.</p> <p>I can do this very easily through variablename.substring() function in Java or C# , but I m not aware with the syntax of PHP. So help me do that .</p> <p>Suppose i m having var...
php
[2]
1,974,694
1,974,695
A minor issue while iteration of array in php.Guidance please
<p>I have several files in a directory.I want to display all those filenames with the extension .txt and .jpeg</p> <pre><code>&lt;?php if ($handle = opendir("/home/work/collections/utils/")) { while (false !== ($file = readdir($handle))) { if ($file == '.' || $file == '..') { continue; ...
php
[2]
2,419,278
2,419,279
Image processing 1 bit images
<p>I am trying to understand the basics for image processing an image of a corridor. I have have used PIL to convert find the edges in an image, then I have converted it to a 1 bit image. I know what I want to be able to extract - the longest horizontal and diagonal lines that can be found in the image. Any ideas?</p> ...
python
[7]
5,261,158
5,261,159
ASP.NET: 1.1 to 2.0 upgrade
<p>what are some things i should be aware of before i begin this project? i've notice a few differences between this 1.1 site and our 2.0 sites: i noticed that every code behind file has a "Web Form Designer Generated Code" region which i'm guessing i won't need to transfer over to the 2.0 site.(?) There's also a "site...
asp.net
[9]
1,915,345
1,915,346
how to change size of button dynamic in android
<p>I try setWidth() and setheight() method but it not work </p>
android
[4]
3,664,049
3,664,050
built-in Java classes/methods to convert between binary, decimal, and octal?
<p>i know of several general formulas for converting between binary, decimal, and octal, but i was wondering if java has any built-in methods or classes that convert between the three. for instance, in the Integer class, there are static methods such as toBinaryString, toOctalString, etc which allow for decimal convers...
java
[1]
5,553,133
5,553,134
java dataoutput stream sending more bytes
<p>I have one server listening on port and ip and a client which will connect to this server.</p> <pre><code>DataInputStream meterin=new DataInputStream(socket.getInputStream); DataOutputStream modemds=new DataOutputStream(modems.getOutputStream); </code></pre> <p>now server is sending some data here:(CA F0 00 00 00 ...
java
[1]
1,308,395
1,308,396
how would I reimplement this code to be recursive?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4367260/creating-a-recursive-method-for-palindrome-in-java">creating a recursive method for Palindrome In java</a> </p> </blockquote> <p>This is my code that I have written. </p> <pre><code>public boolean check...
java
[1]
665,965
665,966
Shifting all the values in an array one index higher with the displaced last element placed as the first element
<p>I'm struggling with the below code in JS please help:</p> <p>Currently trying to get</p> <p>[20,30,40,50]</p> <p>to be</p> <p>[50,20,30,40]</p> <p>any tips?</p> <p>Here is the code I have so far below!</p> <pre><code>// A program to shift all the values in an array one index higher, with the displaced last el...
javascript
[3]
1,286,687
1,286,688
Call a Python method by name
<p>If I have an object and a method name in a string, how can I call the method?</p> <pre><code>class Foo: def bar1(self): print 1 def bar2(self): print 2 def callMethod(o, name): ??? f = Foo() callMethod(f, "bar1") </code></pre>
python
[7]
1,999,987
1,999,988
Renaming OS files
<p>I am trying to rename files based on their extensions. Below is my code, Somehow my os.rename isn't working. There aren't any errors though. I got no idea what is wrong. Hope you guys could help. Thanks.</p> <pre><code>import os import glob directory = raw_input("directory? ") ext = raw_input("file extension? ") r ...
python
[7]