qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
205,660
<p>It seems that Groovy does not support <code>break</code> and <code>continue</code> from within a closure. What is the best way to simulate this?</p> <pre><code>revs.eachLine { line -&gt; if (line ==~ /-{28}/) { // continue to next line... } } </code></pre>
[ { "answer_id": 205764, "author": "shemnon", "author_id": 8020, "author_profile": "https://Stackoverflow.com/users/8020", "pm_score": 7, "selected": true, "text": "revs.eachLine { line -> \n if (line ==~ /-{28}/) {\n return // returns from the closure\n }\n}\n revs.eachLine {...
2008/10/15
[ "https://Stackoverflow.com/questions/205660", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20103/" ]
205,666
<p>I have an alert script that I am trying to keep from spamming me so I'd like to place a condition that if an alert has been sent within, say the last hour, to not send another alert. Now I have a cron job that checks the condition every minute because I need to be alerted quickly when the condition is met but I don...
[ { "answer_id": 205681, "author": "JesperE", "author_id": 13051, "author_profile": "https://Stackoverflow.com/users/13051", "pm_score": 4, "selected": false, "text": "if test file1 -nt file2; then\n # file1 is newer than file2\nfi\n" }, { "answer_id": 205694, "author": "jona...
2008/10/15
[ "https://Stackoverflow.com/questions/205666", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27247/" ]
205,668
<p>I'm copying a file from folder A to folder B and then trying to copy the file permissions. Here are the basic steps I'm using:</p> <ol> <li>CopyFile(source, target)</li> <li>GetNamedSecurityInfo(source, GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION)</li> <li>Print source SD using ConvertSecurityDescriptorT...
[ { "answer_id": 206671, "author": "ChrisN", "author_id": 3853, "author_profile": "https://Stackoverflow.com/users/3853", "pm_score": 3, "selected": true, "text": "SHFileOperation" } ]
2008/10/15
[ "https://Stackoverflow.com/questions/205668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24898/" ]
205,688
<p>What is the best technique for catching ALL exceptions thrown within JavaScript?</p> <p>Obviously, the best technique is to use try...catch. But with ansynchronous callbacks and so forth, that can get tricky.</p> <p>I know IE and Gecko browsers support window.onerror, but what about Opera and Safari?</p> <p>Here...
[ { "answer_id": 205884, "author": "eyelidlessness", "author_id": 17964, "author_profile": "https://Stackoverflow.com/users/17964", "pm_score": 4, "selected": false, "text": "onerror onerror" }, { "answer_id": 205982, "author": "Karl", "author_id": 2932, "author_profile...
2008/10/15
[ "https://Stackoverflow.com/questions/205688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26259/" ]
205,689
<p>Say I have a class that's meant to perform a single function. After performing the function, it can be destroyed. Is there any reason to prefer one of these approaches?</p> <pre><code>// Initialize arguments in constructor MyClass myObject = new MyClass(arg1, arg2, arg3); myObject.myMethod(); // Pass arguments to ...
[ { "answer_id": 205859, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "new MyClass(arg1, arg2, arg3);// the constructor does everything.\n MyClass my_object(arg1, arg2, arg3);\n" }, { "answ...
2008/10/15
[ "https://Stackoverflow.com/questions/205689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4321/" ]
205,697
<p>I have a query that has a list of base values and a list of language values. Each value has a key that matches to the other. The base values are stored in one table and the language values in another. My problem is that I need to get all matching base values removed from the QUERY except for one. Then, I export ...
[ { "answer_id": 205798, "author": "Ben Doom", "author_id": 12267, "author_profile": "https://Stackoverflow.com/users/12267", "pm_score": 0, "selected": false, "text": "delete from matchtable where (id1 = 12 and id2 = 13) or (id1 = 13 and id2 = 13);\ninsert into matchtable (id1, id2) value...
2008/10/15
[ "https://Stackoverflow.com/questions/205697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16631/" ]
205,704
<p>Python's IDLE has 'Check Module' (Alt-X) to check the syntax which can be called without needing to run the code. Is there an equivalent way to do this in Emacs instead of running and executing the code?</p>
[ { "answer_id": 207059, "author": "mhawke", "author_id": 21945, "author_profile": "https://Stackoverflow.com/users/21945", "pm_score": 2, "selected": false, "text": "python -c 'import x' .py" }, { "answer_id": 207593, "author": "Matt Curtis", "author_id": 17221, "autho...
2008/10/15
[ "https://Stackoverflow.com/questions/205704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
205,731
<p>I need the values of form inputs to be populated by the sql database. My code works great for all text and textarea inputs but I can't figure out how to assign the database value to the drop down lists eg. 'Type of property' below. It revolves around getting the 'option selected' to represent the value held in the d...
[ { "answer_id": 205778, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 3, "selected": false, "text": "<?php\n $options = array('House', 'Bungalow', 'Flat/Apartment', 'Studio', 'Villa', 'Any');\n\n foreach($options as $option) {...
2008/10/15
[ "https://Stackoverflow.com/questions/205731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
205,733
<p>Is it possible to call a class's static property to set the navigateurl property?</p> <blockquote> <pre><code>&lt;asp:HyperLink ID="hlRegister" NavigateUrl="&lt;%= SomeClass.Property %&gt;" runat="server" /&gt; </code></pre> </blockquote> <p><b>without using codebehind ofcourse!</b></p>
[ { "answer_id": 205742, "author": "craigmoliver", "author_id": 12252, "author_profile": "https://Stackoverflow.com/users/12252", "pm_score": 0, "selected": false, "text": "hl.NavigateUrl = Class.Static().ToString();\n" }, { "answer_id": 205767, "author": "stephenbayer", "a...
2008/10/15
[ "https://Stackoverflow.com/questions/205733", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
205,735
<p>My knowledge of matlab is merely on a need to know basis, so this is probably an elementary question. Nevertheless here it comes:</p> <p>I have got a file containing data (16-bit integers) stored in binary format. How do I read it into a vector /an array in matlab? How do I write this data to a file in matlab? Is t...
[ { "answer_id": 205819, "author": "Bill the Lizard", "author_id": 1288, "author_profile": "https://Stackoverflow.com/users/1288", "pm_score": 3, "selected": false, "text": "fid = fopen('data.bin','rb')\nA = fread(fid, count, 'int16')\n fid = fopen('data.bin','w')\ncount = fwrite(fid, A, '...
2008/10/15
[ "https://Stackoverflow.com/questions/205735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4044/" ]
205,736
<p>How do I query an Oracle database to display the names of all tables in it?</p>
[ { "answer_id": 205746, "author": "Justin Cave", "author_id": 10397, "author_profile": "https://Stackoverflow.com/users/10397", "pm_score": 11, "selected": true, "text": "SELECT owner, table_name\n FROM dba_tables\n DBA_TABLES SELECT ANY DICTIONARY SELECT_CATALOG_ROLE SYS SYSTEM DBA_TABL...
2008/10/15
[ "https://Stackoverflow.com/questions/205736", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1287/" ]
205,749
<p>What are you using for binding XML to Java? JAXB, Castor, and XMLBeans are some of the available choices. The comparisons that I've seen are all three or four years old. I'm open to other suggestions. Marshalling / unmarshalling performance and ease of use are of particular interest.</p> <p>Clarification: I'd like ...
[ { "answer_id": 206236, "author": "Dónal", "author_id": 2648, "author_profile": "https://Stackoverflow.com/users/2648", "pm_score": 2, "selected": false, "text": "EmployeesDocument empDoc = EmployeesDocument.Factory.parse(xmlFile); \n" } ]
2008/10/15
[ "https://Stackoverflow.com/questions/205749", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18995/" ]
205,793
<p>I need to make changes to an in-use production database. Just adding a few columns. I've made the changes to the dev database with migrations. What is the best way to update the production database while preserving the existing data and not disrupting operation too much?</p> <p>It's MYSQL and I will be needing t...
[ { "answer_id": 206330, "author": "Mike Woodhouse", "author_id": 1060, "author_profile": "https://Stackoverflow.com/users/1060", "pm_score": 2, "selected": false, "text": "add_column" }, { "answer_id": 272673, "author": "Cameron Price", "author_id": 35526, "author_prof...
2008/10/15
[ "https://Stackoverflow.com/questions/205793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6805/" ]
205,794
<p>For my C# RichTextBox, I want to programmatically do the same thing as clicking the up arrow at the top of a vertical scroll bar, which moves the RichTextBox display up by one line. What is the code for this? Thanks!</p>
[ { "answer_id": 205904, "author": "itsmatt", "author_id": 7862, "author_profile": "https://Stackoverflow.com/users/7862", "pm_score": 5, "selected": true, "text": "using System.Runtime.InteropServices;\n\n[DllImport(\"user32.dll\")]\nstatic extern int SendMessage(IntPtr hWnd, uint wMsg, \...
2008/10/15
[ "https://Stackoverflow.com/questions/205794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27109/" ]
205,797
<p>I have a database with DateTime fields that are currently stored in local time. An upcoming project will require all these dates to be converted to universal time. Rather than writing a c# app to convert these times to universal time, I'd rather use available sqlserver/sql features to accurately convert these date...
[ { "answer_id": 205904, "author": "itsmatt", "author_id": 7862, "author_profile": "https://Stackoverflow.com/users/7862", "pm_score": 5, "selected": true, "text": "using System.Runtime.InteropServices;\n\n[DllImport(\"user32.dll\")]\nstatic extern int SendMessage(IntPtr hWnd, uint wMsg, \...
2008/10/15
[ "https://Stackoverflow.com/questions/205797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18313/" ]
205,822
<p>I'm running PHP 5.2.6 on a Windows Server 2003 Enterprise box. IIS is set to deny anonymous access and use Integrated Windows authentication.</p> <p>I'm using a PHP script to save a file uploaded from a web form. The file is uploaded to a temp folder, the script creates a file name and path depending on other vari...
[ { "answer_id": 205941, "author": "Chris Roland", "author_id": 27975, "author_profile": "https://Stackoverflow.com/users/27975", "pm_score": 3, "selected": true, "text": "move_uploaded_file() move_uploaded_file" } ]
2008/10/15
[ "https://Stackoverflow.com/questions/205822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13414/" ]
205,853
<p>I quite often see JavaScript with variables that start with a dollar sign. When/why would you choose to prefix a variable in this way?</p> <p>(I'm not asking about <code>$('p.foo')</code> syntax that you see in jQuery and others, but normal variables like <code>$name</code> and <code>$order</code>)</p>
[ { "answer_id": 205974, "author": "cic", "author_id": 4771, "author_profile": "https://Stackoverflow.com/users/4771", "pm_score": 8, "selected": false, "text": "$ _ $ _" }, { "answer_id": 206843, "author": "Benry", "author_id": 28408, "author_profile": "https://Stackov...
2008/10/15
[ "https://Stackoverflow.com/questions/205853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20074/" ]
205,871
<p>How can I find out, which keyboard layout the user of my ruby application is using? My aim is to have a game, where you can move the player on a map. To go one step down and one step left you press "Y" on a german keyboard. On an American keyboard, you would press "Z". We optimized the game for windows and mac, so I...
[ { "answer_id": 207492, "author": "Henrik Paul", "author_id": 2238, "author_profile": "https://Stackoverflow.com/users/2238", "pm_score": 1, "selected": true, "text": "ä" } ]
2008/10/15
[ "https://Stackoverflow.com/questions/205871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25017/" ]
205,893
<p>Let's have a list of some good interview questions for SharePoint developers. Please provide one question per entry, and if possible, the answers.</p> <p>Also, please feel free to suggest corrections if the provided answers are wrong.</p> <p>I will go first: </p> <p>Q: How does SharePoint store pages?</p> <p>A: ...
[ { "answer_id": 205969, "author": "Kyle Trauberman", "author_id": 21461, "author_profile": "https://Stackoverflow.com/users/21461", "pm_score": 4, "selected": false, "text": "System.Web.UI.WebControls.WebParts.WebPart Microsoft.SharePoint.WebPartPages.WebPart Microsoft.SharePoint.WebPartP...
2008/10/15
[ "https://Stackoverflow.com/questions/205893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1909/" ]
205,911
<p>I had a nasty typo that wasted my time and my colleague's time, it was something like this:</p> <pre><code>for (i = 0; i &lt; blah; i++); // &lt;- I had a semi-colon here, that's the bug! { // Some awesome logic here } </code></pre> <p>First of all, it's very embarrassing, second thing, I should never repeat thi...
[ { "answer_id": 205930, "author": "Michael Burr", "author_id": 12711, "author_profile": "https://Stackoverflow.com/users/12711", "pm_score": 3, "selected": false, "text": "/W4 -Wall for" } ]
2008/10/15
[ "https://Stackoverflow.com/questions/205911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7205/" ]
205,913
<p>I have a simple event handler with a ItemAdding event that changes a column value that I need in the ItemUpdated method. After uploading a word 2007 document (*.docx, *.pptx or xlsx) the value of the column is changed, but when I protect the document the value of the column disappears in the ItemUpdated method. Thi...
[ { "answer_id": 209375, "author": "Esteban Lalinde", "author_id": 28333, "author_profile": "https://Stackoverflow.com/users/28333", "pm_score": 0, "selected": false, "text": "properties.ListItem.Web.ParserEnabled = false;\n" } ]
2008/10/15
[ "https://Stackoverflow.com/questions/205913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28333/" ]
205,923
<p>We have a high security application and we want to allow users to enter URLs that other users will see.</p> <p>This introduces a high risk of XSS hacks - a user could potentially enter javascript that another user ends up executing. Since we hold sensitive data it's essential that this never happens.</p> <p>What a...
[ { "answer_id": 205967, "author": "Jeff Atwood", "author_id": 1, "author_profile": "https://Stackoverflow.com/users/1", "pm_score": 7, "selected": true, "text": "/// <summary>\n/// returns \"safe\" URL, stripping anything outside normal charsets for URL\n/// </summary>\npublic static stri...
2008/10/15
[ "https://Stackoverflow.com/questions/205923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/905/" ]
205,945
<p>Why does the C++ STL not provide any "tree" containers, and what's the best thing to use instead?</p> <p>I want to store a hierarchy of objects as a tree, rather than use a tree as a performance enhancement...</p>
[ { "answer_id": 205985, "author": "Martin York", "author_id": 14065, "author_profile": "https://Stackoverflow.com/users/14065", "pm_score": 9, "selected": true, "text": "std::map std::multimap std::set std::multiset" }, { "answer_id": 15230597, "author": "bobobobo", "autho...
2008/10/15
[ "https://Stackoverflow.com/questions/205945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1737/" ]
205,950
<p>I'm writing SQL (for Oracle) like:</p> <pre> INSERT INTO Schema1.tableA SELECT * FROM Schema2.tableA; </pre> <p>where Schema1.tableA and Schema2.tableA have the same columns. However, it seems like this is unsafe, since the order of the columns coming back in the SELECT is undefined. What I should be doing is:</p>...
[ { "answer_id": 206102, "author": "Tony Andrews", "author_id": 18747, "author_profile": "https://Stackoverflow.com/users/18747", "pm_score": 4, "selected": true, "text": "declare\n l_cols long;\n l_sql long;\nbegin\n for r in (select column_name from all_tab_columns\n ...
2008/10/15
[ "https://Stackoverflow.com/questions/205950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25915/" ]
205,975
<p>I have an ASP page which will fetch records from a SQL server DB table. The table "order_master" has a field called order_date. I want to frame a select query to fetch order date > a date entered by user(ex : 07/01/2008)</p> <p>I tried with convert and cast, but both are not working. The sample data in order_date c...
[ { "answer_id": 205984, "author": "Mitchel Sellers", "author_id": 13279, "author_profile": "https://Stackoverflow.com/users/13279", "pm_score": 0, "selected": false, "text": "CREATE PROCEDURE GetOrders\n @OrderDate DATETIME\nAS\nSELECT\n *\nFROM order_master\nWHERE Order_Date > @Ord...
2008/10/15
[ "https://Stackoverflow.com/questions/205975", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
205,977
<p><a href="https://stackoverflow.com/questions/205887/postback-security">Related Article</a></p> <p>On a similar topic to the above article, but of a more specific note. How exactly do you handle items that are in the viewstate (so they are included on submit), but can also be changed via AJAX. For instance, say we h...
[ { "answer_id": 206503, "author": "Robert Paulson", "author_id": 14033, "author_profile": "https://Stackoverflow.com/users/14033", "pm_score": 3, "selected": true, "text": "myAjaxDropDown <asp:RequiredFieldValidator id=\"dropdownRequiredFieldValidator\"\n ControlToValidate=\"myAj...
2008/10/15
[ "https://Stackoverflow.com/questions/205977", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8873/" ]
205,986
<p>I'm using the following syntax to loop through a list collection:</p> <pre><code>For Each PropertyActor As JCPropertyActor In MyProperty.PropertyActors i = IndexOf(PropertyActor) Next </code></pre> <p>How do I get the index of the current object within the loop? I'm using IndexOf(PropertyActor) but this seems...
[ { "answer_id": 205994, "author": "sebagomez", "author_id": 23893, "author_profile": "https://Stackoverflow.com/users/23893", "pm_score": 2, "selected": false, "text": "Dim i as Integer \nFor Each PropertyActor As JCPropertyActor In MyProperty.PropertyActors\n i++\nNext\n" }, { ...
2008/10/15
[ "https://Stackoverflow.com/questions/205986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20048/" ]
206,009
<p>I have SQL data that looks like this:</p> <pre><code>events id name capacity 1 Cooking 10 2 Swimming 20 3 Archery 15 registrants id name 1 Jimmy 2 Billy 3 Sally registrant_event registrant_id event_id 1 3 2 3 3 2 </code></pre...
[ { "answer_id": 206017, "author": "Greg Dean", "author_id": 1200558, "author_profile": "https://Stackoverflow.com/users/1200558", "pm_score": 5, "selected": true, "text": "SELECT e.*, ISNULL(ec.TotalRegistrants, 0) FROM events e LEFT OUTER JOIN\n(\n SELECT event_id, Count(registrant_id)...
2008/10/15
[ "https://Stackoverflow.com/questions/206009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3238/" ]
206,024
<p>I have an ASP.Net 2.0 page that contains two UpdatePanels. The first panel contains a TreeView. The second panel contains a label and is triggered by a selection in the tree. When I select a node the label gets updated as expected and the <code>TreeNode</code> that I clicked on becomes highlighted and the previously...
[ { "answer_id": 207382, "author": "Jason Kealey", "author_id": 20893, "author_profile": "https://Stackoverflow.com/users/20893", "pm_score": 1, "selected": false, "text": "public void RefreshSelection(string guid)\n{\n if (guid == string.Empty)\n ClearNodes(tvCategories.Nodes);\...
2008/10/15
[ "https://Stackoverflow.com/questions/206024", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18107/" ]
206,045
<p>I have code like this:</p> <pre><code>template &lt;typename T, typename U&gt; struct MyStruct { T aType; U anotherType; }; class IWantToBeFriendsWithMyStruct { friend struct MyStruct; //what is the correct syntax here ? }; </code></pre> <p>What is the correct syntax to give friendship to the template ...
[ { "answer_id": 206054, "author": "Rob Walker", "author_id": 3631, "author_profile": "https://Stackoverflow.com/users/3631", "pm_score": 5, "selected": true, "text": "class IWantToBeFriendsWithMyStruct\n{\n template <typename T, typename U>\n friend struct MyStruct;\n};\n" }, { ...
2008/10/15
[ "https://Stackoverflow.com/questions/206045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28275/" ]
206,055
<p>I am a SQL Server user .</p> <p>I am on a project that is using oracle (which I rarely use) I need to create an ODBC connection so I can access the some data via MS Access I have a application on my machine called oraHome90. It seems to allow a configuration of something called a listener in a “net configuration u...
[ { "answer_id": 206883, "author": "DCookie", "author_id": 8670, "author_profile": "https://Stackoverflow.com/users/8670", "pm_score": 3, "selected": false, "text": "> SERVICENAME_alias =\n> (DESCRIPTION =\n> (ADDRESS = (PROTOCOL = TCP)(HOST = HOST.XYZi.com)(PORT = 1521))\n> (CO...
2008/10/15
[ "https://Stackoverflow.com/questions/206055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26883/" ]
206,059
<p>I've been looking for a simple regex for URLs, does anybody have one handy that works well? I didn't find one with the zend framework validation classes and have seen several implementations.</p>
[ { "answer_id": 206087, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 7, "selected": true, "text": "$text = preg_replace(\n '#((https?|ftp)://(\\S*?\\.\\S*?))([\\s)\\[\\]{},;\"\\':<]|\\.\\s|$)#i',\n \"'<a href=\\\"$1\\\" targe...
2008/10/15
[ "https://Stackoverflow.com/questions/206059", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26577/" ]
206,062
<p>In MySQL 5.0 why does the following error occur when trying to create a view with a subquery in the FROM clause?</p> <blockquote> <p>ERROR 1349 (HY000): View's SELECT contains a subquery in the FROM clause</p> </blockquote> <p>If this is a limitation of the MySQL engine, then why haven't they implemented this fe...
[ { "answer_id": 206118, "author": "Nikki9696", "author_id": 456669, "author_profile": "https://Stackoverflow.com/users/456669", "pm_score": 3, "selected": false, "text": "SELECT * FROM FOO WHERE ID IN (SELECT ID FROM FOO2)\n SELECT FOO.* FROM FOO JOIN FOO2 ON FOO.ID=FOO2.ID\n SELECT * FRO...
2008/10/15
[ "https://Stackoverflow.com/questions/206062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8784/" ]
206,092
<p>I need to let end users specify a time range, to be stored and used internally as a starting date/time and ending date/time. The range could be minutes or it could be days.</p> <p><strong>Has anyone discovered an interactive control that can handle this elegantly?</strong></p> <p>Most GUI toolkits have a calendar...
[ { "answer_id": 227741, "author": "Roark Fan", "author_id": 25362, "author_profile": "https://Stackoverflow.com/users/25362", "pm_score": 2, "selected": false, "text": "[20 Oct | 21 OCT | 22 Oct ] [11:15 .. 11:30 .. 11:45..]\n [20 Oct | 21 OCT | 22 Oct ] [11 .. 12 .. 1pm] [12:31 .. 12:32 ...
2008/10/15
[ "https://Stackoverflow.com/questions/206092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16287/" ]
206,094
<p>I've been working through a recent Computer Science homework involving recursion and big-O notation. I believe I understand this pretty well (certainly not perfectly, though!) But there is one question in particular that is giving me the most problems. The odd thing is that by looking it, it looks to be the most sim...
[ { "answer_id": 206110, "author": "Roman Plášil", "author_id": 16590, "author_profile": "https://Stackoverflow.com/users/16590", "pm_score": 2, "selected": false, "text": "T(2) = 2 * T(1) = 4\nT(3) = 2 * T(2) = 2 * 4\n...\n def fn(x):\n if (x == 1):\n return # a constant time\n # do t...
2008/10/15
[ "https://Stackoverflow.com/questions/206094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23323/" ]
206,096
<p>I'm stuck in .NET 2.0 Windows Forms.</p> <p>It doesn't look like the ability to select multiple nodes exists in the standard <code>TreeView</code> control.</p> <p>I'm trying to do this for a context menu selection. So check boxes aren't an acceptable UI paradigm here.</p> <p>What's the best way to provide that v...
[ { "answer_id": 9864875, "author": "Oliver Bock", "author_id": 249548, "author_profile": "https://Stackoverflow.com/users/249548", "pm_score": 3, "selected": false, "text": "protected override void WndProc(ref Message m)\n{\n switch (m.Msg) {\n // WM_REFLECT is added because WM_...
2008/10/15
[ "https://Stackoverflow.com/questions/206096", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5062/" ]
206,106
<p><em>[This question is related to but not the same as <a href="https://stackoverflow.com/questions/206564/what-is-the-performance-implication-of-converting-to-bool-in-c">this one</a>.]</em></p> <p>If I try to use values of certain types as boolean expressions, I get a warning. Rather than suppress the warning, I so...
[ { "answer_id": 206122, "author": "Dima", "author_id": 13313, "author_profile": "https://Stackoverflow.com/users/13313", "pm_score": 5, "selected": false, "text": "bool b = (t != 0)" }, { "answer_id": 206127, "author": "warren", "author_id": 4418, "author_profile": "ht...
2008/10/15
[ "https://Stackoverflow.com/questions/206106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10559/" ]
206,112
<p>I'm working with <a href="http://pear.php.net/package/Log" rel="nofollow noreferrer">logging in PHP with Pear</a>, and I get into a standard problem: can I use file-based logging when the DB is not available? I don't mind if it's slow due to concurrency issues, but it cannot fail to work due to multiple, simultaneou...
[ { "answer_id": 206223, "author": "Ken", "author_id": 20074, "author_profile": "https://Stackoverflow.com/users/20074", "pm_score": 0, "selected": false, "text": "require_once 'DB.php';\n$db = &DB::connect('pgsql://jon@localhost+unix/logs');\n\n$conf['db'] = $db;\n$logger = &Log::singleto...
2008/10/15
[ "https://Stackoverflow.com/questions/206112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8047/" ]
206,114
<p>How you can read a file (text or binary) from a batch file? There is a way to read it in a binary mode or text mode?</p>
[ { "answer_id": 206137, "author": "devio", "author_id": 21336, "author_profile": "https://Stackoverflow.com/users/21336", "pm_score": 6, "selected": false, "text": "FOR /F %%i IN (file.txt) DO @echo %%i\n" }, { "answer_id": 206145, "author": "johnstok", "author_id": 27929,...
2008/10/15
[ "https://Stackoverflow.com/questions/206114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20601/" ]
206,132
<p>Platform: IIS 6, ASP.Net 2.0 (.Net 3.5), Server 2003.</p> <p>I'm building an application that accepts files from a user, processes them, and returns a result. The file is uploaded using HTTP POST to an ASP.Net web form. The application is expecting some large files (hundreds of MB).</p> <p>I'm using SWFUpload to a...
[ { "answer_id": 8568011, "author": "Manish Jain", "author_id": 486867, "author_profile": "https://Stackoverflow.com/users/486867", "pm_score": 2, "selected": false, "text": "<system.serviceModel> <system.webServer>\n <security>\n <requestFiltering><requestLimits maxAllow...
2008/10/15
[ "https://Stackoverflow.com/questions/206132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28358/" ]
206,142
<p>I have a full text catalog with two tables in it.</p> <p>tableA has 4 columns (a1, a2, a3, a4) of which 3 are indexed in the catalog, a2,a3,a4. a1 is the primary key.</p> <p>tableB has 3 columns (b1, b2, b3, b4), two of which are indexed in the catalog, b3 and b4. b1 is the PK of this table, b2 is the FK to tableA.<...
[ { "answer_id": 209809, "author": "devio", "author_id": 21336, "author_profile": "https://Stackoverflow.com/users/21336", "pm_score": 2, "selected": false, "text": "SELECT *, (ISNULL(ftTableA.[RANK], 0) + ISNULL(ftTableB.[RANK], 0)) AS total_rank \n WHERE ftTableA.Key IS NOT NULL OR ftTab...
2008/10/15
[ "https://Stackoverflow.com/questions/206142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1741868/" ]
206,154
<p>I've never used <a href="http://en.wikipedia.org/wiki/SOAP" rel="noreferrer">SOAP</a> before and I'm sort of new to Python. I'm doing this to get myself acquainted with both technologies. I've installed <a href="http://trac.optio.webfactional.com/wiki/soaplib" rel="noreferrer">SOAPlib</a> and I've tried to read th...
[ { "answer_id": 206167, "author": "Daren Thomas", "author_id": 2260, "author_profile": "https://Stackoverflow.com/users/2260", "pm_score": 0, "selected": false, "text": "wsdl python" }, { "answer_id": 1237630, "author": "sstock", "author_id": 58926, "author_profile": "...
2008/10/15
[ "https://Stackoverflow.com/questions/206154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28360/" ]
206,161
<p>How would I get the length of an <code>ArrayList</code> using a JSF EL expression? </p> <pre><code>#{MyBean.somelist.length} </code></pre> <p>does not work.</p>
[ { "answer_id": 206252, "author": "billjamesdev", "author_id": 13824, "author_profile": "https://Stackoverflow.com/users/13824", "pm_score": 8, "selected": true, "text": "size() length getSize() getLength()" }, { "answer_id": 208093, "author": "Damo", "author_id": 2955, ...
2008/10/15
[ "https://Stackoverflow.com/questions/206161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17614/" ]
206,170
<p>I would like to use the API to return all tweets that match my search query, but only tweets posted within the last five seconds.</p> <p>With Twitter's Search API, I can use the since_id to grab all tweets from a specific ID. However, I can't really see a good way to find the tweet ID to begin from.</p> <p>I'm als...
[ { "answer_id": 1891825, "author": "Dustin", "author_id": 230067, "author_profile": "https://Stackoverflow.com/users/230067", "pm_score": 2, "selected": false, "text": " <script type=\"text/javascript\" charset=\"utf-8\">\n // JavaScript Document\n $(document).ready(function(...
2008/10/15
[ "https://Stackoverflow.com/questions/206170", "https://Stackoverflow.com", "https://Stackoverflow.com/users/326176/" ]
206,172
<p>I need a way to determine whether the computer running my program is joined to any domain. It doesn't matter what specific domain it is part of, just whether it is connected to anything. I'm coding in vc++ against the Win32 API.</p>
[ { "answer_id": 206209, "author": "sebagomez", "author_id": 23893, "author_profile": "https://Stackoverflow.com/users/23893", "pm_score": 0, "selected": false, "text": "domain\\name" }, { "answer_id": 206228, "author": "tzot", "author_id": 6899, "author_profile": "http...
2008/10/15
[ "https://Stackoverflow.com/questions/206172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21784/" ]
206,183
<p>I want subversion to commit a file even if it's unchanged. Is there a way to do this?</p>
[ { "answer_id": 206856, "author": "Andrew Edgecombe", "author_id": 11694, "author_profile": "https://Stackoverflow.com/users/11694", "pm_score": 7, "selected": true, "text": "svn:" }, { "answer_id": 253086, "author": "endian", "author_id": 25462, "author_profile": "htt...
2008/10/15
[ "https://Stackoverflow.com/questions/206183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15992/" ]
206,198
<p>i have a class with a static public property called "Info". via reflection i want to get this properties value, so i call:</p> <pre><code>PropertyInfo pi myType.GetProperty("Info"); string info = (string) pi.GetValue(null, null); </code></pre> <p>this works fine as long as the property is of type string. but actu...
[ { "answer_id": 206227, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 3, "selected": true, "text": "pi.GetValue object" }, { "answer_id": 206253, "author": "Joel Coehoorn", "author_id": 3043, "author_p...
2008/10/15
[ "https://Stackoverflow.com/questions/206198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6368/" ]
206,221
<p>I've successfully used the Windows SendMessage method to help me do various things in my text editor, but each time I am just copying and pasting code suggested by others, and I don't really know what it means. There is always a cryptic message number that is a parameter. How do I know what these code numbers mean...
[ { "answer_id": 2494625, "author": "Pedro", "author_id": 299266, "author_profile": "https://Stackoverflow.com/users/299266", "pm_score": 1, "selected": false, "text": "using System.Runtime.InteropServices using System.Runtime.InteropServices; \n\n[DllImport(\"user32.dll\")] \nstatic exter...
2008/10/15
[ "https://Stackoverflow.com/questions/206221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27109/" ]
206,222
<p>I'm attempting to fulfill a rather difficult reporting request from a client, and I need to find away to get the difference between two DateTime columns in minutes. I've attempted to use trunc and round with various <a href="http://www.ss64.com/orasyntax/fmt.html" rel="noreferrer">formats</a> and can't seem to come...
[ { "answer_id": 206232, "author": "Justin Cave", "author_id": 10397, "author_profile": "https://Stackoverflow.com/users/10397", "pm_score": 7, "selected": true, "text": "SELECT date1 - date2\n FROM some_table\n SELECT (date1 - date2) * 24 * 60 difference_in_minutes\n FROM some_table\n" ...
2008/10/15
[ "https://Stackoverflow.com/questions/206222", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27457/" ]
206,224
<p>I'm trying to emulate the file upload code from the grails website, and I'm running into some problems. I'm using the same code as found <a href="http://grails.org/Controllers+-+File+Uploads" rel="nofollow noreferrer">here</a>. Here is my code:</p> <pre><code> &lt;g:form action="upload" method="post" enctype="...
[ { "answer_id": 206259, "author": "codeLes", "author_id": 3030, "author_profile": "https://Stackoverflow.com/users/3030", "pm_score": 2, "selected": false, "text": "<g:form action=\"upload\" method=\"post\" enctype=\"multipart/form-data\">\n" }, { "answer_id": 206513, "author"...
2008/10/15
[ "https://Stackoverflow.com/questions/206224", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21832/" ]
206,239
<p>i know this is an age old question, but this is my scenario</p> <p>This is in C# 2.0</p> <p>Have a windows application which has a datagridview control. This needs to be populates by making a webservice call.</p> <p>I want to achive the same functionality on the data if i were to use a direct connection and if i ...
[ { "answer_id": 206269, "author": "Kon", "author_id": 22303, "author_profile": "https://Stackoverflow.com/users/22303", "pm_score": 1, "selected": false, "text": "List<MyDataItem>" } ]
2008/10/15
[ "https://Stackoverflow.com/questions/206239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
206,248
<p>How do you programmatically eject(safely remove) an USB mass storage device in Windows (XP)?</p>
[ { "answer_id": 16114537, "author": "Víctor", "author_id": 2300340, "author_profile": "https://Stackoverflow.com/users/2300340", "pm_score": 2, "selected": false, "text": "private void btnExpulsar_Click(object sender, RoutedEventArgs e)\n {\n //Expulsa todas las unidades...
2008/10/15
[ "https://Stackoverflow.com/questions/206248", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4528/" ]
206,255
<p>I'm using the <a href="http://libodbcxx.sourceforge.net/" rel="nofollow noreferrer">freeodbc++</a> library to access data on a MS SQL Server 2000 database (SP3? SP4?). In particular, I'm running a particularly long and nasty stored procedure. I can watch the procedure execute in SQL Profiler, however, it tends to ...
[ { "answer_id": 16114537, "author": "Víctor", "author_id": 2300340, "author_profile": "https://Stackoverflow.com/users/2300340", "pm_score": 2, "selected": false, "text": "private void btnExpulsar_Click(object sender, RoutedEventArgs e)\n {\n //Expulsa todas las unidades...
2008/10/15
[ "https://Stackoverflow.com/questions/206255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/809/" ]
206,257
<p>I am declaring an array of void pointers. Each of which points to a value of arbitary type.<br> <code>void **values; // Array of void pointers to each value of arbitary type</code></p> <p>Initializing values as follows:</p> <pre><code> values = (void**)calloc(3,sizeof(void*)); //can initialize va...
[ { "answer_id": 206289, "author": "billjamesdev", "author_id": 13824, "author_profile": "https://Stackoverflow.com/users/13824", "pm_score": 0, "selected": false, "text": "int ct = 3;\nvalues = (void*)calloc(ct,sizeof(void));\n//can initialize values as: values = new void* [3];\nint ival ...
2008/10/15
[ "https://Stackoverflow.com/questions/206257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27221/" ]
206,320
<p>I'm trying to traverse through all the subdirectories of the current directory in Perl, and get data from those files. I'm using grep to get a list of all files and folders in the given directory, but I don't know which of the values returned is a folder name and which is a file with no file extention. </p> <p>How ...
[ { "answer_id": 206339, "author": "Robert Gamble", "author_id": 25222, "author_profile": "https://Stackoverflow.com/users/25222", "pm_score": 4, "selected": false, "text": "print \"$file is a directory\\n\" if ( -d $file );\n" }, { "answer_id": 206354, "author": "catfood", ...
2008/10/15
[ "https://Stackoverflow.com/questions/206320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21539/" ]
206,323
<p>How do I execute a command-line program from C# and get back the STD OUT results? Specifically, I want to execute DIFF on two files that are programmatically selected and write the results to a text box.</p>
[ { "answer_id": 206347, "author": "Ray Jezek", "author_id": 28309, "author_profile": "https://Stackoverflow.com/users/28309", "pm_score": 10, "selected": true, "text": "// Start the child process.\n Process p = new Process();\n // Redirect the output stream of the child process.\n p.Start...
2008/10/15
[ "https://Stackoverflow.com/questions/206323", "https://Stackoverflow.com", "https://Stackoverflow.com/users/958/" ]
206,324
<p>I want to check for empty arrays. Google gave me varied solutions but nothing worked. Maybe I am not applying them correctly.</p> <pre><code>Function GetBoiler(ByVal sFile As String) As String 'Email Signature Dim fso As Object Dim ts As Object Set fso = CreateObject("Scripting.FileSystemObject") Se...
[ { "answer_id": 206523, "author": "Mike Spross", "author_id": 17862, "author_profile": "https://Stackoverflow.com/users/17862", "pm_score": 2, "selected": false, "text": "If Dir(SigString) <> \"\" Then\n Signature = GetBoiler(SigString) \nElse\n Signature = \"\" \nEnd If\n \"\" vbNu...
2008/10/15
[ "https://Stackoverflow.com/questions/206324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26927/" ]
206,384
<p>I'm taking my first crack at <a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29" rel="noreferrer">Ajax</a> with jQuery. I'm getting my data onto my page, but I'm having some trouble with the JSON data that is returned for Date data types. Basically, I'm getting a string back that looks like this:</p> <pre...
[ { "answer_id": 206416, "author": "John Boker", "author_id": 2847, "author_profile": "https://Stackoverflow.com/users/2847", "pm_score": 6, "selected": false, "text": "var thedate = new Date(1224043200000);\nalert(thedate);\n" }, { "answer_id": 206527, "author": "Panos", "...
2008/10/15
[ "https://Stackoverflow.com/questions/206384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1284/" ]
206,400
<p>Is there a way to specify which monitor a application appears on in Delphi or C++Builder? </p> <p>I am developing a simple program for a customer, which displays kitchen orders on a secondary monitor, generated by a hospitality system. Currently they need to manually drag the window onto the second monitor after ...
[ { "answer_id": 206658, "author": "Jim McKeeth", "author_id": 255, "author_profile": "https://Stackoverflow.com/users/255", "pm_score": 5, "selected": false, "text": "// Put the form in the upper left corner of the 2nd monitor\n// if more then one monitor is present.\nif Screen.MonitorC...
2008/10/15
[ "https://Stackoverflow.com/questions/206400", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5891/" ]
206,401
<p>i want to call a series of .sql scripts to create the initial database structure</p> <ol> <li>script1.sql</li> <li>script2.sql etc.</li> </ol> <p>is there any way of doing this without sqlcmd or stored procedures <strong>or any other kind of code that is not sql</strong> ? just inside a .sql file.</p>
[ { "answer_id": 273079, "author": "Chris Ballance", "author_id": 1551, "author_profile": "https://Stackoverflow.com/users/1551", "pm_score": 2, "selected": false, "text": "Sub ExecuteSqlScript(FilePath As String)\n\n Dim Script As String\n Dim FileNumber As Integer\n Dim Delimite...
2008/10/15
[ "https://Stackoverflow.com/questions/206401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15193/" ]
206,402
<p>Every morning we have a process that issues numerous queries (~10000) to DB2 on an AS400/iSeries/i6 (whatever IBM calls it nowadays), in the last 2 months, the operators have been complaining that our query locks a couple of files preventing them from completing their nightly processing. The queries are very simplis...
[ { "answer_id": 231823, "author": "Paul Morgan", "author_id": 16322, "author_profile": "https://Stackoverflow.com/users/16322", "pm_score": 0, "selected": false, "text": "<linkedServerName>" } ]
2008/10/15
[ "https://Stackoverflow.com/questions/206402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7280/" ]
206,405
<p>I like to have my code warning free for VS.NET and GCC, and I like to have my code 64-bit ready.</p> <p>Today I wrote a little module that deals with in memory buffers and provides access to the data via a file-style interface (e.g. you can read bytes, write bytes, seek around etc.).</p> <p>As the data-type for cu...
[ { "answer_id": 206422, "author": "Nicholas Mancuso", "author_id": 8945, "author_profile": "https://Stackoverflow.com/users/8945", "pm_score": 3, "selected": false, "text": "size_t ssize_t" }, { "answer_id": 206442, "author": "1800 INFORMATION", "author_id": 3146, "aut...
2008/10/15
[ "https://Stackoverflow.com/questions/206405", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15955/" ]
206,420
<p>I am building a simple HTTP server for a project. Most websites have custom 404 error pages. Sometimes though, you'll see Firefox spitting a generic 404 page (or 405, etc...). How does it decide what to do? What should the HTTP response be? Is "HTTP/1.0 404 NOT FOUND" enough?</p> <p>Thanks</p>
[ { "answer_id": 206562, "author": "artur02", "author_id": 13937, "author_profile": "https://Stackoverflow.com/users/13937", "pm_score": 3, "selected": false, "text": "<HTML>\n<head>\n<meta HTTP-EQUIV=\"Refresh\" CONTENT=\"5; URL=not404.htm\">\n</head>\n</HTML>\n" } ]
2008/10/15
[ "https://Stackoverflow.com/questions/206420", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25645/" ]
206,438
<p>I have a business requirement that forces me to store a customer's full credit card details (number, name, expiry date, CVV2) for a short period of time.</p> <p>Rationale: If a customer calls to order a product and their credit card is declined on the spot you are likely to lose the sale. If you take their details,...
[ { "answer_id": 206810, "author": "sallen", "author_id": 15002, "author_profile": "https://Stackoverflow.com/users/15002", "pm_score": 3, "selected": false, "text": "// Make a SecureString\nSecureString sPassphrase = new SecureString();\nConsole.WriteLine(\"Please enter your passphrase\")...
2008/10/15
[ "https://Stackoverflow.com/questions/206438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/826/" ]
206,440
<p>Are there any classes in the .NET framework I can use to throw an event if time has caught up with a specified DateTime object?</p> <p>If there isn't, what are the best practices when checking this? Create a new thread constantly checking? A timer (heaven forbid ;) )?</p>
[ { "answer_id": 206487, "author": "Bob", "author_id": 45, "author_profile": "https://Stackoverflow.com/users/45", "pm_score": 0, "selected": false, "text": " DateTime future = DateTime.Now.Add(TimeSpan.FromSeconds(30));\n new Thread(() =>\n {\n Thread.Sleep(fut...
2008/10/15
[ "https://Stackoverflow.com/questions/206440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20900/" ]
206,441
<p>What are the best online code beautifier and formatter out there? I'm not asking for highlighters. Any language will do.</p>
[ { "answer_id": 206457, "author": "Dan Lenski", "author_id": 20789, "author_profile": "https://Stackoverflow.com/users/20789", "pm_score": 3, "selected": false, "text": "indent" } ]
2008/10/15
[ "https://Stackoverflow.com/questions/206441", "https://Stackoverflow.com", "https://Stackoverflow.com/users/70/" ]
206,447
<p>I am trying to use a class from a C# assembly in vb.net. The class has ambiguous members because vb.net is case insensitive. The class is something like this:</p> <pre> public class Foo { public enum FORMAT {ONE, TWO, THREE}; public FORMAT Format { get {...} set {...} } } </pre> <p>I try to access...
[ { "answer_id": 206475, "author": "Scott Dorman", "author_id": 1559, "author_profile": "https://Stackoverflow.com/users/1559", "pm_score": 4, "selected": true, "text": "CLSCompliant(true)" } ]
2008/10/15
[ "https://Stackoverflow.com/questions/206447", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10034/" ]
206,469
<p>Need a refresher on bits/bytes, hex notation and how it relates to programming (C# preferred).</p> <p>Looking for a good reading list (online preferably).</p>
[ { "answer_id": 1128731, "author": "Paul Nathan", "author_id": 26227, "author_profile": "https://Stackoverflow.com/users/26227", "pm_score": 2, "selected": false, "text": "[0,5], [-3.3, 3], [-5, 5], [0, 1.3] 1111 1111 F & outputByte 15 & outputByte char a, b, c; \nc = a ^ b; //XOR\n...
2008/10/15
[ "https://Stackoverflow.com/questions/206469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
206,473
<p>Is there a way to compile an Eclipse-based Java project from the command line? </p> <p>I'm trying to automate my build (using FinalBuilder not ant), and I'm neither a Java nor Eclipse expert. I can probably figure out how to do this with straight java command line options, but then the Eclipse project feels like a ...
[ { "answer_id": 206587, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 5, "selected": false, "text": " <javac\n srcdir=\"${src}\"\n destdir=\"${build.dir}/classes\"> \n <compilerarg \n comp...
2008/10/15
[ "https://Stackoverflow.com/questions/206473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5208/" ]
206,484
<p>I tried searching around, but I couldn't find anything that would help me out.</p> <p>I'm trying to do this in SQL:</p> <pre><code>declare @locationType varchar(50); declare @locationID int; SELECT column1, column2 FROM viewWhatever WHERE CASE @locationType WHEN 'location' THEN account_location = @locationID ...
[ { "answer_id": 206500, "author": "Bob Probst", "author_id": 12424, "author_profile": "https://Stackoverflow.com/users/12424", "pm_score": 9, "selected": true, "text": "declare @locationType varchar(50);\ndeclare @locationID int;\n\nSELECT column1, column2\nFROM viewWhatever\nWHERE\n@loca...
2008/10/15
[ "https://Stackoverflow.com/questions/206484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21828/" ]
206,490
<p>I need to index a varchar field on my table in MS SQL Server 2005, but it's not clear to me how to do so. If I try to add a non-clustered index on the field, it says "Column 'xxxx' in table 'mytable' is of a type that is invalid for use as a key column in an index"</p> <p>My table has an auto-increment int ID that...
[ { "answer_id": 206530, "author": "Cade Roux", "author_id": 18255, "author_profile": "https://Stackoverflow.com/users/18255", "pm_score": 4, "selected": true, "text": "varchar(max) CREATE TABLE varchar" } ]
2008/10/15
[ "https://Stackoverflow.com/questions/206490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17803/" ]
206,495
<p>I have a listbox containing and image and a button. By default the button is hidden. I want to make the button visible whenever I hover over an item in the listbox. The XAML I am using is below. Thanks</p> <pre><code>&lt;Window.Resources&gt; &lt;Style TargetType="{x:Type ListBox}"&gt; &lt;Setter Propert...
[ { "answer_id": 206537, "author": "Matt Hamilton", "author_id": 615, "author_profile": "https://Stackoverflow.com/users/615", "pm_score": 6, "selected": false, "text": "<Button x:Name=\"sideButton\" Width=\"20\">\n <Button.Style>\n <Style TargetType=\"{x:Type Button}\">\n ...
2008/10/15
[ "https://Stackoverflow.com/questions/206495", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
206,528
<p>I have this function in my Javascript Code that updates html fields with their new values whenever it is called. The problem cannot be with the function itself because it works brilliantly in every section except for one. Here is the JS function:</p> <pre><code> function updateFields() { document.getElementB...
[ { "answer_id": 206653, "author": "DocileWalnut", "author_id": 28302, "author_profile": "https://Stackoverflow.com/users/28302", "pm_score": 1, "selected": false, "text": "document.getElementById('bf')\n $('bf')\n $('bf').update(bill.time[breakfast][bill.pointPartOfWeek]);\n" }, { ...
2008/10/15
[ "https://Stackoverflow.com/questions/206528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27763/" ]
206,558
<p>I continually get these errors when I try to update tables based on another table. I end up rewriting the query, change the order of joins, change some groupings and then it eventually works, but I just don't quite get it.</p> <p>What is a 'multi-part identifier'?<br> When is a 'multi-part identifier' not able to b...
[ { "answer_id": 6143015, "author": "jo-mso", "author_id": 771804, "author_profile": "https://Stackoverflow.com/users/771804", "pm_score": 3, "selected": false, "text": "Table1 t1, Table2 t2 \nwhere t1.ID = t2.ID\n Table1, Table2 \nwhere Table1.ID = Table2.ID\n" }, { "answer_id": 6...
2008/10/15
[ "https://Stackoverflow.com/questions/206558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/73794/" ]
206,564
<p><em>[This question is related to but not the same as <a href="https://stackoverflow.com/questions/206106/is-a-safe-way-to-convert-to-bool-in-c">this one</a>.]</em></p> <p>My compiler warns about implicitly converting or casting certain types to bool whereas explicit conversions do not produce a warning:</p> <pre><...
[ { "answer_id": 206570, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 4, "selected": false, "text": "cmp DWORD PTR [whatever], 0\nsetne al\n" }, { "answer_id": 206575, "author": "coppro", "author_id": 16855, ...
2008/10/15
[ "https://Stackoverflow.com/questions/206564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10559/" ]
206,574
<p>Lets say I've got two interchangeable pieces of code and I want to figure out which one of them takes less processor time to execute. How would I do this?</p> <p>To get a very rough estimation I could just put NSLog() calls on either side of the code I wanted to profile, but it seems like the processor being otherw...
[ { "answer_id": 207975, "author": "Ken", "author_id": 17320, "author_profile": "https://Stackoverflow.com/users/17320", "pm_score": 2, "selected": false, "text": "Sampling > Programmatic (Remote) uint64_t startTime, stopTime;\nstartTime = mach_absolute_time();\n\n< work to time goes here ...
2008/10/15
[ "https://Stackoverflow.com/questions/206574", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1512/" ]
206,577
<p>We are trying to move from using SQL DMO to SMO in our COM+ based application, as we are dropping support for SQL Server 2000 and adding support for SQL Server 2008 in addition to SQL Server 2005. </p> <p>I have been reading around on this, and found this particular quip on <a href="http://forums.microsoft.com/MSDN...
[ { "answer_id": 207056, "author": "Mike L", "author_id": 12085, "author_profile": "https://Stackoverflow.com/users/12085", "pm_score": 2, "selected": false, "text": "param (\n [string] $ServerName,\n [string] $DatabaseName,\n [string] $Backuptype,\n [string] $BackupPath,\n [int] $Num...
2008/10/15
[ "https://Stackoverflow.com/questions/206577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12881/" ]
206,600
<p>This is happening on Vista. I created a new dialog based MFC project to test this. I added a CEdit control to my dialog. I called SetLimitText to let my CEdit receive 100000 characters. I tried both:</p> <pre><code>this-&gt;m_cedit1.SetLimitText(100000); UpdateData(FALSE); </code></pre> <p>and </p> <pre><code>sta...
[ { "answer_id": 421845, "author": "rec", "author_id": 14022, "author_profile": "https://Stackoverflow.com/users/14022", "pm_score": 4, "selected": true, "text": " BOOL ClongeditXPDlg::OnInitDialog()\n {\n CDialog::OnInitDialog();\n\n // Set the icon for this dialog. The framework...
2008/10/15
[ "https://Stackoverflow.com/questions/206600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14022/" ]
206,608
<p>I'm trying to see if the user has pressed a decimal separator in a text box, and either allow or suppress it depending on other parameters.</p> <p>The NumberdecimalSeparator returns as 46, or '.' on my US system. Many other countries use ',' as the separator. The KeyDown event sets the KeyValue to 190 when I press ...
[ { "answer_id": 206649, "author": "Panos", "author_id": 8049, "author_profile": "https://Stackoverflow.com/users/8049", "pm_score": 3, "selected": false, "text": "CultureInfo.CurrentUICulture.NumberFormat.NumberDecimalSeparator\n CultureInfo.GetCultures(CultureTypes.SpecificCultures).Coun...
2008/10/15
[ "https://Stackoverflow.com/questions/206608", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
206,611
<p>How can I setup a default value to a property defined as follow:</p> <pre><code>public int MyProperty { get; set; } </code></pre> <p>That is using "prop" [tab][tab] in VS2008 (code snippet).</p> <p>Is it possible without falling back in the "old way"?:</p> <pre><code>private int myProperty = 0; // default value ...
[ { "answer_id": 206615, "author": "Chris Pietschmann", "author_id": 7831, "author_profile": "https://Stackoverflow.com/users/7831", "pm_score": 4, "selected": true, "text": "public class Person\n{\n public Person()\n {\n this.FirstName = string.Empty;\n }\n\n public string F...
2008/10/15
[ "https://Stackoverflow.com/questions/206611", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4386/" ]
206,614
<p><strong>Preface</strong></p> <p>I'm using the newly released Microsoft Virtual Earth SDK v6.2 which has built-in support for pushpin clustering. I realize there are custom ways of doing clustering where my question is easy to answer, but I'd like to leverage the built-in support as much as possible, so this questi...
[ { "answer_id": 206615, "author": "Chris Pietschmann", "author_id": 7831, "author_profile": "https://Stackoverflow.com/users/7831", "pm_score": 4, "selected": true, "text": "public class Person\n{\n public Person()\n {\n this.FirstName = string.Empty;\n }\n\n public string F...
2008/10/15
[ "https://Stackoverflow.com/questions/206614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25886/" ]
206,652
<p>I'm working on moving from using tables for layout purposes to using divs (yes, yes the great debate). I've got 3 divs, a header, content and footer. The header and footer are 50px each. How do I get the footer div to stay at the bottom of the page, and the content div to fill the space in between? I don't want ...
[ { "answer_id": 209508, "author": "Andy Brudtkuhl", "author_id": 12442, "author_profile": "https://Stackoverflow.com/users/12442", "pm_score": -1, "selected": false, "text": "#footer {\n clear: both;\n}\n" }, { "answer_id": 210603, "author": "Jeremy", "author_id": 9266, ...
2008/10/15
[ "https://Stackoverflow.com/questions/206652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9266/" ]
206,661
<p>Yes, <a href="http://en.wikipedia.org/wiki/There_is_more_than_one_way_to_do_it" rel="noreferrer">There's More Than One Way To Do It</a> but there must be a canonical or most efficient or most concise way. I'll add answers I know of and see what percolates to the top.</p> <p>To be clear, the question is how best to ...
[ { "answer_id": 206681, "author": "dreeves", "author_id": 4234, "author_profile": "https://Stackoverflow.com/users/4234", "pm_score": 5, "selected": false, "text": "open(my $f, '<', $filename) or die \"OPENING $filename: $!\\n\";\n$string = do { local($/); <$f> };\nclose($f);\n" }, { ...
2008/10/15
[ "https://Stackoverflow.com/questions/206661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4234/" ]
206,689
<p>I have a menu that I am using and it will change the background color when I hover using <code>a:hover</code> but I want to know how to change the <code>class=line</code> so that it sticks. </p> <p>So from the home if they click contacts the home pages </p> <blockquote> <p>from (a href="#" class="clr") to (a hr...
[ { "answer_id": 206705, "author": "friol", "author_id": 23034, "author_profile": "https://Stackoverflow.com/users/23034", "pm_score": 1, "selected": false, "text": "document.getElementById(\"element\").className='myClass';\n" }, { "answer_id": 206706, "author": "Dave Rutledge"...
2008/10/15
[ "https://Stackoverflow.com/questions/206689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
206,717
<p>How can I replace multiple spaces in a string with only one space in C#?</p> <p>Example:</p> <pre><code>1 2 3 4 5 </code></pre> <p>would be:</p> <pre><code>1 2 3 4 5 </code></pre>
[ { "answer_id": 206720, "author": "Patrick Desjardins", "author_id": 13913, "author_profile": "https://Stackoverflow.com/users/13913", "pm_score": 10, "selected": true, "text": "string sentence = \"This is a sentence with multiple spaces\";\nRegexOptions options = RegexOptions.None;\nR...
2008/10/15
[ "https://Stackoverflow.com/questions/206717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21386/" ]
206,718
<p>I want to load the data into session so that when the next button is clicked in crystal report viewer then in should load the data from the datatable instead retrieving the data again from the database. Here goes my code... </p> <pre><code> ReportDocument rpt = new ReportDocument(); DataTable resultSet = new ...
[ { "answer_id": 206739, "author": "John Sheehan", "author_id": 1786, "author_profile": "https://Stackoverflow.com/users/1786", "pm_score": 2, "selected": true, "text": "var data = Cache[\"Record_999\"] as DataTable;\nif (data == null) {\n // get from db\n // insert into cache\n}\nSe...
2008/10/15
[ "https://Stackoverflow.com/questions/206718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14752/" ]
206,719
<p>My junk mail folder has been filling up with messages composed in what appears to be the Cyrillic alphabet. If a message body or a message subject is in Cyrillic, I want to permanently delete it.</p> <p>On my screen I see Cyrillic characters, but when I iterate through the messages in VBA within Outlook, the "Subje...
[ { "answer_id": 207326, "author": "Mike Spross", "author_id": 17862, "author_profile": "https://Stackoverflow.com/users/17862", "pm_score": 3, "selected": true, "text": "String IsCyrillic String True IsCyrillic Test IsCyrillic Option Explicit\n\nPublic Const errInvalidArgument = 5\n\n' Re...
2008/10/15
[ "https://Stackoverflow.com/questions/206719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16415/" ]
206,734
<p>The following seems strange.. Basically, the somedata attribute seems shared between all the classes that inherited from <code>the_base_class</code>.</p> <pre><code>class the_base_class: somedata = {} somedata['was_false_in_base'] = False class subclassthing(the_base_class): def __init__(self): ...
[ { "answer_id": 206765, "author": "Torsten Marek", "author_id": 9567, "author_profile": "https://Stackoverflow.com/users/9567", "pm_score": 6, "selected": true, "text": "somedata somedata = {}\nsomedata['was_false_in_base'] = False\n class import sys\n class Test(object):\n if sys.pl...
2008/10/15
[ "https://Stackoverflow.com/questions/206734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/745/" ]
206,735
<p>I need a SQL query that returns ContactDate, SortName, City, ContactType, and Summary from the tables below. If any value is null, I need it to return the text “No Entry”.</p> <p><strong>ContactTable</strong></p> <ul> <li><em>ContactID</em></li> <li>ContactDate </li> <li>UserID </li> <li>Summary </li> <li>ContactT...
[ { "answer_id": 206752, "author": "Forgotten Semicolon", "author_id": 1960, "author_profile": "https://Stackoverflow.com/users/1960", "pm_score": 5, "selected": true, "text": "SELECT COALESCE(CAST(CONVERT(VARCHAR(10), ContactTable.ContactDate, 101) AS VARCHAR(10)), 'No Entry') AS ContactD...
2008/10/15
[ "https://Stackoverflow.com/questions/206735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8900/" ]
206,736
<p>Occasionally my MS Access reports: </p> <blockquote> <p>The search key was not found in any record</p> </blockquote> <p>After this happens the solution is to close Access, compact and repair the backend and then delete the record.</p> <p>What causes this and how can I avoid it?</p>
[ { "answer_id": 13538132, "author": "mwolfe02", "author_id": 154439, "author_profile": "https://Stackoverflow.com/users/154439", "pm_score": 1, "selected": false, "text": "HKLM\\Software\\Microsoft\\Office\\12.0\\Access Connectivity Engine\\Engines\n SandboxMode (DWORD Value)\n SETTING...
2008/10/15
[ "https://Stackoverflow.com/questions/206736", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
206,746
<p>FxCop has the <a href="http://msdn.microsoft.com/en-ca/ms182327.aspx" rel="nofollow noreferrer">CollectionPropertiesShouldBeReadOnly rule</a> that complains if your class has some kind of collection property that clients can set. Instead, it suggests making the property read-only and supplying a Clear() method and A...
[ { "answer_id": 396850, "author": "Matt Hamilton", "author_id": 615, "author_profile": "https://Stackoverflow.com/users/615", "pm_score": 2, "selected": false, "text": "public List<Foo> Items { get; set; }\n myInstance.Items = new List<Foo>();\n private List<Foo> _items = new List<Foo>();...
2008/10/15
[ "https://Stackoverflow.com/questions/206746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4794/" ]
206,751
<p>I have a couple tables in which I created an object ID as either an Int or Bigint, and in both cases, they seem to autoincrement by 10 (ie, the first insert is object ID 1, the second is object ID 11, the third is object ID 21, etc). Two questions:</p> <ol> <li><p>Why does it do that?</p></li> <li><p>Is that a pro...
[ { "answer_id": 206769, "author": "JamesSugrue", "author_id": 1075, "author_profile": "https://Stackoverflow.com/users/1075", "pm_score": 6, "selected": false, "text": "SELECT Auto_increment FROM information_schema.tables WHERE table_name='the_table_you_want';\n SET @@auto_increment_incre...
2008/10/15
[ "https://Stackoverflow.com/questions/206751", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
206,767
<p>I want to implement forms authentication on an ASP.NET website, the site should seek the user on the database to get some data and then authenticate against LDAP (Active Directory) to validate the user/password combo.</p> <p>After that I need to keep a instance of class that represents the user to use it in various...
[ { "answer_id": 206773, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 2, "selected": true, "text": "if (session[\"user\"] == null)\n{\n Authentication.SignOut();\n}\n" }, { "answer_id": 211451, "author": "Bryan...
2008/10/15
[ "https://Stackoverflow.com/questions/206767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23020/" ]
206,770
<p>In a previous question, I learned how to keep a footer div at the bottom of the page. (<a href="https://stackoverflow.com/questions/206652/how-to-create-div-to-fill-all-space-between-header-and-footer-div">see other question</a>)</p> <p>Now I'm trying to vertically center content between the header and footer divs....
[ { "answer_id": 206812, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 0, "selected": false, "text": "height top:50%; left:50%" }, { "answer_id": 209729, "author": "Kornel", "author_id": 27009, "author_...
2008/10/15
[ "https://Stackoverflow.com/questions/206770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9266/" ]
206,775
<p>I am trying to detect which web in sharepoint that the user is looking at right now. One approach could be to read the URls from the browser and try to compare them to a reference URL to the sharepoint solution. I have not yet been able to locate any solution that works in both IE and Firefox.</p> <p>The idea is to...
[ { "answer_id": 206829, "author": "Parappa", "author_id": 9974, "author_profile": "https://Stackoverflow.com/users/9974", "pm_score": 3, "selected": true, "text": "float GetCalcResult(void)\n{\n float retval = 0.0f;\n\n HWND calc= FindWindow(\"SciCalc\", \"Calculator\");\n if (ca...
2008/10/15
[ "https://Stackoverflow.com/questions/206775", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23499/" ]
206,783
<p>I have a JavaScript resource that has the possibility of being edited at any time. Once it is edited I would want it to be propagated to the user's browser relatively quickly (like maybe 15 minutes or so), however, the frequency of this resource being editing is few and far between (maybe 2 a month).</p> <p>I'd rat...
[ { "answer_id": 206789, "author": "Craig", "author_id": 27294, "author_profile": "https://Stackoverflow.com/users/27294", "pm_score": 4, "selected": false, "text": "<script src=\"/code.js?ver=123\" type=\"text/javascript\"></script>\n" }, { "answer_id": 207861, "author": "aemk...
2008/10/15
[ "https://Stackoverflow.com/questions/206783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4481/" ]
206,787
<p>When I dump a Sybase database, it doesn't seem to matter whether there's data in the tables or not, the file size is the same. I've been told that this is down to the fact that my dump file is binary and not logical, so the file of the dump file is based on the allocated size of the database. I know that Oracle can ...
[ { "answer_id": 555666, "author": "brianegge", "author_id": 14139, "author_profile": "https://Stackoverflow.com/users/14139", "pm_score": 2, "selected": false, "text": "gunzip -c pubs_1.dmp | bzip2 > pubs.dmp.bz2\n" } ]
2008/10/15
[ "https://Stackoverflow.com/questions/206787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1030/" ]
206,788
<p>I've installed the Windows XAMPP package on three separate computers, 2 running Windows Vista 32 bit ( 1 Ultimate / 1 Home Premium ) and 1 running Windows Vista 64 Home Premium.</p> <p>After enabling xdebug in php.ini and restarting apache, viewing the default XAMPP localhost index causes apache to crash in the sam...
[ { "answer_id": 567318, "author": "cyberhobo", "author_id": 68638, "author_profile": "https://Stackoverflow.com/users/68638", "pm_score": 1, "selected": false, "text": "extension=php_xdebug-2.0.4-5.2.8.dll\n [XDebug]\n;; Only Zend OR (!) XDebug\nzend_extension_ts=\"\\xampplite\\php\\ext\\...
2008/10/15
[ "https://Stackoverflow.com/questions/206788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
206,790
<p>Since I've started to use jQuery, I have been doing a lot more JavaScript development.</p> <p>I have the need to parse different date formats and then to display them into another format.</p> <p>Do you know of any good tool to do this?</p> <p>Which one would you recommend?</p>
[ { "answer_id": 4566577, "author": "Brian Ellis", "author_id": 3129, "author_profile": "https://Stackoverflow.com/users/3129", "pm_score": 3, "selected": false, "text": "$.parseDate('yy-mm-dd', '2007-01-26');\n" } ]
2008/10/15
[ "https://Stackoverflow.com/questions/206790", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4481/" ]
206,793
<p>Why won't my connection string to SQL server work with Windows authentication? A sql user works fine, acme\administrator or administrator@acme.com won't work. This is a Win Form app written in C#.</p> <pre><code> { OdbcConnection cn = null; String connectionString; connectionString = ...
[ { "answer_id": 206825, "author": "JamesSugrue", "author_id": 1075, "author_profile": "https://Stackoverflow.com/users/1075", "pm_score": 3, "selected": false, "text": "Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;\n Driver={SQL Server};Serv...
2008/10/15
[ "https://Stackoverflow.com/questions/206793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]