qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
184,272
<p>What exactly does the word patch mean when referring to 'submitting a patch'?</p> <p>I've seen this used a lot, especially in the open source world. What what does it mean and what exactly is involved in submitting a patch?</p>
[ { "answer_id": 184277, "author": "Mark Biek", "author_id": 305, "author_profile": "https://Stackoverflow.com/users/305", "pm_score": 5, "selected": true, "text": "<?php\n $foo = 0;\n?>\n <?php\n $bar = 0;\n?>\n Index: test.php\n==========================================================...
2008/10/08
[ "https://Stackoverflow.com/questions/184272", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13227/" ]
184,292
<p>I am wondering what the correct mechanism to enable communication between controls in WPF is. My goal is to not use conventional events and have to manually wire them up. The default behavior of routed commands (tunneling, bubbling) seems to be along the right lines but I guess I'm missing something.</p> <blockquo...
[ { "answer_id": 184314, "author": "David Schmitt", "author_id": 4918, "author_profile": "https://Stackoverflow.com/users/4918", "pm_score": 1, "selected": false, "text": "Binding Style DataTriggers" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/184292", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
184,309
<p>I know there are <a href="https://stackoverflow.com/questions/11737/net-library-to-unzip-zip-and-rar-files">libraries out there for working with ZIP files</a>. And, you can alternatively <a href="https://stackoverflow.com/questions/30211/windows-built-in-zip-compression-script-able">use the functionality built into ...
[ { "answer_id": 184529, "author": "Sean Hanley", "author_id": 7290, "author_profile": "https://Stackoverflow.com/users/7290", "pm_score": 0, "selected": false, "text": "myDataSet.WriteXML() if (CompressData)\n{\n // Write to memory\n mStream = new MemoryStream();\n Save(mStream);...
2008/10/08
[ "https://Stackoverflow.com/questions/184309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7831/" ]
184,312
<p>I am building Java web applications, and I hate the traditional "code-compile-deploy-test" cycle. I want to type in one tiny change, then see the result INSTANTLY, without having to compile and deploy.</p> <p>Fortunately, <a href="http://www.mortbay.org/jetty/" rel="noreferrer">Jetty</a> is great for this. It is a ...
[ { "answer_id": 185675, "author": "Athena", "author_id": 17846, "author_profile": "https://Stackoverflow.com/users/17846", "pm_score": 5, "selected": true, "text": "useFileMappedBuffer DefaultServlet false" }, { "answer_id": 4985717, "author": "kybernetikos", "author_id": ...
2008/10/08
[ "https://Stackoverflow.com/questions/184312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14570/" ]
184,313
<p>I have this .NET regex:</p> <pre><code>^(?&lt;prefix&gt;("[^"]*"))\s(?&lt;attrgroup&gt;(\([^\)]*\)))\s(?&lt;suffix&gt;("[^"]*"))$ </code></pre> <p>It properly matches the following strings:</p> <pre><code>"some prefix" ("attribute 1" "value 1") "some suffix" "some prefix" ("attribute 1" "value 1" "attribute 2" "v...
[ { "answer_id": 184392, "author": "hometoast", "author_id": 2009, "author_profile": "https://Stackoverflow.com/users/2009", "pm_score": 1, "selected": false, "text": "^(?<prefix>\"[^\"]*\")\\s+(?<attrgroup>\\(.*\\))\\s+(?<suffix>\"[^\"]*\")$\n" }, { "answer_id": 184451, "autho...
2008/10/08
[ "https://Stackoverflow.com/questions/184313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3447/" ]
184,340
<p>I have an application that manages patient demographic information. Along with this data a user can scan a picture of a patient and assign that picture to a patient. When the user clicks the scan button a separate application is opened as a dialog in order to scan the image. When running this on XP everything worked...
[ { "answer_id": 184422, "author": "Bradley Grainger", "author_id": 23633, "author_profile": "https://Stackoverflow.com/users/23633", "pm_score": 1, "selected": false, "text": "ShellExecute CreateProcess SHELLEXECUTEINFO.hProcess ShellExecute PROCESS_INFORMATION.hProcess CreateProcess Allo...
2008/10/08
[ "https://Stackoverflow.com/questions/184340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25511/" ]
184,409
<p>The documentation for <code>+[NSThread detachNewThreadSelector:toTarget:withObject:]</code> says:</p> <blockquote> <p>For non garbage-collected applications, the method <code>aSelector</code> is responsible for setting up an autorelease pool for the newly detached thread and freeing that pool before it exits....
[ { "answer_id": 185954, "author": "Barry Wark", "author_id": 2140, "author_profile": "https://Stackoverflow.com/users/2140", "pm_score": 2, "selected": false, "text": "NSAutoreleasePool [NSOperation main] NSOperation [NSOperation start] NSAutoreleasePool NSOperation" }, { "answer_...
2008/10/08
[ "https://Stackoverflow.com/questions/184409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23028/" ]
184,414
<p>I have one action I want to perform when a TSpeedButton is pressed and another I want to perform when the same button is "unpressed". I know there's no onunpress event, but is there any easy way for me to get an action to execute when a different button is pressed? </p> <pre><code>procedure ActionName.ActionNameEx...
[ { "answer_id": 185954, "author": "Barry Wark", "author_id": 2140, "author_profile": "https://Stackoverflow.com/users/2140", "pm_score": 2, "selected": false, "text": "NSAutoreleasePool [NSOperation main] NSOperation [NSOperation start] NSAutoreleasePool NSOperation" }, { "answer_...
2008/10/08
[ "https://Stackoverflow.com/questions/184414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1765/" ]
184,431
<p>I'm trying to convert an XML file into the markup used by dokuwiki, using XSLT. This actually works to some degree, but the indentation in the XSL file is getting inserted into the results. At the moment, I have two choices: abandon this XSLT thing entirely, and find another way to convert from XML to dokuwiki mar...
[ { "answer_id": 184449, "author": "Lindsay", "author_id": 23520, "author_profile": "https://Stackoverflow.com/users/23520", "pm_score": 2, "selected": false, "text": "<xsl:output method=\"text\" indent=\"no\" />\n" }, { "answer_id": 184931, "author": "Odilon Redo", "author...
2008/10/08
[ "https://Stackoverflow.com/questions/184431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26257/" ]
184,436
<p>I'm working with an old Access database (yes, it's very ugly and I hate it). I need to modify some of the columns from a VB app that I'm creating. I have most the modifications setup correctly, but I'm fighting with the fact that modifying a column to text has it default to "Allow Zero Length" to false.</p> <p>SO...
[ { "answer_id": 184575, "author": "Chris OC", "author_id": 11041, "author_profile": "https://Stackoverflow.com/users/11041", "pm_score": 3, "selected": true, "text": "Public Function setAllowZeroLenStr() \n On Error GoTo Proc_Err\n\n Dim db As Database\n Dim tbl As TableDef\n ...
2008/10/08
[ "https://Stackoverflow.com/questions/184436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10420/" ]
184,448
<p>I maintain an application that uses the win32 EnumPorts() function to help determine the set of serial ports installed on the computer. I have seen cases on some computers where the call to get this information fails with a GetLastError() code of 1722 (RPC server is unavailable). I assume that this has something t...
[ { "answer_id": 25234746, "author": "Valdar Moridin", "author_id": 2499546, "author_profile": "https://Stackoverflow.com/users/2499546", "pm_score": 0, "selected": false, "text": "RPC Server is unavailable" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/184448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19674/" ]
184,456
<p>Converting a couple stored procedures from MySQL to Microsoft SQL server. Everything is going well, except one procedure used the MySQL <code>SHA1()</code> function. I cannot seem to find an equivalent to this in MS-SQL.</p> <p>Does anyone know a valid equivalent for <code>SHA1()</code> on MS-SQL?</p>
[ { "answer_id": 12207895, "author": "Peter", "author_id": 460053, "author_profile": "https://Stackoverflow.com/users/460053", "pm_score": 5, "selected": false, "text": "SELECT sys.fn_varbintohexsubstring(0, HashBytes('SHA1', 'password'), 1, 0)\n" }, { "answer_id": 65934009, "a...
2008/10/08
[ "https://Stackoverflow.com/questions/184456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5640/" ]
184,471
<p>Replaces Question: <a href="https://stackoverflow.com/questions/184096/update-multiple-rows-into-sql-table">Update multiple rows into SQL table</a></p> <p>Here's a Code Snippet to update an exam results set. DB structure is as given, but I can submit Stored Procedures for inclusion (Which are a pain to modify, so I...
[ { "answer_id": 184503, "author": "Hafthor", "author_id": 4489, "author_profile": "https://Stackoverflow.com/users/4489", "pm_score": -1, "selected": false, "text": "UPDATE s SET ANSWER=a FROM dbo.STUDENTAnswers s JOIN (\n SELECT 1 as q, 'answer1' as a\n UNION ALL SELECT 2, 'answer2' --...
2008/10/08
[ "https://Stackoverflow.com/questions/184471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18907/" ]
184,476
<p>I have been pushing into the .NET framework in PowerShell, and I have hit something that I don't understand. This works fine:</p> <pre><code>$foo = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]" $foo.Add("FOO", "BAR") $foo Key ...
[ { "answer_id": 185885, "author": "tomasr", "author_id": 10292, "author_profile": "https://Stackoverflow.com/users/10292", "pm_score": 5, "selected": true, "text": "$bar = new-object \"System.Collections.Generic.Dictionary``2[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, Pub...
2008/10/08
[ "https://Stackoverflow.com/questions/184476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1358/" ]
184,482
<p>I display data into an html table, w/ a drop down box with a list of venues. Each volunteer will be assigned a venue. I envision being able to go down thru the html table and assigning each volunteer a venue. The drop down box contains all the possible venues that they can be assigned to.</p> <pre><code>&lt;select&...
[ { "answer_id": 184517, "author": "Darryl Hein", "author_id": 5441, "author_profile": "https://Stackoverflow.com/users/5441", "pm_score": 0, "selected": false, "text": "UPDATE volunteer SET venue = 1 WHERE id = 2;\nUPDATE volunteer SET venue = 2 WHERE id = 3;\n...\n" }, { "answer_...
2008/10/08
[ "https://Stackoverflow.com/questions/184482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
184,489
<p>I am trying to retrieve an image stored in an oracle blob and place it in a new System.Drawing.Image instance. I know I can write the stream to a temp.bmp file on the disk and read it from there but thats just not l33t enough for me. How do I convert the blob object directly to an image?</p>
[ { "answer_id": 184577, "author": "osp70", "author_id": 2357, "author_profile": "https://Stackoverflow.com/users/2357", "pm_score": 0, "selected": false, "text": "Dim cn As SqlConnection = Nothing\n Dim cmd As SqlCommand = Nothing\n Dim da As SqlDataAdapter = Nothing\n ...
2008/10/08
[ "https://Stackoverflow.com/questions/184489", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5056/" ]
184,491
<p>We have a Java Applet built using AWT. This applet lets you select pictures from your hard drive and upload them to a server. The applet includes a scrollable list of pictures, which works fine in Windows, Linux and Mac OS X 10.5. We launch this applet via Java Web Start or within a web page. </p> <p>Our applet doe...
[ { "answer_id": 184577, "author": "osp70", "author_id": 2357, "author_profile": "https://Stackoverflow.com/users/2357", "pm_score": 0, "selected": false, "text": "Dim cn As SqlConnection = Nothing\n Dim cmd As SqlCommand = Nothing\n Dim da As SqlDataAdapter = Nothing\n ...
2008/10/08
[ "https://Stackoverflow.com/questions/184491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20893/" ]
184,502
<p>In this particular case I'm trying to discover if a mylib.a file is 32 or 64 bit compatible. I'm familiar with ldd for shared objects (mylib.so) but how do I inspect a regular .a archive? </p>
[ { "answer_id": 184602, "author": "ephemient", "author_id": 20713, "author_profile": "https://Stackoverflow.com/users/20713", "pm_score": 3, "selected": false, "text": "binutils" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/184502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26261/" ]
184,511
<p>How would you implement a GUI similar to the "My Computer" view in Windows Explorer?</p> <p>In particular the "Icons" view mode. Including the grouping of different item types (as Files Stored on This Computer/Hard Disk Drives/Devices with Removable Storage groups in Windows Explorer)</p> <p>In WinForms I would us...
[ { "answer_id": 650714, "author": "Nir", "author_id": 3509, "author_profile": "https://Stackoverflow.com/users/3509", "pm_score": 1, "selected": false, "text": "public class Item\n{\n public string Type { get; set; }\n public string Name { get; set; }\n public ImageSource Icon { ...
2008/10/08
[ "https://Stackoverflow.com/questions/184511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5776/" ]
184,522
<p>I have a ListBox that when in focus, and when I have an item selected returns a valid SelectedIndex. If I have a valid SelectedIndex and I click on a TextBox on the same Forum, the SelectedIndex now becomes -1. However I want it to keep its SelectedIndex from changing. How would I go about doing this?</p>
[ { "answer_id": 20203641, "author": "Danny S", "author_id": 1452485, "author_profile": "https://Stackoverflow.com/users/1452485", "pm_score": 2, "selected": false, "text": "<Style d:IsControlPart=\"True\" TargetType=\"{x:Type ListBoxItem}\">\n....\n<Style.Triggers>\n <Trigger Prope...
2008/10/08
[ "https://Stackoverflow.com/questions/184522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41/" ]
184,537
<p>I see in C++ there are multiple ways to allocate and free data and I understand that when you call <code>malloc</code> you should call <code>free</code> and when you use the <code>new</code> operator you should pair with <code>delete</code> and it is a mistake to mix the two (e.g. Calling <code>free()</code> on some...
[ { "answer_id": 184540, "author": "Brian R. Bondy", "author_id": 3153, "author_profile": "https://Stackoverflow.com/users/3153", "pm_score": 9, "selected": false, "text": "malloc new char *pBuffer = new char[1024];\n //This is incorrect - may delete only one element, may corrupt the heap,...
2008/10/08
[ "https://Stackoverflow.com/questions/184537", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
184,538
<p>PNG images appear "fuzzy" in flash CS3. They are very blocky and appear unanti-aliased (if that is a word) Does anyone have a fix for this? Is there some setting I'm missing? </p>
[ { "answer_id": 184808, "author": "defmeta", "author_id": 10875, "author_profile": "https://Stackoverflow.com/users/10875", "pm_score": 2, "selected": false, "text": "myBitmap.smoothing = true;\n" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/184538", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25280/" ]
184,541
<p>I've been fooling around with the Google App Engine for a few days and I have a little hobby application that I want to write and deploy.</p> <p>However I'd like to set it up so that users are <strong>not</strong> directly accessing the app via appspot.com.</p> <p>Is hosting it through Google Apps and then pointin...
[ { "answer_id": 5695742, "author": "Sangan", "author_id": 712420, "author_profile": "https://Stackoverflow.com/users/712420", "pm_score": 1, "selected": false, "text": "request.getRequestURI() resp.sendRedirect(\"<your domain>\")\n request.getRequestDispatcher(\"<error-page>\").forward(re...
2008/10/08
[ "https://Stackoverflow.com/questions/184541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/305/" ]
184,560
<p>I downloaded a VM image of a web application that uses MySQL.</p> <p>How can I monitor its space consumption and know when additional space must be added?</p>
[ { "answer_id": 4055942, "author": "RolandoMySQLDBA", "author_id": 491757, "author_profile": "https://Stackoverflow.com/users/491757", "pm_score": 6, "selected": true, "text": "SELECT IFNULL(B.engine,'Total') \"Storage Engine\",\nCONCAT(LPAD(REPLACE(FORMAT(B.DSize/POWER(1024,pw),3),',',''...
2008/10/08
[ "https://Stackoverflow.com/questions/184560", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15884/" ]
184,563
<p>We are introducing static analysis tools into the build system for our Java product. We are using Maven2 so <a href="http://checkstyle.sourceforge.net/" rel="noreferrer">Checkstyle</a> and <a href="http://pmd.sourceforge.net/" rel="noreferrer">PMD</a> integration come for free. However it looks like there is a large...
[ { "answer_id": 13035733, "author": "yegor256", "author_id": 187141, "author_profile": "https://Stackoverflow.com/users/187141", "pm_score": 2, "selected": false, "text": "<plugin>\n <groupId>com.qulice</groupId>\n <artifactId>qulice-maven-plugin</artifactId>\n <version>0.15</version>\...
2008/10/08
[ "https://Stackoverflow.com/questions/184563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5874/" ]
184,574
<p>If I have two variables containing binary values, how do I append them together as one binary value? For example, if I used WMI to read the registry of two REG_BINARY value, I then want to be able to concatenate the values.</p> <p>VBScript complains of a type mismatch when you try to join with the '&amp;' operator...
[ { "answer_id": 185045, "author": "aphoria", "author_id": 2441, "author_profile": "https://Stackoverflow.com/users/2441", "pm_score": 0, "selected": false, "text": "result = CStr(val1) & CStr(val2)\n" }, { "answer_id": 186339, "author": "AnthonyWJones", "author_id": 17516,...
2008/10/08
[ "https://Stackoverflow.com/questions/184574", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3347/" ]
184,590
<p>Is there a way to do this in one line?</p> <pre><code>$x =~ s/^\s+//; $x =~ s/\s+$//; </code></pre> <p>In other words, remove all leading and trailing whitespace from a string.</p>
[ { "answer_id": 184610, "author": "moritz", "author_id": 14132, "author_profile": "https://Stackoverflow.com/users/14132", "pm_score": 2, "selected": false, "text": "$x =~ s/\\A\\s*(.*?)\\s*\\z/$1/;\n" }, { "answer_id": 184613, "author": "Lev", "author_id": 7224, "auth...
2008/10/08
[ "https://Stackoverflow.com/questions/184590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7598/" ]
184,592
<p>I have topics(id*) and tags(id*,name) and a linking table topic_tags(topicFk*,tagFk*).</p> <p>Now I want to select every single topic, that has all of the good tags (a,b,c) but none of the bad tags (d,e,f).</p> <p>How do I do that?</p>
[ { "answer_id": 184614, "author": "Tom Ritter", "author_id": 8435, "author_profile": "https://Stackoverflow.com/users/8435", "pm_score": 2, "selected": false, "text": "SELECT *\nFROM topics\nWHERE topic_id IN\n (SELECT topic_id\n FROM topic_tags a\n INNER JOIN topic_tags b\n ...
2008/10/08
[ "https://Stackoverflow.com/questions/184592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/407880/" ]
184,600
<p>I have a situation where I have two models, companies and permissions, where companies is in a separate database from my permissions database. This is a has and belongs to many relationship because each company can have many permissions and each permission can belong to many companies.</p> <p>The reason the two da...
[ { "answer_id": 186310, "author": "JasonOng", "author_id": 6048, "author_profile": "https://Stackoverflow.com/users/6048", "pm_score": 3, "selected": false, "text": "permissions:\n adapter: mysql\n database: permissions\n username: root\n password: \n socket: /tmp/mysql.sock\n class ...
2008/10/08
[ "https://Stackoverflow.com/questions/184600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21872/" ]
184,609
<p>Consider the following two ways of writing a loop in Java to see if a list contains a given value:</p> <h3>Style 1</h3> <pre><code>boolean found = false; for(int i = 0; i &lt; list.length &amp;&amp; !found; i++) { if(list[i] == testVal) found = true; } </code></pre> <h3>Style 2</h3> <pre><code>boolean fo...
[ { "answer_id": 184632, "author": "warren", "author_id": 4418, "author_profile": "https://Stackoverflow.com/users/4418", "pm_score": 1, "selected": false, "text": "for(i=0; i<list.length && list[i]!=testval; i++);\nboolean found = (i!=list.length);\n" }, { "answer_id": 184776, ...
2008/10/08
[ "https://Stackoverflow.com/questions/184609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18511/" ]
184,618
<p>What is the best comment in source code you have ever encountered?</p>
[ { "answer_id": 184629, "author": "Diodeus - James MacFarlane", "author_id": 12579, "author_profile": "https://Stackoverflow.com/users/12579", "pm_score": 5, "selected": false, "text": "//ALL YOUR BASE ARE BELONG TO US\n" }, { "answer_id": 184633, "author": "Walter Mitty", ...
2008/10/08
[ "https://Stackoverflow.com/questions/184618", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15985/" ]
184,641
<p>I have a mysql table with albums. Each album can be a top level album, or a child album of another album. Each album has a foldername which is the name of the folder its pictures are in. Each album also has a field called parent which is the id of the parent album. So, if I have a path to an image like this:</p> <p...
[ { "answer_id": 185255, "author": "BoltBait", "author_id": 20848, "author_profile": "https://Stackoverflow.com/users/20848", "pm_score": 0, "selected": false, "text": "DECLARE @FOLDER VARCHAR(200)\nDECLARE @TOPID AS INT\nDECLARE @MYID As int\n\nCREATE TABLE #tmp\n(\n [id] INT,\n [pa...
2008/10/08
[ "https://Stackoverflow.com/questions/184641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1585/" ]
184,643
<p>What is the best way to copy a list? I know the following ways, which one is better? Or is there another way?</p> <pre><code>lst = ['one', 2, 3] lst1 = list(lst) lst2 = lst[:] import copy lst3 = copy.copy(lst) </code></pre>
[ { "answer_id": 184660, "author": "Mark Roddy", "author_id": 9940, "author_profile": "https://Stackoverflow.com/users/9940", "pm_score": 8, "selected": true, "text": "lst2=lst1[:]\n import copy\nlst2=copy.deepcopy(lst1)\n" }, { "answer_id": 184679, "author": "Andrea Ambu", ...
2008/10/08
[ "https://Stackoverflow.com/questions/184643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4915/" ]
184,662
<p>In our product we have a big utilities file that we require (with <code>do</code>) at the beginning of a lot of our files. Is there a reason <em>not</em> to turn this into a module? For example, instead of doing this:</p> <pre><code>do '../dbi_utilities.pl'; our ($db,$user,$pw,$attr); my $Data = DBI-&gt;connect($...
[ { "answer_id": 184689, "author": "bmdhacks", "author_id": 14032, "author_profile": "https://Stackoverflow.com/users/14032", "pm_score": 3, "selected": false, "text": "use perl -wc use" }, { "answer_id": 184717, "author": "J.J.", "author_id": 21204, "author_profile": "...
2008/10/08
[ "https://Stackoverflow.com/questions/184662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12448/" ]
184,678
<p>I'm using SimpleDateFormat with the pattern <code>EEE MM/dd hh:mma</code>, passing in the date String <code>Thu 10/9 08:15PM</code> and it's throwing an Unparseable date exception. Why? I've used various patterns with <code>SimpleDateFormat</code> before so I'm fairly familiar with its usage. Maybe I'm missing som...
[ { "answer_id": 184694, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 1, "selected": false, "text": "EEE MM/d hh:mma\n d dd" }, { "answer_id": 184827, "author": "Eric Tuttleman", "author_id": 25677, ...
2008/10/08
[ "https://Stackoverflow.com/questions/184678", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26270/" ]
184,681
<p>Which of these pieces of code is faster?</p> <pre><code>if (obj is ClassA) {} if (obj.GetType() == typeof(ClassA)) {} </code></pre> <p>Edit: I'm aware that they don't do the same thing.</p>
[ { "answer_id": 184697, "author": "MagicKat", "author_id": 8505, "author_profile": "https://Stackoverflow.com/users/8505", "pm_score": 8, "selected": true, "text": "if (obj.GetType() == typeof(ClassA)) {}" }, { "answer_id": 184718, "author": "Jay Bazuzi", "author_id": 5314...
2008/10/08
[ "https://Stackoverflow.com/questions/184681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9825/" ]
184,683
<p>Is there a way in C# to play audio (for example, MP3) direcly from a <a href="http://msdn.microsoft.com/en-us/library/system.io.stream%28v=vs.110%29.aspx" rel="noreferrer">System.IO.Stream</a> that for instance was returend from a WebRequest without saving the data temporarily to the disk?</p> <hr> <h3>Solution wi...
[ { "answer_id": 184796, "author": "OwenP", "author_id": 2547, "author_profile": "https://Stackoverflow.com/users/2547", "pm_score": 3, "selected": false, "text": "Play" }, { "answer_id": 185041, "author": "Mark Heath", "author_id": 7532, "author_profile": "https://Stac...
2008/10/08
[ "https://Stackoverflow.com/questions/184683", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25782/" ]
184,703
<p>I have a form that is sending in sizes of things, and I need to see what the strings are equal to so that I can set the price accordingly. When i try to do this, it says that they are not equal, and i get no prices. This is the code i'm using:</p> <pre><code>if ($_POST['sizes'] == "Small ($30)"){$total = "30";} if ...
[ { "answer_id": 184737, "author": "Paul Dixon", "author_id": 6521, "author_profile": "https://Stackoverflow.com/users/6521", "pm_score": 1, "selected": false, "text": "if ($_POST['sizes'] == 'Small ($30)'){$total = \"30\";}\nelseif ($_POST['sizes'] == 'Medium ($40)'){$total = \"40\";}\nel...
2008/10/08
[ "https://Stackoverflow.com/questions/184703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50/" ]
184,704
<p>In Java, is there an elegant way to detect if an exception occurred prior to running the finally block? When dealing with "close()" statements, it's common to need exception handling within the finally block. Ideally, we'd want to maintain both exceptions and propagate them up (as both of them may contain useful inf...
[ { "answer_id": 190631, "author": "gedevan", "author_id": 20225, "author_profile": "https://Stackoverflow.com/users/20225", "pm_score": 2, "selected": false, "text": "try { \n stream.write(buffer); \n} catch(IOException ex) {\n if (LOG.isErrorEnabled()) { // You can use log level w...
2008/10/08
[ "https://Stackoverflow.com/questions/184704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17871/" ]
184,710
<p>What is the difference between a deep copy and a shallow copy?</p>
[ { "answer_id": 184730, "author": "Martin York", "author_id": 14065, "author_profile": "https://Stackoverflow.com/users/14065", "pm_score": 6, "selected": false, "text": "class String\n{\n int size;\n char* data;\n};\n\nString s1(\"Ace\"); // s1.size = 3 s1.data=0x0000F000\n\...
2008/10/08
[ "https://Stackoverflow.com/questions/184710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1447/" ]
184,721
<p>I have a windows c# application and I want to display a pdf file, located on a webserver, in an acrobat com object added to my form. </p> <pre><code>pdf.loadfile(@"http://somewhere.com/nowwhere.pdf") </code></pre> <p>As my pdf is large, the application seems to hang till the entire file is loaded. </p> <p>I want ...
[ { "answer_id": 184818, "author": "Mark Brackett", "author_id": 2199, "author_profile": "https://Stackoverflow.com/users/2199", "pm_score": 0, "selected": false, "text": "Pdf pdf;\n\nvoid ShowPdf() {\n if (this.InvokeRequired) {\n this.Invoke(() => this.ShowPdf());\n }\n // give...
2008/10/08
[ "https://Stackoverflow.com/questions/184721", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
184,766
<p>I believe the simplest way to request data from a server in XML format is to have a PHP/JSP/ASP.net page which actually generates XML based on HTTP GET params, and to somehow call/load this page from Flex.</p> <p>How exactly can this be achieved using the Flex library classes?</p>
[ { "answer_id": 185061, "author": "Raleigh Buckner", "author_id": 1153, "author_profile": "https://Stackoverflow.com/users/1153", "pm_score": 1, "selected": false, "text": "public var dataRequest:URLRequest;\npublic var dataLoader:URLLoader;\npublic var allowCache:Boolean;\n\ndataLoader =...
2008/10/08
[ "https://Stackoverflow.com/questions/184766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13220/" ]
184,773
<p>I am looking for a general UI design / work-flow for changing the same property across multiple objects. </p> <p>Suppose I have an object class called Person. The Person class has a property called City. I want to select 5 Person objects and change the City property on all 5 to "New York" in one action in the UI...
[ { "answer_id": 1671912, "author": "Peter", "author_id": 202363, "author_profile": "https://Stackoverflow.com/users/202363", "pm_score": 0, "selected": false, "text": "Rows to update : 3\n\n ..........Old Value... Change?....New Value\n\n Field A ABC\n Field B 123 Y ...
2008/10/08
[ "https://Stackoverflow.com/questions/184773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13103/" ]
184,782
<p>I'm a doing some blackbox testing of a ASP.Net website and I need to test different session timeout scenarios. </p> <p>I'm not sure they fully encapsulated session timeouts. Other then leaving a page open for 20 minutes is there an easier way to force a session timeout?</p>
[ { "answer_id": 184810, "author": "Eduardo Campañó", "author_id": 12091, "author_profile": "https://Stackoverflow.com/users/12091", "pm_score": 2, "selected": false, "text": " <authentication mode=\"Forms\">\n <forms timeout=\"10\" protection=\"All\" slidingExpiration=\"true\" loginU...
2008/10/08
[ "https://Stackoverflow.com/questions/184782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6161/" ]
184,813
<p>I have a (Wordpress powered) website, and Google is indexing some of the sub-directories. How can I stop Apache from showing users the directory listing? I know I can edit .htaccess to password-protect a directory, but I would prefer a 403 / custom redirect if possible.</p>
[ { "answer_id": 184821, "author": "Ates Goral", "author_id": 23501, "author_profile": "https://Stackoverflow.com/users/23501", "pm_score": 5, "selected": true, "text": ".htaccess" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/184813", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4812/" ]
184,823
<p>I want to place a combobox inside one column of a Xtragrid. I can bind the combobox to array values but how do you bind the combobox to the column? </p>
[ { "answer_id": 5633362, "author": "Soham Dasgupta", "author_id": 238631, "author_profile": "https://Stackoverflow.com/users/238631", "pm_score": 2, "selected": false, "text": "Dim xSunday As New DevExpress.XtraEditors.Repository.RepositoryItemComboBox\nMe.GridView1.Columns(\"Sunday\").Co...
2008/10/08
[ "https://Stackoverflow.com/questions/184823", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
184,840
<p>I'm working on an asp.net web site. We have to use com interop to interact with legacy vb6 activex components. The components in many cases rely on receiving a context object (which is itself a vb6 activex component) as a parameter. The context object is fairly costly to construct.</p> <p>Therefore one idea is t...
[ { "answer_id": 185051, "author": "Mike Dimmick", "author_id": 6970, "author_profile": "https://Stackoverflow.com/users/6970", "pm_score": 3, "selected": true, "text": "AspCompat" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/184840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4764/" ]
184,853
<p>I swear there used to be a way in X to start capturing all terminal traffic to a file on your host. It may have been a HummingBird extension, but I thought it was standard. Now, I can't find the trick. Am I hallucinating (happens when you get old), or is it possible?<br><br>I'm not talking about 'tee'. I want to be ...
[ { "answer_id": 184867, "author": "André", "author_id": 9683, "author_profile": "https://Stackoverflow.com/users/9683", "pm_score": 0, "selected": false, "text": "man tee" }, { "answer_id": 759017, "author": "andrewdotn", "author_id": 14558, "author_profile": "https://...
2008/10/08
[ "https://Stackoverflow.com/questions/184853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14028/" ]
184,857
<p>I need to be able to receive a fax in a java application. I was wondering what are some ways of doing this. Efax? Use a fax to email provider?</p>
[ { "answer_id": 5226127, "author": "Adam M", "author_id": 625338, "author_profile": "https://Stackoverflow.com/users/625338", "pm_score": 0, "selected": false, "text": "GetList parameters = new GetList(TestConstants.USERNAME,\n TestConstants.PASSWORD,\n ...
2008/10/08
[ "https://Stackoverflow.com/questions/184857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5569/" ]
184,858
<p>I want to make a link call a Javascript function through the onclick event and not do anything else (follow the link). What is the best way to do that? I usually do this:</p> <pre><code>&lt;a href="#" onclick="foo()"&gt;Click&lt;/a&gt; </code></pre> <p>But I'm not sure that is the best way and in this case it is n...
[ { "answer_id": 184876, "author": "Chris Cudmore", "author_id": 18907, "author_profile": "https://Stackoverflow.com/users/18907", "pm_score": 0, "selected": false, "text": "<a href=\"javascript: foo()\" >Click</a>\n" }, { "answer_id": 184877, "author": "Avdi", "author_id":...
2008/10/08
[ "https://Stackoverflow.com/questions/184858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4915/" ]
184,863
<p>To save some typing and clarify my code, is there a standard version of the following method?</p> <pre><code>public static boolean bothNullOrEqual(Object x, Object y) { return ( x == null ? y == null : x.equals(y) ); } </code></pre>
[ { "answer_id": 32725394, "author": "Sam Berry", "author_id": 1756430, "author_profile": "https://Stackoverflow.com/users/1756430", "pm_score": 3, "selected": false, "text": "Objects.equal(x, y)" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/184863", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1412/" ]
184,864
<p>Has anyone had good experiences of talking direct to RPG programs running on a V5R4 iSeries machine from Java? If so, what are the recommendations of the community, and what pitfalls should I try to avoid?</p> <p>From the various pieces of literature and spike solutions I have attempted it looks as though we can us...
[ { "answer_id": 222558, "author": "Tracy Probst", "author_id": 22770, "author_profile": "https://Stackoverflow.com/users/22770", "pm_score": 4, "selected": false, "text": "CommandCall command = new CommandCall(as400);\ncommand.run(\"CPYF FROMFILE(BLAH) TOFILE(BLAHBLAH) CRTFILE(*YES)\");\n...
2008/10/08
[ "https://Stackoverflow.com/questions/184864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26283/" ]
184,865
<p>I have an RDLC report that I'm having problems with page breaks. The report has a group that has a number of records that do not fit on one page. This report renders fine in Normal Mode, but when I switch to Print Mode, "extra" page breaks that were not there before appear. This is causing the report to print on mor...
[ { "answer_id": 32787126, "author": "ozat", "author_id": 4871939, "author_profile": "https://Stackoverflow.com/users/4871939", "pm_score": 1, "selected": false, "text": "ConsumeContainerWhiteSpace = True" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/184865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
184,869
<p>I'm working on a database in SQL Server 2000 that uses a GUID for each user that uses the app it's tied to. Somehow, two users ended up with the same GUID. I know that microsoft uses an algorithm to generate a random GUID that has an extremely low chance of causing collisons, but is a collision still possible?</p>
[ { "answer_id": 253830, "author": "GalacticCowboy", "author_id": 29638, "author_profile": "https://Stackoverflow.com/users/29638", "pm_score": 1, "selected": false, "text": "declare @table table\n(\n column1 uniqueidentifier default (newid()),\n column2 int,\n column3 datetime de...
2008/10/08
[ "https://Stackoverflow.com/questions/184869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2147/" ]
184,871
<p>I just want to enable or disable the button inside a ControlTemplate for a WPF Editor that I'm using.</p>
[ { "answer_id": 184963, "author": "Joel B Fant", "author_id": 22211, "author_profile": "https://Stackoverflow.com/users/22211", "pm_score": 2, "selected": false, "text": "ControlTemplate Enabled Button" }, { "answer_id": 7016854, "author": "Jerry Nixon", "author_id": 26570...
2008/10/08
[ "https://Stackoverflow.com/questions/184871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3047/" ]
184,927
<p>I have a webapp which resizes its window to exactly fit its contents:</p> <pre><code>window.resizeTo(200,300) </code></pre> <p>People do like having the page fit its window in this way. However with Firefox the next browser window the user opens comes up at the same size, which is ridiculously small.</p> <p>Is th...
[ { "answer_id": 184964, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 2, "selected": false, "text": "window.open" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/184927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4761/" ]
184,970
<p>I am using partial classes to split some functionality between 2 files, but I am getting an error. What am I doing wrong?</p> <p>A1.cs:</p> <pre><code>private partial class A { private string SomeProperty { get { return "SomeGeneratedString"; } } } </code></pre> <p>A2.cs:</p> <pre><code>private parti...
[ { "answer_id": 185055, "author": "Troy Howard", "author_id": 19258, "author_profile": "https://Stackoverflow.com/users/19258", "pm_score": 3, "selected": false, "text": "namespace stackoverflow.answers\n{\n public class Foo\n {\n private partial class Bar\n {\n ...
2008/10/08
[ "https://Stackoverflow.com/questions/184970", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4066/" ]
184,983
<p>I need to take a BufferedImage and convert it to YCbCr format so that I can do a more efficient Brightness/contrast manipulation on it, but I can't figure out how to do this. I've tried ColorConvertOp but there doesn't seem to be an appropriate ColorSpace for YCbCr (though there is a type for it?). </p> <p>I coul...
[ { "answer_id": 185055, "author": "Troy Howard", "author_id": 19258, "author_profile": "https://Stackoverflow.com/users/19258", "pm_score": 3, "selected": false, "text": "namespace stackoverflow.answers\n{\n public class Foo\n {\n private partial class Bar\n {\n ...
2008/10/08
[ "https://Stackoverflow.com/questions/184983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25920/" ]
184,985
<p>I seem to be having an issue with iPhone SDK 2.1 in as far as being able to establish a relationship between a ViewController and a View window. In as far as a Cocoa Touch Class, I went forward and added a <code>UIViewController</code> subclass. I made sure that the target is part of the existing project. Right afte...
[ { "answer_id": 185055, "author": "Troy Howard", "author_id": 19258, "author_profile": "https://Stackoverflow.com/users/19258", "pm_score": 3, "selected": false, "text": "namespace stackoverflow.answers\n{\n public class Foo\n {\n private partial class Bar\n {\n ...
2008/10/08
[ "https://Stackoverflow.com/questions/184985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
185,004
<p>I just noticed that java.beans.Introspector getBeanInfo does not pickup any superinterface's properties. Example:</p> <pre><code>public interface Person { String getName(); } public interface Employee extends Person { int getSalary(); } </code></pre> <p>Introspecting on Employee only yields salary even tho...
[ { "answer_id": 185959, "author": "MetroidFan2002", "author_id": 8026, "author_profile": "https://Stackoverflow.com/users/8026", "pm_score": 1, "selected": false, "text": "public static BeanInfo getBeanInfo(Class<?> beanClass, Introspector.USE_ALL_BEANINFO);\n" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/185004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24396/" ]
185,034
<p>Is there a way to test the type of an element in JavaScript? </p> <p>The answer may or may not require the prototype library, however the following setup does make use of the library.</p> <pre><code>function(event) { var element = event.element(); // if the element is an anchor ... // if the element is a t...
[ { "answer_id": 185039, "author": "bobwienholt", "author_id": 24257, "author_profile": "https://Stackoverflow.com/users/24257", "pm_score": 6, "selected": false, "text": "if (element.nodeName == \"A\") {\n ...\n} else if (element.nodeName == \"TD\") {\n ...\n}\n" }, { "answer_id":...
2008/10/08
[ "https://Stackoverflow.com/questions/185034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4682/" ]
185,042
<p><strong>Environment:</strong><br/> Windows Server 2003 R2 Enterprise 64bit, SP2<br/> .NET framework is supposedly installed (2.0 SP2, 3.0 SP2, 3.5 SP1)</p> <p>I say "supposedly" because they are listed as installed under Add/Remove programs. I'm not sure it's <em>properly</em> installed, because the "ASP.NET" tab i...
[ { "answer_id": 185056, "author": "JamesSugrue", "author_id": 1075, "author_profile": "https://Stackoverflow.com/users/1075", "pm_score": 4, "selected": true, "text": "aspnet_regiis -i\n" }, { "answer_id": 14991957, "author": "Tom Kelly TAK", "author_id": 2093432, "aut...
2008/10/08
[ "https://Stackoverflow.com/questions/185042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/751/" ]
185,043
<p>In emacs there is a handy way to launch the gdb and gui options for gdb, the C debugger.</p> <p>Is there a similar option in gvim?</p>
[ { "answer_id": 185295, "author": "bog", "author_id": 20909, "author_profile": "https://Stackoverflow.com/users/20909", "pm_score": -1, "selected": false, "text": "!gdb blah blah blah\n" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/185043", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9628/" ]
185,072
<p>I took the plunge this afternoon and began studying LINQ, so far just mucking around with LINQ on collections. One of the first things I tried was to implement QSort.</p> <p>Now -- ignoring the fact that I <em>could</em> just use an ORDERBY and that this is a very silly qsort implementation -- what I came up with ...
[ { "answer_id": 185128, "author": "Panos", "author_id": 8049, "author_profile": "https://Stackoverflow.com/users/8049", "pm_score": 2, "selected": false, "text": "public static IEnumerable<int> QSLinq(IEnumerable<int> items)\n{\n if (items.Count() <= 1)\n return items;\n\n in...
2008/10/08
[ "https://Stackoverflow.com/questions/185072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7856/" ]
185,073
<p>I'm trying to call into a C++ library from Perl on an AIX 5.1 machine. I've created a very simple test project to try to exercise this.</p> <p>My C++ shared library (<code>test.cpp</code>):</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;iostream&gt; void myfunc() { printf("in myfunc()\n"); std::cou...
[ { "answer_id": 185118, "author": "Tanktalus", "author_id": 23512, "author_profile": "https://Stackoverflow.com/users/23512", "pm_score": 2, "selected": false, "text": "-lstdc++ gcc -g -lstdc++ -shared test*.o -o test.so\n" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/185073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26302/" ]
185,082
<p>I would like to be able to spawn a linux process that would only have access to stdin, stdout, and stderr (nothing more and nothing less). Can I do this at the process level itself? I am also implicitly stating (oxymoron) that I don't want the spawned process to be able to change the "thing" that the other end of th...
[ { "answer_id": 185568, "author": "ephemient", "author_id": 20713, "author_profile": "https://Stackoverflow.com/users/20713", "pm_score": 1, "selected": false, "text": "ptrace strace" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/185082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21317/" ]
185,083
<p>I was wondering if its possible to inject a thread into a remote app domain running in a separate process. </p> <p>My guess is that I could do this using the debugging interfaces (ICorDebug) but I was wondering if there is any other way? </p>
[ { "answer_id": 189039, "author": "Ghirai", "author_id": 570, "author_profile": "https://Stackoverflow.com/users/570", "pm_score": 0, "selected": false, "text": "SetThreadContext" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/185083", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17174/" ]
185,091
<p>I got a very similar error to the one below:</p> <p><a href="https://stackoverflow.com/questions/97800/how-can-i-fix-this-delphi-7-compile-error-duplicate-resources">How can I fix this delphi 7 compile error - &quot;Duplicate resource(s)&quot;</a></p> <p>However, the error I got is this:</p> <pre><code> [Error] ...
[ { "answer_id": 844181, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "{$R *.res} program Test;\n\nuses\n Forms,\n Unit1 in 'Unit1.pas' {Form1},\n Sample in 'Sample.pas',\n Proc in 'Proc.pas';\...
2008/10/08
[ "https://Stackoverflow.com/questions/185091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26305/" ]
185,094
<p>I'm fairly new to MVC coming from a php background where I designed by view and created pages when I needed something like say a login form. I'd have a file called login. This only sucked when I needed a new login form to login a different type of user. Say an admin. I'd then have to create a new page called log...
[ { "answer_id": 185133, "author": "dbr", "author_id": 745, "author_profile": "https://Stackoverflow.com/users/745", "pm_score": 2, "selected": false, "text": "controller = mysection method = view id = 2 map.connect ':controller/:action/:id' @myuser = User.find(id) /usercontroller/new /use...
2008/10/08
[ "https://Stackoverflow.com/questions/185094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
185,101
<p>I have an XSL stylesheet with content in an <code>xsl:text</code> node like this:</p> <pre><code>&lt;xsl:text&gt; foo bar baz &lt;/xsl:text&gt; </code></pre> <p>The stylesheet itself is a text file with "unix-style" newline line terminators. I invoke this stylesheet on Windows as well as unix-like platforms. It wo...
[ { "answer_id": 185231, "author": "Jen A", "author_id": 12979, "author_profile": "https://Stackoverflow.com/users/12979", "pm_score": 1, "selected": false, "text": "&#xD; &#xA; &#xA; <xsl:text>foo&#xD;&#xa;bar&#xD;&#xa;</xsl:text>" }, { "answer_id": 187729, "author": "Adam Cru...
2008/10/08
[ "https://Stackoverflow.com/questions/185101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13940/" ]
185,110
<p>Can you please let me know the SQL to split date ranges when they overlap?</p> <p>Data (sample data with a date range and possibly other columns):</p> <pre><code> Col1 FromDate ToDate 1. 1 1/1/2008 31/12/2010 2. 1 1/1/2009 31/12/2012 3. 1 1/1/2009 31/12/2014 </code></pre> <p>Output:</p> <pre><code...
[ { "answer_id": 185305, "author": "Sklivvz", "author_id": 7028, "author_profile": "https://Stackoverflow.com/users/7028", "pm_score": 3, "selected": false, "text": "SQL query: SELECT * FROM `test` LIMIT 0, 30 ;\nRows: 3\nstart end\n2008-01-01 2010-12-31\n2009-01-01 2012-12-31\n200...
2008/10/08
[ "https://Stackoverflow.com/questions/185110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26309/" ]
185,112
<p>I have a bit of html like so:</p> <pre><code>&lt;a href="#somthing" id="a1"&gt;&lt;img src="something" /&gt;&lt;/a&gt; &lt;a href="#somthing" id="a2"&gt;&lt;img src="something" /&gt;&lt;/a&gt; </code></pre> <p>I need to strip off the links so I'm just left with a couple of image tags. What would be the most effici...
[ { "answer_id": 185140, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 4, "selected": true, "text": "$(\"a > img\").parent() // match all <a><img></a>, select <a> parents\n .each( function() // for each link\n { \n $...
2008/10/08
[ "https://Stackoverflow.com/questions/185112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6007/" ]
185,114
<p>I have a module in the parent directory of my script and I would like to 'use' it.</p> <p>If I do</p> <pre><code>use '../Foo.pm'; </code></pre> <p>I get syntax errors.</p> <p>I tried to do:</p> <pre><code>push @INC, '..'; use EPMS; </code></pre> <p>and .. apparently doesn't show up in @INC</p> <p>I'm going cr...
[ { "answer_id": 185120, "author": "Jonathan Leffler", "author_id": 15168, "author_profile": "https://Stackoverflow.com/users/15168", "pm_score": 2, "selected": false, "text": "push use use BEGIN { push @INC, \"..\"; }" }, { "answer_id": 185121, "author": "ephemient", "auth...
2008/10/08
[ "https://Stackoverflow.com/questions/185114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12448/" ]
185,124
<p>Say if I have a dropdown in a form and I have another nested class inside of this class . Now what's the best way to access this dropdown from the nested class? </p>
[ { "answer_id": 185144, "author": "Ray Hayes", "author_id": 7093, "author_profile": "https://Stackoverflow.com/users/7093", "pm_score": 7, "selected": false, "text": "// C#\nclass OuterClass \n{\n string s;\n // ...\n class InnerClass \n {\n OuterClass o_;\n public...
2008/10/08
[ "https://Stackoverflow.com/questions/185124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
185,141
<p>I have a simple panel that is used as a drawing surface. The goal here is to draw a 4 pixel wide outline around a child ListView under certain circumstances. I would like to make the outline pulsate when something can be dragged into it. </p> <p>I am just drawing a simple rectangle around the ListView and updati...
[ { "answer_id": 185178, "author": "JamesSugrue", "author_id": 1075, "author_profile": "https://Stackoverflow.com/users/1075", "pm_score": 0, "selected": false, "text": "SetStyle(ControlStyles.OptimizedDoubleBuffer, true);\n" }, { "answer_id": 185475, "author": "Ed S.", "au...
2008/10/08
[ "https://Stackoverflow.com/questions/185141", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1053/" ]
185,149
<p>Please take a look at the html listed below and let me know why IE6 freezes when trying to load the remote script (located at '<a href="http://code.katzenbach.com/Default.aspx" rel="nofollow noreferrer">http://code.katzenbach.com/Default.aspx</a>'). The script returns JSONP and executes the 'callbackFunction' liste...
[ { "answer_id": 185188, "author": "cllpse", "author_id": 20946, "author_profile": "https://Stackoverflow.com/users/20946", "pm_score": 0, "selected": false, "text": "callbackFunction([\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"1...
2008/10/08
[ "https://Stackoverflow.com/questions/185149", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21832/" ]
185,203
<p>I'm mostly familiar with Java, C and C++ in which there are ways to control that only one thread is accessing a resource at any given time. Now I'm in search for something similar but in PHP 5.x.</p> <p>To formulate my problem with one example:</p> <p>I have an ASCII-file which only stores a number, the value of a...
[ { "answer_id": 185218, "author": "terson", "author_id": 22974, "author_profile": "https://Stackoverflow.com/users/22974", "pm_score": 4, "selected": true, "text": "<?php\n\n$fp = fopen(\"/tmp/counter.txt\", \"r+\");\n\necho \"Attempt to lock\\n\";\nif (flock($fp, LOCK_EX)) {\n echo \"Lo...
2008/10/08
[ "https://Stackoverflow.com/questions/185203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
185,204
<p>I have a PHP script that sends out critical e-mails that needs to reach its destination. I know how to check whether the e-mail sent successfully, the only issue is knowing whether it actually got to its recipient.</p> <p>Any suggestions? If there is no way of knowing, how would you handle this situation?</p>
[ { "answer_id": 185271, "author": "stalepretzel", "author_id": 1615, "author_profile": "https://Stackoverflow.com/users/1615", "pm_score": 1, "selected": false, "text": "myserver.com/images/logo.gif?recipient@email.com" }, { "answer_id": 185364, "author": "Gary Richardson", ...
2008/10/08
[ "https://Stackoverflow.com/questions/185204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/131/" ]
185,208
<p>How can I get Environnment variables and if something is missing, set the value?</p>
[ { "answer_id": 185214, "author": "Patrick Desjardins", "author_id": 13913, "author_profile": "https://Stackoverflow.com/users/13913", "pm_score": 9, "selected": true, "text": "var value = System.Environment.GetEnvironmentVariable(variable [, Target])\n System.Environment.SetEnvironmentVa...
2008/10/08
[ "https://Stackoverflow.com/questions/185208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14441/" ]
185,235
<p>I've previously used <a href="https://jqueryui.com/tabs/" rel="nofollow noreferrer"><code>jquery-ui tabs</code></a> extension to load page fragments via <code>ajax</code>, and to conceal or reveal hidden <code>div</code>s within a page. Both of these methods are well documented, and I've had no problems there.</p>...
[ { "answer_id": 185257, "author": "imjoevasquez", "author_id": 24630, "author_profile": "https://Stackoverflow.com/users/24630", "pm_score": 6, "selected": true, "text": " $('.ui-tabs-nav').bind('tabsselect', function(event, ui) {\n ui.options // options used to intialize this widget\...
2008/10/08
[ "https://Stackoverflow.com/questions/185235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2554901/" ]
185,236
<p>I'm programming something that allows users to store documents and pictures on a webserver, to be stored and retrieved later. When users upload files to my server, PHP tells me what filetype it is based on the extension. However, I'm afraid that users could rename a zip file as somezipfile.png and store it, thus k...
[ { "answer_id": 185756, "author": "Shoan", "author_id": 17404, "author_profile": "https://Stackoverflow.com/users/17404", "pm_score": 2, "selected": false, "text": "$ php -r 'var_dump(getimagesize(\"b&n.jpg\"));'\narray(7) {\n [0]=>\n int(200)\n [1]=>\n int(200)\n [2]=>\n int(2)\n ...
2008/10/08
[ "https://Stackoverflow.com/questions/185236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1615/" ]
185,239
<p>I have a button on my webform. Clicking this button will do an HttpWebRequest during the onclick event handler. After the request we copy the response from the request into HttpContext.Current.Response and send that to the client.</p> <p>This web request can take a while (up to 5 seconds, since it's generating a re...
[ { "answer_id": 602412, "author": "Federico Zancan", "author_id": 15908, "author_profile": "https://Stackoverflow.com/users/15908", "pm_score": 0, "selected": false, "text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n <head>\n <title>First Example</tit...
2008/10/08
[ "https://Stackoverflow.com/questions/185239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/233/" ]
185,240
<p>I have an import-from-excel script as part of a CMS that previously ran without issue.</p> <p>My shared-hosting provider has recently upgraded their infrastructure, including PHP from 5.1 to 5.2.6, and the script now returns "Uninitialized string offset: -XXX in /path/scriptname.php on line 27" (XXX being a decreas...
[ { "answer_id": 189625, "author": "Till", "author_id": 2859, "author_profile": "https://Stackoverflow.com/users/2859", "pm_score": 3, "selected": true, "text": "$data" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/185240", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14979/" ]
185,252
<p>I have a Flex application where load time is extremely important (consumer site). i want to be able to get something up on screen and then allow additional modules to be loaded as necessary.</p> <p>The issue I'm facing is that the sum total of all the modules is much larger than if i were to include all the compone...
[ { "answer_id": 194615, "author": "James Fassett", "author_id": 27081, "author_profile": "https://Stackoverflow.com/users/27081", "pm_score": 1, "selected": false, "text": "\nprivate function loadContent(path:String):void \n{\n var contentLoader:Loader = new Loader();\n contentLoader....
2008/10/08
[ "https://Stackoverflow.com/questions/185252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24727/" ]
185,254
<p>I'm currently passing the pid on the command line to the child, but is there a way to do this in the Win32 API? Alternatively, can someone alleviate my fear that the pid I'm passing might belong to another process after some time if the parent has died?</p>
[ { "answer_id": 558251, "author": "Jay", "author_id": 20840, "author_profile": "https://Stackoverflow.com/users/20840", "pm_score": 6, "selected": false, "text": "#include <stdio.h>\n#include <windows.h>\n#include <tlhelp32.h>\n\nint main(int argc, char *argv[]) \n{\n int pid = -1;\n ...
2008/10/08
[ "https://Stackoverflow.com/questions/185254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23524/" ]
185,262
<p>We've talked about <b>personal</b> password management <a href="https://stackoverflow.com/questions/11362/what-is-your-favorite-password-storage-tool">here</a> but how do you guys manage your passwords at a company wide level?</p>
[ { "answer_id": 185340, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 0, "selected": false, "text": "passwords.txt" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/185262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25820/" ]
185,282
<p>I would like to access a class everywhere in my application, how can I do this?</p> <p>To make it more clear, I have a class somewhere that use some code. I have an other class that use the same code. I do not want to duplicate so I would like to call the same code in both place by using something. In php I would j...
[ { "answer_id": 185296, "author": "Max Schmeling", "author_id": 3226, "author_profile": "https://Stackoverflow.com/users/3226", "pm_score": 3, "selected": false, "text": "public static class MyClass { } public class MyClass\n{\n private static MyClass myClass;\n\n public static My...
2008/10/08
[ "https://Stackoverflow.com/questions/185282", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21386/" ]
185,291
<p>This is kinda a general question, open for opinions. I've been trying to come up with a good way to design for localization of string resources for a Windows MFC application and related utilities. My wishlist is:</p> <ul> <li>Must preserve string literals in code (as opposed to replacing with macro #define resource...
[ { "answer_id": 185356, "author": "Martin York", "author_id": 14065, "author_profile": "https://Stackoverflow.com/users/14065", "pm_score": 2, "selected": false, "text": "doAction(I18N.get(\"Press OK to continue\"));\n" }, { "answer_id": 185700, "author": "KPexEA", "author...
2008/10/08
[ "https://Stackoverflow.com/questions/185291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26240/" ]
185,314
<p>I have a C# app which uses a System.Diagnostics.Process to run another exe. I ran into some example code where the process is started in a try block and closed in a finally block. I also saw example code where the process is not closed.</p> <p>What happens when the process is not closed? </p> <p>Are the resourc...
[ { "answer_id": 185342, "author": "Duncan Smart", "author_id": 1278, "author_profile": "https://Stackoverflow.com/users/1278", "pm_score": 5, "selected": true, "text": "Close() Process Process IDisposable using(...) Dispose Close() using (Process p = Process.Start(...))\n{\n ...\n}\n IDi...
2008/10/08
[ "https://Stackoverflow.com/questions/185314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22471/" ]
185,327
<p>I knew stackoverflow would help me for other than know what is the "favorite programming cartoon" :P </p> <p>This was the accepted answer by: <a href="https://stackoverflow.com/questions/185327/oracle-joins-left-outer-right-etc-s#185439">Bill Karwin</a></p> <p>Thanks to all for the help ( I would like to double vo...
[ { "answer_id": 185375, "author": "Andy Lester", "author_id": 8454, "author_profile": "https://Stackoverflow.com/users/8454", "pm_score": 2, "selected": false, "text": "select * from performance p1\nwhere not exists \n ( select * from performance p2 \n where p2.identifier = p1.ide...
2008/10/08
[ "https://Stackoverflow.com/questions/185327", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20654/" ]
185,349
<p>In XAML I can declare a DataTemplate so that the template is used whenever a specific type is displayed. For example, this DataTemplate will use a TextBlock to display the name of a customer:</p> <pre><code>&lt;DataTemplate DataType="{x:Type my:Customer}"&gt; &lt;TextBlock Text="{Binding Name}" /&gt; &lt;/DataT...
[ { "answer_id": 186694, "author": "Ian Oakes", "author_id": 21606, "author_profile": "https://Stackoverflow.com/users/21606", "pm_score": 5, "selected": false, "text": "DataTemplateSelector public class CustomerTemplateSelector : DataTemplateSelector\n{\n public override DataTemplate S...
2008/10/08
[ "https://Stackoverflow.com/questions/185349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/615/" ]
185,378
<p>What is the regular expression to match strings (in this case, file names) that start with 'Run' and have a filename extension of '.py'?</p> <p>The regular expression should match any of the following:</p> <pre><code>RunFoo.py RunBar.py Run42.py </code></pre> <p>It should not match:</p> <pre><code>myRunFoo.py Ru...
[ { "answer_id": 185387, "author": "moo", "author_id": 23107, "author_profile": "https://Stackoverflow.com/users/23107", "pm_score": 0, "selected": false, "text": "/^Run[\\w]*?\\.py$/\n" }, { "answer_id": 185388, "author": "Rob Howard", "author_id": 3528, "author_profil...
2008/10/08
[ "https://Stackoverflow.com/questions/185378", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
185,381
<p>I have some System.Diagnotics.Processes to run. I'd like to call the close method on them automatically. Apparently the "using" keyword does this for me.</p> <p>Is this the way to use the using keyword?</p> <pre><code>foreach(string command in S) // command is something like "c:\a.exe" { try { us...
[ { "answer_id": 185419, "author": "JB King", "author_id": 8745, "author_profile": "https://Stackoverflow.com/users/8745", "pm_score": 0, "selected": false, "text": "try\n{\n foreach(string command in S) // command is something like \"c:\\a.exe\"\n {\n using(p = Process.Start(comm...
2008/10/08
[ "https://Stackoverflow.com/questions/185381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22471/" ]
185,384
<p>While working on a C# app I just noticed that in several places static initializers have dependencies on each other like this:</p> <pre><code>static private List&lt;int&gt; a = new List&lt;int&gt;() { 0 }; static private List&lt;int&gt; b = new List&lt;int&gt;() { a[0] }; </code></pre> <p>Without doing anything sp...
[ { "answer_id": 185409, "author": "Panos", "author_id": 8049, "author_profile": "https://Stackoverflow.com/users/8049", "pm_score": 5, "selected": true, "text": "static private List<int> a = new List<int>() { 1 };\nstatic private List<int> b = new List<int>() { a[0] };\n NullReferenceExce...
2008/10/08
[ "https://Stackoverflow.com/questions/185384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343/" ]
185,389
<p>I'm having problems structuring classes in the Model part of an MVC pattern in my Python app. No matter how I turn things, I keep running into circular imports. Here's what I have:</p> <p><strong>Model/__init__p.y</strong></p> <ul> <li>should hold all Model class names so I can do a "from Model import User" e.g. f...
[ { "answer_id": 185411, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 2, "selected": false, "text": "__init__.py" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/185389", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22404/" ]
185,391
<p>In ASP.NET, I have an XML file (within my project) that I would like to deserialize. FileStream objects do not allow you to open a file via URL. </p> <p>What is the easiest way to open the file so that I can deserialize it? </p>
[ { "answer_id": 185411, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 2, "selected": false, "text": "__init__.py" } ]
2008/10/08
[ "https://Stackoverflow.com/questions/185391", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
185,423
<p>I'm working on an application that is implemented as an HTA. I have a series of links that I would like to have open in the system's default web browser. Using <code>&lt;a href="url" target="_blank"&gt;</code> opens the link in IE regardless of the default browser.</p> <p>Is there a way to use the default browser? ...
[ { "answer_id": 185581, "author": "Jonny Buchanan", "author_id": 6760, "author_profile": "https://Stackoverflow.com/users/6760", "pm_score": 6, "selected": true, "text": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"en\">\n<h...
2008/10/08
[ "https://Stackoverflow.com/questions/185423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7441/" ]
185,429
<p>I know how to use JSON to create objects, but there doesn't seem to be away to use JSON to create an object that is of a specific object type.</p> <p>Here's an example of an Object and creating an instance of it:</p> <pre><code>Person = function() { }; Person.prototype = { FirstName: null, GetFirstName: fu...
[ { "answer_id": 185438, "author": "nickf", "author_id": 9021, "author_profile": "https://Stackoverflow.com/users/9021", "pm_score": 5, "selected": true, "text": "function Person() {\n this.loadFromJSON = function(json) {\n this.FirstName = json.FirstName;\n };\n}\n { _classNa...
2008/10/09
[ "https://Stackoverflow.com/questions/185429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7831/" ]
185,445
<p>My company has login integration with GroupWise, and Exchange 5.5/2000+. The Exchange 5.5/GroupWise logic is done using wldap32.dll (win32), and so the login code is in a managed c++ class. When the configuration tool (or the backend service) tries to load the dll built off this managed c++ project on my XP develo...
[ { "answer_id": 185580, "author": "Henk", "author_id": 4613, "author_profile": "https://Stackoverflow.com/users/4613", "pm_score": 2, "selected": true, "text": "depends.exe" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/185445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18313/" ]
185,447
<p>Okay, I got this small program which tags (as in ID3v2.4 etc.) some music files. Now I want the user to have the option to move and/or rename those tagged files if he/she wishes to.</p> <p>Considering that I am trying to keep a fairly clean and loosely coupled design in this system (even though extensibility is not...
[ { "answer_id": 185580, "author": "Henk", "author_id": 4613, "author_profile": "https://Stackoverflow.com/users/4613", "pm_score": 2, "selected": true, "text": "depends.exe" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/185447", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11963/" ]