qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
117,312
<p>I work with a bunch of sets in order to generate constrained random traffic, but I want to be able to call a Specman macro that computes the complement of a set with syntax like:</p> <pre><code>COMPLEMENT begin domain=[0..10,24..30], complementing_set=[2..3,27..30] end </code></pre> <p>and have it generate...
[ { "answer_id": 146590, "author": "Nathan Fellman", "author_id": 1084, "author_profile": "https://Stackoverflow.com/users/1084", "pm_score": 2, "selected": false, "text": "var domain: list of int = {0..10, 24..30}; \nvar complementing_set: list of int = {2..3, 27..30};\nvar complement: li...
2008/09/22
[ "https://Stackoverflow.com/questions/117312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20712/" ]
117,337
<p>Let's assume that some developer in my team shelved his changes that he did in branch A. And I am working on branch B. Can I unshelve his changes into branch B? (By GUI or command prompt) </p>
[ { "answer_id": 117376, "author": "Curt Hagenlocher", "author_id": 533, "author_profile": "https://Stackoverflow.com/users/533", "pm_score": 8, "selected": true, "text": "C:\\src\\2\\Merlin\\Main>tfpt unshelve /?\ntfpt unshelve - Unshelve into workspace with pending changes\n\nAllows a sh...
2008/09/22
[ "https://Stackoverflow.com/questions/117337", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11374/" ]
117,346
<p>I'm working on a C++ application that needs detailed timing information, down to the millisecond level. </p> <p>We intend to gather the time to second accuracy using the standard <code>time()</code> function in <code>&lt;ctime&gt;</code>. We would like to additionally gather the milliseconds elapsed since the las...
[ { "answer_id": 117381, "author": "jdmichal", "author_id": 12275, "author_profile": "https://Stackoverflow.com/users/12275", "pm_score": 0, "selected": false, "text": "(c)time.h" }, { "answer_id": 117432, "author": "Justin Rudd", "author_id": 12968, "author_profile": "...
2008/09/22
[ "https://Stackoverflow.com/questions/117346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20716/" ]
117,348
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/506368/how-do-i-serialize-an-enum-value-as-an-int">How do I serialize an enum value as an int?</a> </p> </blockquote> <p>Hi, all!</p> <p>I'm wondering if there's a way to force the serialization of an enum val...
[ { "answer_id": 117374, "author": "Matt Howells", "author_id": 16881, "author_profile": "https://Stackoverflow.com/users/16881", "pm_score": 4, "selected": true, "text": "[XmlIgnore]\npublic MyThing MyThing { get; set; }\n\n[XmlElement(\"MyThing\")]\n[EditorBrowsable(EditorBrowsableState....
2008/09/22
[ "https://Stackoverflow.com/questions/117348", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3403/" ]
117,352
<p>I have this C-code to do multiplications over GF(8):</p> <pre><code>int32_t GaloisMultiply (int32_t a, int32_t b) { int32_t i; int32_t mask = 0x100; int32_t y = 0; for(i=0;i&lt;8;i++) { if(b &amp; mask) { y ^= a; } mask &gt;&gt;= 1; y &lt;&...
[ { "answer_id": 117473, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "int32_t GaloisMultiply( int32_t a ) \n{\n int32_t y = 0;\n int32_t b = a & 0x01ff;\n\n while ( b ) \n {\n if ( b & 1 ) ...
2008/09/22
[ "https://Stackoverflow.com/questions/117352", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15955/" ]
117,355
<p>I'm trying to find the most reusable, yet elegant, piece of code possible for determining if an IEnumerable. In the ideal, this should be a function I can call absolutely any time I need to tell if an IEnumerable is empty.</p> <p>While I have developed an answer for .NET 3.5 that has worked well for me so far, my ...
[ { "answer_id": 117367, "author": "Guvante", "author_id": 16800, "author_profile": "https://Stackoverflow.com/users/16800", "pm_score": 6, "selected": true, "text": "!enumerable.Any()\n IEnumerable" }, { "answer_id": 117480, "author": "Matt", "author_id": 2338, "author...
2008/09/22
[ "https://Stackoverflow.com/questions/117355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2729/" ]
117,356
<p>I've currently got multiple select's on a page that are added dynamically with <code>ajax</code> calls using jquery.</p> <p>The problem I've had is I could not get the change event to work on the added select unless I use the <code>onchange</code> inside the tag e.g. </p> <pre><code>&lt;select id="Size" size="1" o...
[ { "answer_id": 117392, "author": "Jim", "author_id": 8427, "author_profile": "https://Stackoverflow.com/users/8427", "pm_score": 3, "selected": false, "text": "$('select').change(onChange);\n" }, { "answer_id": 117404, "author": "Gilean", "author_id": 6305, "author_pr...
2008/09/22
[ "https://Stackoverflow.com/questions/117356", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
117,361
<p>I am trying to bind an event to a "method" of a particular instance of a Javascript "class" using jQuery. The requirement is that I in the event handler should be able to use the "this" keyword to refer to the instance I originally bound the event to.</p> <p>In more detail, say I have a "class" as follows:</p> <pr...
[ { "answer_id": 117456, "author": "Jim", "author_id": 8427, "author_profile": "https://Stackoverflow.com/users/8427", "pm_score": 3, "selected": true, "text": "$(\"#myButton\").click(function() { myCar.drive(); });\n" }, { "answer_id": 33007772, "author": "Ben Bozorg", "au...
2008/09/22
[ "https://Stackoverflow.com/questions/117361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2105/" ]
117,372
<p>I have an script that receives an encrypted url and from that generates a download, the most critic par of the script is this:</p> <pre><code>$MimeType = new MimeType(); $mimetype = $MimeType-&gt;getType($filename); $basename = basename($filename); header("Content-type: $mimetype"); header("Content-Disposition: att...
[ { "answer_id": 117428, "author": "Grant Wagner", "author_id": 9254, "author_profile": "https://Stackoverflow.com/users/9254", "pm_score": 3, "selected": true, "text": "session_start();" }, { "answer_id": 117613, "author": "levhita", "author_id": 7946, "author_profile"...
2008/09/22
[ "https://Stackoverflow.com/questions/117372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7946/" ]
117,378
<p><strong>The situation</strong><br> I have a Git repo and an SVN repo that both hold the same source code but different commit histories. The Git repo has a lot of small well commented submits... while the SVN repo has a few huge commits with comments like "Lots of stuff". Both series of commits follow the same chang...
[ { "answer_id": 117593, "author": "davetron5000", "author_id": 3029, "author_profile": "https://Stackoverflow.com/users/3029", "pm_score": 2, "selected": false, "text": "git-svn clone path/to/your/svn/repo\ngit-commit -a -m 'my small change'\nvi some files to change.txt\ngit-commit -a -m ...
2008/09/22
[ "https://Stackoverflow.com/questions/117378", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
117,379
<p>I'm successfully using VBScript within WScript to remotely read and write IIS configurations from the server. When I attempt to run these same scripts from my desk box they fail, though. Example:</p> <pre><code>Dim vdir Set vdir = GetObject("IIS://servername/w3svc/226/root") </code></pre> <p>Error = "Invalid synta...
[ { "answer_id": 117593, "author": "davetron5000", "author_id": 3029, "author_profile": "https://Stackoverflow.com/users/3029", "pm_score": 2, "selected": false, "text": "git-svn clone path/to/your/svn/repo\ngit-commit -a -m 'my small change'\nvi some files to change.txt\ngit-commit -a -m ...
2008/09/22
[ "https://Stackoverflow.com/questions/117379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14127/" ]
117,407
<ul> <li>You can use App.config; but it only supports key/value pairs.</li> <li>You can use .Net configuration, configuration sections; but it can be really complex.</li> <li>You can use Xml Serialization/Deserialization by yourself; your classes-your way.</li> <li>You can use some other method; what can they be? ...</...
[ { "answer_id": 117597, "author": "JohnIdol", "author_id": 1311500, "author_profile": "https://Stackoverflow.com/users/1311500", "pm_score": 5, "selected": true, "text": " public class CustomSection : ConfigurationSection\n {\n [ConfigurationProperty(\"LastName\",...
2008/09/22
[ "https://Stackoverflow.com/questions/117407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11374/" ]
117,415
<p>The subversion concept of branching appears to be focused on creating an [un]stable fork of the entire repository on which to do development. Is there a mechanism for creating branches of individual files?</p> <p>For a use case, think of a common header (*.h) file that has multiple platform-specific source (*.c) im...
[ { "answer_id": 117442, "author": "Matt", "author_id": 2338, "author_profile": "https://Stackoverflow.com/users/2338", "pm_score": 1, "selected": false, "text": "svn copy myfile.c myfile_branch.c\n" }, { "answer_id": 117500, "author": "crashmstr", "author_id": 1441, "a...
2008/09/22
[ "https://Stackoverflow.com/questions/117415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8233/" ]
117,422
<p>My Virtual Machine's clock drifts pretty significantly. There's documentation out there about dealing with this, but nothing seems to be working very well.</p> <p>Anyone have any suggestions, things that worked well for them, ...</p> <p>Supposedly updating regularly via ntp is not a good solution.</p>
[ { "answer_id": 117466, "author": "GHad", "author_id": 11705, "author_profile": "https://Stackoverflow.com/users/11705", "pm_score": -1, "selected": false, "text": "net time \\\\computer_name /set\n" }, { "answer_id": 15264654, "author": "user2143026", "author_id": 2143026...
2008/09/22
[ "https://Stackoverflow.com/questions/117422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20498/" ]
117,426
<p>I am working on a project that has grown to a decent size, and I am the only developer. We currently don't use any version control, but I definitely need to start.</p> <p>I want to use Subversion. What would be the best way to transfer an existing project to it?</p> <p>I have a test server that I use for developi...
[ { "answer_id": 117556, "author": "Hector Sosa Jr", "author_id": 12829, "author_profile": "https://Stackoverflow.com/users/12829", "pm_score": 3, "selected": false, "text": "svn export C:\\MyReporitosy\\Path C:\\DestinationPath\n" }, { "answer_id": 155053, "author": "bill_the_...
2008/09/22
[ "https://Stackoverflow.com/questions/117426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18234/" ]
117,429
<p>What is the best way to handle large numeric inputs in C++ (for example <code>10^100</code>)? </p> <p>For algorithms I usually switch over to ruby and I sometimes use strings.</p> <p>Any other good methods?</p>
[ { "answer_id": 250736, "author": "Abhishek Mishra", "author_id": 8786, "author_profile": "https://Stackoverflow.com/users/8786", "pm_score": 3, "selected": false, "text": "#include <iostream>\n\nusing namespace std;\n\nstring add (string &s1, string &s2){\n int carry=0,sum,i;\n\n s...
2008/09/22
[ "https://Stackoverflow.com/questions/117429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20730/" ]
117,461
<p>I want alwaysPositive to be assigned a positive number with all possible values for lareValue1 and largeValue2 (these are at least 1).</p> <p>The following statement causes a buffer overflow:</p> <pre><code>int alwaysPositive = (largeValue1 + largeValue2) / 2; </code></pre> <p>I know I can prevent it by substract...
[ { "answer_id": 117519, "author": "Khoth", "author_id": 20686, "author_profile": "https://Stackoverflow.com/users/20686", "pm_score": 0, "selected": false, "text": "uint alwaysPositive = (uint)(largeValue1 + largeValue2) / 2;\n" }, { "answer_id": 117542, "author": "Nils Pipenb...
2008/09/22
[ "https://Stackoverflow.com/questions/117461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13376/" ]
117,467
<p>I need to find a way to crawl one of our company's web applications and create a static site from it that can be burned to a cd and used by traveling sales people to demo the web site. The back end data store is spread across many, many systems so simply running the site on a VM on the sale person's laptop won't wor...
[ { "answer_id": 48452213, "author": "AsTeR", "author_id": 172277, "author_profile": "https://Stackoverflow.com/users/172277", "pm_score": 3, "selected": false, "text": "wget --mirror --convert-links --adjust-extension --page-requisites \\\n--no-parent http://example.org\n" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/117467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17623/" ]
117,469
<p>Could anyone recommend a good BAML Decompiler / Viewer besides BAML Viewer plugin for Reflector, which doesn't handle path geometry/data?</p>
[ { "answer_id": 1194143, "author": "mark", "author_id": 80002, "author_profile": "https://Stackoverflow.com/users/80002", "pm_score": 2, "selected": false, "text": "Ricciolo.StylesExplorer.exe Ricciolo.StylesExplorer.MarkupReflection.dll" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/117469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19268/" ]
117,471
<p>I have a database issue that i currently cannot wrap my head around with an easy solution. In my db I have a table that stores event values.. 0's and 1's with a timestamp. Issue being that it is possible for there to be the same event to occur twice as a business rule. Like below</p> <ul> <li>'2008-09-22 16:28:14.1...
[ { "answer_id": 117587, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 0, "selected": false, "text": "SELECT timestamp, value\nFROM yourtable\n SELECT T1.timestamp, MIN(T2.timestamp) AS next_timestamp, T1.value\nFROM yo...
2008/09/22
[ "https://Stackoverflow.com/questions/117471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20737/" ]
117,474
<p>From time to time, I need to dump USB traffic under Windows, mostly to support hardware under Linux, so my primary goal is to produce dump files for protocol analysis.</p> <p>For USB traffic, it seems that <a href="https://web.archive.org/web/20151218000528/http://www.pcausa.com/Utilities/UsbSnoop/default.htm" rel=...
[ { "answer_id": 57109540, "author": "Renat", "author_id": 1075282, "author_profile": "https://Stackoverflow.com/users/1075282", "pm_score": 2, "selected": false, "text": "Device and Log File" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/117474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1081/" ]
117,477
<p>A while ago I came across a Python library that formats regular text to HTML similar to Markdown, reStructuredText and Textile, just that it had no syntax at all. It detected indentatations, quotes, links and newlines/paragraphs only.</p> <p>Unfortunately I lost the name of the library and was unable to Google it....
[ { "answer_id": 117819, "author": "sean lynch", "author_id": 14232, "author_profile": "https://Stackoverflow.com/users/14232", "pm_score": 1, "selected": false, "text": "python markdown.py input_file.txt > output_file.html\n import markdown\nhtml = markdown.markdown(your_text_string)\n" ...
2008/09/22
[ "https://Stackoverflow.com/questions/117477", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19990/" ]
117,481
<p>At work I'm using Perl 5.8.0 on Windows.</p> <p>When I first put Perl on, I went to CPAN, downloaded all the sources, made a few changes (in the .MAK file(?) to support threads, or things like that), and did <code>nmake</code> / <code>nmake test</code> / <code>nmake install</code>. Then, bit by bit, I've downloaded...
[ { "answer_id": 117577, "author": "dland", "author_id": 18625, "author_profile": "https://Stackoverflow.com/users/18625", "pm_score": 2, "selected": false, "text": "perl -le \"print for @INC\"\n" }, { "answer_id": 117938, "author": "brian d foy", "author_id": 2766176, ...
2008/09/22
[ "https://Stackoverflow.com/questions/117481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8763/" ]
117,484
<p>Just a small SVN "problem" here.</p> <p>I setup my own SVN server <a href="https://blog.codinghorror.com/setting-up-subversion-on-windows/" rel="nofollow noreferrer">Setting up Subversion on Windows</a></p> <p>Now I made a rep in which all my projects will go.</p> <p>Now, I checked the rep out in a folder called ...
[ { "answer_id": 117617, "author": "BIBD", "author_id": 685, "author_profile": "https://Stackoverflow.com/users/685", "pm_score": 0, "selected": false, "text": "svnserve -r /path/to/repository \n\nsvn://hostname/ \n svnserve -r /path/to/directory/containing/many/repositories \n\nsvn://h...
2008/09/22
[ "https://Stackoverflow.com/questions/117484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
117,512
<p>Given a simple (id, description) table t1, such as</p> <pre><code>id description -- ----------- 1 Alice 2 Bob 3 Carol 4 David 5 Erica 6 Fred </code></pre> <p>And a parent-child relationship table t2, such as</p> <pre><code>parent child ------ ----- 1 2 1 3 4 5 5 6 </code></...
[ { "answer_id": 117596, "author": "cagcowboy", "author_id": 19629, "author_profile": "https://Stackoverflow.com/users/19629", "pm_score": 0, "selected": false, "text": "SELECT parent, child, parents.description||sys_connect_by_path(childs.description, '/') AS \"path\"\nFROM T1 parents, ...
2008/09/22
[ "https://Stackoverflow.com/questions/117512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18625/" ]
117,514
<p>How do I properly represent a different timezone in my timezone? The below example only works because I know that EDT is one hour ahead of me, so I can uncomment the subtraction of myTimeZone()</p> <pre><code>import datetime, re from datetime import tzinfo class myTimeZone(tzinfo): """docstring for myTimeZone"...
[ { "answer_id": 117615, "author": "Armin Ronacher", "author_id": 19990, "author_profile": "https://Stackoverflow.com/users/19990", "pm_score": 5, "selected": false, "text": "babel pytz" }, { "answer_id": 1893437, "author": "Carlos H Romano", "author_id": 268789, "autho...
2008/09/22
[ "https://Stackoverflow.com/questions/117514", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9338/" ]
117,536
<p>I've tried restarting apache and the cached pages still appear, so there must be a folder someplace. I don't have a 'public/cache', so what other places should I look? Is there a URL flag that could trigger this effect as well?</p>
[ { "answer_id": 118951, "author": "johnp", "author_id": 19837, "author_profile": "https://Stackoverflow.com/users/19837", "pm_score": 4, "selected": true, "text": "touch /webapps/mycook/tmp/restart.txt\n" }, { "answer_id": 48336423, "author": "Arman Petrosyan", "author_id"...
2008/09/22
[ "https://Stackoverflow.com/questions/117536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13320/" ]
117,547
<p>Documentation can be found <a href="http://github.com/madrobby/scriptaculous/wikis/droppables" rel="nofollow noreferrer">here</a></p> <p>It says in the example:</p> <p><strong>onDrop: Called whenever a Draggable is released over the Droppable and the Droppable is accepts it. The callback gets three parameters: the...
[ { "answer_id": 117583, "author": "tags2k", "author_id": 192, "author_profile": "https://Stackoverflow.com/users/192", "pm_score": 3, "selected": true, "text": "onDrop: function() { $('droppable_demo').highlight(); }\n onDrop: function(dragged, dropped, event) { }\n" }, { "answer...
2008/09/22
[ "https://Stackoverflow.com/questions/117547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
117,551
<p>My website makes a lot of requests. I often need to cancel all current requests, so that the browser is not blocking relevant new requests.</p> <p>I have 3 kinds of requests:</p> <ul> <li>Ajax</li> <li>inserted script-tags (which do JSONP-Communication)</li> <li>inserted image-tags (which cause the browser to requ...
[ { "answer_id": 117565, "author": "Armin Ronacher", "author_id": 19990, "author_profile": "https://Stackoverflow.com/users/19990", "pm_score": 2, "selected": false, "text": "document.close()" }, { "answer_id": 117628, "author": "toohool", "author_id": 14334, "author_pr...
2008/09/22
[ "https://Stackoverflow.com/questions/117551", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20711/" ]
117,558
<p>I am re-designing an application for a ASP.NET CMS that I really don't like. I have made som improvements in performance only to discover that not only does this CMS use MS SQL but some users "simply" use MS Access database.</p> <p>The problem is that I have some tables which I inner join, that with the MS Access v...
[ { "answer_id": 118234, "author": "David-W-Fenton", "author_id": 9787, "author_profile": "https://Stackoverflow.com/users/9787", "pm_score": 4, "selected": false, "text": "SELECT MyTable.*\nFROM MyTable IN 'c:\\MyDBs\\Access.mdb'\n SELECT OtherTable.*\nFROM OtherTable IN 'c:\\MyDBs\\Other...
2008/09/22
[ "https://Stackoverflow.com/questions/117558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20032/" ]
117,570
<p>On our web application, the search results are displayed in sortable tables. The user can click on any column and sort the result. The problem is some times, the user does a broad search and gets a lot of data returned. To make the sortable part work, you probably need all the results, which takes a long time. O...
[ { "answer_id": 118683, "author": "Leo Moore", "author_id": 6336, "author_profile": "https://Stackoverflow.com/users/6336", "pm_score": 2, "selected": false, "text": "CREATE PROCEDURE GetProductsInCategory\n(@CategoryID INT,\n@DescriptionLength INT,\n@PageNumber INT,\n@ProductsPerPage INT...
2008/09/22
[ "https://Stackoverflow.com/questions/117570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20460/" ]
117,589
<p>When we are developing new sites or testing changes in new ones that involve css after the new code is committed and someone goes to check the changes they always see a cached version of the old css. This is causing a lot of problems in testing because people never are sure if they have the latest css on screen (I k...
[ { "answer_id": 117622, "author": "Michael Cox", "author_id": 372698, "author_profile": "https://Stackoverflow.com/users/372698", "pm_score": 2, "selected": false, "text": " <link href=\"/css/global.css?id=3939\" type=\"text/css\" rel=\"stylesheet\" />\n" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/117589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18926/" ]
117,590
<p>Does anyone have a good guide to capabilities of Windows Services under XP? In particular, I am trying to find out what happens when a program being run as a service tries to open windows, but hasn't been given permission to interact with the desktop.</p> <p>Basically, I have a program that is/was a GUI application...
[ { "answer_id": 117605, "author": "prakash", "author_id": 123, "author_profile": "https://Stackoverflow.com/users/123", "pm_score": 2, "selected": false, "text": "Control Panel --> Administrative Tools" }, { "answer_id": 117692, "author": "Max Caceres", "author_id": 4842, ...
2008/09/22
[ "https://Stackoverflow.com/questions/117590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7909/" ]
117,623
<p>Backstory: I'm using <a href="http://logging.apache.org/log4net/index.html" rel="noreferrer">log4net</a> to handle all logging for a project I'm working on. One particular method can be called under several different circumstances -- some that warrant the log messages to be errors and others that warrant the log me...
[ { "answer_id": 117646, "author": "MagicKat", "author_id": 8505, "author_profile": "https://Stackoverflow.com/users/8505", "pm_score": 0, "selected": false, "text": "Public Delegate errorCall(ByVal error As String, Params objs As Objects())\nCheckDifference(10, 0, AddressOf log.ErrorForma...
2008/09/22
[ "https://Stackoverflow.com/questions/117623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1108/" ]
117,632
<p>What install tool can I use to create Virtual Directory on IIS? OpenSource, free or to do in C#. </p>
[ { "answer_id": 132967, "author": "Tom", "author_id": 20979, "author_profile": "https://Stackoverflow.com/users/20979", "pm_score": 0, "selected": false, "text": "Set objMimeMap = GetObject(\"IIS://localhost/w3svc\")\n" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/117632", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12514/" ]
117,651
<h2>Problem</h2> <p>Language: C# 2.0 or later</p> <hr> <p>I would like to register context handlers to create menues when the user right clicks certain files (in my case *.eic). What is the procedure to register, unregister (clean up) and handle events (clicks) from these menues?</p> <p>I have a clue it's something...
[ { "answer_id": 611126, "author": "VoidPointer", "author_id": 23424, "author_profile": "https://Stackoverflow.com/users/23424", "pm_score": 1, "selected": false, "text": "HKEY_CLASSES_ROOT\\.eic\\ShellEx\\ContextMenuHandlers\\MyShellExt\n (Default) -> {YOUR-COMPONENTS-CLSID}\n HKEY_CLA...
2008/09/22
[ "https://Stackoverflow.com/questions/117651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2166173/" ]
117,665
<p>I got this bad feeling about how I insert larger amounts of HTML. Lets assume we got:</p> <p><code>var html="&lt;table&gt;..&lt;a-lot-of-other-tags /&gt;..&lt;/table&gt;"</code></p> <p>and I want to put this into</p> <p><code>$("#mydiv")</code></p> <p>previously I did something like</p> <p><code>var html_obj = ...
[ { "answer_id": 117705, "author": "Jim", "author_id": 8427, "author_profile": "https://Stackoverflow.com/users/8427", "pm_score": 3, "selected": false, "text": "document.createElement()" }, { "answer_id": 117988, "author": "Prestaul", "author_id": 5628, "author_profile...
2008/09/22
[ "https://Stackoverflow.com/questions/117665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20711/" ]
117,667
<p>I know this is probably the dumbest question ever, however I am a total beginner when it comes to CSS; how do you hyperlink an image on a webpage using an image which is sourced from CSS? I am trying to set the title image on my website linkable to the frontpage. Thanks!</p> <p><strong>Edit:</strong> Just to make i...
[ { "answer_id": 117675, "author": "John Rudy", "author_id": 14048, "author_profile": "https://Stackoverflow.com/users/14048", "pm_score": 2, "selected": false, "text": "<a href=\"index.html\"><img src=\"foo\" class=\"whatever\" alt=\"foo alt\" /></a>\n <a href=\"index.html\"><img id=\"hea...
2008/09/22
[ "https://Stackoverflow.com/questions/117667", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3394/" ]
117,690
<p>I have few asynchronous tasks running and I need to wait until at least one of them is finished (in the future probably I'll need to wait util M out of N tasks are finished). Currently they are presented as Future, so I need something like</p> <pre><code>/** * Blocks current thread until one of specified futures i...
[ { "answer_id": 117711, "author": "jdmichal", "author_id": 12275, "author_profile": "https://Stackoverflow.com/users/12275", "pm_score": 3, "selected": true, "text": "WaitHandle.WaitAny public WaitableFuture<T>\n extends Future<T>\n{\n private CountDownLatch countDownLatch;\n\n W...
2008/09/22
[ "https://Stackoverflow.com/questions/117690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5507/" ]
117,691
<p>Given an array of integers, what is the simplest way to iterate over it and figure out all the ranges it covers? for example, for an array such as:</p> <pre><code>$numbers = array(1,3,4,5,6,8,11,12,14,15,16); </code></pre> <p>The ranges would be:</p> <pre><code> 1,3-6,8,11-12,14-16 </code></pre>
[ { "answer_id": 117722, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 2, "selected": false, "text": "numbers = [1,3,4,5,6,8,11,12,14,15,16];\n\ndef is_predecessor(i1, i2):\n if i1 == i2 - 1:\n return True;\n ...
2008/09/22
[ "https://Stackoverflow.com/questions/117691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10585/" ]
117,708
<p>The non-virtual interface idiom describes how the virtual methods are nonpublic customisation points, and public methods are nonvirtual to allow the base class to control at all times how the customisation points are called. </p> <p>This is an elegant idiom and I like to use it, but how does it work if the derived ...
[ { "answer_id": 117760, "author": "Dima", "author_id": 13313, "author_profile": "https://Stackoverflow.com/users/13313", "pm_score": 4, "selected": true, "text": "\nclass Parent\n{\npublic:\n int foo() {return bar();} // the non-virtual public interface\nprivate\n virtual int bar();\n};...
2008/09/22
[ "https://Stackoverflow.com/questions/117708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19863/" ]
117,732
<p>Take this simple <em>C# LINQ</em> query, and imagine that <code>db.Numbers</code> is an <em>SQL</em> table with one column <code>Number</code>:</p> <pre><code>var result = from n in db.Numbers where n.Number &lt; 5 select n.Number; </code></pre> <p>This will run very efficiently in <em>C#</em>...
[ { "answer_id": 118350, "author": "Tony Meyer", "author_id": 4966, "author_profile": "https://Stackoverflow.com/users/4966", "pm_score": 3, "selected": true, "text": "Queryable.Select(Queryable.Where(someInputSequence, somePredicate), someFuncThatReturnsTheSequenceElement) \n" }, { ...
2008/09/22
[ "https://Stackoverflow.com/questions/117732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42219/" ]
117,751
<p>I have a web application using JPA and JTA with Spring. I would like to support both JBoss and Tomcat. When running on JBoss, I'd like to use JBoss' own TransactionManager, and when running on Tomcat, I'd like to use JOTM.</p> <p>I have both scenarios working, but I now find that I seem to need two separate Spring ...
[ { "answer_id": 117871, "author": "toolkit", "author_id": 3295, "author_profile": "https://Stackoverflow.com/users/3295", "pm_score": 2, "selected": false, "text": "<bean class=\"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer\">\n <property name=\"systemProperti...
2008/09/22
[ "https://Stackoverflow.com/questions/117751", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7034/" ]
117,755
<p>Here's the code I want to speed up. It's getting a value from an ADO recordset and converting it to a char*. But this is slow. Can I skip the creation of the _bstr_t?</p> <pre><code> _variant_t var = pRs-&gt;Fields-&gt;GetItem(i)-&gt;GetValue(); if (V_VT(&amp;var) == VT_BSTR) ...
[ { "answer_id": 117780, "author": "1800 INFORMATION", "author_id": 3146, "author_profile": "https://Stackoverflow.com/users/3146", "pm_score": 2, "selected": false, "text": "USES_CONVERSION;\nchar *p=W2A(var.bstrVal);\n char *p=CW2AEX<>(var.bstrVal);\n" }, { "answer_id": 117781, ...
2008/09/22
[ "https://Stackoverflow.com/questions/117755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9328/" ]
117,772
<p>I'm trying to use the page-break-inside CSS directive, the class of which is to be attached to a div tag or a table tag (I think this may only work on block elements, in which case it would have to be the table).</p> <p>I've tried all the tutorials that supposedly describe exactly how to do this, but nothing works....
[ { "answer_id": 117878, "author": "Jim", "author_id": 8427, "author_profile": "https://Stackoverflow.com/users/8427", "pm_score": 0, "selected": false, "text": "<div> page-break-inside <div> @media @media display: block" }, { "answer_id": 117908, "author": "Jim", "author_i...
2008/09/22
[ "https://Stackoverflow.com/questions/117772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20762/" ]
117,776
<p>I've used <a href="http://ondras.zarovi.cz/sql/" rel="nofollow noreferrer">WWW SQL Designer</a> several times to design databases for applications. I'm now in charge of working on an application with a lot of tables (100+ mysql tables) and I would love to be able to look at the relations between tables in a manner s...
[ { "answer_id": 18035488, "author": "Mickaël", "author_id": 2649093, "author_profile": "https://Stackoverflow.com/users/2649093", "pm_score": 2, "selected": false, "text": "function setup_import() {\n define(\"SERVER\",\"localhost\");\n define(\"USER\",\"\");\n define(\"PASSWORD\...
2008/09/22
[ "https://Stackoverflow.com/questions/117776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/85/" ]
117,792
<p>I'm interested to know the best / common way of storing a <code>this</code> pointer for use in the <code>WndProc</code>. I know of several approaches, but each as I understand it have their own drawbacks. My questions are:</p> <p>What different ways are there of producing this kind of code:</p> <pre><code>CWindow:...
[ { "answer_id": 117832, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 3, "selected": false, "text": "GetWindowLongPtr() SetWindowLongPtr() GetWindowLong() SetWindowLong() SetWindowLongPtr() WM_NCCREATE" }, { "...
2008/09/22
[ "https://Stackoverflow.com/questions/117792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/986/" ]
117,800
<p>For our Django App, we'd like to get an <code>AutoField</code> to start at a number other than 1. There doesn't seem to be an obvious way to do this. Any ideas?</p>
[ { "answer_id": 118402, "author": "AdamKG", "author_id": 16361, "author_profile": "https://Stackoverflow.com/users/16361", "pm_score": 5, "selected": true, "text": "ALTER SEQUENCE sequence_name RESTART WITH 12345;" }, { "answer_id": 6388329, "author": "Gabriel Samfira", "a...
2008/09/22
[ "https://Stackoverflow.com/questions/117800", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9845/" ]
117,810
<p>My ASP.NET MVC application will take a lot of bandwidth and storage space. How can I setup an ASP.NET upload page so the file the user uploaded will go straight to Amazon S3 without using my web server's storage and bandwidth?</p>
[ { "answer_id": 35478577, "author": "sambit.albus", "author_id": 1254010, "author_profile": "https://Stackoverflow.com/users/1254010", "pm_score": 2, "selected": false, "text": "using System\nusing System.Collections.Generic\nusing System.Linq\nusing System.Web\nusing Amazon\nusing Amazon...
2008/09/22
[ "https://Stackoverflow.com/questions/117810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20067/" ]
117,812
<p>Anybody have any good FizzBuzz type questions that are not <em>the</em> FizzBuzz problem?</p> <p>I am interviewing someone and FB is relatively well known and not that hard to memorize, so my first stop in a search for ideas is my new addiction SO.</p>
[ { "answer_id": 117949, "author": "shelfoo", "author_id": 3444, "author_profile": "https://Stackoverflow.com/users/3444", "pm_score": 5, "selected": false, "text": "Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.\n F1 = 1\nF2 = 1\nF3 = 2\nF4 = 3\nF5 = 5\nF6 = 8\nF7 = 13\nF8 = 21\nF9 = 34\nF10 ...
2008/09/22
[ "https://Stackoverflow.com/questions/117812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3683/" ]
117,844
<p>I'm trying to convert an incoming sting of 1s and 0s from stdin into their respective binary values (where a string such as "11110111" would be converted to 0xF7). This seems pretty trivial but I don't want to reinvent the wheel so I'm wondering if there's anything in the C/C++ standard libs that can already perform...
[ { "answer_id": 117862, "author": "Torlack", "author_id": 5243, "author_profile": "https://Stackoverflow.com/users/5243", "pm_score": 3, "selected": false, "text": "char string[] = \"1101110100110100100000\";\nchar * end;\nlong int value = strtol (string,&end,2);\n" }, { "answer_i...
2008/09/22
[ "https://Stackoverflow.com/questions/117844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1582/" ]
117,851
<p>For example if I'm working on Visual Studio 2008, I want the values devenv and 2008 or 9.</p> <p>The version number is very important...</p>
[ { "answer_id": 117980, "author": "stephbu", "author_id": 12702, "author_profile": "https://Stackoverflow.com/users/12702", "pm_score": 4, "selected": true, "text": "/// <summary>\n/// The GetForegroundWindow function returns a handle to the foreground window.\n/// </summary>\n[DllImport(...
2008/09/22
[ "https://Stackoverflow.com/questions/117851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44972/" ]
117,864
<p>I'm a total newbie, but I was writing a little program that worked on strings in C# and I noticed that if I did a few things differently, the code executed significantly faster.</p> <p>So it had me wondering, how do you go about clocking your code's execution speed? Are there any (free)utilities? Do you go about it...
[ { "answer_id": 117883, "author": "Eric Schoonover", "author_id": 3957, "author_profile": "https://Stackoverflow.com/users/3957", "pm_score": 4, "selected": false, "text": "Stopwatch Assert" }, { "answer_id": 35558488, "author": "Nikusha Kalatozi", "author_id": 5397398, ...
2008/09/22
[ "https://Stackoverflow.com/questions/117864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10288/" ]
117,900
<p>I have an application that loads external SWF files and plays them inside a Adobe Flex / Air application via the <a href="http://livedocs.adobe.com/flex/3/html/controls_15.html" rel="nofollow noreferrer">SWFLoader Flex component</a>. I have been trying to find a way to unload them from a button click event. I have G...
[ { "answer_id": 118026, "author": "user19264", "author_id": 19264, "author_profile": "https://Stackoverflow.com/users/19264", "pm_score": 1, "selected": false, "text": "MovieClip(event.target.content).loaderInfo.addEventListener(Event.UNLOAD, unloadMovieClipHandler);\nprivate function unl...
2008/09/22
[ "https://Stackoverflow.com/questions/117900", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26/" ]
117,931
<p>I'm building a fairly large website and my .htaccess is starting to feel a bit bloated, is there a way of replacing my current system of - one rule for each of the possibile number of vars that could be passed, to one catch all expression that can account for varying numbers of inputs ?</p> <p>for example I current...
[ { "answer_id": 117968, "author": "daniels", "author_id": 9789, "author_profile": "https://Stackoverflow.com/users/9789", "pm_score": 4, "selected": true, "text": " RewriteCond %{REQUEST_FILENAME} !-f\n RewriteCond %{REQUEST_FILENAME} !-d\n RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]\n $...
2008/09/22
[ "https://Stackoverflow.com/questions/117931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2083/" ]
117,945
<p>I've written a simple app in C# 2.0 using the .Net Framework 2.0 Serialport class to communicate with a controller card via COM1. </p> <p>A problem occurred recently were the bytes returned by the Read method are incorrect. It returned the right amount of bytes, only the values were incorrect. A similar app written...
[ { "answer_id": 120525, "author": "Joe", "author_id": 13087, "author_profile": "https://Stackoverflow.com/users/13087", "pm_score": 0, "selected": false, "text": "SerialPort.Encoding = Encoding.GetEncoding(\"Latin1\")\n" }, { "answer_id": 183455, "author": "jakdep", "autho...
2008/09/22
[ "https://Stackoverflow.com/questions/117945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20101/" ]
117,962
<p>I have two tables, both with start time and end time fields. I need to find, for each row in the first table, all of the rows in the second table where the time intervals intersect.</p> <p>For example:</p> <pre><code> &lt;-----row 1 interval-------&gt; &lt;---find this--&gt; &lt;--and this--&gt; &lt;--an...
[ { "answer_id": 117977, "author": "Khoth", "author_id": 20686, "author_profile": "https://Stackoverflow.com/users/20686", "pm_score": 7, "selected": true, "text": "SELECT * \nFROM table1,table2 \nWHERE table2.start <= table1.end \nAND (table2.end IS NULL OR table2.end >= table1.start)\n" ...
2008/09/22
[ "https://Stackoverflow.com/questions/117962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9345/" ]
117,974
<p>In SQL you can use </p> <p>SELECT * FROM INFORMATION_SCHEMA.TABLES </p> <p>etc to get information about the database structure. I need to know how to achieve the same thing for an Access database.</p>
[ { "answer_id": 27436989, "author": "Terry", "author_id": 1034974, "author_profile": "https://Stackoverflow.com/users/1034974", "pm_score": 1, "selected": false, "text": "#include <atldb.h>\n...\n // Standard way of obtaining table node info.\n CAccessorRowset<CDynamicAccess...
2008/09/22
[ "https://Stackoverflow.com/questions/117974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4403/" ]
117,986
<p>I'm searching a wsgi middleware which I can warp around a wsgi applications and which lets me monitor incoming and outgoing http requests and header fields.</p> <p>Something like firefox live headers, but for the server side.</p>
[ { "answer_id": 118037, "author": "Armin Ronacher", "author_id": 19990, "author_profile": "https://Stackoverflow.com/users/19990", "pm_score": 2, "selected": false, "text": "import sys\n\ndef log_headers(app, stream=None):\n if stream is None:\n stream = sys.stdout\n def prox...
2008/09/22
[ "https://Stackoverflow.com/questions/117986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/720/" ]
118,051
<p>I have a grid that is binded to a collection. For some reason that I do not know, now when I do some action in the grid, the grid doesn't update.</p> <p>Situation : When I click a button in the grid, it increase a value that is in the same line. When I click, I can debug and see the value increment but the value do...
[ { "answer_id": 118438, "author": "Pop Catalin", "author_id": 4685, "author_profile": "https://Stackoverflow.com/users/4685", "pm_score": 3, "selected": true, "text": "public string Name \n{\n get\n {\n return this._Name;\n }\n set\n {\n if (value != this._Name)\n {\n ...
2008/09/22
[ "https://Stackoverflow.com/questions/118051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13913/" ]
118,091
<p>I am trying to learn how to use MSBuild so we can use it to build our project. There's what seems to be a very big hole in the documentation, and I find the hole everywhere I look, the hole being how do you name or otherwise designate the MSBuild project file? </p> <p>For example, the tutorial on MSBuild that can...
[ { "answer_id": 118118, "author": "palehorse", "author_id": 312, "author_profile": "https://Stackoverflow.com/users/312", "pm_score": 4, "selected": true, "text": "msbuild.exe /?\n\nMicrosoft (R) Build Engine Version 2.0.50727.3053\n[Microsoft .NET Framework, Version 2.0.50727.3053]\nCopy...
2008/09/22
[ "https://Stackoverflow.com/questions/118091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16964/" ]
118,092
<p>In PHP, replace one URL with another within a string e.g. </p> <pre><code>New post on the site &lt;a href="http://stackoverflow.com/xyz1"&gt;http://stackoverflow.com/xyz1&lt;/a&gt;&lt;/p&gt; </code></pre> <p>becomes:</p> <pre><code>New post on the site &lt;a href="http://yahoo.com/abc1"&gt;http://yahoo.com/abc1&l...
[ { "answer_id": 118099, "author": "Paige Ruten", "author_id": 813, "author_profile": "https://Stackoverflow.com/users/813", "pm_score": 1, "selected": false, "text": "$text = str_replace('http://stackoverflow.com/xyz1', 'http://yahoo.com/abc1', $text);\n" }, { "answer_id": 118101,...
2008/09/22
[ "https://Stackoverflow.com/questions/118092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
118,096
<p>I need to be able to take a string like:</p> <pre><code>'''foo, bar, "one, two", three four''' </code></pre> <p>into:</p> <pre><code>['foo', 'bar', 'one, two', 'three four'] </code></pre> <p>I have an feeling (with hints from #python) that the solution is going to involve the shlex module.</p>
[ { "answer_id": 118132, "author": "Armin Ronacher", "author_id": 19990, "author_profile": "https://Stackoverflow.com/users/19990", "pm_score": 1, "selected": false, "text": ">>> import re\n>>> pattern = re.compile(r'\\s*(\"[^\"]*\"|.*?)\\s*,')\n>>> def split(line):\n... return [x[1:-1] i...
2008/09/22
[ "https://Stackoverflow.com/questions/118096", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18866/" ]
118,100
<p>do you use a tool? or just manually make them?</p>
[ { "answer_id": 692737, "author": "Chris S", "author_id": 21574, "author_profile": "https://Stackoverflow.com/users/21574", "pm_score": 5, "selected": true, "text": "http://chart.apis.google.com/chart?\nchs=600x250& // the size of the chart\nchtt=Burndown& // Title\ncht=lc& // The chart t...
2008/09/22
[ "https://Stackoverflow.com/questions/118100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10431/" ]
118,126
<p>Although ASP.NET MVC seems to have all the hype these days, WebForms are still quite pervasive. How do you keep your project sane? Let's collect some tips here.</p>
[ { "answer_id": 118188, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 2, "selected": false, "text": "<div>" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/118126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/337/" ]
118,130
<p>I'm using Windows Vista and C#.net 3.5, but I had my friend run the program on XP and has the same problem.</p> <p>So I have a C# program that I have running in the background with an icon in the SystemTray. I have a low level keyboard hook so when I press two keys (Ctr+windows in this case) it'll pull of the appl...
[ { "answer_id": 118159, "author": "Paul Beesley", "author_id": 14333, "author_profile": "https://Stackoverflow.com/users/14333", "pm_score": 0, "selected": false, "text": " Rectangle screenRect = Screen.GetBounds(this);\n this.Location = screenRect.Location;\n this.Si...
2008/09/22
[ "https://Stackoverflow.com/questions/118130", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13713/" ]
118,143
<p>Not a competition, it is instead me trying to find why a certain regex works in one but not the other.</p> <pre><code>(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?) </code></pre> <p>That's my Regex and I...
[ { "answer_id": 118163, "author": "nosklo", "author_id": 17160, "author_profile": "https://Stackoverflow.com/users/17160", "pm_score": 4, "selected": true, "text": ">>> re.match(r'(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[...
2008/09/22
[ "https://Stackoverflow.com/questions/118143", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384652/" ]
118,144
<p>What's the most efficient way to select the last n number of rows in a table using mySQL? The table contains millions of rows, and at any given time I don't know how large the table is (it is constantly growing). The table does have a column that is automatically incremented and used as a unique identifier for each ...
[ { "answer_id": 118169, "author": "Eran Galperin", "author_id": 10585, "author_profile": "https://Stackoverflow.com/users/10585", "pm_score": 7, "selected": true, "text": "SELECT * FROM table_name ORDER BY auto_incremented_id DESC LIMIT n\n" }, { "answer_id": 118172, "author":...
2008/09/22
[ "https://Stackoverflow.com/questions/118144", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9076/" ]
118,190
<p>I have a SQL script that creates a package with a comment containing an ampersand (&amp;). When I run the script from SQL Plus, I am prompted to enter a substitute value for the string starting with &amp;. How do I disable this feature so that SQL Plus ignores the ampersand?</p>
[ { "answer_id": 118210, "author": "Austin Salonen", "author_id": 4068, "author_profile": "https://Stackoverflow.com/users/4068", "pm_score": 9, "selected": true, "text": "set define off\n 'StackOverflow &' || ' you'\n" }, { "answer_id": 118217, "author": "user19387", "auth...
2008/09/22
[ "https://Stackoverflow.com/questions/118190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20625/" ]
118,199
<p>I have an application where 2 threads are running... Is there any certanty that when I change a global variable from one thread, the other will notice this change? I don't have any syncronization or Mutual exclusion system in place... but should this code work all the time (imagine a global <strong>bool</strong> na...
[ { "answer_id": 118204, "author": "Adam Pierce", "author_id": 5324, "author_profile": "https://Stackoverflow.com/users/5324", "pm_score": 2, "selected": false, "text": "volatile int myInteger;\n" }, { "answer_id": 118266, "author": "1800 INFORMATION", "author_id": 3146, ...
2008/09/22
[ "https://Stackoverflow.com/questions/118199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2731698/" ]
118,235
<p>I run my blog using Wordpress and all too recently became a <em>big</em> believer in SCM. I really want to put my site into subversion (that's what I'm using right now, maybe git will come later) but I can't think of the correct way to do it yet. Basically, my repository is set up currently with an 'implementation...
[ { "answer_id": 118552, "author": "cori", "author_id": 8151, "author_profile": "https://Stackoverflow.com/users/8151", "pm_score": 1, "selected": false, "text": "# svn co http://svn.automattic.com/wordpress/tags/2.6.2/ (replace the current rev here for the first check out).\n #svn sw http...
2008/09/22
[ "https://Stackoverflow.com/questions/118235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16562/" ]
118,241
<p>I'd like to use JavaScript to calculate the width of a string. Is this possible without having to use a monospace typeface?</p> <p>If it's not built-in, my only idea is to create a table of widths for each character, but this is pretty unreasonable especially supporting <a href="http://en.wikipedia.org/wiki/Unicode...
[ { "answer_id": 118251, "author": "CMPalmer", "author_id": 14894, "author_profile": "https://Stackoverflow.com/users/14894", "pm_score": 10, "selected": true, "text": "var fontSize = 12;\nvar test = document.getElementById(\"Test\");\ntest.style.fontSize = fontSize;\nvar height = (test.cl...
2008/09/22
[ "https://Stackoverflow.com/questions/118241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8119/" ]
118,243
<p>How can I open multiple Eclipse workspaces at the same time on the Mac?</p> <p>On other platforms, I can just launch extra Eclipse instances, but the Mac will not let me open the same application twice. Is there a better way than keeping two copies of Eclipse?</p>
[ { "answer_id": 118286, "author": "Tim Visher", "author_id": 16562, "author_profile": "https://Stackoverflow.com/users/16562", "pm_score": 8, "selected": true, "text": "cd /Applications/eclipse/ cd /Developer/Eclipse/Eclipse.app/Contents/MacOS/eclipse cd /Applications/eclipse/Eclipse.app/...
2008/09/22
[ "https://Stackoverflow.com/questions/118243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14955/" ]
118,260
<p>I'm trying to teach Komodo to fire up <a href="http://en.wikipedia.org/wiki/IDLE_(Python)" rel="noreferrer">IDLE</a> when I hit the right keystrokes. I can use the exact path of the shortcut in start menu in the Windows Explorer location bar to launch IDLE so I was hoping Komodo would be able to use it as well. Bu...
[ { "answer_id": 118275, "author": "Florian Bösch", "author_id": 19435, "author_profile": "https://Stackoverflow.com/users/19435", "pm_score": 7, "selected": true, "text": "idle.py Lib\\idlelib\\idle.py" }, { "answer_id": 118308, "author": "Dara Kong", "author_id": 11292, ...
2008/09/22
[ "https://Stackoverflow.com/questions/118260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5113/" ]
118,261
<p>E.g. we this code in the asp.net form codebihind:</p> <pre><code>private void btnSendEmails_OnClick() { Send100000EmailsAndWaitForReplies(); } </code></pre> <p>This code execution will be killed by the timeout reason. For resolving the problem I'd like to see something like this:</p> <pre><code>private void b...
[ { "answer_id": 118295, "author": "Ash", "author_id": 5023, "author_profile": "https://Stackoverflow.com/users/5023", "pm_score": 0, "selected": false, "text": "<%@ Page Language=\"C#\" Async=\"true\" %>\n<script runat=\"server\">\n\n protected void Page_Load(object sender, EventArgs e)\...
2008/09/22
[ "https://Stackoverflow.com/questions/118261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9198/" ]
118,280
<p>I thought I had seen a bug report about this on the jQuery site, but now I cannot find it. I'm trying to resize a dialog in IE6. But when the element is resized, the content and title bar don't resize down. They will resize up if the dialog is made larger, however. The result is that the close button ends up being c...
[ { "answer_id": 120050, "author": "Dave Richardson", "author_id": 3392, "author_profile": "https://Stackoverflow.com/users/3392", "pm_score": 0, "selected": false, "text": "<html>\n<head>\n<title>Example of IE6 resize issue</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"?.css\...
2008/09/22
[ "https://Stackoverflow.com/questions/118280", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6118/" ]
118,289
<p>I have a string with possible command line arguments (using an Read-Eval-Print-Loop program) and I want it to be parsed similar to the command line arguments when passed to Getopt::Long.</p> <p>To elaborate:</p> <p>I have a string</p> <pre><code>$str = '--infile /tmp/infile_location --outfile /tmp/outfile' </code...
[ { "answer_id": 118392, "author": "Jagmal", "author_id": 4406, "author_profile": "https://Stackoverflow.com/users/4406", "pm_score": 3, "selected": false, "text": "GetOptionsFromArray ([glob ($input_line)]);\n" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/118289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4406/" ]
118,292
<p>So I was writing some code today that basically looks like this:</p> <pre><code>string returnString = s.Replace("!", " ") .Replace("@", " ") .Replace("#", " ") .Replace("$", " ") .Replace("%", " ") .Replace("^", " ") .Replace("*", " ") ...
[ { "answer_id": 118306, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 6, "selected": true, "text": "var returnString = Regex.Replace(s,@\"[!@#\\$%\\^*_\\+=\\\\]\",\" \");\n" }, { "answer_id": 118314, "author":...
2008/09/22
[ "https://Stackoverflow.com/questions/118292", "https://Stackoverflow.com", "https://Stackoverflow.com/users/493/" ]
118,305
<p>How can UTF-8 strings (i.e. 8-bit string) be converted to/from XML-compatible 7-bit strings (i.e. printable ASCII with numeric entities)?</p> <p>i.e. an <code>encode()</code> function such that:</p> <pre><code>encode("“£”") -&gt; "&amp;#8220;&amp;#163;&amp;#8221;" </code></pre> <p><code>decode()</code> would also...
[ { "answer_id": 193057, "author": "Kris", "author_id": 18565, "author_profile": "https://Stackoverflow.com/users/18565", "pm_score": 0, "selected": false, "text": "iconv() function decode( $string )\n{\n $doc = new DOMDocument( \"1.0\", \"UTF-8\" ); \n $doc->LoadXML( '<?xml version=\"1....
2008/09/22
[ "https://Stackoverflow.com/questions/118305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11543/" ]
118,307
<p>Tools like 'ps' and 'top' report various kinds of memory usages, such as the VM size and the Resident Set Size. However, none of those are the "real" memory usage:</p> <ul> <li>Program code is shared between multiple instances of the same program.</li> <li>Shared library program code is shared between all processes...
[ { "answer_id": 1954774, "author": "Mecki", "author_id": 15809, "author_profile": "https://Stackoverflow.com/users/15809", "pm_score": 6, "selected": false, "text": "sudo vmmap <pid>\n sudo vmmap -resident <pid>\n REGION TYPE [ VIRTUAL/RESIDENT]\n=========== [ ====...
2008/09/22
[ "https://Stackoverflow.com/questions/118307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20816/" ]
118,341
<p>I have a Linq to objects statement</p> <pre><code> var confirm = from l in lines.Lines where (l.LineNumber == startline.LineNumber) || (l.LineNumber == endline.LineNumber) select l; </code></pre> <p>The confirm object is returning an 'Object Null or Not A Reference' at at System.Linq.Enumerable.WhereListIterat...
[ { "answer_id": 118871, "author": "Steve Steiner", "author_id": 3892, "author_profile": "https://Stackoverflow.com/users/3892", "pm_score": 4, "selected": false, "text": "where (l.LineNumber == startline.LineNumber) || (l.LineNumber == endline.LineNumber)\n" }, { "answer_id": 7160...
2008/09/23
[ "https://Stackoverflow.com/questions/118341", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5302/" ]
118,342
<p>I am aware of this command: <code>cvs log -N -w&lt;userid&gt; -d"1 day ago"</code></p> <p>Unfortunately this generates a formatted report with lots of newlines in it, such that the file-path, the file-version, and the comment-text are all on separate lines. Therefore it is difficult to scan it for all occurrences o...
[ { "answer_id": 118397, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 2, "selected": false, "text": "<Cmd> | egrep 'Filename:|Version:|Comment:'\n # Assume the sections are of the format:\n# Filename: <filename>\n# Ve...
2008/09/23
[ "https://Stackoverflow.com/questions/118342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14749/" ]
118,343
<p>Ruby on Rails has <a href="http://wiki.rubyonrails.com/rails/pages/Timestamping" rel="nofollow noreferrer">magic timestamping fields</a> that are automatically updated when a record is created or updated. I'm trying to find similar functionality in Entity Framework. I've considered database triggers and a SavingChan...
[ { "answer_id": 118397, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 2, "selected": false, "text": "<Cmd> | egrep 'Filename:|Version:|Comment:'\n # Assume the sections are of the format:\n# Filename: <filename>\n# Ve...
2008/09/23
[ "https://Stackoverflow.com/questions/118343", "https://Stackoverflow.com", "https://Stackoverflow.com/users/453303/" ]
118,356
<p>I have a custom program which preprocesses a C# file and generates a new C# file as output. I would like to invoke this from msbuild on each of the C# files in the project, then compile the output files instead of the original C# files. How would I go about this?</p>
[ { "answer_id": 119662, "author": "Jivko Petiov", "author_id": 11348, "author_profile": "https://Stackoverflow.com/users/11348", "pm_score": 0, "selected": false, "text": "<Exec Command=\"your executable\" />\n" } ]
2008/09/23
[ "https://Stackoverflow.com/questions/118356", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13193/" ]
118,370
<p>This came up in <a href="https://stackoverflow.com/questions/101268/hidden-features-of-python">Hidden features of Python</a>, but I can't see good documentation or examples that explain how the feature works.</p>
[ { "answer_id": 118395, "author": "nosklo", "author_id": 17160, "author_profile": "https://Stackoverflow.com/users/17160", "pm_score": 8, "selected": true, "text": "Ellipsis ... >>> class TestEllipsis(object):\n... def __getitem__(self, item):\n... if item is Ellipsis:\n... ...
2008/09/23
[ "https://Stackoverflow.com/questions/118370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15677/" ]
118,371
<p>When a class field is accessed via a getter method by multiple threads, how do you maintain thread safety? Is the synchronized keyword sufficient?</p> <p>Is this safe:</p> <pre><code>public class SomeClass { private int val; public synchronized int getVal() { return val; } private void se...
[ { "answer_id": 118388, "author": "Cowan", "author_id": 17041, "author_profile": "https://Stackoverflow.com/users/17041", "pm_score": 5, "selected": true, "text": " int old = someThing.getVal();\n if (old == 1) {\n someThing.setVal(2);\n }\n" }, { "answer_id": 118452, "auth...
2008/09/23
[ "https://Stackoverflow.com/questions/118371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1119/" ]
118,374
<p>For years, maybe 10, I've been fascinated with cryptography. I read a book about XOR bit-based encryption, and have been hooked ever since thing.</p> <p>I guess it's more fair to say that I'm fascinated by those who can break various encryption methods, but I digress.</p> <p>To the point -- what methods do you use...
[ { "answer_id": 118453, "author": "BCS", "author_id": 1343, "author_profile": "https://Stackoverflow.com/users/1343", "pm_score": 0, "selected": false, "text": "CipherTextArray = PlainTextArray ^ KeyArray;\n" } ]
2008/09/23
[ "https://Stackoverflow.com/questions/118374", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10853/" ]
118,415
<p>My database is located in e.g. california. My user table has all the user's timezone e.g. -0700 UTC </p> <p>How can I adjust the time from my database server whenever I display a date to the user who lives in e.g. new york? UTC/GMT -4 hours</p>
[ { "answer_id": 118432, "author": "aku", "author_id": 1196, "author_profile": "https://Stackoverflow.com/users/1196", "pm_score": 2, "selected": false, "text": "DateTime.ToUniversalTime() -> server;\nDateTime.ToLocalTime() -> client\n" }, { "answer_id": 118437, "author": "Laur...
2008/09/23
[ "https://Stackoverflow.com/questions/118415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1368/" ]
118,423
<p>I've been impressed by the screencasts for Rails that demonstrate the built-in web server, and database to allow development and testing to occur on the local machine. How can I get an instance of Apache to execute a project directory as its DocumentRoot, and maybe serve up the files on port 8080 (or something simil...
[ { "answer_id": 118522, "author": "Bazman", "author_id": 18521, "author_profile": "https://Stackoverflow.com/users/18521", "pm_score": 2, "selected": false, "text": "NameVirtualHost *:80\n\n<virtualhost *:80>\nServerName site1.mydyndns.dyndns.org\nDocumentRoot /site1/documentroot\n</virtu...
2008/09/23
[ "https://Stackoverflow.com/questions/118423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/658/" ]
118,443
<p>I have an application that tracks high scores in a game. </p> <p>I have a <strong>user_scores</strong> table that maps a user_id to a score.</p> <p>I need to return the 5 highest scores, but only 1 high score for any <em>specific</em> user.</p> <p>So if user X has the 5 highest scores on a purely numerical basis,...
[ { "answer_id": 118451, "author": "JustinD", "author_id": 12063, "author_profile": "https://Stackoverflow.com/users/12063", "pm_score": 0, "selected": false, "text": "SELECT DISTINCT(user_id), score\nFROM user_scores\nORDER BY score DESC\nLIMIT 5\n" }, { "answer_id": 118457, "...
2008/09/23
[ "https://Stackoverflow.com/questions/118443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14971/" ]
118,458
<p>Along the lines of my previous <a href="https://stackoverflow.com/questions/118096/how-can-i-parse-a-comma-delimited-string-into-a-list-caveat">question</a>, how can i join a list of strings into a string such that values get quoted cleanly. Something like:</p> <pre><code>['a', 'one "two" three', 'foo, bar', """bot...
[ { "answer_id": 118462, "author": "nosklo", "author_id": 17160, "author_profile": "https://Stackoverflow.com/users/17160", "pm_score": 4, "selected": true, "text": "csv import csv\nwriter = csv.writer(open(\"some.csv\", \"wb\"))\nwriter.writerow(the_list)\n StringIO f = StringIO.StringIO(...
2008/09/23
[ "https://Stackoverflow.com/questions/118458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18866/" ]
118,463
<p>We are looking to do some heavy security requirements on our project, and we need to do a lot of encryption that is highly performant.</p> <p>I think that I know that PKI is much slower and more complex than symmetric encryption, but I can't find the numbers to back up my feelings.</p>
[ { "answer_id": 118481, "author": "Cristian Ciupitu", "author_id": 12892, "author_profile": "https://Stackoverflow.com/users/12892", "pm_score": 4, "selected": false, "text": "speed [dave@hal9000 ~]$ openssl speed aes-128-cbc\nDoing aes-128 cbc for 3s on 16 size blocks: 26126940 aes-128 c...
2008/09/23
[ "https://Stackoverflow.com/questions/118463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20150/" ]
118,474
<p>Has anybody established a good naming convention for action in MVC? I was specifically looking at ASP.net MVC but it is a general question. For instance I have an action which displays the login screen (Login) and one which process the login request from that page (LoginTest). I'm not keen on the names and I have...
[ { "answer_id": 120227, "author": "Paul Shannon", "author_id": 11503, "author_profile": "https://Stackoverflow.com/users/11503", "pm_score": 7, "selected": true, "text": "* Index - the main \"landing\" page. This is also the default endpoint.\n* List - a list of whatever \"thing\" you're ...
2008/09/23
[ "https://Stackoverflow.com/questions/118474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/361/" ]
118,487
<p>Sorry the title isn't more help. I have a database of media-file URLs that came from two sources: </p> <p>(1) RSS feeds and (2) manual entries. </p> <p>I want to find the ten most-recently added URLs, but a maximum of one from any feed. To simplify, table '<code>urls</code>' has columns <code>'url, feed_id, timest...
[ { "answer_id": 118523, "author": "Aeon", "author_id": 13289, "author_profile": "https://Stackoverflow.com/users/13289", "pm_score": 0, "selected": false, "text": " (SELECT \n url, feed_id, timestamp \n FROM rss_items \n GROUP BY feed_id \n ORDER BY timestamp DESC \n ...
2008/09/23
[ "https://Stackoverflow.com/questions/118487", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17307/" ]
118,490
<p>Can anyone recommend a cheap and good RTF control for .Net 1.1 Windows development. It needs to be able to do print/preview and some basic text formatting, fonts etc but nothing too advanced.</p> <p>Cheers</p> <p>Andreas</p>
[ { "answer_id": 118523, "author": "Aeon", "author_id": 13289, "author_profile": "https://Stackoverflow.com/users/13289", "pm_score": 0, "selected": false, "text": " (SELECT \n url, feed_id, timestamp \n FROM rss_items \n GROUP BY feed_id \n ORDER BY timestamp DESC \n ...
2008/09/23
[ "https://Stackoverflow.com/questions/118490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
118,501
<p>If I was, for example, going to <em>count</em> "activities" across many computers and show a rollup of that activity, what would the database look like to store the data? </p> <p>Simply this? Seems too simple. I'm overthinking this.</p> <pre><code>ACTIVITYID COUNT ---------- ----- </code></pre>
[ { "answer_id": 118672, "author": "Guy Starbuck", "author_id": 2194, "author_profile": "https://Stackoverflow.com/users/2194", "pm_score": 4, "selected": true, "text": "LOGID (PK) ACTIVITYID SOURCE DATELOGGED\n---------- ---------- ------ ----------\n" } ]
2008/09/23
[ "https://Stackoverflow.com/questions/118501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6380/" ]
118,506
<p>The question is a fairly open one. I've been using Stored Procs with MS SQLServer for some time with classic ASP and ASP.net and love them, lots.</p> <p>I have a small hobby project I'm working on and for various reasons have gone the LAMP route. Any hints/tricks/traps or good starting points to get into using stor...
[ { "answer_id": 118582, "author": "Gleb Popoff", "author_id": 18076, "author_profile": "https://Stackoverflow.com/users/18076", "pm_score": 2, "selected": false, "text": "$mysqli = new MySQLI(user,pass,db);\n\n$result = $mysqli->query(\"CALL sp_mysp()\");\n $stmt = $mysqli->prepare(\"SE...
2008/09/23
[ "https://Stackoverflow.com/questions/118506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4665/" ]
118,516
<p>My issue is below but would be interested comments from anyone with experience with xlrd.</p> <p>I just found xlrd and it looks like the perfect solution but I'm having a little problem getting started. I am attempting to extract data programatically from an Excel file I pulled from Dow Jones with current component...
[ { "answer_id": 118803, "author": "John Fouhy", "author_id": 15154, "author_profile": "https://Stackoverflow.com/users/15154", "pm_score": -1, "selected": false, "text": "import pyExcelerator\nbook = pyExcelerator.parse_xls('DJIAMovers.xls')\n" }, { "answer_id": 125001, "autho...
2008/09/23
[ "https://Stackoverflow.com/questions/118516", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
118,526
<p>How do you support optimistic / pessimistic concurrency using NHibernate?</p>
[ { "answer_id": 118539, "author": "Jon Limjap", "author_id": 372, "author_profile": "https://Stackoverflow.com/users/372", "pm_score": 5, "selected": true, "text": "ISession.Lock()" } ]
2008/09/23
[ "https://Stackoverflow.com/questions/118526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1574/" ]
118,528
<h2>I've actually solved this, but I'm posting it for posterity.</h2> <p>I ran into a very odd issue with the DataGridView on my dual-monitor system. The issue manifests itself as an EXTREMELY slow repaint of the control (<em>like 30 seconds for a full repaint</em>), but only when it is on one of my screens. When on t...
[ { "answer_id": 157386, "author": "Benoit", "author_id": 10703, "author_profile": "https://Stackoverflow.com/users/10703", "pm_score": 7, "selected": true, "text": "\nclass CustomDataGridView: DataGridView\n{\n public CustomDataGridView()\n {\n DoubleBuffered = true;\n } \...
2008/09/23
[ "https://Stackoverflow.com/questions/118528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5927/" ]