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 |
|---|---|---|---|---|---|
997,782 | 997,783 | Detecting gestures using python | <p>I thought to use my macbook's trackpad gestures to interact with my python programs,for example trigger a particular function for two finger tap or three finger swipe etc.Are there any python modules for detecting mac's trackpad gestures?</p>
| python | [7] |
1,350,812 | 1,350,813 | How do I attach an event to a hidden element in javascript | <p>There is an element on the page that is set to display: none in CSS but I want to attach an event to it so that when I make it visible I can click on the element. I keep getting a strange error with it. Thanks for any help you could give me. </p>
<p>Edit:
The strange error is that I can't seem to get the event to a... | javascript | [3] |
4,342,792 | 4,342,793 | Java equivalent for Python's 'x in (a, b, c)'? | <p>In Python, I can check if a value exists in a container with <code>1 in (2, 3)</code> which returns False. How do I do this in Java?</p>
| java | [1] |
5,852,013 | 5,852,014 | Convert date in php | <p>How to convert "Thu Oct 28 16:33:29 +0000 2010 " to like "Oct 28,2010 at 10:33PM"</p>
| php | [2] |
3,741,523 | 3,741,524 | Truncate additional tags from an image URL | <p>I want image urls to be auto embedded when post in post/comment field in a wordpress theme.</p>
<p>I already got this code to work in functions.php:</p>
<pre><code>function content_magic($content) {
$content = get_the_content();
$m= preg_match_all('!http://[a-z0-9\-\.\/]+\.(?:jpe?g|png|gif)!Ui' , $content , $match... | php | [2] |
2,471,122 | 2,471,123 | difference between Stopwatch.ElapsedMilliseconds and (stopDateTime - startDateTime).TotalMilliseconds | <p>I have:</p>
<pre><code>Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
DateTime start = DateTime.Now;
Thread.Sleep(5000);
stopWatch.Stop();
DateTime stop = DateTime.Now;
//stopWatch.ElapsedMilliseconds approximately equals to (stop - start).TotalMilliseconds
</code></pre>
<p>So is there a difference ... | c# | [0] |
3,133,159 | 3,133,160 | JS variable starting with "@" | <p>I've come across someone's old code that has variables identified like: @user_id@, @reference_id@, and so forth. Wikipedia says "In certain JavaScript implementations, the at sign (@) can be used in an identifier..." In what JS implementations does this work? I can't get it to work.</p>
| javascript | [3] |
238,995 | 238,996 | How to create an Executor which can execute boiler code before running task? | <p>I'm trying to setup a concurrency structure where some boiler plate code should be executed (to check pre-conditions) before a certain type of task. In other words, I would like to run code after an Executor has dequeued a task, but before it invokes execute on it. How can this be done?</p>
| java | [1] |
4,774,962 | 4,774,963 | First split then slice value | <p>I know how to split a value using deliminators. I also know how to slice a value to remove the last couple chars. I need to combine these now, which is the part I can't figure out.</p>
<pre><code> $("#product").val(value.split('|')[0]);
</code></pre>
<p>How would I add <code>slice(0,-1)</code> to this function ... | jquery | [5] |
3,201,059 | 3,201,060 | Why is this statement not working in java x ^= y ^= x ^= y; | <pre><code>int x=1;
int y=2;
x ^= y ^= x ^= y;
</code></pre>
<p>I am expecting the values to be swapped.But it gives x=0 and y=1.
when i tried in C language it gives the correct result.</p>
| java | [1] |
1,055,912 | 1,055,913 | Control an swf file using JavaScript | <p>I have an swf file embedded into my webpage and I want to control it. I know that the controls are not available for an swf file, so I'm controlling it using JavaScript. I've managed get a Play and Pause button, but I really need to Stop button which will Stop the movie and rewind it to the beginning.</p>
<pre><cod... | javascript | [3] |
3,416,619 | 3,416,620 | Mapping Object from file in java | <p>I want map my object from text file, the text file contents are like this :</p>
<pre><code>~
attribute1value
attribute2value
attribute3value
attribute4value
attribute5value
attribute6value
~
attribute1value
attribute2value
attribute3value
attribute4value
attribute5value
attribute6value
...continued same
</code></p... | java | [1] |
2,602,921 | 2,602,922 | Incorporating several basic ideas in C++ issue | <p>Code;</p>
<pre><code># include <iostream>
# include <windows.h>
using namespace std;
int main () {
int var1 = 1;
int var2 = 1;
bool while1 = true;
int x = 0;
while (x < 999) {
x = x+var1;
x = x+var2;
cout << x << " Is the current value of x, h... | c++ | [6] |
1,819,765 | 1,819,766 | Customize Date Picker: How to change width & height of datepicker in iphone? | <p>Is there any way to customize the datepicker used in iphone?</p>
<p>I want to change height & width of it.
Can we change the background color, font color of it?</p>
<p>Please help if anybody has done before.</p>
<p>Thanks in advance ...</p>
| iphone | [8] |
4,033,986 | 4,033,987 | Scrollbar click in safari browser not Collapsing opened dropdowns | <p>When iam clicking on the scrollbar when dropdown is displaying[opened] its is not collapsing the opened drop down in safari browser.Can anybody plz provide Javascript code to fix this issue.</p>
| javascript | [3] |
5,156,637 | 5,156,638 | How to override the long key press functionality in android? | <p>can anyone tell me how can we overide the long key press functionalty of menu key?
I have to call an activity on long press on menu key for device samsung galaxy S.
Please tell me how can implement that...some sample code is appreciable.</p>
| android | [4] |
4,551,532 | 4,551,533 | passin information to a jQuery modal that loads dynamic content | <p>I have a main page with a js variable. I want to open a modal on that main page and load html content from a different page. I need to pass that variable to the modal that is opening and use it inside the loaded html content.
I have seen several questions similar to that in these forums but i don't see any that exp... | jquery | [5] |
4,315,124 | 4,315,125 | dynamic web forms using asp.net | <p>I am creating a convention website for agents using VS 2010. The agents can bring upto 6 guests if they want. I am creating a form to store basic info on these guests. Instead of creating six forms with the same repeated info, I want to use the same form upto six times. I want to store the info on session variables ... | asp.net | [9] |
4,286,383 | 4,286,384 | Android-passing value from form login to new atcivity using data from MySQL | <p>i'm new in android, how make passing value from form login to new activity, the value from MySQL....</p>
<p>please help me...</p>
| android | [4] |
983,992 | 983,993 | Get the previous upgradecode that was used to install the application | <p>C# 2005 SP3</p>
<p>Is it possible to retrieve the pervious upgradeCode that was used to install the same application?</p>
<p>I have given our application to many or our clients. </p>
<p>They install our application using the MSI.</p>
<p>Everytime I release a new version for bug fixes or minor upgrades. In the se... | c# | [0] |
4,893,147 | 4,893,148 | Take values from a list of strings(python) | <p>If I have a list of several strings in python, and each of these strings contains a value. How can I take those values and print them to a list? Example: the string might be "abc def g T = 5 hij". All the strings will be the same except the number.</p>
| python | [7] |
2,720,453 | 2,720,454 | Alert dialog closes without pressing the button and Activity goes to home page | <p>I'm building an android app with a Login activity. If email is not valid, I want to show an alertbox with a "Email not valid" message and want to stay at same activity. The problem is that the alertbox is shown only for a brief time and then I go back immediately to the parent activity, without pressing any button ... | android | [4] |
3,398,211 | 3,398,212 | Error: could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit | <p>Pre-note: This is not a problem I am having with Minecraft. All answers I can find seem to be Minecraft issues.</p>
<p>Error: could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.</p>
<p>I get this error when I try to do something Java related. I cannot launch a .jar ... | java | [1] |
4,913,141 | 4,913,142 | Is there any advantage to define function name in "var new_function = function name(){};" in javascript? | <p>I was running a program to change some parts of my javascript code when it bugged in the declaration of a var as a function like this:</p>
<pre><code>var some_function = function name(args){
//do stuff
};
</code></pre>
<p>The code itself works, but I was just wondering if it's ok to remove the "name" for all funct... | javascript | [3] |
5,035,473 | 5,035,474 | jquery script only working on 1 page and not even by its self | <p>Finally got this script to work, now i have structured my php files so header and footer are there own php file and the desired page loads them to with the command ?php
$PageTitle = "Domain";
include ('header.php');
?</p>
<p>now the menu is in header php can be viewed her www.apecharmony.co.uk/header.php when you c... | jquery | [5] |
2,278,022 | 2,278,023 | Use a different measurement of data rather than KB | <p>I'm currently tinkering around with some code which allows me to upload files to my site. I am going to set an option in a configuration file which allows users to set the maximum upload limit. At the moment this has to be entered in kilobytes and I was wondering whether or not it'd be possible to have it entered in... | php | [2] |
18,491 | 18,492 | What's the difference between <#eval and <#bind in asp.net | <p>In a gridview, we can use <code><%#Eval%></code> or <code><%#Bind%></code> to output values from a database. What is the difference between them?</p>
| asp.net | [9] |
4,413,868 | 4,413,869 | Reading Line in a random way, then print numbers in random order | <p>Below is the text file, in which I want to read each line in some random way by printing each number in the line in some random order. I can read each line one by one and then print number corresponding to each line in a sequential order, But is there any way we can read line in some random way so that I can print a... | java | [1] |
2,095,343 | 2,095,344 | I can not connect to the phone for debugging any more | <p>After developing and testing for months my android application both on the emulator and on a phone, I suddenly can not connect any more to the phone in one of the two PCs I use for development.
One PCs runs Windows XP 32bits. Here everything is ok. But my main development machine is a Windows 7 32bits: Both of them... | android | [4] |
1,788,581 | 1,788,582 | A better way to write exception handling code | <p>in my work almost 60 to 70% of the code is for exception handling and logging those exceptions.
Rest 30 to 40% is the business logic.</p>
<p>Is there a way to extract out the exception handling part using EntLib or any other concept which can be applied here?</p>
<p>Regards.</p>
| c# | [0] |
4,622,844 | 4,622,845 | android: remote service vs sharedUserId? | <p>What is different in these two approaches : remote service (<a href="http://developer.android.com/reference/android/app/Service.html" rel="nofollow">http://developer.android.com/reference/android/app/Service.html</a>) vs sharedUserId (<a href="http://developer.android.com/guide/topics/manifest/manifest-element.html"... | android | [4] |
4,833,835 | 4,833,836 | How to get link url when using select box form method get? | <p>I have a sample code:</p>
<pre><code><form action="index.php" method="get">
<select name="id">
<option value="1">One</option>
<option value="2">Two</option>
</select>
<input type="submit" value="submit" name="submit" />
</form>
</code></pre>
<p>When I sub... | php | [2] |
3,510,028 | 3,510,029 | New to Python, implementing a function using a string as an input | <p>I'm new to Python and one of the problems I have for homework has me stuck.</p>
<p>Here's the question?
Implement function cheer() that takes as input a team name (as a string) and prints a cheer as shown:</p>
<pre><code>cheer(‘Huskies’)
</code></pre>
<p>How do you spell winner?<br>
I know, I know!<br>
H U S K I ... | python | [7] |
1,891,829 | 1,891,830 | How to access UI Element of Activity in non-activity class? Android | <p>Activity Class contain TextView,
TextView text = (TextView)findById(R.id.notify);</p>
<p>Non-Activity Class contain,
text.setText("Hello");</p>
| android | [4] |
3,512,198 | 3,512,199 | Better $_GET security | <p>My PHP is very rusty. I have a md5 hash that's being passed via get to a script and then I'm grabbing it like this:</p>
<pre><code>$id = $_GET['id'];
</code></pre>
<p>Obviously there's a security risk here...I was thinking of checking the string length to make sure it's 32 characters long but that doesn't seem ver... | php | [2] |
4,636,771 | 4,636,772 | Can I go from managed thread ID to ProcessThreadID | <p>I've been brainstorming ways to measure UI thread utilization, and it looks like I can possibly back my into it by looping through the ProcessThreads for the current process and then trying to figure out which one the UI is on.</p>
<p>Is there any structured way to go from a managed thread ID to a process thread ID... | c# | [0] |
3,692,054 | 3,692,055 | combo box and Generic list | <p>I'm Having a list</p>
<pre><code> List<string> strArraylist = new List<string>();
</code></pre>
<p>i want to add to it the values of a <strong>combo box</strong> ..</p>
| c# | [0] |
1,061,235 | 1,061,236 | null value in getIntent.getExtras.getString() | <p>This is my code in my first activity:</p>
<pre><code>Intent i = new Intent(this, OtherScreen.class);
i.putExtra("id1", "first");
i.putExtra("id2", "second");
startActivity(i);
</code></pre>
<p>where first,second are the values I want to be passed.
and on my other class i have this:</p>
<pre><code>Inte... | android | [4] |
3,749,299 | 3,749,300 | How does a ClickListener know which data to return? | <p>I have the following ClickListener:</p>
<pre><code> itemList=(ListView)findViewById(android.R.id.list);
itemList.setTextFilterEnabled(true);
itemList.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> a, View v, in... | android | [4] |
1,001,742 | 1,001,743 | Toggle select options w/jQuery | <p>I have selector with multiple option grouped into option groups. I am trying to toggle select/deselect of all options when an optgroup label is clicked.</p>
<p>It works fine on initial load, but I also have a functionality that allows me to copy options from one selector to another and back. Once options are copied... | jquery | [5] |
2,515,514 | 2,515,515 | iterating over file object in Python does not work, but readlines() does but is inefficient | <p>In the following code, if I use: </p>
<pre><code>for line in fin:
</code></pre>
<p>It only executes for 'a'</p>
<p>But if I use:</p>
<pre><code>wordlist = fin.readlines()
for line in wordlist:
</code></pre>
<p>Then it executes for a thru z.</p>
<p>But <code>readlines()</code> reads the whole file at once, whic... | python | [7] |
4,129,024 | 4,129,025 | Handling "No cells were found." Error in Excel | <p>I am working on Excel VSTO application and finding error cells in the worksheets using the below code</p>
<pre><code>Excel.Range rngTemp;
Excel.Range rngErrorRange;
Excel._Worksheet Sheet1 = (Excel._Worksheet)xlCTA.Sheets["Sheet1"];
rngTemp = wsCTAWK11.UsedRange;
rngErrorRange = rngTemp.SpecialCells(Excel.XlCellTy... | c# | [0] |
5,908,658 | 5,908,659 | Issue with JQuery Each function | <p>I have a jquery function to hide email ids on the webpage to avoid spambots.
I am trying to replace all the span tags with class 'mailme' to valid email ids with the help of this function. The code was working for 1 span tag but since its changed to multiple spans with the help of each method, its not working.</p>
... | jquery | [5] |
4,078,254 | 4,078,255 | Append quotation | <p>I am trying to <code>append()</code> a button with an <code>onclick</code> attribute which calls a javascript function:</p>
<pre><code>$('#button').append('<button onclick=setUrlLink(\''+pageN+'\')>Next</button>);
</code></pre>
<p>When checking the source code, quotations are missing around <code>pageN... | jquery | [5] |
5,929,486 | 5,929,487 | Is there a variant of jQuery's live() function that does not bind to events? | <p>Is there a variant of jQuery's live() function that does not bind to events? </p>
<p>For example, I would like to do something like this: </p>
<pre><code>$('.jdate').live(function() {
var datebox = $(this);
datebox.datepicker();
//do a couple more things
}
</code></pre>
<p>so all '.jdate' fields that... | jquery | [5] |
864,768 | 864,769 | how to build an ordered list for a menu using JQUERY need help | <p>I want to build this DIV with unordered list using jquery for a menu and the data would be coming from a sharepoint list.
I have the main DIV on the area where i want the menu </p>
<pre><code> <div id="menumain"/>
</code></pre>
<p>I have tried doing the below but not too good with JQUERY.
I want to append or... | jquery | [5] |
3,955,272 | 3,955,273 | How to create options of a select element dynamically using jquery? | <p>I need to create options of a select element dynamically via an ajax call. The number of options and their content will vary. This is how it looks prior to the ajax call:</p>
<pre><code> <select name="groupid" style="width:100%;">
<option value="0" selected>(Please select an option)</option>
</... | jquery | [5] |
5,357,403 | 5,357,404 | I'd like my private virtuals now, please | <p>What is the reasoning behind disallowing private virtual functions? </p>
<p>Empty private virtuals would have enabled low friction pure customization points.</p>
<p>Abstract functions have high friction and protected virtuals cause confusion and noise.</p>
<p><strong>Some further explanation:</strong></p>
<p>The... | c# | [0] |
4,193,011 | 4,193,012 | Selecting a row in uitableviewcell | <p>how to make a row in uitableview back to white after selecting.</p>
<p>My problem is when I select a row in uitableview it shows me blue color and it remains on. It doesn't go off, I mean back to white color. </p>
<p>How to do that. any help please..</p>
| iphone | [8] |
3,092,786 | 3,092,787 | Highlighting variables and keywords in jQuery | <p>I am trying to highlight variables and keywords in a code snippet using jQuery. Suppose, I have a java snippet like this,</p>
<pre><code>public class abc {
public static void main(String args[]) {
int count = 0;
}
}
</code></pre>
<p>I am using button called "Variable" for variables and "Keyword" for rese... | jquery | [5] |
1,453,558 | 1,453,559 | Beginner PHP Question - Access Data from Function | <p>I have this function:</p>
<pre><code>function selectValue($test) {
$connection = dbConnect(HOST, USERNAME, PASSWORD, DATABASE);
$query = "SELECT * FROM table where value = '$test'";
$results = @mysql_query($query, $connection);
$value = mysql_fetch_assoc($results);
}
selectValue('abcde');
echo ... | php | [2] |
3,444,333 | 3,444,334 | Or-Operator in return statement | <p>I stumbled upon this piece of code, which I truly do not understand so far.
I clearly know what the or-operator <code>||</code> does in codes like these:</p>
<pre><code>bool a = true;
bool b = false;
if(a || b)
{
//does something, if one of a/b is true
}
</code></pre>
<p>But this is a structure, I do not unders... | c# | [0] |
3,516,665 | 3,516,666 | IME window overlap cursor in Edittext, how to prevent it? | <p>I'm using Edittext and it has images and texts.
Then, I add image file on Edittext and I click Edittext, IME window shows, naturally.
( * At that time cursor is located at right-bottom corner of added image file.)
The problem is IME window overlap cursor, so users complain that 'where is my cursor?'</p>
<p>How to p... | android | [4] |
2,663,667 | 2,663,668 | add a new item to vector and shift it remaining part to right | <p>I am trying to put a new item to vector, and shift remaining items. How can I do that ?</p>
<p>Ex </p>
<pre><code>vector -------------------------------------------------------
| 1 | 2 | 3 | 4 | 5 | 9 | 10 | 15 | 21 | 34 | 56 | 99 |
-------------------------------------------------------
... | c++ | [6] |
5,636,873 | 5,636,874 | Is it possible to use an asp.net page to have the get results from the server sent back as an XML file? | <p>My application sending SMS request to Mblox XML interface through, I have get response from Mblox as XML file. </p>
<pre><code>string RequestXML = GenerateRequestXML();
string uri = string.Empty; uri = "http://xml.us.mblox.com:8180/send";
HttpWebRequest request =(HttpWebRequest)WebRequest.Create(uri);
request.K... | asp.net | [9] |
4,279,627 | 4,279,628 | Android: How to Handle Back Press Specifically? | <p>Let me explain more detail.</p>
<p>First of all; I know that if user press back and returns the previous activity, the previous activity triggers <code>onResume</code> method properly. This is okay. </p>
<p>There is a root activity in my application and it's directing 4 different activities through the buttons. I ... | android | [4] |
5,103,775 | 5,103,776 | how to get the keys of sub array for an array tree | <p>I want to get the keys of this nested array and store them as a separate array </p>
<pre><code>Array
(
[151] => Array
(
[152] => Array
(
)
)
)
</code></pre>
| php | [2] |
1,363,395 | 1,363,396 | $this->{$this->varname}() syntax | <p><a href="http://www.php.net/manual/en/functions.variable-functions.php#24931" rel="nofollow">http://www.php.net/manual/en/functions.variable-functions.php#24931</a></p>
<p>That function does something like <code>$this->{$this->varname}()</code>. I tried it out and confirmed that that's valid syntax but it lea... | php | [2] |
94,064 | 94,065 | passing checkbox & text field value in php | <p>I'm trying to pass a text value field over to the next page for every checkbox selected, but I'm only getting the last text fields value, example:</p>
<pre><code>checkbox textfield
selected ABCD
selected ABCDE
</code></pre>
<p><strong>I am only getting back the ABCDE every time</strong></p>
<p><strong>page1.php</... | php | [2] |
5,770,742 | 5,770,743 | The http session loses the attribute after request.sendRedirect | <p>Inside filter I am trying to set one attribute to the current http session. Then I am redirecting to another resource using response.sendRedirect(). The resource sends the request back to the filter. Second time the session losses the session attribute.</p>
<p>Please provide some pointer.</p>
<p>First Request is a... | java | [1] |
2,253,015 | 2,253,016 | Font size adjusting function in Android Webview | <p>I have been developing an Android RSS news reader.I want to add two buttons for adjusting the font size when a news is loaded in Webview.Can anyone tell me, how can I create a function for changing the font size of Webview?</p>
| android | [4] |
37,070 | 37,071 | jQuery: Selecting by class and input type | <p>I would like to select a set of elements that are both of a certain input type (say, a checkbox) and have a certain class using jQuery. However, when I try the following:</p>
<pre><code> $("input:checkbox .myClass")
</code></pre>
<p>I don't get any items returned. How can I accomplish this in jQuery?</p>
| jquery | [5] |
5,174,596 | 5,174,597 | Is there any way to make PHP generate dynamic WAV images? | <p>if you go to this link:
<a href="http://www.audionetwork.com/production-music/beyond-discovery_49869.aspx" rel="nofollow">http://www.audionetwork.com/production-music/beyond-discovery_49869.aspx</a></p>
<p>click on any song title in the list, then click Play button.
See the graphic in the top?</p>
<p>Is there any ... | php | [2] |
1,585,934 | 1,585,935 | I can't detect text change in a search field on the actionbar | <p>I have the following code, and onOptionItemSelected() never runs. it never reaches <code>Log.i("", "switch");</code> Anyone know why?</p>
<pre><code>@Override
public boolean onCreateOptionsMenu(Menu menu) {
getSupportMenuInflater().inflate(R.menu.category_menu, menu);
Log.i("", "created menu");... | android | [4] |
4,635,995 | 4,635,996 | Using maps within maps in C++ | <p>I'm trying to use a map within a map using the following code;</p>
<pre><code> map<map <int,int>,int > multimap;
</code></pre>
<p>Now I want to insert the data such that <code>multimap[1]</code>--->(2,3), <code>multimap[4]</code>--->(5,6). I have been trying to insert it the following way but i guess t... | c++ | [6] |
3,347,062 | 3,347,063 | $.get / $ post jquery function to manipulate a function from another file(*.html) | <p>I have a scenario like the one I described below...</p>
<p>how can I accomplish by using $.get / $ post jquery function ?</p>
<p><strong>Send.html</strong></p>
<pre><code> <script type="text/javascript">
$(function ()
{
$("#btn").click(function() {
Receive.ShowMsg... | jquery | [5] |
2,393,767 | 2,393,768 | jQuery how to remove all <span> tags from a <div>? | <p>I've tried both of the following but none of them worked:</p>
<pre><code>$('#divhtml').remove('span')
$('#divhtml').find('span').remove()
</code></pre>
<p><strong>EIDT:</strong> $('#divhtml').find('span').remove() worked on 2nd try.</p>
| jquery | [5] |
4,757,451 | 4,757,452 | PHP Getting data from mysql and then use it in different actions | <p>So I want to get some data from mysql and use it to create some conditions. Here is my code, but it only shows the last record from mysql.</p>
<pre><code> $result = mysql_query("SELECT * FROM system") or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
$name_system = $row['name'];
$value_system ... | php | [2] |
5,794,934 | 5,794,935 | Android system / system context / replace classes | <p>Hi I'm engineer but more from a chip/assembler x86 level. I'm new to Android. Still figuring some general things out. I have written some apps, but have a general question. If I were to write an improved version of - let's say - TextView. Is it possible to make all app's on the system using this class, basically rep... | android | [4] |
4,960,741 | 4,960,742 | approach for array of arrays | <p>I'm doing this graphics project in which I have a set of points(in 3 coordinates)and have to transform them via matrix arithmetic.Each point needs to be transformed(rotation,scaling etc) and stored back.The obvious approach I figured was to use a 2-D array of size n by 3 matrix where every row would contain 3 values... | c++ | [6] |
1,967,788 | 1,967,789 | try catch around mixed content warning | <p>I was wondering if there is a way that I can try catch around a Mixed Content Warning using Javascript? I get this warning whenever I call a loading gif using IE 8 in compatibility mode. I know what the problem is, so I figure I can just try catch around the mixed content warning. Anybody know how?</p>
| javascript | [3] |
2,775,151 | 2,775,152 | Single word Palindrome Checker (True or False) | <p>Right now, what I have is a code that I can test a single word whether it is a Palindrome or not. I have to input the word, and it will tell me whether it is a Palindrome (True) or if it is not (False)</p>
<p>I need to create one that Asks for a single word, then provides a True of False based on the word that is t... | python | [7] |
3,044,892 | 3,044,893 | Does turning a list into a set, then back again, cause problems in Python? | <p>I'm turning a list into a set in Python, like so:</p>
<pre><code>request.session['vote_set'] = set(request.session['vote_set'])
</code></pre>
<p>So I can easily do a <code>if x in set</code> lookup and eliminate duplicates. Then, when I'm done, I reconvert it:</p>
<pre><code>request.session['vote_set'] = list(req... | python | [7] |
2,904,479 | 2,904,480 | Convert specified format of time to a date asp.net | <p>Hii,</p>
<p>I have time, for e.g <strong>33 hr 40 mins 50 secs</strong> . i would like to convert it to a date time format.</p>
<p>for e.g I have used Convert.ToDateTime("33:40:50"), but in this case when you converting to date time, hour should be less than 24, otherwise it will fire an exception. Pls help me to ... | asp.net | [9] |
3,724,821 | 3,724,822 | How to catch onload event on css styles? | <p>I load css</p>
<pre><code>var ss = document.createElement("link");
var url = 'http://site.ru/style.css';
ss.setAttribute("rel", "stylesheet");
ss.setAttribute("type", "text/css");
ss.setAttribute("href", url);
document.getElementsByTagName("head")[0].appendChild(ss);
</code></pre>
<p>I want to call function after ... | javascript | [3] |
245,353 | 245,354 | is javascript null separate type of object's value? | <p>According to "8.2 The Null Type" chapter of Ecma-262 "null" is type.</p>
<p>But typeof(null) is object, so null is just a value of type object.</p>
<p>How could it be?</p>
| javascript | [3] |
5,599,226 | 5,599,227 | Using this() in code | <p>I am new to CSharp.I have seen "this()" in some code.My question is Suppose if i call</p>
<p>Paremeterized constructor ,am i invoking the paremeterless constructor forcefully?.But According to constructor construction ,i believe parameterless constructor will be executed first.Can you please explain this with simpl... | c# | [0] |
1,058,225 | 1,058,226 | Python, trace undefined variables | <p>in my program I have undefined variable somewhere:</p>
<pre><code>global name 'cmd' is not defined
</code></pre>
<p>How can I pull out the line number where the variable is being used?</p>
<p>I know where the error is (cmd versus self.cmd). The question is how to get the line number (or why it isnt shown).</p>
... | python | [7] |
3,888,360 | 3,888,361 | User permissions binary/decimal confusion after unexpected behavior | <p>First of all I do not understand why some people are using binary number and powers of two for permissions. Is it because they stand for true/false with 1/0 from backwards relation?</p>
<p>Ex: <code>1010 means false, true, false, true</code> ?</p>
<p>My question is following. <code>15</code> in decimal is same as ... | php | [2] |
4,394,164 | 4,394,165 | PHP Mailing Code sending mail to spam/quarantine | <p>The title explains itself. It is a website for in-house employees to buy and sell from each other. Its based solely around Microsoft Outlook emailing addresses. All the emails are supposed to be sent from the seller's email as they post items. Except when I enter <code><php phpinfo(); ?></code> on the action p... | php | [2] |
5,341,074 | 5,341,075 | Uninstall app icon from home screen when app is uninstall | <p>I have put <code>app_icon</code> on Home Screen when app is install<br/></p>
<p>now want to remove it, when app is going to uninstall <br/></p>
<p>i know how to remove <code>app_icon</code> but dont know on which event i need to do this</p>
<p>Can any one provides me solution for this.</p>
<p>Thanks in Advance</... | android | [4] |
3,612,092 | 3,612,093 | how to use include tag for setting herder in all activity android? | <p>i want toe create common template for my android application.i don't know how? some body told use include tag.I need some example for this.</p>
| android | [4] |
226,444 | 226,445 | JQuery Unbind event when removing a class | <p>So I have a couple of divs with a class "turn". Then in Jquery I have</p>
<pre><code>$(".turn").click(function(){
...some code...
if (..) $(this).removeClass("turn");
});
</code></pre>
<p>which I expect to remove the handler, so I can't click on it anymore. But I still want to be able on the other divs that ... | jquery | [5] |
5,406,160 | 5,406,161 | How to make a call which begin with * in iPhone? | <p>In my application, I want to call the number *111, when I use this URL tel:*111 to call, but can't make call success, please give me some indicate, thank you very much.</p>
<blockquote>
<p>[[UIApplication sharedApplication] openURL:@"tel:*111"] </p>
</blockquote>
<p>was not work. but it will work when remove *</... | iphone | [8] |
4,607,767 | 4,607,768 | object assignment | <p>I have a scenario like:</p>
<pre><code>MyClass obj1 = new MyClass();
............//some operations on obj1;
MyClass obj2 = new MyClass();
obj2 = obj1;
</code></pre>
<p>I have the following problem: if I modify any parameter, it is affected in both objects (as both refer to same location) - but, when I modify obj2 ... | c# | [0] |
2,663,123 | 2,663,124 | android Can we have Session Management and time out in app | <p><em>hello frnds,,,</em></p>
<p>I am working on an application XYZ ,which maintains a session time out at Server end..</p>
<p>Actually on login to service I receive a session token which is used to access further web services and that token expires after certain amount of time say 30 minutes...</p>
<p>The token is... | android | [4] |
3,569,857 | 3,569,858 | Fetch the drive contents dynamically | <p>Hi friends
in my project i have a situation that when i select the drive letter it display the corresponding files with in the share drive will dispaly . for that i find the connected drives with my system using the following code<br />
<code>echo "<select id = 'drives'><option>Drives<... | php | [2] |
1,267,433 | 1,267,434 | What is the path of logging.java? | <p>When I try and search in Windows it just gives me "java" or "java/util" I can't find that in explorer. Thanks.</p>
| java | [1] |
3,837,637 | 3,837,638 | Local variable in each class - python timed loop | <p>I have a python file in a continuous loop reading from an external file, I have a lot of different data points I'm reading and have a class (fb) that I'm calling to feed the locations of each point (m1.x, m2.x etc....) The file loops every 30 seconds. </p>
<p>I need a variable in the loop which is not reset for eac... | python | [7] |
612,867 | 612,868 | why isnt there a Math.floor(float)? | <p>Why is there only Math.floor(double)? </p>
<p>I have a float and I want to round it "down".<br>
do I have to cast it to double? </p>
| java | [1] |
4,584,327 | 4,584,328 | C# returning Exception at runtime | <p>Don't think this is possible but thought I would ask and maybe someone could suggest an alternative technique or pattern.</p>
<p>Say I have a Customer class that has as list of Books which are both pulled seperately from an external source. If the Customer class is successfull but the Books failed to load I don't w... | c# | [0] |
3,353,933 | 3,353,934 | Is it more pythonic to close a function with return or through indentation? | <p>If I have a function that does not need to return a variable, is it considered better coding practice to close the function like this:</p>
<pre><code>def foo():
"""Code"""
return
# More code
</code></pre>
<p>or like this?</p>
<pre><code>def bar():
"""Code"""
# More code
</code></pre>
| python | [7] |
1,292,036 | 1,292,037 | Registering an application on twitter | <p>I am trying to post on twitter having an register application. But every-time whenever i am editing my application to make it read&write it always shows read only and whenever i am trying to edit it and save it, again it shows "<strong>This is an application to check twitter authorization.
created by Piyush – r... | android | [4] |
1,264,953 | 1,264,954 | jQuery Add Collapsible Panel | <p>Using jQuery I want to dynamically add new collapsible panels. An accordion is not enough, as I need to have more than one section open at a time.</p>
<p>The sample <a href="http://dl.dropbox.com/u/24708866/labs/jquery-multi-open-accordion/index.html" rel="nofollow">here</a> is exactly what I need apart from I'm wa... | jquery | [5] |
3,598,661 | 3,598,662 | jquery live hover not working | <p>I ran into some dropdown flickering issue on IE due to mouseover and mouseout , so i changed the code
to hover and live as the data is dynamic from ajax.</p>
<p>But the following code is not working , i got the latest jquery also.</p>
<p>The following code is getting executed without error but not working</p>
<pr... | jquery | [5] |
2,378,135 | 2,378,136 | I am using this code in php which show | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4524698/php-cannot-modify-header-information">PHP - Cannot modify header information…</a> </p>
</blockquote>
<blockquote>
<p>error: Warning: Cannot modify header
information - headers already sent by
... | php | [2] |
2,725,699 | 2,725,700 | move content from one hidden div to another displayed div | <p>how do i move content from one hidden div to another displayed div using jquery?</p>
<p>say i have div1 with display style is none and another div "div2" with display style block.</p>
<p>how do I move the content from div1 to div2 and clear div1?</p>
| jquery | [5] |
439,591 | 439,592 | Android: Steps for reading a wav file | <p>Hey i have imported WavFile from <a href="http://www.labbookpages.co.uk/audio/javaWavFiles.html" rel="nofollow">http://www.labbookpages.co.uk/audio/javaWavFiles.html</a> aim is to plot a waveform from the data retrieved from the wave file that i have read.
However i dont know which variable represents the data retri... | android | [4] |
4,367,219 | 4,367,220 | How to include Header File (.h) in Java | <p>I want to use <a href="http://fallabs.com/tokyocabinet/spex-en.html#tcadbapi" rel="nofollow">this</a> which says to use a particular method I have to include tcutil.h in my java code. Can anybody help me, how to do that ? Another point: we can easily create an header file and include it in to C code but why reverse ... | java | [1] |
939,854 | 939,855 | Find Format of Date in Java | <p>How can we get the format of a date in Java??
I have a column which is in the date format . I want to find its format for every rows.
How can i do this ?
Ex -- </p>
<pre><code>COL1| COL2 |COL3
-------------------------
1 | 12-2005-31 |zzz
2 | 24 March 2009 |aaa
</code></pre>
| java | [1] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.