qid int64 4 22.2M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata sequence |
|---|---|---|---|---|
4 | <p>I want to assign the decimal variable "trans" to the double variable "this.Opacity".</p>
<pre class="lang-cs prettyprint-override"><code>decimal trans = trackBar1.Value / 5000;
this.Opacity = trans;
</code></pre>
<p>When I build the app it gives the following error:</p>
<blockquote>
<p>Cannot imp... | [
{
"answer_id": 7,
"author": "Kevin Dente",
"author_id": 9,
"author_profile": "https://Stackoverflow.com/users/9",
"pm_score": 10,
"selected": true,
"text": "double"
},
{
"answer_id": 78,
"author": "Ryan Fox",
"author_id": 55,
"author_profile": "https://Stackoverflow.c... | 2008/07/31 | [
"https://Stackoverflow.com/questions/4",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8/"
] |
6 | <p>I have an absolutely positioned <code>div</code> containing several children, one of which is a relatively positioned <code>div</code>. When I use a <code>percentage-based width</code> on the child <code>div</code>, it collapses to <code>0 width</code> on IE7, but not on Firefox or Safari.</p>
<p>If I use <code>pixe... | [
{
"answer_id": 31,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 8,
"selected": true,
"text": "div"
},
{
"answer_id": 1948,
"author": "Matt MacLean",
"author_id": 22,
"author_profile": "https://Stackoverflo... | 2008/07/31 | [
"https://Stackoverflow.com/questions/6",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9/"
] |
9 | <p>Given a <code>DateTime</code> representing a person's birthday, how do I calculate their age in years?</p>
| [
{
"answer_id": 22,
"author": "Nick Berardi",
"author_id": 17,
"author_profile": "https://Stackoverflow.com/users/17",
"pm_score": 6,
"selected": false,
"text": "DateTime birthDate = new DateTime(2000,3,1);\nint age = (int)Math.Floor((DateTime.Now - birthDate).TotalDays / 365.25D);\n"
}... | 2008/07/31 | [
"https://Stackoverflow.com/questions/9",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1/"
] |
11 | <p>Given a specific <code>DateTime</code> value, how do I display relative time, like:</p>
<ul>
<li><code>2 hours ago</code></li>
<li><code>3 days ago</code></li>
<li><code>a month ago</code></li>
</ul>
| [
{
"answer_id": 12,
"author": "Jeff Atwood",
"author_id": 1,
"author_profile": "https://Stackoverflow.com/users/1",
"pm_score": 8,
"selected": false,
"text": "var ts = new TimeSpan(DateTime.UtcNow.Ticks - dt.Ticks);\ndouble delta = Math.Abs(ts.TotalSeconds);\n\nif (delta < 60)\n{\n retur... | 2008/07/31 | [
"https://Stackoverflow.com/questions/11",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1/"
] |
13 | <p>Is there a standard way for a web server to be able to determine a user's timezone within a web page? </p>
<p>Perhaps from an HTTP header or part of the <code>user-agent</code> string?</p>
| [
{
"answer_id": 817,
"author": "Orion Edwards",
"author_id": 234,
"author_profile": "https://Stackoverflow.com/users/234",
"pm_score": 5,
"selected": false,
"text": "visitortime.getTimezoneOffset()\n"
},
{
"answer_id": 1809974,
"author": "JD Isaacks",
"author_id": 46011,
... | 2008/08/01 | [
"https://Stackoverflow.com/questions/13",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9/"
] |
14 | <p>What is the difference between <a href="http://msdn.microsoft.com/en-us/library/9a6a2sxy.aspx" rel="noreferrer"><code>Math.Floor()</code></a> and <a href="http://msdn.microsoft.com/en-us/library/system.math.truncate.aspx" rel="noreferrer"><code>Math.Truncate()</code></a> in .NET?</p>
| [
{
"answer_id": 33,
"author": "C. K. Young",
"author_id": 13,
"author_profile": "https://Stackoverflow.com/users/13",
"pm_score": 9,
"selected": false,
"text": "Math.Floor"
},
{
"answer_id": 2086,
"author": "Marek Grzenkowicz",
"author_id": 95,
"author_profile": "https... | 2008/08/01 | [
"https://Stackoverflow.com/questions/14",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11/"
] |
16 | <p>How do you expose a LINQ query as an ASMX web service?
<br>
Usually, from the business tier, I can return a typed <code>DataSet</code> or a <code>DataTable</code> which can be serialized for transport over ASMX.</p>
<p>How can I do the same for a LINQ query? <br>
Is there a way to populate a typed <code>DataSet</cod... | [
{
"answer_id": 84,
"author": "Dave Ward",
"author_id": 60,
"author_profile": "https://Stackoverflow.com/users/60",
"pm_score": 4,
"selected": false,
"text": "IEnumerable"
},
{
"answer_id": 5830,
"author": "Brian Childress",
"author_id": 721,
"author_profile": "https:/... | 2008/08/01 | [
"https://Stackoverflow.com/questions/16",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2/"
] |
17 | <p>How do I store binary data in <a href="http://en.wikipedia.org/wiki/MySQL" rel="noreferrer">MySQL</a>?</p>
| [
{
"answer_id": 18,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 6,
"selected": false,
"text": "CREATE TABLE binary_data (\n id INT(4) NOT NULL AUTO_INCREMENT PRIMARY KEY,\n description CHAR(50),\n bin_data LONGBLOB,\... | 2008/08/01 | [
"https://Stackoverflow.com/questions/17",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2/"
] |
19 | <p>I'm looking for the fastest way to obtain the value of π, as a personal challenge. More specifically, I'm using ways that don't involve using <code>#define</code> constants like <code>M_PI</code>, or hard-coding the number in.</p>
<p>The program below tests the various ways I know of. The inline assembly version is... | [
{
"answer_id": 531,
"author": "nlucaroni",
"author_id": 157,
"author_profile": "https://Stackoverflow.com/users/157",
"pm_score": 9,
"selected": true,
"text": "let pi_2 iters =\n let rec loop_ a b t p i =\n if i = 0 then a,b,t,p\n else\n let a_n = (a +. b) /. ... | 2008/08/01 | [
"https://Stackoverflow.com/questions/19",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13/"
] |
24 | <p>If I have a trigger before the update on a table, how can I throw an error that prevents the update on that table?</p>
| [
{
"answer_id": 7189396,
"author": "RuiDC",
"author_id": 521586,
"author_profile": "https://Stackoverflow.com/users/521586",
"pm_score": 7,
"selected": false,
"text": "SIGNAL"
},
{
"answer_id": 9046539,
"author": "el.atomo",
"author_id": 831797,
"author_profile": "http... | 2008/08/01 | [
"https://Stackoverflow.com/questions/24",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22/"
] |
25 | <p>I'm having issues getting the C sockets API to work properly in C++ on z/OS.</p>
<p>Although I am including <code>sys/socket.h</code>, I still get compile time errors telling me that <code>AF_INET</code> is not defined.</p>
<p>Am I missing something obvious, or is this related to the fact that being on z/OS makes my... | [
{
"answer_id": 30,
"author": "C. K. Young",
"author_id": 13,
"author_profile": "https://Stackoverflow.com/users/13",
"pm_score": 5,
"selected": false,
"text": "#include <sys/socket.h>\n\nint\nmain()\n{\n return AF_INET;\n}\n"
},
{
"answer_id": 73,
"author": "C. K. Young",
... | 2008/08/01 | [
"https://Stackoverflow.com/questions/25",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23/"
] |
34 | <p>How do I forcefully unload a <code>ByteArray</code> from memory using ActionScript 3?</p>
<p>I have tried the following:</p>
<pre><code>// First non-working solution
byteArray.length = 0;
byteArray = new ByteArray();
// Second non-working solution
for ( var i:int=0; i < byteArray.length; i++ ) {
byteArray[... | [
{
"answer_id": 52,
"author": "Jax",
"author_id": 23,
"author_profile": "https://Stackoverflow.com/users/23",
"pm_score": 4,
"selected": false,
"text": "private var gcCount:int;\nprivate function startGCCycle():void{\n gcCount = 0;\n addEventListener(Event.ENTER_FRAME, doGC);\n}\npr... | 2008/08/01 | [
"https://Stackoverflow.com/questions/34",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
36 | <p>How can I monitor an SQL Server database for changes to a table without using triggers or modifying the structure of the database in any way? My preferred programming environment is <a href="http://en.wikipedia.org/wiki/.NET_Framework" rel="noreferrer">.NET</a> and C#.</p>
<p>I'd like to be able to support any <a h... | [
{
"answer_id": 82,
"author": "Yaakov Ellis",
"author_id": 51,
"author_profile": "https://Stackoverflow.com/users/51",
"pm_score": 4,
"selected": false,
"text": "select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'ABC'\n"
},
{
"answer_id": 352,
"author": "Jon Galloway... | 2008/08/01 | [
"https://Stackoverflow.com/questions/36",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32/"
] |
39 | <p>I am aware that in <a href="http://en.wikipedia.org/wiki/.NET_Framework" rel="noreferrer">.NET</a> there are three timer types (see <em><a href="http://msdn.microsoft.com/en-us/magazine/cc164015.aspx" rel="noreferrer">Comparing the Timer Classes in the .NET Framework Class Library</a></em>). I have chosen a threaded... | [
{
"answer_id": 44,
"author": "Greg Hurlman",
"author_id": 35,
"author_profile": "https://Stackoverflow.com/users/35",
"pm_score": 5,
"selected": false,
"text": "Reset()"
},
{
"answer_id": 45,
"author": "huseyint",
"author_id": 39,
"author_profile": "https://Stackoverf... | 2008/08/01 | [
"https://Stackoverflow.com/questions/39",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33/"
] |
42 | <p>I am starting a new web application in PHP and this time around I want to create something that people can extend by using a plugin interface. </p>
<p>How does one go about writing 'hooks' into their code so that plugins can attach to specific events?</p>
| [
{
"answer_id": 77,
"author": "Kevin",
"author_id": 40,
"author_profile": "https://Stackoverflow.com/users/40",
"pm_score": 8,
"selected": true,
"text": "<?php\n\n/** Plugin system **/\n\n$listeners = array();\n\n/* Create an entry point for plugins */\nfunction hook() {\n global $list... | 2008/08/01 | [
"https://Stackoverflow.com/questions/42",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37/"
] |
48 | <p>Let's say you create a wizard in an HTML form. One button goes back, and one goes forward. Since the <em>back</em> button appears first in the markup when you press <kbd>Enter</kbd>, it will use that button to submit the form.</p>
<p>Example:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-consol... | [
{
"answer_id": 56,
"author": "huseyint",
"author_id": 39,
"author_profile": "https://Stackoverflow.com/users/39",
"pm_score": 6,
"selected": false,
"text": "<input type=\"submit\" name=\"submitButton\" value=\"Previous Page\" />\n<input type=\"submit\" name=\"submitButton\" value=\"Next ... | 2008/08/01 | [
"https://Stackoverflow.com/questions/48",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/40/"
] |
59 | <p>I have a <code>DataTable</code> with a <code>Name</code> column. I want to generate a collection of the unique names ordered alphabetically. The following query ignores the <em>order by</em> clause.</p>
<pre><code>var names =
(from DataRow dr in dataTable.Rows
orderby (string)dr["Name"]
select (string)d... | [
{
"answer_id": 62,
"author": "Bob",
"author_id": 45,
"author_profile": "https://Stackoverflow.com/users/45",
"pm_score": 6,
"selected": false,
"text": "var names = (from DataRow dr in dataTable.Rows\n select (string)dr[\"Name\"]).Distinct().OrderBy( name => name );\n"
},
... | 2008/08/01 | [
"https://Stackoverflow.com/questions/59",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45/"
] |
66 | <p>How do you page through a collection in LINQ given that you have a <code>startIndex</code> and a <code>count</code>?</p>
| [
{
"answer_id": 68,
"author": "Nick Berardi",
"author_id": 17,
"author_profile": "https://Stackoverflow.com/users/17",
"pm_score": 6,
"selected": false,
"text": "Skip"
},
{
"answer_id": 4521,
"author": "Mike Minutillo",
"author_id": 358,
"author_profile": "https://Stac... | 2008/08/01 | [
"https://Stackoverflow.com/questions/66",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17/"
] |
72 | <p>I want to format my existing comments as 'RDoc comments' so they can be viewed using <code>ri</code>.</p>
<p>What are some recommended resources for starting out using RDoc?</p>
| [
{
"answer_id": 23993,
"author": "James A. Rosen",
"author_id": 1190,
"author_profile": "https://Stackoverflow.com/users/1190",
"pm_score": 4,
"selected": false,
"text": ":main:"
}
] | 2008/08/01 | [
"https://Stackoverflow.com/questions/72",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25/"
] |
80 | <p>I've written a database generation script in <a href="http://en.wikipedia.org/wiki/SQL" rel="noreferrer">SQL</a> and want to execute it in my <a href="http://en.wikipedia.org/wiki/Adobe_Integrated_Runtime" rel="noreferrer">Adobe AIR</a> application:</p>
<pre><code>Create Table tRole (
roleID integer Primary Key... | [
{
"answer_id": 124,
"author": "Shawn",
"author_id": 26,
"author_profile": "https://Stackoverflow.com/users/26",
"pm_score": 5,
"selected": true,
"text": "var strSql:String = stream.readUTFBytes(stream.bytesAvailable); \nvar i:Number = 0;\nvar strSqlSplit:Array = strSql.split(\";\");... | 2008/08/01 | [
"https://Stackoverflow.com/questions/80",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26/"
] |
85 | <p>What are the best practices around creating flat file database structures in PHP?</p>
<p>A lot of more matured PHP flat file frameworks out there which I attempt to implement SQL-like query syntax which is over the top for my purposes in most cases. (I would just use a database at that point).</p>
<p>Are there any... | [
{
"answer_id": 87,
"author": "saint_groceon",
"author_id": 59,
"author_profile": "https://Stackoverflow.com/users/59",
"pm_score": 4,
"selected": false,
"text": "./content/YYYYMMDDHHMMSS/\n"
},
{
"answer_id": 154,
"author": "w-ll",
"author_id": 146637,
"author_profile... | 2008/08/01 | [
"https://Stackoverflow.com/questions/85",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/59/"
] |
88 | <p>I am porting a game, that was originally written for the Win32 API, to Linux (well, porting the OS X port of the Win32 port to Linux).</p>
<p>I have implemented <code>QueryPerformanceCounter</code> by giving the uSeconds since the process start up: </p>
<pre><code>BOOL QueryPerformanceCounter(LARGE_INTEGER* pe... | [
{
"answer_id": 98,
"author": "Louis Brandy",
"author_id": 2089740,
"author_profile": "https://Stackoverflow.com/users/2089740",
"pm_score": 7,
"selected": true,
"text": "gettimeofday()"
},
{
"answer_id": 367,
"author": "Mark Harrison",
"author_id": 116,
"author_profil... | 2008/08/01 | [
"https://Stackoverflow.com/questions/88",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/61/"
] |
104 | <p>In .NET perspective:</p>
<ul>
<li>What is a <a href="https://en.wikipedia.org/wiki/Memory_leak" rel="noreferrer">memory leak</a>?</li>
<li>How can you determine whether your application leaks? What are the effects?</li>
<li>How can you prevent a memory leak?</li>
<li>If your application has memory leak, does it go ... | [
{
"answer_id": 2947,
"author": "Seibar",
"author_id": 357,
"author_profile": "https://Stackoverflow.com/users/357",
"pm_score": 3,
"selected": false,
"text": "StreamReader sr;\nusing(sr = new StreamReader(\"somefile.txt\"))\n{\n //do some stuff\n}\n"
},
{
"answer_id": 4702,
... | 2008/08/01 | [
"https://Stackoverflow.com/questions/104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/39/"
] |
109 | <p>Recently our site has been deluged with the resurgence of the <a href="https://en.wikipedia.org/wiki/Asprox_botnet" rel="noreferrer">Asprox botnet</a> <a href="http://en.wikipedia.org/wiki/SQL_injection" rel="noreferrer">SQL injection</a> attack. Without going into details, the attack attempts to execute SQL code by... | [
{
"answer_id": 304,
"author": "Michael Stum",
"author_id": 91,
"author_profile": "https://Stackoverflow.com/users/91",
"pm_score": 3,
"selected": false,
"text": "0x"
},
{
"answer_id": 2585,
"author": "Dillie-O",
"author_id": 71,
"author_profile": "https://Stackoverflo... | 2008/08/01 | [
"https://Stackoverflow.com/questions/109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/71/"
] |
123 | <p>Is there an existing application or library in <em>Java</em> which will allow me to convert a <code>CSV</code> data file to <code>XML</code> file? </p>
<p>The <code>XML</code> tags would be provided through possibly the first row containing column headings.</p>
| [
{
"answer_id": 133,
"author": "saint_groceon",
"author_id": 59,
"author_profile": "https://Stackoverflow.com/users/59",
"pm_score": 2,
"selected": false,
"text": "String.split()"
},
{
"answer_id": 6726,
"author": "Anthony Cramp",
"author_id": 488,
"author_profile": "h... | 2008/08/01 | [
"https://Stackoverflow.com/questions/123",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/78/"
] |
126 | <p>What is the "purist" or "correct" way to access an object's properties from within an object method that is not a getter/setter method?</p>
<p>I know that from outside of the object you should use a getter/setter, but from within would you just do:</p>
<p>Java:</p>
<pre><code>String property = this.property;
</co... | [
{
"answer_id": 139,
"author": "pix0r",
"author_id": 72,
"author_profile": "https://Stackoverflow.com/users/72",
"pm_score": 4,
"selected": false,
"text": "public function getName() {\n $this->incrementNameCalled();\n return $this->_getName();\n}\n\nprotected function _getName() {\n... | 2008/08/01 | [
"https://Stackoverflow.com/questions/126",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/58/"
] |
145 | <p>Does anyone know of a good way to compress or decompress files and folders in C# quickly? Handling large files might be necessary.</p>
| [
{
"answer_id": 2142,
"author": "Dave Anderson",
"author_id": 371,
"author_profile": "https://Stackoverflow.com/users/371",
"pm_score": 5,
"selected": false,
"text": "System.IO.Compression"
},
{
"answer_id": 48174631,
"author": "mohsen_1687",
"author_id": 3311484,
"aut... | 2008/08/01 | [
"https://Stackoverflow.com/questions/145",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/87/"
] |
146 | <p>I have a website that plays mp3s in a flash player. If a user clicks 'play' the flash player automatically downloads an mp3 and starts playing it. </p>
<p>Is there an easy way to track how many times a particular song clip (or any binary file) has been downloaded?</p>
<hr>
<blockquote>
<p>Is the play link a lin... | [
{
"answer_id": 152,
"author": "w-ll",
"author_id": 146637,
"author_profile": "https://Stackoverflow.com/users/146637",
"pm_score": 6,
"selected": true,
"text": "$filename = base64_url_decode($_REQUEST['file']);\nheader(\"Cache-Control: public\");\nheader('Content-disposition: attachment;... | 2008/08/01 | [
"https://Stackoverflow.com/questions/146",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30/"
] |
163 | <p>Stack Overflow has a subversion version number at the bottom:</p>
<blockquote>
<p>svn revision: 679</p>
</blockquote>
<p>I want to use such automatic versioning with my <code>.NET Web Site/Application</code>, Windows Forms, WPD projects/solutions.</p>
<p>How do I implement this?</p>
| [
{
"answer_id": 166,
"author": "Nick Berardi",
"author_id": 17,
"author_profile": "https://Stackoverflow.com/users/17",
"pm_score": 5,
"selected": false,
"text": "$Id:$\n"
},
{
"answer_id": 9391,
"author": "James Pogran",
"author_id": 1083,
"author_profile": "https://S... | 2008/08/01 | [
"https://Stackoverflow.com/questions/163",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83/"
] |
End of preview. Expand in Data Studio
- Downloads last month
- 56