qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
186,494
<p>I've seen second one in another's code and I suppose this length comparison have been done to increase code productivity. It was used in a parser for a script language with a specific dictionary: words are 4 to 24 letters long with the average of 7-8 lettets, alphabet includes 26 latin letters plus "@","$" and "_". ...
[ { "answer_id": 200831, "author": "MSalters", "author_id": 15416, "author_profile": "https://Stackoverflow.com/users/15416", "pm_score": 0, "selected": false, "text": "Lhs[0] Rhs[0]" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/186494", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25459/" ]
186,496
<p>Lets assume my classes are loaded from a compressed .war file or loaded elsewhere, how can I discover all the resources in a given package? Enumerating files will not really work, since this is a war file. Most likely this will involve using the current classloader?</p> <p>Is there a library out there that does ...
[ { "answer_id": 3232402, "author": "DerHeiligste", "author_id": 168819, "author_profile": "https://Stackoverflow.com/users/168819", "pm_score": 3, "selected": false, "text": "PathMatchingResourcePatternResolver" }, { "answer_id": 12014366, "author": "jcfolsom", "author_id"...
2008/10/09
[ "https://Stackoverflow.com/questions/186496", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16542/" ]
186,502
<p>Is it possible to receive DllMain like notifications about thread attach/detach in stand-alone exe without using any extra dlls?</p> <p><strong>Edit:</strong> This is just a theoretical question that has to do with some testing I'm doing. not a real life situation.</p>
[ { "answer_id": 188123, "author": "Michael Burr", "author_id": 12711, "author_profile": "https://Stackoverflow.com/users/12711", "pm_score": 1, "selected": false, "text": "WaitForDebugEvent() CreateProcess() DEBUG_ONLY_THIS_PROCESS WaitForDebugEvent()" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/186502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9611/" ]
186,507
<p>I was looking for a pattern to model something I'm thinking of doing in a personal project and I was wondering if a modified version of the decorator patter would work.</p> <p>Basicly I'm thinking of creating a game where the characters attributes are modified by what items they have equiped. The way that the decor...
[ { "answer_id": 186861, "author": "Tom", "author_id": 20, "author_profile": "https://Stackoverflow.com/users/20", "pm_score": 2, "selected": false, "text": "Character.unequip(LIGHTSABER);\n" }, { "answer_id": 194033, "author": "Sandman", "author_id": 19911, "author_pro...
2008/10/09
[ "https://Stackoverflow.com/questions/186507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20400/" ]
186,520
<p>From one apache server file_get_contents returns the contents of a url straight away. On another apache server file_get contents won't return the contents of the same url until the keep-alive limit of the server hosting that url has been expired. The 2 php servers are retrieving the same url but through different ...
[ { "answer_id": 186552, "author": "Oli", "author_id": 12870, "author_profile": "https://Stackoverflow.com/users/12870", "pm_score": 3, "selected": true, "text": "fopen file_get_contents fopen" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/186520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9831/" ]
186,523
<p>Which other restrictions are there on names (beside the obvious uniqueness within a scope)?</p> <p>Where are those defined?</p>
[ { "answer_id": 186540, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 4, "selected": false, "text": "int @int = 5; __ __foo" }, { "answer_id": 8794978, "author": "qwertium", "author_id": 1139177, "auth...
2008/10/09
[ "https://Stackoverflow.com/questions/186523", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4918/" ]
186,527
<p>I have some problems on a site with the concurrent access to a list. This list keeps a cart of items, and multiple deletes are crashing the site. <strong>Which is the best method to sync them?</strong> Is a lock enough? The lock option seems to be ugly because the code is spread all over the place and is pretty mes...
[ { "answer_id": 186885, "author": "martin", "author_id": 8421, "author_profile": "https://Stackoverflow.com/users/8421", "pm_score": 2, "selected": false, "text": "lock (myList.SyncRoot) \n{\n // Access the collection.\n}\n" }, { "answer_id": 9375328, "author": "The Dag", ...
2008/10/09
[ "https://Stackoverflow.com/questions/186527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2099426/" ]
186,544
<p>I need a function which executes an INSERT statement on a database and returns the Auto_Increment primary key. I have the following C# code but, while the INSERT statement works fine (I can see the record in the database, the PK is generated correctly and rows == 1), the id value is always 0. Any ideas on what might...
[ { "answer_id": 186564, "author": "Rob", "author_id": 7872, "author_profile": "https://Stackoverflow.com/users/7872", "pm_score": -1, "selected": false, "text": "public int ExecuteInsertStatement(string statement)\n{\n InitializeAndOpenConnection();\n\n IDbCommand cmdInsert = connec...
2008/10/09
[ "https://Stackoverflow.com/questions/186544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23826/" ]
186,548
<p>I am using IIS6, I've written an HttpModule, and I get this error? After googling the web I find that this problem is caused by the .NET framework 3.5, so I put this on a machine where I didn't install .NET 3.5, but the problem is still there!</p>
[ { "answer_id": 186610, "author": "mdb", "author_id": 8562, "author_profile": "https://Stackoverflow.com/users/8562", "pm_score": 5, "selected": false, "text": "Response.Headers(\"X-Foo\") = \"bar\"\n Response.AddHeader(\"X-Foo\", \"bar\")\n" }, { "answer_id": 2852833, "author...
2008/10/09
[ "https://Stackoverflow.com/questions/186548", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20142/" ]
186,553
<p>There is the button control in silverlight application . Can I send a mouse click event to it programmatically?</p>
[ { "answer_id": 186618, "author": "Oli", "author_id": 12870, "author_profile": "https://Stackoverflow.com/users/12870", "pm_score": -1, "selected": false, "text": ".Click(Object o, EventArgs e)" }, { "answer_id": 2038555, "author": "Damián Ulises Cedillo", "author_id": 247...
2008/10/09
[ "https://Stackoverflow.com/questions/186553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
186,556
<p>Say you have 100 directories and for each directory you have a file named .pdf stored somewhere else. If you want to move/copy each file into the directory with the same name, can this be done on the Windows command line?</p>
[ { "answer_id": 186592, "author": "Franci Penov", "author_id": 17028, "author_profile": "https://Stackoverflow.com/users/17028", "pm_score": 2, "selected": false, "text": "for /f %%f in ('dir /s /b c:\\source\\*.pdf') do copy \"%%f\" c:\\target\n for /f %%f in (files.txt) do copy \"%%f\" ...
2008/10/09
[ "https://Stackoverflow.com/questions/186556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13220/" ]
186,569
<p>Will users who do not have admin rights on their computers be able to upgrade to new Flash player version by themselves?</p> <p>This would be interesting to know for: Windows 98 Windows XP/2000/Vista Macs Unix/Linux</p>
[ { "answer_id": 186595, "author": "Oli", "author_id": 12870, "author_profile": "https://Stackoverflow.com/users/12870", "pm_score": 4, "selected": true, "text": "~/.mozilla/plugins .tar.gz" }, { "answer_id": 186668, "author": "Mecki", "author_id": 15809, "author_profil...
2008/10/09
[ "https://Stackoverflow.com/questions/186569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
186,572
<p>Using SQL Server - which is the fastest or best practice method to use for date retrieval? Is there a difference?</p>
[ { "answer_id": 186578, "author": "ila", "author_id": 1178, "author_profile": "https://Stackoverflow.com/users/1178", "pm_score": 3, "selected": false, "text": "CURRENT_TIMESTAMP GETDATE()" }, { "answer_id": 186582, "author": "Cowan", "author_id": 17041, "author_profil...
2008/10/09
[ "https://Stackoverflow.com/questions/186572", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5055/" ]
186,588
<p>When you limit the number of rows to be returned by a SQL query, usually used in paging, there are two methods to determine the total number of records:</p> <h3>Method 1</h3> <p>Include the <code>SQL_CALC_FOUND_ROWS</code> option in the original <code>SELECT</code>, and then get the total number of rows by running...
[ { "answer_id": 188682, "author": "nathan", "author_id": 16430, "author_profile": "https://Stackoverflow.com/users/16430", "pm_score": 8, "selected": true, "text": "SQL_CALC_FOUND_ROWS SQL_CALC_FOUND_ROWS SQL_CALC_FOUND_ROWS" }, { "answer_id": 25124430, "author": "Pierre-Olivi...
2008/10/09
[ "https://Stackoverflow.com/questions/186588", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6681/" ]
186,606
<p>Can i override fetchall method in a model? I need to check sth everytime fetchAll is called. The model extends Zend_db_table_abstract</p>
[ { "answer_id": 198102, "author": "Kieran Hall", "author_id": 6085, "author_profile": "https://Stackoverflow.com/users/6085", "pm_score": 3, "selected": false, "text": "<?php\nabstract class My_Db_Table_Abstract extends Zend_Db_Table_Abstract\n{\n ...\n\n public function fetchAll($w...
2008/10/09
[ "https://Stackoverflow.com/questions/186606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24789/" ]
186,622
<ol> <li>How precise is the VB6 <code>Date</code> data type (by way of fractions of a second)?</li> <li>How to format it to show fractions of a second?</li> </ol> <p>I'm revisiting VB6 after many years absence, and for the life of me can't remember the things I used to know. I considered putting a <a href="/questions/...
[ { "answer_id": 187052, "author": "onedaywhen", "author_id": 15354, "author_profile": "https://Stackoverflow.com/users/15354", "pm_score": 3, "selected": false, "text": "Date Double Double Double Date Now DateSerial DateDiff DateAdd Double StdDataFormat" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/186622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18797/" ]
186,631
<p>I have a WCF service and I want to expose it as both a RESTfull service and as a SOAP service. Anyone has done something like this before?</p>
[ { "answer_id": 186695, "author": "Ray Lu", "author_id": 11413, "author_profile": "https://Stackoverflow.com/users/11413", "pm_score": 10, "selected": true, "text": "<endpointBehaviors>\n <behavior name=\"jsonBehavior\">\n <enableWebScript/>\n </behavior>\n</endpointBehaviors>\n <ser...
2008/10/09
[ "https://Stackoverflow.com/questions/186631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15314/" ]
186,633
<p>I am actually loading a page as a modal dialog box as window.showModalDialog("url.aspx"). The first time the modal dialog is poped up the page load event gets called. When i close it and call the same again, the Control does not come to the PageLoad. Instead the page pops up with the previous values in all its contr...
[ { "answer_id": 618237, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "InPage <%@ OutputCache Location=\"None\" %>\n" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/186633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20951/" ]
186,634
<p>I've got the following example running in a simple Silverlight page:</p> <pre><code>public Page() { InitializeComponent(); InitializeOther(); } private DoubleCollection dashes; public DoubleCollection Dashes { get { //dashes = new DoubleCollection(); //works ok //dashes.Add(2.0); //dashes.Add(...
[ { "answer_id": 188301, "author": "Bryant", "author_id": 10893, "author_profile": "https://Stackoverflow.com/users/10893", "pm_score": 0, "selected": false, "text": "line = new Line(); \nline.Stroke = new SolidColorBrush(Colors.Blue);\nline.StrokeDashArray = **new DoubleCollection() { ...
2008/10/09
[ "https://Stackoverflow.com/questions/186634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23724/" ]
186,648
<p>I'm working on a C++ library that (among other stuff) has functions to read config files; and I want to add tests for this. So far, this has lead me to create lots of valid and invalid config files, each with only a few lines that test one specific functionality. But it has now got very unwieldy, as there are so man...
[ { "answer_id": 186690, "author": "richq", "author_id": 4596, "author_profile": "https://Stackoverflow.com/users/4596", "pm_score": 3, "selected": false, "text": " project/\n src/\n tests/\n test1/\n input/\n test2\n ...
2008/10/09
[ "https://Stackoverflow.com/questions/186648", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2148773/" ]
186,653
<p>Unless I am missing an obvious built-in method, what is the quickest way to get the <em>n</em>th occurrence of a string within a string?</p> <p>I realize that I could loop the <a href="https://msdn.microsoft.com/en-us/library/k8b1470s(v=vs.110).aspx" rel="noreferrer">IndexOf</a> method by updating its start index o...
[ { "answer_id": 187394, "author": "Alexander Prokofyev", "author_id": 11256, "author_profile": "https://Stackoverflow.com/users/11256", "pm_score": 7, "selected": false, "text": "/((s).*?){n}/ s public static class StringExtender\n{\n public static int NthIndexOf(this string target, st...
2008/10/09
[ "https://Stackoverflow.com/questions/186653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16989/" ]
186,655
<p>I coded something using Date statement in Access VBA. It was working fine until the start of this month, but now I am seeing that the Date has automatically changed the format from <code>dd/mm/yyyy</code> to <code>mm/dd/yyyy</code>. Has anyone else encountered the same problem?</p>
[ { "answer_id": 191765, "author": "Fionnuala", "author_id": 2548, "author_profile": "https://Stackoverflow.com/users/2548", "pm_score": 2, "selected": false, "text": "strSQL=\"SELECT SomeDate FROM tblT WHERE SomeDate=#\" & Format(DateVar, \"yyyy/mm/dd\") & \"#\"\n" }, { "answer_id...
2008/10/09
[ "https://Stackoverflow.com/questions/186655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6613/" ]
186,657
<p>When I disable ViewState for the page. It does not allow any other control to use ViewState .. even if I set EnableViewState="true" for that particular control ..</p> <p>is it possible to enable ViewState for a control when ViewState is disabled for the page itself?</p> <p>if not how can disable viewstate for cont...
[ { "answer_id": 186732, "author": "Aaron Powell", "author_id": 11388, "author_profile": "https://Stackoverflow.com/users/11388", "pm_score": 2, "selected": false, "text": "List<string> allowedControls = new List<string> { \"Control1\", \"Control3\" };\nIEnumerable<Control> controlsWithout...
2008/10/09
[ "https://Stackoverflow.com/questions/186657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25138/" ]
186,671
<p>What avenues are there for using an XSD to generate message instances? I seem to remember reading about generating classes from XSD, but can't find anything specific now. I know you can generate classes and datasets from XSD, but I'm looking for a pattern for automating the actual generation of the messages.</p> ...
[ { "answer_id": 186684, "author": "leppie", "author_id": 15541, "author_profile": "https://Stackoverflow.com/users/15541", "pm_score": 2, "selected": true, "text": "xsd /c yourschema.xsd > yourschema.cs\n" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/186671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8741/" ]
186,718
<p>I have some really complicated legacy code I've been working on that crashes when collecting big chunks of data. I've been unable to find the exact reason for the crashes and am trying different ways to solve it or at least recover nicely. The last thing I did was enclose the crashing code in a</p> <pre><code>try ...
[ { "answer_id": 188331, "author": "Gustavo", "author_id": 2015, "author_profile": "https://Stackoverflow.com/users/2015", "pm_score": 1, "selected": false, "text": "try\n...\nexcept\non E: EOleException do\n...\nend;\n" }, { "answer_id": 188733, "author": "Francesca", "aut...
2008/10/09
[ "https://Stackoverflow.com/questions/186718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9077/" ]
186,734
<p>Mobile Safari is a very capable browser, and it can handle my website as it is perfectly. However, there are a few elements on my page that could be optimized for browsing using this device; such as serving specific thumbnails that are smaller than the desktop counterparts to help fit more content into the screen.</...
[ { "answer_id": 186742, "author": "GavinCattell", "author_id": 21644, "author_profile": "https://Stackoverflow.com/users/21644", "pm_score": 2, "selected": false, "text": "$_SERVER['HTTP_USER_AGENT'] \n" }, { "answer_id": 186779, "author": "different", "author_id": 3654, ...
2008/10/09
[ "https://Stackoverflow.com/questions/186734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3654/" ]
186,737
<p>I want to delete a folder that contains thousands of files and folders. If I use Windows Explorer to delete the folder it can take 10-15 minutes (not always, but often). Is there a faster way in Windows to delete folders? </p> <p>Other details:</p> <ul> <li>I don't care about the recycle bin.</li> <li>It's an NTFS...
[ { "answer_id": 186748, "author": "Stephen Denne", "author_id": 11721, "author_profile": "https://Stackoverflow.com/users/11721", "pm_score": 10, "selected": true, "text": "rmdir /s /q folder\n powershell -Command \"Remove-Item -LiteralPath 'folder' -Force -Recurse\"\n del rmdir" }, {...
2008/10/09
[ "https://Stackoverflow.com/questions/186737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11766/" ]
186,756
<p>How do I generate a range of consecutive numbers (one per line) from a MySQL query so that I can insert them into a table?</p> <p>For example:</p> <pre><code>nr 1 2 3 4 5 </code></pre> <p>I would like to use only MySQL for this (not PHP or other languages).</p>
[ { "answer_id": 186780, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 3, "selected": false, "text": "DECLARE i INT DEFAULT 0;\n\nWHILE i < 6 DO\n /* insert into table... */\n SET i = i + 1;\nEND WHILE;\n" }, { "an...
2008/10/09
[ "https://Stackoverflow.com/questions/186756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14635/" ]
186,789
<p>What security best-practices would you strongly recommend in maintaining a Linux server? <br />(i.e. bring up a firewall, disable unnecessary services, beware of suid executables, and so on.)</p> <p>Also: is there a definitive reference on Selinux?</p> <p>EDIT: Yes, I'm planning to put the machine on the Internet,...
[ { "answer_id": 58243905, "author": "RtmY", "author_id": 1103953, "author_profile": "https://Stackoverflow.com/users/1103953", "pm_score": 0, "selected": false, "text": "/home /tmp /var nosuid setuid auditd" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/186789", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18770/" ]
186,798
<p>The log levels WARN, ERROR and FATAL are pretty clear. But when is something DEBUG, and when INFO? </p> <p>I've seen some projects that are annoyingly verbose on the INFO level, but I've also seen code that favors the DEBUG level too much. In both cases, useful information is hidden in the noise.</p> <p>What are t...
[ { "answer_id": 186826, "author": "slashnick", "author_id": 21030, "author_profile": "https://Stackoverflow.com/users/21030", "pm_score": 2, "selected": false, "text": "debug info info debug" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/186798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6400/" ]
186,799
<p>When using JDBC, I often come across constructs like </p> <pre><code>ResultSet rs = ps.executeQuery(); while (rs.next()) { int id = rs.getInt(1); // Some other actions } </code></pre> <p>I asked myself (and authors of code too) why not to use labels for retrieving column values: </p> <pre><code>int id =...
[ { "answer_id": 186821, "author": "Sietse", "author_id": 6400, "author_profile": "https://Stackoverflow.com/users/6400", "pm_score": 2, "selected": false, "text": "String int int String ints" }, { "answer_id": 187425, "author": "Martin Klinke", "author_id": 1793, "auth...
2008/10/09
[ "https://Stackoverflow.com/questions/186799", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11732/" ]
186,800
<p>I need to configure a website to access a webservice on another machine, via a proxy. I can configure the website to use a proxy, but I can't find a way of specifying the credentials that the proxy requires, is that possible? Here is my current configuration:</p> <pre><code>&lt;defaultProxy useDefaultCredentials=...
[ { "answer_id": 194414, "author": "Jérôme Laban", "author_id": 26346, "author_profile": "https://Stackoverflow.com/users/26346", "pm_score": 8, "selected": true, "text": "namespace SomeNameSpace\n{\n public class MyProxy : IWebProxy\n {\n public ICredentials Credentials\n ...
2008/10/09
[ "https://Stackoverflow.com/questions/186800", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5793/" ]
186,802
<p>I have named_scope which is reused in multiple ActiveRecord models. For example:</p> <pre><code> named_scope :limit, lambda {|limit| {:limit =&gt; limit}} </code></pre> <p>What is the best practice to extract this code to be shared across models. Is it possible to extract it to a module or should I rather reo...
[ { "answer_id": 187097, "author": "Ben Scofield", "author_id": 6478, "author_profile": "https://Stackoverflow.com/users/6478", "pm_score": 4, "selected": false, "text": "module CommonScopes\n def self.included(base)\n base.class_eval do\n named_scope :limit, lambda {|limit| {:lim...
2008/10/09
[ "https://Stackoverflow.com/questions/186802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18715/" ]
186,822
<p>How do I invoke a console application from my .NET application and capture all the output generated in the console? </p> <p>(Remember, I don't want to save the information first in a file and then relist as I would love to receive it as live.)</p>
[ { "answer_id": 186833, "author": "mdb", "author_id": 8562, "author_profile": "https://Stackoverflow.com/users/8562", "pm_score": 8, "selected": true, "text": "Process compiler = new Process();\ncompiler.StartInfo.FileName = \"csc.exe\";\ncompiler.StartInfo.Arguments = \"/r:System.dll /ou...
2008/10/09
[ "https://Stackoverflow.com/questions/186822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17519/" ]
186,827
<p>I need to send email through an (external) SMTP server from Java however this server will only accept CRAM-MD5 authentication, which is not supported by JavaMail.</p> <p>What would be a good way to get these emails to send? (It must be in Java.)</p>
[ { "answer_id": 186906, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 2, "selected": false, "text": "mail.imap.sasl.enable true mail.smtp.sasl.enable" }, { "answer_id": 187254, "author": "jj33", "author_id": 4...
2008/10/09
[ "https://Stackoverflow.com/questions/186827", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15355/" ]
186,829
<p>Conventional IPv4 dotted quad notation separates the address from the port with a colon, as in this example of a webserver on the loopback interface:</p> <pre><code>127.0.0.1:80 </code></pre> <p>but with IPv6 notation the address itself can contain colons. For example, this is the short form of the loopback addres...
[ { "answer_id": 186848, "author": "Nico", "author_id": 22970, "author_profile": "https://Stackoverflow.com/users/22970", "pm_score": 9, "selected": true, "text": "[] http://[1fff:0:a88:85a3::ac1f]:8001/index.html" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/186829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1715673/" ]
186,840
<p>My company runs a webmail service, and we were trying to diagnose a problem with Word downloads not opening automatically - the same *.doc file download from Yahoo Mail would open, but one from ours would not.</p> <p>In the course of investigating the headers we saw this coming from Yahoo:</p> <pre><code>content-d...
[ { "answer_id": 186886, "author": "Alphager", "author_id": 21684, "author_profile": "https://Stackoverflow.com/users/21684", "pm_score": 0, "selected": false, "text": " disposition := \"Content-Disposition\" \":\"\n disposition-type\n *(\";\" disposition-parm...
2008/10/09
[ "https://Stackoverflow.com/questions/186840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25487/" ]
186,854
<p>I can hookup to <code>AppDomain.CurrentDomain.UnhandledException</code> to log exceptions from background threads, but how do I prevent them terminating the runtime?</p>
[ { "answer_id": 186879, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 6, "selected": true, "text": "<configuration>\n <runtime>\n <!-- the following setting prevents the host from closing when an unhandled exception is thro...
2008/10/09
[ "https://Stackoverflow.com/questions/186854", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5978/" ]
186,857
<p>I have a string that looks like this:</p> <pre><code>"Name1=Value1;Name2=Value2;Name3=Value3" </code></pre> <p>Is there a built-in class/function in Python that will take that string and construct a dictionary, as though I had done this:</p> <pre><code>dict = { "Name1": "Value1", "Name2": "Value2", "N...
[ { "answer_id": 186873, "author": "Brian", "author_id": 9493, "author_profile": "https://Stackoverflow.com/users/9493", "pm_score": 8, "selected": true, "text": "s= \"Name1=Value1;Name2=Value2;Name3=Value3\"\ndict(item.split(\"=\") for item in s.split(\";\"))\n >>> s = \"Name1='Value=2';N...
2008/10/09
[ "https://Stackoverflow.com/questions/186857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267/" ]
186,867
<p>I need to stream a file to the Response for saving on the end user's machine. The file is plain text, so what content type can I use to prevent the text being displayed in the browser?</p>
[ { "answer_id": 186871, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 3, "selected": false, "text": "Content-Disposition: attachment" }, { "answer_id": 186872, "author": "Andrew Moore", "author_id": 26210, ...
2008/10/09
[ "https://Stackoverflow.com/questions/186867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8741/" ]
186,876
<p>The following works in Firefox, but breaks in IE7 &amp; 8:</p> <pre><code>$("#my-first-div, #my-second-div").hide(); </code></pre> <p>so I have to do this:</p> <pre><code>$("#my-first-div").hide(); $("#my-second-div").hide(); </code></pre> <p>Is this normal?</p> <p>EDIT: ok, my actual real-life code is this:</...
[ { "answer_id": 187126, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 3, "selected": true, "text": "Message: 'nodeName' is null or not an object\n Line: 19 Char: 150 Code: 0\n URI: http://ajax.googleapis.com/ajax/li...
2008/10/09
[ "https://Stackoverflow.com/questions/186876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26107/" ]
186,883
<p>When deploying a ready to use erlang application I <strong>don't</strong> want the user to </p> <ul> <li>Find the right erl release on the internet.</li> <li>Install the erl vm</li> <li>unzip and decide a location for the beam files (with the application)</li> <li>read a readme</li> <li>modify anything that even lo...
[ { "answer_id": 187126, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 3, "selected": true, "text": "Message: 'nodeName' is null or not an object\n Line: 19 Char: 150 Code: 0\n URI: http://ajax.googleapis.com/ajax/li...
2008/10/09
[ "https://Stackoverflow.com/questions/186883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15638/" ]
186,891
<p>If I am passing an object to a method, why should I use the ref keyword? Isn't this the default behaviour anyway?</p> <p>For example:</p> <pre><code>class Program { static void Main(string[] args) { TestRef t = new TestRef(); t.Something = "Foo"; DoSomething(t); Console.Wri...
[ { "answer_id": 186904, "author": "Rinat Abdullin", "author_id": 47366, "author_profile": "https://Stackoverflow.com/users/47366", "pm_score": 4, "selected": false, "text": "ref static public void DoSomething(ref TestRef t)\n{\n t = new TestRef();\n}\n" }, { "answer_id": 186907...
2008/10/09
[ "https://Stackoverflow.com/questions/186891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/93743/" ]
186,894
<p>I am looking for the best way to test if a website is alive from a C# application.</p> <h3>Background</h3> <p>My application consists of a <em>Winforms UI</em>, a backend <em>WCF service</em> and a <em>website</em> to publish content to the UI and other consumers. To prevent the situation where the UI starts up and ...
[ { "answer_id": 186931, "author": "Echostorm", "author_id": 12862, "author_profile": "https://Stackoverflow.com/users/12862", "pm_score": 8, "selected": true, "text": "HttpWebResponse response = (HttpWebResponse)request.GetResponse();\nif (response == null || response.StatusCode != HttpSt...
2008/10/09
[ "https://Stackoverflow.com/questions/186894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/231/" ]
186,895
<p>Is there a way in Visual Studio (a hotkey) to automatically import a type (or choosing between known namespaces) like the <kbd>Ctrl</kbd> + <kbd>O</kbd> in Eclipse?</p>
[ { "answer_id": 186920, "author": "mattlant", "author_id": 14642, "author_profile": "https://Stackoverflow.com/users/14642", "pm_score": 6, "selected": false, "text": "using using" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/186895", "https://Stackoverflow.com", "https://Stackoverflow.com/users/68336/" ]
186,916
<p>I have a python script that analyzes a set of error messages and checks for each message if it matches a certain pattern (regular expression) in order to group these messages. For example "file x does not exist" and "file y does not exist" would match "file .* does not exist" and be accounted as two occurrences of "...
[ { "answer_id": 187011, "author": "Federico A. Ramponi", "author_id": 18770, "author_profile": "https://Stackoverflow.com/users/18770", "pm_score": 2, "selected": false, "text": "[\n(\"file .* does not exist\", \"file not found\"),\n(\"user .* not authorized\", \"authorization error\")\n]...
2008/10/09
[ "https://Stackoverflow.com/questions/186916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15622/" ]
186,917
<p>I'm trying to catch a ClassCastException when deserializing an object from xml.</p> <p>So,</p> <pre><code>try { restoredItem = (T) decoder.readObject(); } catch (ClassCastException e){ //don't need to crash at this point, //just let the user know that a wrong file has been passed. } </code></pre> <p>An...
[ { "answer_id": 186977, "author": "yanchenko", "author_id": 15187, "author_profile": "https://Stackoverflow.com/users/15187", "pm_score": 0, "selected": false, "text": "instanceof public T restore(String from){\n...\nrestoredItem = (T) decoder.readObject();\n...\n}\n" }, { "answer...
2008/10/09
[ "https://Stackoverflow.com/questions/186917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15187/" ]
186,918
<p>My master page contains a list as shown here. What I'd like to do though, is add the "class=active" attribute to the list li thats currently active but I have no idea how to do this. I know that the code goes in the aspx page's page_load event, but no idea how to access the li I need to add the attribute. Please enl...
[ { "answer_id": 186976, "author": "Lou Franco", "author_id": 3937, "author_profile": "https://Stackoverflow.com/users/3937", "pm_score": 1, "selected": false, "text": "ClientScript.RegisterStartupScript(this.GetType(), \"setActiveLI\", \"document.getElementById(\\\"\"+id+\"\\\").setAttrib...
2008/10/09
[ "https://Stackoverflow.com/questions/186918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17211/" ]
186,921
<p>I am using the YUI layout manager which seems to work at an OK speed. However if the page contains a large <code>&lt;Table&gt;</code> with about 500 rows, the YUI <code>render()</code> function takes about a <strong>minute</strong> longer to run.</p> <p>When I open the same page without the layout manager it opens ...
[ { "answer_id": 187418, "author": "tpower", "author_id": 18107, "author_profile": "https://Stackoverflow.com/users/18107", "pm_score": 4, "selected": true, "text": "render() style.display = 'none' style.display = 'block'" }, { "answer_id": 283732, "author": "Stuart Grimshaw", ...
2008/10/09
[ "https://Stackoverflow.com/questions/186921", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18107/" ]
186,922
<p>I'm looking for a log viewer with similar capablilties as Chainsaw, in which I can tail Glassfish log files over for instance SSH/SCP. Does anyone know if such a tool exist?</p>
[ { "answer_id": 8538881, "author": "Alan B. Dee", "author_id": 848926, "author_profile": "https://Stackoverflow.com/users/848926", "pm_score": 3, "selected": false, "text": "type=log4j\npattern=[#|TIMESTAMP|LEVEL|PROP(A)|CLASS|_ThreadID=PROP(B);_ThreadName=THREAD;|MESSAGE|#]\ndateFormat=y...
2008/10/09
[ "https://Stackoverflow.com/questions/186922", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11429/" ]
186,923
<p>How do I define the Assembly folder for an Application correctly? I tried to use the registry Key: HKLM/SOFTWARE/Microsoft/.NET Framework/AssemblyFolders/App-Name and use the (Default) to set this to the path where the assemblies are located.</p> <p>Some time ago this worked fine, but as I compiled a new Version an...
[ { "answer_id": 8538881, "author": "Alan B. Dee", "author_id": 848926, "author_profile": "https://Stackoverflow.com/users/848926", "pm_score": 3, "selected": false, "text": "type=log4j\npattern=[#|TIMESTAMP|LEVEL|PROP(A)|CLASS|_ThreadID=PROP(B);_ThreadName=THREAD;|MESSAGE|#]\ndateFormat=y...
2008/10/09
[ "https://Stackoverflow.com/questions/186923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
186,932
<p>My stuff is made with several components among which some are written in C. As I would like to add some security features, I am thinking of communicating over an SSL/TLS layer.</p> <p>Could you advise me some good lib to do this (if possible) ?</p>
[ { "answer_id": 766595, "author": "sybreon", "author_id": 85021, "author_profile": "https://Stackoverflow.com/users/85021", "pm_score": 0, "selected": false, "text": "Internet --- [SSLTunnel] --- Your App\n" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/186932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26465/" ]
186,935
<p>I'm writing server-side programs in PHP for an iPhone app. And I have no iPhone. :P</p> <p>The iPhone app requests XML files from the site whenever a user runs the iPhone app. You may visit <a href="http://www.appvee.com/iphone/ads" rel="nofollow noreferrer">http://www.appvee.com/iphone/ads</a> or <a href="http://w...
[ { "answer_id": 766595, "author": "sybreon", "author_id": 85021, "author_profile": "https://Stackoverflow.com/users/85021", "pm_score": 0, "selected": false, "text": "Internet --- [SSLTunnel] --- Your App\n" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/186935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23773/" ]
186,942
<p>I have this script:</p> <pre><code>select name,create_date,modify_date from sys.procedures order by modify_date desc </code></pre> <p>I can see what procedures were modified lately. I will add a "where modify_date >= " And I'd like to use some system stored procedure, that will generate me : drop + create scripts...
[ { "answer_id": 187063, "author": "jdecuyper", "author_id": 296, "author_profile": "https://Stackoverflow.com/users/296", "pm_score": 0, "selected": false, "text": "DECLARE @spName NVARCHAR(128)\nDECLARE myCursor CURSOR FOR SELECT name FROM sys.procedures ORDER BY modify_date DESC\nOPEN m...
2008/10/09
[ "https://Stackoverflow.com/questions/186942", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26472/" ]
186,944
<p>I have to create a C program which will run on Linux server. It will take information from Oracle database, create a local file and then copy that file to Windows server. I know how to create a local file on Linux server. But what is the way to copy it to windows server from C?</p>
[ { "answer_id": 187185, "author": "Scott Bennett-McLeish", "author_id": 1915, "author_profile": "https://Stackoverflow.com/users/1915", "pm_score": 2, "selected": false, "text": "smbclient //myserver/my_directory <password> -U [domain/]<my_user>\n put my_file_to_copy.dat\n" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/186944", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
186,970
<p>What ReSharper 4.0 templates for <strong>C#</strong> do you use?</p> <p>Let's share these in the following format:</p> <hr> <h2>[Title]</h2> <p><em>Optional description</em> </p> <p><strong>Shortcut:</strong> shortcut<br> <strong>Available in:</strong> [AvailabilitySetting]</p> <pre><code>// Resharper templat...
[ { "answer_id": 186974, "author": "Rinat Abdullin", "author_id": 47366, "author_profile": "https://Stackoverflow.com/users/47366", "pm_score": 4, "selected": false, "text": "[NUnit.Framework.TestFixtureAttribute]\npublic sealed class $TypeToTest$Tests\n{\n [NUnit.Framework.TestAttribut...
2008/10/09
[ "https://Stackoverflow.com/questions/186970", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47366/" ]
187,000
<p>I have an asp.net website that allows the user to download largish files - 30mb to about 60mb. Sometimes the download works fine but often it fails at some varying point before the download finishes with the message saying that the connection with the server was reset.</p> <p>Originally I was simply using Server.T...
[ { "answer_id": 187022, "author": "kaa", "author_id": 2105, "author_profile": "https://Stackoverflow.com/users/2105", "pm_score": 2, "selected": false, "text": "<configuration>\n <system.web>\n <httpRuntime executionTimeout=\"3600\"/>\n </system.web>\n</configuration>\n int length;\n...
2008/10/09
[ "https://Stackoverflow.com/questions/187000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10135/" ]
187,001
<p>Is it possible to provide WCF with a custom proxy address and custom credentials? </p> <p>I've found this answer on stackoverflow: <a href="https://stackoverflow.com/questions/105499/how-to-set-proxy-with-credentials-to-generated-wcf-client">How to set proxy with credentials to generated WCF client?</a>, but I've g...
[ { "answer_id": 2111642, "author": "Bradley Grainger", "author_id": 23633, "author_profile": "https://Stackoverflow.com/users/23633", "pm_score": 5, "selected": true, "text": "// get this information from the user / config file / etc.\nUri proxyAddress;\nstring userName;\nstring password;...
2008/10/09
[ "https://Stackoverflow.com/questions/187001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1313/" ]
187,003
<p>I just need a simple JSON or YAML (or other) text based format for recording the time I spend on tasks. I prefer to do as much work as possible in my text editor (e text editor) so it is more natural to me to stay in the editor and not switch back and forth to programs like Excel (plus this way I retain portable an...
[ { "answer_id": 341113, "author": "dreftymac", "author_id": 42223, "author_profile": "https://Stackoverflow.com/users/42223", "pm_score": 2, "selected": false, "text": "### myyamllog.txt\n - log_entry: posted some stuff on stack overflow\n project: prj_my_personal_stuff\n datesta...
2008/10/09
[ "https://Stackoverflow.com/questions/187003", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20714/" ]
187,004
<p>I have a large legacy system to maintain. The codebase uses threads all over the place and those threads share a lot of mutable data. I know, sounds bad. Anyway, don't answer "rewrite the whole application from scratch" or I'll vote you down :-) I have tried to run some static analysis tools on the codebase, but non...
[ { "answer_id": 187196, "author": "Tom Hawtin - tackline", "author_id": 4725, "author_profile": "https://Stackoverflow.com/users/4725", "pm_score": 2, "selected": false, "text": "@GuardedBy" }, { "answer_id": 188792, "author": "McDowell", "author_id": 304, "author_prof...
2008/10/09
[ "https://Stackoverflow.com/questions/187004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4110/" ]
187,005
<p>I'm working profesionally on a php web application which contains contacts, among other data. I was wondering how hard it would be to make this data available to external programs using the LDAP protocol.</p> <p>Are there specific tools out there for this? I couldn't really find anything, but I can't imagine I'm th...
[ { "answer_id": 187441, "author": "Gary Richardson", "author_id": 2506, "author_profile": "https://Stackoverflow.com/users/2506", "pm_score": 3, "selected": true, "text": "modifyTimestamp 20080306214429Z modifyTimestamp" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/187005", "https://Stackoverflow.com", "https://Stackoverflow.com/users/909/" ]
187,018
<p>In a page, on the load event, I am dynamically creating controls for display on the page. This is all working properly. the trouble I am having is when adding extenders from the AJAX control toolkit, specifically I am trying to add rounded corners to a button control. No errors are thrown, but the AJAX Extension fun...
[ { "answer_id": 187033, "author": "Rob", "author_id": 7872, "author_profile": "https://Stackoverflow.com/users/7872", "pm_score": 2, "selected": false, "text": "Controls.Add(editRoundedCorners)\n" }, { "answer_id": 189385, "author": "Compulsion", "author_id": 3675, "au...
2008/10/09
[ "https://Stackoverflow.com/questions/187018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16391/" ]
187,040
<p>I Have an old vbs script file being kicked off by an AutoSys job. Can I, and how do I, return an int return value to indicate success or failure?</p>
[ { "answer_id": 187051, "author": "Rob", "author_id": 7872, "author_profile": "https://Stackoverflow.com/users/7872", "pm_score": 6, "selected": false, "text": "WScript.Quit n\n" }, { "answer_id": 187055, "author": "Philip.ie", "author_id": 180142, "author_profile": "h...
2008/10/09
[ "https://Stackoverflow.com/questions/187040", "https://Stackoverflow.com", "https://Stackoverflow.com/users/180142/" ]
187,046
<p>Has anyone seen a tool that will integrate code coverage results with SCM/VCS to attribute untested lines of code to developers? For example, is there a tool that will take NCover's Coverage.Xml, combine it with SVN blame, and produce a report that tells me things like developer who commits most untested code?</p>
[ { "answer_id": 187051, "author": "Rob", "author_id": 7872, "author_profile": "https://Stackoverflow.com/users/7872", "pm_score": 6, "selected": false, "text": "WScript.Quit n\n" }, { "answer_id": 187055, "author": "Philip.ie", "author_id": 180142, "author_profile": "h...
2008/10/09
[ "https://Stackoverflow.com/questions/187046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26479/" ]
187,057
<p>I want to know how the glBlendFunc works. For example, i have 2 gl textures, where the alpha is on tex1, i want to have alpha in my final image. Where the color is on tex1, i want the color from tex2 to be.</p>
[ { "answer_id": 195803, "author": "DavidG", "author_id": 25893, "author_profile": "https://Stackoverflow.com/users/25893", "pm_score": 1, "selected": true, "text": "glTexCoordPointer( 2, GL_FLOAT, 0, sprite->GetTexBuffer() );\nglVertexPointer( 3, GL_FLOAT, 0, sprite->GetVertexBuffer() );\...
2008/10/09
[ "https://Stackoverflow.com/questions/187057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25893/" ]
187,059
<p>I have a page with a tab control and each control has almost 15 controls. In total there are 10 tabs and about 150 controls in a page (controls like drop down list, textbox, radiobutton, listbox only).</p> <p>My requirement is that there is a button (submit) at the bottom of the page. I need to check using JavaScri...
[ { "answer_id": 187222, "author": "Kon", "author_id": 22303, "author_profile": "https://Stackoverflow.com/users/22303", "pm_score": 3, "selected": true, "text": " var selectedCount = 0;\n var element;\n\n for (var i = 0; i < document.forms[0].elements.length; i++)\n {\n element = d...
2008/10/09
[ "https://Stackoverflow.com/questions/187059", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22162/" ]
187,069
<p>It seems the ObservableCollection only support add, remove, clear operation from the UI thread, It throw Not Support Exception if it is operated by a NO UI thread. I tried to override methods of ObservableCollection, unfortunatly, I met lots of problems. Any one can provide me a ObservableCollection sample which can...
[ { "answer_id": 187081, "author": "Mark Ingram", "author_id": 986, "author_profile": "https://Stackoverflow.com/users/986", "pm_score": 4, "selected": true, "text": "while (!Monitor.TryEnter(_lock, 10))\n{\n DoEvents();\n}\n\ntry\n{\n //modify collection\n}\nfinally\n{\n Monitor.Exi...
2008/10/09
[ "https://Stackoverflow.com/questions/187069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25749/" ]
187,073
<p>I'm using the sortable function in jquery to sequence a faq list. Needless to say, i'm new to this concept. Anybody have any good examples of the backend for this. I have the front working fine, but updating the sequence in the database is another story. My backend is ColdFusion btw.</p> <p>Thanks in advance</p>...
[ { "answer_id": 187111, "author": "Tomasz Tybulewicz", "author_id": 17405, "author_profile": "https://Stackoverflow.com/users/17405", "pm_score": 5, "selected": true, "text": "<div id=\"faq\">\n <div id=\"q1\">...</div>\n <div id=\"q2\">...</div>\n (...)\n <div id=\"q100\">..</div>\n<...
2008/10/09
[ "https://Stackoverflow.com/questions/187073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26121/" ]
187,076
<p>I have a CSV file that holds about 200,000 - 300,000 records. Most of the records can be separated and inserted into a MySQL database with a simple </p> <pre><code>$line = explode("\n", $fileData); </code></pre> <p>and then the values separated with</p> <pre><code>$lineValues = explode(',', $line); </code></pre> ...
[ { "answer_id": 187091, "author": "ConroyP", "author_id": 2287, "author_profile": "https://Stackoverflow.com/users/2287", "pm_score": -1, "selected": false, "text": "// Replace all new-line then id patterns with new-line 0+id\n$line = preg_replace('/\\n(\\d)/',\"\\n0$1\",$line);\n\n// Spl...
2008/10/09
[ "https://Stackoverflow.com/questions/187076", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24802/" ]
187,098
<p>I am writing a dhtml application that creates an interactive simulation of a system. The data for the simulation is generated from another tool, and there is already a very large amount of legacy data.</p> <p>Some steps in the simulation require that we play "voice-over" clips of audio. I've been unable to find an...
[ { "answer_id": 187415, "author": "dacracot", "author_id": 13930, "author_profile": "https://Stackoverflow.com/users/13930", "pm_score": 7, "selected": true, "text": "//======================================================================\nvar soundEmbed = null;\n//======================...
2008/10/09
[ "https://Stackoverflow.com/questions/187098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22383/" ]
187,100
<p>I have an object that needs a test if the object data is valid. The validation itself would be called from the thread that instatiated the object, it looks like this:</p> <pre><code> { if (_step.Equals(string.Empty)) return false; if (_type.Equals(string.Empty)) return false; if (_setup.Equals(string.Empty)) ...
[ { "answer_id": 187110, "author": "Gregor", "author_id": 26153, "author_profile": "https://Stackoverflow.com/users/26153", "pm_score": 1, "selected": false, "text": "if(something.IsValid) { ...\n if(something.IsValid()) { ...\n" }, { "answer_id": 187118, "author": "Konrad Rudo...
2008/10/09
[ "https://Stackoverflow.com/questions/187100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22114/" ]
187,120
<p>I cannot add workflow item to my WPF project.</p> <p>I create a new WPF project and want to add a sequential workflow. When I do "Add new item" there is no item template to select.</p> <p>Any hints?</p>
[ { "answer_id": 2583629, "author": "Nitin Mohnani", "author_id": 309857, "author_profile": "https://Stackoverflow.com/users/309857", "pm_score": 1, "selected": false, "text": "devenv /installvstemplates\n" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/187120", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2374/" ]
187,125
<p>Trying to create a user account in a test. But getting a Object reference is not set to an instanve of an object error when running it.</p> <p>Here's my MemberShip provider class, it's in a class library MyCompany.MyApp.Domain.dll:</p> <pre><code>using System; using System.Collections.Generic; using System.Web.Sec...
[ { "answer_id": 190658, "author": "hollystyles", "author_id": 2083160, "author_profile": "https://Stackoverflow.com/users/2083160", "pm_score": 1, "selected": false, "text": "public class MemberTest\n {\n public static void CreateAdminMemberIfNotExists()\n {\n ...
2008/10/09
[ "https://Stackoverflow.com/questions/187125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2083160/" ]
187,137
<p>This is my query:</p> <pre><code>$query = $this-&gt;db-&gt;query(' SELECT archives.id, archives.signature, type_of_source.description, media_type.description, origin.description FROM archives, type_of_source, media_type, origin WHERE archives...
[ { "answer_id": 187175, "author": "pilsetnieks", "author_id": 6615, "author_profile": "https://Stackoverflow.com/users/6615", "pm_score": 4, "selected": true, "text": "\"AS\" select type_of_source.description as type_of_source_description, origin.descripotion as origin_descripotion from ....
2008/10/09
[ "https://Stackoverflow.com/questions/187137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4196/" ]
187,138
<p>How would you store formatted blocks of text (line breaks, tabs, lists - etc.) in a database (nothing specific) to be displayed on the web (XHTML) while maintaining a level of abstraction so that the data can be used in other applications or if the structure of the website were to change in the future?</p>
[ { "answer_id": 187175, "author": "pilsetnieks", "author_id": 6615, "author_profile": "https://Stackoverflow.com/users/6615", "pm_score": 4, "selected": true, "text": "\"AS\" select type_of_source.description as type_of_source_description, origin.descripotion as origin_descripotion from ....
2008/10/09
[ "https://Stackoverflow.com/questions/187138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23746/" ]
187,146
<p>Why is the order of tables important when combining an outer &amp; an inner join ? the following fails with postgres:</p> <pre><code>SELECT grp.number AS number, tags.value AS tag FROM groups grp, insrel archiverel LEFT OUTER JOIN ownrel ownrel ON grp.number = ownrel.dnumber LEFT OUTER JOIN...
[ { "answer_id": 187184, "author": "Jeffrey L Whitledge", "author_id": 10174, "author_profile": "https://Stackoverflow.com/users/10174", "pm_score": 2, "selected": false, "text": "SELECT grp.number AS number, \n tags.value AS tag \nFROM groups grp\nJOIN insrel archiverel ON arc...
2008/10/09
[ "https://Stackoverflow.com/questions/187146", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26486/" ]
187,188
<p>We are hosting a site for a client and they want us to include the header they have on their server into the pages we are hosting. So whenever they change it, it will automatically change on our site.</p> <p>We are attempting to use the "include" tag in our JSP code. The code we are using is as follows:</p> <p><...
[ { "answer_id": 187201, "author": "Eli Courtwright", "author_id": 1694, "author_profile": "https://Stackoverflow.com/users/1694", "pm_score": 1, "selected": false, "text": "out include" }, { "answer_id": 187230, "author": "Cheekysoft", "author_id": 1820, "author_profil...
2008/10/09
[ "https://Stackoverflow.com/questions/187188", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26488/" ]
187,198
<p>I was thinking earlier today about an idea for a small game and stumbled upon how to implement it. The idea is that the player can make a series of moves that cause a little effect, but if done in a specific sequence would cause a greater effect. So far so good, this I know how to do. Obviously, I had to make it be ...
[ { "answer_id": 187350, "author": "Cowan", "author_id": 17041, "author_profile": "https://Stackoverflow.com/users/17041", "pm_score": 3, "selected": true, "text": "MagicSequence fireworks = new MagicSequence(new FireworksAction(), 1, 1, 7);\nMagicSequence playMusic = new MagicSequence(new...
2008/10/09
[ "https://Stackoverflow.com/questions/187198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5954/" ]
187,216
<p>What is the best way for converting phone numbers into international format (E.164) using Java?</p> <p>Given a 'phone number' and a country id (let's say an ISO country code), I would like to convert it into a standard E.164 international format phone number.</p> <p>I am sure I can do it by hand quite easily - but...
[ { "answer_id": 195093, "author": "Henk", "author_id": 4613, "author_profile": "https://Stackoverflow.com/users/4613", "pm_score": 0, "selected": false, "text": "CC AREA_CODE AREA_CODE_LENGTH SUBSCRIBER SUBSCRIBER_LENGTH\n64 1 7\n64 21 ...
2008/10/09
[ "https://Stackoverflow.com/questions/187216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15452/" ]
187,219
<p>I'm using ccl/openmcl on Mac OS X. (latest versions of both). When the lisp prompt is displayed, using the cursor keys to navigate the current line results in escape codes, rather than movement, eg:</p> <p><code>Welcome to Clozure Common Lisp Version 1.2-r9226-RC1 (DarwinX8664)!<br> ? (^[[D</code></p> <p>Here I'v...
[ { "answer_id": 187393, "author": "Matthias Benkard", "author_id": 15517, "author_profile": "https://Stackoverflow.com/users/15517", "pm_score": 3, "selected": true, "text": "rlwrap openmcl\n" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/187219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10019/" ]
187,229
<p>Why does this work:</p> <pre><code>$(window).keydown(function(event){ alert(event.keyCode); }); </code></pre> <p>but not this:</p> <pre><code>$('#ajaxSearchText').keydown(function(event){ alert(event.keyCode); }); </code></pre> <p>I'm testing with Firefox 3. Interestingly, neither of them work in IE7.</p...
[ { "answer_id": 187262, "author": "Mote", "author_id": 24789, "author_profile": "https://Stackoverflow.com/users/24789", "pm_score": 1, "selected": false, "text": "$('#ajaxSearchText').keyup(function(event){\n alert(event.keyCode);\n});\n" }, { "answer_id": 190205, "author"...
2008/10/09
[ "https://Stackoverflow.com/questions/187229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
187,231
<p>I'm having trouble selecting elements that are part of an specific namespace. My xpath expression works in XMLSpy but fails when using the Xalan libraries..</p> <pre><code>&lt;item&gt; &lt;media:content attrb="xyz"&gt; &lt;dcterms:valid&gt;VALUE&lt;/dcterms:valid&gt; &lt;/media:content&gt; &lt;/item&gt; ...
[ { "answer_id": 187339, "author": "Ray Lu", "author_id": 11413, "author_profile": "https://Stackoverflow.com/users/11413", "pm_score": 0, "selected": false, "text": "<item xmlns:dcterms=\"http://dcterms.example\" xmlns:media=\"http://media.example\">\n <media:content attrb=\"xyz\">\n ...
2008/10/09
[ "https://Stackoverflow.com/questions/187231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10913/" ]
187,237
<p>I have a .NET string which is Base64 encoded representation of an array of encrypted bytes. It is produced like this:</p> <pre><code>String Encrypt( String message ) { CryptoStream cryptostream = ... StreamWriter stream = new StreamWriter( cryptostream ); ... return Convert.ToBase64String( ... ); }...
[ { "answer_id": 191630, "author": "GvS", "author_id": 11492, "author_profile": "https://Stackoverflow.com/users/11492", "pm_score": 2, "selected": true, "text": " public static string DeCryptString(string s) {\n byte[] b = System.Convert.FromBase64String(s);\n\n using (Me...
2008/10/09
[ "https://Stackoverflow.com/questions/187237", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13372/" ]
187,245
<p>Where I work, we maintain an FTP site that needs occasional cleanup.</p> <p>Are there any tools out there to create a site map of an FTP site? It would greatly simplify clean up tasks.</p> <p>Thanks!</p>
[ { "answer_id": 191630, "author": "GvS", "author_id": 11492, "author_profile": "https://Stackoverflow.com/users/11492", "pm_score": 2, "selected": true, "text": " public static string DeCryptString(string s) {\n byte[] b = System.Convert.FromBase64String(s);\n\n using (Me...
2008/10/09
[ "https://Stackoverflow.com/questions/187245", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1145/" ]
187,255
<p>I'm trying to make a select that calculates affiliate payouts.</p> <p>my approach is pretty simple.</p> <pre><code>SELECT month(payments.timestmap) ,sum(if(payments.amount&gt;=29.95,4,0)) As Tier4 ,sum(if(payments.amount&gt;=24.95&lt;=29.94,3,0)) As Tier3 ,sum(if(payments.amount&gt;=19.95&lt;=24.94,2,0)) As Tier2...
[ { "answer_id": 187270, "author": "ConroyP", "author_id": 2287, "author_profile": "https://Stackoverflow.com/users/2287", "pm_score": 4, "selected": true, "text": "AND SELECT\n month(payments.timestmap)\n,sum(if(payments.amount>=29.95,4,0)) As Tier4\n,sum(if(payments.amount>=24.95 AND pay...
2008/10/09
[ "https://Stackoverflow.com/questions/187255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3747/" ]
187,273
<p>Building on <a href="https://stackoverflow.com/questions/1476/how-do-you-express-binary-literals-in-python#13107">How Do You Express Binary Literals in Python</a>, I was thinking about sensible, intuitive ways to do that Programming 101 chestnut of displaying integers in base-2 form. This is the best I came up with...
[ { "answer_id": 187536, "author": "Brian", "author_id": 9493, "author_profile": "https://Stackoverflow.com/users/9493", "pm_score": 5, "selected": true, "text": "def _bin(x, width):\n return ''.join(str((x>>i)&1) for i in xrange(width-1,-1,-1))\n _conv_table = [_bin(x,8) for x in range...
2008/10/09
[ "https://Stackoverflow.com/questions/187273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15842/" ]
187,279
<p>I want to create a simple box with a header bar containing a title and some tool buttons. I have the following markup:</p> <pre><code>&lt;div style="float:left"&gt; &lt;div style="background-color:blue; padding: 1px; height: 20px;"&gt; &lt;div style="float: left; background-color:green;"&gt;title&lt;/di...
[ { "answer_id": 187311, "author": "Mote", "author_id": 24789, "author_profile": "https://Stackoverflow.com/users/24789", "pm_score": -1, "selected": false, "text": "<div style=\"background-color:blue; padding: 1px; height: 20px;> clear:all" }, { "answer_id": 187313, "author": ...
2008/10/09
[ "https://Stackoverflow.com/questions/187279", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26496/" ]
187,284
<p>I have log4net running on my AsP.NET site. I'm able to log messages to my DB Table, but it isn't logging the ThreadContext properties. For example:</p> <pre><code>ThreadContext.Properties["Url"] = HttpContext.Current.Request.Url.ToString(); ThreadContext.Properties["HttpReferer"] = HttpContext.Current.Request.Serve...
[ { "answer_id": 188730, "author": "sgwill", "author_id": 1204, "author_profile": "https://Stackoverflow.com/users/1204", "pm_score": 5, "selected": true, "text": "<conversionPattern value=\"%property{log4net:HttpReferer}\"/>\n <conversionPattern value=\"%property{HttpReferer}\"/>\n" } ]
2008/10/09
[ "https://Stackoverflow.com/questions/187284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1204/" ]
187,289
<p>Code lines per file, methods per class, cyclomatic complexity and so on. Developers resist and workaround most if not all of them! There is a good <a href="http://www.joelonsoftware.com/items/2006/08/09.html" rel="noreferrer">Joel article</a> on it (no time to find it now).</p> <p>What code metric(s) you recommend ...
[ { "answer_id": 187298, "author": "Dandikas", "author_id": 23436, "author_profile": "https://Stackoverflow.com/users/23436", "pm_score": 2, "selected": false, "text": "CC | TC\n\n 2 | 0% - good anyway, cyclomatic complexity too small\n\n10 | 70% - good\n\n10 | 50% - could be better\n\n10...
2008/10/09
[ "https://Stackoverflow.com/questions/187289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23436/" ]
187,295
<p>How do I distribute a small amount of data in a random order in a much larger volume of data?</p> <p>For example, I have several thousand lines of 'real' data, and I want to insert a dozen or two lines of control data in a random order throughout the 'real' data.</p> <p>Now I am not trying to ask how to use random...
[ { "answer_id": 187351, "author": "kender", "author_id": 4172, "author_profile": "https://Stackoverflow.com/users/4172", "pm_score": 3, "selected": true, "text": "N x i N/(x+1) * i + r r N/x r i 1<=i<x" }, { "answer_id": 187354, "author": "ine", "author_id": 4965, "aut...
2008/10/09
[ "https://Stackoverflow.com/questions/187295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23387/" ]
187,305
<p>I am using a FormView to update an existing SQL Server record. The rows from the sqldatasource display fine in the FormView and I can edit them. When I click Update, I get the ItemUpdating event but not the ItemUpdated event and the revisions are not written to the database. </p> <p>Can anyone help me in this ple...
[ { "answer_id": 227942, "author": "Matt V", "author_id": 30456, "author_profile": "https://Stackoverflow.com/users/30456", "pm_score": 1, "selected": false, "text": "protected void myFormView_ItemUpdating(object sender, FormViewUpdateEventArgs e)\n {\n\n // remove the old values...
2008/10/09
[ "https://Stackoverflow.com/questions/187305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14752/" ]
187,319
<p>I could use some help writing a regular expression. In my Django application, users can hit the following URL:</p> <pre><code>http://www.example.com/A1/B2/C3 </code></pre> <p>I'd like to create a regular expression that allows accepts any of the following as a valid URL:</p> <pre><code>http://www.example.com/A1 ...
[ { "answer_id": 187392, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 1, "selected": false, "text": "http://www\\.example\\.com/A1(/B2(/C3)?)?\n" }, { "answer_id": 187395, "author": "Andre Bossard", "au...
2008/10/09
[ "https://Stackoverflow.com/questions/187319", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10040/" ]
187,357
<p>Consider this:</p> <pre><code>var query = from r in this._db.Recipes where r.RecipesID == recipeID select new { r.RecipesID, r.RecipesName }; </code></pre> <p>How would i get individual columns in my <code>query</code> object without using a for-loop?</p> <p>Basicly: how do I translate <co...
[ { "answer_id": 187401, "author": "Chris Shaffer", "author_id": 6744, "author_profile": "https://Stackoverflow.com/users/6744", "pm_score": 0, "selected": false, "text": "\nquery.First().ColumnName\n \nvar obj = query.FirstOrDefault();\nif (obj != null)\n obj.ColumnName;\n \nvar query =...
2008/10/09
[ "https://Stackoverflow.com/questions/187357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20946/" ]
187,359
<p>We use Visual Studio 2008 and Surround SCM for source control. SCM drops files into each directory named ".MySCMServerInfo" which are user specific data files that shouldn't be checked into source control. They are similar to the .scc files dropped by Visual Source Safe. We also have several WAPs (Web Application ...
[ { "answer_id": 296353, "author": "Charles", "author_id": 24898, "author_profile": "https://Stackoverflow.com/users/24898", "pm_score": 3, "selected": true, "text": "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Packages\\\n{8FF02D1A-C177-4ac8-A62F-88FC6EA65F57}\\IgnorableF...
2008/10/09
[ "https://Stackoverflow.com/questions/187359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24898/" ]
187,406
<pre><code>private string? typeOfContract { get { return (string?)ViewState["typeOfContract"]; } set { ViewState["typeOfContract"] = value; } } </code></pre> <p>Later in the code I use it like this:</p> <pre><code>typeOfContract = Request.QueryString["type"]; </code></pre> <p>I am getting the following error at ...
[ { "answer_id": 187419, "author": "jop", "author_id": 11830, "author_profile": "https://Stackoverflow.com/users/11830", "pm_score": 5, "selected": false, "text": "string ?" }, { "answer_id": 187430, "author": "Szymon Rozga", "author_id": 7583, "author_profile": "https:...
2008/10/09
[ "https://Stackoverflow.com/questions/187406", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4144/" ]
187,414
<p>I don't really <em>get</em> lambda expressions. While they've been around since the days of ALGOL, I didn't start hearing about them until fairly recently, when Python and Ruby became very popular. Now that C# has the <code>=&gt;</code> syntax, people in my world (.NET) are talking about lamdba expressions more and...
[ { "answer_id": 187432, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 6, "selected": true, "text": " // Only include children - a predicate\nvar query = dataSource.Where(person => person.Age < 18) \n...
2008/10/09
[ "https://Stackoverflow.com/questions/187414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7565/" ]
187,421
<p>I am using a List Control to display a representation of elements within a vector. When the list is clicked on another control shows information about that element. The index of the element is currently determined by its index in the control, however if I wish to sort or filter the results this will no longer work.<...
[ { "answer_id": 187525, "author": "NotJarvis", "author_id": 16268, "author_profile": "https://Stackoverflow.com/users/16268", "pm_score": 4, "selected": true, "text": "YourListCtrl.SetItemData((DWORDPTR)&YourData); DataTypeYouWant* pData = (DataTypeYouWant*)(YourListCtrl.GetItemData(inde...
2008/10/09
[ "https://Stackoverflow.com/questions/187421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18664/" ]
187,434
<p>I need to create a cherrypy main page that has a login area. I want the login area to be secure, but not the rest of the page. How can I do this in CherryPy?</p> <p>Ideally, any suggestions will be compatible with <a href="http://web.archive.org/web/20170210040849/http://tools.cherrypy.org:80/wiki/AuthenticationA...
[ { "answer_id": 187525, "author": "NotJarvis", "author_id": 16268, "author_profile": "https://Stackoverflow.com/users/16268", "pm_score": 4, "selected": true, "text": "YourListCtrl.SetItemData((DWORDPTR)&YourData); DataTypeYouWant* pData = (DataTypeYouWant*)(YourListCtrl.GetItemData(inde...
2008/10/09
[ "https://Stackoverflow.com/questions/187434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13990/" ]
187,438
<p>I have currently an installed pgsql instance that is running on port <code>1486</code>. I want to change this port to <code>5433</code>, how should I proceed for this?</p>
[ { "answer_id": 187457, "author": "Neall", "author_id": 619, "author_profile": "https://Stackoverflow.com/users/619", "pm_score": 9, "selected": true, "text": "postgresql.conf port = 1486\n /etc/postgresql/8.3/main/ C:\\Program Files\\PostgreSQL\\9.3\\data sudo service postgresql restart"...
2008/10/09
[ "https://Stackoverflow.com/questions/187438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22554/" ]
187,448
<p>Using OpenXML SDK, I want to insert basic HTML snippets into a Word document.</p> <p>How would you do this:</p> <ul> <li>Manipulating XML directly ?</li> <li>Using an XSLT ?</li> <li>using AltChunk ?</li> </ul> <p>Moreover, C# or VB examples are more than welcome :)</p>
[ { "answer_id": 317064, "author": "Dirk Vollmar", "author_id": 40347, "author_profile": "https://Stackoverflow.com/users/40347", "pm_score": 3, "selected": false, "text": " void ConvertHTML(string htmlFileName, string docFileName)\n {\n // Create a Wordprocessing document. \n...
2008/10/09
[ "https://Stackoverflow.com/questions/187448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22970/" ]