qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
52,092
<p>This caught my attention last night.</p> <p>On the latest <a href="http://altnetpodcast.com/episodes/10-oop-in-ruby" rel="nofollow noreferrer">ALT.NET Podcast</a> Scott Bellware discusses how as opposed to Ruby, languages like C#, Java et al. are not truly object oriented rather opting for the phrase &quot;class-ori...
[ { "answer_id": 52107, "author": "Daren Thomas", "author_id": 2260, "author_profile": "https://Stackoverflow.com/users/2260", "pm_score": 2, "selected": false, "text": "__iter__()" }, { "answer_id": 93409, "author": "Gishu", "author_id": 1695, "author_profile": "https:...
2008/09/09
[ "https://Stackoverflow.com/questions/52092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5056/" ]
52,098
<p>I'm developing an application for Windows Mobile Devices using Visual Studio .NET 2008 whose UI requires the use of a ComboBox control. Unfortunately, for devices with neither a hardware fullsize keyboard nor a touchscreen interface, there is no way to move (tab) from the ComboBox control to another control on the s...
[ { "answer_id": 52116, "author": "Billy Jo", "author_id": 3447, "author_profile": "https://Stackoverflow.com/users/3447", "pm_score": 2, "selected": true, "text": "KeyDown" } ]
2008/09/09
[ "https://Stackoverflow.com/questions/52098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1943/" ]
52,108
<p>What is the shortcut to open a file within your solution in Visual Studio 2008 (+ Resharper)?</p>
[ { "answer_id": 79864, "author": "Steve Steiner", "author_id": 3892, "author_profile": "https://Stackoverflow.com/users/3892", "pm_score": 2, "selected": false, "text": ">of f" }, { "answer_id": 106681, "author": "Hamish Smith", "author_id": 15572, "author_profile": "h...
2008/09/09
[ "https://Stackoverflow.com/questions/52108", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4140/" ]
52,134
<p>How can I tell from the assembly name, or assembly class (or others like it), whether an assembly is part of the <a href="http://en.wikipedia.org/wiki/.NET_Framework" rel="noreferrer">.NET</a> framework (that is, <code>System.windows.Forms</code>)?</p> <p>So far I've considered the PublicKeyToken, and CodeBase prop...
[ { "answer_id": 52199, "author": "TheSmurf", "author_id": 1975282, "author_profile": "https://Stackoverflow.com/users/1975282", "pm_score": 1, "selected": false, "text": "C:\\Windows\\Microsoft.NET\\Framework" }, { "answer_id": 749535, "author": "Community", "author_id": -...
2008/09/09
[ "https://Stackoverflow.com/questions/52134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4002/" ]
52,160
<p>How can you obtain the Type (the name as a string is sufficient) of an Object in VB6 at runtime?</p> <p>i.e. something like:</p> <pre><code>If Typeof(foobar) = "CommandButton" Then ... </code></pre> <p><strong>/EDIT:</strong> to clarify, I need to check on Dynamically Typed objects. An example:</p> <pre><code>Di...
[ { "answer_id": 52181, "author": "Daren Thomas", "author_id": 2260, "author_profile": "https://Stackoverflow.com/users/2260", "pm_score": 0, "selected": false, "text": "IDispatch" }, { "answer_id": 52243, "author": "Kris Erickson", "author_id": 3798, "author_profile": ...
2008/09/09
[ "https://Stackoverflow.com/questions/52160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111/" ]
52,176
<p>Since Graduating from a very small school in 2006 with a badly shaped &amp; outdated program (I'm a foreigner &amp; didn't know any better school at the time) I've come to realize that I missed a lot of basic concepts from a mathematical &amp; software perspective that are mostly the foundations of other higher conc...
[ { "answer_id": 52338, "author": "joel.neely", "author_id": 3525, "author_profile": "https://Stackoverflow.com/users/3525", "pm_score": 4, "selected": false, "text": "if (condition-1) {\n if (condition-2) {\n action-1\n } else {\n action-2\n} else {\n action-2\n}\n"...
2008/09/09
[ "https://Stackoverflow.com/questions/52176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5413/" ]
52,187
<p>I need to test a serial port application on Linux, however, my test machine only has one serial port. </p> <p>Is there a way to add a virtual serial port to Linux and test my application by emulating a device through a shell or script?</p> <p>Note: I cannot remap the port, it hard coded on ttys2 and I need to test...
[ { "answer_id": 74517, "author": "apenwarr", "author_id": 42219, "author_profile": "https://Stackoverflow.com/users/42219", "pm_score": 7, "selected": true, "text": "/dev/ptyp5" }, { "answer_id": 10555885, "author": "slonik", "author_id": 1384839, "author_profile": "ht...
2008/09/09
[ "https://Stackoverflow.com/questions/52187", "https://Stackoverflow.com", "https://Stackoverflow.com/users/445087/" ]
52,213
<p>When a user hits Refresh on their browser, it reloads the page but keeps the contents of form fields. While I can see this being a useful default, it can be annoying on some dynamic pages, leading to a broken user experience.</p> <p>Is there a way, in HTTP headers or equivalents, to change this behaviour?</p>
[ { "answer_id": 52226, "author": "Joseph Bui", "author_id": 3275, "author_profile": "https://Stackoverflow.com/users/3275", "pm_score": 6, "selected": true, "text": "<input autocomplete=\"off\">\n" }, { "answer_id": 52229, "author": "Espo", "author_id": 2257, "author_p...
2008/09/09
[ "https://Stackoverflow.com/questions/52213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000/" ]
52,234
<p>Creating a patch is very easy in SubVersion, With Tortoise, you right-click and select Create Patch. But for the life of me, I can't find this functionality in TFS. Is this possible?</p> <p>If not, what's the standard way to submit patches in open source TFS hosted projects (a la CodePlex)?</p>
[ { "answer_id": 52242, "author": "Curt Hagenlocher", "author_id": 533, "author_profile": "https://Stackoverflow.com/users/533", "pm_score": 7, "selected": true, "text": "tf diff /shelveset:shelveset /format:unified\n" } ]
2008/09/09
[ "https://Stackoverflow.com/questions/52234", "https://Stackoverflow.com", "https://Stackoverflow.com/users/736/" ]
52,238
<p>How can I use the Prototype library and create unobtrusive javascript to inject the onmouseover and onmouseout events to each row, rather than putting the javascript in each table row tag?</p> <p>An answer utilizing the Prototype library (instead of mootools, jQuery, etc) would be most helpful.</p>
[ { "answer_id": 52250, "author": "pix0r", "author_id": 72, "author_profile": "https://Stackoverflow.com/users/72", "pm_score": 3, "selected": false, "text": "addClassName" }, { "answer_id": 52253, "author": "swilliams", "author_id": 736, "author_profile": "https://Stac...
2008/09/09
[ "https://Stackoverflow.com/questions/52238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3920/" ]
52,239
<p>We are working with an oracle database in which the person that set it up is "long gone" and thus do not know the sysdba password, but need it. We have root access to the box (its on linux). Is there any way to recover or change the sys passwords?</p>
[ { "answer_id": 52244, "author": "Paul Hargreaves", "author_id": 5330, "author_profile": "https://Stackoverflow.com/users/5330", "pm_score": 6, "selected": true, "text": "sqlplus \"/ as sysdba\"\n" }, { "answer_id": 34349844, "author": "Lalit Kumar B", "author_id": 3989608...
2008/09/09
[ "https://Stackoverflow.com/questions/52239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/673/" ]
52,256
<p>I need to check programmatically (in .NET) whether a given user (domain account) is a member of the built-in Administrators group on a current computer (the one where the application gets executed).</p> <p>Is it possible?</p>
[ { "answer_id": 52257, "author": "Espo", "author_id": 2257, "author_profile": "https://Stackoverflow.com/users/2257", "pm_score": 1, "selected": false, "text": "System.DirectoryServices.AccountManagement" }, { "answer_id": 310125, "author": "Ryan", "author_id": 20198, ...
2008/09/09
[ "https://Stackoverflow.com/questions/52256", "https://Stackoverflow.com", "https://Stackoverflow.com/users/95/" ]
52,286
<p>Wrote the following in PowersHell as a quick iTunes demonstration:</p> <pre><code>$iTunes = New-Object -ComObject iTunes.Application $LibrarySource = $iTunes.LibrarySource foreach ($PList in $LibrarySource.Playlists) { write-host $PList.name } </code></pre> <p>This works well and pulls back a list of playlist na...
[ { "answer_id": 52309, "author": "bruceatk", "author_id": 791, "author_profile": "https://Stackoverflow.com/users/791", "pm_score": 3, "selected": true, "text": "\n [void][System.Runtime.InteropServices.Marshal]::ReleaseComObject([System.__ComObject]$LibrarySource)\n [void][System.R...
2008/09/09
[ "https://Stackoverflow.com/questions/52286", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5330/" ]
52,312
<p>So, I know that try/catch does add some overhead and therefore isn't a good way of controlling process flow, but where does this overhead come from and what is its actual impact?</p>
[ { "answer_id": 52330, "author": "Tobi", "author_id": 5422, "author_profile": "https://Stackoverflow.com/users/5422", "pm_score": 3, "selected": false, "text": "bool HasRight(string rightName, DomainObject obj) {\n try {\n CheckRight(rightName, obj);\n return true;\n }\n catch (E...
2008/09/09
[ "https://Stackoverflow.com/questions/52312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4541/" ]
52,313
<p>This question is kind of an add-on to this <a href="https://stackoverflow.com/questions/44905/c-switch-statement-limitations-why">question</a></p> <p>In C#, a switch case cannot fall through to other cases, this causes a compilation error. In this case I am just adding some number to the month total for the select...
[ { "answer_id": 52318, "author": "Ben Scheirman", "author_id": 3381, "author_profile": "https://Stackoverflow.com/users/3381", "pm_score": 5, "selected": true, "text": "foreach(MonthSpecification spec in this.MonthSpecifications)\n{\n if(spec.IsSatisfiedBy(month))\n spec.Perform(m...
2008/09/09
[ "https://Stackoverflow.com/questions/52313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4144/" ]
52,315
<p>We have some input data that sometimes appears with &amp;nbsp characters on the end.</p> <p>The data comes in from the source system as varchar() and our attempts to cast as decimal fail b/c of these characters.</p> <p>Ltrim and Rtrim don't remove the characters, so we're forced to do something like:</p> <pre><co...
[ { "answer_id": 52327, "author": "Espo", "author_id": 2257, "author_profile": "https://Stackoverflow.com/users/2257", "pm_score": 4, "selected": true, "text": "-- Put something like this into a user function:\nDECLARE @cString VARCHAR(32)\nDECLARE @nPos INTEGER\nSELECT @cString = '...
2008/09/09
[ "https://Stackoverflow.com/questions/52315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5202/" ]
52,321
<p>Using the obsolete System.Web.Mail sending email works fine, here's the code snippet:</p> <pre><code> Public Shared Sub send(ByVal recipent As String, ByVal from As String, ByVal subject As String, ByVal body As String) Try Dim Message As System.Web.Mail.MailMessage = New System.Web.Mail.MailMes...
[ { "answer_id": 52361, "author": "Kevin Fairchild", "author_id": 3743, "author_profile": "https://Stackoverflow.com/users/3743", "pm_score": 0, "selected": false, "text": "smtp.UseDefaultCredentials = True \n" }, { "answer_id": 52371, "author": "David Basarab", "author_id"...
2008/09/09
[ "https://Stackoverflow.com/questions/52321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4827/" ]
52,344
<p>I'm thinking this might be a quick and easy way to lower the form spam on our site just a little bit. The idea being that (I have read) spammers aren't running with javascript enabled. (Or at least they are accessing your website without running javascript. I.e., they aren't browsing up to it in IE or FF.</p> <p>I ...
[ { "answer_id": 52372, "author": "Brian Warshaw", "author_id": 1344, "author_profile": "https://Stackoverflow.com/users/1344", "pm_score": 0, "selected": false, "text": "noscript" }, { "answer_id": 52379, "author": "chrisofspades", "author_id": 2614, "author_profile": ...
2008/09/09
[ "https://Stackoverflow.com/questions/52344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4906/" ]
52,353
<p>I have an application that reads a CSV file with piles of data rows. I give the user a summary of the number of rows based on types of data, but I want to make sure that I don't read in too many rows of data and cause <code>OutOfMemoryError</code>s. Each row translates into an object. Is there an easy way to find...
[ { "answer_id": 52362, "author": "jodonnell", "author_id": 4223, "author_profile": "https://Stackoverflow.com/users/4223", "pm_score": -1, "selected": false, "text": "Serializable myObject;\nObjectOutputStream oos = new ObjectOutputStream (new FileOutputStream (\"obj.ser\"));\noos.write (...
2008/09/09
[ "https://Stackoverflow.com/questions/52353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5074/" ]
52,356
<p>I'm still fairly new to T-SQL and SQL 2005. I need to import a column of integers from a table in database1 to a identical table (only missing the column I need) in database2. Both are sql 2005 databases. I've tried the built in import command in Server Management Studio but it's forcing me to copy the entire table....
[ { "answer_id": 52376, "author": "Peter", "author_id": 5189, "author_profile": "https://Stackoverflow.com/users/5189", "pm_score": 2, "selected": false, "text": "INSERT INTO Datbase1..MyTable\n (ColumnList)\nSELECT FieldsIWant\n FROM Database2..MyTable\n" }, { "answer_id": 524...
2008/09/09
[ "https://Stackoverflow.com/questions/52356", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5433/" ]
52,357
<p>I've been wondering, what is the point of clog? As near as I can tell, clog is the same as cerr but with buffering so it is more efficient. Usually stderr is the same as stdout, so clog is the same as cout. This seems pretty lame to me, so I figure I must be misunderstanding it. If I have log messages going out to t...
[ { "answer_id": 52365, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 6, "selected": true, "text": "rdbuf" }, { "answer_id": 52381, "author": "Ben Collins", "author_id": 3279, "author_profile": "http...
2008/09/09
[ "https://Stackoverflow.com/questions/52357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4662/" ]
52,359
<p>I'm trying to reduce the form spam on our website. (It's actually pretty recent).</p> <p>I seem to remember reading somewhere that the spammers aren't executing the Javascript on the site.</p> <p>Is that true? And if so, then could you simply check for javascript being disabled and then figure it's <em>likely</em>...
[ { "answer_id": 52382, "author": "Jason Bunting", "author_id": 1790, "author_profile": "https://Stackoverflow.com/users/1790", "pm_score": 1, "selected": false, "text": "<noscript>" }, { "answer_id": 52392, "author": "Jason Navarrete", "author_id": 3920, "author_profil...
2008/09/09
[ "https://Stackoverflow.com/questions/52359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4906/" ]
52,360
<p>What are the different ways (programmatically and otherwise) to determine what versions of .NET are running on a system?</p>
[ { "answer_id": 52422, "author": "Ryan Farley", "author_id": 1627, "author_profile": "https://Stackoverflow.com/users/1627", "pm_score": 2, "selected": false, "text": "System.Environment.Version\n" }, { "answer_id": 3161437, "author": "cognitiaclaeves", "author_id": 305442...
2008/09/09
[ "https://Stackoverflow.com/questions/52360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2141/" ]
52,398
<p>So I have some files I want to ignore in a subversion repository, but I don't want my ignore patterns for this to be propagated to the repository.</p> <p>In other words, I added some private files in my checkout that I want to keep, but they only exist for me and wouldn't make sense to be ignored for everyone, so i...
[ { "answer_id": 52574, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": ".subversion" } ]
2008/09/09
[ "https://Stackoverflow.com/questions/52398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/122/" ]
52,400
<p>I'm sure this has already been asked and answered so I apologize in advance for that but I'm not figuring out the correct keywords to search for. Searching for "Pattern" hits way too many Q &amp; A's to be useful.</p> <p>I'm working on a regression testing app. I'm displaying a form on the screen and according to...
[ { "answer_id": 52481, "author": "maccullt", "author_id": 4945, "author_profile": "https://Stackoverflow.com/users/4945", "pm_score": 3, "selected": true, "text": "Field1ReadonlyRules = {\n 'user class 1' : True,\n 'user class 2' : False\n}\n\nfield1.readOnly = Field1ReadonlyRules[ ...
2008/09/09
[ "https://Stackoverflow.com/questions/52400", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2820/" ]
52,430
<p>I've got the following rough structure:</p> <pre><code>Object -&gt; Object Revisions -&gt; Data </code></pre> <p>The Data can be shared between several Objects.</p> <p>What I'm trying to do is clean out old Object Revisions. I want to keep the first, active, and a spread of revisions so that the last change for a...
[ { "answer_id": 52455, "author": "Peter", "author_id": 5189, "author_profile": "https://Stackoverflow.com/users/5189", "pm_score": 2, "selected": false, "text": "SELECT DATEDIFF(HOUR, prev.ActivityDate, curr.ActivityDate)\n FROM MyTable curr\n JOIN MyTable prev\n ON prev.ObjectID = c...
2008/09/09
[ "https://Stackoverflow.com/questions/52430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5201/" ]
52,438
<p>I've been doing c# for a long time, and have never come across an easy way to just new up a hash.</p> <p>I've recently become acquainted with the ruby syntax of hashes and wonder, does anyone know of a simple way to declare a hash as a literal, without doing all the add calls.</p> <pre><code>{ "whatever" =&gt; {i ...
[ { "answer_id": 52443, "author": "Wheelie", "author_id": 1131, "author_profile": "https://Stackoverflow.com/users/1131", "pm_score": 6, "selected": true, "text": "var students = new Dictionary<int, StudentName>()\n{\n { 111, new StudentName {FirstName=\"Sachin\", LastName=\"Karnik\", I...
2008/09/09
[ "https://Stackoverflow.com/questions/52438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1220/" ]
52,449
<p>Can I return it as an object if I am doing a </p> <pre><code>Select OneItem from Table Where OtherItem = "blah"? </code></pre> <p>Is there a better way to do this?</p> <p>I am building a constructor to return an object based on its name rather than its ID.</p>
[ { "answer_id": 52470, "author": "Ben Scheirman", "author_id": 3381, "author_profile": "https://Stackoverflow.com/users/3381", "pm_score": 4, "selected": true, "text": "query.UniqueResult<T>()" }, { "answer_id": 214317, "author": "kͩeͣmͮpͥ ͩ", "author_id": 26479, "auth...
2008/09/09
[ "https://Stackoverflow.com/questions/52449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4140/" ]
52,485
<p>I have a Question class:</p> <pre><code>class Question { public int QuestionNumber { get; set; } public string Question { get; set; } public string Answer { get; set; } } </code></pre> <p>Now I make an ICollection of these available through an ObjectDataSource, and display them using a Repeater bound t...
[ { "answer_id": 52513, "author": "Ben Scheirman", "author_id": 3381, "author_profile": "https://Stackoverflow.com/users/3381", "pm_score": 2, "selected": true, "text": "foreach(RepeaterItem item in rptQuestions.Items)\n{\n //pull out question\n var question = (Question)item.DataItem;\...
2008/09/09
[ "https://Stackoverflow.com/questions/52485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/366/" ]
52,492
<p>I just started using GNU Emacs as my text editor and I am concerned about getting afflicted with "<a href="http://en.wikipedia.org/wiki/Emacs#Emacs_pinky" rel="nofollow noreferrer">Emacs Pinky</a>" by having to constantly press the control key with my pinky finger as is required when using Emacs. How can I avoid pot...
[ { "answer_id": 52564, "author": "Eric Z Beard", "author_id": 1219, "author_profile": "https://Stackoverflow.com/users/1219", "pm_score": 3, "selected": false, "text": "[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Keyboard Layout] \"Scancode Map\"=hex:00,00,00,00,00,00,00,00,0...
2008/09/09
[ "https://Stackoverflow.com/questions/52492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
52,506
<p>A friend and I were discussing C++ templates. He asked me what this should do:</p> <pre><code>#include &lt;iostream&gt; template &lt;bool&gt; struct A { A(bool) { std::cout &lt;&lt; "bool\n"; } A(void*) { std::cout &lt;&lt; "void*\n"; } }; int main() { A&lt;true&gt; *d = 0; const int b = 2; co...
[ { "answer_id": 52617, "author": "Leon Timmermans", "author_id": 4727, "author_profile": "https://Stackoverflow.com/users/4727", "pm_score": 4, "selected": true, "text": "new A<b>(c) > d" }, { "answer_id": 52875, "author": "Lee Baldwin", "author_id": 5200, "author_prof...
2008/09/09
[ "https://Stackoverflow.com/questions/52506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4798/" ]
52,550
<p>What does the <code>,</code> operator do in C?</p>
[ { "answer_id": 52558, "author": "lillq", "author_id": 2064, "author_profile": "https://Stackoverflow.com/users/2064", "pm_score": 8, "selected": true, "text": "(expression1, expression2)\n" }, { "answer_id": 52559, "author": "Ben Collins", "author_id": 3279, "author_...
2008/09/09
[ "https://Stackoverflow.com/questions/52550", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2064/" ]
52,557
<p>Anyone know this compiler feature? It seems GCC support that. How does it work? What is the potential gain? In which case it's good? Inner loops?</p> <p>(this question is specific, not about optimization in general, thanks)</p>
[ { "answer_id": 52569, "author": "Jason Cohen", "author_id": 4926, "author_profile": "https://Stackoverflow.com/users/4926", "pm_score": 2, "selected": false, "text": "gperf" } ]
2008/09/09
[ "https://Stackoverflow.com/questions/52557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1277510/" ]
52,561
<p>What is iPhone's browser tag and how iPhone optimized web site is different from a usual mobile web site?</p> <p>Thanks!</p>
[ { "answer_id": 52570, "author": "Espen Herseth Halvorsen", "author_id": 1542, "author_profile": "https://Stackoverflow.com/users/1542", "pm_score": 2, "selected": true, "text": "<!--#if expr=\"(${HTTP_USER_AGENT} = /iPhone/)\"--> \n\n<!-- \nplace iPhone code in here \n--> \n\n<!--#...
2008/09/09
[ "https://Stackoverflow.com/questions/52561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4808/" ]
52,563
<p>I'm trying to let an <code>&lt;input type="text"&gt;</code> (henceforth referred to as “textbox”) fill a parent container by settings its <code>width</code> to <code>100%</code>. This works until I give the textbox a padding. This is then added to the content width and the input field overflows. Notice that in Firef...
[ { "answer_id": 52575, "author": "Darren Kopp", "author_id": 77, "author_profile": "https://Stackoverflow.com/users/77", "pm_score": 0, "selected": false, "text": "margin: -1em;\n" }, { "answer_id": 52633, "author": "David Kolar", "author_id": 3283, "author_profile": "...
2008/09/09
[ "https://Stackoverflow.com/questions/52563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1968/" ]
52,591
<p>A requirement for an ASP.Net 2.0 project I'm working on limits a certain field to a max of 10 words (not characters). I'm currently using a CustomValidator control with the following ServerValidate method:</p> <pre><code>Protected Sub TenWordsTextBoxValidator_ServerValidate(ByVal source As Object, ByVal args As Sys...
[ { "answer_id": 52610, "author": "Michael Haren", "author_id": 29, "author_profile": "https://Stackoverflow.com/users/29", "pm_score": 3, "selected": false, "text": "(\\b.*\\b){0,10}\n" }, { "answer_id": 52737, "author": "travis", "author_id": 1414, "author_profile": "...
2008/09/09
[ "https://Stackoverflow.com/questions/52591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1414/" ]
52,600
<p>I have to use a third-party component without source code. I have the release DLL and release PDB file. Let's call it 'CorporateComponent.dll'. My own code creates objects from this DLL and calls methods on these objects.</p> <pre><code>CorpObject o = new CorpObject(); Int32 result = o.DoSomethingLousy(); </code></...
[ { "answer_id": 53095, "author": "Henk", "author_id": 4613, "author_profile": "https://Stackoverflow.com/users/4613", "pm_score": 4, "selected": true, "text": "Symbols loaded" } ]
2008/09/09
[ "https://Stackoverflow.com/questions/52600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3619/" ]
52,646
<p>While cross-site scripting is generally regarded as negative, I've run into several situations where it's necessary.</p> <p>I was recently working within the confines of a very limiting content management system. I needed to include database code within the page, but the hosting server didn't have anything usable ...
[ { "answer_id": 2802549, "author": "plop", "author_id": 337228, "author_profile": "https://Stackoverflow.com/users/337228", "pm_score": 0, "selected": false, "text": "document.domain" } ]
2008/09/09
[ "https://Stackoverflow.com/questions/52646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1581/" ]
52,652
<p>What are the available libraries for creating pretty charts and graphs in a Python application?</p>
[ { "answer_id": 926029, "author": "serbaut", "author_id": 84760, "author_profile": "https://Stackoverflow.com/users/84760", "pm_score": 4, "selected": false, "text": "from reportlab.graphics.shapes import Drawing\nfrom reportlab.graphics.charts.barcharts import VerticalBarChart\n\nd = Dra...
2008/09/09
[ "https://Stackoverflow.com/questions/52652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/473/" ]
52,657
<p>How are people unit testing code that uses Linq to SQL? </p>
[ { "answer_id": 9353934, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "public class ProductRepo {\n IExampleDataContext DB { get; set };\n public ProductRepo(IExampleDataContext db) {\n ...
2008/09/09
[ "https://Stackoverflow.com/questions/52657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5189/" ]
52,674
<p>Let's say you have a variable in a makefile fragment like the following:</p> <pre><code>MY_LIST=a b c d </code></pre> <p>How do I then reverse the order of that list? I need:</p> <pre><code>$(warning MY_LIST=${MY_LIST}) </code></pre> <p>to show</p> <pre><code>MY_LIST=d c b a </code></pre> <p>Edit: the real ...
[ { "answer_id": 52722, "author": "Ben Collins", "author_id": 3279, "author_profile": "https://Stackoverflow.com/users/3279", "pm_score": 3, "selected": false, "text": "(for d in ${MY_LIST}; do echo $$d; done) | tac" }, { "answer_id": 52903, "author": "ajax", "author_id": 5...
2008/09/09
[ "https://Stackoverflow.com/questions/52674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3279/" ]
52,676
<p>I'm a keyboard junkie. I love having a key sequence to do everything. What are your favorite keyboard shortcuts?</p> <p>I'll start by naming a couple of mine:</p> <p>1 - <kbd>Alt</kbd>-<kbd>Space</kbd> to access the windows menu for the current window</p> <p>2 - <kbd>F2</kbd> to rename a file in Windows Explore...
[ { "answer_id": 843863, "author": "Peter Perháč", "author_id": 81520, "author_profile": "https://Stackoverflow.com/users/81520", "pm_score": 1, "selected": false, "text": "rightclick->Open Link in New Tab" }, { "answer_id": 19919862, "author": "Scott Pelak", "author_id": 2...
2008/09/09
[ "https://Stackoverflow.com/questions/52676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/672/" ]
52,702
<p>I am looking to stream a file housed in a SharePoint 2003 document library down to the browser. Basically the idea is to open the file as a stream and then to "write" the file stream to the reponse, specifying the content type and content disposition headers. Content disposition is used to preserve the file name, ...
[ { "answer_id": 53078, "author": "Mauro", "author_id": 2208, "author_profile": "https://Stackoverflow.com/users/2208", "pm_score": 2, "selected": false, "text": "\nResponse.AddHeader(\"Content-Disposition\", \"attachment;filename=myfile.doc\");\n" }, { "answer_id": 77958, "aut...
2008/09/09
[ "https://Stackoverflow.com/questions/52702", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4764/" ]
52,703
<p>Has anyone encountered this oddity?</p> <p>I'm checking for the existence of a number of directories in one of my unit tests. <code>is_dir</code> is reporting true (1) in spite of the folder not existing at the time it is called. The code looks like this (with a few extraneous intermediate vars to ease debugging):<...
[ { "answer_id": 52712, "author": "reefnet_alex", "author_id": 2745, "author_profile": "https://Stackoverflow.com/users/2745", "pm_score": 1, "selected": false, "text": "is_readable" }, { "answer_id": 52721, "author": "dragonmantank", "author_id": 204, "author_profile":...
2008/09/09
[ "https://Stackoverflow.com/questions/52703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2745/" ]
52,704
<p>How do I discard changes in my working copy that are not in the index?</p>
[ { "answer_id": 52713, "author": "Tobi", "author_id": 5422, "author_profile": "https://Stackoverflow.com/users/5422", "pm_score": 13, "selected": false, "text": "git restore .\n" }, { "answer_id": 52719, "author": "Greg Hewgill", "author_id": 893, "author_profile": "ht...
2008/09/09
[ "https://Stackoverflow.com/questions/52704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
52,714
<p>In the STL almost all containers have an erase function. The question I have is in a vector, the erase function returns an iterator pointing to the next element in the vector. The map container does not do this. Instead it returns a void. Anyone know why there is this inconsistancy?</p>
[ { "answer_id": 52735, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 3, "selected": false, "text": "vector" }, { "answer_id": 52761, "author": "Henk", "author_id": 4613, "author_profile": "https://S...
2008/09/09
[ "https://Stackoverflow.com/questions/52714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2328/" ]
52,732
<p>I need to dynamically create a Video object in ActionScript 2 and add it to a movie clip. In AS3 I just do this:</p> <pre><code>var videoViewComp:UIComponent; // created elsewhere videoView = new Video(); videoView.width = 400; videoView.height = 400; this.videoViewComp.addChild(videoView); </code></pre> <p>...
[ { "answer_id": 53254, "author": "Pedro", "author_id": 5488, "author_profile": "https://Stackoverflow.com/users/5488", "pm_score": 0, "selected": false, "text": "videoview.visible = false" }, { "answer_id": 3603369, "author": "Tonio FERENER-VARI", "author_id": 435264, ...
2008/09/09
[ "https://Stackoverflow.com/questions/52732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1409/" ]
52,739
<p>Is there a good way to see what format an image is, without having to read the entire file into memory? </p> <p>Obviously this would vary from format to format (I'm particularly interested in TIFF files) but what sort of procedure would be useful to determine what kind of image format a file is without having to re...
[ { "answer_id": 52750, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 5, "selected": true, "text": "file" }, { "answer_id": 52833, "author": "verix", "author_id": 5342, "author_profile": "https://Stackov...
2008/09/09
[ "https://Stackoverflow.com/questions/52739", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2577/" ]
52,753
<p>What is best practice when creating your exception classes in a .NET solution: To derive from <code>System.Exception</code> or from <code>System.ApplicationException</code>?</p>
[ { "answer_id": 52762, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 4, "selected": false, "text": "ApplicationException" }, { "answer_id": 52770, "author": "fryguybob", "author_id": 4592, "author_p...
2008/09/09
[ "https://Stackoverflow.com/questions/52753", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5392/" ]
52,755
<p>I am using Windows, and I have two monitors.</p> <p>Some applications will <em>always</em> start on my primary monitor, no matter where they were when I closed them.</p> <p>Others will always start on the <em>secondary</em> monitor, no matter where they were when I closed them.</p> <p>Is there a registry setting ...
[ { "answer_id": 53187, "author": "David Citron", "author_id": 5309, "author_profile": "https://Stackoverflow.com/users/5309", "pm_score": 7, "selected": true, "text": "GetWindowPlacement()" }, { "answer_id": 511735, "author": "Community", "author_id": -1, "author_profi...
2008/09/09
[ "https://Stackoverflow.com/questions/52755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/672/" ]
52,785
<p>I think this is specific to IE 6.0 but...</p> <p>In JavaScript I add a <code>div</code> to the DOM. I assign an <code>id</code> attribute. When I later try to pick up the <code>div</code> by the <code>id</code> all I get is <code>null</code>.</p> <p>Any suggestions?</p> <p>Example:</p> <pre><code>var newDiv = do...
[ { "answer_id": 52791, "author": "David Basarab", "author_id": 2469, "author_profile": "https://Stackoverflow.com/users/2469", "pm_score": 1, "selected": false, "text": "// Create the Div\nvar oDiv = document.createElement('div');\ndocument.body.appendChild(oDiv);\n" }, { "answer_...
2008/09/09
[ "https://Stackoverflow.com/questions/52785", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2490/" ]
52,794
<p>How do I create a branch in subversion that is deeper' than just the 'branches' directory?</p> <p>I have the standard <code>trunk</code>, <code>tags</code> and <code>branches</code> structure and I want to create a branch that is several directories deeper than the 'branches' tag.</p> <p>Using the standard svn mov...
[ { "answer_id": 52799, "author": "Blair Conrad", "author_id": 1199, "author_profile": "https://Stackoverflow.com/users/1199", "pm_score": 5, "selected": true, "text": "svn copy --parents http://url/to/subproject http://url/to/repository/branches/version_1/project/subproject\n" }, { ...
2008/09/09
[ "https://Stackoverflow.com/questions/52794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/277/" ]
52,797
<p>Is there a way to get the path for the assembly in which the current code resides? I do not want the path of the calling assembly, just the one containing the code. </p> <p>Basically my unit test needs to read some xml test files which are located relative to the dll. I want the path to always resolve correctly ...
[ { "answer_id": 52802, "author": "jodonnell", "author_id": 4223, "author_profile": "https://Stackoverflow.com/users/4223", "pm_score": 5, "selected": false, "text": "string path = System.Reflection.Assembly.GetExecutingAssembly().Location\n" }, { "answer_id": 52803, "author": ...
2008/09/09
[ "https://Stackoverflow.com/questions/52797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5056/" ]
52,806
<p>As part of a larger web-app (using CakePHP), I'm putting together a simple blog system. The relationships are exceedingly simple: each User has a Blog, which has many Entries, which have many Comments.</p> <p>An element I'd like to incorporate is a list of "Popular Entries." Popular Entries have been defined as tho...
[ { "answer_id": 52814, "author": "jodonnell", "author_id": 4223, "author_profile": "https://Stackoverflow.com/users/4223", "pm_score": 2, "selected": false, "text": "SELECT entry-id, count(id) AS c \nFROM comment \nWHERE comment.createdate >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) \nGROUP ...
2008/09/09
[ "https://Stackoverflow.com/questions/52806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5030/" ]
52,821
<pre><code>var e1 = new E1(); e1.e2s.Add(new e2()); //e2s is null until e1 is saved, i want to save them all at the same time context.e1s.imsertonsubmit(e1); context.submitchanges(); </code></pre>
[ { "answer_id": 52870, "author": "John Christensen", "author_id": 1194, "author_profile": "https://Stackoverflow.com/users/1194", "pm_score": 0, "selected": false, "text": "var e1 = new E1();\nvar e2 = new e2();\ne1.e2s.Add(e2); //e2s is null until e1 is saved, i want to save them all at ...
2008/09/09
[ "https://Stackoverflow.com/questions/52821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5236/" ]
52,822
<p>How can you import a foxpro DBF file in SQL Server?</p>
[ { "answer_id": 52828, "author": "SQLMenace", "author_id": 740, "author_profile": "https://Stackoverflow.com/users/740", "pm_score": 5, "selected": true, "text": "SELECT * into SomeTable\nFROM OPENROWSET('MSDASQL', 'Driver=Microsoft Visual FoxPro Driver;\nSourceDB=\\\\SomeServer\\SomePath...
2008/09/09
[ "https://Stackoverflow.com/questions/52822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4685/" ]
52,824
<p>Is it possible to merge to a branch that is not a direct parent or child in TFS? I suspect that the answer is no as this is what I've experienced while using it. However, it seems that at certain times it would be really useful when there are different features being worked on that may have different approval cycl...
[ { "answer_id": 52894, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 3, "selected": false, "text": "tf.exe merge /recursive /baseless $/TeamProject/SourceBranch $/TeamProject/TargetBranch\n" }, { "answer_id": 5290...
2008/09/09
[ "https://Stackoverflow.com/questions/52824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5416/" ]
52,842
<p><code>System.IO.Directory.GetFiles()</code> returns a <code>string[]</code>. What is the default sort order for the returned values? I'm assuming by name, but if so how much does the current culture effect it? Can you change it to something like creation date? </p> <p><strong>Update:</strong> MSDN points out tha...
[ { "answer_id": 52847, "author": "Kibbee", "author_id": 1862, "author_profile": "https://Stackoverflow.com/users/1862", "pm_score": 3, "selected": false, "text": "Dim Files() As String\nFiles = System.IO.Directory.GetFiles(\"C:\\\")\nArray.Sort(Files)\n" }, { "answer_id": 52865, ...
2008/09/09
[ "https://Stackoverflow.com/questions/52842", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3043/" ]
52,874
<p>I have a piece of server-ish software written in Java to run on Windows and OS X. (It is not running on a server, but just a normal user's PC - something like a torrent client.) I would like the software to signal to the OS to keep the machine awake (prevent it from going into sleep mode) while it is active.</p> <p...
[ { "answer_id": 52906, "author": "Matt Dillard", "author_id": 863, "author_profile": "https://Stackoverflow.com/users/863", "pm_score": 4, "selected": false, "text": "SystemParametersInfo( SPI_SETPOWEROFFACTIVE, 0, NULL, 0 );\n" }, { "answer_id": 52966, "author": "ScArcher2", ...
2008/09/09
[ "https://Stackoverflow.com/questions/52874", "https://Stackoverflow.com", "https://Stackoverflow.com/users/338/" ]
52,880
<p>Does Google Reader have an API and if so, how can I get the count of the number of unread posts for a specific user knowing their username and password?</p>
[ { "answer_id": 582108, "author": "jimmyorr", "author_id": 19239, "author_profile": "https://Stackoverflow.com/users/19239", "pm_score": 7, "selected": true, "text": "import urllib\nimport urllib2\n\nusername = 'username@gmail.com'\npassword = '******'\n\n# Authenticate to obtain SID\naut...
2008/09/09
[ "https://Stackoverflow.com/questions/52880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383/" ]
52,883
<p>I'm looking for a graph algorithm with some unusual properties.</p> <p>Each edge in the graph is either an "up" edge or a "down" edge.</p> <p>A valid path can go an indefinite number of "up"'s followed by an indefinite number of "down"'s, or vice versa. However it cannot change direction more than once.</p> <p>E....
[ { "answer_id": 52920, "author": "Christian Oudard", "author_id": 3757, "author_profile": "https://Stackoverflow.com/users/3757", "pm_score": 5, "selected": true, "text": "UUUDDDD" }, { "answer_id": 985840, "author": "ilya n.", "author_id": 115200, "author_profile": "h...
2008/09/09
[ "https://Stackoverflow.com/questions/52883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3146/" ]
52,898
<p>I've noticed that Visual Studio 2008 is placing square brackets around column names in sql. Do the brackets offer any advantage? When I hand code T-SQL I've never bothered with them.</p> <p>Example:</p> <p>Visual Studio:</p> <pre><code>SELECT [column1], [column2] etc... </code></pre> <p>My own way:</p> <pre><co...
[ { "answer_id": 52901, "author": "Michael Haren", "author_id": 29, "author_profile": "https://Stackoverflow.com/users/29", "pm_score": 9, "selected": true, "text": "[First Name]" }, { "answer_id": 52910, "author": "Blorgbeard", "author_id": 369, "author_profile": "http...
2008/09/09
[ "https://Stackoverflow.com/questions/52898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5433/" ]
52,927
<p>I frequently find myself writing code like this:</p> <pre><code>List&lt;int&gt; list = new List&lt;int&gt; { 1, 3, 5 }; foreach (int i in list) { Console.Write("{0}\t", i.ToString()); } Console.WriteLine(); </code></pre> <p>Better would be something like this:</p> <pre><code>List&lt;int&gt; list = new List&lt...
[ { "answer_id": 52940, "author": "Jason Bunting", "author_id": 1790, "author_profile": "https://Stackoverflow.com/users/1790", "pm_score": 8, "selected": true, "text": "list.ForEach(i => Console.Write(\"{0}\\t\", i));\n" }, { "answer_id": 52941, "author": "John Boker", "au...
2008/09/09
[ "https://Stackoverflow.com/questions/52927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4593/" ]
52,950
<p>I'm not too sure what is going on here, but sometimes a particular file in my repository will change the case of its name. e.g.,:</p> <p>before: <code>File.h</code></p> <p>after: <code>file.h</code></p> <p>I don't really care why this is happening, but this causes git to think it is a new file, and then I have to go...
[ { "answer_id": 53116, "author": "MarkB", "author_id": 2996, "author_profile": "https://Stackoverflow.com/users/2996", "pm_score": 9, "selected": true, "text": "ignorecase" }, { "answer_id": 38288815, "author": "Andrew Arnott", "author_id": 46926, "author_profile": "ht...
2008/09/09
[ "https://Stackoverflow.com/questions/52950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3146/" ]
52,952
<p>So I'm using an IDataReader to hydrate some business objects, but I don't know at runtime exactly what fields will be in the reader. Any fields that aren't in the reader would be left null on the resulting object. How do you test if a reader contains a specific field without just wrapping it in a try/catch?</p>
[ { "answer_id": 299772, "author": "adparadox", "author_id": 1962, "author_profile": "https://Stackoverflow.com/users/1962", "pm_score": -1, "selected": false, "text": " /// <summary>\n /// Grabs the value from a specific datareader for a list of column names.\n /// </summary>\n ...
2008/09/09
[ "https://Stackoverflow.com/questions/52952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4541/" ]
52,954
<p>Right now my ant task looks like.</p> <pre><code>&lt;javadoc sourcepath="${source}" destdir="${doc}"&gt; &lt;link href="http://java.sun.com/j2se/1.5.0/docs/api/" /&gt; &lt;/javadoc&gt; </code></pre> <p>And I'm getting this warning:</p> <pre><code>javadoc: warning - Error fetching URL: http://java.sun.com/j2se...
[ { "answer_id": 52973, "author": "erickson", "author_id": 3474, "author_profile": "https://Stackoverflow.com/users/3474", "pm_score": 4, "selected": true, "text": "ANT_OPTS=\"-Dhttp.proxyHost=proxy.y.com\" ant doc" }, { "answer_id": 54281, "author": "Rob Spieldenner", "aut...
2008/09/09
[ "https://Stackoverflow.com/questions/52954", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5118/" ]
52,964
<p>What is the best way to sort the results of a sql query into a random order within a stored procedure?</p>
[ { "answer_id": 52976, "author": "Jimmy", "author_id": 4435, "author_profile": "https://Stackoverflow.com/users/4435", "pm_score": 4, "selected": false, "text": "select foo from Bar order by newid()\n" }, { "answer_id": 52988, "author": "Jon Galloway", "author_id": 5, ...
2008/09/09
[ "https://Stackoverflow.com/questions/52964", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5466/" ]
52,984
<p>How do I setup an Ant task to generate <a href="http://emma.sourceforge.net" rel="noreferrer">Emma</a> code coverage reports?</p>
[ { "answer_id": 52994, "author": "Rob Spieldenner", "author_id": 5118, "author_profile": "https://Stackoverflow.com/users/5118", "pm_score": 5, "selected": true, "text": "<property file=\"build.properties\" />\n<property name=\"source\" location=\"src/main/java\" />\n<property name=\"test...
2008/09/09
[ "https://Stackoverflow.com/questions/52984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5118/" ]
52,989
<p>I have a generic Repository&lt;T&gt; class I want to use with an ObjectDataSource. Repository&lt;T&gt; lives in a separate project called DataAccess. According to <a href="http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/767f1a821d9b23da/b1e045958ae427a5?lnk=st#b1e045958ae...
[ { "answer_id": 53106, "author": "Darren Kopp", "author_id": 77, "author_profile": "https://Stackoverflow.com/users/77", "pm_score": 5, "selected": true, "text": "Type type = typeof(Repository<MessageCategory);\nstring assemblyQualifiedName = type.AssemblyQualifiedName;\n" }, { "a...
2008/09/09
[ "https://Stackoverflow.com/questions/52989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4160/" ]
53,025
<p>I've been utilizing the <a href="http://en.wikipedia.org/wiki/Command_pattern" rel="nofollow noreferrer">command pattern</a> in my Flex projects, with asynchronous callback routes required between:</p> <ul> <li>whoever instantiated a given command object and the command object,</li> <li>the command object and the "...
[ { "answer_id": 53743, "author": "Theo", "author_id": 1109, "author_profile": "https://Stackoverflow.com/users/1109", "pm_score": 1, "selected": false, "text": "RemoteObject" }, { "answer_id": 53843, "author": "Theo", "author_id": 1109, "author_profile": "https://Stack...
2008/09/09
[ "https://Stackoverflow.com/questions/53025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4111/" ]
53,026
<p>I have a table with an XML column. This column is storing some values I keep for configuring my application. I created it to have a more flexible schema. I can't find a way to update this column directly from the table view in SQL Management Studio. Other (INT or Varchar for example) columns are editable. I know I c...
[ { "answer_id": 8827253, "author": "Jacob", "author_id": 181298, "author_profile": "https://Stackoverflow.com/users/181298", "pm_score": 6, "selected": true, "text": "select 'update [table name] set [xml field name] = ''' + \nconvert(varchar(max), [xml field name]) +\n''' where [primary k...
2008/09/09
[ "https://Stackoverflow.com/questions/53026", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1363/" ]
53,041
<p>Visual Studio Solution files contain two GUID's per project entry. I figure one of them is from the AssemblyInfo.cs</p> <p>Does anyone know for sure where these come from, and what they are used for?</p>
[ { "answer_id": 53048, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 3, "selected": false, "text": "Project" }, { "answer_id": 53050, "author": "Jason Olson", "author_id": 5418, "author_profile": "https://Stac...
2008/09/09
[ "https://Stackoverflow.com/questions/53041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
53,046
<p>In python, there are some special variables and filenames that are surrounded by double-underscores. For example, there is the</p> <pre><code>__file__ </code></pre> <p>variable. I am only able to get them to show up correctly inside of a code block. What do I need to enter to get double underscores in regular ...
[ { "answer_id": 53052, "author": "Blorgbeard", "author_id": 369, "author_profile": "https://Stackoverflow.com/users/369", "pm_score": 6, "selected": true, "text": "\\__file__\n" }, { "answer_id": 53054, "author": "Chris Upchurch", "author_id": 2600, "author_profile": "...
2008/09/09
[ "https://Stackoverflow.com/questions/53046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
53,057
<p>When I drag &amp; drop a dll to the assembly folder on vista, I get the error "Access is denied: mydll.dll". How can I bypass the error message and add my dll to gac?</p>
[ { "answer_id": 74013, "author": "dummy", "author_id": 6297, "author_profile": "https://Stackoverflow.com/users/6297", "pm_score": 0, "selected": false, "text": "C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\n" } ]
2008/09/09
[ "https://Stackoverflow.com/questions/53057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31505/" ]
53,069
<p>I am writing a DDL script to drop a number of tables but need to identify all dependencies for those tables first. Those dependencies include foreign key constraints, stored procedures, views, etc. Preferably, I want to programmatically script out dropping those dependencies using the system tables/views before drop...
[ { "answer_id": 53092, "author": "Almond", "author_id": 1603, "author_profile": "https://Stackoverflow.com/users/1603", "pm_score": -1, "selected": false, "text": "USE AdventureWorks\nGO\nEXEC sp_depends @objname = N'Sales.Customer' ;" }, { "answer_id": 1010628, "author": "gla...
2008/09/09
[ "https://Stackoverflow.com/questions/53069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
53,086
<p>Is the return value of GetHashCode() guaranteed to be consistent assuming the same string value is being used? (C#/ASP.NET)</p> <p>I uploaded my code to a server today and to my surprise I had to reindex some data because my server (win2008 64-bit) was returning different values compared to my desktop computer.</p>...
[ { "answer_id": 835571, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 4, "selected": false, "text": " /// <summary>\n /// Similar to String.GetHashCode but returns the same as the x86 version of String.GetHashCode for x64...
2008/09/09
[ "https://Stackoverflow.com/questions/53086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1368/" ]
53,102
<p>From the <em>Immediate Window</em> in Visual Studio: </p> <pre><code>&gt; Path.Combine(@"C:\x", "y") "C:\\x\\y" &gt; Path.Combine(@"C:\x", @"\y") "\\y" </code></pre> <p>It seems that they should both be the same. </p> <p>The old FileSystemObject.BuildPath() didn't work this way...</p>
[ { "answer_id": 53110, "author": "elarson", "author_id": 5434, "author_profile": "https://Stackoverflow.com/users/5434", "pm_score": 2, "selected": false, "text": "urljoin('/some/abs/path', '../other') = '/some/abs/other'\n" }, { "answer_id": 53118, "author": "Ryan Lundy", ...
2008/09/09
[ "https://Stackoverflow.com/questions/53102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3798/" ]
53,108
<p>I have a table similar to this:</p> <pre><code>CREATE TABLE example ( id integer primary key, name char(200), parentid integer, value integer); </code></pre> <p>I can use the parentid field to arrange data into a tree structure.</p> <p>Now here's the bit I can't work out. Given a parentid, is it possible ...
[ { "answer_id": 53137, "author": "jason saldo", "author_id": 1293, "author_profile": "https://Stackoverflow.com/users/1293", "pm_score": 1, "selected": false, "text": "select \n lpad(' ',2*(level-1)) || to_char(child) s\n\nfrom \n test_connect_by \n\nstart with parent is null\nconne...
2008/09/09
[ "https://Stackoverflow.com/questions/53108", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5324/" ]
53,112
<p>What are good ways of dealing with the issues surrounding plugin code that interacts with outside system?</p> <p>To give a concrete and representative example, suppose I would like to use Subversion and Eclipse to develop plugins for WordPress. The main code body of WordPress is installed on the webserver, and the ...
[ { "answer_id": 53137, "author": "jason saldo", "author_id": 1293, "author_profile": "https://Stackoverflow.com/users/1293", "pm_score": 1, "selected": false, "text": "select \n lpad(' ',2*(level-1)) || to_char(child) s\n\nfrom \n test_connect_by \n\nstart with parent is null\nconne...
2008/09/09
[ "https://Stackoverflow.com/questions/53112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/277/" ]
53,128
<p>I have a webapp that uses JNDI lookups to get a connection to the database.</p> <p>The connection works fine and returns the query no problems. The issue us that the connection does not close properly and is stuck in the 'sleep' mode (according to mysql administrator). This means that they become unusable nad then ...
[ { "answer_id": 54095, "author": "ScArcher2", "author_id": 1310, "author_profile": "https://Stackoverflow.com/users/1310", "pm_score": 2, "selected": false, "text": "* Jakarta-Commons DBCP\n* Jakarta-Commons Collections\n* Jakarta-Commons Pool\n" }, { "answer_id": 58778, "auth...
2008/09/09
[ "https://Stackoverflow.com/questions/53128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3431280/" ]
53,135
<p>I know that we shouldn't being using the registry to store Application Data anymore, but in updating a Legacy application (and wanting to do the fewest changes), what Registry Hives are non-administrators allowed to use? </p> <p>Can I access all of <code>HKEY_CURRENT_USER</code> (the application currently access <...
[ { "answer_id": 53181, "author": "Euro Micelli", "author_id": 2230, "author_profile": "https://Stackoverflow.com/users/2230", "pm_score": 8, "selected": true, "text": "HKEY_CURRENT_USER" } ]
2008/09/09
[ "https://Stackoverflow.com/questions/53135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3798/" ]
53,161
<p>what I'm after is something I can feed a number into and it will return the highest order bit. I'm sure there's a simple way. Below is an example output (left is the input)</p> <pre>1 -> 1 2 -> 2 3 -> 2 4 -> 4 5 -> 4 6 -> 4 7 -> 4 8 -> 8 9 -> 8 ... 63 -> 32</pre>
[ { "answer_id": 53174, "author": "nlucaroni", "author_id": 157, "author_profile": "https://Stackoverflow.com/users/157", "pm_score": 3, "selected": false, "text": "int highest_order_bit( int x )\n{\n int y = x;\n do { \n x = y;\n y = x & (x-1); //remove low order bit\n...
2008/09/09
[ "https://Stackoverflow.com/questions/53161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1057/" ]
53,162
<p>Given:</p> <pre><code>e = 'a' + 'b' + 'c' + 'd' </code></pre> <p>How do I write the above in two lines?</p> <pre><code>e = 'a' + 'b' + 'c' + 'd' </code></pre>
[ { "answer_id": 53173, "author": "SCdF", "author_id": 1666, "author_profile": "https://Stackoverflow.com/users/1666", "pm_score": 5, "selected": false, "text": "\\" }, { "answer_id": 53180, "author": "Harley Holcombe", "author_id": 1057, "author_profile": "https://Stac...
2008/09/09
[ "https://Stackoverflow.com/questions/53162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
53,164
<p>After working for a while developing games, I've been exposed to both variable frame rates (where you work out how much time has passed since the last tick and update actor movement accordingly) and fixed frame rates (where you work out how much time has passed and choose either to tick a fixed amount of time or sle...
[ { "answer_id": 59512, "author": "Paul", "author_id": 5841, "author_profile": "https://Stackoverflow.com/users/5841", "pm_score": 3, "selected": false, "text": "const float STEP = 60.f / 1000.f;\nfloat accumulator = 0.f;\n\nvoid Update(float delta)\n{\n accumulator += delta;\n\n whi...
2008/09/09
[ "https://Stackoverflow.com/questions/53164", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5488/" ]
53,208
<p>In C++ Windows app, I launch several long running child processes (currently I use CreateProcess(...) to do this. </p> <p>I want the child processes to be automatically closed <strong>if my main processes crashes</strong> or is closed.</p> <p>Because of the requirement that this needs to work for a crash of the "p...
[ { "answer_id": 53214, "author": "jm.", "author_id": 814, "author_profile": "https://Stackoverflow.com/users/814", "pm_score": 7, "selected": true, "text": "HANDLE ghJob = CreateJobObject( NULL, NULL); // GLOBAL\nif( ghJob == NULL)\n{\n ::MessageBox( 0, \"Could not create job object\",...
2008/09/10
[ "https://Stackoverflow.com/questions/53208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/814/" ]
53,224
<p>I want to scrape some information off a football (soccer) web page using simple python regexp's. The problem is that players such as the first chap, ÄÄRITALO, comes out as &amp;#196;&amp;#196;RITALO!<br> That is, html uses escaped markup for the special characters, such as &amp;#196;</p> <p>Is there a simple way o...
[ { "answer_id": 53246, "author": "dF.", "author_id": 3002, "author_profile": "https://Stackoverflow.com/users/3002", "pm_score": 4, "selected": true, "text": ">>> from BeautifulSoup import BeautifulSoup \n>>> html = \"<html>&#196;&#196;RITALO!</html>\"\n>>> soup = BeautifulSoup(html, c...
2008/09/10
[ "https://Stackoverflow.com/questions/53224", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5346/" ]
53,225
<p>Given a reference to a method, is there a way to check whether the method is bound to an object or not? Can you also access the instance that it's bound to?</p>
[ { "answer_id": 53322, "author": "jfs", "author_id": 4279, "author_profile": "https://Stackoverflow.com/users/4279", "pm_score": 7, "selected": true, "text": "def isbound(method):\n return method.im_self is not None\n \ndef instance(bounded_method):\n return bounded_method.im_sel...
2008/09/10
[ "https://Stackoverflow.com/questions/53225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
53,256
<p>I have two elements:</p> <pre><code>&lt;input a&gt; &lt;input b onclick="..."&gt; </code></pre> <p>When b is clicked, I want to access a and manipulate some of its data. A does not have a globally unique name, so <code>document.getElementsByName</code> is out. Looking into the event object, I thought <code>event.t...
[ { "answer_id": 53261, "author": "17 of 26", "author_id": 2284, "author_profile": "https://Stackoverflow.com/users/2284", "pm_score": 4, "selected": true, "text": "a" }, { "answer_id": 53262, "author": "Joseph Pecoraro", "author_id": 792, "author_profile": "https://Sta...
2008/09/10
[ "https://Stackoverflow.com/questions/53256", "https://Stackoverflow.com", "https://Stackoverflow.com/users/429/" ]
53,260
<p>Say a user is browsing a website, and then performs some action which changes the database (let's say they add a comment). When the request to actually add the comment comes in, however, we find we need to force them to login before they can continue.</p> <p>Assume the login page asks for a username and password, a...
[ { "answer_id": 53289, "author": "Robert Swisher", "author_id": 1852, "author_profile": "https://Stackoverflow.com/users/1852", "pm_score": 2, "selected": false, "text": "if ( !loggedIn ) {\n StorePostInSession();\n ShowLoginForm();\n}\n\nif ( postIsStored ) {\n RetrievePostFromS...
2008/09/10
[ "https://Stackoverflow.com/questions/53260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/797/" ]
53,292
<p>I'm trying to use the <a href="http://optiflag.rubyforge.org/discussion.html" rel="nofollow noreferrer">Optiflag</a> package in my Ruby code and whenever I try to do the necessary <code>require optiflag.rb</code>, my program fails with the standard <code>no such file to load -- optiflag</code> message. I added the d...
[ { "answer_id": 53313, "author": "Purfideas", "author_id": 4615, "author_profile": "https://Stackoverflow.com/users/4615", "pm_score": 3, "selected": true, "text": "require 'rubygems'\nrequire 'optiflag'\n" }, { "answer_id": 53390, "author": "Dominik Grabiec", "author_id":...
2008/09/10
[ "https://Stackoverflow.com/questions/53292", "https://Stackoverflow.com", "https://Stackoverflow.com/users/422/" ]
53,295
<p>I'm trying to use some data from a PlanPlusOnline account. They only provide a java web services API. The server for the site where the data will be used does not allow me to install Tomcat (edit: or a JVM for that matter). I'm not going to lie, I am a Java software engineer, and I do some web work on the side. ...
[ { "answer_id": 53360, "author": "Jacob Schoen", "author_id": 3340, "author_profile": "https://Stackoverflow.com/users/3340", "pm_score": 0, "selected": false, "text": "public final class PlanPlusOnlineClient\n{\n //instance to this class so that we do not have to reinstantiate it ever...
2008/09/10
[ "https://Stackoverflow.com/questions/53295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5054/" ]
53,316
<p>I have a one to many relationship between two tables. The many table contains a clob column. The clob column looks like this in hibernate:</p> <pre><code>@CollectionOfElements(fetch = EAGER) @JoinTable(name = NOTE_JOIN_TABLE, joinColumns = @JoinColumn(name = "note")) @Column(name = "substitution") @IndexColumn(name...
[ { "answer_id": 53360, "author": "Jacob Schoen", "author_id": 3340, "author_profile": "https://Stackoverflow.com/users/3340", "pm_score": 0, "selected": false, "text": "public final class PlanPlusOnlineClient\n{\n //instance to this class so that we do not have to reinstantiate it ever...
2008/09/10
[ "https://Stackoverflow.com/questions/53316", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1666/" ]
53,355
<p>Better yet, how can I make My Computer always open in Explorer as well?</p> <p>I usually make a shortcut to my programming directories on my quick launch bar, but I'd love for them to open in Explorer.</p>
[ { "answer_id": 53366, "author": "csjohnst", "author_id": 1292, "author_profile": "https://Stackoverflow.com/users/1292", "pm_score": 2, "selected": false, "text": "i.e.:\nexplorer /e,%HOMEDRIVE%%HOMEPATH%\n" }, { "answer_id": 53367, "author": "Blorgbeard", "author_id": 36...
2008/09/10
[ "https://Stackoverflow.com/questions/53355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
53,364
<p>Is it possible to generate PDF Documents in an Adobe AIR application without resorting to a round trip web service for generating the PDF? I've looked at the initial Flex Reports on GoogleCode but it requires a round trip for generating the actual PDF.</p> <p>Given that AIR is supposed to be the Desktop end for RIA...
[ { "answer_id": 8766756, "author": "Kamran Aslam", "author_id": 653011, "author_profile": "https://Stackoverflow.com/users/653011", "pm_score": 0, "selected": false, "text": "public function createFlexPdf() : String\n{\n pdf = new PDF();\n pdf.setDisplayMode (Display.FULL_WIDTH,Layo...
2008/09/10
[ "https://Stackoverflow.com/questions/53364", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4959/" ]
53,365
<p><em>(see <a href="https://stackoverflow.com/questions/53316/hibernate-crops-clob-values-oddly">here</a> for the problem I'm trying to solve)</em></p> <p>How do you get hibernate to log clob values it's going to insert. It is logging other value types, such as Integer etc.</p> <p>I have the following in my log4j co...
[ { "answer_id": 53419, "author": "Marcio Aguiar", "author_id": 4213, "author_profile": "https://Stackoverflow.com/users/4213", "pm_score": 2, "selected": true, "text": "log4j.logger.net.sf.hibernate=DEBUG\nlog4j.logger.org.hibernate=DEBUG\n" } ]
2008/09/10
[ "https://Stackoverflow.com/questions/53365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1666/" ]
53,379
<p>Does anyone have examples of how to use <a href="http://www.oracle-base.com/articles/8i/DBMS_APPLICATION_INFO.php" rel="nofollow noreferrer">DBMS_APPLICATION_INFO</a> package with JBOSS? </p> <p>We have a various applications which run within JBOSS and share db pools. I would like, at the start of each session thes...
[ { "answer_id": 378045, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "<local-tx-datasource>\n <jndi-name>jdbc/myDS</jndi-name>\n <connection-url>jdbc:oracle:thin:@10.10.1.15:1521:SID</connec...
2008/09/10
[ "https://Stackoverflow.com/questions/53379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3839/" ]
53,387
<p>I downloaded a couple of webapps and placed them in my /webapps folder. Some of them I could open by going to <code>http://localhost:8080/app1</code> and it would open. However, some others I would do the exact same thing and go to <code>http://localhost:8080/app2</code> and it will display "HTTP Status 404 - /app2/...
[ { "answer_id": 53422, "author": "Tony BenBrahim", "author_id": 80075, "author_profile": "https://Stackoverflow.com/users/80075", "pm_score": 2, "selected": false, "text": "eclipse-spring-jdbc-tutorial.zip\\SpringJdbc\\src\\test\\de\\laliluna\\library\\TestClient.java" }, { "answe...
2008/09/10
[ "https://Stackoverflow.com/questions/53387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
53,395
<p>I know the answer is not going to be simple, and I already use a couple of (I think ugly) cludges. I am simply looking for some elegant answers.</p> <p>Abstract class:</p> <pre><code>public interface IOtherObjects; public abstract class MyObjects&lt;T&gt; where T : IOtherObjects { ... public List&lt;T&gt; ...
[ { "answer_id": 53406, "author": "Jon Limjap", "author_id": 372, "author_profile": "https://Stackoverflow.com/users/372", "pm_score": 1, "selected": false, "text": "foreach(var myObject in myObjectsList)\n foreach(var obj in myObject.ToList())\n //do something\n" }, { "a...
2008/09/10
[ "https://Stackoverflow.com/questions/53395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5302/" ]
53,404
<p>An OleDB provider is a binary implementing COM interfaces provided by Microsoft. From that it seems to be possible to create a provider using C#. Is that correct? Is there a sample demonstrating that? If not, would you discourage me from doing that? I see that there are multiple unmanaged samples but I can't find an...
[ { "answer_id": 53427, "author": "Rob Cooper", "author_id": 832, "author_profile": "https://Stackoverflow.com/users/832", "pm_score": -1, "selected": false, "text": "using System.Data.OleDb;\n" } ]
2008/09/10
[ "https://Stackoverflow.com/questions/53404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/223/" ]
53,411
<p>I'm wondering about MP3 decoding/encoding, and I was hoping to pull this off in Flash using AS3</p> <p>I'm sure it'll be a right pain...</p> <p>I have no idea where to start, can anyone offer any pointers? reference material?</p> <p>----much later--- Thank you all very much for your input... It seems I have a lon...
[ { "answer_id": 67764, "author": "Jeremy Wadhams", "author_id": 8995, "author_profile": "https://Stackoverflow.com/users/8995", "pm_score": 1, "selected": false, "text": "exec()" } ]
2008/09/10
[ "https://Stackoverflow.com/questions/53411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5503/" ]