qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
138,419
<p>While porting an application from SQL 2005 to SQL Server Compact Edition, I found that I need to port this command:</p> <pre><code>SELECT TOP 1 Id FROM tblJob WHERE Holder_Id IS NULL </code></pre> <p>But SQL Server Compact Edition doesn't support the <code>TOP</code> keyword. How can I port this command?</p>
[ { "answer_id": 138439, "author": "Robinb", "author_id": 22064, "author_profile": "https://Stackoverflow.com/users/22064", "pm_score": 6, "selected": true, "text": "SELECT TOP(1) Id \nFROM tblJob \nWHERE Holder_Id IS NULL\n" }, { "answer_id": 140835, "author": "Mike Dimmick", ...
2008/09/26
[ "https://Stackoverflow.com/questions/138419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15136/" ]
138,422
<p>I have a HTML report, which needs to be printed landscape because of the many columns. It there a way to do this, without the user having to change the document settings?</p> <p>And what are the options amongst browsers.</p>
[ { "answer_id": 138456, "author": "yann.kmm", "author_id": 15780, "author_profile": "https://Stackoverflow.com/users/15780", "pm_score": 3, "selected": false, "text": "div.page { \n writing-mode: tb-rl;\n}\n" }, { "answer_id": 138483, "author": "gizmo", "author_id": 9...
2008/09/26
[ "https://Stackoverflow.com/questions/138422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/56/" ]
138,449
<p>Here's the problem:</p> <p>In C# I'm getting information from a legacy ACCESS database. .NET converts the content of the database (in the case of this problem a string) to Unicode before handing the content to me.</p> <p>How do I convert this Unicode string back to it's ASCII equivalent?</p> <p><hr> <strong>Edit<...
[ { "answer_id": 141816, "author": "Huppie", "author_id": 1830, "author_profile": "https://Stackoverflow.com/users/1830", "pm_score": 5, "selected": true, "text": "byte[] bytes = Encoding.GetEncoding(437).GetBytes(\"ê\");\n" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/138449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1830/" ]
138,477
<p>Is it possible to send my own developed exceptions over Soap to a client using http.sys??</p>
[ { "answer_id": 9320072, "author": "dyslexicanaboko", "author_id": 603807, "author_profile": "https://Stackoverflow.com/users/603807", "pm_score": 1, "selected": false, "text": "'This is in VB.Net\n<WebMethod()> _\nPublic Function ThrowTestSoapException() As TestSoapException\n Return ...
2008/09/26
[ "https://Stackoverflow.com/questions/138477", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
138,493
<p>How does one handle a <code>DateTime</code> with a <code>NOT NULL</code>?</p> <p>I want to do something like this:</p> <pre><code>SELECT * FROM someTable WHERE thisDateTime IS NOT NULL </code></pre> <p>But how?</p>
[ { "answer_id": 138495, "author": "Johnno Nolan", "author_id": 1116, "author_profile": "https://Stackoverflow.com/users/1116", "pm_score": 6, "selected": true, "text": "/****** Object: Table [dbo].[DateTest] Script Date: 09/26/2008 10:44:21 ******/\nSET ANSI_NULLS ON\nGO\nSET QUOTED_I...
2008/09/26
[ "https://Stackoverflow.com/questions/138493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14777/" ]
138,496
<p>How would you go about producing reports by user selected date ranges in a rails app? What are the best date range pickers? </p> <p>edit in response to patrick : I am looking for a bit of both widget and active record advice but what I am really curious about is how to restfully display a date ranged list based on...
[ { "answer_id": 138810, "author": "Patrick McKenzie", "author_id": 15046, "author_profile": "https://Stackoverflow.com/users/15046", "pm_score": 6, "selected": true, "text": "date_select params[:start_date] params[:end_date] date_select #an application helper method you'll find helpful\n#...
2008/09/26
[ "https://Stackoverflow.com/questions/138496", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6805/" ]
138,497
<p>How can I iterate over each file in a directory using a <code>for</code> loop?</p> <p>And how could I tell if a certain entry is a directory or if it's just a file?</p>
[ { "answer_id": 138513, "author": "Axeman", "author_id": 22108, "author_profile": "https://Stackoverflow.com/users/22108", "pm_score": 3, "selected": false, "text": "for %1 in (*.*) do echo %1\n" }, { "answer_id": 138522, "author": "Sam Meldrum", "author_id": 16005, "a...
2008/09/26
[ "https://Stackoverflow.com/questions/138497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11234/" ]
138,501
<p>I have mixed data i nvarchar column (words and numbers). Which is fastest way to sort data in this column in Numeric Order.</p> <p>Result example:</p> <ul> <li>1</li> <li>2</li> <li>3</li> <li>...</li> <li>10</li> <li>11</li> <li>...</li> <li>aaaa</li> <li>aaab</li> <li>b</li> <li>ba</li> <li>ba</li> <li>...</li> ...
[ { "answer_id": 138507, "author": "Dan", "author_id": 17121, "author_profile": "https://Stackoverflow.com/users/17121", "pm_score": -1, "selected": false, "text": "SELECT * FROM foo ORDER BY CAST(somecolumn AS int);\n" }, { "answer_id": 138549, "author": "SelvirK", "author...
2008/09/26
[ "https://Stackoverflow.com/questions/138501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17465/" ]
138,508
<p>My understanding of the MVC is as follows (incase it's horribly wrong, I am afterall new to it)</p> <ol> <li>Models are the things that interface with the database</li> <li>Views are the design/layout of the page</li> <li>Controllers are where everything starts and are essentially the page logic</li> </ol> <p>I'm ...
[ { "answer_id": 138595, "author": "kosoant", "author_id": 15114, "author_profile": "https://Stackoverflow.com/users/15114", "pm_score": 3, "selected": true, "text": "findByPk --> returns a single value object\nfindAll --> returns a collection of value objects (0-n)\netc.\n" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/138508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384652/" ]
138,511
<p>I know there's some <code>JAVA_OPTS</code> to set to remotely debug a Java program.</p> <p>What are they and what do they mean ?</p>
[ { "answer_id": 138518, "author": "Hans Sjunnesson", "author_id": 8683, "author_profile": "https://Stackoverflow.com/users/8683", "pm_score": 10, "selected": true, "text": "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044\n -agentlib:jdwp=transport=dt_socket,server=y,...
2008/09/26
[ "https://Stackoverflow.com/questions/138511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3122/" ]
138,514
<p>I have a ASP.NET 2.0 webpage with 2 UserControls (.ascx). Each UserControl contains a bunch of validators. Placing a ValidationSummary on the page will display all validation errors, of both UserControl's. Placing a ValidationSummary in each UserControl will display all the errors of both controls twice. </p> <p>Wh...
[ { "answer_id": 139099, "author": "HectorMac", "author_id": 1400, "author_profile": "https://Stackoverflow.com/users/1400", "pm_score": 3, "selected": true, "text": "Page.Validate(MyValidationGroup1);\nPage.Validate(MyValidationGroup2);\nif(Page.IsValid)\n{\n //do stuff\n}\n" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/138514", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6399/" ]
138,515
<p>In continuation of the my <a href="https://stackoverflow.com/questions/138331/any-decent-text-diffmerge-engine-for-net">previous question</a>, are the any good controls for text diffs visualization?</p> <p>Something like StackOverflow's revision diff viewer but for WinForms or WPF</p> <p>Requirements:</p> <ul> <l...
[ { "answer_id": 45256402, "author": "halllo", "author_id": 6466378, "author_profile": "https://Stackoverflow.com/users/6466378", "pm_score": 2, "selected": false, "text": "netstandard1.0 RichTextBox" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/138515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1196/" ]
138,521
<p>How feasible would it be to compile Python (possibly via an intermediate C representation) into machine code?</p> <p>Presumably it would need to link to a Python runtime library, and any parts of the Python standard library which were Python themselves would need to be compiled (and linked in) too.</p> <p>Also, yo...
[ { "answer_id": 23596973, "author": "amirouche", "author_id": 140837, "author_profile": "https://Stackoverflow.com/users/140837", "pm_score": 2, "selected": false, "text": "pythoncalledfromc.py # -*- encoding:utf-8 -*-\n# this file must be named \"pythoncalledfrom.py\"\n\ndef main(string)...
2008/09/26
[ "https://Stackoverflow.com/questions/138521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22610/" ]
138,547
<p>I'm using SQL Server 2008 with Advanced Services on my Vista Home Premium. I'd installed Full-text searching during installation, The SQL Full-text Filter Daemon Launcher is running thorough an admin user account. When I go to a database through the SQL Server Management Studio, I don't see the "Storage" option unde...
[ { "answer_id": 1695437, "author": "Ryan", "author_id": 205914, "author_profile": "https://Stackoverflow.com/users/205914", "pm_score": 0, "selected": false, "text": "EXEC sp_fulltext_database 'enable';\nGO\n CREATE FULLTEXT CATALOG ftcatalog;\nGO\n CREATE FULLTEXT INDEX ON dbo.Tablename ...
2008/09/26
[ "https://Stackoverflow.com/questions/138547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6939/" ]
138,550
<p>I didn't find an explicit answer to this question in the WiX Documentation (or Google, for that matter). Of course I could just write the appropriate registry keys in HKCR, but it makes me feel dirty and I'd expect this to be a standard task which should have a nice default solution.</p> <p>For bonus points, I'd li...
[ { "answer_id": 139151, "author": "Edward Wilde", "author_id": 5182, "author_profile": "https://Stackoverflow.com/users/5182", "pm_score": 3, "selected": false, "text": "<ProgId Id='AcmeFoobar.xyzfile' Description='Acme Foobar data file'>\n <Extension Id='xyz' ContentType='application/xy...
2008/09/26
[ "https://Stackoverflow.com/questions/138550", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20363/" ]
138,552
<p>I need to replace character (say) <strong>x</strong> with character (say) <strong>P</strong> in a string, but only if it is contained in a quoted substring. An example makes it clearer:</p> <pre><code>axbx'cxdxe'fxgh'ixj'k -&gt; axbx'cPdPe'fxgh'iPj'k </code></pre> <p>Let's assume, for the sake of simplicity, that...
[ { "answer_id": 138594, "author": "Remo.D", "author_id": 16827, "author_profile": "https://Stackoverflow.com/users/16827", "pm_score": 1, "selected": false, "text": "'<repl>'=$0\nrepl:x=P\n" }, { "answer_id": 138615, "author": "Greg Hewgill", "author_id": 893, "author_...
2008/09/26
[ "https://Stackoverflow.com/questions/138552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11545/" ]
138,555
<p>I need to convert HTML documents into valid XML, preferably XHTML. What's the best way to do this? Does anybody know a toolkit/library/sample/...whatever that helps me to get that task done?</p> <p>To be a bit more clear here, my application has to do the conversion automatically at runtime. I don't look for a tool...
[ { "answer_id": 138561, "author": "prakash", "author_id": 123, "author_profile": "https://Stackoverflow.com/users/123", "pm_score": 6, "selected": true, "text": "c:\\temp>tidy -help\ntidy [option...] [file...] [option...] [file...]\nUtility to clean up and pretty print HTML/XHTML/XML\nsee...
2008/09/26
[ "https://Stackoverflow.com/questions/138555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6777/" ]
138,558
<p>Trying to understand an fft (Fast Fourier Transform) routine I'm using (stealing)(recycling)</p> <p>Input is an array of 512 data points which are a sample waveform. Test data is generated into this array. fft transforms this array into frequency domain. Trying to understand relationship between freq, period, samp...
[ { "answer_id": 411335, "author": "JeffV", "author_id": 445087, "author_profile": "https://Stackoverflow.com/users/445087", "pm_score": 1, "selected": false, "text": "s_prev = 0\ns_prev2 = 0\ncoeff = 2*cos(2*PI*normalized_frequency);\nfor each sample, x[n],\n s = x[n] + coeff*s_prev - s_...
2008/09/26
[ "https://Stackoverflow.com/questions/138558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2135219/" ]
138,565
<p>For a new project that I'm doing in PHP I've created an SQLMethods class to connect to the database and perform queries. Tonight was the first night that I actually got to test it (I wrote it a week or so ago and forgot about it) and an unexpected error occured: When it was calling my ExecuteQuery() function, it wou...
[ { "answer_id": 138590, "author": "cruizer", "author_id": 6441, "author_profile": "https://Stackoverflow.com/users/6441", "pm_score": 4, "selected": true, "text": " $this->SQLConnection\n" }, { "answer_id": 138591, "author": "Greg", "author_id": 1916, "author_profile":...
2008/09/26
[ "https://Stackoverflow.com/questions/138565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14877/" ]
138,576
<p>I'm trying to use the tree command in a windows commandline to generate a text file listing the contents of a directory but when I pipe the output the unicode characters get stuffed up.</p> <p>Here is the command I am using:</p> <pre><code>tree /f /a &gt; output.txt </code></pre> <p>The results in the console win...
[ { "answer_id": 139302, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 3, "selected": false, "text": "tree.com ulib.dll TREE::DisplayName WriteString ulib ulib WriteString SCREEN STREAM SCREEN WriteConsoleW STREAM _UseConsoleC...
2008/09/26
[ "https://Stackoverflow.com/questions/138576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/48281/" ]
138,600
<p>What is the right way of initializing a static map? Do we need a static function that will initialize it? </p>
[ { "answer_id": 138612, "author": "Ferruccio", "author_id": 4086, "author_profile": "https://Stackoverflow.com/users/4086", "pm_score": 9, "selected": false, "text": "#include <map>\nusing namespace std;\n\nmap<int, char> m = {{1, 'a'}, {3, 'b'}, {5, 'c'}, {7, 'd'}};\n #include <map>\n#in...
2008/09/26
[ "https://Stackoverflow.com/questions/138600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15163/" ]
138,607
<p>I have a very simple bit of script that changes the status of an item in a MySql database - it works fine in IE7, but if I try it in Firefox, it looks like it's worked, but hasn't... Which is extremely odd.</p> <p>The code is very simple - first I get the details of the record I'm looking for:</p> <pre><code>&lt;c...
[ { "answer_id": 139807, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "WHERE iProductAttributeID = <cfqueryparam value=\"#Arguments.iProductAttributeID#\" cfsqltype=\"CF_SQL_INTEGER\" />;\n" },...
2008/09/26
[ "https://Stackoverflow.com/questions/138607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22113/" ]
138,616
<p>I need to enumerate all running applications. In particular, all top windows. And for every window I need to add my custom item to the system menu of that window.</p> <p>How can I accomplish that in C++?</p> <p><strong>Update.</strong></p> <p>I would be more than happy to have a solution for Windows, MacOS, and U...
[ { "answer_id": 138657, "author": "Chris", "author_id": 2134, "author_profile": "https://Stackoverflow.com/users/2134", "pm_score": 1, "selected": false, "text": "HMENU hMenu = GetMenu(hwndNext);\n" }, { "answer_id": 138896, "author": "efotinis", "author_id": 12320, "a...
2008/09/26
[ "https://Stackoverflow.com/questions/138616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22623/" ]
138,617
<p>Is there a way to create an html link using h:outputLink, other JSF tag or code to create a non faces request (HTTP GET) with request parameters?</p> <p>For example I have the following navigation-rule</p> <pre><code>&lt;navigation-rule&gt; &lt;navigation-case&gt; &lt;from-outcome&gt;showMessage&lt;/fr...
[ { "answer_id": 139620, "author": "hubbardr", "author_id": 22457, "author_profile": "https://Stackoverflow.com/users/22457", "pm_score": 0, "selected": false, "text": "<h:form>\n <h:commandLink value=\"Click to see the message\" action=\"#{handler.outcome}\" />\n <h:inputHidden id=\...
2008/09/26
[ "https://Stackoverflow.com/questions/138617", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19331/" ]
138,638
<p>Can I expose a class from another .net namespace as a class in my namespace? I use a class - antlr.collections.AST - as the return type for a function belonging to a class in my namespace; as a result, the user has to have</p> <pre><code>using antlr.collections; using myNamespace; </code></pre> <p>at the top of t...
[ { "answer_id": 138642, "author": "Agnel Kurian", "author_id": 45603, "author_profile": "https://Stackoverflow.com/users/45603", "pm_score": 2, "selected": false, "text": "namespace MyForms {\n class Class1 : Some.Other.Namespace.Class1 {\n // ...\n }\n}\n" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/138638", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15371/" ]
138,669
<p>How can i check in JavaScript if a variable is defined in a page? Suppose I want to check if a variable named "x" is defined in a page, if I do <code>if(x != null)</code>, it gives me an error.</p>
[ { "answer_id": 138671, "author": "Nick Berardi", "author_id": 17, "author_profile": "https://Stackoverflow.com/users/17", "pm_score": -1, "selected": false, "text": "if (x !== undefined)\n" }, { "answer_id": 138676, "author": "SSharma", "author_id": 22628, "author_pro...
2008/09/26
[ "https://Stackoverflow.com/questions/138669", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22628/" ]
138,670
<p>How unique is the php session id? I got the impression from various things that I've read that I should not rely on two users never getting the same sessionid. Isn't it a GUID?</p>
[ { "answer_id": 138748, "author": "djsadinoff", "author_id": 22369, "author_profile": "https://Stackoverflow.com/users/22369", "pm_score": 6, "selected": false, "text": "ini_set(\"session.entropy_file\", \"/dev/urandom\");\nini_set(\"session.entropy_length\", \"512\");\n" }, { "an...
2008/09/26
[ "https://Stackoverflow.com/questions/138670", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22629/" ]
138,680
<p>is it possible to extend vim functionality via custom extension (preferably, written in Python)?</p> <p>What I need ideally is custom command when in command mode. E.g.</p> <p>ESC</p> <p>:do_this</p> <p>:do_that</p>
[ { "answer_id": 138709, "author": "Paolo Tedesco", "author_id": 15622, "author_profile": "https://Stackoverflow.com/users/15622", "pm_score": 5, "selected": true, "text": "./configure --enable-pythoninterp \nmake\nsudo make install\n :version\n :help python\n :Call MyFunction()\n :help us...
2008/09/26
[ "https://Stackoverflow.com/questions/138680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22623/" ]
138,696
<p>I have a multithreded application in perl for which I have to rely on several non-thread safe modules, so I have been using <code>fork()</code>ed processes with <code>kill()</code> signals as a message passing interface.</p> <p>The problem is that the signal handlers are a bit erratic (to say the least) and often e...
[ { "answer_id": 138787, "author": "innaM", "author_id": 7498, "author_profile": "https://Stackoverflow.com/users/7498", "pm_score": 3, "selected": false, "text": "pipe my $reader, my $writer;\nmy $pid = fork();\nif ( $pid == 0 ) {\n close $reader;\n ...\n}\nelse {\n close $writer...
2008/09/26
[ "https://Stackoverflow.com/questions/138696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7780/" ]
138,703
<p>Is there any way to automatically wrap comments at the 80-column boundary as you type them? ..or failing that, any way to display a faint line at the coulmn 80 boundary to make wrapping them manually a little easier?</p> <p>Several other IDEs I use have one or other of those functions and it makes writing comments ...
[ { "answer_id": 138962, "author": "Jon Cage", "author_id": 15369, "author_profile": "https://Stackoverflow.com/users/15369", "pm_score": 2, "selected": false, "text": "HKEY_CURRENT_USER\\Software\\Microsoft\\VCExpress\\9.0\\Text Editor\n RGB(180,180,255) 80\n" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/138703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15369/" ]
138,747
<p>A client of mine uses Oracle 9i's utl_smtp to send mails out notifications to managers when their employees have made travel requests and they woul like quite a few changes made to the mailouts done. </p> <p>We're having a lot of problems getting utl_smtp to talk to any smtp server on our network. We've even tried ...
[ { "answer_id": 139021, "author": "Dan Maharry", "author_id": 2756, "author_profile": "https://Stackoverflow.com/users/2756", "pm_score": 1, "selected": false, "text": "-- ****** Object: Stored Procedure TRAVELADMIN_DEV.HTML_EMAIL Script Date: 22/08/2008 12:41:02 ******\nCREATE PROCEDURE ...
2008/09/26
[ "https://Stackoverflow.com/questions/138747", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2756/" ]
138,758
<p>I have an msi installer which was working fine. I added an external merge module. There were some directory merge errors during compilation. I removed the directories causing the error from the directory table of the merge module.</p> <p>I am getting the error:</p> <blockquote> <p>MSI error 2732 error :Directory...
[ { "answer_id": 53765568, "author": "posix99", "author_id": 6612140, "author_profile": "https://Stackoverflow.com/users/6612140", "pm_score": 0, "selected": false, "text": "msiexec /i <package.msi> /l*v <logfile>\n" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/138758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
138,771
<p>I'm just meddling in the ways of the RESTful web service in C# using ASP.Net 2.0 and have managed (via a class library, a reference to dll produced by the former and some adjustment of my web.config) to coax out a URI format like so:</p> <p>http: //localhost/DevelopmentProject/testhandler/?input=thisismyinput</p> ...
[ { "answer_id": 138833, "author": "WebDude", "author_id": 15360, "author_profile": "https://Stackoverflow.com/users/15360", "pm_score": 1, "selected": false, "text": "<rewriter>\n <rewrite \n url=\"DevelopmentProject/testhandler/([\\w]+)\" \n to=\"DevelopmentProject/testhandler/...
2008/09/26
[ "https://Stackoverflow.com/questions/138771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
138,785
<p>I'm trying to learn RegEx in Ruby, based on what I'm reading in "<em>The Rails Way</em>". But, even this simple example has me stumped. I can't tell if it is a typo or not:</p> <pre><code>text.gsub(/\s/, "-").gsub([^\W-], '').downcase </code></pre> <p>It seems to me that this would replace all spaces with <code>-<...
[ { "answer_id": 138800, "author": "Khoth", "author_id": 20686, "author_profile": "https://Stackoverflow.com/users/20686", "pm_score": 2, "selected": false, "text": "/[^\\W-]/" }, { "answer_id": 138809, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "...
2008/09/26
[ "https://Stackoverflow.com/questions/138785", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9450/" ]
138,793
<p>I have a <em>JComboBox</em> and would like to have a separator in the list of elements. How do I do this in Java?</p> <p>A sample scenario where this would come in handy is when making a combobox for font-family-selection; similar to the font-family-selection-control in Word and Excel. In this case I would like to ...
[ { "answer_id": 138849, "author": "macbirdie", "author_id": 5049, "author_profile": "https://Stackoverflow.com/users/5049", "pm_score": 2, "selected": false, "text": "ListCellRenderer" }, { "answer_id": 139366, "author": "PhiLho", "author_id": 15459, "author_profile": ...
2008/09/26
[ "https://Stackoverflow.com/questions/138793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3379/" ]
138,819
<p>If I am iterating over each file using :</p> <pre><code>@echo off FOR %%f IN (*\*.\**) DO ( echo %%f ) </code></pre> <p>how could I print the extension of each file? I tried assigning %%f to a temporary variable, and then using the code : <code>echo "%t:~-3%"</code> to print but with no success.</p>
[ { "answer_id": 138847, "author": "Sam Holloway", "author_id": 1377325, "author_profile": "https://Stackoverflow.com/users/1377325", "pm_score": 6, "selected": true, "text": "@echo off\nfor %%i in (*.*) do echo \"%%~xi\"\n help for" }, { "answer_id": 138913, "author": "paxdiab...
2008/09/26
[ "https://Stackoverflow.com/questions/138819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11234/" ]
138,839
<p>Currently I use .Net <code>WebBrowser.Document.Images()</code> to do this. It requires the <code>Webrowser</code> to load the document. It's messy and takes up resources. </p> <p>According to <a href="https://stackoverflow.com/questions/138313/how-to-extract-img-src-title-and-alt-from-html-using-php">this question<...
[ { "answer_id": 138863, "author": "Khoth", "author_id": 20686, "author_profile": "https://Stackoverflow.com/users/20686", "pm_score": -1, "selected": false, "text": "XmlDocument doc = new XmlDocument();\ndoc.LoadXml(html);\nXmlNodeList results = doc.SelectNodes(\"//img/@src\");\n" }, ...
2008/09/26
[ "https://Stackoverflow.com/questions/138839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5648/" ]
138,880
<p>Our web site (running Rails) freezes IE6 nearly every time. The same code, deployed on a different server, does not freeze IE6. Where and how should we start tracking this down?</p>
[ { "answer_id": 139101, "author": "Jim", "author_id": 8427, "author_profile": "https://Stackoverflow.com/users/8427", "pm_score": 3, "selected": false, "text": "curl -D first.headers -o first.body http://first.example.com\ncurl -D second.headers -o second.body http://second.example.com\nd...
2008/09/26
[ "https://Stackoverflow.com/questions/138880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18666/" ]
138,884
<p>I would like to know when I should include external scripts or write them inline with the html code, in terms of performance and ease of maintenance.</p> <p>What is the general practice for this?</p> <p>Real-world-scenario - I have several html pages that need client-side form validation. For this I use a jQuery p...
[ { "answer_id": 138893, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 8, "selected": true, "text": "< >" }, { "answer_id": 7012473, "author": "Miguel Ping", "author_id": 22992, "author_profile": "ht...
2008/09/26
[ "https://Stackoverflow.com/questions/138884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21613/" ]
138,917
<p>Since I upgraded to Visual Studio 2008 from vs2005, I have found a very annoying behaviour when debugging large projects. If I attempt to step into inline code, the debugger appears to lock up for tens of seconds. Each time that I step inside such a function, there is a similar pause. Has anyone experienced this ...
[ { "answer_id": 139523, "author": "Laur", "author_id": 7134, "author_profile": "https://Stackoverflow.com/users/7134", "pm_score": 0, "selected": false, "text": "#ifdef _DEBUG\n #define INLINE\n#else\n #define INLINE inline\n#endif\n" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/138917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19674/" ]
138,932
<p>In Win32, is there any way to get a unique cpu cycle count or something similar that would be uniform for multiple processes/languages/systems/etc.</p> <p>I'm creating some log files, but have to produce multiple logfiles because we're hosting the .NET runtime, and I'd like to avoid calling from one to the other to...
[ { "answer_id": 138963, "author": "prakash", "author_id": 123, "author_profile": "https://Stackoverflow.com/users/123", "pm_score": 4, "selected": false, "text": "timeGetTime() timeGetTime() timeBeginPeriod(1) timeEndPeriod(1) timeGetTime() Sleep() Sleep() timeGetTime() timeBeginPeriod(1)...
2008/09/26
[ "https://Stackoverflow.com/questions/138932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267/" ]
138,948
<p>I need to get UTF-8 working in my Java webapp (servlets + JSP, no framework used) to support <code>äöå</code> etc. for regular Finnish text and Cyrillic alphabets like <code>ЦжФ</code> for special cases.</p> <p>My setup is the following:</p> <ul> <li>Development environment: Windows XP</li> <li>Production environm...
[ { "answer_id": 138950, "author": "kosoant", "author_id": 15114, "author_profile": "https://Stackoverflow.com/users/15114", "pm_score": 10, "selected": true, "text": "<Connector port=\"8080\" maxHttpHeaderSize=\"8192\"\n maxThreads=\"150\" minSpareThreads=\"25\" maxSpareThreads=\"75\"\n e...
2008/09/26
[ "https://Stackoverflow.com/questions/138948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15114/" ]
138,953
<p>When I save a file with an .htm or .html extension, which one is correct and what is different?</p>
[ { "answer_id": 138957, "author": "William Keller", "author_id": 17095, "author_profile": "https://Stackoverflow.com/users/17095", "pm_score": 7, "selected": true, "text": "htm html" }, { "answer_id": 138960, "author": "ConroyP", "author_id": 2287, "author_profile": "h...
2008/09/26
[ "https://Stackoverflow.com/questions/138953", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21067/" ]
138,981
<p>Is there any way to find out if a file is a directory?</p> <p>I have the file name in a variable. In Perl I can do this:</p> <pre><code>if(-d $var) { print "it's a directory\n" } </code></pre>
[ { "answer_id": 138995, "author": "David Webb", "author_id": 3171, "author_profile": "https://Stackoverflow.com/users/3171", "pm_score": 7, "selected": true, "text": "IF EXIST %VAR%\\NUL ECHO It's a directory\n FOR %%i IN (%VAR%) DO IF EXIST %%~si\\NUL ECHO It's a directory\n %%~si %%i FO...
2008/09/26
[ "https://Stackoverflow.com/questions/138981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11234/" ]
138,994
<p>I have a procedure with a lot of </p> <pre><code>i := i +1; </code></pre> <p>in it and I think </p> <pre><code> inc(i); </code></pre> <p>looks a lot better. Is there a performance difference or does the function call just get inlined by the compiler? I know this probably doesn't matter at all to my app, I'm ju...
[ { "answer_id": 139066, "author": "Ondrej Kelle", "author_id": 11480, "author_profile": "https://Stackoverflow.com/users/11480", "pm_score": 2, "selected": false, "text": "Inc(I);" }, { "answer_id": 139196, "author": "PatrickvL", "author_id": 12170, "author_profile": "...
2008/09/26
[ "https://Stackoverflow.com/questions/138994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9077/" ]
138,999
<p>I just started learning JSP technology, and came across a wall.</p> <p><em>How do you output HTML from a method in &lt;%! ... %> JSP declaration block?</em></p> <p>This doesn't work:</p> <pre><code>&lt;%! void someOutput() { out.println("Some Output"); } %&gt; ... &lt;% someOutput(); %&gt; </code></pre> <p>...
[ { "answer_id": 139018, "author": "Ashley Mercer", "author_id": 13065, "author_profile": "https://Stackoverflow.com/users/13065", "pm_score": 5, "selected": false, "text": "<html>\n <head/>\n <body>\n <%!\n String someOutput() {\n return \"Some outpu...
2008/09/26
[ "https://Stackoverflow.com/questions/138999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1764/" ]
139,000
<p>I hope someone might be able to help me here. I've tried to simplify my example as best I can.</p> <p>I have an absolutely positioned DIV, which for this example I've made fill the browser window. This div has the overflow:auto attribute to provide scroll bars when the content is too big for the DIV to display.</p>...
[ { "answer_id": 139091, "author": "Eran Galperin", "author_id": 10585, "author_profile": "https://Stackoverflow.com/users/10585", "pm_score": 3, "selected": false, "text": "overflow: auto;\n overflow-y:hidden;\noverflow-x:auto;\n" }, { "answer_id": 474635, "author": "Community...
2008/09/26
[ "https://Stackoverflow.com/questions/139000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
139,005
<p>Dear Stacktoverflow, can you show me an example of how to use a QScrollBar? Thanks.</p>
[ { "answer_id": 139107, "author": "Torsten Marek", "author_id": 9567, "author_profile": "https://Stackoverflow.com/users/9567", "pm_score": 2, "selected": false, "text": ">>> import sys\n>>> from PyQt4 import QtCore, QtGui\n>>> app = QtGui.QApplication(sys.argv)\n>>> sb = QtGui.QScrollBar...
2008/09/26
[ "https://Stackoverflow.com/questions/139005", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10710/" ]
139,010
<p>I need to find out the file/directory name that a .lnk is pointing to using c#.</p> <p>What is the simplest way to do this?</p> <p>Thanks.</p>
[ { "answer_id": 139032, "author": "Kev", "author_id": 419, "author_profile": "https://Stackoverflow.com/users/419", "pm_score": 4, "selected": false, "text": "IWshRuntimeLibrary.IWshShell shell = new IWshRuntimeLibrary.WshShell();\n\nIWshRuntimeLibrary.IWshShortcut shortcut = (IWshRuntime...
2008/09/26
[ "https://Stackoverflow.com/questions/139010", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
139,012
<p>Does anyone know how I can achieve the following effect in OpenGL:</p> <ul> <li>Change the brightness of the rendered scene</li> <li>Or implementing a Gamma setting in OpenGL</li> </ul> <p>I have tried by changing the ambient parameter of the light and the type of light (directional and omnidirectional) but the re...
[ { "answer_id": 139054, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": true, "text": "if( brightness > 1 )\n{\n glBlendFunc( GL_DEST_COLOR, GL_ONE );\n glColor3f( brightness-1, brightness-1, brightness-1 );\...
2008/09/26
[ "https://Stackoverflow.com/questions/139012", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18564/" ]
139,015
<p>I have a bunch of PDF files and my Perl program needs to do a full-text search of them to return which ones contain a specific string. To date I have been using this:</p> <pre><code>my @search_results = `grep -i -l \"$string\" *.pdf`; </code></pre> <p>where $string is the text to look for. However this fails for m...
[ { "answer_id": 139077, "author": "Adam Bellaire", "author_id": 21632, "author_profile": "https://Stackoverflow.com/users/21632", "pm_score": 4, "selected": true, "text": "my @search_results = `pdftotext myfile.pdf - | grep -i -l \\\"$string\\\"`;\n" }, { "answer_id": 151907, ...
2008/09/26
[ "https://Stackoverflow.com/questions/139015", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22654/" ]
139,025
<p>I'd like my application to have a full-screen mode. What is the easiest way to do this, do I need a third party library for this or is there something in the JDK that already offers this?</p>
[ { "answer_id": 139068, "author": "Ken", "author_id": 20621, "author_profile": "https://Stackoverflow.com/users/20621", "pm_score": 2, "selected": false, "text": "setUndecorated(true)" }, { "answer_id": 10064657, "author": "iptq", "author_id": 1572906, "author_profile"...
2008/09/26
[ "https://Stackoverflow.com/questions/139025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6583/" ]
139,046
<p>I need to write code that picks up PGP-encrypted files from an FTP location and processes them. The files will be encrypted with my public key (not that I have one yet). Obviously, I need a PGP library that I can use from within Microsoft Access. Can you recommend one that is easy to use? </p> <p>I'm looking for so...
[ { "answer_id": 139147, "author": "Bob Probst", "author_id": 12424, "author_profile": "https://Stackoverflow.com/users/12424", "pm_score": 2, "selected": false, "text": "\"C:\\Program Files\\Network Associates\\PGPNT\\pgp\" +FORCE %1 -z *password* \n Command = \"decrypt.bat \"\"\" & Fol...
2008/09/26
[ "https://Stackoverflow.com/questions/139046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21379/" ]
139,053
<p>I have written an assembly I don't want other people to be able to use. My assembly is signed with a strong name key file, but how do I secure the code so that only my other assemblies signed with the same key can call the members in this assembly?</p>
[ { "answer_id": 139087, "author": "Richard", "author_id": 20038, "author_profile": "https://Stackoverflow.com/users/20038", "pm_score": 2, "selected": false, "text": "[assembly:StrongNameIdentityPermissionAttribute(SecurityAction.RequestMinimum, \n PublicKey=\"0024000004800000940000000602...
2008/09/26
[ "https://Stackoverflow.com/questions/139053", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3139/" ]
139,055
<p>I'm using Subversive plugin in Ganymede, but after today's update it stopped working - it just doesn't see any valid svn connectors (I've already been using 1.2.0 dev version of SVNKit, instead of a stable one, because Subversive / Ganymede could not handle it; now it can't handle even the dev one). Any ideas how to...
[ { "answer_id": 143379, "author": "rjray", "author_id": 6421, "author_profile": "https://Stackoverflow.com/users/6421", "pm_score": 4, "selected": true, "text": "http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/\n http://www.polarion.org/projects/subversive/dow...
2008/09/26
[ "https://Stackoverflow.com/questions/139055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4688/" ]
139,076
<p>I have a Java String that contains XML, with no line feeds or indentations. I would like to turn it into a String with nicely formatted XML. How do I do this?</p> <pre><code>String unformattedXml = "&lt;tag&gt;&lt;nested&gt;hello&lt;/nested&gt;&lt;/tag&gt;"; String formattedXml = new [UnknownClass]().format(unforma...
[ { "answer_id": 139096, "author": "Lorenzo Boccaccia", "author_id": 2273540, "author_profile": "https://Stackoverflow.com/users/2273540", "pm_score": 8, "selected": false, "text": "Transformer transformer = TransformerFactory.newInstance().newTransformer();\ntransformer.setOutputProperty(...
2008/09/26
[ "https://Stackoverflow.com/questions/139076", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2959/" ]
139,088
<p>when i use setDefaultLookAndFeelDecorated(true) method in Java why is the Frame appear FullScreen when i maximize the Frame ? and how can i disaple the FullScreen mode in this method ?</p>
[ { "answer_id": 144142, "author": "Angelo van der Sijpt", "author_id": 19144, "author_profile": "https://Stackoverflow.com/users/19144", "pm_score": 3, "selected": true, "text": "setDefaultLookAndFeelDecorated UIManager.setLookAndFeel((LookAndFeel) Class.forName(UIManager.getCrossPlatform...
2008/09/26
[ "https://Stackoverflow.com/questions/139088", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22634/" ]
139,115
<p>Here is the scenario:</p> <p>I have a winforms application using NHibernate. When launched, I populate a DataGridView with the results of a NHibernate query. This part works fine. If I update a record in that list and flush the session, the update takes in the database. Upon closing the form after the update, I...
[ { "answer_id": 191800, "author": "Watson", "author_id": 25807, "author_profile": "https://Stackoverflow.com/users/25807", "pm_score": 2, "selected": false, "text": "Session.Update(obj);\nSession.Evict(obj);\n" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/139115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1117/" ]
139,118
<p>Does anyone know how to get the HTML out of an IFRAME I have tried several different ways:</p> <pre><code>document.getElementById('iframe01').contentDocument.body.innerHTML document.frames['iframe01'].document.body.innerHTML document.getElementById('iframe01').contentWindow.document.body.innerHTML </code></pre> <p...
[ { "answer_id": 139132, "author": "ConroyP", "author_id": 2287, "author_profile": "https://Stackoverflow.com/users/2287", "pm_score": 3, "selected": false, "text": "<iframe id=\"my_iframe\" ...></iframe>\n\n$('#my_iframe').contents().find('html').html();\n" }, { "answer_id": 13915...
2008/09/26
[ "https://Stackoverflow.com/questions/139118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
139,131
<p>i have a number of jsp files under web-inf folder. Inside my web.xml i specify an errorppage for 404 amd 403 and java.lang.exception. Do i need to include a page directive for each of my jsp's or will they automatically get forwarded to the exception handling page because they are under web-inf?</p> <p>If this is t...
[ { "answer_id": 139174, "author": "Steve g", "author_id": 12092, "author_profile": "https://Stackoverflow.com/users/12092", "pm_score": 2, "selected": true, "text": "<error-page> \n <error-code>404</error-code> \n <location>/404Error.jsp</location> \n</error-page>\n<error-page> \n <...
2008/09/26
[ "https://Stackoverflow.com/questions/139131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
139,142
<p>In an ASP.NET web application with a lot of HTML pages, a lot of inline JavaScript functions are accumulating. What is a good plan for organizing them into external files? Most of the functions are particular to the page for which they are written, but a few are relevant to the entire application.</p> <p>A single...
[ { "answer_id": 140662, "author": "Jason Bunting", "author_id": 1790, "author_profile": "https://Stackoverflow.com/users/1790", "pm_score": 2, "selected": false, "text": "protected override void OnLoad(EventArgs e)\n{\n base.OnLoad(e);\n string possiblePageSpecificJavaScriptFile = str...
2008/09/26
[ "https://Stackoverflow.com/questions/139142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
139,157
<p>I am building a menu in HTML/CSS/JS and I need a way to prevent the text in the menu from being highlighted when double-clicked on. I need a way to pass the id's of several divs into a function and have highlighting turned off within them. </p> <p>So when the user accidentally (or on purpose) double clicks on the m...
[ { "answer_id": 139195, "author": "Vijesh VP", "author_id": 22016, "author_profile": "https://Stackoverflow.com/users/22016", "pm_score": 0, "selected": false, "text": "<script type=\"text/javascript\">\n function clearSelection() {\n var sel;\n if (document.selection && document.s...
2008/09/26
[ "https://Stackoverflow.com/questions/139157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315650/" ]
139,180
<p>I have a Python module installed on my system and I'd like to be able to see what functions/classes/methods are available in it.</p> <p>I want to call the <code>help</code> function on each one. In Ruby I can do something like <code>ClassName.methods</code> to get a list of all the methods available on that class. I...
[ { "answer_id": 139193, "author": "camflan", "author_id": 22445, "author_profile": "https://Stackoverflow.com/users/22445", "pm_score": 9, "selected": false, "text": "dir(module)" }, { "answer_id": 139198, "author": "Thomas Wouters", "author_id": 17624, "author_profile...
2008/09/26
[ "https://Stackoverflow.com/questions/139180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6527/" ]
139,199
<p>I realize that parameterized SQL queries is the optimal way to sanitize user input when building queries that contain user input, but I'm wondering what is wrong with taking user input and escaping any single quotes and surrounding the whole string with single quotes. Here's the code:</p> <pre><code>sSanitizedInput...
[ { "answer_id": 376674, "author": "AviD", "author_id": 10080, "author_profile": "https://Stackoverflow.com/users/10080", "pm_score": 5, "selected": false, "text": "username = left(Replace(sInput, \"'\", \"''\"), 20)\n sSQL = \"select * from USERS where username = '\" + username + \"' and...
2008/09/26
[ "https://Stackoverflow.com/questions/139199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22392/" ]
139,207
<p>So many different controls to choose from! What are best practices for determining which control to use for displaying data in ASP.NET?</p>
[ { "answer_id": 19445450, "author": "Iman", "author_id": 184572, "author_profile": "https://Stackoverflow.com/users/184572", "pm_score": 4, "selected": false, "text": "<asp:ListView runat=\"server\" OnItemCommand=\"Unnamed1_ItemCommand\">\n<ItemTemplate> <%# Eval(\"Name\")%> </ItemTemp...
2008/09/26
[ "https://Stackoverflow.com/questions/139207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1768/" ]
139,209
<p>Or do you populate your form controls manually by a method?</p> <p>Is either considered a best practice?</p>
[ { "answer_id": 19445450, "author": "Iman", "author_id": 184572, "author_profile": "https://Stackoverflow.com/users/184572", "pm_score": 4, "selected": false, "text": "<asp:ListView runat=\"server\" OnItemCommand=\"Unnamed1_ItemCommand\">\n<ItemTemplate> <%# Eval(\"Name\")%> </ItemTemp...
2008/09/26
[ "https://Stackoverflow.com/questions/139209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16419/" ]
139,212
<p>I've added cookie support to SOAPpy by overriding HTTPTransport. I need functionality beyond that of SOAPpy, so I was planning on moving to ZSI, but I can't figure out how to put the Cookies on the ZSI posts made to the service. Without these cookies, the server will think it is an unauthorized request and it will...
[ { "answer_id": 145610, "author": "Florian Bösch", "author_id": 19435, "author_profile": "https://Stackoverflow.com/users/19435", "pm_score": 2, "selected": true, "text": "b = Binding(url='/cgi-bin/simple-test', tracefile=fp)\nb.cookies['foo'] = 'bar'\n" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/139212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17583/" ]
139,214
<p>The most egregiously redundant code construct I often see involves using the code sequence</p> <pre><code>if (condition) return true; else return false; </code></pre> <p>instead of simply writing</p> <pre><code>return (condition); </code></pre> <p>I've seen this beginner error in all sorts of languages: ...
[ { "answer_id": 139231, "author": "WW.", "author_id": 14663, "author_profile": "https://Stackoverflow.com/users/14663", "pm_score": 2, "selected": false, "text": " // stuff\n return;\n}\n" }, { "answer_id": 139249, "author": "Otherside", "author_id": 18697, "author...
2008/09/26
[ "https://Stackoverflow.com/questions/139214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20520/" ]
139,228
<p>One of our developers is continually writing code and putting it into version control without testing it. The quality of our code is suffering as a result.</p> <p>Besides getting rid of the developer, how can I solve this problem?</p> <p>EDIT</p> <p>I have talked to him about it number of times and even given hi...
[ { "answer_id": 139412, "author": "Rafał Dowgird", "author_id": 12166, "author_profile": "https://Stackoverflow.com/users/12166", "pm_score": 3, "selected": false, "text": "Intro\n What shall we do with a drunken sailor, (3×)\n Early in the morning?\nChorus\n Wey–hey and up she rise...
2008/09/26
[ "https://Stackoverflow.com/questions/139228", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17560/" ]
139,245
<p>How to get the relative path in t sql? Take for example a <code>.sql</code> file is located in the folder <code>D:\temp</code>, I want to get path of the file hello.txt in the folder <code>D:\temp\App_Data</code>. How to use the relative path reference?</p> <p>Let's say I am executing the sql file inside the SQL se...
[ { "answer_id": 169730, "author": "GilM", "author_id": 10192, "author_profile": "https://Stackoverflow.com/users/10192", "pm_score": 4, "selected": true, "text": "DECLARE @RelDir varchar(1000)\nSET @RelDir = 'D:\\temp\\'\n...\n" }, { "answer_id": 15553094, "author": "Kelly Dav...
2008/09/26
[ "https://Stackoverflow.com/questions/139245", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3834/" ]
139,260
<p>I'm having a problem writing Norwegian characters into an XML file using C#. I have a string variable containing some Norwegian text (with letters like æøå). </p> <p>I'm writing the XML using an XmlTextWriter, writing the contents to a MemoryStream like this:</p> <pre><code>MemoryStream stream = new MemoryStream()...
[ { "answer_id": 139612, "author": "Thomas Danecker", "author_id": 9632, "author_profile": "https://Stackoverflow.com/users/9632", "pm_score": 3, "selected": false, "text": " Encoding encoding = Encoding.GetEncoding(\"ISO-8859-1\");\n\n FileStream myFile = new FileStream(myPath, File...
2008/09/26
[ "https://Stackoverflow.com/questions/139260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5795/" ]
139,261
<p>For testing purposes I have to generate a file of a certain size (to test an upload limit). </p> <p>What is a command to create a file of a certain size on Linux?</p>
[ { "answer_id": 139278, "author": "Grundlefleck", "author_id": 4120, "author_profile": "https://Stackoverflow.com/users/4120", "pm_score": 5, "selected": false, "text": "$INPUT-FILE=/dev/zero $BLOCK-SIZE * $NUM-BLOCKS $OUTPUT-FILE" }, { "answer_id": 139282, "author": "Paul Tom...
2008/09/26
[ "https://Stackoverflow.com/questions/139261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4120/" ]
139,266
<p>When creating an auto updating feature for a .NET WinForms application, how does it update the DLLs and not affect the currently running application?</p> <p>Since the application is running during the update process, won't there be a lock on the DLLs (because those DLLs will have to be overwritten during the update...
[ { "answer_id": 67638945, "author": "Lev", "author_id": 3087417, "author_profile": "https://Stackoverflow.com/users/3087417", "pm_score": 0, "selected": false, "text": "ProgramFiles\\WindowsApps" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/139266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
139,288
<p>what is an efficient way to get a certain time for the next day in Java? Let's say I want the long for tomorrow 03:30:00. Setting Calendar fields and Date formatting are obvious. Better or smarter ideas, thanks for sharing them!</p> <p>Okami</p>
[ { "answer_id": 139319, "author": "Brandon DuRette", "author_id": 17834, "author_profile": "https://Stackoverflow.com/users/17834", "pm_score": 2, "selected": false, "text": "Date java.util.Date" }, { "answer_id": 139349, "author": "Paul Tomblin", "author_id": 3333, "a...
2008/09/26
[ "https://Stackoverflow.com/questions/139288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11450/" ]
139,315
<p>I'd like to run a script that builds the documentation for my php project. It is basically just using wget to run phpdoc.</p>
[ { "answer_id": 139330, "author": "RobbieGee", "author_id": 6752, "author_profile": "https://Stackoverflow.com/users/6752", "pm_score": 4, "selected": false, "text": "SET BUILDLOG=%~dp0%build_log.html\nrem %~dp0 returns the full working path *of this script*\nSET PHPDOCURL=http://localhos...
2008/09/26
[ "https://Stackoverflow.com/questions/139315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6752/" ]
139,325
<p>How to set all the values in a <code>std::map</code> to the same value, without using a loop iterating over each value? </p>
[ { "answer_id": 139377, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 5, "selected": true, "text": "for (auto& [_, v] : mymap) v = value;\n std::fill std::fill template <typename M>\nstruct value_iter : std::iterator<s...
2008/09/26
[ "https://Stackoverflow.com/questions/139325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6841/" ]
139,358
<p>In a user defined wizard page, is there a way to capture change or focus events of the controls? I want to provide an immediate feedback on user input in some dropdowns (e.g. a message box)</p>
[ { "answer_id": 139404, "author": "Otherside", "author_id": 18697, "author_profile": "https://Stackoverflow.com/users/18697", "pm_score": 2, "selected": false, "text": "OnEnter OnExit procedure ComboBoxExit(Sender: TObject);\nbegin\n\nend;\n" }, { "answer_id": 157659, "author"...
2008/09/26
[ "https://Stackoverflow.com/questions/139358", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22114/" ]
139,365
<p>I've begun to use TDD. As mentioned in <a href="https://stackoverflow.com/questions/64333/what-is-the-downside-to-test-driven-development#64402">an earlier question</a> the biggest difficulty is handling interface changes. How do you reduce the impact on your test cases as requirements change?</p>
[ { "answer_id": 139888, "author": "spiv", "author_id": 22701, "author_profile": "https://Stackoverflow.com/users/22701", "pm_score": 4, "selected": true, "text": "def test_add_item_to_order(self):\n acct = Account('Joe', 'Bloggs')\n shipping_addr = Address('123 Elm St', 'etc' 'etc')...
2008/09/26
[ "https://Stackoverflow.com/questions/139365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16496/" ]
139,368
<p>I mean, how does Java decide which protocols are available? I run some code from inside Eclipse, and it works just fine. Then I run the same code from outside Eclipse, and I get "unknown protocol" MalformedURLException. Probably it has to do with the code base, or something? Any hints would be helpful.</p> <p>Thank...
[ { "answer_id": 139392, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 2, "selected": true, "text": "URLStreamHandler URL.handlers URLStreamHandlerFactory URL.factory" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/139368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11384/" ]
139,373
<p>For an embedded system I need to place a few data structures at fixed addresses, so that a separate control CPU can access them at a known location. I'm using linker scripts for the embedded target to accomplish this, plus #defines of those same addresses for the control CPU.</p> <p>It bothers me that these address...
[ { "answer_id": 8413428, "author": "Olof Forshell", "author_id": 501673, "author_profile": "https://Stackoverflow.com/users/501673", "pm_score": 0, "selected": false, "text": "static struct SOMESTRUCT somestruct @ 0x40000000;\nextern int someextint @ 0x3ffffffc;\nchar somebuffer[77] @ 0x8...
2008/09/26
[ "https://Stackoverflow.com/questions/139373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4761/" ]
139,384
<p>I need to calculate averages, standard deviations, medians etc for a bunch of numerical data. Is there a good open source .NET library I can use? I have found NMath but it is not free and may be overkill for my needs.</p>
[ { "answer_id": 161479, "author": "Mark Heath", "author_id": 7532, "author_profile": "https://Stackoverflow.com/users/7532", "pm_score": 2, "selected": false, "text": "/// <summary>\n/// Very basic statistical analysis routines\n/// </summary>\npublic class Statistics\n{\n List<double>...
2008/09/26
[ "https://Stackoverflow.com/questions/139384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7532/" ]
139,387
<p>OK, I'm not looking for anti-patterns - I'm looking for things that aren't really patterns, or perhaps patterns that have been abused.</p> <p>My personal least favourite is the "Helper" pattern.</p> <p>E.g. I need to create a SQL query, so call SQLQueryHelper. This needs to process some strings, so it in turn call...
[ { "answer_id": 139488, "author": "Matt Howells", "author_id": 16881, "author_profile": "https://Stackoverflow.com/users/16881", "pm_score": 4, "selected": false, "text": "DataManager\nBusinessLogicManager\nWidgetManager\n" }, { "answer_id": 672783, "author": "Jonas Kölker", ...
2008/09/26
[ "https://Stackoverflow.com/questions/139387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17641/" ]
139,427
<p>Should I stick with Sun's Java code conventions for PHP code?</p>
[ { "answer_id": 12336618, "author": "Justin", "author_id": 44026, "author_profile": "https://Stackoverflow.com/users/44026", "pm_score": 6, "selected": false, "text": "LoggerInterface" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/139427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4235/" ]
139,474
<p>I'd like to capture the output of <a href="http://us3.php.net/manual/en/function.var-dump.php" rel="noreferrer"><code>var_dump</code></a> to a string.</p> <p>The PHP documentation says;</p> <blockquote> <p>As with anything that outputs its result directly to the browser, the <a href="http://us3.php.net/manual/en...
[ { "answer_id": 139491, "author": "Eran Galperin", "author_id": 10585, "author_profile": "https://Stackoverflow.com/users/10585", "pm_score": 10, "selected": true, "text": "<?php\nob_start();\nvar_dump($someVar);\n$result = ob_get_clean();\n?>\n" }, { "answer_id": 139498, "aut...
2008/09/26
[ "https://Stackoverflow.com/questions/139474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/305/" ]
139,479
<p>How universally is the C99 standard supported in today's compilers? I understand that not even GCC fully supports it. Is this right?</p> <p>Which features of C99 are supported more than others, i.e. which can I use to be quite sure that most compilers will understand me?</p>
[ { "answer_id": 141497, "author": "Michael Burr", "author_id": 12711, "author_profile": "https://Stackoverflow.com/users/12711", "pm_score": 4, "selected": false, "text": "stdint.h snprintf() _snprintf() stdint.h snprintf() _Pragma()" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/139479", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8206/" ]
139,482
<p>Pretty sure this question counts as blasphemy to most web 2.0 proponents, but I do think there are times when you could possibly <em>not</em> want pieces of your site being easily ripped off into someone else's arbitrary web aggregator. At least enough so they'd need to be arsed to do it by hand if they really want...
[ { "answer_id": 139549, "author": "Mark Nold", "author_id": 4134, "author_profile": "https://Stackoverflow.com/users/4134", "pm_score": 3, "selected": true, "text": "ps10825('4VUknMERbnt0OAP3klgpmjs....abd26')" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/139482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19825/" ]
139,484
<p>I have two (UNIX) programs A and B that read and write from stdin/stdout.</p> <p>My first problem is how to connect the stdout of A to stdin of B <em>and</em> the stdout of B to the stdin of A. I.e., something like A | B but a bidirectional pipe. I suspect I could solve this by <a href="http://tldp.org/LDP/abs/html...
[ { "answer_id": 139518, "author": "Aaron Maenpaa", "author_id": 2603, "author_profile": "https://Stackoverflow.com/users/2603", "pm_score": 3, "selected": false, "text": "mkfifo pipe\ngawk '$1' < pipe | gawk '$1' > pipe\n" }, { "answer_id": 139532, "author": "sherbang", "a...
2008/09/26
[ "https://Stackoverflow.com/questions/139484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22676/" ]
139,525
<p>I have an Xtext/Xpand (oAW 4.3, Eclipse 3.4) generator plug-in, which I run together with the editor plug-in in a second workbench. There, I'd like to run Xpand workflows programmatically on the model file I create. If I set the model file using the absolute path of the IFile I have, e.g. with:</p> <pre><code>Strin...
[ { "answer_id": 192038, "author": "Fabian Steeg", "author_id": 18154, "author_profile": "https://Stackoverflow.com/users/18154", "pm_score": 1, "selected": true, "text": "properties.put(\"modelFile\", file.getLocation().makeAbsolute().toOSString());\n <component class=\"org.eclipse.mwe.em...
2008/09/26
[ "https://Stackoverflow.com/questions/139525", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18154/" ]
139,534
<p>I've just solved another *I-though-I-was-using-this-version-of-a-library-but-apparently-my-app-server-has-already-loaded-an-older-version-of-this-library-*issue (sigh).</p> <p>Does anybody know a good way to verify (or monitor) whether your application has access to all the appropriate jar-files, or loaded class-ve...
[ { "answer_id": 141969, "author": "Tom", "author_id": 22850, "author_profile": "https://Stackoverflow.com/users/22850", "pm_score": 5, "selected": true, "text": "java -verbose:class" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/139534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9707/" ]
139,580
<p>I'm working on some code for a loosely coupled cluster. To achieve optimal performance during jobs, I have the cluster remap its data each time a child enters or exits. This will eventually be made optional, but for now it performs its data balancing by default. My balancing is basically just making sure that each c...
[ { "answer_id": 139827, "author": "Ralph M. Rickenbach", "author_id": 4549416, "author_profile": "https://Stackoverflow.com/users/4549416", "pm_score": 3, "selected": true, "text": "for each child in list {\n if child2 == nil then assert(\"Error in logic\");\n while child.workload > avg...
2008/09/26
[ "https://Stackoverflow.com/questions/139580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8945/" ]
139,592
<p>I've got a generic dictionary <code>Dictionary&lt;string, T&gt;</code> that I would like to essentially make a Clone() of ..any suggestions. </p>
[ { "answer_id": 139626, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 8, "selected": false, "text": "var newDictionary = oldDictionary.ToDictionary(entry => entry.Key,\n entry...
2008/09/26
[ "https://Stackoverflow.com/questions/139592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4398/" ]
139,593
<p>I have the following code:</p> <pre><code>info = new System.Diagnostics.ProcessStartInfo(&quot;TheProgram.exe&quot;, String.Join(&quot; &quot;, args)); info.CreateNoWindow = true; info.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; info.RedirectStandardOutput = true; info.UseShellExecute = false; System...
[ { "answer_id": 139604, "author": "Rob", "author_id": 7872, "author_profile": "https://Stackoverflow.com/users/7872", "pm_score": 7, "selected": false, "text": "Process.StandardOutput // Start the child process.\n Process p = new Process();\n // Redirect the output stream of the child pr...
2008/09/26
[ "https://Stackoverflow.com/questions/139593", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6583/" ]
139,605
<p>How can I find out whether a specific RedHat release (RHEL4, RHEL5...) contains a certain package (or a certain version of a package)? For Debian and Ubuntu, there's packages.debian.org and packages.ubuntu.com; is there a similar web site for RedHat?</p> <p>Note: I don't want to have to install all the releases jus...
[ { "answer_id": 4140439, "author": "MarcH", "author_id": 317623, "author_profile": "https://Stackoverflow.com/users/317623", "pm_score": 0, "selected": false, "text": "rsync:// ftp://" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/139605", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2148773/" ]
139,607
<p>I've seen both done in some code I'm maintaining, but don't know the difference. Is there one?</p> <p>let me add that myCustomer is an instance of Customer</p>
[ { "answer_id": 139611, "author": "Kilhoffer", "author_id": 5469, "author_profile": "https://Stackoverflow.com/users/5469", "pm_score": 8, "selected": true, "text": "System.Type GetType System.Type typeof GetType typeof" }, { "answer_id": 139615, "author": "Jakub Šturc", "...
2008/09/26
[ "https://Stackoverflow.com/questions/139607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18931/" ]
139,623
<p>How do I cause the page to make the user jump to a new web page after X seconds. If possible I'd like to use HTML but a niggly feeling tells me it'll have to be Javascript.</p> <p>So far I have the following but it has no time delay</p> <pre><code>&lt;body onload="document.location='newPage.html'"&gt; </code></pre...
[ { "answer_id": 139660, "author": "slashnick", "author_id": 21030, "author_profile": "https://Stackoverflow.com/users/21030", "pm_score": 5, "selected": true, "text": "<meta http-equiv=\"refresh\" content=\"5;url=http://example.com/\"/>\n" }, { "answer_id": 139661, "author": "...
2008/09/26
[ "https://Stackoverflow.com/questions/139623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384652/" ]
139,630
<p>What's the difference between <code>TRUNCATE</code> and <code>DELETE</code> in SQL?</p> <p>If your answer is platform specific, please indicate that.</p>
[ { "answer_id": 139633, "author": "David Aldridge", "author_id": 6742, "author_profile": "https://Stackoverflow.com/users/6742", "pm_score": 9, "selected": true, "text": "DELETE DELETE FROM employees_temp\nWHERE employee_id = 299 \nRETURNING first_name,\n last_name\nINT...
2008/09/26
[ "https://Stackoverflow.com/questions/139630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6742/" ]
139,639
<p>I am working with Reporting Services and Sharepoint, I have an application that leverages reporting services however a client would like our application integrated into sharepoint. Currently we are tightly coupled to the ReportService.asmx webservice which exposes various methods for performing operations. Reporting...
[ { "answer_id": 139633, "author": "David Aldridge", "author_id": 6742, "author_profile": "https://Stackoverflow.com/users/6742", "pm_score": 9, "selected": true, "text": "DELETE DELETE FROM employees_temp\nWHERE employee_id = 299 \nRETURNING first_name,\n last_name\nINT...
2008/09/26
[ "https://Stackoverflow.com/questions/139639", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4950/" ]
139,650
<p>I have normally hand written xml like this:</p> <pre><code>&lt;tag&gt;&lt;?= $value ?&gt;&lt;/tag&gt; </code></pre> <p>Having found tools such as simpleXML, should I be using those instead? What's the advantage of doing it using a tool like that?</p>
[ { "answer_id": 139855, "author": "hakamadare", "author_id": 17597, "author_profile": "https://Stackoverflow.com/users/17597", "pm_score": 2, "selected": false, "text": "XML::Simple" }, { "answer_id": 140203, "author": "Stefan Gehrig", "author_id": 11354, "author_profi...
2008/09/26
[ "https://Stackoverflow.com/questions/139650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16511/" ]
139,655
<p>I have a need to convert Pixels to Points in C#. I've seen some complicated explanations about the topic, but can't seem to locate a simple formula. Let's assume a standard 96dpi, how do I calulate this conversion?</p>
[ { "answer_id": 139712, "author": "Mark Ransom", "author_id": 5987, "author_profile": "https://Stackoverflow.com/users/5987", "pm_score": 9, "selected": true, "text": "GetDeviceCaps px" }, { "answer_id": 1079075, "author": "Hejazi", "author_id": 73195, "author_profile"...
2008/09/26
[ "https://Stackoverflow.com/questions/139655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13603/" ]
139,668
<p>Under what circumstances will the Win32 API function OleGetClipboard() fail and return <code>CLIPBRD_E_CANT_OPEN</code>?</p> <p>More background: I am assisting with a Firefox bug fix. Details here:</p> <p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=444800#c19" rel="nofollow noreferrer" title="cannot re...
[ { "answer_id": 140387, "author": "Mike Dimmick", "author_id": 6970, "author_profile": "https://Stackoverflow.com/users/6970", "pm_score": 4, "selected": true, "text": "OleGetClipboard OpenClipboard" } ]
2008/09/26
[ "https://Stackoverflow.com/questions/139668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]