Unnamed: 0 int64 65 6.03M | Id int64 66 6.03M | Title stringlengths 10 191 | input stringlengths 23 4.18k | output stringclasses 10
values | Tag_Number stringclasses 10
values |
|---|---|---|---|---|---|
2,057,497 | 2,057,498 | ListView items won't show focus color when click | <p>When i click on listview, its not show the focus color .</p>
<blockquote>
<pre><code><ListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:divider="@color/grey"
android:dividerHeight="1px"
and... | android | [4] |
2,955,260 | 2,955,261 | Javascript random number picker not working | <p>I'm trying to make a simple javascript application to pick a random number between 1 and a number I specify in an input field, so I can pick a random winner for a Christmas competition. </p>
<p>Below is the code I've got so far. I don't think it can be far off, can you help me as it's not updating the input field t... | javascript | [3] |
5,160,014 | 5,160,015 | Operator Overloading For Builtin Types | <p>How can I override operators to be used on builtin types like String, arrays etc? For example: I wish to override the meaining of the + operator for arrays.</p>
| c# | [0] |
4,479,396 | 4,479,397 | multiplying two floats in C++ give me unknown results | <p>I am a C++ newbie and having a problem with my first program. I'm trying to multiply two float numbers and the result always show like 1.1111e+1 where 1s are the random numbers. Following is the little program I wrote.</p>
<pre><code>#include <iostream>
#include <string>
#include <conio.h>
using n... | c++ | [6] |
3,705,356 | 3,705,357 | What is this " var1 = Math.Ceiling(hours / (40.00M * 4.3M));" | <p>Anyone know what the C# "M" syntax means?</p>
<pre><code>var1 = Math.Ceiling(hours / (40.00M * 4.3M));
</code></pre>
| c# | [0] |
229,922 | 229,923 | Glow effect with background color using jQuery | <p>How can I add a subtle "glow" effect to a <code>div</code> element that will glow all the time/permanently, right after the page load, not just when hovered?</p>
<p>Unfortunately, the client wants me to make this work in IE7+.</p>
| jquery | [5] |
2,685,362 | 2,685,363 | Android: Implement Woopra in App | <p>Trying to add <strong>Woopra</strong> in my <code>Android</code> App but there is no <code>SDK</code> for <code>Android</code> provided.
Is there any way to add <strong>Woopra</strong> in <code>Android App</code> to <code>log events</code>?
Please help me on this if anybody have tried on this topic.
thanks in advanc... | android | [4] |
4,423,957 | 4,423,958 | asp.net calling code inline not working | <p>In my code behind, I can do the following in the onload:</p>
<pre><code>string x = Fmg.Cti.UI.Utilities.Classes.ResourceController.ReadResourceValue("Riblet", "Riblet_Chicklet1_Button_text");
</code></pre>
<p>This works without issue.</p>
<p>In my aspx page (I didn't remove the code from the onload), I put this:<... | asp.net | [9] |
3,472,431 | 3,472,432 | how to convert MID file to wav file? | <p>I want to play background music in my game application using AVAudio player.I am using .MDI file.This file is not playing in AVAudio player.So i want to convert this .MDi file to wav file.IS it possible?</p>
| iphone | [8] |
172,125 | 172,126 | Understanding Python Numerology | <p>We can not declare an integer which start with 0.</p>
<pre><code>>>> n = 08
SyntaxError: invalid token
</code></pre>
<p>But we do declare a variable that contains all zeros.</p>
<pre><code>>>> n = 00000
>>> print n
>>> 0
</code></pre>
<p>So the question is in first case why py... | python | [7] |
2,086,656 | 2,086,657 | C# - Static property in class | <p>I have the following code:</p>
<pre><code> internal class ModuleLogic
{
#region [Private Variables]
private static ReaderWriterLockSlim _moduleListLock = new ReaderWriterLockSlim();
private static List<Module> _moduleList;
#endregion
public static void Refres... | c# | [0] |
1,354,160 | 1,354,161 | Removing HTML tags in PHP | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6247035/strip-all-html-tags-except-allowed">Strip all HTML tags, except allowed</a> </p>
</blockquote>
<p>I'm new to PHP</p>
<p>Here is my code </p>
<pre><code><p>The filetype you are attempting to uploa... | php | [2] |
2,289,996 | 2,289,997 | Show Rows based on values in multiple columns. JQuery | <p>In JQuery hiding a table row based on a predefined columns td value is easy using the following code.</p>
<pre><code>function filterRows(word){
$('.application>tbody>tr')
.show()
.find('td:nth-child(2)').not(':contains("'+word+'")')
.parent()
.hide()
}
</code></pre>
<p>However how would I go about showing ro... | jquery | [5] |
5,578,007 | 5,578,008 | A whole website with slide effect | <p>Does anybody know how can i achieve that "slider site" functionality like in here <a href="http://dawidtomczyk.pl/" rel="nofollow">http://dawidtomczyk.pl/</a></p>
<p>Click on navigation home etc. </p>
<p>After reviewing each of the plug-ins that was used along with that site, none of them where related to the "sit... | jquery | [5] |
372,597 | 372,598 | CRC_CCITT Kermit 16 in C# | <p>I'm currently working on a hard way that requires the CRC_CCITT Kermit 16 protocol with the formula (X16 + X12 + X5 + 1). However some of the code I've found online both on this site or the web in general I don't seem to get my desired result. I saw this website (http://www.lammertbies.nl/comm/info/crc-calculation.h... | c# | [0] |
3,711,713 | 3,711,714 | Rename Array Keys | <p>I need to change this array's keys to 0-5, why isn't this working?</p>
<pre><code>$arr = array();
while(count($arr) < 6){
$arr[] = rand(1,53);
$arr = array_unique($arr);
}
asort($arr);
$i = 0;
foreach($arr as $key => $value){
//echo $i;
$key = $i;
$i++;
}
print '<pre>';
print_r($a... | php | [2] |
2,848,924 | 2,848,925 | java.lang.UnsupportedClassVersionError: | <p>I have developed a small project in eclipse which makes use of Java6. But I want to run the same project in hpux system which has java1.5. When I try to run it is throwing the error : </p>
<blockquote>
<p>java.lang.UnsupportedClassVersionError:. </p>
</blockquote>
<p>Then I have changed the eclipse Java compiler... | java | [1] |
5,415,934 | 5,415,935 | Can I make a bitwise copy of a C++ object? | <p>Can C++ objects be copied using bitwise copy? I mean using memcopy_s? Is there a scenario in which that can go wrong?</p>
| c++ | [6] |
4,046,797 | 4,046,798 | A simple Thread scenario in Java where the Runnable interface need not be implemented by the Thread implementing class | <p>Let's look at the following code, it's working exactly.</p>
<pre><code>final class DemoThread
{
public void temp()
{
new Thread(new Runnable()
{
public void run()
{
System.out.println( "Isn't it great ?" ) ;
}
} ) .start() ;
}
}... | java | [1] |
3,102,270 | 3,102,271 | expected ';' before numeric constant | <p>I have the following code in C++, trying to write a xml file into a file, but it keeps giving me this problem "expected ';' before numeric constant</p>
<pre><code>int main () {
ofstream myfile;
myfile.open ("example.xml", ios::out| ios::app| ios::binary);
if (myfile.is_open())
{
myfile << "<?xm... | c++ | [6] |
4,688,109 | 4,688,110 | Filemtime error | <p>Everything works fine when I try and do this.</p>
<pre><code>echo date("F d, Y h:i:s A",filemtime("index.php"));
</code></pre>
<p>But when I try to run a code like this.</p>
<pre><code>date_default_timezone_set('America/Chicago');
$name = $_SERVER['PHP_SELF'];
$name = basename("$name", "").PHP_EOL;
echo date("F ... | php | [2] |
482,620 | 482,621 | How to fetch the data for PHP from two databases on different hosts and put them in a single html table? | <p>I have to put the data into a php page from the databases which are in seperate hosts. The one workaround i can think of is getting the data from both the databases onto an array and then displaying it. What if the array is multi dimensional? How to merge data from two databases on two different hosts in PHP? I am u... | php | [2] |
5,817,556 | 5,817,557 | Is it possible to have a method act like a property in a javascript class? | <p>Take the following piece of javascript that is trying to implement a class:</p>
<pre><code>function aClass(){
this.prop1 = this.getProp1();
}
aClass.prototype.getProp1 = function(){
// do some stuff
return result;
}
</code></pre>
<p>I can then use it like so:</p>
<pre><code>var obj = new aClass();
alert(ob... | javascript | [3] |
2,920,176 | 2,920,177 | Adding timestamps together to get total hours and minutes | <p>I am trying to write a function that will add time stamps together to get a sum of all. For example:<code>11:30 + 12:00 + 15:35 = 39:05</code> I am unsure of how to accomplish this. I have included code below that I have tried but it does not give the desired result:</p>
<pre><code>$TotalTime = strtotime($data['Tot... | php | [2] |
4,746,952 | 4,746,953 | Loop every 10 second | <p>How to load a loop every 10 second and add +1 to the count and print it?</p>
<p>like:</p>
<pre><code>int count;
while(true)
{
count +=1;
cout << count << endl; // print every 10 second
}
</code></pre>
<p>print:</p>
<pre><code>1
2
3
4
5
ect...
</code></pre>
<p>i dont know h... | c++ | [6] |
4,225,509 | 4,225,510 | Best way to get only certain groupings out of a string | <p>I am getting a list of file names using the following code: </p>
<pre><code> //Set up Datatable
dtUpgradeFileInfo.Columns.Add("BaseFW");
dtUpgradeFileInfo.Columns.Add("ActiveFW");
dtUpgradeFileInfo.Columns.Add("UpgradeFW");
dtUpgradeFileInfo.Columns.Add("FileName");
/... | c# | [0] |
3,444,091 | 3,444,092 | how to get text from multiple edit text with the same id in android | <p>I am creating an edit text filed using xml and adding that in listview 's adapter class .i m using enumerator.by this i was able to create two textfields with the same id.the problem is how to get the strings from both the text fields since they are sharing the same id.below is the code.</p>
<pre><code>@Override
pu... | android | [4] |
4,647,299 | 4,647,300 | Why does the MSDN site compare using delegates and interfaces? | <p>The MSDN site compares using delegates instead of an interface, but what makes these two language-level constructs so similar that one could be used over another? They seem to do completely different things?</p>
<p>Thanks</p>
| c# | [0] |
5,622,845 | 5,622,846 | How would one implement a NumberPicker in Android API 7? | <p>There's a NumberPicker widget in API 11, but I'm building for a minimum API of 7. How would I go about implementing one? Is there a custom widget that I can use, or is there a way to get at the components that make up DatePicker / TimePicker?</p>
| android | [4] |
3,853,525 | 3,853,526 | Pass a function by reference in PHP | <p>Is it possible to pass functions by reference?</p>
<p>Something like this:</p>
<pre><code>function call($func){
$func();
}
function test(){
echo "hello world!";
}
call(test);
</code></pre>
<p>I know that you could do <code>'test'</code>, but I don't really want that, as I need to pass the function by re... | php | [2] |
2,496,423 | 2,496,424 | Adding Filters to List | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3838845/jquery-remove-duplicate-li">jquery remove duplicate li</a> </p>
</blockquote>
<p>I have a List which looks like the following: <a href="http://jsfiddle.net/UwPTF/" rel="nofollow">http://jsfiddle.net/UwPT... | jquery | [5] |
4,757,164 | 4,757,165 | check if any select box has changed after button click | <p>I want to check a group of select boxes and see if they changed after a button has clicked.</p>
<pre><code><select name="data[model][that]" class="location_dropdown">
<option value="value1">value 1</option>
<option value="value2">value 2</option>
<option value="value3" s... | jquery | [5] |
5,962,925 | 5,962,926 | I cant make the exe setup file in c# | <p>I have the solution bar in visual studio 2008 from c# but i can my project make a exe setup file becouse it have the solution bar but havent that solution fanction so how to get that function?</p>
| c# | [0] |
4,909,309 | 4,909,310 | How to customize the color of the CheckMark color in android in a dialog. : android | <p>How to customize the color of the CheckMark color in android in a dialog. Currently , By default, the color of the checkmark is green by default. I would like to customize it to a different color of choice</p>
| android | [4] |
2,411,785 | 2,411,786 | PackageManager not showing installed Live Wallpapers | <p>I am trying to load a list of all installed packages on the device, however, when I do this, any installed Live Wallpapers do not show up on the list... is there a way to fix this?</p>
<p>Here's my code:</p>
<pre><code>final PackageManager pm = this.getPackageManager();
Intent intent = new Intent(Intent.ACTIO... | android | [4] |
1,168,854 | 1,168,855 | Open page in window of specific size | <p>The following Javascript opens a window as required in IE8, FF4 and Safari 5.0.5 but not in Opera or Chrome.</p>
<pre><code>function setWindowSize(){
var window_height = 600;
var window_width = 600;
window.resizeTo(window_width, window_height);
}
</code></pre>
<p>I would like a jQuery script that doe... | jquery | [5] |
880,027 | 880,028 | substitute of function pointers in python | <p>I have worked in low level C programming for years and I don't have enough exposure to Object oriented approaches. In C if I was developing some layered architecture then each layer has interfaces defined by function pointers. The advantage of that the whole layer can be replaced by just setting those function point... | python | [7] |
333,311 | 333,312 | How to check if an element of a list is a list (in Python)? | <p>If we have the following list:</p>
<pre><code>list = ['UMM', 'Uma', ['Ulaster','Ulter']]
</code></pre>
<p>If I need to find out if an element in the list is itself a list, what can I replace <em>aValidList</em> in the following code with?</p>
<pre><code>for e in list:
if e == aValidList:
return True
<... | python | [7] |
4,609,435 | 4,609,436 | URL encoding for multibyte character string in c++ | <p>I am trying to achieve URL encoding for some of my strings via c++. Strings can contaim multibyte characters like ™, ®, ©, etc.</p>
<p><strong>Input text</strong>: Something ™ <br />
<strong>Output should be</strong>: Something%20%E2%84%A2</p>
<p>I can achieve URL encode or decode in JS with encodeURIComponent and... | c++ | [6] |
5,477,166 | 5,477,167 | jquery option text selector problem | <pre><code><select id="name">
<option value="1005">peter</option>
<option value="2056" selected="selected">shan</option>
</select>
</code></pre>
<p>how to set option's text=peter selected?<br>
like this <code>$('#name option[text=peter]').attr('selected',true)</code>;</p>
| jquery | [5] |
5,951,340 | 5,951,341 | network provider not working in android | <p>i have to make an android application in which i need to find the current location of the user.
For this i am first using the GPS provider, but if it is not available i fall back to the network provider.
Now there have been instances on my phone when even the network provider is not working and the statement
... | android | [4] |
4,817,895 | 4,817,896 | Every keypress insert a character into a hidden text input | <p>I am trying to insert a specific character say the letter "H" every time a key is pressed in another text box.</p>
<p>Eg. </p>
<p>Text box 1: Type your name
<br>Text box 2: HHHHHHHHHHHHHH</p>
<p>I have tried</p>
<pre><code>$('#cartText16132').keyup( function() {
$('input#test').val('1');
});
</code></pre>
<... | jquery | [5] |
4,736,788 | 4,736,789 | Launching application on call | <p>I am new to iphone application. I am creating a new application which should work in background and activate when call comes. I understand truecaller works in similar way. </p>
<p>Thank You</p>
| iphone | [8] |
5,815,799 | 5,815,800 | strange Fatal error: Cannot redeclare class paradox | <p>I get the following error:</p>
<pre><code>Fatal error: Class 'mysql' not found in /home/o
</code></pre>
<p>So naturally I include the class, but when I do I get this error:</p>
<pre><code>Fatal error: Cannot redeclare class
</code></pre>
<p>As you can imagine I have no idea how to fix this problem!!</p>
<p>Any ... | php | [2] |
2,755,390 | 2,755,391 | PHP encrypt password before storing it to database | <p>I found the following example on php.net to secure password before storing it. However, I don't quite understand line 3. Could someone explain this a little bit? Thanks! </p>
<pre><code>1 <?php
2 $password = crypt('mypassword'); // let the salt be automatically generated
3 if (crypt($user_input, $password) ==... | php | [2] |
2,103,676 | 2,103,677 | Unknown file type error with .pyx file | <p>I'm trying to build a Python package (pyregion) that contains a *.pyx file and error comes during the build process. Checking out the below output:</p>
<pre><code>$ python setup.py build
running build
running build_py
creating build
creating build/lib.macosx-10.5-x86_64-2.7
....
running build_ext
building 'pyregion... | python | [7] |
4,135,126 | 4,135,127 | what is new in AVD 2.3 to compare 2.1 | <p>i want to know that which are new features in 2.3 compare 2.1.<br>
i have hndled many project in android in 2.1 and good experiance.
please list out what's new feature in 2.3.</p>
| android | [4] |
3,579,207 | 3,579,208 | Imput console commands through a desktop app get returned rows back? | <p>What I am trying to do is to imput console comands on a desktop app(in a textBox) click a button, execute the command and get the returned values back for display..</p>
<p>The point is, I want to make my work faster and less stresful when trying to imput repetitive commands on the console over and over again every... | c# | [0] |
2,477,437 | 2,477,438 | Random in python 2.5 not working? | <p>I am trying to use the import random statement in python, but it doesn't appear to have any methods in it to use.</p>
<p>Am I missing something?</p>
| python | [7] |
1,947,094 | 1,947,095 | calling a function from another function by 'onclick' event | <p>What I am trying to do is, call a function from another function by clicking a radio button in that function. Here is the code I have worked on so far-</p>
<pre><code><script type="text/javascript">
rad1 = document.createElement("input");
rad1.type = "radio";
rad1.name = "dooropt";
rad1.id = "rb1";
rad1.value... | javascript | [3] |
3,556,513 | 3,556,514 | Add Variable to $_SERVER array via php.ini | <p>I need to add a variable to the $_SERVER array in a php script. Is there a possibility to do this via the php.ini file? I want to add the variable for all scripts on the webserver, so it's quite inconvenient to add it in each script.</p>
<p>Thanks,
TSS</p>
| php | [2] |
391,714 | 391,715 | What is the issue with this java singleton class implementation? | <p>I have come across another article in stackexchange on various ways to implement java singleton. One of the ways shown is the following example. It has been voted very low. Wanted to understand why.
<a href="http://stackoverflow.com/questions/70689/what-is-an-efficient-way-to-implement-a-singleton-pattern-in-java">W... | java | [1] |
5,063,855 | 5,063,856 | Getting one line in a huge file with PHP | <p>How can i get a particular line in a 3 gig text file. The lines are delimited by \n. And i need to be able to get any line on demand.</p>
<p>How can this be done? Only one line need be returned. And i would not like to use any system calls.</p>
<p>Note: There is the same question elsewhere regarding how to do this... | php | [2] |
5,336,089 | 5,336,090 | Improving Collections.Sort | <p>I am sorting 1 million strings (each string 50 chars) in ArrayList with</p>
<pre><code>final Comparator comparator= new Comparator<String>() {
public int compare(String s1, String s2) {
if (s2 == null || s1 == null)
return 0;
return s1.compareTo(s2);
}
};
Collections.Sort(list,co... | java | [1] |
2,116,251 | 2,116,252 | python .os.path.walk with direct file | <p>Everything in the <code>/home/username/main/books/</code> directory gets written and returned, but <code>/home/username/main/index.html</code> does not get written because "index.html" is not a directory and therefore cannot be walked. How would I revise the script to say if its a directory, walk it then write every... | python | [7] |
1,501,299 | 1,501,300 | native iphone graphing library? | <p>Does anyone know of a native graphing library for the iPhone SDK? I have a free iPhone polling app called Show of Hands that currently uses calls to google charts via embedded safari pages, e.g. <a href="http://www.showofhands.mobi/Viewmore.aspx?qid=9245968c-d40d-478c-8781-804d086cd643" rel="nofollow">http://www.sho... | iphone | [8] |
4,668,037 | 4,668,038 | throwable will not compile | <p>First I must say that I read the following: <a href="http://docs.oracle.com/javase/tutorial/essential/exceptions/index.html" rel="nofollow">http://docs.oracle.com/javase/tutorial/essential/exceptions/index.html</a>!</p>
<p>The error I get when I try to compile is the following:</p>
<pre class="lang-none prettypri... | java | [1] |
3,976,718 | 3,976,719 | How to overwrite the mapview over pdf file in iphone? | <p>I need to insert the .pdf file into app and i need to set gps over it?That pdf file has to work as map?</p>
| iphone | [8] |
3,852,401 | 3,852,402 | What's wrong with Java? | <p>I regularly see/hear negative comments about Java, but there never seems to be any specific negative point about it, at least nothing that hasn't been addressed in later versions.</p>
<p>So, really, what's wrong with Java?</p>
| java | [1] |
153,650 | 153,651 | Insert & Symbol in Textview android:text | <p>How can i insert <code>&</code> Symbol in <code><TextView></code><br>
i have tried with & and Hex code but not allow me to do this. </p>
<pre><code> <TextView android:layout_height="wrap_content"
android:textColor="#49515F"
android:text="Mission and Philosophy" ... | android | [4] |
4,263,108 | 4,263,109 | AddDays() not working within a while loop | <p>Is there anything that stops the <code>DateTime AddDays()</code> method that doesn't run within a while loop. I have this simple bit of code;</p>
<pre><code>DateTime last_day = monthCalendar2.SelectionRange.End;
DateTime first_day = new DateTime(year, month, day);
//Insert dates into vector
while (first_day != las... | c# | [0] |
5,431,434 | 5,431,435 | How to detect Android version and brand from webkit browser? | <p>How to detect Android version and brand via webkit browser and is it reliable?</p>
| android | [4] |
1,863,420 | 1,863,421 | What happens when I give more parameters than required in the function in Javascript? | <p>Assume - </p>
<pre><code>function noname(a, b) {
//code
}
</code></pre>
<p>and I give - </p>
<pre><code>noname(4,5,6,7);
</code></pre>
<p>What will happen then?</p>
| javascript | [3] |
135,466 | 135,467 | No network access when debugging on Droid X | <p>I just picked up a used Droid X for development and when I try to debug from eclipse I don't have any network access. Works fine when I run the app non-debug. I've installed the Moto USB drivers for Windows and I've tried all the USB connection types on the phone and before you ask, yes USB debugging is turned on. I... | android | [4] |
5,317,152 | 5,317,153 | Printing results immediately (php) | <p>I have a php script that connects 10 different servers to get data. I want it to print the results of the 1st connection before the second one begins. </p>
| php | [2] |
4,421,001 | 4,421,002 | Trying to isolate certain array items and evaluate them for equality | <p>I've got an fstream input file that has [N] lines or items. I've written code to decide which items are triangles and which are rectangles and which are circles. I've got to isolate just the triangle items and then compare them to see if they are equal to +/- 0.1 the area of all the other triangle items. Then I have... | c++ | [6] |
1,986,120 | 1,986,121 | Best Way To Determine If ReportViewer Is Installed using C# | <p>What is the best way to find out if reportviewer and WindowsInstaller-KB893803-v2-x86 is installed on a pc? Is there a way to find out what public key to use to find out if a specific program is installed on a pc? <a href="http://blogs.msdn.com/b/wriju/archive/2008/07/01/how-to-find-public-key-token-for-a-net-dll-or... | c# | [0] |
4,811,123 | 4,811,124 | Crash when calling stringByEvaluatingJavaScriptFromString on UIWebView from button | <p>I can't find any documentation to confirm this, but it appears that you can only call the method <strong>stringByEvaluatingJavaScriptFromString</strong> in overridden methods from a UIWebView delegate. Can anyone confirm this?</p>
<p>Here's what I've tried. I setup a button on a view, link it to a method on my vie... | iphone | [8] |
532,059 | 532,060 | TimePickerListener calling two methods for same time | <p>Hi please find the below code I am facing issue with Time dialog listener method, It's calling two times listener.How to fix the listener one time.</p>
<pre><code>@Override
protected Dialog onCreateDialog(int id) {
switch (id) {
case TIME_DIALOG_ID:
// set time picker as current time
return ... | android | [4] |
4,323,890 | 4,323,891 | I have a jquery question,chould you help me? | <pre><code><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
var $category = $("ul li:gt(5):not(:last)");
$category.hide();
$("input").click(function(){
if($category.is(":visiable")... | jquery | [5] |
3,291,782 | 3,291,783 | Programmatically creating variables in Python | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1429814/how-to-programmatically-set-a-global-module-variable">How to programmatically set a global (module) variable?</a> </p>
</blockquote>
<p>I have a class called Variable defined as so:</p>
<pre><code>class... | python | [7] |
3,333,301 | 3,333,302 | can jquery append an image in input part? | <p>I want to peend an image in input part.(in the input box, after the value word) Can jquery do that? Thanks.</p>
<pre><code>$("#click").click(function(){
$("#text").append("<img class='loading' src='load.gif'/>");
...
});
<form name="form">
<input type="text" id="text">
<a id="click">sear... | jquery | [5] |
4,307,536 | 4,307,537 | Create an RSS feed from Existing RSS | <p>Im using the Twitter API to read the Favorites RSS, it generates the following output: </p>
<p><a href="http://vl3.co.uk/favs/getfavs.php" rel="nofollow">http://vl3.co.uk/favs/getfavs.php</a></p>
<p>I'm not sure why this file seems to be incorrect, doesnt come up in my RSS reader or render correctly in the browser... | php | [2] |
1,512,921 | 1,512,922 | Derive window.self from object | <p>is there a way to get window.self of an unknown iframe (same domain) with the only reference: an object within the iframe (a div). holding thumbs for this one</p>
| javascript | [3] |
5,028,052 | 5,028,053 | Android - How to create a control to pick a contact from my phones contact? | <p>I want to create a control on a user form so that whenever i click on it, my phones contact list is shown with Search , indexing and grouping functionality same as android contact application and i would pick any contact and return to my form. </p>
| android | [4] |
276,046 | 276,047 | Compilation error while compiling 2.1.2 code on 3.0 iphone SDK | <p>When I'm trying to compile 2.1.2 SDK code on 3.0 or higher version, it gives a compilation error saying "CFXMLTreeRef undeclared identifier". Below is the code snippet where it shows the error:</p>
<pre><code>#ifdef TARGET_IPHONE_SIMULATOR
#import <CoreServices/CoreServices.h> //cause of the preoblem
#else
... | iphone | [8] |
5,446,167 | 5,446,168 | undefined reference to `elast_opt()' collect2: ld returned 1 exit status | <p>I've written some oop code that use dealii library.</p>
<p>class <code>elastic</code> is defined in prelim header as:</p>
<pre><code>using namespace dealii;
template <int dim>
class elastic
{
public:
elastic(const Triangulation<dim> *triang);
~elastic() ;
void run() ;
privat... | c++ | [6] |
4,095,392 | 4,095,393 | What's the point in storing objects in memory when you can store them in a databse? | <p>For my PHP based assignment, I believe I have to use objects (Including items like a collection class, collection iterator and so on), as well as a MySQL database. </p>
<p>My question is, why would I need to create items as objects, store them in a database then create them as objects again when pulled out of the d... | php | [2] |
5,073,344 | 5,073,345 | Why can't you assign an int to an Integer in a loop without curly braces? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1974641/why-this-is-not-compiling-in-java">Why this is not compiling in Java?</a> </p>
</blockquote>
<p>In java, curly braces are optional for one line for loops, but I've found a case where it isn't allowed. For ... | java | [1] |
3,210,596 | 3,210,597 | What is best way to measure the time cycles for a C# function? | <p>Really, I'm looking for a good function that measure the time cycles accurately for a given C# function under Windows operating system. I tried these functions, but they both do not get accurate measure:</p>
<pre><code>DateTime StartTime = DateTime.Now;
TimeSpan ts = DateTime.Now.Subtract(StartTime);
Stopwatc... | c# | [0] |
2,342,138 | 2,342,139 | how to disable a button for a specific time in php | <p>I have an edit button for users to edit their posted jobs. I want that button to disable or disappear a week after published day.how can I do this in php. thanks advance...</p>
| php | [2] |
2,043,981 | 2,043,982 | Can I chain "or" statements like this? | <p>Given these variables:</p>
<pre><code>$bar = false;
$baz = false;
$boo = "hi there";
$jelek = false;
</code></pre>
<p>When I chain <code>or</code> together like this:</p>
<pre><code>$foo = $bar or
$foo = $baz or
$foo = $boo or
$foo = $jelek;
echo $foo;
</code></pre>
<p>It returns <code>hi there</code>! So, is t... | php | [2] |
1,469,702 | 1,469,703 | definitive way to get user ip address php | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6717926/function-to-get-user-ip-address">Function to get user ip address</a> </p>
</blockquote>
<pre><code><?PHP
$ipaddress = $_SERVER["REMOTE_ADDR"];
Echo "Your IP is $ipaddress!";
?>
</code></pre>
<p... | php | [2] |
5,860,660 | 5,860,661 | iPhone dev: adding an overlapping label to the image | <p>I'm trying to figure out a best way to implement the picture-editing capability shown in the native address book app on iPhone.</p>
<p>On the built-in address book, this is how the picture looks like before editing:</p>
<p><img src="http://qkpic.com/2f7d4" alt="qkpic.com/2f7d4"></p>
<p>And after clicking edit, no... | iphone | [8] |
2,360,254 | 2,360,255 | Question Concerning a CodingBat Beginner Problem | <p>So I've been practicing my Java programming skills on the CodingBat website, when I came across <a href="http://codingbat.com/prob/p146974" rel="nofollow" title="this">this</a> problem. In it, you have to make a simple method that takes in an array of integers of dynamic length, check to see if the elements in the a... | java | [1] |
5,257,585 | 5,257,586 | Get canvas height without drawing | <p>I wish to find out what dimensions my canvas is going to be long before I ever need to create one or draw on it.</p>
<p>The only canvas code I know (or have a flimsy knowledge of) is this:</p>
<pre><code> final SurfaceHolder holder = getHolder();
try
{
Canvas canvas = holder.lockCanvas();
if(canvas ... | android | [4] |
1,493,783 | 1,493,784 | How to create pull down effect | <p>Similar to this page. I could not identify the JS.</p>
<p><a href="http://community.saucony.com/kinvara3/" rel="nofollow">http://community.saucony.com/kinvara3/</a></p>
<p>Joey</p>
| javascript | [3] |
512,559 | 512,560 | PHP to text function | <p>I am trying to create a function that would parse php code and return the result in pure text, as if it was being read in a browser. Like this one:</p>
<pre><code>public function PHPToText($data, $php_text) {
//TODO code
return $text;
}
</code></pre>
<p>I would call the function like this, with the params... | php | [2] |
1,065,857 | 1,065,858 | C# quick question regarding "this" keyword? | <p>Is this piece of code correct:</p>
<pre><code>using (MyForm form = new MyForm { TopMost = TopMost})
{
}
</code></pre>
<p>I want to make the new Form TopMost, if the parent Form is TopMost, or should I write like this, I mean the new Form TopMost property is not self assigned to itself.</p>
<pre><code>using (MyFor... | c# | [0] |
2,484,088 | 2,484,089 | Confused: Pointers to Dynamic Arrays Syntax | <pre><code>int* p_bob = new int;
*p_bob = 78;
</code></pre>
<p>The above code makes sense to me. I use the de-reference operation to allocation new memory and assign a value of 78.</p>
<pre><code>int* p_dynint = new int[10];
*p_dynint[2] = 12;
</code></pre>
<p>This however doesn't make sense. If I try to use the ... | c++ | [6] |
3,119,680 | 3,119,681 | Python: tree structure and numerical codes? | <p>I'm using Python and I have some data that I want to put into a tree format and assign codes to. Here's some example data:</p>
<pre><code>Africa North Africa Algeria
Africa North Africa Morocco
Africa West Africa Ghana
Africa West Africa Sierra Leone
</code></pre>
<p>What would be an appr... | python | [7] |
4,177,879 | 4,177,880 | android how to kill a process or an app and detect some app restart again | <p>Recently,When I use some security applications,I find those application can kill others applications,but when I read api,the android just support some api to kill application itself,it doesn't support any other api directly to kill any process or application in phone.So how those security applications can kill other... | android | [4] |
5,274,236 | 5,274,237 | Empty set representation | <p>Could someone explain the following?</p>
<pre><code>>>> a = {1}
>>> b = {2}
>>> a & b == set()
True
>>> a & b == {}
False
</code></pre>
<p>Why is this choice made?</p>
| python | [7] |
1,835,264 | 1,835,265 | GPS location provider availabilty issue | <p>my gps location provider takes at least one minute to be available. I took best provider, and it is "gps". What will be the reason for that? Anybody has any idea? My code is given below..</p>
<pre><code>locationListener = new LocationListen();
Criteria criteria = new Criteria();
criteria.setAccuracy(Criteri... | android | [4] |
590,375 | 590,376 | I would like to know different style attributes of checkbox in xml in android program. here style attribute is **starStyle** | <pre><code><CheckBox android:id="@+id/star"
style="?android:attr/starStyle
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</code></pre>
<p>I would like to know different style attributes of checkbox in xml in android program. here style attribute is <strong>starStyle</strong>.</p>
| android | [4] |
4,619,362 | 4,619,363 | Find a control underneath parent in jQuery -- is this the cleanest way? | <p>If I wanted to find an element on the page, I would use $('#Foo');</p>
<p>Now, I have a scenario where my 'this' context is a jQuery element. I would like to find an element underneath 'this.'</p>
<p>I am using:</p>
<pre><code>$(this).find('#Foo');
</code></pre>
<p>I just wanted to make sure there wasn't a clean... | jquery | [5] |
5,745,330 | 5,745,331 | Changing a String decimal (2.9) to Int or Long issues | <p>Okay, I'm fairly new to java but I'm learning quickly(hopefully). So anyway here is my problem:</p>
<p>I have a string(For example we will use 2.9), I need to change this to either int or long or something similar that I can use to compare to another number.</p>
<p>As far as I know int doesn't support decimals, I'... | java | [1] |
4,920,898 | 4,920,899 | UIpickerview size is not reduced in iphone os 4.0 | <p>i am i need to reduce size of UIPickerview.</p>
<p>for that i use this code </p>
<pre><code>picker = [[UIPickerView alloc] init];
picker.frame = CGRectMake(0, 0, 100, 100);
</code></pre>
<p>it is not reduce in os 4.0 and i test it in os 3.0 then it is reduced.</p>
<p>what the wrong,how can i reduce size of UIPic... | iphone | [8] |
2,123,860 | 2,123,861 | Activity handles specific file types - how to read the data? | <p>I need my activity to handle files of specific types downloaded from internet. Consider that browser successfully calls my activity. My activity gets Intent object. The question is how to read the downloaded file?</p>
<p>Intent.getData() returns Uri to my file as I understand.
Should I use HttpClient to get the fil... | android | [4] |
1,975,162 | 1,975,163 | What are the available methods in C++ std library, where can I see/read them? | <p>Where can I see all the available methods in std library ? Since, I can include vector,algorithm in my program, can I see header/source files for this library to see how it is implemented ?</p>
<p>eg. I know we can use push_back() method in vector, but where can I see all the methods for vector, and similarly for o... | c++ | [6] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.