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
4,289,553
4,289,554
calculate cosine similarity using java program
<p>i have a problem to calculate a similarity measurement to develop search engine for my final project...i have to use tf idf + cosine similarity in java and i don't have any idea how to calculate it. for your information i have my own database which is have 811 document</p>
java
[1]
2,258,778
2,258,779
Why am I getting "parameter is not valid" exception on this code?
<pre><code>private void button8_Click(object sender, EventArgs e) { List&lt;long&gt; averages; long res = 0; _fi = new DirectoryInfo(subDirectoryName).GetFiles("*.bmp"); averages = new List&lt;long&gt;(_fi.Length); for (int i = 0; i &lt; _fi.Length; i++) ...
c#
[0]
5,645,406
5,645,407
Errors checking and opening a URL using PHP
<p>Here is one script with out any errors</p> <pre><code>$url="http://yahoo.com"; $file1 = fopen($url, "r"); $content = file_get_contents($url); $t_beg = explode('&lt;title&gt;',$content); $t_end = explode('&lt;/title&gt;',$t_beg[1]); echo $t_end[0]; </code></pre> <p>And here is the same script using a look to che...
php
[2]
4,690,478
4,690,479
How to resolve main class not found exception while creating jar?
<p>I am creating an executable jar file of a java project. I successfully created a sample jar file with Hello world class. I used following commands to create a jar:</p> <pre><code> trail&gt; javac -classpath "c:\Program Files\Java\jdk1.6.0_01\bin;" MyClass.java bin&gt; jar cvfm MyJar.jar manifest.mf trail\*.class...
java
[1]
242,272
242,273
Skipping function parameters
<p>If I have a function defined like this:</p> <pre><code>function x($a, $b, $c) </code></pre> <p>How can I make a call like <code>query('a', 'b')</code>, with b replaced by $c?</p>
php
[2]
3,613,585
3,613,586
Addressing first/last item in an ul, li
<p>How do you check whether a DOM element being clicked is either the 'first' li element or the 'last' li element in an unordered list item??</p>
jquery
[5]
2,414,222
2,414,223
How can i zoom out Timeline Panel in eclipse SDK?
<p>How can i zoom out Timeline Panel when viewing trace file in eclipse SDK.</p> <p>Thanks in advance.</p>
android
[4]
1,234,419
1,234,420
Help with Sessions Issues
<p>This just a same script in different server:</p> <p>The link below works. When you enter the correct characters it display success.</p> <p><a href="http://mibsolutionsllc.com/captcha%5Ftest/test.php" rel="nofollow">http://mibsolutionsllc.com/captcha%5Ftest/test.php</a></p> <p>This link below works. Even you enter...
php
[2]
3,633,875
3,633,876
Android - for loop: for (boolean bool = true; ; bool = false)
<p>The following snippet is part of a Human Step Detection Android App downloaded from the Play Store. Since it works fine, so I assume the codes all make sense.</p> <pre><code>private boolean isMotion(float[] paramArrayOfFloat) { if ((Math.abs(this.mOldAcc[0] - paramArrayOfFloat[0]) &gt; 1.0F) || (Math.abs(this.m...
android
[4]
1,705,993
1,705,994
set input value on new loaded form
<p>I have this link that creates a few div's in which a form is loaded via load(). This form is in a separate php file. Now i want to use the ID value of my link to set the value of an input field, but how?</p> <p>I know i need live() for that, but the setting of the value should be automatically, and not after an eve...
jquery
[5]
2,701,073
2,701,074
Import package in project in gingerbread source code
<p>I am customizing the native Contact application in Gingerbread. I want to call a class from native Mms Application, I have imported the class,</p> <blockquote> <blockquote> <p>import com.android.mms.ui.*; </p> </blockquote> </blockquote> <p>But I am getting error,</p> <blockquote> <blockquote> <p>co...
android
[4]
350,420
350,421
array with dates between two different dates
<p>I am currently working on a calender script for my personal use. Therefore I need your help :-)</p> <p>I have two dates in format YYYY-MM-DD.</p> <p>for example:</p> <pre><code>2012-05-12 and 2012-05-16 </code></pre> <p>What I need is the dates between them:</p> <pre><code>2012-05-13 2012-05-14 2012-05-15 </cod...
php
[2]
992,598
992,599
How can I limit the max value of number?
<p>I want to secure my page by checking if the value is digital (0,1,2,3) and if it is in the range from 0 to 120. I think <code>ctype_digit</code> function limits numbers, so can not be passed any negative number. How can I limit the max value in the simplest way?</p> <pre><code>if (!ctype_digit($_GET['category'] AND...
php
[2]
5,411,367
5,411,368
Conferences or seminars for demonstrating Android applications?
<p>I am an investment management professional who recently wrote a financial application for Android. But with over 150,000 apps on Android Market, no one is really even coming across my program.</p> <p>(I've already submitted the app to the usual reviewing/marketing sites referenced on stackoverflow to no avail.)</p>...
android
[4]
28,059
28,060
C#: Counting iEnumerable object
<p>I am trying to get the count of the elements stored in a Ienumerable object. There is no count property for this so how do i get the count for the var object?</p> <p>Thanks</p>
c#
[0]
4,305,120
4,305,121
unexpected ; but i cant see why
<p>Parse error: syntax error, unexpected ';' in /home/realcas/public_html/eshop/ecms/system/classes/database.php on line 29</p> <p>This is the code on line 29</p> <pre><code>return empty($resultArray) ? "Error in Query " ? json_encode($resultArray); </code></pre> <p>this is the section of code that is the issue </p>...
php
[2]
740,230
740,231
What does the following get(1) function do?
<pre><code>uri.getPathSegments().get(1); </code></pre> <p>Basically the <code>get(1)</code> part</p>
android
[4]
2,690,944
2,690,945
In java: how to replace every instance of firsts character with second character
<p>Given a function which inputs a string and two chars, how can I create a method which removes every instance of the first char and replaces it with the second. Here is what I have so far ( I am writing this code using bluej):</p> <p>*note the class will compile, but it does not produce the desired result.</p> <pre...
java
[1]
3,522,445
3,522,446
flash button is not loading in IE 7
<p>flash button is not loading in IE 7</p> <p>this is the button</p> <p>galtech.org/mygrovephotos/js/uploadify/uploadify.swf </p>
php
[2]
2,050,145
2,050,146
Some PHP Code is breaking the rest of the page
<p>I have an odd problem. Basicly my page works fine however after a small bit of php, everything after those lines dont load too the page.</p> <pre><code>&lt;?php //GET SCHOOLS $sql = "SELECT `id` FROM `school`"; $query = mysql_query($sql) or die(mysql_error()); $numschools = mysql_num_rows($query); echo "&lt;sele...
php
[2]
2,624,969
2,624,970
Using Mapkit in iphone application
<p>I am using Mapkit in my application, i want to submit the application to appstore, is there any specific procedure need to follow for submitting the mapkit enabled or used application.</p> <p>please help me, thanks in advance.</p>
iphone
[8]
1,132,561
1,132,562
How to add a public key in the android project
<p>I got a public key from the android market, i want to know how to add that public key in my android project, can anyone tell me how to add the public key in my android project,</p>
android
[4]
2,344,165
2,344,166
len(object) or hasattr(object, __iter__)?
<p>(The following is python3-related (if that matter).)</p> <p>This this the code I've written (simplified) :</p> <blockquote> <pre><code>class MyClass: def __init__(self): self.__some_var = [] @property def some_var(self): return self.__some__var @some_var.setter def some_var(s...
python
[7]
2,279,319
2,279,320
onSharedPreferenceChanged and PreferenceFragment
<p>Trying to follow the examples given in <a href="http://developer.android.com/guide/topics/ui/settings.html" rel="nofollow">http://developer.android.com/guide/topics/ui/settings.html</a> but finding it difficult as it arbitrarily flips between using and not using fragments.</p> <p>I've taken its advice to use fragme...
android
[4]
2,151,438
2,151,439
passing an array value to querystring
<p>This is a bit of a problem that I have. I store some value into an array:</p> <pre><code> Telco1 = a.Split(";") For i = 0 To Telco1.Count - 1 Telco2 = Telco1(i).Split(".") TelcoID.Add(Telco2(0)) TelcoName.Add(Telco2(1)) Next </code></pre> <p>Telco1 and Telco2 is Public Telco1() ...
asp.net
[9]
3,085,208
3,085,209
print slowly in python, (Simulate typing)
<p>I am trying to make a textual game in python. All goes well however, I would like to make a function that will allow me to print something to the terminal, but in a fashion hat looks like typing.</p> <p>Currently I have:</p> <pre><code>def print_slow(str): for letter in str: print letter, time....
python
[7]
5,838,979
5,838,980
Renaming directory gives positive result code, but didn't rename
<p>I know it's only cosmetic but the below code should rename my directory however it doesn't. The difference is just some capitalisation - but afaik Android is fully case sensitive when it comes to filenames. Like Linux normally is too. The rename gives a true result, indicating the operation was successful. However t...
android
[4]
2,434,240
2,434,241
C# Xml files when creating exe application
<p>I'm planning to build my winform into an exe file. I'm just wondering what to do with the xml files that my application need?</p> <p>I've do some research and some say you can add the xml files in the Resource folder before your create the exe file. Is this the correct way?</p> <p>Or I need to create an setup file...
c#
[0]
1,125,884
1,125,885
Continuous Queries vs Storing and Recalling Data
<p>I would like to know which of the following methods would be best to use on a website, and a brief explanation on why. Please assume that <code>$user</code> is <code>$user = new User()</code> throughout this question </p> <ol> <li><p>Whether to store my data returned from a database query, as an array (<code>$user_...
php
[2]
4,314,454
4,314,455
A bug in android.view.ScaleGestureDectator?
<p>I use this code to test the ScaleGestureDectator class:</p> <pre><code>package pirriperdos.common; import android.os.Bundle; import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.ScaleGestureDetector; import android.vie...
android
[4]
5,187,291
5,187,292
Link to php script
<p>I have a script which I can run from windows console writing "php backup.php". How to create a link to run it directly from desctop?</p>
php
[2]
3,780,853
3,780,854
problems in ics updated devices
<p>Recently I started receive emails form my users, that they phones updated to ics, and now images that they save with my application not showing in android's gallery application after that. They say that with file explorer they can see files, but not with gallery app and that they didn't experienced any this kind of ...
android
[4]
4,592,444
4,592,445
Broadcast receiver not getting extra
<p>I have an app using a tab bar host api that I found and I am trying to use it to change activities when I receive a Sms message.</p> <p>The receiver that was build into this tab host is the following:</p> <pre><code>public class ChangeTabBroadcastReceiver extends BroadcastReceiver { @Override public void o...
android
[4]
4,306,183
4,306,184
How to create a layout in android?
<p>Friends,</p> <p>How to create a layout similar tho that of call logs in android contacts?</p>
android
[4]
4,801,038
4,801,039
C# - updating label while adding items to ListView
<p>I have a ListView which I populate with a lot of items, over 3000. This can take up to 15 seconds. Every time I add an item I want to update a label stating how many items have been added so far. To do so I use this code:</p> <pre><code>foreach (FileInfo f in dir.GetFiles("*.*", SearchOption.AllDirectories)) { ...
c#
[0]
5,461,825
5,461,826
Can I use python to create flash like browser games?
<p>is it possible to use python to create flash like browser games? (Actually I want to use it for an economic simulation, but it amounts to the same as a browser game)</p> <p>Davoud</p>
python
[7]
3,363,868
3,363,869
Why am I getting this "IndexError: string index out of range" in one case but not the other?
<pre><code>#i couldnt find the difference in the code &gt;&gt;&gt; def match_ends(words): # +++your code here+++ count=0 for string in words: if len(string)&gt;=2 and string[0]==string[-1]: count=count+1 return count &gt;&gt;&gt; match_ends(['', 'x', 'xy', 'xyx', 'xx']) 2 &gt;&gt;...
python
[7]
1,653,035
1,653,036
how do we calculate increase in radiation of the phone?
<p>I like to create an application on mobile phone radiation. i am using battery status and signal strength values for this.Is this is enough??.expecting some suggestions.Am I on the right track? </p>
android
[4]
2,997,406
2,997,407
how to create function for breadcumb using php
<p>I want to create a function and send <code>$_SERVER['HTTP_REFERER']</code> with parameter and set manual breadcrumb name.</p> <pre><code>function breadcrumb('http://127.0.0.1/yosca_new/index.php?option=com_content&amp;view=article&amp;id=2&amp;topnav=1'); </code></pre> <p>Simple pass the parameter "previous url" a...
php
[2]
439,748
439,749
Google Tasks-like js control
<p>I need to imitate <a href="https://mail.google.com/tasks/ig?pli=1" rel="nofollow">Google Tasks</a> look and feel with a few minor changes.</p> <p>Is there an open-source JavaScript control that I may reuse?</p> <p>The main feature that I look for is "plain-text-like" feel of the in-place task editing process.</p>
javascript
[3]
3,979,385
3,979,386
Android Open Accessory SDK error INSTALL_FAILED_MISSING_SHARED_LIBRARY
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/7294152/android-open-accessory-sdk-error-install-failed-missing-shared-library">Android Open Accessory SDK error INSTALL_FAILED_MISSING_SHARED_LIBRARY </a> </p> </blockquote> <p>Using the <a href="http://develop...
android
[4]
2,969,310
2,969,311
How to hide app icon in app drawer programmatically
<p>We know how to hide an app in app drawer (launcher) referring to <a href="http://stackoverflow.com/questions/3218127/hide-one-application-in-application-menu-of-android">hide one application in application menu of android</a> , however, could we hide app itself within its code? I mean is it possible to remove activi...
android
[4]
4,881,732
4,881,733
Python approach to dataset manipulation
<p>Folks, we have the following problem: we've got several objects containing table data that look something like this:</p> <p><code>{'field1':'value1','field2':'value2', ...}</code></p> <p>At some point during runtime we need to "select" data from these objects (tables) in the same way one were to query a DB (i.e. g...
python
[7]
5,847,925
5,847,926
simple PHP syntax issues
<p><strong>SOLVED</strong>, Thank you all for your feedback! much appreciated. </p> <p>If anyone can help with a simple syntax problem I'm having here it would be greatly appreciated. I'm still in the learning phases of php and just can't seem to figure this out. In the following code I'm assigning an array and a defi...
php
[2]
382,005
382,006
Help with OAUTH twitter post from Android
<p>I want to use <a href="https://github.com/brione/Brion-Learns-OAuth" rel="nofollow">https://github.com/brione/Brion-Learns-OAuth</a> for posting twitter status from android</p> <p>But I have problem with filling this constants. Where to find </p> <pre><code>public static final String USER_TOKEN public static fina...
android
[4]
1,683,952
1,683,953
upgrading python
<p>Hi<br> I just want to install mercurial but for all versions it needs python 2.6, I tried to use .rpm file but the only thing I got is lots of lines full of error which tells: need old versions before 2.6 and after 2.5 which is installed on my linux. any help would be appreciated.<br> Bests</p>
python
[7]
4,856,375
4,856,376
python string input problem with whitespace!
<p>my input is something like this </p> <p>23 + 45 = astart</p> <p>for the exact input when i take it as raw_input() and then try to split it , it gives me an error like this </p> <p>SyntaxError: invalid syntax</p> <p>the code is this </p> <pre><code>k=raw_input() a,b=(str(i) for i in k.split(' + ')) b,c=(str(i...
python
[7]
4,912,540
4,912,541
social networking website using ASP.NET
<p>hey friends i am gonna make a social networking website with ASP.NET should i use visual studio 2008 or 2010 and sql server 2005 or 2008 so please suggest me. i am learning from <em>chris payne</em> <strong>LEARN ASP.NET IN 21 DAYS</strong> and another book <em>andrew siemers</em> which is an excellent book. also w...
asp.net
[9]
4,935,712
4,935,713
PHP: Inserting a reference into an array?
<p>I'm trying to insert into an array at a certain point:</p> <pre><code>$hi = "test"; $var2 = "next"; $arr = array(&amp;$hi); $arr[] = &amp;$var2; // this works array_splice($arr, 1, 0, &amp;$var2); // this doesn't </code></pre> <p>Why does trying to insert it into the array with splice fail and using the first meth...
php
[2]
4,842,948
4,842,949
copy constructor error. please help
<p>I need someone to show me what is wrong with this code. I don't know what's wrong with it. I know the code doesn't do anything meaningful and it can't be used. I created it only to know how copy constructors work. Please, I need some "for newbie" explanation. </p> <pre><code>class test { public: int* value; ...
c++
[6]
518,131
518,132
when is static variable loaded in java, runtime or compile time?
<p>When is static variable loaded, runtime or compile time? Can someone please explain it.</p> <p>I would really appreciate the help.</p> <p>Thank you.</p>
java
[1]
5,452,973
5,452,974
sdk manager not showing packages
<p>i have installed android sdk from developers.android.com and a file is downloaded named as installer_r20.0.3-windows.exe. after i run this file android sdk installed. but when i run the sdk manager after it,it is not showing any packages. It is just showing the tools installed.</p> <p><img src="http://i.stack.imgur...
android
[4]
4,708,158
4,708,159
Active data copying
<p>Is this expression correct?</p> <pre><code>{ char a; char *temp; for(int j = 0; j &lt; len; j++) { strcpy(&amp;temp[j], (char*)a); } } </code></pre> <p>in this code <code>a</code> gets updated externally by the user input/key stroke. I want to copy all incoming/updated <code>a</code> to...
c++
[6]
4,540,896
4,540,897
dropdown list Query String Parameter
<p>Hello everyone how you guys doing? I have a dropdown list that won't populate data values from database using sql datasource. When i use the code behind, i was able to populate the data to the dropdown list. I dont know how to pass the Query String Parameter using code behind since i am new in asp.net.</p> <p>This ...
asp.net
[9]
3,633,313
3,633,314
Getting the file browser twice
<p>I have a little application which can be found here: <a href="http://templater.pmueller.dev.xiag.ch/frontend/show/id/3/authkey/789" rel="nofollow">templater.pmueller.dev.xiag.ch/frontend/show/id/3/authkey/789</a> If the site is down, try again in an hour. They are experiencing problems atm. Also everything is quite ...
jquery
[5]
1,519,210
1,519,211
keynav jquery plugin : How to change first element of navigation?
<p>I have a simple example:</p> <pre><code>&lt;head&gt; &lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/jquery.keynav.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;style&gt; .select { color: red } &lt;/style&gt; &lt;a class="test" href=""&gt;A&lt...
jquery
[5]
5,893,016
5,893,017
How to combine these two javascript/jquery scripts
<p>I have an id #navigation li a and a class .menu-description . I want to change text color of the class .menu-description when hovered on #navigation li a</p> <p>My jquery so far:</p> <pre><code>&lt;script&gt; $(document).ready(function() { $('#navigation li a').mouseover(function() { //Check if element with c...
javascript
[3]
5,382,353
5,382,354
Android: How to set logo in all activities of android application
<p>I want to set Logo before the app name in activities? Please anyone help me to set logo(icon) in activity page in top right corner..</p>
android
[4]
2,905,663
2,905,664
Showing A Waiting Image While The Page.Load event does its stuff?
<p>I have a page that on page load exectutes a lot of methods.. A few ping off and grab some external pages and strip out content to display etc.. etc..</p> <p>Problem is as this can take quite a few seconds, the page just sort of hangs while all this is going on in the background... I want to be able to display the ...
asp.net
[9]
3,047,667
3,047,668
Getting error while sending mail?
<p>when i am sending mail in my web application i am getting this erro.</p> <p>I AM GETTING THIS ERROR. The element may only appear once in this section. (C:\Inetpub\vhosts\XXX.com\httpdocs\web.config line 64) </p> <pre><code> &lt;system.net&gt; &lt;mailSettings&gt; &lt;smtp&gt; &lt;network ho...
asp.net
[9]
2,309,160
2,309,161
Need help,Screen didn't turn on after I change Activity's theme
<p>I'm making my alarm app. There is an Activity to show alarm infomation. I want turn on the screen and unlock it. I wrote these code</p> <p><b>AlarmActivity.java:</b></p> <pre> public class AlarmActivity extends Activity { ...... void onCreate(Bundle bl) { ..... final Window win = getWindow(); win....
android
[4]
1,338,603
1,338,604
How should i write Response.Redirect() in asp.net
<p>In asp.net two overload method of Response.Redirect() exist.</p> <blockquote> <ol> <li><p>Public Sub Redirect ( _ url As String )</p></li> <li><p>Public Sub Redirect ( _ url As String, _ endResponse As Boolean _ )</p></li> </ol> </blockquote> <p>I would like to know the diffrence between these two...
asp.net
[9]
4,858,647
4,858,648
Android library - ClassDefNotFoundError - class not in classes.dex
<p>I have an Android library (Java code) that I share among multiple Android application projects using Eclipse. For application projects I've created in the past I'm able to reference the Android library and use it at runtime no problem. But now for any new Android application project I create with references to my ...
android
[4]
4,095,953
4,095,954
How to check ensure a array does not contain the same element twice
<p>I have a loop which assigns randomly generated integers into an array. I need a way to ensure the same integer is not input into the array twice.</p> <p>I figured creating a loop inside the overall loop would work but I am unsure on what to execute here.</p> <pre><code>int wwe[] = new int[9]; for(int i = 0; i &lt;...
java
[1]
4,205,792
4,205,793
I'm trying to make a void to check if something is true, and if something is, make a string say something depending on what was true
<pre><code> public void sortingFamilyName(Player player) { if (player.Zamorak == true) { godFamily = "Zamorak"; } if (player.Saradomin == true) { godFamily = "Saradomin"; } if (player.Guthix == true) { godFamily = "Guthix"; } if (player.Zaros == true) { godFamily = "Zaros"; } if (playe...
java
[1]
1,720,996
1,720,997
How to sort array without using sort method in C#
<p>How to sort array without using sort method in C#</p>
c#
[0]
3,841,767
3,841,768
"reveal" an image on iphone
<p>i would like to reveal an image on an UIView:</p> <ol> <li>showing an empty screen</li> <li>slowly reveal the image from to to bottom</li> </ol> <p>Any ideas ?</p>
iphone
[8]
4,264,021
4,264,022
PHP How to check if an array key equals a certain value?
<p>How do I check that an array key equals a value with an array like this:</p> <p><code>Array ( [0] => stdClass Object ( [subCategory] => All Headphones [description] => [image] => ) [1] => stdClass Object ( [subCategory] => Behind-the-Neck Headphones [description] => [image] => ) [2] => stdClass Object ( [subCategor...
php
[2]
2,452,415
2,452,416
Function.prototype.propertyname === Object.propertyname is true?
<p>In trying to better understand the prototype behind javascript, I have stumbled upon the following, which I am unable to make sense of so far. </p> <p>I understand that functions are a first class object, but I don't get why Object gets this property after setting the property on Function.prototype </p> <pre><code...
javascript
[3]
3,525,617
3,525,618
convert Base64 string to image in android
<p>Hello In an android application we are receiving a byte64 string.I need to convert these strings to images. I tried getting it but couldnot find any. Please let me know your valuable suggestions</p> <p>Thanks in advance :)</p>
android
[4]
4,478,230
4,478,231
How to get Android screen height minus status bar in pixel?
<p>I am using this thick but it returns "0"</p> <pre><code> View content = getWindow().findViewById(Window.ID_ANDROID_CONTENT); int viewHeight = content.getHeight(); </code></pre> <p>How to do so?</p>
android
[4]
1,436,573
1,436,574
android: check if value is present in Shared Preferences
<p>I'm creating Shared Preferences as follows</p> <pre><code>preferences = getSharedPreferences("text", 0); final Editor editor = preferences.edit(); String s1 = serverIP.getText().toString(); String s2 = serverPort.getText().toString(); String s3 = syncPass.getText().toString(); String s4 = proxyServer.getText().toS...
android
[4]
3,767,382
3,767,383
How to get the caller class in Java
<p>I want to get the caller class of the method, i.e. </p> <pre><code>class foo{ bar(); } </code></pre> <p>in the method bar, i need to get the class name <code>foo</code>, and i found this method:</p> <pre><code>Class clazz = Reflection.getCallerClass(1); </code></pre> <p>however, i noticed that <code>getCalle...
java
[1]
5,042,055
5,042,056
How can I get files from the iDisk programmatically?
<p>I need to write an iPhone app that allows the user to download and use files (more specifiably, video files) that are on the Mobile Me iDisk. Is this possible? I was not able to find an iDisk API for Objective-C.</p>
iphone
[8]
4,204,857
4,204,858
Testing for object equality by comparing the toString() representations of objects
<p>Following on from <a href="http://programmers.stackexchange.com/questions/149001/are-there-any-situtations-where-having-a-data-model-in-which-all-your-enititie">this question</a> - how do you explain to someone that this is just crazy!:</p> <pre><code>boolean someMethod(Map&lt;String, Object&gt; context) { Obje...
java
[1]
2,150,279
2,150,280
Admob with version 4.0 only?
<p>I am looking at introducing admob to my application which is developed in version 2.1 so it can support all devices. However I think that I just read that admob will not work for any devices that are prior to 3.2 or 4(cant remember) and that the most recent admob SDK should be downloaded or it will not work.</p> <p...
android
[4]
4,940,961
4,940,962
limiting number of letters for registering a new user name
<p>I have a forum and visitors can register user names with more than 20 letters, how can I deny those visitors to register with a (long) user names?</p> <p>the registration form is using PHP language.</p> <p>thanks,</p>
php
[2]
4,754,849
4,754,850
Hiding Source code
<p>i have a problem in my website.i need to disable both right click and view source option in browsers menu for all webpages.There may be some other ways to get source code,that doesn't matters.i have alredy disabled right click.so please help me if there is any way to supress browsers view source option.</p> <p>Than...
asp.net
[9]
2,835,854
2,835,855
MVC Framework that is similar to ASP.NET MVC but for Winform
<p>I know there are MVC for Winform (MVC# etc.) but if have to develop on ASP.NET MVC and then on Desktop I don't want to have 2 different frameworks so is there anything close to ASP.NET MVC but for Winform ?</p> <p>What I mean is that the specific part of ASP.NET which is url routing for example should be replaced b...
c#
[0]
433,357
433,358
Loop through included files in php
<p>I have this code snippet here:</p> <pre><code>&lt;?php include('a.php'); include('b.php'); include('c.php'); include('d.php'); include('e.php'); ?&gt; </code></pre> <p>I would like to have a loop run through this file and execute each of these files once. How can i go about this? I am new to php.</p>
php
[2]
5,762,043
5,762,044
trouble putting one function to another
<p>what i'm trying to do is to read each line of the file then put it into other function called handleLine which then creates output, numericgrade calculates the overall percentage and then lettergrade assigns a grade.</p> <p>for example in file i have "name, last name", classid, exam, final and i want it to output ...
python
[7]
3,148,079
3,148,080
I want to get unique set of n*n arrays which are including only 0 or 1 at random location in c++
<p>I want to acquire set of n*n arrays including 0 or 1 </p> <p>But, each element has to be different each other.</p> <p>For example,</p> <pre><code>arr[3][3] = {{0,1,0}, {1,0,0}, {1,1,1}} arr2[3][3] = {{0,1,1}, {1,1,1}, {0,0,1}} </code></pre> <p>Like above, I n...
c++
[6]
824,456
824,457
set folder read only to false
<p>Currently my code to set the folder read only to <strong>false</strong>.</p> <pre><code>var di = new DirectoryInfo("C:\\NightlyBuild"); foreach (var file in di.GetFiles("*", SearchOption.AllDirectories)) file.Attributes &amp;= ~FileAttributes.ReadOnly; </code></pre> <p>However, I did th...
c#
[0]
5,506,551
5,506,552
Changing language from my app works weirdly
<p>I am changing the language in <code>MainActivity.onCreate()</code> like this:</p> <pre><code>Locale locale = new Locale("cs"); Configuration config = getResources().getConfiguration(); config.locale = locale; getResources().updateConfiguration(config, getResources().getDisplayMetrics()); </code></pre> <p>It works ...
android
[4]
1,676,518
1,676,519
android - difference between static reference and reference inside Application class?
<p>suppose i have a reference to an instance of a class , which doesn't have any direct/indirect reference to problematic objects (like context,views,...) .</p> <p>are there any differences between using this reference in a static reference and using it inside the class that extends the <code>Application</code> class?...
android
[4]
3,459,734
3,459,735
Whats the quickest way to get rid of all the properties of a an object in javascript?
<p>I have an on object like so</p> <pre><code>var obj = {}; function set() { obj.x1 = 20; obj.y1 = 35; obj.x2 = 60; obj.y2 = 55; ... } </code></pre> <p>Whats the quickest way to delete/reset all of the properties of obj?</p>
javascript
[3]
4,746,089
4,746,090
How to sort NSMutableArray in ascending order, iPhone?
<p>I have SQLite Database(DB) and made this to model class and taken the data of DB in NSMutableArray. My DB is similar to this DB. <strong>StudentName | RegisterNumber | DatesOfJoin(DoJ)</strong> I am displaying the DoJ in tableView successfully, but I wanna sort the DatesOfJoin in Ascending order and Descending order...
iphone
[8]
702,156
702,157
How to change the border and separator color of spinner widget
<p>I have customised the <code>spinner</code> items background into black color.But border around spinner and the separartor between each spinner item is in white color. I want to change separator color and border to dark gray color.</p> <ul> <li>How can i change these color?</li> <li>Is spinner uses list view or some...
android
[4]
2,722,260
2,722,261
The difference between putting functions into an object and prototyping them?
<p>What's the difference between adding functions to an object and prototyping them onto the object?</p> <p>Prototyping allows the object/model to call itself?</p>
javascript
[3]
3,862,014
3,862,015
PHP Blackjack aces
<p>The PHP blackjack script is simple, I have an array of cards and I select a random one and add it and it's also pretty easy to keep the count the hard part comes in with the aces.</p> <p>Is there any efficient method to counting them except bruteforcing? Theoretically it would be possible (although highly unlikely)...
php
[2]
3,372,693
3,372,694
this property is not supported by object?
<pre><code>$(document).ready(function(){ ('#mainField').click(function(){ $("#editor").animate({width: 985, height: 200}, 1500); $("#closeEditor").css("display", "inline"); }); }); </code></pre> <p>This piece of code doesn't work, what...
jquery
[5]
5,881,774
5,881,775
How to send just a string with http Post on Android?
<p>i need to send a string to a server, but the only way i know to is by using namevaluepairs, but that sends the key and a value i just want to send one string, how do i do that?</p> <pre><code>HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://10.0.2.2:1...
android
[4]
5,700,477
5,700,478
ScriptManager.RegisterHiddenField in Chrome
<p>I'm working with some code that utilizes the ScriptManager.RegisterHiddenField to keep track of modifications to a datamodel. It works fine in IE and FF, but Chrome is having trouble. A simple example of the problem occurs if you add something like:</p> <pre><code>protected void Page_Load(object sender, EventArgs...
asp.net
[9]
394,099
394,100
questions about "Beginning Android Games" by Mario Zechner
<p>I refer to <a href="http://stackoverflow.com/questions/2837925/good-book-for-android-game-development">Good book for Android game development</a>. Before I buy the book, I just need to know, do the examples in the book use a game engine or no? Does the book recommend games be written in java? Does the author ever me...
android
[4]
1,156,773
1,156,774
Why num = 1 - -"2" equals 3
<p>Titles says it but again:</p> <p>If we do:</p> <pre><code>num = 1 + +"2"; alert(num); // 3 </code></pre> <p>I know that with <code>+"2"</code>, addition of <code>+</code> converts string into number. But:</p> <pre><code>num = 1 - -"2"; alert(num); // 3 </code></pre> <p>Why is it so? I was expecting <code>-1</co...
javascript
[3]
80,919
80,920
Are XHDPI images meant for use with retina displays in Android?
<p>Should we use XHDPI images for retina display in Android? If not, where should I place images/assets for the Samsung Galaxy S3.</p> <p><strong>Update:</strong><br> I found a useful artical:<br> <a href="http://blog.blundell-apps.com/list-of-android-devices-with-pixel-density-buckets/" rel="nofollow">List of Android...
android
[4]
3,941,535
3,941,536
How can i know that the AsyncTask that ran on the background is done ?
<p>There is something that i don't understanding here ... </p> <p>I define class </p> <pre><code>public class SendStringToServer extends AsyncTask&lt;String, Integer, Boolean&gt; { . . . } </code></pre> <p>Now, i implimented the 'onPostExecute' method and i calling this background action from the main...
android
[4]
3,048,749
3,048,750
How to create and remove application shortcut into home screen?
<p>I am creating a application shortcut. It's working fine. But i can't remove this shortcut. How to remove my application shortcut. In my home screen contains lot of application shortcut. How to remove that..<br>If it is possible please send information for how to remove application shortcut. Otherwise if it is not po...
android
[4]
771,238
771,239
android don't show icon after first launch...?
<p>i have a small problem: can i show the icon of my application in drawer only so long as it is done the first time?</p> <p>I found the code (in the manifest to make) for don't appear (icon is invisible):</p> <pre><code>&lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name" &gt...
android
[4]
3,359,629
3,359,630
jQuery Framework Support - are there any companies that do support for jQuery?
<p>I'm looking into support models between commercially supported client side frameworks and Microsoft’s Support for JQuery. My intent is to determine if there is a risk/gap in support as development shifts more towards client side interactions.</p> <p>Does anyone have an opinion or can suggest the best solution? Than...
jquery
[5]