qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
4,418
<p>The firewall I'm behind is running Microsoft ISA server in NTLM-only mode. Hash anyone have success getting their Ruby gems to install/update via Ruby SSPI gem or other method?</p> <p>... or am I just being lazy?</p> <p>Note: rubysspi-1.2.4 does not work.</p> <p>This also works for "igem", part of the IronRuby pr...
[ { "answer_id": 4420, "author": "Jarin Udom", "author_id": 574, "author_profile": "https://Stackoverflow.com/users/574", "pm_score": 3, "selected": false, "text": "PARENT_PROXY PARENT_PROXY_PORT cd aps097; python main.py gem install—http-proxy http://localhost:5865/ library" }, { ...
2008/08/07
[ "https://Stackoverflow.com/questions/4418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/307/" ]
4,430
<p>Is there available any tool for PHP which can be used to generate code for consuming a <a href="http://en.wikipedia.org/wiki/Web_service" rel="noreferrer">web service</a> based on its <a href="http://en.wikipedia.org/wiki/Web_Services_Description_Language" rel="noreferrer">WSDL</a>? Something comparable to clicking ...
[ { "answer_id": 24490, "author": "davidmytton", "author_id": 2183, "author_profile": "https://Stackoverflow.com/users/2183", "pm_score": 6, "selected": false, "text": "$client = new SoapClient(\"some.wsdl\");\n $result = $client->getTime();\n" }, { "answer_id": 32475441, "auth...
2008/08/07
[ "https://Stackoverflow.com/questions/4430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/349/" ]
4,432
<p>Typical way of creating a <a href="http://en.wikipedia.org/wiki/Comma-separated_values" rel="noreferrer">CSV</a> string (pseudocode):</p> <ol> <li>Create a CSV container object (like a StringBuilder in C#).</li> <li>Loop through the strings you want to add appending a comma after each one.</li> <li>After the loop, ...
[ { "answer_id": 4437, "author": "Chris Farmer", "author_id": 404, "author_profile": "https://Stackoverflow.com/users/404", "pm_score": 2, "selected": false, "text": "if (sb.Length > 0) sb.Append(\",\");" }, { "answer_id": 4438, "author": "Yaakov Ellis", "author_id": 51, ...
2008/08/07
[ "https://Stackoverflow.com/questions/4432", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202/" ]
4,508
<p>Using MAPI functions from within managed code is officially unsupported. Apparently, MAPI uses its own memory management and it crashes and burns within managed code (see <a href="http://blogs.msdn.com/pcreehan/archive/2007/05/04/what-does-unsupported-mean.aspx" rel="noreferrer">here</a> and <a href="http://blogs.ms...
[ { "answer_id": 4590, "author": "John", "author_id": 33, "author_profile": "https://Stackoverflow.com/users/33", "pm_score": 2, "selected": false, "text": "Process.Start(\"mailto:[email protected]?subject=TestCode&Body=Test Text\");\n" }, { "answer_id": 4408605, "author": "Roman...
2008/08/07
[ "https://Stackoverflow.com/questions/4508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/227/" ]
4,519
<p>I have the Xming X Window Server installed on a laptop running Windows XP to connect to some UNIX development servers. </p> <p>It works fine when I connect directly to the company network in the office. However, it does not work when I connect to the network remotely over a VPN.</p> <p>When I start Xming when conn...
[ { "answer_id": 4683, "author": "grom", "author_id": 486, "author_profile": "https://Stackoverflow.com/users/486", "pm_score": 1, "selected": false, "text": "$ x11vnc -display :0\n" }, { "answer_id": 27852421, "author": "Jack Kidwell", "author_id": 4435124, "author_pro...
2008/08/07
[ "https://Stackoverflow.com/questions/4519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/381/" ]
4,533
<p>How do I generate an ETag HTTP header for a resource file?</p>
[ { "answer_id": 4540, "author": "Mark Harrison", "author_id": 116, "author_profile": "https://Stackoverflow.com/users/116", "pm_score": 5, "selected": true, "text": " server client\n \n <------------- request file foo\n \n file foo etag: \"xyz\" -------->\n \n ...
2008/08/07
[ "https://Stackoverflow.com/questions/4533", "https://Stackoverflow.com", "https://Stackoverflow.com/users/192/" ]
4,544
<p>I'm trying to create a bookmarklet for posting del.icio.us bookmarks to a separate account.</p> <p>I tested it from the command line like:</p> <pre><code>wget -O - --no-check-certificate \ "https://seconduser:[email protected]/v1/posts/add?url=http://seet.dk&amp;description=test" </code></pre> <p>This w...
[ { "answer_id": 12453, "author": "travis", "author_id": 1414, "author_profile": "https://Stackoverflow.com/users/1414", "pm_score": 1, "selected": false, "text": "VERSION BUILD=6000814 RECORDER=FX\nTAB T=1\nURL GOTO=http://10.20.2.4/login\nTAG POS=1 TYPE=INPUT:TEXT FORM=NAME:introduce ATT...
2008/08/07
[ "https://Stackoverflow.com/questions/4544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/86/" ]
4,545
<p>Does anyone remember the <code>XMP</code> tag?</p> <p>What was it used for and why was it deprecated?</p>
[ { "answer_id": 4549, "author": "graham.reeds", "author_id": 342, "author_profile": "https://Stackoverflow.com/users/342", "pm_score": 6, "selected": true, "text": "XMP XMP PRE" }, { "answer_id": 5252111, "author": "mplungjan", "author_id": 295783, "author_profile": "h...
2008/08/07
[ "https://Stackoverflow.com/questions/4545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383/" ]
4,610
<p>How is it possible to make prototype methods in C#.Net?</p> <p>In JavaScript, I can do the following to create a trim method for the string object:</p> <pre><code>String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,""); } </code></pre> <p>How can I go about doing this in C#.Net?</p>
[ { "answer_id": 4614, "author": "David Wengier", "author_id": 489, "author_profile": "https://Stackoverflow.com/users/489", "pm_score": 0, "selected": false, "text": "public static string MyMethod(this string input)\n{\n // do things\n}\n \"asdfas\".MyMethod();\n" }, { "answer_...
2008/08/07
[ "https://Stackoverflow.com/questions/4610", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383/" ]
4,612
<p>Is <em>CompileAssemblyFromDom</em> faster than <em>CompileAssemblyFromSource</em>?</p> <p>It <em>should</em> be as it presumably bypasses the compiler front-end.</p>
[ { "answer_id": 29283, "author": "Jacob Krall", "author_id": 3140, "author_profile": "https://Stackoverflow.com/users/3140", "pm_score": 4, "selected": true, "text": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing Microsoft.CSharp;\nusing S...
2008/08/07
[ "https://Stackoverflow.com/questions/4612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/608/" ]
4,617
<p>We've got two developers on the same closed (ugh, stupid gov) network, Another developer a couple minutes drive down the road, and a fourth developer half-way across the country. E-Mail, ftp, and removal media are all possible methods of transfer for the people not on the same network.</p> <p>I am one of the two cl...
[ { "answer_id": 900172, "author": "Martin Geisler", "author_id": 110204, "author_profile": "https://Stackoverflow.com/users/110204", "pm_score": 2, "selected": false, "text": "hg push upstream devel devel upstream % hg outgoing ../upstream\n % hg bundle changes.hg ../upstream\n % hg incom...
2008/08/07
[ "https://Stackoverflow.com/questions/4617", "https://Stackoverflow.com", "https://Stackoverflow.com/users/287/" ]
4,622
<p>What is the <strong>complete</strong> and correct syntax for the SQL Case expression?</p>
[ { "answer_id": 4626, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 7, "selected": true, "text": "CASE case-expression\n WHEN when-expression-1 THEN value-1\n [ WHEN when-expression-n THEN value-n ... ]\n [ ELSE e...
2008/08/07
[ "https://Stackoverflow.com/questions/4622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383/" ]
4,629
<p>I can do an <code>eval("something()");</code> to execute the code dynamically in JavaScript. Is there a way for me to do the same thing in C#?</p> <p>An example of what I am trying to do is: I have an integer variable (say <code>i</code>) and I have multiple properties by the names: "Property1", "Property2", "Prope...
[ { "answer_id": 4633, "author": "David Wengier", "author_id": 489, "author_profile": "https://Stackoverflow.com/users/489", "pm_score": 2, "selected": false, "text": "object result = theObject.GetType().GetProperty(\"Property\" + i).GetValue(theObject, null);\n" }, { "answer_id": ...
2008/08/07
[ "https://Stackoverflow.com/questions/4629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/384/" ]
4,630
<p>Example: I have two shared objects (same should apply to .dlls). The first shared object is from a third-party library, we'll call it libA.so. I have wrapped some of this with JNI and created my own library, libB.so. Now libB depends on libA.</p> <p>When webstarting, both libraries are places in some webstart worki...
[ { "answer_id": 80551, "author": "Adam Mitz", "author_id": 2574, "author_profile": "https://Stackoverflow.com/users/2574", "pm_score": 1, "selected": false, "text": "<nativelib ...> \n" } ]
2008/08/07
[ "https://Stackoverflow.com/questions/4630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/287/" ]
4,638
<p>How do you create your own custom moniker (or URL Protocol) on Windows systems?</p> <p>Examples:</p> <ul> <li>http:</li> <li>mailto:</li> <li>service:</li> </ul>
[ { "answer_id": 4662, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 2, "selected": false, "text": "procedure InstallIntoRegistry;\nvar\n Reg: TRegistry;\nbegin\n Reg := TRegistry.Create;\n try\n Reg.RootKey := HK...
2008/08/07
[ "https://Stackoverflow.com/questions/4638", "https://Stackoverflow.com", "https://Stackoverflow.com/users/307/" ]
4,661
<p>I have more than one OpenID as I have tried out numerous. As people take up OpenID different suppliers are going to emerge I may want to switch provinders. As all IDs are me, and all are authenticated against the same email address, shouldn't I be able to log into stack overflow with any of them and be able to hit...
[ { "answer_id": 4777, "author": "Otto", "author_id": 519, "author_profile": "https://Stackoverflow.com/users/519", "pm_score": 6, "selected": true, "text": "<HEAD></HEAD>" }, { "answer_id": 112662, "author": "Troels Thomsen", "author_id": 20138, "author_profile": "http...
2008/08/07
[ "https://Stackoverflow.com/questions/4661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/274/" ]
4,664
<p>Should the folders in a solution match the namespace?</p> <p>In one of my teams projects, we have a class library that has many sub-folders in the project.</p> <p>Project Name and Namespace: <code>MyCompany.Project.Section</code>.</p> <p>Within this project, there are several folders that match the namespace sect...
[ { "answer_id": 55781, "author": "Jay Bazuzi", "author_id": 5314, "author_profile": "https://Stackoverflow.com/users/5314", "pm_score": 5, "selected": false, "text": "// ----- Foo.cs\npartial class Foo\n{\n // Foo implementation here\n}\n // ----- Foo.Bar.cs\npartial class Foo\n{\n ...
2008/08/07
[ "https://Stackoverflow.com/questions/4664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
4,677
<p>The singleton pattern is a design pattern that is used to restrict instantiation of a class to one object instance. Although I know how to code the singleton pattern in C++ and Java, I was wondering if anyone know how to implement it in Ruby?</p>
[ { "answer_id": 4686, "author": "cynicalman", "author_id": 410, "author_profile": "https://Stackoverflow.com/users/410", "pm_score": 3, "selected": false, "text": "class Clazz\n include Singleton\nend\n" }, { "answer_id": 5453, "author": "CodingWithoutComments", "author_i...
2008/08/07
[ "https://Stackoverflow.com/questions/4677", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25/" ]
4,689
<p>What fonts do you use for programming, and for what language/IDE? I use <a href="http://www.microsoft.com/downloads/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3&amp;displaylang=en" rel="nofollow noreferrer" title="Consolas">Consolas</a> for all my Visual Studio work, any other recommendations?</p>
[ { "answer_id": 4704, "author": "deadprogrammer", "author_id": 556, "author_profile": "https://Stackoverflow.com/users/556", "pm_score": 9, "selected": true, "text": "Illegal1 = O0" }, { "answer_id": 23050, "author": "Konrad Rudolph", "author_id": 1968, "author_profile...
2008/08/07
[ "https://Stackoverflow.com/questions/4689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/637/" ]
4,724
<p>I really feel that I should learn <a href="http://en.wikipedia.org/wiki/Lisp_(programming_language)" rel="noreferrer">Lisp</a> and there are plenty of good resources out there to help me do it.</p> <p>I'm not put off by the complicated syntax, but where in "traditional commercial programming" would I find places it...
[ { "answer_id": 8789, "author": "John with waffle", "author_id": 279, "author_profile": "https://Stackoverflow.com/users/279", "pm_score": 3, "selected": false, "text": "(defun quicksort (lis) \n (if (null lis) \n nil\n (let* ((x (car lis)) \n (r (cdr lis)) \n ...
2008/08/07
[ "https://Stackoverflow.com/questions/4724", "https://Stackoverflow.com", "https://Stackoverflow.com/users/381/" ]
4,738
<p>I'm developing a data access component that will be used in a website that contains a mix of classic ASP and ASP.NET pages, and need a good way to manage its configuration settings.</p> <p>I'd like to use a custom <code>ConfigurationSection</code>, and for the ASP.NET pages this works great. But when the component...
[ { "answer_id": 4746, "author": "Ishmaeel", "author_id": 227, "author_profile": "https://Stackoverflow.com/users/227", "pm_score": 8, "selected": true, "text": "System.Configuration.ConfigurationFileMap fileMap = new ConfigurationFileMap(strConfigPath); //Path to your config file\nSystem....
2008/08/07
[ "https://Stackoverflow.com/questions/4738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/205/" ]
4,752
<p>We've been having some issues with a SharePoint instance in a test environment. Thankfully this is not production ;) The problems started when the disk with the SQL Server databases and search index ran out of space. Following this, the search service would not run and search settings in the SSP were not accessible....
[ { "answer_id": 5475, "author": "Daniel O", "author_id": 697, "author_profile": "https://Stackoverflow.com/users/697", "pm_score": 1, "selected": false, "text": "stsadm.exe -o deletessp -title <sspname> [-deletedatabases]\n deletedatbases" }, { "answer_id": 7109, "author": "Da...
2008/08/07
[ "https://Stackoverflow.com/questions/4752", "https://Stackoverflow.com", "https://Stackoverflow.com/users/636/" ]
4,782
<p>How much database performance overhead is involved with using C# and LINQ compared to custom optimized queries loaded with mostly low-level C, both with a SQL Server 2008 backend?</p> <p>I'm specifically thinking here of a case where you have a fairly data-intensive program and will be doing a data refresh or updat...
[ { "answer_id": 5475, "author": "Daniel O", "author_id": 697, "author_profile": "https://Stackoverflow.com/users/697", "pm_score": 1, "selected": false, "text": "stsadm.exe -o deletessp -title <sspname> [-deletedatabases]\n deletedatbases" }, { "answer_id": 7109, "author": "Da...
2008/08/07
[ "https://Stackoverflow.com/questions/4782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/177/" ]
4,816
<p>How do you resolve a domain name to an IP address with .NET/C#?</p>
[ { "answer_id": 4821, "author": "lubos hasko", "author_id": 275, "author_profile": "https://Stackoverflow.com/users/275", "pm_score": 5, "selected": true, "text": "using System.Net;\n\nforeach (IPAddress address in Dns.GetHostAddresses(\"www.google.com\"))\n{\n Console.WriteLine(address...
2008/08/07
[ "https://Stackoverflow.com/questions/4816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/390/" ]
4,824
<p>Is there a C library function that will return the index of a character in a string?</p> <p>So far, all I've found are functions like strstr that will return the found char *, not it's location in the original string.</p>
[ { "answer_id": 4832, "author": "Bill", "author_id": 102, "author_profile": "https://Stackoverflow.com/users/102", "pm_score": 5, "selected": false, "text": "strstr char * source = \"test string\"; /* assume source address is */\n /* 0x10 for ...
2008/08/07
[ "https://Stackoverflow.com/questions/4824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/75/" ]
4,839
<p>My dream IDE does full code hints, explains and completes PHP, Javascript, HTML and CSS. I know it exists!</p> <p>so far, <a href="http://www.zend.com/en/products/studio/features" rel="noreferrer">Zend studio 6</a>, under the Eclipse IDE does a great job at hinting PHP, some Javascript and HTML, any way I can expan...
[ { "answer_id": 4852, "author": "Jonathan Works", "author_id": 309844, "author_profile": "https://Stackoverflow.com/users/309844", "pm_score": 0, "selected": false, "text": "function test(){\n\n}\n\nte<CTRL+SPACE>\n var test = function(){\n\n};\n\n\nte<CTRL+SPACE>\n" }, { "answer_...
2008/08/07
[ "https://Stackoverflow.com/questions/4839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/547/" ]
4,850
<p>I am new to C# and am doing some work in an existing application. I have a DirectX viewport that has components in it that I want to be able to position using arrow keys.</p> <p>Currently I am overriding ProcessCmdKey and catching arrow input and send an OnKeyPress event. This works, but I want to be able to use mo...
[ { "answer_id": 5026, "author": "Tokabi", "author_id": 315, "author_profile": "https://Stackoverflow.com/users/315", "pm_score": 5, "selected": true, "text": "protected override bool ProcessCmdKey(ref Message msg, Keys keyData)\n{\n bool shiftPressed = (keyData & Keys.Shift) != 0;\n ...
2008/08/07
[ "https://Stackoverflow.com/questions/4850", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41/" ]
4,860
<p>We have a question with regards to XML-sig and need detail about the optional elements as well as some of the canonicalization and transform stuff. We're writing a spec for a very small XML-syntax payload that will go into the metadata of media files and it needs to by cryptographically signed. Rather than re-inve...
[ { "answer_id": 5026, "author": "Tokabi", "author_id": 315, "author_profile": "https://Stackoverflow.com/users/315", "pm_score": 5, "selected": true, "text": "protected override bool ProcessCmdKey(ref Message msg, Keys keyData)\n{\n bool shiftPressed = (keyData & Keys.Shift) != 0;\n ...
2008/08/07
[ "https://Stackoverflow.com/questions/4860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/661/" ]
4,870
<p>I'm writing a Telnet client of sorts in C# and part of what I have to parse are ANSI/VT100 escape sequences, specifically, just those used for colour and formatting (detailed <a href="http://www.termsys.demon.co.uk/vtansi.htm#colors" rel="noreferrer">here</a>).</p> <p>One method I have is one to find all the codes ...
[ { "answer_id": 4915, "author": "Jonathan Works", "author_id": 309844, "author_profile": "https://Stackoverflow.com/users/309844", "pm_score": 2, "selected": false, "text": "\"(\\e\\[(\\d{1,2};)*?[mz]?)?\"\n" }, { "answer_id": 52980, "author": "Oskar", "author_id": 5472, ...
2008/08/07
[ "https://Stackoverflow.com/questions/4870", "https://Stackoverflow.com", "https://Stackoverflow.com/users/483/" ]
4,884
<p>I have a custom built ajax [div] based dynamic dropdown. </p> <p>I have an [input] box which; <code>onkeyup</code>, runs an Ajax search which returns results in <code>div</code>s and are drawn back in using <code>innerHTML</code>. These <code>div</code>s all have highlights <code>onmouseover</code> so, a typical su...
[ { "answer_id": 4897, "author": "Tom", "author_id": 20, "author_profile": "https://Stackoverflow.com/users/20", "pm_score": 1, "selected": false, "text": "keyup keydown innerHTML createTextNode() createElement() appendChild()" }, { "answer_id": 13918, "author": "Walter Rumsby"...
2008/08/07
[ "https://Stackoverflow.com/questions/4884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/547/" ]
4,911
<p>So in my simple learning website, I use the built in ASP.NET authentication system. </p> <p>I am adding now a user table to save stuff like his zip, DOB etc. My question is:</p> <ol> <li>In the new table, should the key be the user name (the string) or the user ID which is that GUID looking number they use in the ...
[ { "answer_id": 4936, "author": "Dillie-O", "author_id": 71, "author_profile": "https://Stackoverflow.com/users/71", "pm_score": 0, "selected": false, "text": "Dim guidProduct As Guid = Guid.NewGuid()\n Guid guidProduct = Guid.NewGuid();\n" }, { "answer_id": 5053, "author": "p...
2008/08/07
[ "https://Stackoverflow.com/questions/4911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/350/" ]
4,913
<p>Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button look "pressed"? Imagine this button is an on/off switch. <code>ToolStripButton</code> has the Checked property, but the regular Button does not.</p>
[ { "answer_id": 197561, "author": "Chris Hughes", "author_id": 27405, "author_profile": "https://Stackoverflow.com/users/27405", "pm_score": 0, "selected": false, "text": "ToggleButton" } ]
2008/08/07
[ "https://Stackoverflow.com/questions/4913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/626/" ]
4,922
<p>I saw this in <a href="https://stackoverflow.com/a/4384/697449">an answer to another question</a>, in reference to shortcomings of the Java spec:</p> <blockquote> <p>There are more shortcomings and this is a subtle topic. Check <a href="http://kiranthakkar.blogspot.com/2007/05/method-overloading-with-new-features-of...
[ { "answer_id": 5091, "author": "Camilo Díaz Repka", "author_id": 861, "author_profile": "https://Stackoverflow.com/users/861", "pm_score": 5, "selected": true, "text": "public static void main(java.lang.String[]);\n Code:\n 0: iconst_ 5\n 1: istore_ 1\n 2: iload_ 1\n 3: ...
2008/08/07
[ "https://Stackoverflow.com/questions/4922", "https://Stackoverflow.com", "https://Stackoverflow.com/users/670/" ]
4,923
<p>I'm using <code>ColdFusion</code> to populate a template that includes HTML unordered lists (<code>&lt;ul&gt;</code>s).</p> <p>Most of these aren't that long, but a few have ridiculously long lengths and could really stand to be in 2-3 columns.</p> <p>Is there an HTML, ColdFusion or perhaps JavaScript (I'm accepti...
[ { "answer_id": 4963, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 4, "selected": false, "text": "if list length > 150, split into 3 columns, else if > 70, split into 2 columns, else 1 clear: left clear: both .colum...
2008/08/07
[ "https://Stackoverflow.com/questions/4923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/666/" ]
4,954
<p>I have worked for 5 years mainly in java desktop applications accessing Oracle databases and I have never used regular expressions. Now I enter Stack Overflow and I see a lot of questions about them; I feel like I missed something. </p> <p>For what do you use regular expressions?</p> <p>P.S. sorry for my bad engli...
[ { "answer_id": 4959, "author": "Matt MacLean", "author_id": 22, "author_profile": "https://Stackoverflow.com/users/22", "pm_score": 0, "selected": false, "text": "*.txt .*\\.txt$" }, { "answer_id": 4962, "author": "Teifion", "author_id": 1384652, "author_profile": "ht...
2008/08/07
[ "https://Stackoverflow.com/questions/4954", "https://Stackoverflow.com", "https://Stackoverflow.com/users/518/" ]
4,973
<p>I am trying to lay out a table-like page with two columns. I want the rightmost column to dock to the right of the page, and this column should have a distinct background color. The content in the right side is almost always going to be smaller than that on the left. I would like the div on the right to always be...
[ { "answer_id": 4979, "author": "Teifion", "author_id": 1384652, "author_profile": "https://Stackoverflow.com/users/1384652", "pm_score": 2, "selected": false, "text": "body\n -> header (big blue banner)\n -> headerNav (green bar at the top)\n -> breadcrumbs (invisible at the moment)\n ->...
2008/08/07
[ "https://Stackoverflow.com/questions/4973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/404/" ]
4,994
<p>I am currently creating a master ddl for our database. Historically we have used backup/restore to version our database, and not maintained any ddl scripts. The schema is quite large.</p> <p>My current thinking:</p> <ul> <li><p>Break script into parts (possibly in separate scripts):</p> <ol> <li>table creation<...
[ { "answer_id": 5008, "author": "Stu", "author_id": 414, "author_profile": "https://Stackoverflow.com/users/414", "pm_score": 1, "selected": false, "text": "Select * From Information_Schema.Table_Constraints \n\nSelect * From Information_Schema.Referential_Constraints\n" } ]
2008/08/07
[ "https://Stackoverflow.com/questions/4994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/92/" ]
5,017
<p>I have written an AIR Application that downloads videos and documents from a server. The videos play inside of the application, but I would like the user to be able to open the documents in their native applications.</p> <p>I am looking for a way to prompt the user to Open / Save As on a local file stored in the Ap...
[ { "answer_id": 5266, "author": "Shawn", "author_id": 26, "author_profile": "https://Stackoverflow.com/users/26", "pm_score": 3, "selected": true, "text": "navigateToURL(new URLRequest(File.applicationStorageDirectory.nativePath + \"/courses/\" + fileName));\n" }, { "answer_id": 3...
2008/08/07
[ "https://Stackoverflow.com/questions/5017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26/" ]
5,071
<p>I've played with CVS a little bit and am not the most familiar with all of its capabilities, but a huge annoyance for me is trying to add new directories that contain more directories in them. Running "<code>cvs add</code>" only adds the contents of the current directory, and using "<code>cvs import</code>" didn't l...
[ { "answer_id": 5106, "author": "Mark Harrison", "author_id": 116, "author_profile": "https://Stackoverflow.com/users/116", "pm_score": 1, "selected": false, "text": "find . -type f | xargs cvs add\n" }, { "answer_id": 5262, "author": "Mark Harrison", "author_id": 116, ...
2008/08/07
[ "https://Stackoverflow.com/questions/5071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/422/" ]
5,075
<p>Char's are great because they are fixed size and thus make for a faster table. They are however limited to 255 characters. I want to hold 500 characters but a blob is variable length and that's not what I want.</p> <p>Is there some way to have a fixed length field of 500 characters in MySQL or am I going to have to...
[ { "answer_id": 44064, "author": "Jeff Cuscutis", "author_id": 2277, "author_profile": "https://Stackoverflow.com/users/2277", "pm_score": 0, "selected": false, "text": "VARCHAR(500)" } ]
2008/08/07
[ "https://Stackoverflow.com/questions/5075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384652/" ]
5,078
<p>I'd like to set up a cheap Linux box as a web server to host a variety of web technologies (PHP &amp; Java EE come to mind, but I'd like to experiment with Ruby or Python in the future as well). </p> <p>I'm fairly versed in setting up Tomcat to run on Linux for serving up Java EE applications, but I'd like to be ab...
[ { "answer_id": 5110, "author": "saint_groceon", "author_id": 59, "author_profile": "https://Stackoverflow.com/users/59", "pm_score": 1, "selected": false, "text": "su sudo" } ]
2008/08/07
[ "https://Stackoverflow.com/questions/5078", "https://Stackoverflow.com", "https://Stackoverflow.com/users/318/" ]
5,102
<p>I tried to follow a couple of googled up tutorials on setting up mod_python, but failed every time. Do you have a good, step-by step, rock-solid howto?</p> <p>My dev box is OS X, production - Centos.</p>
[ { "answer_id": 5165, "author": "Mark Harrison", "author_id": 116, "author_profile": "https://Stackoverflow.com/users/116", "pm_score": 3, "selected": false, "text": "LoadModule python_module modules/mod_python.so\n\n<Directory \"/serverbase/htdocs/myapp\">\n AddHandler mod_python .py\n ...
2008/08/07
[ "https://Stackoverflow.com/questions/5102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/556/" ]
5,118
<p>I'm working on a website that will switch to a new style on a set date. The site's built-in semantic HTML and CSS, so the change should just require a CSS reference change. I'm working with a designer who will need to be able to see how it's looking, as well as a client who will need to be able to review content upd...
[ { "answer_id": 5151, "author": "palmsey", "author_id": 521, "author_profile": "https://Stackoverflow.com/users/521", "pm_score": 2, "selected": false, "text": "if (!String.IsNullOrEmpty(Request.QueryString[\"css\"]))\n Session.Add(\"CSS\",Request.QueryString[\"css\"]);\n" }, { "...
2008/08/07
[ "https://Stackoverflow.com/questions/5118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5/" ]
5,134
<p>What is the best approach to write <strong>hooks</strong> for <strong>Subversion</strong> in <strong>Windows</strong>? As far as I know, only executable files can be used. So what is the best choice? </p> <ul> <li>Plain batch files (very limited but perhaps OK for very simple solutions)</li> <li>Dedicated compiled ...
[ { "answer_id": 1198468, "author": "Troy Hunt", "author_id": 73948, "author_profile": "https://Stackoverflow.com/users/73948", "pm_score": 4, "selected": true, "text": "public void Main(string[] args)\n{\n string repositories = args[0];\n string transaction = args[1];\n\n var processSt...
2008/08/07
[ "https://Stackoverflow.com/questions/5134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/563/" ]
5,142
<p>I created a view on a machine using the <em>substring</em> function from Firebird, and it worked. When I copied the database to a different machine, the view was broken. This is the way I used it:</p> <pre><code>SELECT SUBSTRING(field FROM 5 FOR 15) FROM table; </code></pre> <p>And this is the output on the mach...
[ { "answer_id": 5148, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 0, "selected": false, "text": "SELECT SUBSTRING(field FROM 5 FOR 15) AS x FROM table;\n" } ]
2008/08/07
[ "https://Stackoverflow.com/questions/5142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/431/" ]
5,179
<p>ASP.NET server-side controls postback to their own page. This makes cases where you want to redirect a user to an external page, but need to post to that page for some reason (for authentication, for instance) a pain.</p> <p>An <code>HttpWebRequest</code> works great if you don't want to redirect, and JavaScript i...
[ { "answer_id": 5219, "author": "saalon", "author_id": 111, "author_profile": "https://Stackoverflow.com/users/111", "pm_score": 5, "selected": true, "text": "HttpContext.Current.Response.Write() <body onload=\"\"> public static void PassthroughAuthentication()\n{\n\n System.Web.HttpCo...
2008/08/07
[ "https://Stackoverflow.com/questions/5179", "https://Stackoverflow.com", "https://Stackoverflow.com/users/111/" ]
5,194
<p>I am prototyping some C# 3 collection filters and came across this. I have a collection of products:</p> <pre><code>public class MyProduct { public string Name { get; set; } public Double Price { get; set; } public string Description { get; set; } } var MyProducts = new List&lt;MyProduct&gt; { ...
[ { "answer_id": 7741, "author": "Keith", "author_id": 905, "author_profile": "https://Stackoverflow.com/users/905", "pm_score": 2, "selected": false, "text": "IEnumerable<MyProduct> List<MyProduct> var d = \n from mp in MyProducts\n where mp.Price < 50d\n select mp;\n var d = \n ...
2008/08/07
[ "https://Stackoverflow.com/questions/5194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/439/" ]
5,222
<p>What is the Java equivalent of PHP's <code>$_POST</code>? After searching the web for an hour, I'm still nowhere closer.</p>
[ { "answer_id": 5224, "author": "Ryan Ahearn", "author_id": 75, "author_profile": "https://Stackoverflow.com/users/75", "pm_score": 7, "selected": true, "text": "HttpServletRequest getParameter(String paramName)" }, { "answer_id": 11042, "author": "ScArcher2", "author_id":...
2008/08/07
[ "https://Stackoverflow.com/questions/5222", "https://Stackoverflow.com", "https://Stackoverflow.com/users/429/" ]
5,223
<p>I have a JavaScript object. Is there a built-in or accepted best practice way to get the length of this object?</p> <pre><code>const myObject = new Object(); myObject[&quot;firstname&quot;] = &quot;Gareth&quot;; myObject[&quot;lastname&quot;] = &quot;Simpson&quot;; myObject[&quot;age&quot;] = 21; </code></pre>
[ { "answer_id": 5232, "author": "jj33", "author_id": 430, "author_profile": "https://Stackoverflow.com/users/430", "pm_score": 5, "selected": false, "text": "var element_count = 0;\nfor (e in myArray) { if (myArray.hasOwnProperty(e)) element_count++; }\n" }, { "answer_id": 6280, ...
2008/08/07
[ "https://Stackoverflow.com/questions/5223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/147/" ]
5,226
<p>I am currently in the process of creating my own blog and I have got to marking up the comments, but what is the best way to mark it up?</p> <p>The information I need to present is:</p> <ol> <li>Persons Name</li> <li>Gravatar Icon</li> <li>Comment Date</li> <li>The Comment</li> </ol> <p><em>PS: I'm only interested i...
[ { "answer_id": 5235, "author": "Rich Reuter", "author_id": 283, "author_profile": "https://Stackoverflow.com/users/283", "pm_score": 2, "selected": false, "text": ".comment {\n width: 400px;\n}\n\n.comment_img {\n float: left;\n}\n\n.comment_text,\n.comment_meta {\n margin-left: 40px;...
2008/08/07
[ "https://Stackoverflow.com/questions/5226", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383/" ]
5,260
<p>I have a situation where I want to add hours to a date and have the new date wrap around the work-day. I cobbled up a function to determine this new date, but want to make sure that I'm not forgetting anything.</p> <p>The hours to be added is called "delay". It could easily be a parameter to the function instead.</...
[ { "answer_id": 5334, "author": "Stu", "author_id": 414, "author_profile": "https://Stackoverflow.com/users/414", "pm_score": 2, "selected": false, "text": "Module Module1\n\n Public Function IsInBusinessHours(ByVal d As Date) As Boolean\n Return Not (d.Hour < 8 OrElse d.Hour > ...
2008/08/07
[ "https://Stackoverflow.com/questions/5260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/106/" ]
5,263
<p>I have a self-referential Role table that represents a tree structure </p> <pre><code>ID [INT] AUTO INCREMENT Name [VARCHAR] ParentID [INT] </code></pre> <p>I am using an ADO.NET DataTable and DataAdapter to load and save values to this table. This works if I only create children of existing rows. If I make a chil...
[ { "answer_id": 5497, "author": "lomaxx", "author_id": 493, "author_profile": "https://Stackoverflow.com/users/493", "pm_score": 0, "selected": false, "text": "newRow.SetParentRow(parentRow, RoleTable.Relations(\"RoleToRole\"))\n" } ]
2008/08/07
[ "https://Stackoverflow.com/questions/5263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/173/" ]
5,269
<p>In C#, (and feel free to answer for other languages), what order does the runtime evaluate a logic statement?</p> <p>Example:</p> <pre><code>DataTable myDt = new DataTable(); if (myDt != null &amp;&amp; myDt.Rows.Count &gt; 0) { //do some stuff with myDt } </code></pre> <p>Which statement does the runtime eva...
[ { "answer_id": 5278, "author": "csmba", "author_id": 350, "author_profile": "https://Stackoverflow.com/users/350", "pm_score": 3, "selected": false, "text": "if( x isNot Nothing AndAlso x.go()) then\n if ( x.init() And y.init()) then\n x.process(y)\nend \ny.doDance()\n" }, { "a...
2008/08/07
[ "https://Stackoverflow.com/questions/5269", "https://Stackoverflow.com", "https://Stackoverflow.com/users/357/" ]
5,323
<p>It seems like every time I try to create a pure CSS layout it takes me much longer than if I'd use a table or two. Getting three columns to be equal lengths with different amounts of data seems to require particular fancy hacks, especially when dealing with cross-browser issues.</p> <p>My Question:</p> <p>Who are ...
[ { "answer_id": 5331, "author": "Seibar", "author_id": 357, "author_profile": "https://Stackoverflow.com/users/357", "pm_score": 3, "selected": false, "text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n .someClass {\n background-col...
2008/08/07
[ "https://Stackoverflow.com/questions/5323", "https://Stackoverflow.com", "https://Stackoverflow.com/users/556/" ]
5,328
<p>So, in Java, the first line of your constructor HAS to be a call to super... be it implicitly calling super(), or explicitly calling another constructor. What I want to know is, why can't I put a try block around that?</p> <p>My specific case is that I have a mock class for a test. There is no default constructor...
[ { "answer_id": 5351, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 5, "selected": true, "text": "public ClassName(...) : base(...)\n" }, { "answer_id": 5357, "author": "Telcontar", "author_id": 518, ...
2008/08/07
[ "https://Stackoverflow.com/questions/5328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/122/" ]
5,329
<p>I'm currently evaluating the <code>MSF for CMMI</code> process template under <strong>TFS</strong> for use on my development team, and I'm having trouble understanding the need for separate bug and change request work item types.</p> <p>I understand that it is beneficial to be able to differentiate between bugs (er...
[ { "answer_id": 57878222, "author": "superarts.org", "author_id": 772295, "author_profile": "https://Stackoverflow.com/users/772295", "pm_score": 0, "selected": false, "text": "a := a + 1" } ]
2008/08/07
[ "https://Stackoverflow.com/questions/5329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/327/" ]
5,374
<p>I would have thought this would be an easy one to Google, but I've been unsucessful.</p> <p>I want to assign a variable the value out of an attribute (easy so far) then use that variable to select another node based on the value of that attribute.</p> <p>Example:</p> <pre><code>&lt;xsl:variable name="myId" select...
[ { "answer_id": 5469, "author": "palehorse", "author_id": 312, "author_profile": "https://Stackoverflow.com/users/312", "pm_score": 5, "selected": true, "text": "<xsl:variable name=\"myId\" select=\"@id\" />\n<xsl value-of select=\"//Root/Some/Other/Path/Where[@id=$myId]/@Name\" />\n" }...
2008/08/07
[ "https://Stackoverflow.com/questions/5374", "https://Stackoverflow.com", "https://Stackoverflow.com/users/312/" ]
5,415
<p>I have a binary file that I have to parse and I'm using Python. Is there a way to take 4 bytes and convert it to a single precision floating point number?</p>
[ { "answer_id": 73281, "author": "tzot", "author_id": 6899, "author_profile": "https://Stackoverflow.com/users/6899", "pm_score": 8, "selected": true, "text": ">>> import struct\n>>> struct.pack('f', 3.141592654)\nb'\\xdb\\x0fI@'\n>>> struct.unpack('f', b'\\xdb\\x0fI@')\n(3.14159274101257...
2008/08/07
[ "https://Stackoverflow.com/questions/5415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/680/" ]
5,419
<p>When I try to print a Unicode string in a Windows console, I get an error .</p> <p><code>UnicodeEncodeError: 'charmap' codec can't encode character ....</code></p> <p>I assume this is because the Windows console does not accept Unicode-only characters. What's the best way around this? Is there any way I can make Pyt...
[ { "answer_id": 5430, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 6, "selected": true, "text": "$ python -c 'import sys, codecs, locale; print sys.stdout.encoding; \\\n sys.stdout = codecs.getwriter(locale.getpref...
2008/08/07
[ "https://Stackoverflow.com/questions/5419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/207/" ]
5,425
<p>I have a page that is generated which inserts an HTML comment near the top of the page. Inside the comment is a *nix-style command.</p> <pre><code>&lt;!-- command --option value --option2 value2 --option3 --&gt; </code></pre> <p>This comment breaks the page completely. What is wrong with the comment to cause thi...
[ { "answer_id": 5596, "author": "Lance Fisher", "author_id": 571, "author_profile": "https://Stackoverflow.com/users/571", "pm_score": 2, "selected": false, "text": "<div style=\"display:none\">command --option value --option2 value2 --option3 </div>\n <div class=\"comment\">command --opt...
2008/08/07
[ "https://Stackoverflow.com/questions/5425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/219/" ]
5,428
<p>Is it worth learning the convention or is it a bane to readability and maintainability?</p>
[ { "answer_id": 5439, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 7, "selected": true, "text": "int vBox = aBottom * lVerticalSide;\n int aBottom = lSide1;\n int iLength;\nint iVolume;\nint iArea;\n" }, { "an...
2008/08/07
[ "https://Stackoverflow.com/questions/5428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/659/" ]
5,459
<p>This is how I wanted to do it which would work in PHP 5.3.0+</p> <pre><code>&lt;?php class MyClass { const CONSTANT = 'Const var'; } $classname = 'MyClass'; echo $classname::CONSTANT; // As of PHP 5.3.0 ?&gt; </code></pre> <p>But I'm restricted to using PHP 5.2.6. Can anyone th...
[ { "answer_id": 5472, "author": "Juan", "author_id": 550, "author_profile": "https://Stackoverflow.com/users/550", "pm_score": -1, "selected": false, "text": "<?php\nclass MyClass\n{\n const CONSTANT = 'Const var';\n}\n\n$classname = 'MyClass';\necho eval( 'return '.$classname.'::C...
2008/08/07
[ "https://Stackoverflow.com/questions/5459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/117/" ]
5,473
<p>Is it possible to undo the changes caused by the following command? If so, how?</p> <pre><code>git reset --hard HEAD~1 </code></pre>
[ { "answer_id": 6636, "author": "Pat Notz", "author_id": 825, "author_profile": "https://Stackoverflow.com/users/825", "pm_score": 9, "selected": false, "text": "git reflog git reset --hard <sha1 of desired commit>\n" }, { "answer_id": 21778, "author": "Brian Riehman", "au...
2008/08/07
[ "https://Stackoverflow.com/questions/5473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/85/" ]
5,482
<p>The ASP.NET AJAX <strong>ModalPopupExtender</strong> has <code>OnCancelScript</code> and <code>OnOkScript</code> properties, but it doesn't seem to have an <code>OnShowScript</code> property. I'd like to specify a javascript function to run each time the popup is shown.</p> <p>In past situations, I set the <code>T...
[ { "answer_id": 5500, "author": "lomaxx", "author_id": 493, "author_profile": "https://Stackoverflow.com/users/493", "pm_score": 6, "selected": true, "text": "function pageLoad()\n{\n var popup = $find('ModalPopupClientID');\n popup.add_shown(SetFocus);\n}\n\nfunction SetFocus()\n{\...
2008/08/07
[ "https://Stackoverflow.com/questions/5482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/698/" ]
5,494
<p>I'm using IIS in Windows 2003 Server for a SharePoint intranet. <br />External incoming requests will be using the host header <code>portal.mycompany.com</code> and be forced to use SSL.</p> <p>I was wondering if there's a way to set up an alternate host header such as <br /><code>http://internalportal/</code> <br ...
[ { "answer_id": 5585, "author": "Kev", "author_id": 419, "author_profile": "https://Stackoverflow.com/users/419", "pm_score": 1, "selected": false, "text": "172.16.3.1:443:portal.mycompany.com\n172.16.3.2:80:internalportal\n" } ]
2008/08/07
[ "https://Stackoverflow.com/questions/5494", "https://Stackoverflow.com", "https://Stackoverflow.com/users/697/" ]
5,507
<p>Does it make sense, having all of the C#-managed-bliss, to go back to Petzold's Programming Windows and try to produce code w/ pure WinAPI?</p> <p>What can be learn from it? Isn't it just too outdated to be useful?</p>
[ { "answer_id": 104394, "author": "paercebal", "author_id": 14089, "author_profile": "https://Stackoverflow.com/users/14089", "pm_score": 5, "selected": false, "text": "fopen CreateFile CreateWindow void * delete this ; const" } ]
2008/08/08
[ "https://Stackoverflow.com/questions/5507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/861/" ]
5,509
<p>So my company uses a delightfully buggy program called Rational Purify (as a plugin to Microsoft Visual Developer Studio) to manage memory leaks. The program is deigned to let you click on a memory leak after you have encountered it, and then jump to the line that the leak occurs on.</p> <p>Unfortunately Purify is...
[ { "answer_id": 714325, "author": "RichieHindle", "author_id": 21886, "author_profile": "https://Stackoverflow.com/users/21886", "pm_score": 2, "selected": false, "text": ".sln" } ]
2008/08/08
[ "https://Stackoverflow.com/questions/5509", "https://Stackoverflow.com", "https://Stackoverflow.com/users/159/" ]
5,511
<p>How are you handling the entry of numeric values in WPF applications?</p> <p>Without a NumericUpDown control, I've been using a TextBox and handling its PreviewKeyDown event with the code below, but it's pretty ugly.</p> <p>Has anyone found a more graceful way to get numeric data from the user without relying on a...
[ { "answer_id": 7794, "author": "Arcturus", "author_id": 900, "author_profile": "https://Stackoverflow.com/users/900", "pm_score": 7, "selected": true, "text": "protected override void OnPreviewTextInput(System.Windows.Input.TextCompositionEventArgs e)\n{\n e.Handled = !AreAllValidNume...
2008/08/08
[ "https://Stackoverflow.com/questions/5511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/615/" ]
5,611
<p>I know that just using <code>rand()</code> is predictable, if you know what you're doing, and have access to the server.</p> <p>I have a project that is <strong>highly</strong> dependent upon choosing a random number that is as unpredictable as possible. So I'm looking for suggestions, either other built-in functio...
[ { "answer_id": 18867906, "author": "Aaron Gong", "author_id": 2215486, "author_profile": "https://Stackoverflow.com/users/2215486", "pm_score": 2, "selected": false, "text": "openssl_random_pseudo_bytes(...)\n" }, { "answer_id": 31444887, "author": "Salvador Dali", "autho...
2008/08/08
[ "https://Stackoverflow.com/questions/5611", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115/" ]
5,628
<p>I want some links to include a fragment identifier. Like some of the URLs on this site:</p> <p><a href="https://stackoverflow.com/questions/5619/ie6-ssl-ajax-post-form-404-error">Debugging: IE6 + SSL + AJAX + post form = 404 error</a><strong>#5626</strong></p> <p>Is there a way to do this with any of the built-in ...
[ { "answer_id": 7151, "author": "Dominic Cooney", "author_id": 878, "author_profile": "https://Stackoverflow.com/users/878", "pm_score": 1, "selected": false, "text": "routes.MapRoute(\"WithTarget\", \"{controller}/{action}/{id}#{target}\");\n...\n<%= Html.ActionLink(\"Home\", \"Index\", ...
2008/08/08
[ "https://Stackoverflow.com/questions/5628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/653/" ]
5,629
<p></p> <p>It is supposed to be backwards compatible with HTML4 and XHTML. <a href="http://ejohn.org/blog/html5-doctype/" rel="nofollow noreferrer">John Resig posted about some of the benefits</a>.</p> <p>As long as we don't use any of the new and not supported yet features, would there be any downside to start build...
[ { "answer_id": 7030883, "author": "Faraz Kelhini", "author_id": 530659, "author_profile": "https://Stackoverflow.com/users/530659", "pm_score": 0, "selected": false, "text": "http://hsivonen.iki.fi/doctype/" } ]
2008/08/08
[ "https://Stackoverflow.com/questions/5629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/653/" ]
5,649
<p>Does anyone know of any good tools (I'm looking for IDEs) to write assembly on the Mac. Xcode is a little cumbersome to me.</p> <p>Also, on the Intel Macs, can I use generic x86 asm? Or is there a modified instruction set? Any information about post Intel.</p> <p>Also: I know that on windows, asm can run in an em...
[ { "answer_id": 357113, "author": "David DeHaven", "author_id": 45095, "author_profile": "https://Stackoverflow.com/users/45095", "pm_score": 5, "selected": false, "text": "__dyld_misaligned_stack_error ; File: hello.asm\n; Build: nasm -f macho hello.asm && gcc -o hello hello.o\n\nSECTION...
2008/08/08
[ "https://Stackoverflow.com/questions/5649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/703/" ]
5,667
<p>What's the best way to do the semantic equivalent of the traditional sleep() system call from within an Informix SPL routine? In other words, simply "pause" for N seconds (or milliseconds or whatever, but seconds are fine). I'm looking for a solution that does <em>not</em> involve linking some new (perhaps written...
[ { "answer_id": 80353, "author": "RET", "author_id": 14750, "author_profile": "https://Stackoverflow.com/users/14750", "pm_score": 3, "selected": true, "text": "SYSTEM \"sleep 5\"" }, { "answer_id": 51524006, "author": "robsosno", "author_id": 229860, "author_profile":...
2008/08/08
[ "https://Stackoverflow.com/questions/5667", "https://Stackoverflow.com", "https://Stackoverflow.com/users/164/" ]
5,682
<p>I'm not sure if it's my system, although I haven't done anything unusual with it, but I've started noticing incorrectly rendered characters popping up in web pages, text-files, <a href="http://ejohn.org/blog/html5-doctype/" rel="nofollow noreferrer">like this</a>:</p> <p><a href="http://www.kbssource.com/strange-ch...
[ { "answer_id": 5720, "author": "Mark Harrison", "author_id": 116, "author_profile": "https://Stackoverflow.com/users/116", "pm_score": 0, "selected": false, "text": "____\n#include <stdio.h>\n" } ]
2008/08/08
[ "https://Stackoverflow.com/questions/5682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/117/" ]
5,694
<p>I got this error today when trying to open a Visual Studio 2008 <strong>project</strong> in Visual Studio 2005:</p> <blockquote> <p>The imported project "C:\Microsoft.CSharp.targets" was not found.</p> </blockquote>
[ { "answer_id": 5695, "author": "lomaxx", "author_id": 493, "author_profile": "https://Stackoverflow.com/users/493", "pm_score": 8, "selected": true, "text": "<Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targe...
2008/08/08
[ "https://Stackoverflow.com/questions/5694", "https://Stackoverflow.com", "https://Stackoverflow.com/users/493/" ]
5,724
<p>Is there a better windows command line shell other than <code>cmd</code> which has better copy paste between Windows' windows and console windows?</p>
[ { "answer_id": 9288730, "author": "Zombo", "author_id": 1002260, "author_profile": "https://Stackoverflow.com/users/1002260", "pm_score": 0, "selected": false, "text": "~/.profile" }, { "answer_id": 12438973, "author": "Erik Kaplun", "author_id": 247623, "author_profi...
2008/08/08
[ "https://Stackoverflow.com/questions/5724", "https://Stackoverflow.com", "https://Stackoverflow.com/users/108465/" ]
5,727
<p>Why are pointers such a leading factor of confusion for many new, and even old, college level students in C or C++? Are there any tools or thought processes that helped you understand how pointers work at the variable, function, and beyond level?</p> <p>What are some good practice things that can be done to bring ...
[ { "answer_id": 5728, "author": "Josh", "author_id": 257, "author_profile": "https://Stackoverflow.com/users/257", "pm_score": 5, "selected": false, "text": "struct {\nchar a;\nchar b;\nchar c;\nchar d;\n} mystruct;\nmystruct.a = 'r';\nmystruct.b = 's';\nmystruct.c = 't';\nmystruct.d = 'u...
2008/08/08
[ "https://Stackoverflow.com/questions/5727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/568/" ]
5,759
<p>I just moved over to the Visual Basic team here at work.</p> <p>What is the equivalent keyword to <code>break</code> in Visual Basic, that is, to exit a loop early but not the method?</p>
[ { "answer_id": 5761, "author": "John", "author_id": 33, "author_profile": "https://Stackoverflow.com/users/33", "pm_score": 9, "selected": true, "text": "Exit For Wend Exit Do" }, { "answer_id": 5782, "author": "Eric Haskins", "author_id": 100, "author_profile": "http...
2008/08/08
[ "https://Stackoverflow.com/questions/5759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/713/" ]
5,787
<p>I'm just in the process of parsing some text and can't remember what the escape character is for a tab in C#?</p>
[ { "answer_id": 35949455, "author": "andrew.fox", "author_id": 257470, "author_profile": "https://Stackoverflow.com/users/257470", "pm_score": 3, "selected": false, "text": "string Environment.Newline" } ]
2008/08/08
[ "https://Stackoverflow.com/questions/5787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383/" ]
5,791
<p>Does anyone here use VB.NET and have a strong preference for or against using <code>IsNothing</code> as opposed to <code>Is Nothing</code> (for example, <code>If IsNothing(anObject)</code> or <code>If anObject Is Nothing...</code>)? If so, why?</p> <p>EDIT: If you think they're both equally acceptable, do you thin...
[ { "answer_id": 5889, "author": "proudgeekdad", "author_id": 702, "author_profile": "https://Stackoverflow.com/users/702", "pm_score": 5, "selected": false, "text": "If printDialog IsNot Nothing Then\n 'blah\nEnd If\n If Not obj Is Nothing Then\n 'blah\nEnd If\n" }, { "answe...
2008/08/08
[ "https://Stackoverflow.com/questions/5791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/133/" ]
5,802
<p>Is there any way to use inheritance in database (Specifically in SQL Server 2005)?</p> <p>Suppose I have few field like <strong>CreatedOn</strong>, <strong>CreatedBy</strong> which I want to add on all of my entities. I looking for an alternative way instead of adding these fields to every table.</p>
[ { "answer_id": 5807, "author": "Neall", "author_id": 619, "author_profile": "https://Stackoverflow.com/users/619", "pm_score": 2, "selected": false, "text": "INHERITS FROM (tablename[, othertable...])\n" }, { "answer_id": 69658, "author": "decibel", "author_id": 11116, ...
2008/08/08
[ "https://Stackoverflow.com/questions/5802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191/" ]
5,821
<p>How do I escape the underscore character?</p> <p>I am writing something like the following where clause and want to be able to find actual entries with _d at the end.</p> <pre><code>Where Username Like '%_d' </code></pre>
[ { "answer_id": 5822, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 10, "selected": true, "text": "... LIKE '%[_]d'\n" }, { "answer_id": 10415670, "author": "Gerardo Lima", "author_id": 394042, "aut...
2008/08/08
[ "https://Stackoverflow.com/questions/5821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383/" ]
5,831
<p>Does anyone have, or know of, a binary patch generation algorithm implementation in C#?</p> <p>Basically, compare two files (designated <em>old</em> and <em>new</em>), and produce a patch file that can be used to upgrade the <em>old</em> file to have the same contents as the <em>new</em> file.</p> <p>The implement...
[ { "answer_id": 4558990, "author": "Bradley Grainger", "author_id": 23633, "author_profile": "https://Stackoverflow.com/users/23633", "pm_score": 2, "selected": false, "text": "max(17*n,9*n+m)+O(1) O((n+m) log n) n m" } ]
2008/08/08
[ "https://Stackoverflow.com/questions/5831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267/" ]
5,846
<p>How do I turn the following 2 queries into 1 query</p> <pre><code>$sql = "SELECT level FROM skills WHERE id = $id LIMIT 1;"; $result = $db-&gt;sql_query($sql); $level = (int) $db-&gt;sql_fetchfield('level'); $db-&gt;sql_freeresult($result); ++$level; $sql = "UPDATE skills SET level = $level WHERE id = $id;...
[ { "answer_id": 5848, "author": "Josh", "author_id": 257, "author_profile": "https://Stackoverflow.com/users/257", "pm_score": 6, "selected": true, "text": "$sql = \"UPDATE skills SET level = level+1 WHERE id = $id\";\n$result = $db->sql_query($sql);\n$db->sql_freeresult($result);\n $sql ...
2008/08/08
[ "https://Stackoverflow.com/questions/5846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384652/" ]
5,857
<p>I have a page upon which a user can choose up to many different paragraphs. When the link is clicked (or button), an email will open up and put all those paragraphs into the body of the email, address it, and fill in the subject. However, the text can be too long for a mailto link.</p> <p>Any way around this?</p>...
[ { "answer_id": 5860, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 5, "selected": true, "text": "<form action=\"mailto:[email protected]\">\n <input type=\"hidden\" name=\"Subject\" value=\"Email subject\">\n ...
2008/08/08
[ "https://Stackoverflow.com/questions/5857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/730/" ]
5,863
<p>I'm just getting into creating some WCF services, but I have a requirement to make them backward compatible for legacy (.NET 1.1 and 2.0) client applications. </p> <p>I've managed to get the services to run correctly for 3.0 and greater clients, but when I publish the services using a basicHttpBinding endpoint (wh...
[ { "answer_id": 3810639, "author": "Christian Hayter", "author_id": 115413, "author_profile": "https://Stackoverflow.com/users/115413", "pm_score": 0, "selected": false, "text": "[ServiceContract(Namespace=\"CentreServiceNamespace\")]\n[XmlSerializerFormat(Style=OperationFormatStyle.Docum...
2008/08/08
[ "https://Stackoverflow.com/questions/5863", "https://Stackoverflow.com", "https://Stackoverflow.com/users/377/" ]
5,872
<p>If you are working in PHP (or I guess any programming language) and using subversion as your source control, is there a way to take your project (for example):</p> <blockquote> <p>C:\Projects\test\.svn<br> C:\Projects\test\docs\<br> C:\Projects\test\faq.php<br> C:\Projects\test\guestbook.php<br> C:\Projec...
[ { "answer_id": 5887, "author": "Grant", "author_id": 30, "author_profile": "https://Stackoverflow.com/users/30", "pm_score": 4, "selected": true, "text": "TortoiseSVN > Export .svn" }, { "answer_id": 6199, "author": "cmcculloh", "author_id": 58, "author_profile": "htt...
2008/08/08
[ "https://Stackoverflow.com/questions/5872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/58/" ]
5,876
<p>I use <a href="http://www.thekelleys.org.uk/dnsmasq/doc.html" rel="nofollow noreferrer">dnsmasq</a> to resolve DNS queries on my home network. Unfortunately, if a domain name is not known, it will append my own domain name to the request which means that I always end up viewing my own site in a browser.</p> <p>For ...
[ { "answer_id": 5980, "author": "jj33", "author_id": 430, "author_profile": "https://Stackoverflow.com/users/430", "pm_score": 2, "selected": false, "text": "host dlksfhoiahdsfiuhsdf.com.\n" }, { "answer_id": 342481, "author": "benc", "author_id": 2910, "author_profile...
2008/08/08
[ "https://Stackoverflow.com/questions/5876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/726/" ]
5,892
<p>I've opened an old workspace that is a libray and its test harness. It used to work fine but now doesn't and older versions of the code don't work either with the same errors. I've tried recreating the project and that causes the same errors too. Nothing seems out of order in project settings and the code generated ...
[ { "answer_id": 5903, "author": "Curt Hagenlocher", "author_id": 533, "author_profile": "https://Stackoverflow.com/users/533", "pm_score": 4, "selected": true, "text": "GetMessage GetMessageA GetMessageW GetMessage GetMessage GetMessage GetMessageA GetMessage GetMessageW Comms::Exception"...
2008/08/08
[ "https://Stackoverflow.com/questions/5892", "https://Stackoverflow.com", "https://Stackoverflow.com/users/342/" ]
5,908
<p>I need to get a log of user access to our <code>SQL Server</code> so I can track <strong>average</strong> and <strong>peak concurrency usage</strong>. Is there a hidden table or something I'm missing that has this information for me? To my knowledge the application I'm looking at does not track this at the applicati...
[ { "answer_id": 5917, "author": "SQLMenace", "author_id": 740, "author_profile": "https://Stackoverflow.com/users/740", "pm_score": 3, "selected": false, "text": "2000 sp_who2 dbo.sysprocesses 2005 sys.dm_exec_sessions SELECT COUNT(*) AS StatusCount,CASE status \nWHEN 'Running' THEN 'Runn...
2008/08/08
[ "https://Stackoverflow.com/questions/5908", "https://Stackoverflow.com", "https://Stackoverflow.com/users/71/" ]
5,909
<p>I'm downloading an entire directory from a web server. It works OK, but I can't figure how to get the file size before download to compare if it was updated on the server or not. Can this be done as if I was downloading the file from a FTP server?</p> <pre><code>import urllib import re url = "http://www.someurl.co...
[ { "answer_id": 5927, "author": "Jonathan Works", "author_id": 309844, "author_profile": "https://Stackoverflow.com/users/309844", "pm_score": 3, "selected": false, "text": ">>> site = urllib.urlopen(\"http://python.org\")\n>>> meta = site.info()\n>>> print meta.getheaders(\"Content-Lengt...
2008/08/08
[ "https://Stackoverflow.com/questions/5909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/394/" ]
5,913
<p>This gets the value of whatever is selected in my dropdown menu.</p> <pre><code>document.getElementById('newSkill').value </code></pre> <p>I cannot however find out what property to go after for the text that's currently displayed by the drop down menu. I tried "text" then looked at <a href="http://w3schools.com/"...
[ { "answer_id": 5921, "author": "Brian Childress", "author_id": 721, "author_profile": "https://Stackoverflow.com/users/721", "pm_score": 1, "selected": false, "text": "document.getElementById(\"newSkill\").innerHTML\n" }, { "answer_id": 5924, "author": "Thejesh GN", "auth...
2008/08/08
[ "https://Stackoverflow.com/questions/5913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384652/" ]
5,916
<p>For those of you in the Visual Studio environment, how do you feel about wrapping any of your code in #regions? (or if any other IDE has something similar...)</p>
[ { "answer_id": 7767, "author": "Lars Mæhlum", "author_id": 960, "author_profile": "https://Stackoverflow.com/users/960", "pm_score": 6, "selected": true, "text": "foreach (var item in Items)\n{\n //.. 100 lines of validation and data logic..\n}\n foreach (var item in Items)\n{\n if...
2008/08/08
[ "https://Stackoverflow.com/questions/5916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/396/" ]
5,948
<p>In my web application I have a file which hold the current revision number via $Rev$. This work fine except, if I don't make any changes to that file, it doesn't get committed.</p> <p><strong>Is there anyway I can force a single file to always get committed to the SVN server?</strong></p> <p><em>I'm using Tortoise...
[ { "answer_id": 5978, "author": "yukondude", "author_id": 726, "author_profile": "https://Stackoverflow.com/users/726", "pm_score": 1, "selected": false, "text": "svn commit" }, { "answer_id": 581625, "author": "dbr", "author_id": 745, "author_profile": "https://Stacko...
2008/08/08
[ "https://Stackoverflow.com/questions/5948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383/" ]
5,949
<p>I've always preferred to use long integers as primary keys in databases, for simplicity and (assumed) speed. But when using a <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" rel="noreferrer">REST</a> or Rails-like URL scheme for object instances, I'd then end up with URLs like this:</p> <pre>...
[ { "answer_id": 5967, "author": "SQLMenace", "author_id": 740, "author_profile": "https://Stackoverflow.com/users/740", "pm_score": 5, "selected": false, "text": "457180FB-C2EA-48DF-8BEF-458573DA1C10 1\n9A70FF3C-B7DA-4593-93AE-4A8945943C8A 2\n" }, { "answer_id": 6227, "a...
2008/08/08
[ "https://Stackoverflow.com/questions/5949", "https://Stackoverflow.com", "https://Stackoverflow.com/users/726/" ]
5,966
<p>Basically, I've written an API to www.thetvdb.com in Python. The current code can be found <a href="http://github.com/dbr/tvdb_api/tree/master/tvdb_api.py" rel="noreferrer">here</a>.</p> <p>It grabs data from the API as requested, and has to store the data somehow, and make it available by doing:</p> <pre><code>pr...
[ { "answer_id": 6125, "author": "Jonathan Works", "author_id": 309844, "author_profile": "https://Stackoverflow.com/users/309844", "pm_score": 2, "selected": false, "text": "episodes = []\nepisodes.append({'season':1, 'episode': 2, 'name':'Something'})\nepisodes.append({'season':1, 'episo...
2008/08/08
[ "https://Stackoverflow.com/questions/5966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/745/" ]
5,982
<p>Does anyone know why when using BindingUtils on the selectedItem property of a ComboBox you get the following warning? Any ideas how to resolve the issue?</p> <p>The binding still works properly, but it would be nice to get rid of the warning.</p> <pre><code>warning: multiple describeType entries for 'selectedItem...
[ { "answer_id": 14237, "author": "Matt MacLean", "author_id": 22, "author_profile": "https://Stackoverflow.com/users/22", "pm_score": 0, "selected": false, "text": "public static function bindProperty2(site:Object, prop:String, host:Object, chain:Object, commitOnly:Boolean = false):Change...
2008/08/08
[ "https://Stackoverflow.com/questions/5982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22/" ]
6,007
<p>How do I make <a href="http://logging.apache.org/log4net/index.html" rel="noreferrer">Log4net</a> only log Info level logs? Is that even possible? Can you only set a threshold? </p> <p>This is what I have, and it logs Info and above as I would expect. Is there anything i can do to make it only log info?</p> <pre c...
[ { "answer_id": 10383, "author": "Brandon Wood", "author_id": 423, "author_profile": "https://Stackoverflow.com/users/423", "pm_score": 8, "selected": true, "text": "<appender name=\"AdoNetAppender\" type=\"log4net.Appender.AdoNetAppender\">\n <filter type=\"log4net.Filter.LevelRangeFi...
2008/08/08
[ "https://Stackoverflow.com/questions/6007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/230/" ]
6,009
<p>Let's say you have a typical web app and with a file configuration.whatever. Every developer working on the project will have one version for their dev boxes, there will be a dev, prod and stage versions. How do you deal with this in source control? Not check in this file at all, check it with different names or do ...
[ { "answer_id": 6012, "author": "GateKiller", "author_id": 383, "author_profile": "https://Stackoverflow.com/users/383", "pm_score": 3, "selected": false, "text": "web.config.rename\n" }, { "answer_id": 36767, "author": "Damien Diederen", "author_id": 3844, "author_pro...
2008/08/08
[ "https://Stackoverflow.com/questions/6009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/556/" ]
6,076
<p>I am building a server control that will search our db and return results. The server control is contains an ASP:Panel. I have set the default button on the panel equal to my button id and have set the form default button equal to my button id.</p> <p>On the Panel:</p> <pre><code> MyPanel.DefaultButton = SearchBut...
[ { "answer_id": 6097, "author": "Bryan Roth", "author_id": 299, "author_profile": "https://Stackoverflow.com/users/299", "pm_score": 0, "selected": false, "text": "Me.Page.Form.DefaultButton = SearchButton.ID\n Me.Page.Form.DefaultButton = SearchButton.UniqueID\n" }, { "answer_id"...
2008/08/08
[ "https://Stackoverflow.com/questions/6076", "https://Stackoverflow.com", "https://Stackoverflow.com/users/225/" ]