qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
42,187
<p>I have read about partial methods in the latest <a href="http://msdn.microsoft.com/en-us/vcsharp/aa336809.aspx" rel="noreferrer">C# language specification</a>, so I understand the principles, but I'm wondering how people are actually using them. Is there a particular design pattern that benefits from partial method...
[ { "answer_id": 43557, "author": "Keith", "author_id": 905, "author_profile": "https://Stackoverflow.com/users/905", "pm_score": 6, "selected": true, "text": "#region [System.Data.Linq.Mapping.DatabaseAttribute(Name=\"MyDB\")]\npublic partial class MyDataContext : System.Data.Linq.DataCon...
2008/09/03
[ "https://Stackoverflow.com/questions/42187", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1219/" ]
42,203
<p>I'm looking to use SQL to format a number with commas in the thousands, but no decimal (so can't use Money) - any suggestions?</p> <p>I'm using SQL Server 2005, but feel free to answer for others as well (like MySQL)</p>
[ { "answer_id": 42209, "author": "ceejayoz", "author_id": 1902010, "author_profile": "https://Stackoverflow.com/users/1902010", "pm_score": 2, "selected": false, "text": "FORMAT()" }, { "answer_id": 42224, "author": "Scott Nichols", "author_id": 4299, "author_profile":...
2008/09/03
[ "https://Stackoverflow.com/questions/42203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/357/" ]
42,215
<p>We get the following error;</p> <pre><code>The request was aborted: Could not create SSL/TLS secure channel </code></pre> <p>while using a <code>WebRequest</code> object to make an <code>HTTPS</code> request. The funny thing is that this only happens after a while, and is temporarily fixed when the application is ...
[ { "answer_id": 32132106, "author": "Vyacheslav Kinzerskiy", "author_id": 5250067, "author_profile": "https://Stackoverflow.com/users/5250067", "pm_score": 1, "selected": false, "text": "System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;\n" } ]
2008/09/03
[ "https://Stackoverflow.com/questions/42215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1659/" ]
42,239
<p>We're doing an "Amazing Race" kind of event, and thought it would be cool to have CDs that could only play once... like a "this message will self destruct in 5 seconds..." </p> <p>Any thoughts on how to do this? I was thinking it could be a compiled HTML website that would write a cookie and only play once. I don...
[ { "answer_id": 42417, "author": "Domenic", "author_id": 3191, "author_profile": "https://Stackoverflow.com/users/3191", "pm_score": 2, "selected": false, "text": "Math.floor(PI * E + 32/(new DateTime()).getYear())" } ]
2008/09/03
[ "https://Stackoverflow.com/questions/42239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1753/" ]
42,246
<p>I have somewhat interesting development situation. The client and deployment server are inside a firewall without access to the Subversion server. But the developers are outside the firewall and are able to use the Subversion server. Right now the solution I have worked out is to update my local copy of the code and...
[ { "answer_id": 42503, "author": "Dylan Bennett", "author_id": 551, "author_profile": "https://Stackoverflow.com/users/551", "pm_score": 1, "selected": false, "text": "/\n|+-DIR1\n| |- FILEa\n| |- FILEb\n|+-DIR2\n| |- FILEc\n| |- FILEd\n|- FILEe\n|- FILEf\n FILEa FILEc FILEf /\n|+...
2008/09/03
[ "https://Stackoverflow.com/questions/42246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3442/" ]
42,247
<p>The following code illustrates an object literal being assigned, but with no semicolon afterwards:</p> <pre><code>var literal = { say: function(msg) { alert(msg); } } literal.say("hello world!"); </code></pre> <p>This appears to be legal, and doesn't issue a warning (at least in Firefox&nbsp;3). Is this comple...
[ { "answer_id": 42259, "author": "Kamiel Wanrooij", "author_id": 4174, "author_profile": "https://Stackoverflow.com/users/4174", "pm_score": -1, "selected": false, "text": "var foo = \"bar\";\n" }, { "answer_id": 42269, "author": "Travis", "author_id": 4284, "author_pr...
2008/09/03
[ "https://Stackoverflow.com/questions/42247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/122/" ]
42,251
<p>Has anyone worked much with Microsoft's Managed Extensibility Framework (MEF)? Kinda sounds like it's trying to be all things to all people - It's an add-in manager! It's duck typing! I'm wondering if anyone has an experience with it, positive or negative.</p> <p>We're currently planning on using an generic IoC imp...
[ { "answer_id": 57884, "author": "Andy S", "author_id": 3759, "author_profile": "https://Stackoverflow.com/users/3759", "pm_score": 3, "selected": false, "text": "private IGreetings greetings = CompositionServices.Empty<IGreetings>();\n using System;\nusing System.ComponentModel.Compositi...
2008/09/03
[ "https://Stackoverflow.com/questions/42251", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3759/" ]
42,254
<p>I would like to flash a success message on my page.</p> <p>I am using the jQuery <code>fadeOut</code> method to fade and then remove the element. I can increase the duration to make it last longer, however this looks strange.</p> <p>What I would like to happen is have the element be displayed for five seconds, the...
[ { "answer_id": 42255, "author": "John Millikin", "author_id": 3560, "author_profile": "https://Stackoverflow.com/users/3560", "pm_score": 4, "selected": false, "text": "setTimeout(function(){$elem.hide();}, 5000); $elem 5000 setTimeout()" }, { "answer_id": 42261, "author": "R...
2008/09/03
[ "https://Stackoverflow.com/questions/42254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3645/" ]
42,281
<p>It seems that IE6 ignores any form of cache invalidation sent via http headers, I've tried setting Pragma to No Cache and setting Cache Expiration to the current time, yet in IE6, hitting back will always pull up a cached version of a page I am working on.</p> <p>Is there a specific HTTP Header that IE6 does listen...
[ { "answer_id": 43271, "author": "Hafthor", "author_id": 4489, "author_profile": "https://Stackoverflow.com/users/4489", "pm_score": 4, "selected": true, "text": "Cache-Control: private, max-age=0 Response.Expires=-1" }, { "answer_id": 203450, "author": "thesmart", "author...
2008/09/03
[ "https://Stackoverflow.com/questions/42281", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
42,286
<p>It seems like there should be something shorter than this:</p> <pre><code>private string LoadFromFile(string path) { try { string fileContents; using(StreamReader rdr = File.OpenText(path)) { fileContents = rdr.ReadToEnd(); } return fileContents; } catch ...
[ { "answer_id": 42292, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 3, "selected": false, "text": "string text = File.ReadAllText(\"c:\\file1.txt\");\nFile.WriteAllText(\"c:\\file2.txt\", text);\n" }, { "answ...
2008/09/03
[ "https://Stackoverflow.com/questions/42286", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3475/" ]
42,294
<p>I have a simple 2-column layout with a footer that clears both the right and left div in my markup. My problem is that I can't get the footer to stay at the bottom of the page in all browsers. It works if the content pushes the footer down, but that's not always the case. </p>
[ { "answer_id": 42301, "author": "Staale", "author_id": 3355, "author_profile": "https://Stackoverflow.com/users/3355", "pm_score": 9, "selected": true, "text": "<div> class=\"wrapper\" </div> wrapper <div class=\"push\"></div> </div> wrapper <div class=\"footer\"></div> * {\n margin: ...
2008/09/03
[ "https://Stackoverflow.com/questions/42294", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1288/" ]
42,308
<p>Any good suggestions? Input will be the name of a header file and output should be a list (preferably a tree) of all files including it directly or indirectly.</p>
[ { "answer_id": 42513, "author": "KeithB", "author_id": 2298, "author_profile": "https://Stackoverflow.com/users/2298", "pm_score": 8, "selected": true, "text": "-M" }, { "answer_id": 1763463, "author": "Community", "author_id": -1, "author_profile": "https://Stackover...
2008/09/03
[ "https://Stackoverflow.com/questions/42308", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45603/" ]
42,323
<p>I have the next function:</p> <pre><code>function setImagesWidth(id,width) { var images = document.getElementById(id).getElementsByTagName("img"); for(var i = 0; i &lt; images.length;i++) { // If the real width is bigger than width parameter images[i].style.width=width; //} ...
[ { "answer_id": 42331, "author": "Jason Bunting", "author_id": 1790, "author_profile": "https://Stackoverflow.com/users/1790", "pm_score": 2, "selected": false, "text": "var myImage = document.getElementById(\"myImagesId\");\nvar imageWidth = myImage.offsetWidth;\nvar imageHeight = myImag...
2008/09/03
[ "https://Stackoverflow.com/questions/42323", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2138/" ]
42,333
<p>I'm wondering how to use a VideoDisplay object (defined in MXML) to display video streamed from FMS via a NetStream.</p> <p>The <a href="http://livedocs.adobe.com/flex/3/langref/mx/controls/VideoDisplay.html" rel="noreferrer">Flex3 docs</a> suggest this is possible:</p> <blockquote> <p>The Video Display ... supp...
[ { "answer_id": 762430, "author": "Ken Smith", "author_id": 68231, "author_profile": "https://Stackoverflow.com/users/68231", "pm_score": 2, "selected": false, "text": "// Connect to the video stream in question.\nvar stream:NetStream = new NetStream( chatNC );\nstream.addEventListener( N...
2008/09/03
[ "https://Stackoverflow.com/questions/42333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1409/" ]
42,342
<p>Sometimes IE6 will render the text of a <code>&lt;ul&gt;</code> list the same color as the background color. If you select it, they show back up, or if you scroll the page up and back down.</p> <p>It is obviously a rendering bug, but I was wondering if anyone knows of a workaround to make it reliable?</p>
[ { "answer_id": 42346, "author": "ConroyP", "author_id": 2287, "author_profile": "https://Stackoverflow.com/users/2287", "pm_score": 0, "selected": false, "text": ".mylist {\n line-height: 1.6em;\n}\n" }, { "answer_id": 42352, "author": "Jimmy", "author_id": 4435, "...
2008/09/03
[ "https://Stackoverflow.com/questions/42342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
42,345
<p>How can I determine if a string is an IP address? Either <em>IPv4</em> or <em>IPv6</em>?</p> <p>What is the least and most number of characters?</p> <p>I assume this would be a <strong>regex</strong> answer.</p>
[ { "answer_id": 42359, "author": "Bill the Lizard", "author_id": 1288, "author_profile": "https://Stackoverflow.com/users/1288", "pm_score": 2, "selected": false, "text": "\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b\n" }, { "ans...
2008/09/03
[ "https://Stackoverflow.com/questions/42345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2644/" ]
42,357
<p>I've seen a few attempted SQL injection attacks on one of my web sites. It comes in the form of a query string that includes the "cast" keyword and a bunch of hex characters which when "decoded" are an injection of banner adverts into the DB.</p> <p>My solution is to scan the full URL (and params) and search for th...
[ { "answer_id": 42369, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 5, "selected": false, "text": "// Bad!\nSqlCommand foo = new SqlCommand(\"SELECT FOO FROM BAR WHERE LOL='\" + Request.QueryString[\"LOL\"] + \"'\");\n\n//Go...
2008/09/03
[ "https://Stackoverflow.com/questions/42357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1463/" ]
42,383
<p>I am writing an immutable DOM tree in Java, to simplify access from multiple threads.*</p> <p>However, it does need to support inserts and updates as fast as possible. And since it is immutable, if I make a change to a node on the N'th level of the tree, I need to allocate at least N new nodes in order to return t...
[ { "answer_id": 42500, "author": "levand", "author_id": 3044, "author_profile": "https://Stackoverflow.com/users/3044", "pm_score": 0, "selected": false, "text": "node.addChild() node.addChildInternal() addChild()" } ]
2008/09/03
[ "https://Stackoverflow.com/questions/42383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3044/" ]
42,386
<p>Is there a one statement or one line way to accomplish something like this, where the string s is declared AND assigned the first non-null value in the expression?</p> <pre><code>//pseudo-codeish string s = Coalesce(string1, string2, string3); </code></pre> <p>or, more generally,</p> <pre><code>object obj = Coale...
[ { "answer_id": 42387, "author": "Darren Kopp", "author_id": 77, "author_profile": "https://Stackoverflow.com/users/77", "pm_score": 2, "selected": false, "text": "string a = nullstring ?? \"empty!\";\n" }, { "answer_id": 42397, "author": "Erik van Brakel", "author_id": 90...
2008/09/03
[ "https://Stackoverflow.com/questions/42386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4438/" ]
42,395
<p>How do you write the syntax for a While loop?</p> <h2>C<code>#</code></h2> <pre><code>int i = 0; while (i != 10) { Console.WriteLine(i); i++; } </code></pre> <h2>VB.Net</h2> <pre><code>Dim i As Integer = 0 While i &lt;&gt; 10 Console.WriteLine(i) i += 1 End While </code></pre> <h2>PHP</h2> ...
[ { "answer_id": 42409, "author": "UnkwnTech", "author_id": 115, "author_profile": "https://Stackoverflow.com/users/115", "pm_score": 4, "selected": true, "text": "<?php\nwhile(CONDITION)\n{\n//Do something here.\n}\n?>\n <?php\n//MySQL query stuff here\n$result = mysql_query($sql, $link) ...
2008/09/03
[ "https://Stackoverflow.com/questions/42395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1048/" ]
42,396
<p>Here's the code from the ascx that has the repeater:</p> <pre><code>&lt;asp:Repeater ID="ListOfEmails" runat="server" &gt; &lt;HeaderTemplate&gt;&lt;h3&gt;A sub-header:&lt;/h3&gt;&lt;/HeaderTemplate&gt; &lt;ItemTemplate&gt; [Some other stuff is here] &lt;asp:Button ID="removeEmail" runat="se...
[ { "answer_id": 42412, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 5, "selected": true, "text": "Repeater.ItemCommand ItemCommand RepeaterCommandEventArgs void rptr_ItemDataBound(object sender, RepeaterItemEventArgs e)\n{\n...
2008/09/03
[ "https://Stackoverflow.com/questions/42396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1414/" ]
42,416
<p>I want to use the Web Browser control within an mono application, but when I do get the error "libgluezilla not found. To have webbrowser support, you need libgluezilla installed." Installing the Intrepid Deb causes any application that references the web browser control to crash on startup with : 'Thread (nil) may...
[ { "answer_id": 67689, "author": "jldugger", "author_id": 9947, "author_profile": "https://Stackoverflow.com/users/9947", "pm_score": 3, "selected": true, "text": "apt-cache search libgluezilla\nlibmono-mozilla0.1-cil - Mono Mozilla library\n Description: Mono Mozilla library\n Mono is a ...
2008/09/03
[ "https://Stackoverflow.com/questions/42416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3798/" ]
42,422
<p>Essentially I want to know if in VB.NET 2005 if using a sqlcommand and then reusing it by using the NEW is wrong. Will it cause a memory leak.</p> <p>EG:</p> <pre><code>try dim mySQL as new sqlcommand(sSQL, cnInput) // do a sql execute and read the data mySQL = new sqlcommand(sSQLdifferent, cnInput) // do sq...
[ { "answer_id": 42445, "author": "swilliams", "author_id": 736, "author_profile": "https://Stackoverflow.com/users/736", "pm_score": 4, "selected": true, "text": "Using mysql as SqlCommand = new SqlCommand(sSql, cnInput)\n ' do stuff'\nEnd Using\n\nUsing mysql as SqlCommand = new SqlComm...
2008/09/03
[ "https://Stackoverflow.com/questions/42422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2357/" ]
42,428
<p>X Windows has special processes called Window Managers that manage the layout of windows and decorations like their title bar, control buttons etc. Such processes use an X Windows API to detect events related to windows sizes and positions.</p> <p>Are there any consistent ways for writing such processes for Microso...
[ { "answer_id": 42445, "author": "swilliams", "author_id": 736, "author_profile": "https://Stackoverflow.com/users/736", "pm_score": 4, "selected": true, "text": "Using mysql as SqlCommand = new SqlCommand(sSql, cnInput)\n ' do stuff'\nEnd Using\n\nUsing mysql as SqlCommand = new SqlComm...
2008/09/03
[ "https://Stackoverflow.com/questions/42428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1476/" ]
42,437
<p>I'm writing a C# POS (point of sale) system that takes input from a keyboard wedge magcard reader. This means that any data it reads off of a mag stripe is entered as if it were typed on the keyboard very quickly. Currently I'm handling this by attaching to the KeyPress event and looking for a series of very fast ke...
[ { "answer_id": 589283, "author": "Nicholas Piasecki", "author_id": 32187, "author_profile": "https://Stackoverflow.com/users/32187", "pm_score": 2, "selected": false, "text": "KeyPress SetWindowsHookEx() KeyPreview" } ]
2008/09/03
[ "https://Stackoverflow.com/questions/42437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2191/" ]
42,438
<p>I have some code that uses SMO to populate a list of available SQL Servers and databases. While we no longer support SQL Server 2000, it's possible that the code could get run on a machine that SQL Server 2000 and not have the SMO library installed. I would perfer to check for SMO first and degrade the functionali...
[ { "answer_id": 42577, "author": "Chris Miller", "author_id": 206, "author_profile": "https://Stackoverflow.com/users/206", "pm_score": 2, "selected": false, "text": "private bool CheckForSmo()\n{\n string RegKeyName = @\"Microsoft.SqlServer.Management.Smo.Database\";\n bool result ...
2008/09/03
[ "https://Stackoverflow.com/questions/42438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/206/" ]
42,446
<pre><code>class Foo { static bool Bar(Stream^ stream); }; class FooWrapper { bool Bar(LPCWSTR szUnicodeString) { return Foo::Bar(??); } }; </code></pre> <p><code>MemoryStream</code> will take a <code>byte[]</code> but I'd <em>like</em> to do this without copying the data if possible.</p>
[ { "answer_id": 42605, "author": "Adam Tegen", "author_id": 4066, "author_profile": "https://Stackoverflow.com/users/4066", "pm_score": 0, "selected": false, "text": "\nstatic Stream^ UnicodeStringToStream(LPCWSTR szUnicodeString)\n{\n //validate the input parameter\n if (szUnicodeStr...
2008/09/03
[ "https://Stackoverflow.com/questions/42446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4066/" ]
42,460
<p>I'm almost certain I know the answer to this question, but I'm hoping there's something I've overlooked.</p> <p>Certain applications seem to have the Vista Aero look and feel to their caption bars and buttons even when running on Windows XP. (Google Chrome and Windows Live Photo Gallery come to mind as examples.) ...
[ { "answer_id": 44398, "author": "OwenP", "author_id": 2547, "author_profile": "https://Stackoverflow.com/users/2547", "pm_score": 3, "selected": false, "text": "src\\chrome\\browser\\views\\frame OpaqueFrame // OpaqueFrame\n//\n// OpaqueFrame is a CustomFrameWindow subclass that in conj...
2008/09/03
[ "https://Stackoverflow.com/questions/42460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2547/" ]
42,482
<p>Is there a reasonable way to extract plain text from a Word file that doesn't depend on COM automation? (This is a a feature for a web app deployed on a non-Windows platform - that's non-negotiable in this case.)</p> <p>Antiword seems like it might be a reasonable option, but it seems like it might be abandoned.</...
[ { "answer_id": 43301, "author": "paulmorriss", "author_id": 2983, "author_profile": "https://Stackoverflow.com/users/2983", "pm_score": 2, "selected": false, "text": "RO = PropertyValue('ReadOnly', 0, True, 0)\nHidden = PropertyValue('Hidden', 0, True, 0)\nxDoc = desktop.loadComponentFro...
2008/09/03
[ "https://Stackoverflow.com/questions/42482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2678/" ]
42,490
<p><em>Disclaimer: I'm stuck on TFS and I hate it.</em></p> <p>My source control structure looks like this:</p> <ul> <li>/dev</li> <li>/releases</li> <li>/branches</li> <li>/experimental-upgrade</li> </ul> <p>I branched from dev to experimental-upgrade and didn't touch it. I then did some more work in dev and merge...
[ { "answer_id": 42553, "author": "Nick Berardi", "author_id": 17, "author_profile": "https://Stackoverflow.com/users/17", "pm_score": 3, "selected": true, "text": "tf destroy [/keephistory] itemspec1 [;versionspec]\n [itemspec2...itemspecN] [/stopat:versionspec] [/preview]\n ...
2008/09/03
[ "https://Stackoverflow.com/questions/42490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3381/" ]
42,499
<p>I've started working with ASP.net AJAX (finally ☺). and I've got an update panel together with a asp:UpdateProgress. My Problem: The UpdateProgress always forces a line-break, because it renders out as a div-tag.</p> <p>Is there any way to force it being a span instead? I want to display it on the same line as some...
[ { "answer_id": 42521, "author": "Ben Scheirman", "author_id": 3381, "author_profile": "https://Stackoverflow.com/users/3381", "pm_score": -1, "selected": false, "text": "<div style=\"display:inline\">stuff</div>\n" }, { "answer_id": 43825, "author": "Steven Williams", "au...
2008/09/03
[ "https://Stackoverflow.com/questions/42499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91/" ]
42,505
<p>I have a C# singleton class that multiple classes use. Is access through <code>Instance</code> to the <code>Toggle()</code> method thread-safe? If yes, by what assumptions, rules, etc. If no, why <em>and</em> how can I fix it?</p> <pre><code>public class MyClass { private static readonly MyClass instance = new ...
[ { "answer_id": 42511, "author": "juan", "author_id": 1782, "author_profile": "https://Stackoverflow.com/users/1782", "pm_score": 0, "selected": false, "text": "if(value == 0) { value = 1; }\nif(value == 1) { value = 0; }\nreturn value;\n value" }, { "answer_id": 42517, "autho...
2008/09/03
[ "https://Stackoverflow.com/questions/42505", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3619/" ]
42,512
<p>Is it possible to delete an GAE application after it has been created?</p> <p>I made a mistake while typing the name and now have a dummy application that I haven't been able to remove.</p>
[ { "answer_id": 56090825, "author": "balazs630", "author_id": 7343596, "author_profile": "https://Stackoverflow.com/users/7343596", "pm_score": 3, "selected": false, "text": "APIs & Services Storage IAM & Admin Service account" }, { "answer_id": 61952720, "author": "iengchen",...
2008/09/03
[ "https://Stackoverflow.com/questions/42512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2148/" ]
42,519
<p>Inspired by <a href="https://devblogs.microsoft.com/oldnewthing/20080902-00/?p=21003" rel="noreferrer">Raymond Chen's post</a>, say you have a 4x4 two dimensional array, write a function that rotates it 90 degrees. Raymond links to a solution in pseudo code, but I'd like to see some real world stuff.</p> <pre><code...
[ { "answer_id": 42535, "author": "Nick Berardi", "author_id": 17, "author_profile": "https://Stackoverflow.com/users/17", "pm_score": 8, "selected": true, "text": "int[,] array = new int[4,4] {\n { 1,2,3,4 },\n { 5,6,7,8 },\n { 9,0,1,2 },\n { 3,4,5,6 }\n};\n\nint[,] rotated = ...
2008/09/03
[ "https://Stackoverflow.com/questions/42519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/736/" ]
42,531
<p>Looking for an example that:</p> <ol> <li>Launches an EXE</li> <li>Waits for the EXE to finish.</li> <li>Properly closes all the handles when the executable finishes.</li> </ol>
[ { "answer_id": 42543, "author": "crashmstr", "author_id": 1441, "author_profile": "https://Stackoverflow.com/users/1441", "pm_score": 5, "selected": false, "text": "argv[1] #include <windows.h>\n#include <stdio.h>\n#include <tchar.h>\n\nvoid _tmain( int argc, TCHAR *argv[] )\n{\n STAR...
2008/09/03
[ "https://Stackoverflow.com/questions/42531", "https://Stackoverflow.com", "https://Stackoverflow.com/users/814/" ]
42,566
<p>I'm in the process of maintaining a Ruby on Rails app and am looking for an easy way to find the hostname or IP address of the box I'm on (since it's a VM and new instances may have different hostnames or IP addresses). Is there a quick and easy way to do this in Ruby on Rails?</p> <p>Edit: The answer below is corr...
[ { "answer_id": 42624, "author": "John Topley", "author_id": 1450, "author_profile": "https://Stackoverflow.com/users/1450", "pm_score": 5, "selected": false, "text": "host = `hostname`.strip # Get the hostname from the shell and removing trailing \\n\nputs host # Output the...
2008/09/03
[ "https://Stackoverflow.com/questions/42566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/422/" ]
42,581
<p>The Python docs say:</p> <blockquote> <p>re.MULTILINE: When specified, the pattern character '^' matches at the beginning of the string and at the beginning of each line (immediately following each newline)... By default, '^' matches only at the beginning of the string...</p> </blockquote> <p>So what's going on ...
[ { "answer_id": 42597, "author": "Moe", "author_id": 3051, "author_profile": "https://Stackoverflow.com/users/3051", "pm_score": 8, "selected": true, "text": "re.sub re.sub(pattern, repl, string[, count, flags])\n re.MULTILINE re.sub('^//', '', s, flags=re.MULTILINE)\n re.sub(re.compile('...
2008/09/03
[ "https://Stackoverflow.com/questions/42581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3594/" ]
42,587
<p>I have heard/read the term but don't quite understand what it means.</p> <p>When should I use this technique and how would I use it? Can anyone provide a good code sample?</p>
[ { "answer_id": 42656, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 7, "selected": true, "text": "using System.Linq; \n\nclass DoubleDispatch\n{ \n public T Foo<T>(object arg)\n { \n var method = from m in ...
2008/09/03
[ "https://Stackoverflow.com/questions/42587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1583/" ]
42,627
<p>I am looking to write some C# code for linux/windows/mac/any other platform, and am looking for best practices for portable code.</p> <p>Project <a href="http://go-mono.org" rel="noreferrer">mono</a> has some great <a href="http://www.mono-project.com/Category:Porting" rel="noreferrer">porting</a> resources.</p> <...
[ { "answer_id": 55946, "author": "Sam Warwick", "author_id": 3873, "author_profile": "https://Stackoverflow.com/users/3873", "pm_score": 4, "selected": false, "text": "string myfile = somepath + \"\\\\file.txt\";\n string myfile = Path.Combine(somepath, \"file.txt\");\n" } ]
2008/09/03
[ "https://Stackoverflow.com/questions/42627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1583/" ]
42,648
<p>How am I supposed to get the <code>IDENTITY</code> of an inserted row?</p> <p>I know about <code>@@IDENTITY</code> and <code>IDENT_CURRENT</code> and <code>SCOPE_IDENTITY</code>, but don't understand the implications or impacts attached to each.</p> <p>Can someone please explain the differences and when I would be u...
[ { "answer_id": 42655, "author": "bdukes", "author_id": 2688, "author_profile": "https://Stackoverflow.com/users/2688", "pm_score": 12, "selected": true, "text": "@@IDENTITY SCOPE_IDENTITY() IDENT_CURRENT('tableName') OUTPUT INSERT" }, { "answer_id": 42669, "author": "Orion Ed...
2008/09/03
[ "https://Stackoverflow.com/questions/42648", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1583/" ]
42,672
<p>What would be the best way to do an <code>scp</code> or <code>sftp</code> copy in a Unix environment using C?</p> <p>I'm interested in knowing the best library to use and an example if at all possible. I'm working on a <a href="https://en.wikipedia.org/wiki/Solaris_%28operating_system%29" rel="nofollow noreferrer">S...
[ { "answer_id": 42705, "author": "Tyler Gooch", "author_id": 1372, "author_profile": "https://Stackoverflow.com/users/1372", "pm_score": 0, "selected": false, "text": "int transferFile()\n{\n // Declare the transfer command\n char transferCommand[50] = \"/home/tyler/transferFile.shl\";\...
2008/09/03
[ "https://Stackoverflow.com/questions/42672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4491/" ]
42,693
<p>What's the best way to get user input in a C program where the choices are of a limited number?</p> <p>Say for example the choices are:</p> <p>A) Print the list. B) Add 99 to the end of the list. C) Delete all duplicates. 5) Reset 5 times.</p> <p>Entering &quot;A&quot; and then Enter is OK. Or, just a single keystro...
[ { "answer_id": 42704, "author": "David Bryson", "author_id": 3663, "author_profile": "https://Stackoverflow.com/users/3663", "pm_score": 0, "selected": false, "text": "int intput()\n{\n char input = 0;\n int ret_val = 0;\n\n read(0, &input, 1);\n\n switch(input) {\n ca...
2008/09/03
[ "https://Stackoverflow.com/questions/42693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3807/" ]
42,703
<p>I am using sp_send_dbmail in SQL2005 to send an email with the results in an attachment. When the attachment is sent it is UCS-2 Encoded, I want it to be ANSI or UTF-8.</p> <p>Here is the SQL</p> <pre><code>EXEC msdb.dbo.sp_send_dbmail @recipients = 'temp@example.com' , @query = 'DECLARE @string_to_trim va...
[ { "answer_id": 5783390, "author": "bushtwig", "author_id": 588229, "author_profile": "https://Stackoverflow.com/users/588229", "pm_score": 0, "selected": false, "text": "msdb @ANSI_Attachment BIT = 0 @mailitem_id INT = NULL OUTPUT,\n @ANSI_Attachment BIT = 0\n WITH EXECUTE AS 'db...
2008/09/03
[ "https://Stackoverflow.com/questions/42703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
42,706
<p>Is there a down side? I feel almost dependent on it now. Whenever a project gets past a certain size almost feel an allergic reaction to standard patterns and immediately re-wire it with a Dependency Injection framework.</p> <p>The largest issue I've found is it can be confusing for other developers who are just le...
[ { "answer_id": 42739, "author": "Marcio Aguiar", "author_id": 4213, "author_profile": "https://Stackoverflow.com/users/4213", "pm_score": 2, "selected": false, "text": " package dependecyinjection; \n import java.util.ServiceLoader; \n\n public abstract class FooService { \n\n pub...
2008/09/03
[ "https://Stackoverflow.com/questions/42706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/758/" ]
42,710
<p>I need to implement a 4-to-1 function in Veriog. The input is 4 bits, a number from 0-15. The output is a single bit, 0 or 1. Each input gives a different output and the mapping from inputs to outputs is known, but the inputs and outputs themselves are not. I want vcs to successfully optimizing the code and also...
[ { "answer_id": 99795, "author": "Matt J", "author_id": 18528, "author_profile": "https://Stackoverflow.com/users/18528", "pm_score": 2, "selected": false, "text": "always_comb //or \"always @*\" if you don't have an SV-enabled tool flow\nbegin \n case(a)\n begin\n 4'b0000: b = 1'b0;...
2008/09/03
[ "https://Stackoverflow.com/questions/42710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4454/" ]
42,721
<p>For some reason, I can't seem to get CruiseControl.net to checkout code to anywhere but the starteam working folder for a specificed view.</p> <p>I've tried both overrideViewWorkingDir and overrideFolderWorkingDir, and neither seem to work.</p> <p>Has anyone been able to do this?</p>
[ { "answer_id": 61163, "author": "Eugene Yokota", "author_id": 3827, "author_profile": "https://Stackoverflow.com/users/3827", "pm_score": 0, "selected": false, "text": "<sourcecontrol type=\"starteam\">\n <executable>C:\\Program Files\\starbase\\StarTeam 5.4\\stcmd.exe</executable>\n ...
2008/09/03
[ "https://Stackoverflow.com/questions/42721", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
42,762
<p>Here is some code I could not get to format properly in markdown, this is straight C code, pasted into the text box with the '4 spaces' format to denote code:</p> <pre><code>#define PRINT(x, format, ...) \ if ( x ) { \ if ( debug_fd != NULL ) { \ fprintf(debug_fd, format, ##__VA_ARGS__); \ } \ e...
[ { "answer_id": 42764, "author": "Julio César", "author_id": 2148, "author_profile": "https://Stackoverflow.com/users/2148", "pm_score": 2, "selected": false, "text": "#define PRINT(x, format, ...) \\\nif ( x ) { \\\n if ( debug_fd != NULL ) { \\\n fprintf(debug_fd, format, ##VA...
2008/09/03
[ "https://Stackoverflow.com/questions/42762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3663/" ]
42,763
<p>Does anyone know how many options a drop down list can have? Is it unlimited? How many before performance degrades?</p>
[ { "answer_id": 22330536, "author": "Katesclau", "author_id": 1014667, "author_profile": "https://Stackoverflow.com/users/1014667", "pm_score": 4, "selected": false, "text": "for (var i=0; i<10000; i++) {\n var name = \"Option \"+i;\n var sel = document.getElementById(\"list\");\n ...
2008/09/03
[ "https://Stackoverflow.com/questions/42763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/415/" ]
42,774
<p>I'm using <kbd>Ctrl</kbd>+<kbd>Left</kbd> / <kbd>Ctrl</kbd>+<kbd>Right</kbd> in a GreaseMonkey script as a hotkey to turn back / forward pages. It seems to works fine, but I want to disable this behavior if I'm in a text edit area. I'm trying to use document.activeElement to get the page active element and test if i...
[ { "answer_id": 42807, "author": "Jimmy", "author_id": 4435, "author_profile": "https://Stackoverflow.com/users/4435", "pm_score": 3, "selected": true, "text": "(function() {\n\nvar myActiveElement;\ndocument.onkeypress = function(event) {\n if ((myActiveElement || document.activeEleme...
2008/09/03
[ "https://Stackoverflow.com/questions/42774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/394/" ]
42,778
<p>Is <a href="http://cpan.uwinnipeg.ca/dist/DBI" rel="noreferrer">CPAN DBI</a> the best database interface to use in Perl for general database use? Are there some better options?</p>
[ { "answer_id": 72471, "author": "8jean", "author_id": 10011, "author_profile": "https://Stackoverflow.com/users/10011", "pm_score": 3, "selected": false, "text": "DBI DBI DBI DBI DBIx::Simple # DBI\nmy $rows = $dbh->selectall_arrayref($sql, { Slice => {} });\n # tell it w...
2008/09/03
[ "https://Stackoverflow.com/questions/42778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/381/" ]
42,793
<p>What techniques do you know\use to create user-friendly GUI ? </p> <p>I can name following techniques that I find especially useful: </p> <ul> <li>Non-blocking notifications (floating dialogs like in Firefox3 or Vista's pop-up messages in tray area)</li> <li>Absence of "Save" button<br> MS OneNote as an example.<...
[ { "answer_id": 42891, "author": "wusher", "author_id": 1632, "author_profile": "https://Stackoverflow.com/users/1632", "pm_score": 5, "selected": false, "text": " Would you like to save? \n Yes No\n Would you like to save?\n Save Don't Save \n" } ]
2008/09/03
[ "https://Stackoverflow.com/questions/42793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1196/" ]
42,797
<p>I'm looking for something that can copy (preferably only changed) files from a development machine to a staging machine and finally to a set of production machines.</p> <p>A "what if" mode would be nice as would the capability to "rollback" the last deployment. Database migrations aren't a necessary feature.</p...
[ { "answer_id": 43186, "author": "DrFloyd5", "author_id": 1736623, "author_profile": "https://Stackoverflow.com/users/1736623", "pm_score": 2, "selected": false, "text": "robocopy.exe\nfor /?\n" }, { "answer_id": 380222, "author": "Simon_Weaver", "author_id": 16940, "a...
2008/09/03
[ "https://Stackoverflow.com/questions/42797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/729/" ]
42,814
<p>How can I get the MAC Address using only the compact framework?</p>
[ { "answer_id": 42824, "author": "Greg Roberts", "author_id": 4269, "author_profile": "https://Stackoverflow.com/users/4269", "pm_score": -1, "selected": false, "text": "Dim mc As System.Management.ManagementClass\nDim mo As ManagementObject\nmc = New ManagementClass(\"Win32_NetworkAdapte...
2008/09/03
[ "https://Stackoverflow.com/questions/42814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4463/" ]
42,828
<p>I will elaborate somewhat. Jsf is kind-of extremely painful for working with from designer's perspective, somewhat in the range of trying to draw a picture while having hands tied at your back, but it is good for chewing up forms and listing lots of data. So sites we are making in my company are jsf admin pages and ...
[ { "answer_id": 43549, "author": "Tim Howland", "author_id": 4276, "author_profile": "https://Stackoverflow.com/users/4276", "pm_score": 2, "selected": false, "text": "<input type=\"text\" jsfc=\"#{SomeBean.property}\" class=\"foo\" />\n" }, { "answer_id": 63883, "author": "Er...
2008/09/03
[ "https://Stackoverflow.com/questions/42828", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4433/" ]
42,830
<p>I'm using the <a href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx" rel="nofollow noreferrer">AutoComplete</a> control from the ASP.NET AJAX Control Toolkit and I'm experiencing an issue where the AutoComplete does not populate when I set the focus to the assigned textbox. </p>...
[ { "answer_id": 42858, "author": "Glenn Slaven", "author_id": 2975, "author_profile": "https://Stackoverflow.com/users/2975", "pm_score": 3, "selected": true, "text": "MainSearchBox_SearchTextBox textBoxHasFocus if (textBoxHasFocus) {\n $get(\"MainSearchBox_SearchTextBox\").blur();\n ...
2008/09/03
[ "https://Stackoverflow.com/questions/42830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2034/" ]
42,863
<p>Of course the best metric would be a happiness of your users.<br> But what metrics do you know for GUI usability measurements?<br> For example, one of the common metrics is a average click count to perform action. What other metrics do you know? </p>
[ { "answer_id": 80040, "author": "rec", "author_id": 14022, "author_profile": "https://Stackoverflow.com/users/14022", "pm_score": 0, "selected": false, "text": "Q: “What percentage of your interface contains stuff that your customers\n want to see?”\n" } ]
2008/09/03
[ "https://Stackoverflow.com/questions/42863", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1196/" ]
42,876
<p>Why does the following code not work as I was expecting?</p> <pre><code>&lt;?php $data = array( array('Area1', null, null), array(null, 'Section1', null), array(null, null, 'Location1'), array('Area2', null, null), array(null, 'Section2', null), array(null, null, 'Location2') ); $root = arra...
[ { "answer_id": 42885, "author": "pix0r", "author_id": 72, "author_profile": "https://Stackoverflow.com/users/72", "pm_score": 3, "selected": true, "text": "$area = array();\n\n$section = array();\n unset($area);\n$area = array();\n\nunset($section);\n$section = array();\n $area $section ...
2008/09/04
[ "https://Stackoverflow.com/questions/42876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/486/" ]
42,894
<p>Is there any benefit in using a <code>&lt;blockquote&gt;</code> element over a <code>&lt;div&gt;</code>? I was looking at a website's markup to learn CSS and I couldn't figure out why the <code>&lt;blockquote&gt;</code> was being used.</p> <p>EDIT: Yeah sorry I didn't clarify, it was used to hold the <code>&lt;div&...
[ { "answer_id": 42896, "author": "pix0r", "author_id": 72, "author_profile": "https://Stackoverflow.com/users/72", "pm_score": 3, "selected": false, "text": "blockquote cite" }, { "answer_id": 42898, "author": "John Millikin", "author_id": 3560, "author_profile": "http...
2008/09/04
[ "https://Stackoverflow.com/questions/42894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/438/" ]
42,934
<p>It seems that everybody is jumping on the dynamic, non-compiled bandwagon lately. I've mostly only worked in compiled, static typed languages (C, Java, .Net). The experience I have with dynamic languages is stuff like ASP (Vb Script), JavaScript, and PHP. Using these technologies has left a bad taste in my mouth ...
[ { "answer_id": 42955, "author": "Apocalisp", "author_id": 3434, "author_profile": "https://Stackoverflow.com/users/3434", "pm_score": 7, "selected": false, "text": "qsort [] = []\nqsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++ qsort (filter (>= x) xs)\n (defun quicksort (lis) (if (...
2008/09/04
[ "https://Stackoverflow.com/questions/42934", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1862/" ]
42,950
<p>Is there a way using Python's standard library to easily determine (i.e. one function call) the last day of a given month?</p> <p>If the standard library doesn't support that, does the dateutil package support this?</p>
[ { "answer_id": 42997, "author": "John Millikin", "author_id": 3560, "author_profile": "https://Stackoverflow.com/users/3560", "pm_score": 7, "selected": false, "text": ">>> import datetime\n>>> datetime.date(2000, 2, 1) - datetime.timedelta(days=1)\ndatetime.date(2000, 1, 31)\n" }, {...
2008/09/04
[ "https://Stackoverflow.com/questions/42950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/680/" ]
42,966
<p>What would be the best way to develop a text box that remembers the last x number of entries that were put into it. This is a standalone app written with C#.</p>
[ { "answer_id": 45067, "author": "Adam Haile", "author_id": 194, "author_profile": "https://Stackoverflow.com/users/194", "pm_score": 3, "selected": true, "text": "namespace AutoComplete\n{\n public partial class Main : Form\n {\n //so you don't have to address \"txtMain.Auto...
2008/09/04
[ "https://Stackoverflow.com/questions/42966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2066/" ]
42,980
<p>Does anyone know how to setup <a href="http://www.selenic.com/mercurial/wiki/index.cgi/Mercurial" rel="noreferrer">Mercurial</a> to use <a href="http://www.perforce.com/perforce/products/merge.html" rel="noreferrer">p4merge</a> as the merge/diff tool on OS X 10.5?</p>
[ { "answer_id": 54261, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "#!/usr/bin/python\nimport sys\nimport os\n\nos.system('/Applications/p4merge.app/Contents/MacOS/p4merge \"%s\" \"%s\"' % (sys.a...
2008/09/04
[ "https://Stackoverflow.com/questions/42980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3547/" ]
42,984
<p>I'm behind a firewall at work at the moment and I was testing something that I had deployed to my website, and the work proxy seems to be blocking it somewhat.</p> <p>Basically I am getting a message of:</p> <blockquote> <p>Operation is not valid due to the current state of the object</p> </blockquote> <p>I've ...
[ { "answer_id": 314622, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "<system.net> \n <defaultProxy useDefaultCredentials=\"false\">\n <proxy usesystemdefault=\"true\" proxyaddress=\"10.0...
2008/09/04
[ "https://Stackoverflow.com/questions/42984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3717/" ]
42,990
<p>I am looking for a regex that will match a string that starts with one substring and does not end with a certain substring.</p> <p>Example:</p> <pre><code>// Updated to be correct, thanks @Apocalisp ^foo.*(?&lt;!bar)$ </code></pre> <p>Should match anything that starts with "foo" and doesn't end with "bar". I kno...
[ { "answer_id": 43010, "author": "Sam Hasler", "author_id": 2541, "author_profile": "https://Stackoverflow.com/users/2541", "pm_score": 1, "selected": false, "text": "foo.*(?!bar) // not correct\n" }, { "answer_id": 43016, "author": "aku", "author_id": 1196, "author_pr...
2008/09/04
[ "https://Stackoverflow.com/questions/42990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3535/" ]
43,021
<p>Is there some rare language construct I haven't encountered (like the few I've learned recently, some on Stack Overflow) in C# to get a value representing the current iteration of a foreach loop?</p> <p>For instance, I currently do something like this depending on the circumstances:</p> <pre><code>int i = 0; forea...
[ { "answer_id": 43029, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 10, "selected": true, "text": "foreach IEnumerable GetEnumerator Enumerator MoveNext() Current Current MoveNext Current" }, { "answer_id": 43035, ...
2008/09/04
[ "https://Stackoverflow.com/questions/43021", "https://Stackoverflow.com", "https://Stackoverflow.com/users/364/" ]
43,044
<p>I'm looking for a simple algorithm to generate a large number of random, aesthetically pleasing colors. So no crazy neon colors, colors reminiscent of feces, etc. </p> <p>I've found solutions to this problem but they rely on alternative color palettes than RGB. I would rather just use straight RGB than mapping back...
[ { "answer_id": 43081, "author": "helloandre", "author_id": 50, "author_profile": "https://Stackoverflow.com/users/50", "pm_score": 0, "selected": false, "text": "brightness = sqrt(R^2+G^2+B^2)\n" }, { "answer_id": 43235, "author": "David Crow", "author_id": 2783, "aut...
2008/09/04
[ "https://Stackoverflow.com/questions/43044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3415/" ]
43,051
<p>I have the following C# code:</p> <pre><code>byte rule = 0; ... rule = rule | 0x80; </code></pre> <p>which produces the error: </p> <blockquote> <p><em>Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?)</em></p> </blockquote> <p>[Update: first version of the...
[ { "answer_id": 43064, "author": "jmatthias", "author_id": 2768, "author_profile": "https://Stackoverflow.com/users/2768", "pm_score": 4, "selected": false, "text": "rule = (byte)(rule | 0x80);\n" }, { "answer_id": 43074, "author": "David J. Sokol", "author_id": 1390, ...
2008/09/04
[ "https://Stackoverflow.com/questions/43051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3631/" ]
43,111
<p>I have a self referencing Categories table. Each Category has a CategoryID, ParentCategoryID, CategoryName, etc. And each category can have any number of sub categories, and each of those sub categories can have any number of sub categories, and so and and so forth. So basically the tree can be X levels deep.</p> <...
[ { "answer_id": 43121, "author": "Matt Mitchell", "author_id": 364, "author_profile": "https://Stackoverflow.com/users/364", "pm_score": 2, "selected": false, "text": "public IQueryable GetCategories(Category parent)\n{\n var cats = (parent.Categories);\n foreach (Category c in cats...
2008/09/04
[ "https://Stackoverflow.com/questions/43111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/653/" ]
43,116
<p>I've got a utility that outputs a list of files required by a game. How can I run that utility within a C program and grab its output so I can act on it within the same program?</p> <p>UPDATE: Good call on the lack of information. The utility spits out a series of strings, and this is supposed to be portable acros...
[ { "answer_id": 43120, "author": "dmckee --- ex-moderator kitten", "author_id": 2509, "author_profile": "https://Stackoverflow.com/users/2509", "pm_score": 7, "selected": true, "text": "popen()" }, { "answer_id": 43122, "author": "David J. Sokol", "author_id": 1390, "a...
2008/09/04
[ "https://Stackoverflow.com/questions/43116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3830/" ]
43,126
<pre><code>public static IList&lt;T&gt; LoadObjectListAll&lt;T&gt;() { ISession session = CheckForExistingSession(); var cfg = new NHibernate.Cfg.Configuration().Configure(); var returnList = session.CreateCriteria(typeof(T)); var list = returnList.List(); var castList = list.Cast&lt;typeof(T)&gt;()...
[ { "answer_id": 43128, "author": "jfs", "author_id": 718, "author_profile": "https://Stackoverflow.com/users/718", "pm_score": 3, "selected": false, "text": "var castList = list.Cast<typeof(T)>();\n var castList = list.Cast<T>();\n IList IList<T> IList ArrayList IList<T>" }, { "an...
2008/09/04
[ "https://Stackoverflow.com/questions/43126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4140/" ]
43,134
<p>Simple question, but one that I've been curious about...is there a functional difference between the following two commands?</p> <pre><code>String::class String.class </code></pre> <p>They both do what I expect -- that is to say they return <code>Class</code> -- but what is the difference between using the <code>:...
[ { "answer_id": 43146, "author": "Joseph Daigle", "author_id": 507, "author_profile": "https://Stackoverflow.com/users/507", "pm_score": 6, "selected": true, "text": ". :: :: . . ::" }, { "answer_id": 48046, "author": "Peeja", "author_id": 4937, "author_profile": "http...
2008/09/04
[ "https://Stackoverflow.com/questions/43134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4142/" ]
43,157
<p>I was surprised to find today that I couldn't track down any simple way to write the contents of an <code>InputStream</code> to an <code>OutputStream</code> in Java. Obviously, the byte buffer code isn't difficult to write, but I suspect I'm just missing something which would make my life easier (and the code cleare...
[ { "answer_id": 43163, "author": "Mike Stone", "author_id": 122, "author_profile": "https://Stackoverflow.com/users/122", "pm_score": 7, "selected": false, "text": "byte[] buffer = new byte[1024];\nint len;\nwhile ((len = in.read(buffer)) != -1) {\n out.write(buffer, 0, len);\n}\n" }...
2008/09/04
[ "https://Stackoverflow.com/questions/43157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/797/" ]
43,201
<p>I'm looking for some examples or samples of routing for the following sort of scenario:</p> <p>The general example of doing things is: {controller}/{action}/{id}</p> <p>So in the scenario of doing a product search for a store you'd have:</p> <pre><code>public class ProductsController: Controller { public Acti...
[ { "answer_id": 45076, "author": "crucible", "author_id": 3717, "author_profile": "https://Stackoverflow.com/users/3717", "pm_score": 2, "selected": false, "text": " public static void RegisterRoutes(RouteCollection routes)\n {\n routes.IgnoreRoute(\"{resource}.axd/{*pathInfo...
2008/09/04
[ "https://Stackoverflow.com/questions/43201", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3717/" ]
43,218
<p>I'm working on a C#/ASP.NET project that has all the javascript files in a /Javascript folder. If I refer to the JS file using this syntax: src="/Javascript/jsfile.js" then the file is correctly picked up if the project is deployed to the root of the URL.</p> <p>However, if this "web site" is deployed to a sub-fold...
[ { "answer_id": 43222, "author": "Espo", "author_id": 2257, "author_profile": "https://Stackoverflow.com/users/2257", "pm_score": 5, "selected": true, "text": "Page.ClientScript.RegisterClientScriptInclude(\"myJsFile\", Page.ResolveClientUrl(\"~/Javascript/jsfile.js\"))\n" }, { "a...
2008/09/04
[ "https://Stackoverflow.com/questions/43218", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1463/" ]
43,224
<p>Google is not being my friend - it's been a long time since my stats class in college...I need to calculate the start and end points for a trendline on a graph - is there an easy way to do this? (working in C# but whatever language works for you)</p>
[ { "answer_id": 47286, "author": "matt", "author_id": 2646, "author_profile": "https://Stackoverflow.com/users/2646", "pm_score": 5, "selected": false, "text": "public class Statistics\n{\n public Trendline CalculateLinearRegression(int[] values)\n {\n var yAxisValues = new L...
2008/09/04
[ "https://Stackoverflow.com/questions/43224", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2646/" ]
43,249
<p>Is there a graceful way to handle passing a list of ids as a parameter to a stored procedure? </p> <p>For instance, I want departments 1, 2, 5, 7, 20 returned by my stored procedure. In the past, I have passed in a comma delimited list of ids, like the below code, but feel really dirty doing it. </p> <p>SQL Server...
[ { "answer_id": 43260, "author": "Matt Hamilton", "author_id": 615, "author_profile": "https://Stackoverflow.com/users/615", "pm_score": 4, "selected": false, "text": "SELECT d.[Name]\nFROM Department d\n JOIN dbo.SplitWords(@DepartmentIds) w ON w.Value = d.DepartmentId\n" }, { ...
2008/09/04
[ "https://Stackoverflow.com/questions/43249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1865/" ]
43,253
<p>What is the best way to measure exception handling overhead/performance in C++?</p> <p>Please give standalone code samples.</p> <p>I'm targeting Microsoft Visual C++ 2008 and gcc.</p> <p>I need to get results from the following cases:</p> <ol> <li>Overhead when there are no try/catch blocks</li> <li>Overhead whe...
[ { "answer_id": 43292, "author": "Antti Kissaniemi", "author_id": 2948, "author_profile": "https://Stackoverflow.com/users/2948", "pm_score": 3, "selected": false, "text": "g++ exception_handling.cpp -o exception_handling [ -O2 ]\n g++ exception_handling.cpp -o exception_handling [ -O2 ] ...
2008/09/04
[ "https://Stackoverflow.com/questions/43253", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2948/" ]
43,289
<p>How can I do this fast?</p> <p>Sure I can do this:</p> <pre><code>static bool ByteArrayCompare(byte[] a1, byte[] a2) { if (a1.Length != a2.Length) return false; for (int i=0; i&lt;a1.Length; i++) if (a1[i]!=a2[i]) return false; return true; } </code></pre> <p>But I'm look...
[ { "answer_id": 43300, "author": "gil", "author_id": 195, "author_profile": "https://Stackoverflow.com/users/195", "pm_score": 3, "selected": false, "text": "for" }, { "answer_id": 43305, "author": "Jason Bunting", "author_id": 1790, "author_profile": "https://Stackove...
2008/09/04
[ "https://Stackoverflow.com/questions/43289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4489/" ]
43,290
<p>In Django's template language, you can use <code>{% url [viewname] [args] %}</code> to generate a URL to a specific view with parameters. How can you programatically do the same in Python code?</p> <p>What I need is to create a list of menu items where each item has name, URL, and an active flag (whether it's the ...
[ { "answer_id": 43312, "author": "Peter Hoffmann", "author_id": 720, "author_profile": "https://Stackoverflow.com/users/720", "pm_score": 7, "selected": true, "text": "{% url %} django.core.urlresolvers.reverse() reverse reverse(viewname, urlconf=None, args=None, kwargs=None)\n django.url...
2008/09/04
[ "https://Stackoverflow.com/questions/43290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3355/" ]
43,291
<p>I know that I can do something like</p> <pre><code>$int = (int)99; //(int) has a maximum or 99 </code></pre> <p>To set the variable <code>$int</code> to an integer and give it a value of <code>99</code>. </p> <p>Is there a way to set the type to something like <code>LongBlob</code> in MySQL for <code>LARGE</code>...
[ { "answer_id": 43295, "author": "erlando", "author_id": 4192, "author_profile": "https://Stackoverflow.com/users/4192", "pm_score": 4, "selected": true, "text": "$int = (int)123;\n" } ]
2008/09/04
[ "https://Stackoverflow.com/questions/43291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115/" ]
43,320
<p>One of the things that get me thoroughly confused is the use of <code>session.Flush</code>,in conjunction with <code>session.Commit</code>, and <code>session.Close</code>.</p> <p>Sometimes <code>session.Close</code> works, e.g., it commits all the changes that I need. I know I need to use commit when I have a trans...
[ { "answer_id": 43567, "author": "Matt Hinze", "author_id": 2676, "author_profile": "https://Stackoverflow.com/users/2676", "pm_score": 9, "selected": true, "text": "Close() ISession using ISession Find() Enumerable() NHibernate.ITransaction.Commit() ISession.Flush() ISession.Save() ISess...
2008/09/04
[ "https://Stackoverflow.com/questions/43320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/372/" ]
43,321
<p>The default shell in Mac OS X is <code>bash</code>, which I'm generally happy to be using. I just take it for granted. It would be really nice if it auto-completed <em>more stuff</em>, though, and I've heard good things about <code>zsh</code> in this regard. But I don't really have the inclination to spend hours fid...
[ { "answer_id": 43340, "author": "Rodney Amato", "author_id": 4342, "author_profile": "https://Stackoverflow.com/users/4342", "pm_score": 7, "selected": true, "text": "tar -xzvf bash-completion-20060301.tar.gz\n sudo cp bash_completion/bash_completion /etc\n if [ -f /etc/bash_completion ]...
2008/09/04
[ "https://Stackoverflow.com/questions/43321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4161/" ]
43,322
<p>Plug-in systems in C++ are hard because the ABI is not properly defined, and each compiler (or version thereof) follows its own rules. However, COM on Windows shows that it's possible to create a minimal plug-in system that allows programmers with different compilers to create plug-ins for a host application using ...
[ { "answer_id": 43373, "author": "Jim Buck", "author_id": 2666, "author_profile": "https://Stackoverflow.com/users/2666", "pm_score": 2, "selected": false, "text": "#if defined(IN_THE_PLUGIN)\nvoid MyObject::somefunction() { MyObject_somefunction(this); }\n#endif\n" }, { "answer_i...
2008/09/04
[ "https://Stackoverflow.com/questions/43322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2095/" ]
43,324
<p>I'm using the Yahoo Uploader, part of the Yahoo UI Library, on my ASP.Net website to allow users to upload files. For those unfamiliar, the uploader works by using a Flash applet to give me more control over the FileOpen dialog. I can specify a filter for file types, allow multiple files to be selected, etc. It's g...
[ { "answer_id": 43353, "author": "Espo", "author_id": 2257, "author_profile": "https://Stackoverflow.com/users/2257", "pm_score": 0, "selected": false, "text": "Session.SessionID" }, { "answer_id": 43356, "author": "Seb Nilsson", "author_id": 2429, "author_profile": "h...
2008/09/04
[ "https://Stackoverflow.com/questions/43324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2527/" ]
43,349
<p>I know that default cron's behavior is to send normal and error output to cron's owner local email box.</p> <p>Is there other ways to get theses results (for example to send it by email to a bunch of people, to store them somewhere, and so on) ?</p>
[ { "answer_id": 43357, "author": "Vagnerr", "author_id": 3720, "author_profile": "https://Stackoverflow.com/users/3720", "pm_score": 2, "selected": false, "text": "* * * * * /path/my/command > /my/email/script 2&>1\n" }, { "answer_id": 43360, "author": "Espo", "author_id":...
2008/09/04
[ "https://Stackoverflow.com/questions/43349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3122/" ]
43,354
<p>How do you reference a bitmap on the stage in flash using actionscript 3?</p> <p>I have a bitmap on the stage in flash and at the end of the movie I would like to swap it out for the next in the sequence before the movie loops. in my library i have 3 images, exported for actionscript, with the class name img1/img2/...
[ { "answer_id": 43477, "author": "bitbonk", "author_id": 4227, "author_profile": "https://Stackoverflow.com/users/4227", "pm_score": 1, "selected": false, "text": "imageHolder.removeChild( imageIndex )\n imageHolder.removeChildByName( imageName )\n imageHolder.addChild( newImage )\n" },...
2008/09/04
[ "https://Stackoverflow.com/questions/43354", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2098/" ]
43,368
<p>I'm a firm believer of the heretic thought of tight coupling between the backend and frontend: I want existing, implied knowledge about a backend to be automatically made use of when generating user interfaces. E.g., if a VARCHAR column has a maximum with of 20 characters, there GUIs should automatically constrain t...
[ { "answer_id": 48479, "author": "Jason", "author_id": 5036, "author_profile": "https://Stackoverflow.com/users/5036", "pm_score": 1, "selected": false, "text": "<table> <tr> #for $field in $dbObject.c: <th>$field.name</th> #end for </tr> <tr> #for $field in dbObject.c: <td>$field.type.to...
2008/09/04
[ "https://Stackoverflow.com/questions/43368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4462/" ]
43,374
<p>What I have so far is </p> <pre><code>#!/bin/sh php_syntax_check() { retval=0 for i in $(git-diff-index --name-only --cached HEAD -- | grep -e '\.php$'); do if [ -f $i ]; then output=$(php -l $i) retval=$? if [ $retval -gt 0 ]; then echo "========...
[ { "answer_id": 547489, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "#!/usr/bin/php\n<?php /* Your pre-commit check. */ ?>\n" }, { "answer_id": 3069175, "author": "LarryH", "autho...
2008/09/04
[ "https://Stackoverflow.com/questions/43374", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4342/" ]
43,393
<p>I've come back to using NHibernate after using other technologies (<a href="http://www.lhotka.net/" rel="nofollow noreferrer">CSLA</a> and <a href="http://subsonicproject.com/" rel="nofollow noreferrer">Subsonic</a>) for a couple of years, and I'm finding the querying a bit frustrating, especially when compared to S...
[ { "answer_id": 48097, "author": "Matt Hinze", "author_id": 2676, "author_profile": "https://Stackoverflow.com/users/2676", "pm_score": 2, "selected": false, "text": "GetProductsForOrder(Order order) GetCustomersThatPurchasedProduct(Product product)" }, { "answer_id": 206242, ...
2008/09/04
[ "https://Stackoverflow.com/questions/43393", "https://Stackoverflow.com", "https://Stackoverflow.com/users/230/" ]
43,422
<p>For example, I issued an ALTER TABLE statement to create an index on a MEDIUMTEXT field in an InnoDB table that has 134k rows where the size of the index was 255 bytes and the average size of the data in the field is 30k. This command has been running for the last 15 minutes or so (and is the only thing running on ...
[ { "answer_id": 7713657, "author": "Jay Binks", "author_id": 987797, "author_profile": "https://Stackoverflow.com/users/987797", "pm_score": 4, "selected": false, "text": "select count(*) from `myoriginalrable`;\nselect count(*) from `#sql-1e8_11ae5`;\n" }, { "answer_id": 12055272...
2008/09/04
[ "https://Stackoverflow.com/questions/43422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2168/" ]
43,427
<p>Say I have a site on <a href="http://example.com" rel="noreferrer">http://example.com</a>. I would really like allowing bots to see the home page, but any other page need to blocked as it is pointless to spider. In other words</p> <p><a href="http://example.com" rel="noreferrer">http://example.com</a> &amp; <a href...
[ { "answer_id": 43436, "author": "Biri", "author_id": 968, "author_profile": "https://Stackoverflow.com/users/968", "pm_score": 0, "selected": false, "text": "Disallow: /subdir/\n" }, { "answer_id": 43454, "author": "UnkwnTech", "author_id": 115, "author_profile": "htt...
2008/09/04
[ "https://Stackoverflow.com/questions/43427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2892/" ]
43,459
<p>can anybody recommend some really good resources for how to get Apache authenticating users with Kerberos.</p> <p>Background reading on Kerberos would also be useful </p> <p>Thanks</p> <p>Peter</p>
[ { "answer_id": 18693599, "author": "Tomas Tomecek", "author_id": 909579, "author_profile": "https://Stackoverflow.com/users/909579", "pm_score": 1, "selected": false, "text": "mod_auth_kerb LoadModule auth_kerb_module modules/mod_auth_kerb.so\n <Location /> \n AuthName \"Kerberos Auth...
2008/09/04
[ "https://Stackoverflow.com/questions/43459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3720/" ]
43,466
<p>I know 'best' is subjective, so according to you, what is the best solution for the following problem:</p> <p>Given a string of length n (say "abc"), generate all proper subsets of the string. So, for our example, the output would be {}, {a}, {b}, {c}, {ab}, {bc}, {ac}. {abc}.</p> <p>What do you think?</p>
[ { "answer_id": 43474, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 0, "selected": false, "text": "def subsets(s):\n r = []\n a = [False] * len(s)\n while True:\n r.append(\"\".join([s[i] for i in range(le...
2008/09/04
[ "https://Stackoverflow.com/questions/43466", "https://Stackoverflow.com", "https://Stackoverflow.com/users/380/" ]
43,490
<p>When is this called? More specifically, I have a control I'm creating - how can I release handles when the window is closed. In normal win32 I'd do it during <code>wm_close</code> - is <code>DestroyHandle</code> the .net equivalent?</p> <hr> <p>I don't want to destroy the window handle myself - my control is liste...
[ { "answer_id": 43499, "author": "aku", "author_id": 1196, "author_profile": "https://Stackoverflow.com/users/1196", "pm_score": 2, "selected": false, "text": "DestroyHandle Dispose" }, { "answer_id": 43560, "author": "dan gibson", "author_id": 4495, "author_profile": ...
2008/09/04
[ "https://Stackoverflow.com/questions/43490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4495/" ]
43,500
<p>I would like to compare the contents of a couple of collections in my Equals method. I have a Dictionary and an IList. Is there a built-in method to do this?</p> <p>Edited: I want to compare two Dictionaries and two ILists, so I think what equality means is clear - if the two dictionaries contain the same keys ma...
[ { "answer_id": 43505, "author": "Glenn Slaven", "author_id": 2975, "author_profile": "https://Stackoverflow.com/users/2975", "pm_score": 9, "selected": true, "text": "Enumerable.SequenceEqual" }, { "answer_id": 43506, "author": "aku", "author_id": 1196, "author_profil...
2008/09/04
[ "https://Stackoverflow.com/questions/43500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2348/" ]
43,503
<p>Is there a way to detect if a flash movie contains any sound or is playing any music?<br> It would be nice if this could be done inside a webbrowser (actionscript <strong>from another flash object</strong>, javascript,..) and could be done <em>before</em> the flash movie starts playing.</p> <p>However, I have my do...
[ { "answer_id": 43519, "author": "Stu Thompson", "author_id": 2961, "author_profile": "https://Stackoverflow.com/users/2961", "pm_score": 3, "selected": true, "text": "FIELD DATA TYPE EXAMPLE DESCRIPTION\n Signature byte[3] “FLV” Alw...
2008/09/04
[ "https://Stackoverflow.com/questions/43503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46/" ]
43,507
<p>I have seen simple example Ajax source codes in many online tutorials. What I want to know is whether using the source code in the examples are perfectly alright or not?</p> <p>Is there anything more to be added to the code that goes into a real world application?</p> <p>What all steps are to be taken to make the ...
[ { "answer_id": 43515, "author": "Staale", "author_id": 3355, "author_profile": "https://Stackoverflow.com/users/3355", "pm_score": 0, "selected": false, "text": "new Ajax.Request('/some_url',\n {\n method:'get',\n onSuccess: function(transport){\n var response = transport.res...
2008/09/04
[ "https://Stackoverflow.com/questions/43507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/184/" ]
43,511
<p>I have some classes layed out like this</p> <pre><code>class A { public virtual void Render() { } } class B : A { public override void Render() { // Prepare the object for rendering SpecialRender(); // Do some cleanup } protected virtual void SpecialRender() ...
[ { "answer_id": 43516, "author": "Matt Hamilton", "author_id": 615, "author_profile": "https://Stackoverflow.com/users/615", "pm_score": 6, "selected": true, "text": "public sealed override void Render()\n{\n // Prepare the object for rendering \n SpecialRender();\n // Do ...
2008/09/04
[ "https://Stackoverflow.com/questions/43511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3602/" ]
43,524
<p>It is slow to load anything other than a small project. It is slow to quit; it can sometimes take minutes. It can be slow to open new files. The record macro feature used to be useful. It is now so slow to start up it's almost always quicker to do it manually!</p> <hr> <blockquote> <p>More info would be helpful....
[ { "answer_id": 260385, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "#include <stdio.h>\n#include <windows.h>\n\nint main(char argc, char *argv[])\n{\n printf(\"Hello World\\n\");\n return 0;...
2008/09/04
[ "https://Stackoverflow.com/questions/43524", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3233/" ]
43,525
<p>For some strange, bizarre reason, my images in my website just will not display on webkit based languages (such as safari and chrome).</p> <p>This is the image tag</p> <pre><code>&lt;img src="images/dukkah.jpg" class="imgleft"/&gt; </code></pre> <p>Not only does it not display in the website, it wont display when...
[ { "answer_id": 37536836, "author": "Matt", "author_id": 1318694, "author_profile": "https://Stackoverflow.com/users/1318694", "pm_score": 0, "selected": false, "text": "$ curl -s http://kilkin.massiveatom.com/kilkin/images/dukkah.jpg\n<html><head></head><body><!-- vbe --></body></html>\n...
2008/09/04
[ "https://Stackoverflow.com/questions/43525", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2592/" ]