qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
348,320
<p>Here's the deal. I have a big class hierarchy and I have this one method that is extended all the way through. The method always has to look at one or two more variable at each new level and these variable depend on the actual class in the hierarchy. What I want to do is check those two extra variables then call the...
[ { "answer_id": 348452, "author": "jmucchiello", "author_id": 44065, "author_profile": "https://Stackoverflow.com/users/44065", "pm_score": 0, "selected": false, "text": "// this could be loaded from a file potentially\n// notice that the keys have been sorted.\nconst char* keys[] = { \"1...
2008/12/07
[ "https://Stackoverflow.com/questions/348320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39189/" ]
348,321
<p>I'm going to make a space/trading/combat game that is completely procedurally generated. But, I know that storing all of the details of the whole galaxy in memory is unfeasable. As a result, I've been think that I can use a seed to generate a solar system, and from that solar system, you can use jumpgates to travel ...
[ { "answer_id": 348486, "author": "Darius Bacon", "author_id": 27024, "author_profile": "https://Stackoverflow.com/users/27024", "pm_score": 3, "selected": false, "text": "nplanets" }, { "answer_id": 5488469, "author": "Tom Gullen", "author_id": 356635, "author_profile...
2008/12/07
[ "https://Stackoverflow.com/questions/348321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27677/" ]
348,328
<p>I recently upgraded to Eclipse Ganymede from Europa and now I'm finding that when I'm editing JSP files the IDE crawls when editing HTML attributes (but not JSP attributes).</p> <p>Has anyone experienced this, or have any suggestions?</p> <p>Also if you can point me to a better place to ask Eclipse related questio...
[ { "answer_id": 6994301, "author": "Ben Barkay", "author_id": 885681, "author_profile": "https://Stackoverflow.com/users/885681", "pm_score": 3, "selected": false, "text": "attribute_name=\"\"" }, { "answer_id": 38842103, "author": "Flavio", "author_id": 6693818, "auth...
2008/12/07
[ "https://Stackoverflow.com/questions/348328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34859/" ]
348,342
<p>I'm currently trying to read text from a file and append it to a element in my html page using the DOM and Javascript. I can't get the text to format though. I've tried using innerHtml but isn't formating at all( no line breaks ).</p> <p>Here is the javascript:</p> <pre><code>http = new XMLHttpRequest(); http.open...
[ { "answer_id": 348343, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 1, "selected": false, "text": "<pre>" }, { "answer_id": 348349, "author": "olliej", "author_id": 784, "author_profile": "https://Stacko...
2008/12/07
[ "https://Stackoverflow.com/questions/348342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44160/" ]
348,363
<p>I'm writing an application that allows users to upload images onto the server. I expect about 20 images per day all jpeg and probably not edited/resized. (This is another question, how to resize the images on the server side before storing. Maybe someone can please drop a .NET resource for that in the comment or so)...
[ { "answer_id": 38105092, "author": "Uday Hiwarale", "author_id": 2790983, "author_profile": "https://Stackoverflow.com/users/2790983", "pm_score": 3, "selected": false, "text": "id" } ]
2008/12/07
[ "https://Stackoverflow.com/questions/348363", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14027/" ]
348,371
<p>I've got MS Access database with linked tables, whenever each table is linked to a table in the same SQL Server database. I have a query inside Access that joins two tables (in particular I'm updating a table based on another using a join).</p> <p>The question is does Access "download" all the table data before doi...
[ { "answer_id": 348439, "author": "David-W-Fenton", "author_id": 9787, "author_profile": "https://Stackoverflow.com/users/9787", "pm_score": 2, "selected": false, "text": " WHERE Format(MyDate,\"YYYY\") = 2008\n" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/348371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10793/" ]
348,392
<p>How can I receive and send email in python? A 'mail server' of sorts.</p> <p>I am looking into making an app that listens to see if it receives an email addressed to foo@bar.domain.com, and sends an email to the sender.</p> <p>Now, am I able to do this all in python, would it be best to use 3rd party libraries? </...
[ { "answer_id": 348551, "author": "Manuel Ceron", "author_id": 23657, "author_profile": "https://Stackoverflow.com/users/23657", "pm_score": 6, "selected": true, "text": "import smtplib\n\nserver = 'mail.server.com'\nuser = ''\npassword = ''\n\nrecipients = ['user@mail.com', 'other@mail.c...
2008/12/08
[ "https://Stackoverflow.com/questions/348392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2592/" ]
348,408
<p>I'm a little new to the Java 5 annotations and I'm curious if either of these are possible:</p> <p>This annotation would generate a simple getter and setter for you.</p> <pre><code>@attribute private String var = ""; </code></pre> <p>The <code>@NotNull</code> annotation indicates that a variable connot be null so...
[ { "answer_id": 349104, "author": "jamesh", "author_id": 4737, "author_profile": "https://Stackoverflow.com/users/4737", "pm_score": 5, "selected": true, "text": "@NonNull" }, { "answer_id": 681825, "author": "Scott Stanchfield", "author_id": 12541, "author_profile": "...
2008/12/08
[ "https://Stackoverflow.com/questions/348408", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42994/" ]
348,410
<p>Is it possible in PHP to do something like this? How would you go about writing a function? Here is an example. The order is the most important thing.</p> <pre><code>$customer['address'] = '123 fake st'; $customer['name'] = 'Tim'; $customer['dob'] = '12/08/1986'; $customer['dontSortMe'] = 'this value doesnt need to...
[ { "answer_id": 348418, "author": "Eran Galperin", "author_id": 10585, "author_profile": "https://Stackoverflow.com/users/10585", "pm_score": 7, "selected": false, "text": "function sortArrayByArray(array $array, array $orderArray) {\n $ordered = array();\n foreach ($orderArray as $...
2008/12/08
[ "https://Stackoverflow.com/questions/348410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
348,417
<p>Some time ago I wrote a piece of code to update multiple rows in a database table. The code was like this</p> <pre><code>var db = new MyDataContext(); db.Execute("UPDATE Details SET IsActive = 0 WHERE MasterId = 1"); </code></pre> <p>Then the other day when I got the latest version of the file I saw that somebody ...
[ { "answer_id": 1718317, "author": "Shannon Davidson", "author_id": 103596, "author_profile": "https://Stackoverflow.com/users/103596", "pm_score": 2, "selected": false, "text": "context.Task.Update(t => t.Id == 1, t2 => new Task {StatusId = 2});\n" }, { "answer_id": 3355796, ...
2008/12/08
[ "https://Stackoverflow.com/questions/348417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24293/" ]
348,419
<p>I have a sorted list that contains the column headers, how do I rearrange my datagridview so it is in the same order as my sorted list?</p> <p>I've tried the code below but this doesn't always work, some columns are not sorted correctly. Thanks for any help with this.</p> <pre><code>sortedColumnNames.Sort(); ...
[ { "answer_id": 348474, "author": "Robert Rossney", "author_id": 19403, "author_profile": "https://Stackoverflow.com/users/19403", "pm_score": 3, "selected": false, "text": "SortedColumnNames" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/348419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
348,421
<p>I am having problems running my Junit tests via Ant. I can't seem to get Ant to see the properties file it needs to load a dll my project needs. All my tests work using the Junit GUI in Elcipse, so I'm pretty sure it's not a problem with the tests themselves. I think my problem is something classpath-related, but...
[ { "answer_id": 349029, "author": "Staale", "author_id": 3355, "author_profile": "https://Stackoverflow.com/users/3355", "pm_score": 2, "selected": false, "text": "clazz.getResource(clazz.getName()+\".class\")\n" }, { "answer_id": 349825, "author": "Ken Gentle", "author_id...
2008/12/08
[ "https://Stackoverflow.com/questions/348421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
348,428
<p>I've been trying with limited success to export a crosstab query result set to Excel using Access 2003. Occasionally, the export works correctly, and Excel shows with no errors. Other times, using the exact same query parameters, I get a 3190 error - too many fields. I am using the TransferSpreadsheet option in a ma...
[ { "answer_id": 356492, "author": "Jon Wilson", "author_id": 27876, "author_profile": "https://Stackoverflow.com/users/27876", "pm_score": 0, "selected": false, "text": "DoCmd.SetWarnings False\n DoCmd.OpenQuery \"TempTable-Make\" \n DoCmd.RunSQL \"DROP TABLE TempTable\" \n ExportToExcel(...
2008/12/08
[ "https://Stackoverflow.com/questions/348428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
348,440
<p>Is there an easy way to move around controls on a form exactly the same way as the tab key? This includes moving around cells on a datagridview etc.</p>
[ { "answer_id": 348492, "author": "Marioh", "author_id": 24293, "author_profile": "https://Stackoverflow.com/users/24293", "pm_score": 3, "selected": true, "text": "private void Form1_KeyPress(object sender, KeyPressEventArgs e)\n{\n if (e.KeyChar == 13)\n GetNextControl(ActiveCo...
2008/12/08
[ "https://Stackoverflow.com/questions/348440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29823/" ]
348,465
<p>I have the following code that I need to run over a matrix with over 20000 rows. It takes several minutes to run and the datenum and str2double functions appear to be the bottlenecks. Since no calculation depends on previous ones is there a way to break the loop into multiple parts and have them execute in parallel?...
[ { "answer_id": 471420, "author": "Jason S", "author_id": 44330, "author_profile": "https://Stackoverflow.com/users/44330", "pm_score": 2, "selected": true, "text": "octave-3.0.3.exe:15> s=sprintf('1 2\\n3 4');\noctave-3.0.3.exe:16> m=str2double(s)\nm =\n\n 1 2\n 3 4\n\n\noctave-3...
2008/12/08
[ "https://Stackoverflow.com/questions/348465", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14744/" ]
348,469
<p>While the J2EE module reference feature allows your to create common Java library projects, I can't find a neat way to do this for web content.</p> <p>I have common JSPs, CSS files, JavaScript libraries and even descriptor fragments that I would like to use across a number of Dynamic Web Projects, so that these ar...
[ { "answer_id": 366802, "author": "Paul Fisher", "author_id": 39808, "author_profile": "https://Stackoverflow.com/users/39808", "pm_score": 2, "selected": false, "text": "svn up" }, { "answer_id": 15404702, "author": "JZ.Hunt", "author_id": 1273270, "author_profile": "...
2008/12/08
[ "https://Stackoverflow.com/questions/348469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
348,491
<p>I have a code igniter project, and I wanted to try debugging it using Zend Studio. WHen I start debugging, I immediately run ino</p> <p>"The URI you submitted has disallowed characters."</p> <p>Does anyone have any idea?</p>
[ { "answer_id": 348548, "author": "Cody Caughlan", "author_id": 25398, "author_profile": "https://Stackoverflow.com/users/25398", "pm_score": 5, "selected": false, "text": "$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\\-';\n" }, { "answer_id": 17566966, "author": "Stelian", ...
2008/12/08
[ "https://Stackoverflow.com/questions/348491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
348,502
<p>I have created an application that writes some data to the root folder of the directory in which it was installed (in Program Files). But under Windows Vista, the program is unable to write to the directory because the UAC restricts administrative privileges.</p> <p>I need to be able to do the following</p> <ol> <...
[ { "answer_id": 348549, "author": "flipdoubt", "author_id": 470, "author_profile": "https://Stackoverflow.com/users/470", "pm_score": 2, "selected": true, "text": "<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestversion=\"1.0\">\n<assemblyidentity version=\"1.0.0.0\" processo...
2008/12/08
[ "https://Stackoverflow.com/questions/348502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33052/" ]
348,530
<p>I have an asp:DropDownList on a page that, due to the 1024x768 development standard can truncate some of the text values in the dropdown (not enough of them, apparently, to redesign the layout ), so I need to display a tooltip of the selected value <em>when</em> a dropdown item is being selected (i.e. when the dropd...
[ { "answer_id": 348668, "author": "BenAlabaster", "author_id": 40650, "author_profile": "https://Stackoverflow.com/users/40650", "pm_score": 0, "selected": false, "text": "<asp:DropDownList id=\"ddl1\" runat=\"server\">\n <asp:ListItem Text=\"Display text\" Value=\"1\" Title=\"This is my...
2008/12/08
[ "https://Stackoverflow.com/questions/348530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5302/" ]
348,533
<p>I am trying to make a graph in java that would have different nodes. some nodes would be connected to others and some wont. If they are connected then some boolean value for that node will be true and another variable will hold the value of the node it is connected to. </p> <p>...any suggestions on what you guys th...
[ { "answer_id": 348543, "author": "Tom", "author_id": 20, "author_profile": "https://Stackoverflow.com/users/20", "pm_score": 1, "selected": false, "text": "Node" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/348533", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41685/" ]
348,562
<p>I have a messy function that needs refactoring, it has too many nested IF's and it makes me nervous just to look at it!</p> <p><b>Please ignore what the functions are doing, I'm more concerned with the structure/flow and how it can be refactored so it has less nested IF statements</b></p> <p>The basic flow is as f...
[ { "answer_id": 348575, "author": "Andrew Kennan", "author_id": 22506, "author_profile": "https://Stackoverflow.com/users/22506", "pm_score": 3, "selected": false, "text": " private static bool CanMoveToSafeFolder(string filename)\n {\n return IsValidFileFormat(filename)\n ...
2008/12/08
[ "https://Stackoverflow.com/questions/348562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
348,573
<p>I was wondering what people thought about the decision to support Entity Framework over LINQ-to-SQL? I have an application I'm developing originally in LINQ-to-SQL. I found it the perfect solution for our application. </p> <p>While attempting to port to Entity Framework I was surprised how rough it was. IMHO, no...
[ { "answer_id": 348694, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 3, "selected": true, "text": "Expression.Invoke" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/348573", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37591/" ]
348,576
<p>I'm using QUnit to test some JQuery, and I've got Watin to load up the test page and parse out the test results, but I'm wondering if there's a way to dynamically generate the tests from the page using the MS Test suite rather than having to write a Test function for each test?</p> <p>I'm just trying to reduce the ...
[ { "answer_id": 348694, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 3, "selected": true, "text": "Expression.Invoke" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/348576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2975/" ]
348,582
<p>We use Log4j (and Commons Logging) to log our error messages. Now we want to set up an additional log appender that outputs fatal errors to syslog, but without the exceptionally long Java stacktraces (those will still be available in the full log file).</p> <p>How would one configure this (using log4j.xml)? Is ther...
[ { "answer_id": 1788778, "author": "Totach", "author_id": 209622, "author_profile": "https://Stackoverflow.com/users/209622", "pm_score": 4, "selected": false, "text": "import org.apache.log4j.PatternLayout;\n\npublic class NoStackTracePatterLayout extends PatternLayout {\n\n @Override\n ...
2008/12/08
[ "https://Stackoverflow.com/questions/348582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14955/" ]
348,586
<p>After installing the F# September CTP (1.9.6.2), Visual Studio 2008 frequently gives an error "Microsoft Visual C# IntelliSense has stopped working" which promptly crashes all of Visual Studio. I tried the tips mentioned in a <a href="https://stackoverflow.com/questions/178846/visual-studio-intellisense-stopped-wor...
[ { "answer_id": 1788778, "author": "Totach", "author_id": 209622, "author_profile": "https://Stackoverflow.com/users/209622", "pm_score": 4, "selected": false, "text": "import org.apache.log4j.PatternLayout;\n\npublic class NoStackTracePatterLayout extends PatternLayout {\n\n @Override\n ...
2008/12/08
[ "https://Stackoverflow.com/questions/348586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40783/" ]
348,589
<p>I need to make some code to talk to a SOAP web service. Unfortunately I'm unable to get a connection to the service as it requires a SSL connection encrypted with a special certificate. I've been given a pk12 certificate which when installed into my keychain allows me to access the SOAP service manually via Safari...
[ { "answer_id": 367254, "author": "Nick R.", "author_id": 373524, "author_profile": "https://Stackoverflow.com/users/373524", "pm_score": 0, "selected": false, "text": "using System.Security.Cryptography.X509Certificates;\n\npublic partial class _Default : System.Web.UI.Page \n{\n prot...
2008/12/08
[ "https://Stackoverflow.com/questions/348589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6852/" ]
348,606
<p>As you can see below, in the constructor I'm instantiating a validation object so I can validate a user's email in a set method. Is this architecture best practice or flawed? Can I avoid making my User class directly dependent on my Validation class?</p> <pre><code>Class User { Private Email //constructor User()...
[ { "answer_id": 348746, "author": "Rob Williams", "author_id": 26682, "author_profile": "https://Stackoverflow.com/users/26682", "pm_score": 4, "selected": true, "text": "User" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/348606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26180/" ]
348,630
<p>How do I connect to Gmail and determine which messages have attachments? I then want to download each attachment, printing out the Subject: and From: for each message as I process it.</p>
[ { "answer_id": 641843, "author": "jfs", "author_id": 4279, "author_profile": "https://Stackoverflow.com/users/4279", "pm_score": 3, "selected": false, "text": "#!/usr/bin/env python\n\"\"\"Save all attachments for given gmail account.\"\"\"\nimport os, sys\nfrom libgmail import GmailAcco...
2008/12/08
[ "https://Stackoverflow.com/questions/348630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
348,657
<p>I have a string from which I wish to extract a single word, but with a numerical appended to it, which might be different in each line:</p> <pre><code>This is string1 this is string This is string11 This is string6 and it is in this line </code></pre> <p>I want to parse this file and get the values of &quot;stringX...
[ { "answer_id": 348670, "author": "Nathan Fellman", "author_id": 1084, "author_profile": "https://Stackoverflow.com/users/1084", "pm_score": 5, "selected": true, "text": "while ($pattern =~/(string(100|\\d{1,2}))/g) {\n print $1;\n}\n" }, { "answer_id": 348735, "author": "j...
2008/12/08
[ "https://Stackoverflow.com/questions/348657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35416/" ]
348,680
<p>I am working with a wrapper class for <code>CFHTTPMessage</code>, which contains a <code>CFHTTPMessageRef</code> object to which is added the method (GET), the URL of the web application server, and a few custom headers containing the date and an authentication nonce.</p> <p>I'm having some problems getting the met...
[ { "answer_id": 351335, "author": "Alex Reynolds", "author_id": 19410, "author_profile": "https://Stackoverflow.com/users/19410", "pm_score": 4, "selected": true, "text": "NSData *d = (NSData *)CFHTTPMessageCopySerializedMessage(messageRef);\nNSLog(@\"%@\",[[[NSString alloc] initWithBytes...
2008/12/08
[ "https://Stackoverflow.com/questions/348680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19410/" ]
348,684
<p>I've got an NSBrowser hooked up to an NSTreeController bound to an array of NSTreeNode objects. It's easy enough to get the text portion working by setting the Content and Content Value bindings to properly reference the tree controller, but how do I set the image for each cell using bindings?</p>
[ { "answer_id": 351335, "author": "Alex Reynolds", "author_id": 19410, "author_profile": "https://Stackoverflow.com/users/19410", "pm_score": 4, "selected": true, "text": "NSData *d = (NSData *)CFHTTPMessageCopySerializedMessage(messageRef);\nNSLog(@\"%@\",[[[NSString alloc] initWithBytes...
2008/12/08
[ "https://Stackoverflow.com/questions/348684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1512/" ]
348,688
<p>I'm using a hosting service which allows me to backup my SQL 2008 database and download the BAK file via a web interface only--and I have access to the database via Management Studio. I can execute the backup command from Management Studio,but I don't have rights to the path where the backups are located. Is there a...
[ { "answer_id": 5413233, "author": "anthonyvscode", "author_id": 79254, "author_profile": "https://Stackoverflow.com/users/79254", "pm_score": 2, "selected": false, "text": "::Run dbbackup.bat and append all output to log.txt\n\nmd C:\\[directory]\\%date:~-4,4%%date:~-7,2%%date:~-10,2%\n\...
2008/12/08
[ "https://Stackoverflow.com/questions/348688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5592/" ]
348,689
<p>I'm doing some simple tests (in preparation for a larger project) to call an ASP.NET WebMethod using JQuery AJAX. In my example, my WebMethod returns a simple string. However, when I attempt to call it using JQuery, I get the entire HTML page content returned instead of just my string. What am I missing?</p> <p>Cli...
[ { "answer_id": 348770, "author": "JoshBerke", "author_id": 26160, "author_profile": "https://Stackoverflow.com/users/26160", "pm_score": 6, "selected": true, "text": " $(\"#Result\").click(function() {\n $.ajax({\n type: \"POST\",\n url: \"Default.aspx/GetDate\",\n dat...
2008/12/08
[ "https://Stackoverflow.com/questions/348689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44197/" ]
348,690
<p>How do I compare two dates in Lingo? To be specific, I want to know if today's date is after some fixed date. I know I can create the fixed date by using:</p> <pre><code>date("20090101") </code></pre> <p>and I can get the current date using:</p> <pre><code>_system.date() </code></pre> <p>but I can't seem to dire...
[ { "answer_id": 348712, "author": "Elie", "author_id": 23249, "author_profile": "https://Stackoverflow.com/users/23249", "pm_score": 0, "selected": false, "text": " if (_system.date().char[1..2] >= 01 and _system.date().char[4..5] >= 01 and _system.date().char[7..10] >= 2010) then\n a...
2008/12/08
[ "https://Stackoverflow.com/questions/348690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23249/" ]
348,708
<p>Ok, what I'm trying to do is build a web app that allows students to visually organize their class calendar using drag and drop. but They have to be able to drag and drop to specific locations (when those classes are available), not just anywhere.</p> <p>This would be a 'fixed week' calendar. I was considering usin...
[ { "answer_id": 348874, "author": "Tuminoid", "author_id": 40657, "author_profile": "https://Stackoverflow.com/users/40657", "pm_score": 3, "selected": true, "text": "<body style=\"font-size: 12px;\">\n<h1>A Simple Example</h1>\n<table><tbody><tr>\n<td>\n<!-- Create a source with two node...
2008/12/08
[ "https://Stackoverflow.com/questions/348708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43510/" ]
348,724
<p>I have a situation where I'm populating a gridview with a bound data source, and want two additional rows at the very bottom; one to show the sum of values in the columns and one to show the average of values in the columns. I can quite easily calculate these values by aggregating information taken from the rowData...
[ { "answer_id": 348762, "author": "Samiksha", "author_id": 29515, "author_profile": "https://Stackoverflow.com/users/29515", "pm_score": 2, "selected": false, "text": "UNION\n" }, { "answer_id": 348778, "author": "Eugene Yokota", "author_id": 3827, "author_profile": "h...
2008/12/08
[ "https://Stackoverflow.com/questions/348724", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
348,730
<p>What does the "class" part of a template statement do?</p> <p>Example:</p> <pre><code>template &lt;class T&gt; class Something { public: Something(const T &amp;something); } </code></pre> <p>And what else can go there? I usually only see "class".</p>
[ { "answer_id": 348740, "author": "AlfaZulu", "author_id": 44060, "author_profile": "https://Stackoverflow.com/users/44060", "pm_score": 4, "selected": true, "text": "class" }, { "answer_id": 348774, "author": "e.James", "author_id": 33686, "author_profile": "https://S...
2008/12/08
[ "https://Stackoverflow.com/questions/348730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43496/" ]
348,736
<p>I have noticed jQuery (or is it Firefox) will turn some of my <code>&lt;span class="presentational"&gt;&lt;/span&gt; into &lt;span class="presentational" /&gt;</code></p> <p>Now my question is, is this okay to write my markup like this? Will any browsers choke on it?</p> <p>Personally, I think it looks cleaner to ...
[ { "answer_id": 348767, "author": "mmx", "author_id": 33708, "author_profile": "https://Stackoverflow.com/users/33708", "pm_score": 3, "selected": false, "text": "<script type='text/javascript' src='script.js' />\n" }, { "answer_id": 348781, "author": "Elle H", "author_id"...
2008/12/08
[ "https://Stackoverflow.com/questions/348736", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
348,756
<p>Modifying the HTTP Response Using Filters</p>
[ { "answer_id": 348766, "author": "Samiksha", "author_id": 29515, "author_profile": "https://Stackoverflow.com/users/29515", "pm_score": 0, "selected": false, "text": "HttpServletResponse" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/348756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42791/" ]
348,760
<p>What is the simplest way to get the machine's time zone as a positive or negative UTC offset, preferably using some time of shell command?</p>
[ { "answer_id": 348824, "author": "Mihai Limbășan", "author_id": 14444, "author_profile": "https://Stackoverflow.com/users/14444", "pm_score": 3, "selected": false, "text": "date +%z" }, { "answer_id": 348848, "author": "ysth", "author_id": 17389, "author_profile": "ht...
2008/12/08
[ "https://Stackoverflow.com/questions/348760", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
348,763
<p>I have a template class like below.</p> <pre><code>template&lt;int S&gt; class A { private: char string[S]; public: A() { for(int i =0; i&lt;S; i++) { . . } } int MaxLength() { return S; } }; </code></pre> <p>If i instantiate the above class with different values of S, w...
[ { "answer_id": 348772, "author": "Frank Krueger", "author_id": 338, "author_profile": "https://Stackoverflow.com/users/338", "pm_score": 0, "selected": false, "text": "A()" }, { "answer_id": 348780, "author": "Alastair", "author_id": 31038, "author_profile": "https://...
2008/12/08
[ "https://Stackoverflow.com/questions/348763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39615/" ]
348,777
<p>I have to read a COM port and the data should be displayed inside the TextArea dynamically (data will come every minute), which I have created inside JPanel.</p> <p>Advance Thanks for reply.</p>
[ { "answer_id": 349797, "author": "Ken Gentle", "author_id": 8709, "author_profile": "https://Stackoverflow.com/users/8709", "pm_score": 0, "selected": false, "text": "javax.comm" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/348777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
348,785
<p>I know the use of server-side controls is a no-no in ASP.NET MVC, however we have a long list of crystal reports that the company has already produced for a previous application that I would like to utilize for our new ASP.NET MVC application.</p> <p>Is there an appropriate way to use crystal reports in ASP.NET MVC...
[ { "answer_id": 2747571, "author": "coderguy123", "author_id": 73496, "author_profile": "https://Stackoverflow.com/users/73496", "pm_score": 6, "selected": false, "text": "using CrystalDecisions.CrystalReports.Engine;\n\npublic ActionResult Report()\n {\n ReportClass rptH = new ...
2008/12/08
[ "https://Stackoverflow.com/questions/348785", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11908/" ]
348,792
<p>How do you tell if caps lock is on using JavaScript?</p> <p>One caveat though: I did google it and the best solution I could find was to attach an <code>onkeypress</code> event to every input, then check each time if the letter pressed was uppercase, and if it was, then check if shift was also held down. If it wasn...
[ { "answer_id": 348802, "author": "rajesh pillai", "author_id": 34644, "author_profile": "https://Stackoverflow.com/users/34644", "pm_score": 8, "selected": true, "text": "function isCapslock(e) {\n const IS_MAC = /Mac/.test(navigator.platform);\n\n const charCode = e.charCode;\n const...
2008/12/08
[ "https://Stackoverflow.com/questions/348792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9021/" ]
348,807
<p>I have defined a new dialog and its controls in an already existing resource file. I have also created a new file which will handle the events being generated from this dialog. But I am not sure how to connect these two. </p> <p>Is the statement <code>enum { IDD=IDD_NEW_DIALOG };</code> all that is required to conn...
[ { "answer_id": 348810, "author": "peterchen", "author_id": 31317, "author_profile": "https://Stackoverflow.com/users/31317", "pm_score": 1, "selected": false, "text": "DoModal()" }, { "answer_id": 349093, "author": "DavidK", "author_id": 31394, "author_profile": "http...
2008/12/08
[ "https://Stackoverflow.com/questions/348807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41518/" ]
348,821
<p>This question is coded in pseudo-PHP, but I really don't mind what language I get answers in (except for Ruby :-P), as this is purely hypothetical. In fact, PHP is quite possibly the worst language to be doing this type of logic in. Unfortunately, I have never done this before, so I can't provide a real-world exampl...
[ { "answer_id": 348830, "author": "Stefan Mai", "author_id": 13257, "author_profile": "https://Stackoverflow.com/users/13257", "pm_score": 1, "selected": false, "text": "$i = 0;\nwhile ($i < count($downloads) - 1) {\n if (!is_object($downloads[$i])) {\n $downloads[$i] = new Downl...
2008/12/08
[ "https://Stackoverflow.com/questions/348821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10839/" ]
348,833
<p>If I generate an exception on my own, I can include any info into the exception: a number of code line and name of source file. Something like this:</p> <pre><code>throw std::exception("myFile.cpp:255"); </code></pre> <p>But what's with unhandled exceptions or with exceptions that were not generated by me?</p>
[ { "answer_id": 348843, "author": "Frank Krueger", "author_id": 338, "author_profile": "https://Stackoverflow.com/users/338", "pm_score": 2, "selected": false, "text": "#define throw_line(msg) \\\n throw std::exception(msg \" \" __FILE__ \":\" __LINE__)\n\nvoid f() {\n throw_line(\"...
2008/12/08
[ "https://Stackoverflow.com/questions/348833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44217/" ]
348,849
<p>I am writing a batch file, in which I call an EXE to execute. Now, statements after the call to the EXE should not execute till the EXE completes its execution. How can I do it in the batch file (on Windows)?</p>
[ { "answer_id": 348851, "author": "Dean Rather", "author_id": 14966, "author_profile": "https://Stackoverflow.com/users/14966", "pm_score": 0, "selected": false, "text": "PAUSE\n" }, { "answer_id": 348857, "author": "Toon Krijthe", "author_id": 18061, "author_profile":...
2008/12/08
[ "https://Stackoverflow.com/questions/348849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
348,853
<p>Inspired by <a href="https://stackoverflow.com/questions/40845/how-do-f-units-of-measurement-work">Units of Measure in F#</a>, and despite asserting (<a href="https://stackoverflow.com/questions/39492/where-can-f-actually-save-time-and-money#71112">here</a>) that you couldn't do it in C#, I had an idea the other day...
[ { "answer_id": 348868, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 4, "selected": false, "text": "Length length = Length.FromMillimeters(n1);\ndecimal lengthInFeet = length.Feet;\nLength length2 = length.A...
2008/12/08
[ "https://Stackoverflow.com/questions/348853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11410/" ]
348,864
<p>F Is there a way to monitor the FTP port so that I can know what commands my FTP application is sending to a FTP server?</p> <p>I am using a closed-source FTP client application, which is not working with a closed-source FTP application server. The client and the server are not communicating well with each other, a...
[ { "answer_id": 1012046, "author": "cjs", "author_id": 107294, "author_profile": "https://Stackoverflow.com/users/107294", "pm_score": 0, "selected": false, "text": "ktrace" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/348864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23637/" ]
348,867
<p>can anyone think of a better way to do this?</p> <pre><code> [AcceptVerbs(HttpVerbs.Post)] public ActionResult SaveAction() { NameValueDeserializer value = new NameValueDeserializer(); // selected messages MemberMessageSaveAction[] messages = (MemberMessageSaveAction[])value.Dese...
[ { "answer_id": 348870, "author": "Toon Krijthe", "author_id": 18061, "author_profile": "https://Stackoverflow.com/users/18061", "pm_score": 2, "selected": false, "text": "[AcceptVerbs(HttpVerbs.Post)]\npublic ActionResult SaveAction() {\n // SNIP \n if (action == MemberMessageAction....
2008/12/08
[ "https://Stackoverflow.com/questions/348867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43380/" ]
348,880
<p>Is it possible to create an sql statement that selects the week number (NOT the day of week - or the day number in a week). I'm creating a view to select this extra information along with a couple of other fields and thus can not use a stored procedure. I'm aware that it's possible to create a UDF to do the trick, b...
[ { "answer_id": 348894, "author": "Gishu", "author_id": 1695, "author_profile": "https://Stackoverflow.com/users/1695", "pm_score": 2, "selected": false, "text": "DATEPART(wk, ‘Jan 1, xxxx’) = 1\n" }, { "answer_id": 348896, "author": "Samiksha", "author_id": 29515, "au...
2008/12/08
[ "https://Stackoverflow.com/questions/348880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11619/" ]
348,892
<p>I normally in my projects use such these code:</p> <pre><code>If user.IsInRole("Admin") Then deleteButton.Visible = True else deleteButton.Visible = False </code></pre> <p>But I want to control roles, which can see this button in database.</p> <p>For this purpose how should database design be?</p> <p>Than...
[ { "answer_id": 348901, "author": "Vilx-", "author_id": 41360, "author_profile": "https://Stackoverflow.com/users/41360", "pm_score": 1, "selected": false, "text": "user.isInRole(\"Admin\")" }, { "answer_id": 348927, "author": "BobbyShaftoe", "author_id": 38426, "autho...
2008/12/08
[ "https://Stackoverflow.com/questions/348892", "https://Stackoverflow.com", "https://Stackoverflow.com/users/439507/" ]
348,900
<p>There are a few questions on SO already regarding LINQ pivots and while a couple of them outline my exact problem, I can't successfully translate them to a working solution. I feel that this is mostly due to a join in my tables.</p> <p>So for the benefit of all the LINQ junkies out there who love a problem, here's...
[ { "answer_id": 348901, "author": "Vilx-", "author_id": 41360, "author_profile": "https://Stackoverflow.com/users/41360", "pm_score": 1, "selected": false, "text": "user.isInRole(\"Admin\")" }, { "answer_id": 348927, "author": "BobbyShaftoe", "author_id": 38426, "autho...
2008/12/08
[ "https://Stackoverflow.com/questions/348900", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15609/" ]
348,919
<p>I'd like to be able to send a Ruby app to some colleagues without requiring them to install a Ruby interpreter. A single exe would be preferable.</p> <p>I googled and found "RubyScript2Exe".</p> <p>What are your experiences with that? Are there other such tools or are there better approaches altogether than buildi...
[ { "answer_id": 682780, "author": "JasonSmith", "author_id": 2938, "author_profile": "https://Stackoverflow.com/users/2938", "pm_score": 0, "selected": false, "text": "exerb" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/348919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15323/" ]
348,920
<p>I am new to php. I made a member registration on login page and adm too. So inside admin I wanted to get the list of the members and delete the members I dont want. So I took the a code from a sample code for phone book from <a href="http://localhost/xamp" rel="nofollow noreferrer">http://localhost/xamp</a> and edi...
[ { "answer_id": 348941, "author": "OIS", "author_id": 36175, "author_profile": "https://Stackoverflow.com/users/36175", "pm_score": 1, "selected": false, "text": "&amp;member_1d" }, { "answer_id": 348942, "author": "markus", "author_id": 11995, "author_profile": "https...
2008/12/08
[ "https://Stackoverflow.com/questions/348920", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40975/" ]
348,928
<p>Parser Error Message: The entry 'SiteSqlServer' has already been added.</p> <p>Source Error:</p> <blockquote> <pre><code>Line 23: providerName="System.Data.SqlClient"/&gt; --&gt; Line 24: &lt; ! -- Connection String for SQL Server 2000/2005 --&gt; Line 25: &lt;add name="SiteSqlServer" connectionString="Server=(l...
[ { "answer_id": 351961, "author": "Samiksha", "author_id": 29515, "author_profile": "https://Stackoverflow.com/users/29515", "pm_score": 2, "selected": true, "text": "<connectionStrings>\n\n<remove name=\"SiteSqlServer\" />\n\n<add name=\"SiteSqlServer\" connectionString=\"server=(local);...
2008/12/08
[ "https://Stackoverflow.com/questions/348928", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29515/" ]
348,953
<p>I am extending a template class using C++ in Visual Studio 2005. It is giving me an error when I try to extend the template base class with:</p> <pre><code>template &lt;class K, class D&gt; class RedBlackTreeOGL : public RedBlackTree&lt;K, D&gt;::RedBlackTree // Error 1 { public: RedBlackTreeOGL(); ~RedBlackT...
[ { "answer_id": 348955, "author": "Sandeep Datta", "author_id": 39648, "author_profile": "https://Stackoverflow.com/users/39648", "pm_score": 1, "selected": false, "text": "RedBlackTree<K, D>::RedBlackTree" }, { "answer_id": 348968, "author": "Brock Woolf", "author_id": 40...
2008/12/08
[ "https://Stackoverflow.com/questions/348953", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40002/" ]
348,964
<p>Can someone share a simple example of using the <code>foreach</code> keyword with custom objects?</p>
[ { "answer_id": 348977, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 7, "selected": true, "text": "foreach" }, { "answer_id": 348983, "author": "Mats Fredriksson", "author_id": 2973, "author_profile":...
2008/12/08
[ "https://Stackoverflow.com/questions/348964", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42070/" ]
348,966
<p>I'm working with asp.net (I'm a designer) and at some point during debugging it'll throw me and I'll get to an Exception objErr in the code - and when I hover it says "file not found". I assume it's an image but I've been searching and can't find anyway to pinpoint which file is missing. I hope this is enough inform...
[ { "answer_id": 349054, "author": "Germstorm", "author_id": 18631, "author_profile": "https://Stackoverflow.com/users/18631", "pm_score": 0, "selected": false, "text": "<asp:HyperLink ID=\"lnkExample\" runat=\"server\" NavigateUrl=\"~/Pages/Example.aspx\"> Example</asp:HyperLink>\n" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/348966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
348,985
<p>I user sun jdk 1.5 ThreadPoolExecutor( 24, 24,60,TimeUnit.SECONDS, new LinkedBlockingQueue()). soemtime I use jdb tool to find the status of all threads in thread pool are " waiting in a monitor", the code is : </p> <pre><code> String key = getKey(dt.getPrefix(), id); synchronized (key.intern()) { ----...
[ { "answer_id": 348994, "author": "Bombe", "author_id": 43582, "author_profile": "https://Stackoverflow.com/users/43582", "pm_score": 2, "selected": false, "text": "key" }, { "answer_id": 358513, "author": "erickson", "author_id": 3474, "author_profile": "https://Stack...
2008/12/08
[ "https://Stackoverflow.com/questions/348985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44230/" ]
348,991
<p>I have a string, lets say "123|ABC|test|12345|FF" and I want to xor the ascii value of each character and print the result in hex.</p> <p>What is the simplest way?</p>
[ { "answer_id": 348994, "author": "Bombe", "author_id": 43582, "author_profile": "https://Stackoverflow.com/users/43582", "pm_score": 2, "selected": false, "text": "key" }, { "answer_id": 358513, "author": "erickson", "author_id": 3474, "author_profile": "https://Stack...
2008/12/08
[ "https://Stackoverflow.com/questions/348991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
348,999
<p>On my Centos server Python's mimetypes.guess_type("mobile.3gp") returns (None, None), instead of ('video/3gpp', None).</p> <p>Where does Python get the list of mimetypes from, and is it possible to add a missing type to the list?</p>
[ { "answer_id": 349020, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 4, "selected": true, "text": "knownfiles" }, { "answer_id": 43311856, "author": "JinSnow", "author_id": 1486850, "author_profile": "https...
2008/12/08
[ "https://Stackoverflow.com/questions/348999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21716/" ]
349,004
<p>I have written a game that uses GLUT, OpenGL and FMOD. The problem is that the binary won't run, unless Visual Studio 2008 is installed on the computer.</p> <p>Why is this?</p>
[ { "answer_id": 349017, "author": "Eugene Yokota", "author_id": 3827, "author_profile": "https://Stackoverflow.com/users/3827", "pm_score": 3, "selected": false, "text": "cout << \"Hello, World\" << endl;\n" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/349004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40002/" ]
349,022
<p>I have an app that run on many computers and connect to sql server I want to log the machine names of that computers in a table every time they connect how can I do that</p> <p>I want to know if there is a command like that</p> <p>"Select @@MachineName"</p>
[ { "answer_id": 349028, "author": "Samiksha", "author_id": 29515, "author_profile": "https://Stackoverflow.com/users/29515", "pm_score": 0, "selected": false, "text": " [ , [ @datasrc= ] 'data_source' ] \n [ , [ @location= ] 'location' ] \n [ , [ @provstr= ] 'provider_string' ] \n [ , [ @...
2008/12/08
[ "https://Stackoverflow.com/questions/349022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
349,023
<p>The code below is the code i am using. It works fine in thunderbird but not in mac mail client (and i assume anything made by microsoft. I currently do not have access to this to test it in). Much as i am aware of the idiosyncrasies of the various mail clients, I am flummoxed by this! It's fairly self explanatory bu...
[ { "answer_id": 349039, "author": "Paul Dixon", "author_id": 6521, "author_profile": "https://Stackoverflow.com/users/6521", "pm_score": 0, "selected": false, "text": "$message =ob_get_contents();\nob_end_clean();\n" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/349023", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31677/" ]
349,025
<p>Is a string literal in C++ created in static memory and destroyed only when the program exits?</p>
[ { "answer_id": 349030, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 7, "selected": true, "text": "char *x = \"hello\";" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/349025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22076/" ]
349,040
<p>I don't want a "close window" menu item in the task bar context menu for my WPF window. My intention is to annoy the user.</p> <p>Thank you!</p>
[ { "answer_id": 349966, "author": "Micah", "author_id": 17744, "author_profile": "https://Stackoverflow.com/users/17744", "pm_score": 3, "selected": false, "text": "<Window ShowInTaskbar=\"False\" ... />\n" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/349040", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22038/" ]
349,050
<p>I'm in the midst of writing a 3d engine and I've come across the LookAt algorithm described in the DirectX documentation:</p> <pre><code>zaxis = normal(At - Eye) xaxis = normal(cross(Up, zaxis)) yaxis = cross(zaxis, xaxis) xaxis.x yaxis.x zaxis.x 0 xaxis.y yaxis.y ...
[ { "answer_id": 353612, "author": "TM.", "author_id": 12983, "author_profile": "https://Stackoverflow.com/users/12983", "pm_score": 2, "selected": false, "text": "gluLookAt" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/349050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3719/" ]
349,055
<p>T have used checkbox column in gridview. On click of a linkbutton, it should be checked that checkboxes in gridview are checked or not. If none check box is checked then it should display alert("Check at leat one check box"). </p>
[ { "answer_id": 349168, "author": "Andreas Grech", "author_id": 44084, "author_profile": "https://Stackoverflow.com/users/44084", "pm_score": 0, "selected": false, "text": "var grid = document.getElementById(\"gridId\"); //Retrieve the grid \n var inputs = grid.getElementsByTagName...
2008/12/08
[ "https://Stackoverflow.com/questions/349055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43886/" ]
349,060
<p>Now I know about the "normal" CSS list styles (roman, latin, etc) and certainly in years past they were somewhat inflexible in not allowing things like:</p> <p>(a)</p> <p>or </p> <p>a)</p> <p>only</p> <p>a.</p> <p>Now I believe that you can get an effect like the above with the :before and :after pseudo-elemen...
[ { "answer_id": 349089, "author": "Eugene Yokota", "author_id": 3827, "author_profile": "https://Stackoverflow.com/users/3827", "pm_score": 4, "selected": true, "text": "H1:before {\n content: \"Chapter \" counter(chapter) \". \";\n counter-increment: chapter; /* Add 1 to chapter *...
2008/12/08
[ "https://Stackoverflow.com/questions/349060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18393/" ]
349,062
<p>Is it possible to overload the null-coalescing operator for a class in C#? </p> <p>Say for example I want to return a default value if an instance is null and return the instance if it's not. The code would look like something like this:</p> <pre><code> return instance ?? new MyClass("Default"); </code></pre>...
[ { "answer_id": 349096, "author": "Simon", "author_id": 15371, "author_profile": "https://Stackoverflow.com/users/15371", "pm_score": 6, "selected": true, "text": "public class TestClass\n{\n public static TestClass operator ??(TestClass test1, TestClass test2)\n {\n return ...
2008/12/08
[ "https://Stackoverflow.com/questions/349062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/936/" ]
349,067
<p>There's this Excel file I want users to be able to download from my server. There must be an easy way to initiate the download of the file after a click on the "Download" button... but I have no clue how to make that happen.</p> <p>I have this so far: (VBscript and ASP)</p> <pre><code>&lt;head&gt; &lt;script type...
[ { "answer_id": 349077, "author": "Kablam", "author_id": 42389, "author_profile": "https://Stackoverflow.com/users/42389", "pm_score": 5, "selected": true, "text": "function exportmasterfile()\n{ var url='../documenten/Master-File.xls'; \n window.open(url,'Download'); \n}\n" },...
2008/12/08
[ "https://Stackoverflow.com/questions/349067", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42389/" ]
349,075
<p>Hey. I have a problem with the highlighter in ComboBox. Recently I had to gray out certain items in a ComboBox and I did that by manually (programitically) drawing strings in the <strong>ComboBox</strong>. In a .NET combobox under the <strong>DrawMode.NORMAL</strong>, the lighlighter will automatically come when you...
[ { "answer_id": 350006, "author": "Eric Rosenberger", "author_id": 41624, "author_profile": "https://Stackoverflow.com/users/41624", "pm_score": 3, "selected": false, "text": "SystemColors.WindowText\n" }, { "answer_id": 351681, "author": "Community", "author_id": -1, ...
2008/12/08
[ "https://Stackoverflow.com/questions/349075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
349,087
<p>I have used checkbox column in gridview. I want to check status of that checkboxes. On click of a button it should be checked that if any checkbox is checked or not. If none checkbox is checked then it should display alert message that check checkbox first.</p>
[ { "answer_id": 349100, "author": "I.devries", "author_id": 6388, "author_profile": "https://Stackoverflow.com/users/6388", "pm_score": 2, "selected": false, "text": "if(document.getElementById('checkBoxId').checked) {\n //checked\n} else {\n //not checked\n}\n" }, { "answer...
2008/12/08
[ "https://Stackoverflow.com/questions/349087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43886/" ]
349,092
<p>I need to have one column as the primary key and another to auto increment an order number field. Is this possible?</p> <p>EDIT: I think I'll just use a composite number as the order number. Thanks anyways.</p>
[ { "answer_id": 349137, "author": "Eugene Yokota", "author_id": 3827, "author_profile": "https://Stackoverflow.com/users/3827", "pm_score": 6, "selected": true, "text": "CREATE TABLE [dbo].[Foo](\n [FooId] [int] IDENTITY(1,1) NOT NULL,\n [BarId] [int] IDENTITY(1,1) NOT NULL\n)\n" ...
2008/12/08
[ "https://Stackoverflow.com/questions/349092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23230/" ]
349,094
<p>I've been having an agruement with a friend that Mason (Perl) is not a framework, but a templating language. I feel Mason for Perl does what JSP does for Java (as an analogy, not pure technical comparison). From what I know, JSP is not a framework and I feel neither is Mason. When I looked up wikipedia <a href="http...
[ { "answer_id": 349124, "author": "mat", "author_id": 42083, "author_profile": "https://Stackoverflow.com/users/42083", "pm_score": 2, "selected": false, "text": "HTML::Template" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/349094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11541/" ]
349,108
<p>What is the correct way of retrieving maximum values of all columns in a table with a single query? Thanks.</p> <p>Clarification: the same query should work on any table, i.e. the column names are not to be hard-coded into it.</p>
[ { "answer_id": 349115, "author": "gnud", "author_id": 27204, "author_profile": "https://Stackoverflow.com/users/27204", "pm_score": 3, "selected": false, "text": "SELECT max(col1) as max_col1, max(col2) as max_col2 FROM `table`;\n" }, { "answer_id": 349163, "author": "ysth", ...
2008/12/08
[ "https://Stackoverflow.com/questions/349108", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27122/" ]
349,119
<p>I have implemented tracing based on System.Diagnostics. </p> <p>I am also using a System.Diagnostics.TextWriterTraceListener, and hooked the whole trace up to a MOSS 2007 Web Application. </p> <p>The trace for some reason is trying to (a) create the log file, and/or (b) write to the log file using <strong>the user...
[ { "answer_id": 349801, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": true, "text": "var wic = WindowsIdentity.Impersonate(IntPtr.Zero); // \"revert to self\"\n/* LOG GOES HERE K */\nwic.Undo(); // return to impe...
2008/12/08
[ "https://Stackoverflow.com/questions/349119", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41291/" ]
349,126
<p>I'm running an upgrade script against a database hosted in Microsoft SQL Server. It's taking a while. Some of the queries are not worth optimising any further, for various reasons.</p> <p>I'm the only person using this database: Is there a way that I can tell SQL Server to not bother with transactions/locking?</p> ...
[ { "answer_id": 349193, "author": "Eugene Yokota", "author_id": 3827, "author_profile": "https://Stackoverflow.com/users/3827", "pm_score": 2, "selected": true, "text": "WITH (TABLOCKX)" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/349126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8446/" ]
349,127
<p>My university refused to allow us to access out mail via POP or IMAP etc so I want to write a GTK based C app that sits in my notifcation area and does the job of a mail client notifier. Because I can't use anything like POP or IMAP, what would be a good way to do it? I guess I could scrape the HTML and look for a ...
[ { "answer_id": 349177, "author": "mat", "author_id": 42083, "author_profile": "https://Stackoverflow.com/users/42083", "pm_score": 0, "selected": false, "text": "WWW::Mechanize" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/349127", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
349,142
<p>I am developing a multi-threaded application in Cocoa. The main thread takes values from the user, and when a button is clicked I invoke a secondary thread in which a long calculation takes place. Now from this thread I have to return the output of every step of the calculation to the main thread. I want to periodic...
[ { "answer_id": 350196, "author": "Marc Charbonneau", "author_id": 35136, "author_profile": "https://Stackoverflow.com/users/35136", "pm_score": 1, "selected": false, "text": "performSelectorOnMainThread:withObject:waitUntilDone:" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/349142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
349,155
<p>For example, if you type something in upper-right google/yahoo search box in firefox there will be some kind 'suggested auto complete' sort of thing. </p> <p>Another example is in youtube search box and Stackoverflow tags edit box just below this question preview. How do they work? What technology behind 'em?</p>
[ { "answer_id": 71302803, "author": "Grogu", "author_id": 12687061, "author_profile": "https://Stackoverflow.com/users/12687061", "pm_score": 0, "selected": false, "text": "$(function () {\nvar availableTags = [\n\"ActionScript\",\n\"AppleScript\",\n\"Asp\",\n\"BASIC\",\n\"C\",\n\"C++\",\...
2008/12/08
[ "https://Stackoverflow.com/questions/349155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38515/" ]
349,156
<p>What's the regex to match a square bracket? I'm using <code>\\]</code> in a pattern in <code>eregi_replace</code>, but it doesn't seem to be able to find a <code>]</code>...</p>
[ { "answer_id": 349178, "author": "Bombe", "author_id": 43582, "author_profile": "https://Stackoverflow.com/users/43582", "pm_score": 3, "selected": false, "text": "<?php\n $hay = \"ab]cd\";\n echo eregi_replace(\"\\]\", \"e\", $hay);\n?>\n" }, { "answer_id": 349180, "au...
2008/12/08
[ "https://Stackoverflow.com/questions/349156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44257/" ]
349,172
<p>I'm thinking about SEDA. We design at the moment an application (which is running on a server as a service) which must be multithreaded and message / event based.</p> <p>The SEDA idea is very intresting and should match. But I cannot find articles etc. writing about experiences made with it. </p> <p>My question(s)...
[ { "answer_id": 349178, "author": "Bombe", "author_id": 43582, "author_profile": "https://Stackoverflow.com/users/43582", "pm_score": 3, "selected": false, "text": "<?php\n $hay = \"ab]cd\";\n echo eregi_replace(\"\\]\", \"e\", $hay);\n?>\n" }, { "answer_id": 349180, "au...
2008/12/08
[ "https://Stackoverflow.com/questions/349172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43532/" ]
349,175
<p>I need to convert a list (or a dict) into a comma-separated list for passing to another language.</p> <p>Is there a nicer way of doing this than:</p> <pre><code> result = '' args = ['a', 'b', 'c', 'd'] i = 0 for arg in args: if i != 0: result += arg else: result += arg + ', ' i += 1 ...
[ { "answer_id": 349182, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 4, "selected": false, "text": "', '.join(args)" }, { "answer_id": 349197, "author": "James Hopkin", "author_id": 11828, "author_profile":...
2008/12/08
[ "https://Stackoverflow.com/questions/349175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18909/" ]
349,192
<p>In a multi-threaded program running on a multi-cpu machine do I need to access shared state ( _data in the example code below) using volatile read/writes to ensure correctness.</p> <p>In other words, can heap objects be cached on the cpu?</p> <p>Using the example below and assuming multi-threads will access the Ge...
[ { "answer_id": 349239, "author": "Eugene Yokota", "author_id": 3827, "author_profile": "https://Stackoverflow.com/users/3827", "pm_score": 2, "selected": false, "text": "ReaderWriterLockSlim" }, { "answer_id": 349245, "author": "Jon Skeet", "author_id": 22656, "author...
2008/12/08
[ "https://Stackoverflow.com/questions/349192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
349,204
<p>I've written a simple control which basically displays a few words with an image next to it.</p> <p>I want the containing items to strech when the parent form is resized and as you can see from my commented out code, I don't want to use a loop as it flickers.</p> <p>Any idea on how to get the items to grow and shr...
[ { "answer_id": 349244, "author": "Treb", "author_id": 22114, "author_profile": "https://Stackoverflow.com/users/22114", "pm_score": 3, "selected": true, "text": "foreach" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/349204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17211/" ]
349,206
<p>I'm trying to find the actual class of a django-model object, when using model-inheritance.</p> <p>Some code to describe the problem:</p> <pre><code>class Base(models.model): def basemethod(self): ... class Child_1(Base): pass class Child_2(Base): pass </code></pre> <p>If I create various ob...
[ { "answer_id": 349235, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": -1, "selected": false, "text": "aMethod()" }, { "answer_id": 349494, "author": "Daniel Naab", "author_id": 32638, "author_profile": "h...
2008/12/08
[ "https://Stackoverflow.com/questions/349206", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6093/" ]
349,238
<p>I had a realtivley simple ajax application, which I have broken up to be more modular. The code is at the link below, and what I have mainly done is add the GetRecordSet function and allowed fetchcompelte to take a variable for which layer to put data in. It should work fine in thery. When I put alert()s in, the cod...
[ { "answer_id": 349235, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": -1, "selected": false, "text": "aMethod()" }, { "answer_id": 349494, "author": "Daniel Naab", "author_id": 32638, "author_profile": "h...
2008/12/08
[ "https://Stackoverflow.com/questions/349238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246613/" ]
349,248
<p>I am using <code>cvs -tag -b "abcdefg"</code> command to tag-branch in my CVS. My CSV repo has an empty directory "obj" in every folder. </p> <p>Whenever I use the command <code>cvs co -r "abcdefg" REPO</code>, I get a complete repo minus the empty folders. I tried using <code>-f</code> option too but it did not wo...
[ { "answer_id": 349275, "author": "Ulf Lindback", "author_id": 30354, "author_profile": "https://Stackoverflow.com/users/30354", "pm_score": 0, "selected": false, "text": "co -P\n" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/349248", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20958/" ]
349,250
<p>As the question says, it just escaped my memory how to display xml in javascript, I want to display some source xml within an div on a page, that sits next to the processed result of the xml in another div.</p> <p>Can't remember if there was an equivalent to javascript's escape to convert entities on the client </p...
[ { "answer_id": 349264, "author": "J c", "author_id": 25837, "author_profile": "https://Stackoverflow.com/users/25837", "pm_score": 2, "selected": false, "text": "<iframe src=\"/myapp/Document1.xml\"><iframe src=\"/myapp/Document2.xml\">\n" }, { "answer_id": 349295, "author": ...
2008/12/08
[ "https://Stackoverflow.com/questions/349250", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15124/" ]
349,251
<p>I need to get a count of the number of files in a directory. I could get the names of all the files in the directory using <code>System.IO.Directory.GetFiles()</code> and take the length of that array but that takes too long on large directories. Is there a way to get just the count without having to get the names...
[ { "answer_id": 349412, "author": "abatishchev", "author_id": 41956, "author_profile": "https://Stackoverflow.com/users/41956", "pm_score": 3, "selected": false, "text": "LARGE_INTEGER i1, i2; \n\nQueryPerformanceCounter(&i1); \n\nint count = IO::Directory::GetFiles(L\"c:\\\\w...
2008/12/08
[ "https://Stackoverflow.com/questions/349251", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15371/" ]
349,256
<p>When is a good idea to save information in a XML file and when in a own-format file?</p> <p>For XML (or other standard) I see:</p> <ul> <li>(+) Standard format.</li> <li>(-) It's tedious to hand modify.</li> </ul> <p>For own-format files I see:</p> <ul> <li>(-) We need to build a own-parser (non-standard).</li> ...
[ { "answer_id": 350555, "author": "Rich", "author_id": 28442, "author_profile": "https://Stackoverflow.com/users/28442", "pm_score": 0, "selected": false, "text": "<?xml-stylesheet type=\"text/xsl\" href=\"config-documentation.xsl\"?>\n" }, { "answer_id": 350700, "author": "Ad...
2008/12/08
[ "https://Stackoverflow.com/questions/349256", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40441/" ]
349,257
<p>Is there a way to detect the true border, padding and margin of elements from Javascript code? If you look at the following code:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;style&gt; &lt;!-- .some_class { padding-left: 2px; border: 2px solid green; } ...
[ { "answer_id": 1280733, "author": "vsync", "author_id": 104380, "author_profile": "https://Stackoverflow.com/users/104380", "pm_score": 3, "selected": false, "text": "var $elm = $('.box');\nvar hPadding = $elm.outerWidth() - $elm.width();\nvar vPadding = $elm.outerHeight() - $elm.height(...
2008/12/08
[ "https://Stackoverflow.com/questions/349257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11384/" ]
349,260
<p>I used a query a few weeks ago in MySQL that described a table and suggested possible improvements to its structure. For example, if I have an int field but only the numbers 1-3 in that field, it will suggest set(1,2,3) as the type.</p> <p>I think I was using phpMyAdmin but I've been through all the functions I can...
[ { "answer_id": 349273, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 6, "selected": true, "text": "SELECT *\nFROM `table_name`\nPROCEDURE ANALYSE ( ) \n" } ]
2008/12/08
[ "https://Stackoverflow.com/questions/349260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37947/" ]
349,286
<p>I am using ASP.NET membership for the authentication of my web app. This worked great for me. I now have to implement password expiration.</p> <p>If the password has expired the user should be redirected to <code>ChangePassword</code> screen and should not be allowed access to any other part of the application with...
[ { "answer_id": 1177869, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "LoggingIn" }, { "answer_id": 6705094, "author": "Andrew", "author_id": 5662, "author_profile": "https://S...
2008/12/08
[ "https://Stackoverflow.com/questions/349286", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44272/" ]
349,291
<p>How do I convert a datetime field in Grails to just date, with out capturing the time? I need to do this for comparison with system date. </p> <pre><code>class Trip { String name String city Date startDate Date endDate String purpose String notes static constraints = { name(ma...
[ { "answer_id": 349421, "author": "Samiksha", "author_id": 29515, "author_profile": "https://Stackoverflow.com/users/29515", "pm_score": 1, "selected": false, "text": "* format (required) - The format to use for the date\n* date (required) - The date object to format\n" }, { "answ...
2008/12/08
[ "https://Stackoverflow.com/questions/349291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11193/" ]
349,322
<p>I've been handing a design for a webpage which I'm trying to implement correctly. This design contains navigation elements which are partially or entirely duplicated all over the page - in particular, links to the main 3 categories for navigation are present on the page no less than 4 times.</p> <p>I'm no web desi...
[ { "answer_id": 15838669, "author": "ScottS", "author_id": 369707, "author_profile": "https://Stackoverflow.com/users/369707", "pm_score": 5, "selected": true, "text": "<a></a>" }, { "answer_id": 15870759, "author": "nexus_07", "author_id": 1787585, "author_profile": "...
2008/12/08
[ "https://Stackoverflow.com/questions/349322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12744/" ]
349,348
<p>I have the following JavaScript code: <a href="http://www.nomorepasting.com/getpaste.php?pasteid=22561" rel="nofollow noreferrer">Link</a></p> <p>In which the function makewindows does not seem to be working.</p> <p>It does actual create a window, however the html either contains what is quotes, or if I change it ...
[ { "answer_id": 349363, "author": "Irmantas", "author_id": 43182, "author_profile": "https://Stackoverflow.com/users/43182", "pm_score": 2, "selected": false, "text": "child1.document.write(<?php echo json_encode($row2[\"ARTICLE_DESC\"]); ?>);\n" }, { "answer_id": 349448, "aut...
2008/12/08
[ "https://Stackoverflow.com/questions/349348", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246613/" ]