qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
230,792
<p>I have noticed that regardless of a given script's execution time, every date() call will return the same timestamp regardless of where the function is called within the script. It looks like it just returns the time at which the script first started executing.</p> <p>For logging purposes, it would be extremely use...
[ { "answer_id": 231010, "author": "Paolo Bergantino", "author_id": 16417, "author_profile": "https://Stackoverflow.com/users/16417", "pm_score": 2, "selected": false, "text": "<?php\n$time_start = time();\n\nsleep(2);\n\n$time_end = time();\n\nprint 'Start: ' . date(\"m/d/Y @ g:i:sA\", $t...
2008/10/23
[ "https://Stackoverflow.com/questions/230792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5291/" ]
230,796
<p>I'm creating a table that looks something like this.</p> <pre><code>CREATE TABLE packages ( productCode char(2) , name nvarchar(100) , ... ) </code></pre> <p>How do I make sure the productCode is always one of two values <code>XJ</code> or <code>XD</code>?</p>
[ { "answer_id": 230819, "author": "Amy B", "author_id": 8155, "author_profile": "https://Stackoverflow.com/users/8155", "pm_score": 4, "selected": true, "text": "ALTER TABLE packages\nADD CONSTRAINT constraintname CHECK (productCode in ('XJ', 'XD'))\n" }, { "answer_id": 230833, ...
2008/10/23
[ "https://Stackoverflow.com/questions/230796", "https://Stackoverflow.com", "https://Stackoverflow.com/users/437/" ]
230,831
<p><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Unbalanced_binary_tree.svg/251px-Unbalanced_binary_tree.svg.png" alt="alt text"></p> <p>The image above is from <a href="http://en.wikipedia.org/wiki/AVL_tree" rel="nofollow noreferrer">"Wikipedia's entry on AVL trees"</a> which Wikipedia indicates...
[ { "answer_id": 230966, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 5, "selected": true, "text": "Root: 23\n(23) -> 14 & 67\n(14) -> 12 & 17\n(12) -> 9\n(17) -> 19\n(67) -> 50 & 72\n(50) -> 54\n(72) -> 76\n" }, {...
2008/10/23
[ "https://Stackoverflow.com/questions/230831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/412/" ]
230,834
<p>This is a winforms application.</p> <p>In windows, I want the user to click and button, and then a popup should make the user select the path of where they want to save the file.</p>
[ { "answer_id": 230867, "author": "gimel", "author_id": 6491, "author_profile": "https://Stackoverflow.com/users/6491", "pm_score": 1, "selected": false, "text": "StringBuilder.ToString() TextStream.Write()" }, { "answer_id": 230874, "author": "Jon Grant", "author_id": 187...
2008/10/23
[ "https://Stackoverflow.com/questions/230834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
230,842
<p>The first one is definitely something that works, but which one below is the efficient way?</p> <pre><code>switch($type) { case 1: print 'success'; break; case 2: print 'success'; break; case 3: print 'success'; break; case 4: print 'success for type 4'...
[ { "answer_id": 230857, "author": "Nescio", "author_id": 14484, "author_profile": "https://Stackoverflow.com/users/14484", "pm_score": 5, "selected": true, "text": " switch($type) \n {\n case 1:\n case 2:\n case 3:\n print 'success';\n break;\n case 4:\n ...
2008/10/23
[ "https://Stackoverflow.com/questions/230842", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
230,845
<p>I'm writing a python script that executes a csh script in Solaris 10. The csh script prompts the user for the root password (which I know) but I'm not sure how to make the python script answer the prompt with the password. Is this possible? Here is what I'm using to execute the csh script:</p> <pre><code>import com...
[ { "answer_id": 230855, "author": "Owen", "author_id": 2109, "author_profile": "https://Stackoverflow.com/users/2109", "pm_score": 0, "selected": false, "text": "commands.getoutput('server stop -p password')\n" }, { "answer_id": 230862, "author": "Douglas Mayle", "author_i...
2008/10/23
[ "https://Stackoverflow.com/questions/230845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7949/" ]
230,869
<p>I have this situation. I have a real stored in a varbinary field in a sql 2005 database. As I can't convert a varbinary to a real in sql 2005, I'm trying to do that in vb.net.</p> <p>That field gets stored as a byte() array in a DataTable.</p> <p>Now I would like to read that byte() into a double, or decimal varia...
[ { "answer_id": 231295, "author": "biozinc", "author_id": 30698, "author_profile": "https://Stackoverflow.com/users/30698", "pm_score": 1, "selected": false, "text": "'declare a test array\nDim testArray As Byte() = {0, 0, 0, 0}\n'wrap it into a memory stream\nDim memStream As MemoryStrea...
2008/10/23
[ "https://Stackoverflow.com/questions/230869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
230,886
<p>I've seen this format used for comma-delimited lists in some C++ code (although this could apply to any language):</p> <pre><code>void function( int a , int b , int c ) </code></pre> <p>I was wondering why would someone use that over a more common format such as:</p> <pre...
[ { "answer_id": 230915, "author": "Max Lybbert", "author_id": 10593, "author_profile": "https://Stackoverflow.com/users/10593", "pm_score": 1, "selected": false, "text": "std::cout << \"some info \"\n << \"some more info \" << 4\n + 5 << std::endl;\n std::vector<int> v = ...;\n std...
2008/10/23
[ "https://Stackoverflow.com/questions/230886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4086/" ]
230,892
<p>I have quickly read (and will read with more care soon) the article of Scott Allen concerning the possibility to use an other provider of the default SQL Express or SQL Server database to use the "<a href="http://weblogs.asp.net/scottgu/archive/2006/02/24/ASP.NET-2.0-Membership_2C00_-Roles_2C00_-Forms-Authentication...
[ { "answer_id": 230915, "author": "Max Lybbert", "author_id": 10593, "author_profile": "https://Stackoverflow.com/users/10593", "pm_score": 1, "selected": false, "text": "std::cout << \"some info \"\n << \"some more info \" << 4\n + 5 << std::endl;\n std::vector<int> v = ...;\n std...
2008/10/23
[ "https://Stackoverflow.com/questions/230892", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13913/" ]
230,893
<p>What is the fastest way to load data from flatfiles into a MySQL database, and then create the relations between the tables via foreign keys? </p> <p>For example... I have a flat file in the format: </p> <pre><code>[INDIVIDUAL] [POP] [MARKER] [GENOTYPE] "INDIVIDUAL1", "CEU", "rs55555","AA" "INDIVIDUAL1", "C...
[ { "answer_id": 449373, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": true, "text": " LOAD DATA INFILE 'data.txt' IGNORE INTO TABLE POP FIELDS TERMINATED BY ','\n ENCLOSED BY '\"' LINES TERMINATED BY '\\n' IGN...
2008/10/23
[ "https://Stackoverflow.com/questions/230893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30911/" ]
230,896
<p>I have a list of variable names, like this:</p> <pre><code>['foo', 'bar', 'baz'] </code></pre> <p>(I originally asked how I convert a list of variables. See Greg Hewgill's answer below.)</p> <p>How do I convert this to a dictionary where the keys are the variable names (as strings) and the values are the values ...
[ { "answer_id": 230907, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 2, "selected": false, "text": "[foo, bar, baz] foo a[0] a quux quux = a[0]\n eval() __dict__ import __main__\nd = dict((x, __main__.__dict__[x]) for x i...
2008/10/23
[ "https://Stackoverflow.com/questions/230896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4766/" ]
230,925
<p>Visual Studio does it; Reflector does it; and now I want to as well :)</p> <p>I want to retrieve the XML documentation for some members in some framework assemblies (i.e. <code>mscorlib.dll</code>, <code>System.dll</code>, etc). I assume this would involve:</p> <ul> <li>finding the XML file for the assembly, </li>...
[ { "answer_id": 238058, "author": "Emperor XLII", "author_id": 2495, "author_profile": "https://Stackoverflow.com/users/2495", "pm_score": 2, "selected": false, "text": "static FileInfo GetXmlDocFile( Assembly assembly ) {\n string assemblyDirPath = Path.GetDirectoryName( assembly.Locati...
2008/10/23
[ "https://Stackoverflow.com/questions/230925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2495/" ]
230,927
<p>I'm looking for best practices for establishing connections between Oracle 8 and Visual Studio 2005 applications. The target would be a Windows Forms application written in C# that hits the database once a second to monitor tables looking for their last inserted record. I'm considering using "Application settings" t...
[ { "answer_id": 231073, "author": "Loscas", "author_id": 22706, "author_profile": "https://Stackoverflow.com/users/22706", "pm_score": 2, "selected": true, "text": "<?xml version='1.0' encoding='utf-8'?>\n <configuration>\n <connectionStrings>\n <clear />\n <add name=\"Name\...
2008/10/23
[ "https://Stackoverflow.com/questions/230927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6992/" ]
230,931
<p>As I've read somewhere it is advised to use !== and === instead.</p>
[ { "answer_id": 230944, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 4, "selected": false, "text": "5 == \"5\"\n 5 === \"5\"\n" }, { "answer_id": 230957, "author": "olliej", "author_id": 784, "autho...
2008/10/23
[ "https://Stackoverflow.com/questions/230931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28098/" ]
230,973
<p>I saw a code snippet yesterday in one of the responses here on StackOverflow that intrigued me. It was something like this:</p> <pre><code> List&lt;string&gt; myList = new List&lt;string&gt; {"aBc", "HELLO", "GoodBye"}; myList.ForEach(d=&gt;d.ToLower()); </code></pre> <p>I was hoping I could use it to convert al...
[ { "answer_id": 230991, "author": "marcumka", "author_id": 30761, "author_profile": "https://Stackoverflow.com/users/30761", "pm_score": 2, "selected": false, "text": "[TestMethod]\npublic void LinqStringTest()\n{\n List<string> myList = new List<string> { \"aBc\", \"HELLO\", \"GoodBye...
2008/10/23
[ "https://Stackoverflow.com/questions/230973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29662/" ]
230,974
<p>I am attempting to disable SSL v2.0 protocol on IIS 7.</p> <p>The following article refers to IIS v6: <a href="http://support.microsoft.com/kb/187498" rel="noreferrer">http://support.microsoft.com/kb/187498</a></p> <p>It doesn't seem to apply because the only protocol listed in the registry is SSL 2.0 (not all the...
[ { "answer_id": 5057027, "author": "Martin Buberl", "author_id": 135441, "author_profile": "https://Stackoverflow.com/users/135441", "pm_score": 5, "selected": false, "text": "HKey_Local_Machine\\System\\CurrentControlSet\\Control\\SecurityProviders \\SCHANNEL\\Protocols\\SSL 2.0" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/230974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
230,981
<p>I am working with some input that is in the possible forms</p> <pre><code>$1,200 20 cents/ inch $10 </code></pre> <p>Is there a way to parse these to numbers in VB? Also printing these numbers?</p> <p><strong>EDIT:</strong> Regular expressions would be great.</p> <p><strong>EDIT:</strong> VB 6 in particular</p>...
[ { "answer_id": 231025, "author": "EBGreen", "author_id": 1358, "author_profile": "https://Stackoverflow.com/users/1358", "pm_score": 2, "selected": true, "text": "Dim oRE As Object\nSet oRE = New VBScript_RegExp.RegExp\noRe.Pattern = \"\\D\"\nstrTest = oRE.Replace(strTest, \"\")\n" }, ...
2008/10/23
[ "https://Stackoverflow.com/questions/230981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17712/" ]
230,984
<p>Is there a compression API available for use on the iPhone? We're building some RESTful web services for our iPhone app to talk to, but we want to compress at least some of the conversations for efficiency.</p> <p>I don't care what the format (ZIP, LHA, whatever) is, and it does not need to be secure.</p> <p>Some ...
[ { "answer_id": 234099, "author": "Brad Larson", "author_id": 19679, "author_profile": "https://Stackoverflow.com/users/19679", "pm_score": 6, "selected": false, "text": "@interface NSData (NSDataExtension)\n\n// Returns range [start, null byte), or (NSNotFound, 0).\n- (NSRange) rangeOfNu...
2008/10/23
[ "https://Stackoverflow.com/questions/230984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27779/" ]
231,023
<p>I'd like to align label/value pairs in the center using CSS without using absolute positioning or tables (see screen shot). In that screen shot I positioned the value (ie. $4,500/wk) absolute and then floated the label right up against it. But absolute doesn't work so well in IE and I've heard it's not a good tech...
[ { "answer_id": 231056, "author": "Rahul", "author_id": 16308, "author_profile": "https://Stackoverflow.com/users/16308", "pm_score": 2, "selected": false, "text": "<dl>\n<dt>Cost:</dt>\n<dd>$4,500/wk</dd>\n<dt>Sleeps:</dt>\n<dd>1</dd>\n</dl>\n dl { width: 200px; }\ndt { width: 100px; tex...
2008/10/23
[ "https://Stackoverflow.com/questions/231023", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6957/" ]
231,027
<p>I make a request to an xml web service, and get back a response. This response, being a stream, is then saved to a string. The problem is, the response is full of tags, CDATA, etc (as you would expect). There is no line breaking either, as to be expected.</p> <p>I want to take this string, which represents an xml d...
[ { "answer_id": 231041, "author": "Michael Haren", "author_id": 29, "author_profile": "https://Stackoverflow.com/users/29", "pm_score": 3, "selected": false, "text": "<?xml version=\"1.0\"?>\n<?xml-stylesheet type=\"text/xsl\" href=\"style.xsl\"?>\n<Records>\n <Record>\n <name>adam</n...
2008/10/23
[ "https://Stackoverflow.com/questions/231027", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
231,029
<p>I am trying to include a value from a database table within the value element of an input field.<br> This is what I have, but it is not working:</p> <pre><code>?&gt;&lt;input type="text" size="10" value="&lt;?= date("Y-m-d", strtotime($rowupd['upcoming_event_featured_date'])) ?&gt;" name="upcoming_event_featured_d...
[ { "answer_id": 231037, "author": "Devon", "author_id": 13850, "author_profile": "https://Stackoverflow.com/users/13850", "pm_score": 1, "selected": false, "text": "ini_set('short_open_tag', true);\n" }, { "answer_id": 231058, "author": "Stefan Gehrig", "author_id": 11354,...
2008/10/23
[ "https://Stackoverflow.com/questions/231029", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
231,034
<p>I'm using Visual Studio 2008 Team Development Edition and my Project properties page will not display. I right-clicked the project name and selected "Properties" and no page displayed as it normally would. Also, when I double-click the Settings.settings the normal Settings GUI does not display. I only see the XM...
[ { "answer_id": 27580436, "author": "slavash", "author_id": 4380689, "author_profile": "https://Stackoverflow.com/users/4380689", "pm_score": 2, "selected": false, "text": "devenv.exe /resetskippkgs\n" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27852/" ]
231,051
<p>After reading <a href="http://www.javaworld.com/javaworld/javatips/jw-javatip130.html?page=2" rel="noreferrer">this old article</a> measuring the memory consumption of several object types, I was amazed to see how much memory <code>String</code>s use in Java:</p> <pre><code>length: 0, {class java.lang.String} size =...
[ { "answer_id": 231352, "author": "Sam Stokes", "author_id": 20131, "author_profile": "https://Stackoverflow.com/users/20131", "pm_score": 0, "selected": false, "text": "String.intern" }, { "answer_id": 3323724, "author": "J. Dimeo", "author_id": 198371, "author_profil...
2008/10/23
[ "https://Stackoverflow.com/questions/231051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21368/" ]
231,052
<p>I have a page where a few textboxes cannot be empty before clicking a Save button. </p> <pre><code>&lt;TextBox... &lt;TextBox.Text&gt; &lt;Binding Path ="LastName" UpdateSourceTrigger="PropertyChanged"&gt; &lt;Binding.ValidationRules&gt; ...
[ { "answer_id": 808190, "author": "Christoph", "author_id": 98795, "author_profile": "https://Stackoverflow.com/users/98795", "pm_score": 4, "selected": false, "text": "this.AddHandler(Validation.ErrorEvent,new RoutedEventHandler(OnErrorEvent)); \n private int errorCount;\nprivate void On...
2008/10/23
[ "https://Stackoverflow.com/questions/231052", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3047/" ]
231,057
<p>Is there any library function for this purpose, so I don't do it by hand and risk ending in TDWTF?</p> <pre><code>echo ceil(31497230840470473074370324734723042.6); // Expected result 31497230840470473074370324734723043 // Prints &lt;garbage&gt; </code></pre>
[ { "answer_id": 231171, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 4, "selected": true, "text": "$x = '31497230840470473074370324734723042.9';\n\nbcscale(100);\nvar_dump(bcFloor($x));\nvar_dump(bcCeil($x));\nvar_dump(bcRoun...
2008/10/23
[ "https://Stackoverflow.com/questions/231057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13211/" ]
231,062
<p>I'm building up a library of filters for a validation class in PHP, some of them using regular expressions. I have a lot of filters in mind, but I also don't want to potentially miss any. What do you most often use regular expressions to check? What are some of the not-so-common things that you've had to check that ...
[ { "answer_id": 231101, "author": "tom.dietrich", "author_id": 15769, "author_profile": "https://Stackoverflow.com/users/15769", "pm_score": 1, "selected": false, "text": " '[\\s]*--\n ((?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{8,255})\n" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13281/" ]
231,069
<p>I want to write a default structure, N times, to a file, using fwrite.</p> <pre><code>typedef struct foo_s { uint32 A; uint32 B; char desc[100]; }foo_t; void init_file(FILE *fp, int N) { foo_t foo_struct = {0}; foo_struct.A = -1; foo_struct.B = 1; fwrite(&amp;foo_struct, sizeof(foo_struct), N, f...
[ { "answer_id": 231084, "author": "Ferruccio", "author_id": 4086, "author_profile": "https://Stackoverflow.com/users/4086", "pm_score": 5, "selected": true, "text": "int i;\nfor (i = 0; i < N; ++i)\n fwrite(&foo_struct, sizeof(foo_struct), 1, fp);\n" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29405/" ]
231,089
<p>Is there any point to freeing memory in an atexit() function?</p> <p>I have a global variable that gets malloc'ed after startup. I could write an atexit() function to free it, but isn't the system going to reclaim all that memory when the program exits anyway?</p> <p>Is there any benefit to being tidy and actively...
[ { "answer_id": 242317, "author": "Artelius", "author_id": 31945, "author_profile": "https://Stackoverflow.com/users/31945", "pm_score": 4, "selected": false, "text": "malloc() free() free() free() free() malloc() free()" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17693/" ]
231,098
<p>I'd like a loop that uses a UInt16 (ushort) to loop through all of its values. However, this doesn't do it:</p> <pre><code>for( ushort i = 0; i &lt; UInt16.MaxValue; i++ ) { // do something } </code></pre> <p>The problem is that the loop will quit when i == 0xFFFF and not "do something". If I change the 'for'...
[ { "answer_id": 231112, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 5, "selected": true, "text": "do...while ushort i = 0;\ndo\n{\n // do something\n} while(i++ < UInt16.MaxValue);\n" }, { "answer_id": 23...
2008/10/23
[ "https://Stackoverflow.com/questions/231098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9516/" ]
231,121
<p>As a counterpart to <a href="https://stackoverflow.com/questions/215470/c-coding-guideline-102">C++ Coding Guideline 102</a>, which of the <a href="http://www.gotw.ca/publications/c++cs.htm" rel="nofollow noreferrer">101 guidelines of Sutter &amp; Alexandrescu</a> do you violate or ignore most often, and why?</p>
[ { "answer_id": 231713, "author": "Steve Jessop", "author_id": 13005, "author_profile": "https://Stackoverflow.com/users/13005", "pm_score": 3, "selected": false, "text": "uint64_t i = getIEEEbitpatternByMeansRelevantToTheQuestion();\ndouble d;\nmemcpy(&d, &i, 8);\n" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19863/" ]
231,125
<p>I remember reading at one point that indexing a field with low cardinality (a low number of distinct values) is not really worth doing. I admit I don't know enough about how indexes work to understand why that is.</p> <p>So what if I have a table with 100 million rows in it, and I am selecting records where a bit ...
[ { "answer_id": 231366, "author": "Ian Boyd", "author_id": 12597, "author_profile": "https://Stackoverflow.com/users/12597", "pm_score": 1, "selected": false, "text": "tinyint CREATE INDEX IX_Users_IsActiveUsername ON Users\n(\n IsActive,\n Username\n)\n SELECT TOP 1 Username \nFROM U...
2008/10/23
[ "https://Stackoverflow.com/questions/231125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1436/" ]
231,126
<p>I'm terribly new to SQL, and cannot seem to get the desired information out, after trying a few different google searches, and reading through some SQL tutorials.</p> <p>I think it involves some sort of joins, but cannot get them straight.</p> <p>Given the following sample tables:</p> <p>Table 1(Activity This is ...
[ { "answer_id": 231139, "author": "Totty", "author_id": 30838, "author_profile": "https://Stackoverflow.com/users/30838", "pm_score": 2, "selected": false, "text": "SELECT Activity.Who, Activity.What, Comments.When, Comments.Comment FROM Activity JOIN Comments ON Activity.ID = Comments.ID...
2008/10/23
[ "https://Stackoverflow.com/questions/231126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30939/" ]
231,128
<p>Just about every piece of example code everywhere omits error handling (because it "confuses the issue" that the example code is addressing). My programming knowledge comes primarily from books and web sites, and you seldom see any error handling in use at all there, let alone good stuff.</p> <p>Where are some plac...
[ { "answer_id": 231302, "author": "Roddy", "author_id": 1737, "author_profile": "https://Stackoverflow.com/users/1737", "pm_score": 2, "selected": false, "text": "int DoA() \n{\n if (location == hellInAHandcart)\n return ERROR;\n else\n RETURN OK;\n}\n\nint DoB()\n{\n int err = DoA();\...
2008/10/23
[ "https://Stackoverflow.com/questions/231128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12193/" ]
231,132
<p>I'm trying to get Wininet to ignore Internet Explorer's "Work Offline" mode, for both HTTP and FTP.</p> <p>So I'm trying to use <code>InternetSetOption()</code> with <code>INTERNET_OPTION_IGNORE_OFFLINE</code>. The documentation says "This is used by <code>InternetQueryOption</code> and <code>InternetSetOption</co...
[ { "answer_id": 471159, "author": "michael", "author_id": 31207, "author_profile": "https://Stackoverflow.com/users/31207", "pm_score": 0, "selected": false, "text": "GET POST" }, { "answer_id": 5739763, "author": "Rick Strahl", "author_id": 11197, "author_profile": "h...
2008/10/23
[ "https://Stackoverflow.com/questions/231132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24267/" ]
231,146
<p>I'm trying to change user input in wildcard form <code>("*word*")</code> to a regular expression format. To that end, I'm using the code below to strip off the <code>'*'</code> at the beginning and end of the input so that I can add the regular expression characters on either end:</p> <pre><code>string::iterator ...
[ { "answer_id": 231173, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 3, "selected": true, "text": "expressionBuilder.erase(iter_end);\nexpressionBuilder.erase(iter_begin);\n erase()" }, { "answer_id": 231183, ...
2008/10/23
[ "https://Stackoverflow.com/questions/231146", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1544/" ]
231,159
<p>I remember from C days that we were encouraged to use</p> <pre><code>i &gt; -1 </code></pre> <p>instead of</p> <pre><code>i &gt;= 0 </code></pre> <p>because of performance.</p> <p>Does this still apply in the C# .NET world? What are the performance implications of using one over the other with today's compilers...
[ { "answer_id": 231179, "author": "Dan Lenski", "author_id": 20789, "author_profile": "https://Stackoverflow.com/users/20789", "pm_score": 7, "selected": true, "text": " ;; if (i > -1) {\n cmp eax, -1\n jle else\nthen:\n ...\nelse:\n\n ;; if (i >= 0) {\n cmp eax, 0\n jl else\nthen:\n ...\...
2008/10/23
[ "https://Stackoverflow.com/questions/231159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1463/" ]
231,175
<p>Where can I find comprehensive documentation for MOQ? I'm just starting with mocking and am having difficulty getting my head around it. I've read through all the links at <a href="http://code.google.com/p/moq/wiki/QuickStart" rel="noreferrer">http://code.google.com/p/moq/wiki/QuickStart</a> but can't seem to find a...
[ { "answer_id": 8546583, "author": "TrueWill", "author_id": 161457, "author_profile": "https://Stackoverflow.com/users/161457", "pm_score": 1, "selected": false, "text": "Id const int ExpectedId = 123;\nmockEntity.VerifySet(x => x.Id = ExpectedId);\n public interface IKeyedEntity\n{\n ...
2008/10/23
[ "https://Stackoverflow.com/questions/231175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30046/" ]
231,189
<p>What tool or method do you recommend to find and replace values in your code? If code is on Linux/Unix, are find and grep the best method?</p>
[ { "answer_id": 231241, "author": "Andy Lester", "author_id": 8454, "author_profile": "https://Stackoverflow.com/users/8454", "pm_score": 4, "selected": true, "text": "$ perl -i -p -e's/\\bthisword\\b/thatword/g' $(find . -name *.html)\n" }, { "answer_id": 231290, "author": "K...
2008/10/23
[ "https://Stackoverflow.com/questions/231189", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26180/" ]
231,191
<p>Ok simple question. I have a JSF application, containing a login page. The problem is if the user loads the login page, leaves it for a while, then tries to login the session expires and a ViewExpiredException is thrown. I could redirect back to the login when this happens, but that isn't very smooth. How can I allo...
[ { "answer_id": 232829, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": -1, "selected": false, "text": "<meta http-equiv=\"refresh\" content=\"5\"/>" }, { "answer_id": 265908, "author": "Serxipc", "author_id": 340...
2008/10/23
[ "https://Stackoverflow.com/questions/231191", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17614/" ]
231,198
<p>The following code compiles correctly under VC++ 8 on XPSP3, but running it causes a runtime error. </p> <p>My header looks like:</p> <pre><code>#include &lt;stdexcept&gt; #include &lt;iterator&gt; #include &lt;list&gt; template&lt;typename T&gt; class test_generator { public: typedef T result_type; ...
[ { "answer_id": 231270, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 0, "selected": false, "text": "return *value++ operator()" }, { "answer_id": 231319, "author": "ChrisN", "author_id": 3853, "author_pro...
2008/10/23
[ "https://Stackoverflow.com/questions/231198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14069/" ]
231,206
<p>What's everyone take on tieing code enum's to row ID's in a database table? I'm really looking for a cleaner alternative. What if for example your static rows in a given table are ID's 1,2,3, and then that table gets filled with user transactional data using ID's 4-100, and then you later want to add a new row ID wh...
[ { "answer_id": 231240, "author": "Stephen Wrighton", "author_id": 7516, "author_profile": "https://Stackoverflow.com/users/7516", "pm_score": 0, "selected": false, "text": "[Enum].Parse(System.Type, Value)\n" }, { "answer_id": 11615617, "author": "GenericJoe", "author_id"...
2008/10/23
[ "https://Stackoverflow.com/questions/231206", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30943/" ]
231,211
<p>Here are two different questions but I think they are related.</p> <ol> <li><p>When using Git, how do I find which changes I have committed locally, but haven't yet pushed to a remote branch? I'm looking for something similar to the Mercurial command <code>hg outgoing</code>.</p></li> <li><p>When using Git, how do ...
[ { "answer_id": 231379, "author": "Jordi Bunster", "author_id": 4272, "author_profile": "https://Stackoverflow.com/users/4272", "pm_score": 8, "selected": true, "text": "git fetch hg pull hg fetch master origin git fetch origin/master git log master origin/master git log master..origin/ma...
2008/10/23
[ "https://Stackoverflow.com/questions/231211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/796/" ]
231,214
<p>I am on the way to build an ASP.NET MVC application with the latest beta release and I wonder if it is possible to change the default project Layout of</p> <p>/Views/Home/Index.aspx /Views/Home/About.aspx</p> <p>to</p> <p>/Blog/Views/Home/Index.aspx /Blog/Views/Home/About.aspx</p> <p>/Forum/Views/Home/Index.aspx...
[ { "answer_id": 231565, "author": "Craig Stuntz", "author_id": 7714, "author_profile": "https://Stackoverflow.com/users/7714", "pm_score": 1, "selected": false, "text": "routes.MapRoute(\"Default\",\n \"{applicationName}/{controller}/{action}/{id})\",\n null,...
2008/10/23
[ "https://Stackoverflow.com/questions/231214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
231,226
<pre><code> include('adodb5/adodb.inc.php'); $myServer = "localhost"; $myUser = "root"; $myPass = "root"; $myDB = "database"; //create an instance of the ADO connection object $conn = new COM("ADODB.Connection") or die("Cannot start ADO"); //define conn...
[ { "answer_id": 234072, "author": "Tom Haigh", "author_id": 22224, "author_profile": "https://Stackoverflow.com/users/22224", "pm_score": 1, "selected": false, "text": "include('adodb5/adodb.inc.php');\n\n$myServer = \"localhost\";\n$myUser = \"root\";\n$myPass = \"root\";\n$myDB = \"data...
2008/10/23
[ "https://Stackoverflow.com/questions/231226", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
231,229
<p>I have source in a bunch of subdirectories like:</p> <pre><code>src/widgets/apple.cpp src/widgets/knob.cpp src/tests/blend.cpp src/ui/flash.cpp </code></pre> <p>In the root of the project I want to generate a single Makefile using a rule like:</p> <pre><code>%.o: %.cpp $(CC) -c $&lt; build/test.exe: build/wid...
[ { "answer_id": 231418, "author": "JesperE", "author_id": 13051, "author_profile": "https://Stackoverflow.com/users/13051", "pm_score": 7, "selected": true, "text": "%.o: %.cpp\n ...\n VPATH = src/widgets\n\nBUILDDIR = build/widgets\n\n$(BUILDDIR)/%.o: %.cpp\n ...\n $(BUILDDIR)...
2008/10/23
[ "https://Stackoverflow.com/questions/231229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7743/" ]
231,250
<p>How would you write a non-recursive algorithm to compute <code>n!</code>?</p>
[ { "answer_id": 231255, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 3, "selected": false, "text": "public double factorial(int n) {\n double result = 1;\n for(double i = 2; i<=n; ++i) {\n result *= i;\n...
2008/10/23
[ "https://Stackoverflow.com/questions/231250", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
231,257
<p>Let's say you have a dynamic language (similar to common scripting languages) and want to write a compiler for it. Is it good idea to reserve some bits of a machine word for something like type tags? Especially for microcontrollers and similar devices, is it a good idea?</p> <p>I can think of some advantages like r...
[ { "answer_id": 231360, "author": "Dan Lenski", "author_id": 20789, "author_profile": "https://Stackoverflow.com/users/20789", "pm_score": 0, "selected": false, "text": "list array" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7988/" ]
231,288
<p>I have started using Jython as it seems to be a excellent language, and has proved to be so far.</p> <p>I am using dom4j to manipulate and retrieve data from the DOM of a bunch of HTML files I have on disk. I have wrote the below script to check threw the DOM using Xpath for <strong>H1</strong> tags and grab text,...
[ { "answer_id": 231335, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 3, "selected": true, "text": "for path in ('//xhtml:h1', '//xhtml:title'):\n elemHolder = dom.createXPath(path)\n elemHolder.namespaceURIs = map\n ...
2008/10/23
[ "https://Stackoverflow.com/questions/231288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30786/" ]
231,321
<p>I cant' figure out how to reference the current instance object defined by the XAML file in the XAML file.</p> <p>I have a converter that I want to send in the current instance as the parameter object.</p> <pre><code>{Binding Path=&lt;bindingObject&gt;, Converter={x:Static namespace:Converter.Instance}, ConverterP...
[ { "answer_id": 231446, "author": "Omer van Kloeten", "author_id": 4979, "author_profile": "https://Stackoverflow.com/users/4979", "pm_score": 0, "selected": false, "text": "RelativeSource Self" }, { "answer_id": 231500, "author": "Dillie-O", "author_id": 71, "author_p...
2008/10/23
[ "https://Stackoverflow.com/questions/231321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9331/" ]
231,323
<p>Anyone know off the top of their heads how to convert a System.Xml.XmlNode to System.Xml.Linq.XNode?</p>
[ { "answer_id": 231412, "author": "Chris Shaffer", "author_id": 6744, "author_profile": "https://Stackoverflow.com/users/6744", "pm_score": 5, "selected": true, "text": "XmlNode myNode;\nXNode translatedNode = XDocument.Parse(myNode.OuterXml);\n" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231323", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21909/" ]
231,327
<p>I want to use the <a href="http://simplehtmldom.sourceforge.net/manual_api.htm" rel="noreferrer">php simple HTML DOM parser</a> to grab the image, title, date, and description from each article on a page full of articles. When looking at the API I notice it has a set_callback which Sets a callback function. However ...
[ { "answer_id": 231339, "author": "Mark Biek", "author_id": 305, "author_profile": "https://Stackoverflow.com/users/305", "pm_score": 6, "selected": true, "text": "<?php\n\nfunction thisFuncTakesACallback($callbackFunc)\n{\n echo \"I'm going to call $callbackFunc!<br />\";\n $callba...
2008/10/23
[ "https://Stackoverflow.com/questions/231327", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28241/" ]
231,340
<p>In a project I am working on, Apache is set up to only forward requests that come in as /prefix/* to mongrel. How can I tell ruby on rails to generate all URLs with that prefix? </p> <p>I have the routes set up for forward to the correct controller action by doing this:</p> <pre><code>map.connect 'sfc/:controller/...
[ { "answer_id": 231417, "author": "Can Berk Güder", "author_id": 2119, "author_profile": "https://Stackoverflow.com/users/2119", "pm_score": 2, "selected": false, "text": "RAILS_RELATIVE_URL_ROOT" }, { "answer_id": 231752, "author": "Mike Breen", "author_id": 22346, "a...
2008/10/23
[ "https://Stackoverflow.com/questions/231340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1486/" ]
231,344
<p>I am using the ASP.Net plugin and control provided by <a href="http://recaptcha.net" rel="noreferrer">reCAPTCHA</a>. I can successfully get the control to work if the submit button on the web form is not in a validationgroup. There is no validationgroup attribute for the reCAPTCHA control. </p> <p>Has anybody had a...
[ { "answer_id": 352439, "author": "bzlm", "author_id": 7724, "author_profile": "https://Stackoverflow.com/users/7724", "pm_score": 3, "selected": true, "text": "ValidationGroup ValidationGroup BaseValidator IValidator BaseValidator WebControl BaseValidator ValidationGroup" }, { "a...
2008/10/23
[ "https://Stackoverflow.com/questions/231344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24522/" ]
231,355
<p>Hi guys I wrote this code and i have two errors.</p> <ol> <li>Invalid rank specifier: expected ',' or ']' </li> <li>Cannot apply indexing with [] to an expression of type 'int'</li> </ol> <p>Can you help please?</p> <pre><code> static void Main(string[] args) { ArrayList numbers = new ArrayList();...
[ { "answer_id": 231380, "author": "Drew Noakes", "author_id": 24874, "author_profile": "https://Stackoverflow.com/users/24874", "pm_score": 2, "selected": false, "text": "foreach (int number in new int[] {10,9,8,7,6,5,4,3,2,1})\n int number = (int)numbers[i];\n number numbers" }, { ...
2008/10/23
[ "https://Stackoverflow.com/questions/231355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30858/" ]
231,358
<p>I'm using NuSOAP on PHP 5.2.6 and I'm seeing that the max message size is only 1000 bytes (which makes it tough to do anything meaningful). Is this set in the endpoint's WSDL or is this something I can configure in NuSOAP?</p>
[ { "answer_id": 232885, "author": "Dan Soap", "author_id": 25253, "author_profile": "https://Stackoverflow.com/users/25253", "pm_score": 2, "selected": false, "text": "max_input_time (defaults to 60)\n" }, { "answer_id": 3926436, "author": "Daniel Alvarez Arribas", ...
2008/10/23
[ "https://Stackoverflow.com/questions/231358", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11577/" ]
231,362
<p>For some weeks now I simply can't run gem install in windows. It sticks on this line:</p> <pre><code>C:\Windows\System32&gt;gem install rails --version 2.1.2 Bulk updating Gem source index for: http://gems.rubyforge.org/ </code></pre> <p>Any ideas what it could be?</p>
[ { "answer_id": 231670, "author": "dbr", "author_id": 745, "author_profile": "https://Stackoverflow.com/users/745", "pm_score": 1, "selected": true, "text": "gem install rails.gem" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231362", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19224/" ]
231,364
<p>I am currently building a small website where the content of the main div is being filled through an Ajax call. I basically have a php script that returns the content like this:</p> <p>(simplified php script...)</p> <pre><code> if(isset($_POST["id_tuto"])){ PrintHtml($_POST["id_tuto"]); } function PrintHtml($id...
[ { "answer_id": 231430, "author": "defrex", "author_id": 6007, "author_profile": "https://Stackoverflow.com/users/6007", "pm_score": 3, "selected": true, "text": "<?php\n function PrintHtml($id) {\n switch($id) {\n case [...]:\n?>\n <h1>Tut page 1</h1>\n <p>this...
2008/10/23
[ "https://Stackoverflow.com/questions/231364", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25152/" ]
231,371
<p>Which are the most advanced frameworks and tools there are available for python for practicing Behavior Driven Development? Especially finding similar tools as rspec and mocha for ruby would be great.</p>
[ { "answer_id": 2999652, "author": "Douglas Camata", "author_id": 361638, "author_profile": "https://Stackoverflow.com/users/361638", "pm_score": 5, "selected": false, "text": "pip install specloud\n pip install ludibrio\n pip install pycukes\n" }, { "answer_id": 11279439, "au...
2008/10/23
[ "https://Stackoverflow.com/questions/231371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30958/" ]
231,377
<p>I would like to use JavaScript to manipulate hidden input fields in a JSF/Facelets page. When the page loads, I need to set a hidden field to the color depth of the client.</p> <p>From my Facelet:</p> <pre><code>&lt;body onload="setColorDepth(document.getElementById(?????);"&gt; &lt;h:form&gt; &lt;h:inputHidden...
[ { "answer_id": 231393, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 3, "selected": true, "text": "<body onload=\"setColorDepth(document.getElementById('myForm:colorDepth');\">\n\n<h:form id=\"myForm\">\n <h:inputHidden val...
2008/10/23
[ "https://Stackoverflow.com/questions/231377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27515/" ]
231,381
<p>Is this seen as an in efficient prime number generator. It seems to me that this is pretty efficient. Is it the use of the stream that makes the program run slower?</p> <p>I am trying to submit this to <a href="http://www.spoj.pl/" rel="nofollow noreferrer">SPOJ</a> and it tells me that my time limit exceeded... </...
[ { "answer_id": 231400, "author": "warren", "author_id": 4418, "author_profile": "https://Stackoverflow.com/users/4418", "pm_score": 3, "selected": false, "text": "<= (sqrt(num))" }, { "answer_id": 231421, "author": "Austin Salonen", "author_id": 4068, "author_profile"...
2008/10/23
[ "https://Stackoverflow.com/questions/231381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29326/" ]
231,390
<p>I've been trying to install <a href="http://thoughtbot.com/projects/shoulda" rel="nofollow noreferrer">Shoulda</a></p> <pre><code>script/plugin install git://github.com/thoughtbot/shoulda.git </code></pre> <p>but all I get is:</p> <pre><code>removing: C:/Documents and Settings/Danny/My Documents/Projects/Ruby On ...
[ { "answer_id": 3067200, "author": "Chris Charabaruk", "author_id": 5697, "author_profile": "https://Stackoverflow.com/users/5697", "pm_score": 0, "selected": false, "text": "--- reporting.rb.orig 2010-06-11 01:00:24.739991600 -0400\n+++ reporting.rb 2010-06-18 00:16:39.517649400...
2008/10/23
[ "https://Stackoverflow.com/questions/231390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13216/" ]
231,407
<p>I'm looking for a GWT common purpose paging widget. So far I have found <a href="http://gwt-widget.sourceforge.net/" rel="nofollow noreferrer">GWT widget library</a> and the <a href="http://code.google.com/p/google-web-toolkit-incubator/w/list" rel="nofollow noreferrer">Google Incubator widgets</a>. Is there any o...
[ { "answer_id": 4300686, "author": "Robin", "author_id": 416740, "author_profile": "https://Stackoverflow.com/users/416740", "pm_score": 0, "selected": false, "text": "CellTable AsyncDataProvider" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6482/" ]
231,438
<p>Does anybody have an implementation of <a href="http://en.wikipedia.org/wiki/Cuckoo_hashing" rel="noreferrer">Cuckoo hashing</a> in C? If there was an Open Source, non GPL version it would be perfect!</p> <p>Since Adam mentioned it in his comment, anyone knows why it is not much used? Is it just a matter of impleme...
[ { "answer_id": 232624, "author": "Remo.D", "author_id": 16827, "author_profile": "https://Stackoverflow.com/users/16827", "pm_score": 1, "selected": false, "text": "void * struct node {\n void *key;\n void *value;\n struct node *left;\n struct node *right;\n}\n struct slot {\n void ...
2008/10/23
[ "https://Stackoverflow.com/questions/231438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16827/" ]
231,439
<p>Is there any easy way to create an acronym from a string?</p> <pre><code>First_name Middle_name Last_name =&gt; FML first_name middle_name last_name =&gt; FML First_name-Middle_name Last_name =&gt; F-ML first_name-middle_name last_name =&gt; F-ML </code></pre>
[ { "answer_id": 231473, "author": "Franci Penov", "author_id": 17028, "author_profile": "https://Stackoverflow.com/users/17028", "pm_score": 2, "selected": false, "text": "Tokenize the string on whitespace.\nFor each token1,\n Tokenize on dash.\n For each token2\n Take token2[0] and ...
2008/10/23
[ "https://Stackoverflow.com/questions/231439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3718/" ]
231,478
<p>I have a site, foo.com, that makes ajax requests to bar.foo.com. Will this work.</p> <p>Also, if foo is a secure connection, https, does bar.foo.com need to be https too? Can these two sites use different certificates?</p>
[ { "answer_id": 231706, "author": "joelhardi", "author_id": 11438, "author_profile": "https://Stackoverflow.com/users/11438", "pm_score": 4, "selected": false, "text": "document.domain window.name https:// src https://foo.com http://bar.foo.com https://foo.com/someurl http://bar.foo.com/s...
2008/10/23
[ "https://Stackoverflow.com/questions/231478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
231,491
<p>Is there an elegant way to create and initialize a <code>const std::vector&lt;const T&gt;</code> like <code>const T a[] = { ... }</code> to a fixed (and small) number of values?<br> I need to call a function frequently which expects a <code>vector&lt;T&gt;</code>, but these values will never change in my case.</p> ...
[ { "answer_id": 231495, "author": "Ferruccio", "author_id": 4086, "author_profile": "https://Stackoverflow.com/users/4086", "pm_score": 7, "selected": true, "text": "vector<int> luggage_combo = { 1, 2, 3, 4, 5 };\n #include <boost/assign/std/vector.hpp>\nusing namespace boost::assign; // ...
2008/10/23
[ "https://Stackoverflow.com/questions/231491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26613/" ]
231,512
<p>I am using RedCloth with Rails 2.1.1. The Textile <code>&lt;del&gt;</code> tag markup format (i.e. -delete-) was not translating at all. Tried a few choice options.</p> <pre><code>&gt; x=RedCloth.new('foobar -blah-') =&gt; "foobar -blah-" &gt; x.to_html =&gt; "&lt;p&gt;foobar &lt;del&gt;blah&lt;/del&gt;&lt;/p&gt;"...
[ { "answer_id": 231660, "author": "Michael Sepcot", "author_id": 6033, "author_profile": "https://Stackoverflow.com/users/6033", "pm_score": 2, "selected": false, "text": ">> RedCloth.new(\"foobar\\n* [-blah-]\").to_html\n=> \"<p>foobar</p>\\n<ul>\\n\\t<li><del>blah</del></li>\\n</ul>\"\n...
2008/10/23
[ "https://Stackoverflow.com/questions/231512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14895/" ]
231,525
<p>We're all familiar with the horror that is C# event declaration. To ensure thread-safety, <a href="http://blogs.msdn.com/brada/archive/2005/01/14/353132.aspx" rel="noreferrer">the standard is to write something like this</a>:</p> <pre><code>public event EventHandler SomethingHappened; protected virtual void OnSome...
[ { "answer_id": 231536, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 7, "selected": true, "text": "public event EventHandler SomethingHappened = delegate {};\n static public void RaiseEvent(this EventHandler @event, obje...
2008/10/23
[ "https://Stackoverflow.com/questions/231525", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5486/" ]
231,538
<p>So I have a snazzy custom route for login</p> <pre><code># routes.rb map.login '/login', :controller =&gt; 'sessions', :action =&gt; 'new' </code></pre> <p>Visit www.asite.com/login and you're there. As is custom with failed login, however, we'll do the following in our action. Note what happens on failed login....
[ { "answer_id": 231625, "author": "Michael Sepcot", "author_id": 6033, "author_profile": "https://Stackoverflow.com/users/6033", "pm_score": 0, "selected": false, "text": "render :action => 'new' redirect_to login_path" }, { "answer_id": 232888, "author": "tomafro", "autho...
2008/10/23
[ "https://Stackoverflow.com/questions/231538", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14895/" ]
231,550
<p>I'd like to use the <a href="https://developer.mozilla.org/en/Rhino_JavaScript_Compiler" rel="nofollow noreferrer">Rhino JavaScript</a> compiler to compile some JavaScript to .class bytecode files for use in a project. It seems like this should already exist, since there are groovyc, netrexxc, and jythonc tasks for ...
[ { "answer_id": 231750, "author": "Vladimir Dyuzhev", "author_id": 1163802, "author_profile": "https://Stackoverflow.com/users/1163802", "pm_score": 4, "selected": true, "text": "<java fork=\"yes\" \n classpathref=\"build.path\" \n classname=\"org.mozilla.javascript.tools.jsc.Main\" \n ...
2008/10/23
[ "https://Stackoverflow.com/questions/231550", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28604/" ]
231,553
<p>As an amateur software developer (I'm still in academia) I've written a few schemas for XML documents. I routinely run into design flubs that cause ugly-looking XML documents because I'm not entirely certain what the semantics of XML exactly are.</p> <p>My assumptions:</p> <pre><code>&lt;property&gt; value &lt;/prop...
[ { "answer_id": 231586, "author": "Greg Beech", "author_id": 13552, "author_profile": "https://Stackoverflow.com/users/13552", "pm_score": 2, "selected": false, "text": "<coordinate x=\"\" y=\"\"/> http://company.com/2008/12/something/somethingelse/\nurn:company-com:2008-12:something:some...
2008/10/23
[ "https://Stackoverflow.com/questions/231553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29119/" ]
231,592
<p>I have some char() fields in a DBF table that were left encrypted by a past developer in the project. </p> <p>However, I know the plaintext result of the decryption of several records. How can I determine the function/algorithm/scheme to decrypt the original data? These are some sample fields:</p> <p>For cryptext:...
[ { "answer_id": 231611, "author": "Sergey", "author_id": 29363, "author_profile": "https://Stackoverflow.com/users/29363", "pm_score": 3, "selected": true, "text": "for (i in originalString) {\nnewString[i] = originalString[i] ^ CRYPT_BYTE;\n}\n" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/861/" ]
231,607
<p>Suppose you have the canonical Customer domain object. You have three different screens on which Customer is displayed: External Admin, Internal Admin, and Update Account.</p> <p>Suppose further that each screen displays only a subset of all of the data contained in the Customer object. </p> <p>The problem is: whe...
[ { "answer_id": 904930, "author": "5x1llz", "author_id": 96074, "author_profile": "https://Stackoverflow.com/users/96074", "pm_score": 1, "selected": false, "text": "dtoUser.MapFrom<In,Out>(Entity)\nor\ndtoAdmin.MapFrom<In,Out>(Entity)\n entity.Foo = dtoUser.Foo\nor\nentity.Bar = dtoAdmin...
2008/10/23
[ "https://Stackoverflow.com/questions/231607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10759/" ]
231,630
<p>I want to override the default CreateObject() function in VBScript with my own.</p> <p>Basically this example in VB6:</p> <p><a href="http://www.darinhiggins.com/the-vb6-createobject-function/" rel="nofollow noreferrer">http://www.darinhiggins.com/the-vb6-createobject-function/</a></p> <p>I cannot figure out is t...
[ { "answer_id": 231701, "author": "PhiLho", "author_id": 15459, "author_profile": "https://Stackoverflow.com/users/15459", "pm_score": 2, "selected": false, "text": "Function CreateObject(className, serverName)\n '---- override the CreateObject\n ' function in order to register wh...
2008/10/23
[ "https://Stackoverflow.com/questions/231630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
231,637
<p>I need to match (case insensitive) "abcd" and an optional trademark symbol</p> <p>Regex: <code>/abcd(™)?/gi</code></p> <p>See example:</p> <pre><code>preg_match("/abcd(™)?/gi","AbCd™ U9+",$matches); print_r($matches); </code></pre> <p>When I run this, <code>$matches</code> isn't populated with anything... Not e...
[ { "answer_id": 231656, "author": "Douglas Mayle", "author_id": 8458, "author_profile": "https://Stackoverflow.com/users/8458", "pm_score": 4, "selected": true, "text": "\\x99" }, { "answer_id": 231659, "author": "tzot", "author_id": 6899, "author_profile": "https://St...
2008/10/23
[ "https://Stackoverflow.com/questions/231637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/53001/" ]
231,647
<p>How do you set the timeout for blocking operations on a Ruby socket?</p>
[ { "answer_id": 231662, "author": "readonly", "author_id": 4883, "author_profile": "https://Stackoverflow.com/users/4883", "pm_score": 5, "selected": true, "text": "require 'timeout'\n ...\nbegin \n timeout(5) do\n message, client_address = some_socket.recvfrom(1024)\n end...
2008/10/23
[ "https://Stackoverflow.com/questions/231647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
231,649
<p>With common lisp and I am assuming the introspection properties. How can I add code to common lisp code that will tell me when a function is called and when has finished executing. I want to take any lisp code and this particular modification to the code. I figure with lisp's AST analysis, this should be possible...
[ { "answer_id": 232638, "author": "dsm", "author_id": 7780, "author_profile": "https://Stackoverflow.com/users/7780", "pm_score": 4, "selected": true, "text": "(trace function) [CL_USER]>\n(defun fac (n)\n \"Naïve factorial implementation\"\n (if (< 1 n)\n (* n (fac (- n 1)))...
2008/10/23
[ "https://Stackoverflow.com/questions/231649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10522/" ]
231,666
<p>I wonder if anyone could suggest the best way of looping through all the <code>&lt;option&gt;</code> s in a <code>&lt;select&gt;</code> element with jQuery, and building an array.</p> <p>Eg.</p> <p>Instead of the following, whereby a string ins passed to the autoCompleteArray(),</p> <pre><code>$("#CityLocal").au...
[ { "answer_id": 231699, "author": "Damir Zekić", "author_id": 401510, "author_profile": "https://Stackoverflow.com/users/401510", "pm_score": 4, "selected": true, "text": "$(document).ready(function(){\n // array of option elements' values\n var optionValues = [];\n // array of option ...
2008/10/23
[ "https://Stackoverflow.com/questions/231666", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26107/" ]
231,677
<p>Given this in a grails action:</p> <pre><code>def xml = { rss(version: '2.0') { ... } } render(contentType: 'application/rss+xml', xml) </code></pre> <p>I see this:</p> <pre><code>&lt;rss&gt;&lt;channel&gt;&lt;title&gt;&lt;/title&gt;&lt;description&gt;&lt;/description&gt;&lt;link&gt;&lt;/link&gt;&...
[ { "answer_id": 232101, "author": "seansand", "author_id": 9452, "author_profile": "https://Stackoverflow.com/users/9452", "pm_score": 4, "selected": false, "text": "def xml = \"<rss><channel><title></title><description>\" +\n \"</description><link></link><item></item></channel></rss>\"...
2008/10/23
[ "https://Stackoverflow.com/questions/231677", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2031/" ]
231,679
<p>To add a svg graphics in html page, it is common to use object tag to wrap it like this:</p> <pre><code>&lt;object id="svgid" data="mysvg.svg" type="image/svg+xml" wmode="transparent" width="100" height="100"&gt; this browser is not able to show SVG: &lt;a linkindex="3" href="http://getfirefox.com"&gt;http://ge...
[ { "answer_id": 233819, "author": "Jon Cram", "author_id": 5343, "author_profile": "https://Stackoverflow.com/users/5343", "pm_score": 3, "selected": false, "text": "object width height" }, { "answer_id": 1577890, "author": "codedread", "author_id": 67838, "author_prof...
2008/10/23
[ "https://Stackoverflow.com/questions/231679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62776/" ]
231,690
<p>When creating web parts for Sharepoint, is it better to create an actual web part, or is using and ASP.NET User Control (.ascx) just as good?</p> <p>I already know how to create the user controls that I need, so it seems like the extra effort of creating a web part is just unnecessary leg work.</p> <p>What are the...
[ { "answer_id": 232185, "author": "Nat", "author_id": 13813, "author_profile": "https://Stackoverflow.com/users/13813", "pm_score": 3, "selected": false, "text": "CreateChildControls()" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10420/" ]
231,693
<p>I have created a pretty basic Flash website for a client and am having an issue programming a Client Login feature that he would like. Currently, if I navigate to the site and click Client Login, it takes me to a login page. The way I need this to work is -- within the Flash, using ActionScript 2.0 -- have the user ...
[ { "answer_id": 231779, "author": "Diodeus - James MacFarlane", "author_id": 12579, "author_profile": "https://Stackoverflow.com/users/12579", "pm_score": 3, "selected": true, "text": "myVars = new LoadVars();\nmyVars.username = username.text;\nmyVars.password = pwd.text;\nmyVars.onLoad =...
2008/10/23
[ "https://Stackoverflow.com/questions/231693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2715/" ]
231,695
<p>I need to store several date values in a database field. These values will be tied to a "User" such that each user will have their own unique set of these several date values.</p> <p>I could use a one-to-many relationship here but each user will have exactly 4 date values tied to them so I feel that a one-to-many t...
[ { "answer_id": 231711, "author": "Douglas Mayle", "author_id": 8458, "author_profile": "https://Stackoverflow.com/users/8458", "pm_score": 3, "selected": true, "text": "SELECT * FROM MyTable WHERE 'DateLiteral' IN (MyDate1, MyDate2, MyDate3, MyDate4);\n SELECT * FROM MyTable WHERE date_t...
2008/10/23
[ "https://Stackoverflow.com/questions/231695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3055/" ]
231,716
<p>I have a table in an MS SQL Server db. I want to create a script that will put the table and all records into another db. So I right-click the table in Management Studio and select Create-To new query editor... but all I get is the table structure. </p> <p>How exactly do I get the values too?</p>
[ { "answer_id": 231754, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 2, "selected": false, "text": "INSERT INTO [destinationdb].[dbo].[destinationtable] SELECT * \nFROM [originaldb].[dbo].[originaltable]\n" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22471/" ]
231,739
<p>Im adding textboxes (not a fixed number of textboxes) dynamically to a form on ASP.NET page, how do i read back data from these textboxes?</p>
[ { "answer_id": 231759, "author": "Dillie-O", "author_id": 71, "author_profile": "https://Stackoverflow.com/users/71", "pm_score": 1, "selected": false, "text": "ctl00$cphBody$[ControlID]\n" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231739", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24958/" ]
231,741
<p>Looking for free/opensource code or description of algorithms to code (simple) and decode (hard) the 2D barcode <a href="http://en.wikipedia.org/wiki/QR_Code" rel="noreferrer">QR code</a>.</p> <p>It doesn't seem like a trivial problem, but it's so popular in Japan that there must be something already available...</...
[ { "answer_id": 6575376, "author": "Adriano Petrich", "author_id": 326220, "author_profile": "https://Stackoverflow.com/users/326220", "pm_score": 2, "selected": false, "text": "#!/usr/bin/python\n\nfrom sys import argv\nimport zbar\nimport Image\n\n\n# create a reader\nscanner = zbar.Ima...
2008/10/23
[ "https://Stackoverflow.com/questions/231741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2915/" ]
231,746
<p>Use case: 3rd party application wants to programatically monitor a text file being generated by another program. Text file contains data you want to analyze as it's being updated.</p> <p>I'm finding a lot of answers to this question wrapped around FileSystemWatcher but let's say you are writing an application for a...
[ { "answer_id": 231858, "author": "Adam Pierce", "author_id": 5324, "author_profile": "https://Stackoverflow.com/users/5324", "pm_score": 3, "selected": false, "text": "struct __stat64 fileinfo;\n\nif(-1 != _stat64(filename, &fileinfo)\n return fileinfo.st_mtime;\n" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9450/" ]
231,760
<p>This seems like a simple question, but I can't find it with the Stack Overflow search or Google. What does a type followed by a <code>_t</code> mean? Such as</p> <pre><code>int_t anInt; </code></pre> <p>I see it a lot in C code meant to deal closely with hardware—I can't help but think that they're related.</p>
[ { "answer_id": 231765, "author": "Douglas Mayle", "author_id": 8458, "author_profile": "https://Stackoverflow.com/users/8458", "pm_score": 4, "selected": false, "text": "size_t" }, { "answer_id": 231789, "author": "mmacaulay", "author_id": 22152, "author_profile": "ht...
2008/10/23
[ "https://Stackoverflow.com/questions/231760", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26237/" ]
231,764
<p>This is one of those meta-programming questions that may or may not belong on SO, but here goes...</p> <p>Have any other programmers out there noticed that their ability to communicate with people (technical or otherwise) almost disappears during and after a period of intense programming?</p> <p>I normally think o...
[ { "answer_id": 231842, "author": "Rob Wells", "author_id": 2974, "author_profile": "https://Stackoverflow.com/users/2974", "pm_score": 0, "selected": false, "text": "SYN\n ACK\n NACK\n" } ]
2008/10/23
[ "https://Stackoverflow.com/questions/231764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26331/" ]
231,767
<p>What is the use of the <code>yield</code> keyword in Python? What does it do?</p> <p>For example, I'm trying to understand this code<sup><strong>1</strong></sup>:</p> <pre><code>def _get_child_candidates(self, distance, min_dist, max_dist): if self._leftchild and distance - max_dist &lt; self._median: yi...
[ { "answer_id": 231778, "author": "Douglas Mayle", "author_id": 8458, "author_profile": "https://Stackoverflow.com/users/8458", "pm_score": 9, "selected": false, "text": "yield return yield get_child_candidates list.extend" }, { "answer_id": 231801, "author": "Jason Baker", ...
2008/10/23
[ "https://Stackoverflow.com/questions/231767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18300/" ]
231,821
<p>I am working on a VB.NET WinForms app that was "upgraded" by Visual Studio (originally 1.0 or 1.1) from VB6 code (which was itself upgraded from VB5). Except for the few new forms I've created since taking over maintenance of this app, all of the forms in the application have a method called DefInstance which allows...
[ { "answer_id": 231852, "author": "BQ.", "author_id": 4632, "author_profile": "https://Stackoverflow.com/users/4632", "pm_score": 1, "selected": false, "text": "Private Sub Command_Click()\n Call DoStuff\nEnd Sub\n\nPrivate Sub DoStuff()\n Form1.myTextbox.Text = \"Bad Idea\"\nEnd Sub\...
2008/10/23
[ "https://Stackoverflow.com/questions/231821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3799/" ]
231,827
<p>I'm designing a multi-tiered database driven web application – SQL relational database, Java for the middle service tier, web for the UI. The language doesn't really matter.</p> <p>The middle service tier performs the actual querying of the database. The UI simply asks for certain data and has no concept that it's ...
[ { "answer_id": 231864, "author": "Niniki", "author_id": 4155, "author_profile": "https://Stackoverflow.com/users/4155", "pm_score": 0, "selected": false, "text": "public interface Pageable\n{\n public void setStartIndex( int index );\n public int getStartIndex();\n public int ge...
2008/10/23
[ "https://Stackoverflow.com/questions/231827", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24396/" ]
231,838
<p>Alright, so I have a query that looks like this:</p> <pre><code>SELECT `orders`.*, GROUP_CONCAT( CONCAT( `menu_items`.`name`, ' ($', FORMAT(`menu_items`.`price`,2), ')' ) SEPARATOR '&lt;br&gt;' ) as `items`, SUM(`menu_items`.`price`) ...
[ { "answer_id": 231846, "author": "Lance Roberts", "author_id": 13295, "author_profile": "https://Stackoverflow.com/users/13295", "pm_score": 4, "selected": true, "text": "CASE WHEN 'menu_items'.'price' = 0 THEN 'menu.items'.'name' ELSE CONCAT (etc) END \n CONCAT" }, { "answer_id"...
2008/10/23
[ "https://Stackoverflow.com/questions/231838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16417/" ]
231,839
<p>In C++ you can disable a function in parent's class by declaring it as private in the child class. How can this be done in Python? I.E. How can I hide parent's function from child's public interface?</p>
[ { "answer_id": 231857, "author": "Jason Baker", "author_id": 2147, "author_profile": "https://Stackoverflow.com/users/2147", "pm_score": 3, "selected": false, "text": "class X(object):\n def some_function(self):\n do_some_stuff()\n\nclass Y(object):\n some_function = None\n ...
2008/10/23
[ "https://Stackoverflow.com/questions/231839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17523/" ]
231,848
<p>The follow code (running in ASP.Net 2.0) displays the contents of the requested URL <strong>twice</strong>. I only want it to display the contents of the requested URL once. I can't figure out what I'm doing wrong. The URL requested is returning XML and if I visit the URL directly, it works fine.</p> <pre><code>Htt...
[ { "answer_id": 231857, "author": "Jason Baker", "author_id": 2147, "author_profile": "https://Stackoverflow.com/users/2147", "pm_score": 3, "selected": false, "text": "class X(object):\n def some_function(self):\n do_some_stuff()\n\nclass Y(object):\n some_function = None\n ...
2008/10/23
[ "https://Stackoverflow.com/questions/231848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30996/" ]
231,862
<p>I'm working with a MySQL query that writes into an outfile. I run this query once every day or two and so I want to be able to remove the outfile without having to resort to su or sudo. The only way I can think of making that happen is to have the outfile written as owned by someone other than the mysql user. Is ...
[ { "answer_id": 232254, "author": "Draemon", "author_id": 26334, "author_profile": "https://Stackoverflow.com/users/26334", "pm_score": 3, "selected": false, "text": "mysql db_schema -e 'SELECT col,... FROM table' > /tmp/outfile.txt\n" }, { "answer_id": 3028580, "author": "cod...
2008/10/23
[ "https://Stackoverflow.com/questions/231862", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1447/" ]
231,868
<p>I'm getting a strange error from <code>g++</code> 3.3 in the following code:</p> <pre><code>#include &lt;bitset&gt; #include &lt;string&gt; using namespace std; template &lt;int N, int M&gt; bitset&lt;N&gt; slice_bitset(const bitset&lt;M&gt; &amp;original, size_t start) { string str = original.to_string&lt;ch...
[ { "answer_id": 231904, "author": "CAdaker", "author_id": 30579, "author_profile": "https://Stackoverflow.com/users/30579", "pm_score": 3, "selected": false, "text": "original.to_string();\n original.template to_string<char, char_traits<char>, allocator<char> >();\n" }, { "answer_...
2008/10/23
[ "https://Stackoverflow.com/questions/231868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3594/" ]
231,870
<p>I have a separate partition on my disk formatted with FAT32. When I hibernate windows, I want to be able to load another OS, create/modify files that are on that partition, then bring Windows out of hibernation and be able to see the changes that I've made.</p> <p>I know what you're going to type, "Well, you're not...
[ { "answer_id": 254756, "author": "Nick", "author_id": 30425, "author_profile": "https://Stackoverflow.com/users/30425", "pm_score": 3, "selected": false, "text": "volumeHandle = CreateFile(volumePath,\n GENERIC_READ|GENERIC_WRITE, \n FILE...
2008/10/23
[ "https://Stackoverflow.com/questions/231870", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30425/" ]
231,885
<p>I encountered a problem when running some old code that was handed down to me. It works 99% of the time, but once in a while, I notice it throwing a "Violation reading location" exception. I have a variable number of threads potentially executing this code throughout the lifetime of the process. The low occurrence f...
[ { "answer_id": 231895, "author": "Henk", "author_id": 4613, "author_profile": "https://Stackoverflow.com/users/4613", "pm_score": 2, "selected": false, "text": "DoStuff if (mappedChars.empty())\n empty() static mappedChars" }, { "answer_id": 231921, "author": "Tony Lee", ...
2008/10/23
[ "https://Stackoverflow.com/questions/231885", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22724/" ]
231,886
<p>This may seem like a somewhat contrived example, but I'm left scratching my head.</p> <p>Ok, I have a console app that instantiates a WindowsForm and calls a method called DoSomeWork() on the form.</p> <pre><code>class Program { static void Main(string[] args) { Form1 form = new Form1(); ...
[ { "answer_id": 231894, "author": "chakrit", "author_id": 3055, "author_profile": "https://Stackoverflow.com/users/3055", "pm_score": 2, "selected": false, "text": "throw NotImplementedException();" }, { "answer_id": 232073, "author": "Hans Passant", "author_id": 17034, ...
2008/10/23
[ "https://Stackoverflow.com/questions/231886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6419/" ]