qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
133,698
<p>I've created a new C++ project in Visual Studio 2008. No code has been written yet; Only project settings have been changed.</p> <p>When I compile the project, I receive the following fatal error:</p> <blockquote> <p>fatal error LNK1104: cannot open file 'C:\Program.obj'</p> </blockquote>
[ { "answer_id": 34412895, "author": "Patrizio Bertoni", "author_id": 1315480, "author_profile": "https://Stackoverflow.com/users/1315480", "pm_score": 3, "selected": false, "text": ".lib mylib mylib.obj" }, { "answer_id": 34875485, "author": "Matthias", "author_id": 527256...
2008/09/25
[ "https://Stackoverflow.com/questions/133698", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21277/" ]
133,703
<p>I want to know how to create a table where you can adjust the column widths. I have not figured out how to do this. If you know the secret sauce to this technique please let me know.</p>
[ { "answer_id": 142856, "author": "scunliffe", "author_id": 6144, "author_profile": "https://Stackoverflow.com/users/6144", "pm_score": 2, "selected": false, "text": "$('#myTableID').flexigrid();\n $('.classOfTables').flexigrid({height:'auto',striped:false});\n" }, { "answer_id": ...
2008/09/25
[ "https://Stackoverflow.com/questions/133703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4491/" ]
133,710
<p>When I use the task, the property is only set to TRUE if the resource (say file) is available. If not, the property is undefined.</p> <p>When I print the value of the property, it gives true if the resource was available, but otherwise just prints the property name.</p> <p>Is there a way to set the property to so...
[ { "answer_id": 133770, "author": "Alex Miller", "author_id": 7671, "author_profile": "https://Stackoverflow.com/users/7671", "pm_score": 5, "selected": true, "text": " <condition property=\"fooDoesNotExist\">\n <not>\n <available filepath=\"path/to/foo\"/>\n </not>\n </condi...
2008/09/25
[ "https://Stackoverflow.com/questions/133710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
133,719
<p>I am running Ruby and MySQL on a Windows box.</p> <p>I have some Ruby code that needs to connect to a MySQL database a perform a select. To connect to the database I need to provide the password among other things. </p> <p>The Ruby code can display a prompt requesting the password, the user types in the password a...
[ { "answer_id": 133745, "author": "jk.", "author_id": 21284, "author_profile": "https://Stackoverflow.com/users/21284", "pm_score": 5, "selected": false, "text": "system \"stty -echo\"\n# read password\nsystem \"stty echo\"\n" }, { "answer_id": 134323, "author": "Simon Knights...
2008/09/25
[ "https://Stackoverflow.com/questions/133719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15868/" ]
133,772
<p>I've got a class that I'm using as a settings class that is serialized into an XML file that administrators can then edit to change settings in the application. (The settings are a little more complex than the <code>App.config</code> allows for.)</p> <p>I'm using the <code>XmlSerializer</code> class to deserialize ...
[ { "answer_id": 133804, "author": "Rob Cooper", "author_id": 832, "author_profile": "https://Stackoverflow.com/users/832", "pm_score": 1, "selected": false, "text": "public List<MyObject> Collection\n{\n get { return _collection; }\n set { _collection = value; }\n}\n" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/133772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21807/" ]
133,774
<p>I am using RRDTool (<a href="http://oss.oetiker.ch/rrdtool/" rel="nofollow noreferrer">http://oss.oetiker.ch/rrdtool/</a>) as a graphing back-end for storing performance metrics. This is done via the RRDTool CLI from a Python script.</p> <p>My problem is that the script is multithreaded and each thread updates the...
[ { "answer_id": 134023, "author": "Johan Buret", "author_id": 15366, "author_profile": "https://Stackoverflow.com/users/15366", "pm_score": 2, "selected": true, "text": "lock = new Lock()" }, { "answer_id": 26704889, "author": "Steve Shipway", "author_id": 2480362, "au...
2008/09/25
[ "https://Stackoverflow.com/questions/133774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16148/" ]
133,777
<p>I have a subversion repository that contains a number so subfolders, corresponding to the various applications, configuration files, DLLs, etc (I'll call them 'modules') that make up my project. Now we are starting to "branch" into several related projects. That is, each high-level project will use a number of the...
[ { "answer_id": 133828, "author": "Adam Bellaire", "author_id": 21632, "author_profile": "https://Stackoverflow.com/users/21632", "pm_score": 2, "selected": false, "text": "Projects\n Project 1\n Project 2\n ...\nModules\n Module 1\n Module 2\n ...\n" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/133777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17962/" ]
133,837
<p>What might be the best way to start programming using boost lambda libraries.</p>
[ { "answer_id": 135367, "author": "Fruny", "author_id": 16815, "author_profile": "https://Stackoverflow.com/users/16815", "pm_score": 5, "selected": true, "text": "for_each(a.begin(), a.end(), std::cout << _1 << ' ');\n std::cout << _1 << ' ' cout std::ostream_iterator std::sort( c.begin(...
2008/09/25
[ "https://Stackoverflow.com/questions/133837", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22076/" ]
133,840
<p>I have heard that it's best not to actually have any html in your helpers; my question is, Why not? And furthermore, if you were trying to generate an html list or something like that, how can I avoid actual tags?</p> <p>Thanks!</p> <p>-fREW</p>
[ { "answer_id": 136249, "author": "Orion Edwards", "author_id": 234, "author_profile": "https://Stackoverflow.com/users/234", "pm_score": 3, "selected": false, "text": "content_tag render :partial return %Q(<a href=\"#{something}\">#{text}>)" }, { "answer_id": 11813612, "autho...
2008/09/25
[ "https://Stackoverflow.com/questions/133840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12448/" ]
133,860
<p>My Apache server runs on some non-default (not-root) account. When it tries to run a python script which in turn executes a subversion check-out command, 'svn checkout' fails with the following error message:</p> <pre><code>svn: Can't open file '/root/.subversion/servers': Permission denied </code></pre> <p>At the...
[ { "answer_id": 133983, "author": "Douglas Mayle", "author_id": 8458, "author_profile": "https://Stackoverflow.com/users/8458", "pm_score": 3, "selected": false, "text": "svn --config-dir /home/myuser/.subversion checkout http://example.com/path\n" }, { "answer_id": 138587, "a...
2008/09/25
[ "https://Stackoverflow.com/questions/133860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140995/" ]
133,879
<p>When developing an app that will listen on a TCP/IP port, how should one go about selecting a default port? Assume that this app will be installed on many computers, and that avoiding port conflicts is desired.</p>
[ { "answer_id": 133888, "author": "Kevin Wong", "author_id": 4792, "author_profile": "https://Stackoverflow.com/users/4792", "pm_score": 7, "selected": true, "text": "Unassigned" }, { "answer_id": 43427640, "author": "Mahdi Perfect", "author_id": 1231603, "author_profi...
2008/09/25
[ "https://Stackoverflow.com/questions/133879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4792/" ]
133,883
<p>How can I script a bat or cmd to stop and start a service reliably with error checking (or let me know that it wasn't successful for whatever reason)?</p>
[ { "answer_id": 133900, "author": "ZombieSheep", "author_id": 377, "author_profile": "https://Stackoverflow.com/users/377", "pm_score": 3, "selected": false, "text": "net start net stop" }, { "answer_id": 133913, "author": "Bill Michell", "author_id": 7938, "author_pro...
2008/09/25
[ "https://Stackoverflow.com/questions/133883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/730/" ]
133,886
<p>Lexical analyzers are quite easy to write when you have regexes. Today I wanted to write a simple general analyzer in Python, and came up with:</p> <pre><code>import re import sys class Token(object): """ A simple Token structure. Contains the token type, value and position. """ def __init__(s...
[ { "answer_id": 134065, "author": "Armin Ronacher", "author_id": 19990, "author_profile": "https://Stackoverflow.com/users/19990", "pm_score": 2, "selected": false, "text": "re.match pos = 0\nend = len(text)\nwhile pos < end:\n match = regexp.match(text, pos)\n # do something with y...
2008/09/25
[ "https://Stackoverflow.com/questions/133886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8206/" ]
133,887
<p>I need to create a multi-dimensional (nested) hashtable/dictionary so that I can use syntax like </p> <pre><code>val = myHash("Key").("key") </code></pre> <p>I know I need to use Generics but I can't figure out the correct syntax using VB in ASP.NET 2.0, there are plenty of c# examples on the net but they aren't h...
[ { "answer_id": 133907, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 3, "selected": true, "text": "Dim myHash as Dictionary(Of string, Dictionary(Of string, Integer));\n" }, { "answer_id": 141675, "author"...
2008/09/25
[ "https://Stackoverflow.com/questions/133887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12226/" ]
133,897
<p>I have a line that I draw in a window and I let the user drag it around. So, my line is defined by two points: (x1,y1) and (x2,y2). But now I would like to draw "caps" at the end of my line, that is, short perpendicular lines at each of my end points. The caps should be N pixels in length.</p> <p>Thus, to draw my "...
[ { "answer_id": 133952, "author": "David Nehme", "author_id": 14167, "author_profile": "https://Stackoverflow.com/users/14167", "pm_score": 8, "selected": true, "text": "dx = x1-x2\ndy = y1-y2\ndist = sqrt(dx*dx + dy*dy)\ndx /= dist\ndy /= dist\nx3 = x1 + (N/2)*dy\ny3 = y1 - (N/2)*dx\nx4 ...
2008/09/25
[ "https://Stackoverflow.com/questions/133897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12058/" ]
133,922
<p>This is a <em>super basic</em> question but I'm trying to execute a Query that I'm building via some form values against the MS Access database the form resides in. I don't think I need to go through ADO formally, but maybe I do.</p> <p>Anyway, some help would be appreciated. Sorry for being a n00b. ;)</p>
[ { "answer_id": 134347, "author": "jinsungy", "author_id": 1316, "author_profile": "https://Stackoverflow.com/users/1316", "pm_score": 2, "selected": false, "text": "Dim rs As DAO.Recordset\nDim db As Database\n\nSet db = CurrentDb\nSet rs = db.OpenRecordset(\"SELECT * FROM Attendance WHE...
2008/09/25
[ "https://Stackoverflow.com/questions/133922", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16562/" ]
133,925
<p>I'm trying to direct a browser to a different page. If I wanted a GET request, I might say</p> <pre><code>document.location.href = 'http://example.com/q=a'; </code></pre> <p>But the resource I'm trying to access won't respond properly unless I use a POST request. If this were not dynamically generated, I might use...
[ { "answer_id": 133996, "author": "Adam Ness", "author_id": 21973, "author_profile": "https://Stackoverflow.com/users/21973", "pm_score": 3, "selected": false, "text": "$req = new Ajax.Request(\"http://foo.com/bar.php\",{\n method: 'post',\n parameters: $H({\n name: 'Diodeus'...
2008/09/25
[ "https://Stackoverflow.com/questions/133925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16981/" ]
133,935
<p>For example, if I have an echo statement, there's no guarantee that the browser might display it right away, might display a few dozen echo statements at once, and might wait until the entire page is done before displaying anything.</p> <p>Is there a way to have each echo appear in a browser as it is executed?</p>
[ { "answer_id": 133972, "author": "Tom Haigh", "author_id": 22224, "author_profile": "https://Stackoverflow.com/users/22224", "pm_score": 1, "selected": false, "text": "flush() ob_flush()" }, { "answer_id": 133994, "author": "blueyed", "author_id": 15690, "author_profi...
2008/09/25
[ "https://Stackoverflow.com/questions/133935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/572/" ]
133,950
<p>What are the best/most popular ways to do aspect-oriented programming (AOP) in C#/.Net?</p>
[ { "answer_id": 134115, "author": "Romain Verdier", "author_id": 4687, "author_profile": "https://Stackoverflow.com/users/4687", "pm_score": 3, "selected": false, "text": "Spring.Aop" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/133950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6783/" ]
133,953
<p>I am developing, a simple SharePoint Sequential Workflow which should be bound to a document library. When associating the little workflow to a document library, I checked these options </p> <ul> <li>Allow this workflow to be manually started by an authenticated user with Edit Items Permissions. </li> <li>Start t...
[ { "answer_id": 368475, "author": "Johannes Hädrich", "author_id": 18246, "author_profile": "https://Stackoverflow.com/users/18246", "pm_score": 5, "selected": true, "text": "<Method ID='1' Cmd='Update'>\n <Field Name='ID'>1</Field>\n <Field Name='myDummyPropertyField'>NewValue</Field>\...
2008/09/25
[ "https://Stackoverflow.com/questions/133953", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18246/" ]
133,956
<p>I am currently running into a problem where an element is coming back from my xml file with a single quote in it. This is causing xml_parse to break it up into multiple chunks, example: Get Wired, You're Hired! Is then enterpreted as 'Get Wired, You' being one object, the single quote being a second, and 're Hired!'...
[ { "answer_id": 368475, "author": "Johannes Hädrich", "author_id": 18246, "author_profile": "https://Stackoverflow.com/users/18246", "pm_score": 5, "selected": true, "text": "<Method ID='1' Cmd='Update'>\n <Field Name='ID'>1</Field>\n <Field Name='myDummyPropertyField'>NewValue</Field>\...
2008/09/25
[ "https://Stackoverflow.com/questions/133956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22216/" ]
133,965
<p>How can I find/replace all CR/LF characters in Notepad++?</p> <p>I am looking for something equivalent to the ^p special character in Microsoft Word.</p>
[ { "answer_id": 133989, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 10, "selected": true, "text": "[\\r\\n]+ \\r\\n CRLF Normal EOL EOL EOL EOL LF \\n \\r \\r \\n \\r \\n ^ $ return;$ \\r \\n $ \\r\\n 0a Edit -> EOL Conversion...
2008/09/25
[ "https://Stackoverflow.com/questions/133965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8754/" ]
133,973
<p>I just came across an interesting situation in JavaScript. I have a class with a method that defines several objects using object-literal notation. Inside those objects, the <code>this</code> pointer is being used. From the behavior of the program, I have deduced that the <code>this</code> pointer is referring to...
[ { "answer_id": 134062, "author": "Rakesh Pai", "author_id": 20089, "author_profile": "https://Stackoverflow.com/users/20089", "pm_score": 3, "selected": false, "text": "this this new this this this" }, { "answer_id": 134100, "author": "Santiago Cepas", "author_id": 6547, ...
2008/09/25
[ "https://Stackoverflow.com/questions/133973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10861/" ]
133,977
<p>In VB6, I used a call to the Windows API, <strong>GetAsyncKeyState</strong>, to determine if the user has hit the ESC key to allow them to exit out of a long running loop.</p> <pre><code>Declare Function GetAsyncKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer </code></pre> <p>Is there an equivalent in pu...
[ { "answer_id": 134009, "author": "Franci Penov", "author_id": 17028, "author_profile": "https://Stackoverflow.com/users/17028", "pm_score": 3, "selected": true, "text": "[DllImport(\"user32.dll\")]\nstatic extern short GetAsyncKeyState(int vKey);\n" }, { "answer_id": 134179, ...
2008/09/25
[ "https://Stackoverflow.com/questions/133977", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16415/" ]
133,988
<p>I have a webapp that I am in the middle of doing some load/performance testing on, particularily on a feature where we expect a few hundred users to be accessing the same page and hitting refresh about every 10 seconds on this page. One area of improvement that we found we could make with this function was to cache ...
[ { "answer_id": 134014, "author": "Steve Jessop", "author_id": 13005, "author_profile": "https://Stackoverflow.com/users/13005", "pm_score": 7, "selected": true, "text": "final String firstkey = \"Data-\" + email;\nfinal String key = firstkey.intern();\n // do not attempt double-check loc...
2008/09/25
[ "https://Stackoverflow.com/questions/133988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4249/" ]
133,993
<p>We have a web application that can be deployed on many application servers, including Oracle 10g. On that platform, however, we are having classpath issues. The webapp uses JAXB 2, but Oracle 10g ships with JAXB 1, and this was causing errors. To get around those we configured Oracle to prefer classes in our weba...
[ { "answer_id": 226609, "author": "matt b", "author_id": 4249, "author_profile": "https://Stackoverflow.com/users/4249", "pm_score": 0, "selected": false, "text": "lib" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/133993", "https://Stackoverflow.com", "https://Stackoverflow.com/users/998/" ]
133,999
<p>What assemblies are loaded by default when you create a new ASP.NET 2.0 Web Application Project ?</p>
[ { "answer_id": 226609, "author": "matt b", "author_id": 4249, "author_profile": "https://Stackoverflow.com/users/4249", "pm_score": 0, "selected": false, "text": "lib" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/133999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13337/" ]
134,001
<p>I need to be able to load the entire contents of a text file and load it into a variable for further processing. </p> <p>How can I do that?</p> <hr> <p>Here's what I did thanks to Roman Odaisky's answer.</p> <pre><code>SetLocal EnableDelayedExpansion set content= for /F "delims=" %%i in (test.txt) do set conten...
[ { "answer_id": 134135, "author": "Roman Odaisky", "author_id": 21055, "author_profile": "https://Stackoverflow.com/users/21055", "pm_score": 5, "selected": true, "text": "for set content=\nfor /f \"delims=\" %%i in ('filename') do set content=%content% %%i\n setlocal enabledelayedexpansi...
2008/09/25
[ "https://Stackoverflow.com/questions/134001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/730/" ]
134,018
<p>I'm trying to create with Delphi a component inherited from TLabel, with some custom graphics added to it on TLabel.Paint. I want the graphics to be on left side of text, so I overrode GetClientRect:</p> <pre><code>function TMyComponent.GetClientRect: TRect; begin result := inherited GetClientRect; result.Left ...
[ { "answer_id": 134306, "author": "Germán Estévez -Neftalí-", "author_id": 17487, "author_profile": "https://Stackoverflow.com/users/17487", "pm_score": 3, "selected": true, "text": "procedure TGrlabel.DoDrawText(var Rect: TRect; Flags: Integer);\nbegin\n Rect.Left := 20;\n inherited;\n...
2008/09/25
[ "https://Stackoverflow.com/questions/134018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7735/" ]
134,029
<p>A quick Google search of this issue shows it's common, I just can't for the life of me figure out the solution in my case.</p> <p>I have a straight forward install of wxWidgets 2.8.8 for Windows straight from the wxWidgets website.</p> <p>Whenever I try to compile anything (such as the sample app described in "Fir...
[ { "answer_id": 209172, "author": "kbluck", "author_id": 13402, "author_profile": "https://Stackoverflow.com/users/13402", "pm_score": 6, "selected": true, "text": "nmake -f makefile.vc BUILD=debug nmake -f makefile.vc BUILD=release" }, { "answer_id": 7640751, "author": "Roger...
2008/09/25
[ "https://Stackoverflow.com/questions/134029", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
134,034
<p>I have a custom login component in Flex that is a simple form that dispatches a custom LoginEvent when a user click the login button:</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?> &lt;mx:Form xmlns:mx="http://www.adobe.com/2006/mxml" defaultButton="{btnLogin}"> &lt;mx:Metadata> [Event(name=...
[ { "answer_id": 134802, "author": "JustLogic", "author_id": 21664, "author_profile": "https://Stackoverflow.com/users/21664", "pm_score": 0, "selected": false, "text": "<custom:login_form id='cLogin' login='_handler' />\n" }, { "answer_id": 237949, "author": "Community", "...
2008/09/25
[ "https://Stackoverflow.com/questions/134034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1638/" ]
134,049
<p>Earlier this week I ask a question about filtering out duplicate values in sequence at run time. Had some good answers but the amount of data I was going over was to slow and not feasible.</p> <p>Currently in our database, event values are not filtered. Resulting in duplicate data values (with varying timestamps). ...
[ { "answer_id": 135031, "author": "Amy B", "author_id": 8155, "author_profile": "https://Stackoverflow.com/users/8155", "pm_score": 1, "selected": true, "text": "DECLARE @MyTable TABLE\n(\n DeviceName varchar(100),\n EventTime DateTime,\n OnOff int,\n GoodForRead int\n)\n\nINSERT INTO...
2008/09/25
[ "https://Stackoverflow.com/questions/134049", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20737/" ]
134,063
<p>Why are 'out' parameters in .NET a bad idea?</p> <p>I was recently asked this, but I had no real answer besides it's simply unnecessarily complicating an application. What other reasons are there?</p>
[ { "answer_id": 134076, "author": "GEOCHET", "author_id": 5640, "author_profile": "https://Stackoverflow.com/users/5640", "pm_score": 1, "selected": false, "text": "out" }, { "answer_id": 134084, "author": "Armin Ronacher", "author_id": 19990, "author_profile": "https:...
2008/09/25
[ "https://Stackoverflow.com/questions/134063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5469/" ]
134,064
<p>I am adding a service reference to one of my projects in Visual Studio 2008. On the "Service Reference Settings" screen I am selecting the default option which says "Reuse types in all referenced assemblies". I have referenced the project for which I want to reuse a type. That type is being passed in as a paramete...
[ { "answer_id": 300000, "author": "Rich Reuter", "author_id": 283, "author_profile": "https://Stackoverflow.com/users/283", "pm_score": 3, "selected": false, "text": "[assembly: ContractNamespace(\"YOUR_NAMESPACE_HERE\")]\n" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/134064", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1436/" ]
134,068
<p>I'm trying to achieve the equivalent of a WinForms <code>ListView</code> with its <code>View</code> property set to <code>View.List</code>. Visually, the following works fine. The file names in my <code>Listbox</code> go from top to bottom, and then wrap to a new column.</p> <p>Here's the basic XAML I'm working wit...
[ { "answer_id": 135908, "author": "Joel B Fant", "author_id": 22211, "author_profile": "https://Stackoverflow.com/users/22211", "pm_score": 4, "selected": true, "text": "KeyDown KeyDown Items ListBoxItem ListBoxItem Focus() MoveCurrentToLast() MoveCurrentToFirst() private void thelist_Key...
2008/09/25
[ "https://Stackoverflow.com/questions/134068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22211/" ]
134,086
<p>I wrote C++ for 10 years. I encountered memory problems, but they could be fixed with a reasonable amount of effort.</p> <p>For the last couple of years I've been writing C#. I find I still get lots of memory problems. They're difficult to diagnose and fix due to the non-determinancy, and because the C# philosophy ...
[ { "answer_id": 134141, "author": "Mark", "author_id": 5904, "author_profile": "https://Stackoverflow.com/users/5904", "pm_score": 4, "selected": false, "text": "class ParentObject\n Private mRelatedObject as New CRelatedObject\n public Readonly property RelatedObject() as CRelatedObj...
2008/09/25
[ "https://Stackoverflow.com/questions/134086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11898/" ]
134,099
<p>Let's say I have code like this:</p> <pre><code>$dbh = new PDO("blahblah"); $stmt = $dbh-&gt;prepare('SELECT * FROM users where username = :username'); $stmt-&gt;execute( array(':username' =&gt; $_REQUEST['username']) ); </code></pre> <p>The PDO documentation says:</p> <blockquote> <p>The parameters to prepare...
[ { "answer_id": 134138, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 9, "selected": false, "text": "' ' + (SELECT UserName + '_' + Password FROM Users LIMIT 1) + '\n" }, { "answer_id": 2681487, "author": "T...
2008/09/25
[ "https://Stackoverflow.com/questions/134099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/305/" ]
134,103
<p>On occasion, I find myself wanting to search the text of changelist descriptions in Perforce. There doesn't appear to be a way to do this in P4V. I can do it by redirecting the output of the changes command to a file...</p> <pre><code>p4 changes -l &gt; p4changes.txt </code></pre> <p>...(the -l switch tells it t...
[ { "answer_id": 134183, "author": "jop", "author_id": 11830, "author_profile": "https://Stackoverflow.com/users/11830", "pm_score": 4, "selected": false, "text": "select change from changes where description like '%text%' and p4options = 'longdesc'\n" }, { "answer_id": 1571910, ...
2008/09/25
[ "https://Stackoverflow.com/questions/134103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4228/" ]
134,125
<p>I have three <code>divs</code>:</p> <pre><code>&lt;div id="login" /&gt; &lt;div id="content" /&gt; &lt;div id="menu" /&gt; </code></pre> <p>How would I define the CSS styles (without touching the HTML) to have the <code>menu-div</code> as the left column, the <code>login-div</code> in the right column and the ...
[ { "answer_id": 134162, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 4, "selected": true, "text": "#menu {\n position:absolute;\n top:0;\n left:0;\n width:100px;\n}\n#content, #login {\n margin-left:120px;\n}\n ...
2008/09/25
[ "https://Stackoverflow.com/questions/134125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9632/" ]
134,158
<p>Please, provide code examples in a language of your choice.</p> <p><strong>Update</strong>: No constraints set on external storage.</p> <p>Example: Integers are received/sent via network. There is a sufficient space on local disk for intermediate results.</p>
[ { "answer_id": 135106, "author": "jfs", "author_id": 4279, "author_profile": "https://Stackoverflow.com/users/4279", "pm_score": 1, "selected": false, "text": "#!/usr/bin/env python\nimport random\nfrom sort import Pickle, Polyphase\n\n\nnrecords = 1000000\navailable_memory = 2000000 # n...
2008/09/25
[ "https://Stackoverflow.com/questions/134158", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4279/" ]
134,161
<p>I want to create a class which implements IEnumerable&lt;T&gt; but, using reflection, generates T's and returns them via IEnumerable&lt;T&gt;, where T' is a entirely constructed subclass of T with some properties hidden and others read-only. </p> <p>Okay., that might not be very clear. Let me explain this via the...
[ { "answer_id": 134318, "author": "Gilligan", "author_id": 12356, "author_profile": "https://Stackoverflow.com/users/12356", "pm_score": 1, "selected": false, "text": "new" }, { "answer_id": 134369, "author": "Romain Verdier", "author_id": 4687, "author_profile": "http...
2008/09/25
[ "https://Stackoverflow.com/questions/134161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3394/" ]
134,182
<p>Here's the code that I'm attempting to do:</p> <pre><code>public IList&lt;IOperator&gt; GetAll() { using (var c = new MyDataContext()) { return c.Operators.ToList(); } } </code></pre> <p>Operator implements IOperator, but I'm getting the following compilation error:</p> <pre><code>Cann...
[ { "answer_id": 134268, "author": "Panos", "author_id": 8049, "author_profile": "https://Stackoverflow.com/users/8049", "pm_score": 3, "selected": false, "text": "Cast<>() return c.Operators.Cast<IOperator>().ToList();\n" }, { "answer_id": 134370, "author": "kenstone", "au...
2008/09/25
[ "https://Stackoverflow.com/questions/134182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11097/" ]
134,214
<p>Right now, I have code that looks something like this:</p> <pre><code>Private Sub ShowReport(ByVal reportName As String) Select Case reportName Case "Security" Me.ShowSecurityReport() Case "Configuration" Me.ShowConfigurationReport() Case "RoleUsers" M...
[ { "answer_id": 134231, "author": "Rick Minerich", "author_id": 9251, "author_profile": "https://Stackoverflow.com/users/9251", "pm_score": 0, "selected": false, "text": "string ModuleName = \"TestAssembly.dll\";\nstring TypeName = \"TestClass\";\nstring MethodName = \"TestMethod\";\n\nAs...
2008/09/25
[ "https://Stackoverflow.com/questions/134214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/681/" ]
134,224
<p>This code produces a FileNotFoundException, but ultimately runs without issue:</p> <pre><code>void ReadXml() { XmlSerializer serializer = new XmlSerializer(typeof(MyClass)); //... } </code></pre> <p>Here is the exception:</p> <hr> <p>A first chance exception of type 'System.IO.FileNotFoundException' occu...
[ { "answer_id": 204993, "author": "flipdoubt", "author_id": 470, "author_profile": "https://Stackoverflow.com/users/470", "pm_score": 7, "selected": true, "text": "<!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension po...
2008/09/25
[ "https://Stackoverflow.com/questions/134224", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4066/" ]
134,237
<p>I'm trying to use the <code>this</code> keyword in a static method, but the compiler won't allow me to use it.</p> <p>Why not?</p>
[ { "answer_id": 134587, "author": "Timothy Carter", "author_id": 4660, "author_profile": "https://Stackoverflow.com/users/4660", "pm_score": 3, "selected": false, "text": "public static void StaticMethod(Object o)\n{\n MyClass.StaticProperty = o;\n}\n" }, { "answer_id": 135305...
2008/09/25
[ "https://Stackoverflow.com/questions/134237", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18931/" ]
134,251
<p>I have a basic C# console application that reads a text file (CSV format) line by line and puts the data into a HashTable. The first CSV item in the line is the key (id num) and the rest of the line is the value. However I've discovered that my import file has a few duplicate keys that it shouldn't have. When I try ...
[ { "answer_id": 134326, "author": "jop", "author_id": 11830, "author_profile": "https://Stackoverflow.com/users/11830", "pm_score": 4, "selected": true, "text": "if (myHashtable.ContainsKey(key))\n duplicates.Add(key);\nelse\n myHashtable.Add(key, value);\n" }, { "answer_id"...
2008/09/25
[ "https://Stackoverflow.com/questions/134251", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8664/" ]
134,253
<p>3-Tier design has been my standard design philosophy for years for database driven applications, and it has never failed me. For those who practice it, describe your layers.</p> <p>I've found that many people muddle up the business tier and the data access tier, making it more like a 2.5-Tier design.</p> <p>I pref...
[ { "answer_id": 1980663, "author": "Jason", "author_id": 240962, "author_profile": "https://Stackoverflow.com/users/240962", "pm_score": 0, "selected": false, "text": "Company.Data Company.Web PageBase Company.Web.WebApplication Company.Data\n Settings Setting SettingCollection Dim settin...
2008/09/25
[ "https://Stackoverflow.com/questions/134253", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
134,263
<p>Currently Tomcat's login support redirects users back to where they initially were when the application figured out they weren't logged in.</p> <p>For this particular application I need to force them to always go back to <code>index.jsp</code>.</p> <p>I'm pretty sure this is a simple configuration option in the WA...
[ { "answer_id": 136266, "author": "boes", "author_id": 17746, "author_profile": "https://Stackoverflow.com/users/17746", "pm_score": -1, "selected": false, "text": "<%\nif (request.getParameter(\"login\") == null) {\n response.sendRedirect(request.getContextPath() + \"/index.jsp?login\...
2008/09/25
[ "https://Stackoverflow.com/questions/134263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9594/" ]
134,295
<p>I've gone through just about every property I can think of, but haven't found a simple way to hide the header on a winform UltraCombo control from Infragistics.</p> <p>Headers make sense when I have multiple visible columns and whatnot, but sometimes it would be nice to hide it.</p> <p>To give a simple example, le...
[ { "answer_id": 134310, "author": "Craig", "author_id": 7861, "author_profile": "https://Stackoverflow.com/users/7861", "pm_score": 3, "selected": true, "text": "<DropDownLayout ColHeadersVisible=\"No\"></DropDownLayout>" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/134295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3743/" ]
134,309
<p>I'm an IIS guy and know its as simple as just using the <a href="http://[computername]/path" rel="noreferrer">http://[computername]/path</a> to webapp.. however, I can't seem to figure out how to make this possible for a JSP application I'm writing that runs under Tomcat. Is there a configuration setting I need to s...
[ { "answer_id": 46736522, "author": "John Rattz", "author_id": 5449970, "author_profile": "https://Stackoverflow.com/users/5449970", "pm_score": 2, "selected": false, "text": "Host CATALINA_HOME(Tomcat dir)/conf/server.xml tomcat#.exe # javaw javaw" }, { "answer_id": 56793684, ...
2008/09/25
[ "https://Stackoverflow.com/questions/134309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6350/" ]
134,331
<p>I'm familiar with some of the basics, but what I would like to know more about is when and why error handling (including throwing exceptions) should be used in PHP, especially on a live site or web app. Is it something that can be overused and if so, what does overuse look like? Are there cases where it shouldn't be...
[ { "answer_id": 134385, "author": "Teifion", "author_id": 1384652, "author_profile": "https://Stackoverflow.com/users/1384652", "pm_score": 2, "selected": false, "text": "try\n{\n // Code that may error\n}\ncatch (Exception $e)\n{\n // Do other stuff if there's an error\n}\n @mysql...
2008/09/25
[ "https://Stackoverflow.com/questions/134331", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13281/" ]
134,338
<p>In Java projects in Eclipse version 3.4.1 sometimes the folder "Referenced Libraries" disappears from the "Project Explorer" view. All third party jars are shown directly in the root of the project folder. The project compiles and runs fine. It seems to be a GUI problem.</p> <p>How can I get this folder back?</p>
[ { "answer_id": 11308148, "author": "user219882", "author_id": 419516, "author_profile": "https://Stackoverflow.com/users/419516", "pm_score": 3, "selected": false, "text": "down arrow Customize view Libraries from external" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/134338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3565/" ]
134,344
<p>Is there a way to retrieve the time zone choices in Windows Mobile in order to display them in a GUI? It would be much better not to have to show every 15 minutes just to be able to display GMT+5:45 for Kathmandu.</p>
[ { "answer_id": 232925, "author": "prakash", "author_id": 123, "author_profile": "https://Stackoverflow.com/users/123", "pm_score": 1, "selected": false, "text": "Note Microsoft bears no responsibility for the content or\nusage of these files. Certain locales have specific legal require...
2008/09/25
[ "https://Stackoverflow.com/questions/134344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
134,374
<p>I would like to listen to method calls.</p> <p>For example, when an element is appended by anything to the document, I would like to be passed that element to act on it, like:</p> <p>//somewhere</p> <pre><code>aParent.appendChild(aChild); </code></pre> <p>//when the former, a function I defined as listener is ca...
[ { "answer_id": 134420, "author": "Filini", "author_id": 21162, "author_profile": "https://Stackoverflow.com/users/21162", "pm_score": 1, "selected": false, "text": "\nfunction AppendChild(oParent, oChild) {\n\n // your stuff on oParent\n\n // append oChild\n oParent.appendChild(oCh...
2008/09/25
[ "https://Stackoverflow.com/questions/134374", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
134,379
<p>Is it possible to do a <code>SELECT</code> statement with a predetermined order, ie. selecting IDs 7,2,5,9 and 8 <strong>and returning them in that order</strong>, based on nothing more than the ID field?</p> <p>Both these statements return them in the same order: </p> <pre><code>SELECT id FROM table WHERE id in (...
[ { "answer_id": 134394, "author": "JosephStyons", "author_id": 672, "author_profile": "https://Stackoverflow.com/users/672", "pm_score": 0, "selected": false, "text": "SELECT ID_FIELD\nFROM SOME_TABLE\nWHERE ID_FIELD IN(11,10,14,12,13)\nORDER BY\n CASE WHEN ID_FIELD = 11 THEN 0\n W...
2008/09/25
[ "https://Stackoverflow.com/questions/134379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21716/" ]
134,387
<p>I have a Pylons app where I would like to move some of the logic to a separate batch process. I've been running it under the main app for testing, but it is going to be doing a lot of work in the database, and I'd like it to be a separate process that will be running in the background constantly. The main pylons...
[ { "answer_id": 784421, "author": "Ben Bangert", "author_id": 95274, "author_profile": "https://Stackoverflow.com/users/95274", "pm_score": 4, "selected": false, "text": "from paste.deploy import appconfig\nfrom pylons import config\n\nfrom YOURPROJ.config.environment import load_environm...
2008/09/25
[ "https://Stackoverflow.com/questions/134387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1566663/" ]
134,392
<p>I have a form in which people will be entering dollar values.</p> <p>Possible inputs:<br> $999,999,999.99<br> 999,999,999.99<br> 999999999<br> 99,999<br> $99,999<br></p> <p>The user can enter a dollar value however they wish. I want to read the inputs as doubles so I can total them.</p> <p>I tried just typecastin...
[ { "answer_id": 134458, "author": "Frosty", "author_id": 7476, "author_profile": "https://Stackoverflow.com/users/7476", "pm_score": 0, "selected": false, "text": " m/^\\$?(\\d+)(?:\\.(\\d\\d))?$/\n $value = $1 + $2/100;\n" }, { "answer_id": 134467, "author": "Derek Park", ...
2008/09/25
[ "https://Stackoverflow.com/questions/134392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16292/" ]
134,453
<p>Are there any tools available to log the page load time for a php site?</p> <p>Mainly looking for something that I can see trends of load times over time, I was considering dumping them into a file using error_log(), but I don't know what I could use to parse it and display graphs</p>
[ { "answer_id": 134503, "author": "Buzz", "author_id": 13113, "author_profile": "https://Stackoverflow.com/users/13113", "pm_score": 3, "selected": false, "text": "footer() $time_start = microtime_float();\n\nfunction microtime_float() {\n list($usec, $sec) = explode(\" \", microtime())...
2008/09/25
[ "https://Stackoverflow.com/questions/134453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
134,456
<p>This</p> <pre><code>SELECT * FROM SOME_TABLE WHERE SOME_FIELD LIKE '%some_value%'; </code></pre> <p>is slower than this</p> <pre><code>SELECT * FROM SOME_TABLE WHERE SOME_FIELD = 'some_value'; </code></pre> <p>but what about this?</p> <pre><code>SELECT * FROM SOME_TABLE WHERE SOME_FIELD LIKE 'some_value'; </cod...
[ { "answer_id": 134527, "author": "Jon Ericson", "author_id": 1438, "author_profile": "https://Stackoverflow.com/users/1438", "pm_score": 2, "selected": false, "text": "insert into some_table (some_field) values ('some_value');\ninsert into some_table (some_fieled) values ('1some_value2')...
2008/09/25
[ "https://Stackoverflow.com/questions/134456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/672/" ]
134,459
<p>I'm refactoring "spaghetti code" C module to work in multitasking (RTOS) environment.</p> <p>Now, there are very long functions and many unnecessary global variables.</p> <p>When I try to replace global variables that exists only in one function with locals, I get into dilemma. Every global variable is behave like...
[ { "answer_id": 134516, "author": "Frosty", "author_id": 7476, "author_profile": "https://Stackoverflow.com/users/7476", "pm_score": 0, "selected": false, "text": "int global_c; // can be used by any other file with 'extern int global_c;'\n\nstatic int static_c; // cannot be seen or used ...
2008/09/25
[ "https://Stackoverflow.com/questions/134459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22249/" ]
134,463
<p>I am using a popup menu in Delphi. I want to use it in a "radio group" fashion where if the user selects an item it is checked and the other items are not checked. I tried using the AutoCheck property, but this allows multiple items to be checked. Is there a way to set the popup menu so that only one item can be ...
[ { "answer_id": 134583, "author": "JosephStyons", "author_id": 672, "author_profile": "https://Stackoverflow.com/users/672", "pm_score": 4, "selected": true, "text": "procedure TForm2.OnPopupItemClick(Sender: TObject);\nvar\n i : integer;\nbegin\n with (Sender as TMenuItem) do begin\n ...
2008/09/25
[ "https://Stackoverflow.com/questions/134463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12833/" ]
134,470
<p>I have two controllers which share most of their code (but must be, nonetheless, different controllers). The obvious solution (to me, at least) is to create a class, and make the two controllers inherit from it. The thing is... where to put it? Now I have it in app_controller.php, but it's kind of messy there.</p>
[ { "answer_id": 134504, "author": "tyshock", "author_id": 16448, "author_profile": "https://Stackoverflow.com/users/16448", "pm_score": 4, "selected": true, "text": "<?php\nclass UtilComponent extends Object {\n function yourMethod($param) {\n // logic here.......\n\n ret...
2008/09/25
[ "https://Stackoverflow.com/questions/134470", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18396/" ]
134,481
<p>What I have now (which successfully loads the plug-in) is this:</p> <pre><code>Assembly myDLL = Assembly.LoadFrom("my.dll"); IMyClass myPluginObject = myDLL.CreateInstance("MyCorp.IMyClass") as IMyClass; </code></pre> <p>This only works for a class that has a constructor with no arguments. How do I pass in an argu...
[ { "answer_id": 134502, "author": "MagicKat", "author_id": 8505, "author_profile": "https://Stackoverflow.com/users/8505", "pm_score": 2, "selected": false, "text": "public object CreateInstance(string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, Cult...
2008/09/25
[ "https://Stackoverflow.com/questions/134481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22252/" ]
134,492
<p>I am able to serialize an object into a file and then restore it again as is shown in the next code snippet. I would like to serialize the object into a string and store into a database instead. Can anyone help me?</p> <pre><code>LinkedList&lt;Diff_match_patch.Patch&gt; patches = // whatever... FileOutputStream fil...
[ { "answer_id": 134556, "author": "Daniel Spiewak", "author_id": 9815, "author_profile": "https://Stackoverflow.com/users/9815", "pm_score": 2, "selected": false, "text": "BLOB XMLEncoder" }, { "answer_id": 134661, "author": "Sergio del Amo", "author_id": 2138, "author...
2008/09/25
[ "https://Stackoverflow.com/questions/134492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2138/" ]
134,494
<p>I wasn't aware of a difference, but a coworker says there is, although he can't back it up. What's the difference if any?</p>
[ { "answer_id": 134557, "author": "ZachPruckowski", "author_id": 22255, "author_profile": "https://Stackoverflow.com/users/22255", "pm_score": 3, "selected": false, "text": "<whatever /> <whatever>" }, { "answer_id": 20547914, "author": "Kent Pawar", "author_id": 985766, ...
2008/09/25
[ "https://Stackoverflow.com/questions/134494", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18931/" ]
134,501
<p>Usually when I need to fork in C, I do something like this:</p> <pre><code>pid_t p = fork(); if(p == 0) { /* do child stuff */ } else { /* do parent stuff and pray there wasn't an error */ } </code></pre> <p>It occured to me that I could ditch the extra variable and use:</p> <pre><code>if(fork() == 0) { /* child ...
[ { "answer_id": 134531, "author": "Charles Graham", "author_id": 7705, "author_profile": "https://Stackoverflow.com/users/7705", "pm_score": 2, "selected": false, "text": "int p;\nif((p = fork()) == 0) { /* child */ }\nelse { /* parent/pray */ }\n" }, { "answer_id": 134545, "a...
2008/09/25
[ "https://Stackoverflow.com/questions/134501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12926/" ]
134,505
<p>I've found mention of a data application block existing for ODBC, but can't seem to find it anywhere. If i didn't have a copy of the Access DB application block I wouldn't believe it ever existed either.</p> <p>Anyone know where to download either the DLL or the code-base from?</p> <p>--UPDATE: It is NOT include...
[ { "answer_id": 1014310, "author": "ChrisC_46259", "author_id": 95063, "author_profile": "https://Stackoverflow.com/users/95063", "pm_score": 3, "selected": true, "text": "Imports Microsoft.Practices.EnterpriseLibrary.Data\nImports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling\n...
2008/09/25
[ "https://Stackoverflow.com/questions/134505", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1795/" ]
134,517
<p>I distribute software online, and always wonder if there is a proper way to better define version numbers.</p> <p>Let's assume A.B.C.D in the answers. When do you increase each of the components?</p> <p>Do you use any other version number tricks such as D mod 2 == 1 means it is an in house release only?</p> <p>D...
[ { "answer_id": 134647, "author": "MusiGenesis", "author_id": 14606, "author_profile": "https://Stackoverflow.com/users/14606", "pm_score": 2, "selected": false, "text": "1.1.2.3\n 1.0.1.23\n 1.0.1.12537\n" }, { "answer_id": 134695, "author": "JosephStyons", "author_id": 6...
2008/09/25
[ "https://Stackoverflow.com/questions/134517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3153/" ]
134,520
<p>Okay, this is just a crazy idea I have. Stack Overflow looks very structured and integrable into development applications. So would it be possible, even useful, to have a Stack Overflow plugin for, say, Eclipse? </p> <p>Which features of Stack Overflow would you like to have directly integrated into your IDE so you...
[ { "answer_id": 134588, "author": "Chris Wenham", "author_id": 5548, "author_profile": "https://Stackoverflow.com/users/5548", "pm_score": 2, "selected": false, "text": "//# read an XML file\n" }, { "answer_id": 134935, "author": "Chris Lawlor", "author_id": 21245, "au...
2008/09/25
[ "https://Stackoverflow.com/questions/134520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19734/" ]
134,569
<p>I would like to throw an exception when my C++ methods encounter something weird and can't recover. Is it OK to throw a <code>std::string</code> pointer?</p> <p>Here's what I was looking forward to doing:</p> <pre><code>void Foo::Bar() { if(!QueryPerformanceTimer(&amp;m_baz)) { throw new std::string("i...
[ { "answer_id": 134596, "author": "Daniel Spiewak", "author_id": 9815, "author_profile": "https://Stackoverflow.com/users/9815", "pm_score": 3, "selected": false, "text": "std::string string" }, { "answer_id": 134612, "author": "PierreBdR", "author_id": 7136, "author_p...
2008/09/25
[ "https://Stackoverflow.com/questions/134569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22187/" ]
134,572
<p>I am using the jQuery AutoComplete plugin in an html page where I also have an accordion menu which uses prototype.</p> <p>They both work perfectly separately but when I tried to implement both components in a single page I get an error that I have not been able to understand.</p> <blockquote> <p>uncaught except...
[ { "answer_id": 134635, "author": "Tahir Akhtar", "author_id": 18027, "author_profile": "https://Stackoverflow.com/users/18027", "pm_score": 3, "selected": false, "text": "$ var J = jQuery.noConflict();\n" }, { "answer_id": 136502, "author": "John Resig", "author_id": 6524...
2008/09/25
[ "https://Stackoverflow.com/questions/134572", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
134,574
<p>I am working on a web application developed on C#/ASP.NET. We are using third-party controls for displaying Grids, Tabs, Trees and other complex controls in our pages. The problem is that these controls render a huge amount of HTML. Due to this the size of pages have grown heavily and the browser takes a while to lo...
[ { "answer_id": 134625, "author": "Jason N. Gaylord", "author_id": 21318, "author_profile": "https://Stackoverflow.com/users/21318", "pm_score": 2, "selected": false, "text": "ViewState ViewState" }, { "answer_id": 142852, "author": "scunliffe", "author_id": 6144, "aut...
2008/09/25
[ "https://Stackoverflow.com/questions/134574", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965628/" ]
134,575
<p>I'm very early in the iPhone development learning process. I'm trying to get my head around various pieces. Right now I've just taken the basic NavigationController template and I'm trying to create a simple grouped table view with a couple of text fields. What I can't seem to do is to get Interface Builder to al...
[ { "answer_id": 136384, "author": "user19087", "author_id": 19087, "author_profile": "https://Stackoverflow.com/users/19087", "pm_score": 3, "selected": false, "text": "IBOutlets UITableViewCell UIViewController UITableController IBOutlet UITableViewCell *cellFactory UITableViewDataSource...
2008/09/25
[ "https://Stackoverflow.com/questions/134575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13036/" ]
134,581
<p>This is a follow-up to <a href="https://stackoverflow.com/questions/43778/sqlite3-ruby-gem-failed-to-build-gem-native-extension">this question</a>.</p> <p>When I issue the <strong><code>gem update</code></strong> command on Windows, whenever it gets to a gem whose latest version DOESN'T have Windows binaries, it'll...
[ { "answer_id": 136226, "author": "hectorsq", "author_id": 14755, "author_profile": "https://Stackoverflow.com/users/14755", "pm_score": 2, "selected": false, "text": "gem install sqlite3-ruby --version '1.2.3'\n" }, { "answer_id": 144510, "author": "Charles Roper", "autho...
2008/09/25
[ "https://Stackoverflow.com/questions/134581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1944/" ]
134,626
<p>I mostly use lambda functions but sometimes use nested functions that seem to provide the same behavior.</p> <p>Here are some trivial examples where they functionally do the same thing if either were found within another function:</p> <p><strong>Lambda function</strong></p> <pre><code>&gt;&gt;&gt; a = lambda x : 1 +...
[ { "answer_id": 134638, "author": "nosklo", "author_id": 17160, "author_profile": "https://Stackoverflow.com/users/17160", "pm_score": 8, "selected": true, "text": "lambda def def lambda map() filter() operator operator.add lambda x, y: x + y lambda def operator def lambda" }, { "...
2008/09/25
[ "https://Stackoverflow.com/questions/134626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
134,629
<p>In my <code>urls.py</code> file, I have:</p> <pre><code>from myapp import views ... (r'^categories/$', views.categories) </code></pre> <p>Where <code>categories</code> is a view function inside <code>myapp/views.py</code>. No other URLconf lines reference <code>views.categories</code>.</p> <p>In a unit test file,...
[ { "answer_id": 134651, "author": "Jack M.", "author_id": 3421, "author_profile": "https://Stackoverflow.com/users/3421", "pm_score": -1, "selected": false, "text": "urlpatterns = patterns('',\n (r'^no_monkeys/$', 'views.noMonkeys', {}, \"no-monkeys\"),\n (r'^admin/(.*)', admin.site...
2008/09/25
[ "https://Stackoverflow.com/questions/134629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20578/" ]
134,644
<p>Suppose you have a collection of <code>Foo</code> classes:</p> <pre><code>class Foo { public string Bar; public string Baz; } List&lt;Foo&gt; foolist; </code></pre> <p>And you want to check this collection to see if another entry has a matching <code>Bar</code>.</p> <pre><code>bool isDuplicate = false; f...
[ { "answer_id": 134675, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 2, "selected": false, "text": "public class MyFooComparer: IEqualityComparer<Foo> {\n\n public bool Equals(Foo foo1, Foo foo2) {\n return Eq...
2008/09/25
[ "https://Stackoverflow.com/questions/134644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
134,650
<p>What is your preferred method for reading through the contents of zipped directories with Perl ?</p>
[ { "answer_id": 135102, "author": "David Nehme", "author_id": 14167, "author_profile": "https://Stackoverflow.com/users/14167", "pm_score": 1, "selected": false, "text": "open(DIR_LISTING, \"gzip -dc concert25.tgz | tar -tf -|\") || die;\nwhile (<DIR_LISTING>) {\n print;\n}\nclose (DIR_...
2008/09/25
[ "https://Stackoverflow.com/questions/134650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2759/" ]
134,653
<p><b>Summary:</b> C#/.NET is supposed to be garbage collected. C# has a destructor, used to clean resources. What happen when an object A is garbage collected the same line I try to clone one of its variable members? Apparently, on multiprocessors, sometimes, the garbage collector wins...</p> <p><b>The problem</b></p>...
[ { "answer_id": 134687, "author": "paercebal", "author_id": 14089, "author_profile": "https://Stackoverflow.com/users/14089", "pm_score": 0, "selected": false, "text": "using System;\nusing System.Threading;\n\npublic class Example\n{\n private int nValue;\n public int N { get { ret...
2008/09/25
[ "https://Stackoverflow.com/questions/134653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14089/" ]
134,655
<p>What are the advantages/disadvantages of the major Ruby VMs (things like features, compatibility, performance, and quirks?) I know there are also some bonus features like being able to use Java interfaces through JRuby, too. Those would also be helpful to note. Does any VM have a clear advantage at this point, and i...
[ { "answer_id": 134687, "author": "paercebal", "author_id": 14089, "author_profile": "https://Stackoverflow.com/users/14089", "pm_score": 0, "selected": false, "text": "using System;\nusing System.Threading;\n\npublic class Example\n{\n private int nValue;\n public int N { get { ret...
2008/09/25
[ "https://Stackoverflow.com/questions/134655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9128/" ]
134,656
<p>Where can I find a Perl module for converting a Perl data structure into a JavaScript one?</p> <p>e.g. this is my code (Mason):</p> <pre><code>% # convert our @cti data structure into a javascript one var cti = [ % foreach my $cti_category (@cti) { { label: "&lt;% $cti_category-&gt;...
[ { "answer_id": 135182, "author": "Penfold", "author_id": 11952, "author_profile": "https://Stackoverflow.com/users/11952", "pm_score": 4, "selected": false, "text": "use JSON::Any;\n\nmy $j = JSON::Any->new;\n\n$json = $j->objToJson($perl_data);\n" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/134656", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8913/" ]
134,658
<p>I am trying to encrypt the "system.web.membership" element within the Web.Config of our .Net application to secure username and password to Active Directory. I am using the aspnet_regiis command to encrypt, and have tried several different strings for the value of the "pe" option with no success. I have successfully...
[ { "answer_id": 134733, "author": "Paul Lalonde", "author_id": 5782, "author_profile": "https://Stackoverflow.com/users/5782", "pm_score": 4, "selected": true, "text": "system.web/membership membership system.web.membership" }, { "answer_id": 638730, "author": "Ben Mills", ...
2008/09/25
[ "https://Stackoverflow.com/questions/134658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/576/" ]
134,673
<p>I've got a VS2008 deployment project that builds an installer for a couple of Windows services.</p> <p>Each service references several different projects:</p> <pre> CustomerName.MailSendingService -> CustomerName.Network -> CustomerName.Data -> CustomerName.Security CustomerName.ProductIntegrationService -> C...
[ { "answer_id": 152295, "author": "Benjol", "author_id": 11410, "author_profile": "https://Stackoverflow.com/users/11410", "pm_score": 0, "selected": false, "text": "public const string LockPanelUrn = \"ApplicationRack.LockPanel\";\n" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/134673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18102/" ]
134,680
<p>I have a DataGrid, with an ItemTemplate that has an image and label. In the EditItemTemplate the label is replaced by a textbox. My problem is that the edit template only shows when I click the Edit button the second time. What gives?</p>
[ { "answer_id": 134715, "author": "EndangeredMassa", "author_id": 106, "author_profile": "https://Stackoverflow.com/users/106", "pm_score": 1, "selected": false, "text": "If Not Page.IsPostBack() Then\n DoDataBinding()\nEnd If\n" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/134680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8741/" ]
134,683
<p>This might be a stupid question but if there's a better or proper way to do this, I'd love to learn it.</p> <p>I have run across this a few times, including recently, where small spaces show up in the rendered version of my HTML page. Intuitively I think these should not be there because outside of text or entities...
[ { "answer_id": 134701, "author": "rslite", "author_id": 15682, "author_profile": "https://Stackoverflow.com/users/15682", "pm_score": 5, "selected": true, "text": "<a href=\"page1.html\"><img src=\"image1.png\" \n/></a><a href=\"page2.html\"><img src=\"image2.png\" \n/></a><a href=\"page...
2008/09/25
[ "https://Stackoverflow.com/questions/134683", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2577/" ]
134,691
<p>I am trying to create a jar file which includes some class and java files needed, but I also would like to include some extra xml, xsl, html, txt (README) files.</p> <p>I am using Eclipse on Windows XP.</p> <p>Is there an easy way for me to set up a directory structure and package all my files into a jar?</p>
[ { "answer_id": 134744, "author": "JeeBee", "author_id": 17832, "author_profile": "https://Stackoverflow.com/users/17832", "pm_score": 0, "selected": false, "text": "<target name=\"makejar\" depends=\"compile, copyfiles\">\n\n <jar destfile=\"${jars.dir}/myjarfile.jar\" index=\"true\" ...
2008/09/25
[ "https://Stackoverflow.com/questions/134691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
134,698
<p>I always felt that expecting exceptions to be thrown on a regular basis and using them as flow logic was a bad thing. Exceptions feel like they should be, well, the "<em>exception</em>". If you're expecting and planning for an exception, that would seem to indicate that your code should be refactored, at least in ...
[ { "answer_id": 134766, "author": "Rob Cooper", "author_id": 832, "author_profile": "https://Stackoverflow.com/users/832", "pm_score": 3, "selected": true, "text": "File.Exists File.Exists" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/134698", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12975/" ]
134,712
<p>I would like to sort a matrix according to a particular column. There is a <code>sort</code> function, but it sorts all columns independently.</p> <p>For example, if my matrix <code>data</code> is:</p> <pre><code> 1 3 5 7 -1 4 </code></pre> <p>Then the desired output (sorting by the first column) wou...
[ { "answer_id": 135115, "author": "Kena", "author_id": 8027, "author_profile": "https://Stackoverflow.com/users/8027", "pm_score": 7, "selected": true, "text": ">> sortrows(data,1)\n\nans =\n\n -1 4\n 1 3\n 5 7\n" }, { "answer_id": 35832813, "author": "A...
2008/09/25
[ "https://Stackoverflow.com/questions/134712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9425/" ]
134,727
<p>What are the key differences between <a href="http://www.w3.org/TR/REC-html40/" rel="noreferrer">HTML4</a> and <a href="http://www.w3.org/html/wg/html5/" rel="noreferrer">HTML5 draft</a>?</p> <p>Please keep the answers related to changed syntax and added/removed html elements.</p>
[ { "answer_id": 577778, "author": "Xanthir", "author_id": 58347, "author_profile": "https://Stackoverflow.com/users/58347", "pm_score": 9, "selected": true, "text": "<canvas> <video> <audio> <strong> <em> <b> <i> <article> <section> <header> <aside> <nav> <div> </div> </header> </article>...
2008/09/25
[ "https://Stackoverflow.com/questions/134727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21473/" ]
134,728
<p>I have a class declared as follows:</p> <pre><code>Public MustInherit Container(Of T As {New, BaseClass}) Inherits ArrayList(Of T) </code></pre> <p>I have classes that inherit this class.</p> <p>I have another class that I must pass instances in this method:</p> <pre><code>Public Sub LoadCollection(Of T As {Base...
[ { "answer_id": 137165, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "Private _Container as Container(Of BaseClass)\n" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/134728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4770/" ]
134,731
<p>Whilst refactoring some code I came across some getter methods that returns a std::string. Something like this for example:</p> <pre><code>class foo { private: std::string name_; public: std::string name() { return name_; } }; </code></pre> <p>Surely the getter would be better returning a ...
[ { "answer_id": 134777, "author": "Dima", "author_id": 13313, "author_profile": "https://Stackoverflow.com/users/13313", "pm_score": 7, "selected": true, "text": "foo *pFoo = new foo;\nconst std::string &myName = pFoo->getName();\ndelete pFoo;\ncout << myName; // error! dangling referenc...
2008/09/25
[ "https://Stackoverflow.com/questions/134731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9236/" ]
134,741
<p>Is there anyway to have items in an ASP.NET DropDownList have either their Text or Value bound to a method on the source rather than a property? </p>
[ { "answer_id": 134879, "author": "HectorMac", "author_id": 1400, "author_profile": "https://Stackoverflow.com/users/1400", "pm_score": -1, "selected": false, "text": "<asp:DropDownList ID=\"ddlType\" runat=\"server\" Width=\"250px\" AppendDataBoundItems=\"true\" DataSourceID=\"dsTypeList...
2008/09/25
[ "https://Stackoverflow.com/questions/134741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11097/" ]
134,742
<p>I have a data table with a variable number of columns and a data scroller. How can I enable server side sorting? I prefer that it be fired by the user clicking the column header.</p> <pre><code>&lt;rich:datascroller for="instanceList" actionListener="#{pageDataModel.pageChange}"/&gt; &lt;rich:dataTable id="instance...
[ { "answer_id": 135958, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 4, "selected": true, "text": "<h:outputText value=\"#{column}\">\n <a4j:support event=\"onclick\" action=\"#{pageDataModel.sort(idx)}\"\n ev...
2008/09/25
[ "https://Stackoverflow.com/questions/134742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4893/" ]
134,746
<p>What is the difference between <code>bool</code> and <code>Boolean</code> types in C#?</p>
[ { "answer_id": 134760, "author": "bhinks", "author_id": 5877, "author_profile": "https://Stackoverflow.com/users/5877", "pm_score": 6, "selected": false, "text": "bool System.Boolean" }, { "answer_id": 134771, "author": "Kent Boogaart", "author_id": 5380, "author_prof...
2008/09/25
[ "https://Stackoverflow.com/questions/134746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13227/" ]
134,748
<p>I am currently working on a program to immediately clear the list of previously-run-commands which appears in the Windows <em>Start</em> -> <em>Run</em> dialog. The procedure for clearing this list by removing the <em>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU</em> key is <a href="h...
[ { "answer_id": 3842993, "author": "csauve", "author_id": 65580, "author_profile": "https://Stackoverflow.com/users/65580", "pm_score": 0, "selected": false, "text": " using System.Diagnostics;\n\n Process[] procs = Process.GetProcessesByName(\"explorer\");\n foreach (Process proc in p...
2008/09/25
[ "https://Stackoverflow.com/questions/134748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12657/" ]
134,778
<p>I work for a product development company.We first do internal releases,and then public release.I was wondering, how other product developing companies manage their release? How do you give release number? Tag the source control?</p>
[ { "answer_id": 134826, "author": "Ben Straub", "author_id": 1319, "author_profile": "https://Stackoverflow.com/users/1319", "pm_score": 1, "selected": false, "text": "R_2_1 R_2_1_0 R_X_Y R_2_1_1 Mainline\n|\n|- R_2_1\n| |\n| |-R_2_1_0 (locked)\n| |\n| |\n| |-R_2_1_1 (locked)\n| |\n...
2008/09/25
[ "https://Stackoverflow.com/questions/134778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
134,796
<p>I know I can compile individual source files, but sometimes -- say, when editing a header file used by many <code>.cpp</code> files -- multiple source files need to be recompiled. That's what Build is for.</p> <p>Default behavior of the "Build" command in VC9 (Visual C++ 2008) is to attempt to compile all files th...
[ { "answer_id": 194748, "author": "jmatthias", "author_id": 2768, "author_profile": "https://Stackoverflow.com/users/2768", "pm_score": 4, "selected": false, "text": "Private Sub BuildEvents_OnBuildProjConfigDone(ByVal Project As String, ByVal ProjectConfig As String, ByVal Platform As St...
2008/09/25
[ "https://Stackoverflow.com/questions/134796", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10559/" ]
134,815
<p>Is there a way to listen for a javascript function to exit? A trigger that could be setup when a function has completed?</p> <p>I am attempting to use a user interface obfuscation technique (BlockUI) while an AJAX object is retrieving data from the DB, but the function doesn't necessarily execute last, even if you ...
[ { "answer_id": 134839, "author": "Adam Tuttle", "author_id": 751, "author_profile": "https://Stackoverflow.com/users/751", "pm_score": 3, "selected": true, "text": "function ajaxCall(callback){\n //do ajax stuff...\n callback();\n}\n function doStuff(){\n blockUI();\n ajaxCal...
2008/09/25
[ "https://Stackoverflow.com/questions/134815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5405/" ]
134,833
<p>I have an <em>index.php</em> file which has to process many different file types. How do I guess the filetype based on the <code>REQUEST_URI</code>?</p> <p>If I request <code>http://site/image.jpg</code>, and all requests redirect through <em>index.php</em>, which looks like this</p> <pre><code>&lt;?php include('...
[ { "answer_id": 134916, "author": "phatduckk", "author_id": 3896, "author_profile": "https://Stackoverflow.com/users/3896", "pm_score": 0, "selected": false, "text": "[getimagesize()][1] mime_content_type()" }, { "answer_id": 134930, "author": "Eric_WVGG", "author_id": 829...
2008/09/25
[ "https://Stackoverflow.com/questions/134833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/144/" ]
134,834
<p>This is really the first thing that I have written in python. I come from Java background. I don't want to just learn how to program java code with Python syntax. I want to learn how to program in a pythonic paradigm.</p> <p>Could you guys please comment on how I can make the following code more pythonic?</p> <...
[ { "answer_id": 134946, "author": "mbac32768", "author_id": 18446, "author_profile": "https://Stackoverflow.com/users/18446", "pm_score": 2, "selected": false, "text": "def transformFactorList(factorList):\n oldsize = len(factorList)\n factorList = [f for f in factorList if f != 2]\...
2008/09/25
[ "https://Stackoverflow.com/questions/134834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2598/" ]