qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
115,928
<p>I need to have a thread signal another if the user wishes to interrupt execution, however I'm unsure about how to implement the signaling/signal-checking mechanism. I wouldn't like to have a singleton in my project (like a global <code>bool</code>), but is there an alternative?</p> <p>In <a href="https://stackoverf...
[ { "answer_id": 115962, "author": "Matt Howells", "author_id": 16881, "author_profile": "https://Stackoverflow.com/users/16881", "pm_score": 4, "selected": true, "text": "private volatile bool cancelling;\n" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/115928", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4850/" ]
115,955
<p>I'm trying to run a LINQ to SQL query that returns a result in a grid view in a search engine style listing. </p> <p>In the simplified example below, is it possible to populate the collection with a comma-separated list of any children that the parent has (NAMESOFCHILDREN) in a single query?</p> <pre><code>var fa...
[ { "answer_id": 115965, "author": "Amy B", "author_id": 8155, "author_profile": "https://Stackoverflow.com/users/8155", "pm_score": 3, "selected": true, "text": "int parentID = Convert.ToInt32(Request.QueryString[\"parentId\"]);\n\nList<string> result =\n db.Parents\n .Where(p => p.Pare...
2008/09/22
[ "https://Stackoverflow.com/questions/115955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2034/" ]
115,971
<p>I'm getting an error message when I try to build my project in eclipse:</p> <p><code>The type weblogic.utils.expressions.ExpressionMap cannot be resolved. It is indirectly referenced from required .class files</code></p> <p>I've looked online for a solution and cannot find one (except for those sites that make y...
[ { "answer_id": 116004, "author": "Kevin", "author_id": 8530, "author_profile": "https://Stackoverflow.com/users/8530", "pm_score": 6, "selected": true, "text": "path->configure Add Library->Server Runtime Windows->Preferences->Server->Installed runtimes" }, { "answer_id": 4044027...
2008/09/22
[ "https://Stackoverflow.com/questions/115971", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1459442/" ]
115,974
<p>What would be the simplest way to daemonize a python script in Linux ? I need that this works with every flavor of Linux, so it should only use python based tools. </p>
[ { "answer_id": 116035, "author": "Florian Bösch", "author_id": 19435, "author_profile": "https://Stackoverflow.com/users/19435", "pm_score": 5, "selected": true, "text": "from os import fork, setsid, umask, dup2\nfrom sys import stdin, stdout, stderr\n\nif fork(): exit(0)\numask(0) \nset...
2008/09/22
[ "https://Stackoverflow.com/questions/115974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14262/" ]
115,977
<p>I would very much like to integrate <a href="http://www.logilab.org/857" rel="noreferrer">pylint</a> into the build process for my python projects, but I have run into one show-stopper: One of the error types that I find extremely useful--:<code>E1101: *%s %r has no %r member*</code>--constantly reports errors when...
[ { "answer_id": 116047, "author": "freespace", "author_id": 8297, "author_profile": "https://Stackoverflow.com/users/8297", "pm_score": 3, "selected": false, "text": "pylint --ignored-classes=Tags\n --ignore-classes --ignored-classes=<members names>" }, { "answer_id": 118375, ...
2008/09/22
[ "https://Stackoverflow.com/questions/115977", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3446/" ]
115,979
<p>I got this flash application where you can click a link while watching a video. It will open a new tab and pause the video. Now when you come back to the flash application it would be nice if the video would start playing again. Is there a way, an event or so to do this ?</p>
[ { "answer_id": 116022, "author": "Oli", "author_id": 12870, "author_profile": "https://Stackoverflow.com/users/12870", "pm_score": 1, "selected": false, "text": "<html>\n <head></head>\n <body onFocus=\"alert('testing');\"></body>\n</html>\n" }, { "answer_id": 228688, "...
2008/09/22
[ "https://Stackoverflow.com/questions/115979", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18671/" ]
115,983
<p>How do I add an empty directory (that contains no files) to a Git repository?</p>
[ { "answer_id": 115992, "author": "Andy Lester", "author_id": 8454, "author_profile": "https://Stackoverflow.com/users/8454", "pm_score": 10, "selected": false, "text": "git add <dir>" }, { "answer_id": 116252, "author": "Aristotle Pagaltzis", "author_id": 9410, "autho...
2008/09/22
[ "https://Stackoverflow.com/questions/115983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7473/" ]
116,032
<p>I've sometimes had a problem with my field-, table-, view- oder stored procedure names. Example:</p> <pre><code> SELECT from, to, rate FROM Table1 </code></pre> <p>The Problem is that <strong><em>from</em></strong> is a reserved word in SQL-92. You could put the fieldname in double quotes to fix this, but what i...
[ { "answer_id": 292411, "author": "Yarik", "author_id": 31415, "author_profile": "https://Stackoverflow.com/users/31415", "pm_score": 0, "selected": false, "text": "-- SQL -----------------------\ndeclare @sql as varchar(4000)\nset @sql = 'select \"To\", \"From\" from MyTable'\n\n' VB ---...
2008/09/22
[ "https://Stackoverflow.com/questions/116032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20573/" ]
116,038
<p>How do I read a file into a <code>std::string</code>, i.e., read the whole file at once?</p> <p>Text or binary mode should be specified by the caller. The solution should be standard-compliant, portable and efficient. It should not needlessly copy the string's data, and it should avoid reallocations of memory while...
[ { "answer_id": 116083, "author": "Ben Collins", "author_id": 3279, "author_profile": "https://Stackoverflow.com/users/3279", "pm_score": 5, "selected": false, "text": "#include <iostream>\n#include <sstream>\n#include <fstream>\n\nint main()\n{\n std::ifstream input(\"file.txt\");\n st...
2008/09/22
[ "https://Stackoverflow.com/questions/116038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
116,050
<p>How do I programatically (Using C#) find out what the path is of my My Pictures folder? </p> <p>Does this work on XP and Vista?</p>
[ { "answer_id": 116061, "author": "Andrew Grant", "author_id": 1043, "author_profile": "https://Stackoverflow.com/users/1043", "pm_score": 7, "selected": true, "text": "Environment.GetFolderPath(Environment.SpecialFolder.MyPictures);\n" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/116050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5147/" ]
116,053
<p>I'd like to show/hide a column at runtime based on a particular condition. I'm using "Print when expression" to conditionally show/hide this column (and it's header) in my report. When the column is hidden, the space it would have occupied is left blank, which is not particularly attractive.</p> <p>I would prefer i...
[ { "answer_id": 36911788, "author": "Petter Friberg", "author_id": 5292302, "author_profile": "https://Stackoverflow.com/users/5292302", "pm_score": 4, "selected": false, "text": "jr:table <printWhenExpression/> <jr:column/> +----------------+--------+\n| User | Rep |\n+-----...
2008/09/22
[ "https://Stackoverflow.com/questions/116053", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2648/" ]
116,054
<p>I'm not asking about converting a LaTeX document to html. </p> <p>What I'd like to be able to do is have some way to use LaTeX math commands in an html document, and have it appear correctly in a browser. This could be done server or client side.</p>
[ { "answer_id": 2116805, "author": "Andreas Grech", "author_id": 44084, "author_profile": "https://Stackoverflow.com/users/44084", "pm_score": 4, "selected": false, "text": "$(\".latex\").latex();\n\n\n<div class=\"latex\"> \n \\int_{0}^{\\pi}\\frac{x^{4}\\left(1-x\\right)^{4}}{1+x^{2...
2008/09/22
[ "https://Stackoverflow.com/questions/116054", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16970/" ]
116,074
<p>I just started using SVN, and I have a cache directory that I don't need under source control. How can I ignore the whole directory/folder with SVN?</p> <p>I am using <a href="https://en.wikipedia.org/wiki/Comparison_of_Subversion_clients#Standalone_Subversion_clients_comparison_table" rel="noreferrer">Versions</a>...
[ { "answer_id": 116075, "author": "Jason Cohen", "author_id": 4926, "author_profile": "https://Stackoverflow.com/users/4926", "pm_score": 11, "selected": true, "text": "svn:ignore svn propset svn:ignore dirname .\n svn propedit svn:ignore .\n" }, { "answer_id": 116097, "author...
2008/09/22
[ "https://Stackoverflow.com/questions/116074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6305/" ]
116,090
<p>I have a scenario where I have to check whether user has already opened Microsoft Word. If he has, then I have to kill the winword.exe process and continue to execute my code. </p> <p>Does any one have any straight-forward code for killing a process using vb.net or c#?</p>
[ { "answer_id": 116098, "author": "Blair Conrad", "author_id": 1199, "author_profile": "https://Stackoverflow.com/users/1199", "pm_score": 8, "selected": true, "text": "foreach ( Process p in System.Diagnostics.Process.GetProcessesByName(\"winword\") )\n{\n try\n {\n p.Kill()...
2008/09/22
[ "https://Stackoverflow.com/questions/116090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13337/" ]
116,096
<p>Can someone explain when to use each of these? They almost seem interchangeable in many cases. </p> <p>The Custom Control gets added to the toolbar while the User Control (ascx) can not. The Custom Control does not get rendered in the Designer while the User Control does. Beyond that, how do you choose which is...
[ { "answer_id": 116135, "author": "configurator", "author_id": 9536, "author_profile": "https://Stackoverflow.com/users/9536", "pm_score": 0, "selected": false, "text": "document.GetElementById('<%=TheControl.ClientID%>') new Control() LoadControl" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/116096", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20581/" ]
116,139
<p>I'd like to search a Word 2007 file (.docx) for a text string, e.g., "some special phrase" that could/would be found from a search within Word. </p> <p>Is there a way from Python to see the text? I have no interest in formatting - I just want to classify documents as having or not having "some special phrase".</p...
[ { "answer_id": 118136, "author": "ilitirit", "author_id": 9825, "author_profile": "https://Stackoverflow.com/users/9825", "pm_score": 1, "selected": false, "text": "<b>Looking <i>for</i> this <u>phrase</u>\n" }, { "answer_id": 118175, "author": "Tony Meyer", "author_id": ...
2008/09/22
[ "https://Stackoverflow.com/questions/116139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/372664/" ]
116,140
<p>I've got several AssemblyInfo.cs files as part of many projects in a single solution that I'm building automatically as part of TeamCity.</p> <p>To make the msbuild script more maintainable I'd like to be able to use the AssemblyInfo community task in conjunction with an ItemGroup e.g.</p> <pre><code>&lt;ItemGroup...
[ { "answer_id": 116253, "author": "evilhomer", "author_id": 2806, "author_profile": "https://Stackoverflow.com/users/2806", "pm_score": 4, "selected": true, "text": "<ItemGroup>\n <AllAssemblyInfos Include=\"..\\**\\AssemblyInfo.cs\" />\n</ItemGroup>\n\n<AssemblyInfo AssemblyTitle=\"\" As...
2008/09/22
[ "https://Stackoverflow.com/questions/116140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5777/" ]
116,142
<p>I would like to know if there is any way to add custom behaviour to the auto property get/set methods.</p> <p>An obvious case I can think of is wanting every set property method to call on any <code>PropertyChanged</code> event handlers as part of a <code>System.ComponentModel.INotifyPropertyChanged</code> implemen...
[ { "answer_id": 116170, "author": "stefano m", "author_id": 19261, "author_profile": "https://Stackoverflow.com/users/19261", "pm_score": 2, "selected": false, "text": "public string Name { get; set;} \n private string _name;\npublic string Name { get { return _name; } set { _name = value...
2008/09/22
[ "https://Stackoverflow.com/questions/116142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5427/" ]
116,154
<p>I would like to have something like this:</p> <pre><code>class Foo { private: int bar; public: void setBar(int bar); int getBar() const; } class MyDialog : public CDialogImpl&lt;MyDialog&gt; { BEGIN_MODEL_MAPPING() MAP_INT_EDITOR(m_editBar, m_model, getBar, setBar); END_MODEL_MAPPING() // other met...
[ { "answer_id": 161683, "author": "Anthony Williams", "author_id": 5597, "author_profile": "https://Stackoverflow.com/users/5597", "pm_score": 2, "selected": false, "text": "if #define DDX_MAP_VALIDATED_INT_EDITOR(control, variable, getter, setter, validator)\\\n if(nCtlID==control.Get...
2008/09/22
[ "https://Stackoverflow.com/questions/116154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14535/" ]
116,163
<p>I have a paradox table from a legacy system I need to run a single query on. The field names have spaces in them - i.e. "Street 1". When I try and formulate a query in delphi for only the "Street 1" field, I get an error - Invalid use of keyword. Token: 1, Line Number: 1</p> <p>Delphi V7 - object pascal, standard...
[ { "answer_id": 116492, "author": "Anya Shenanigans", "author_id": 17833, "author_profile": "https://Stackoverflow.com/users/17833", "pm_score": 4, "selected": true, "text": "SELECT customers.\"Street 1\" FROM customers WHERE ...\n" }, { "answer_id": 117192, "author": "Birger"...
2008/09/22
[ "https://Stackoverflow.com/questions/116163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
116,164
<p>Some files in our repository are individual to each developer. For example some developers use a local database, which is configured in a properties file in the project. So each developer has different settings. When one developer commits, he always has to take care to not commit his individually configured files.</...
[ { "answer_id": 116224, "author": "davetron5000", "author_id": 3029, "author_profile": "https://Stackoverflow.com/users/3029", "pm_score": -1, "selected": false, "text": "<property environment=\"env\" />\n<property file=\"${basedir}/online/${env.LOGNAME}.build.properties\" />\n<property f...
2008/09/22
[ "https://Stackoverflow.com/questions/116164", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18722/" ]
116,188
<p>I need to do the following for the purposes of paging a query in nHibernate:</p> <pre><code>Select count(*) from (Select e.ID,e.Name from Object as e where...) </code></pre> <p>I have tried the following, </p> <pre><code>select count(*) from Object e where e = (Select distinct e.ID,e.Name from ...) </code></pre>...
[ { "answer_id": 116285, "author": "user8456", "author_id": 8456, "author_profile": "https://Stackoverflow.com/users/8456", "pm_score": 0, "selected": false, "text": "e.Id e.Name select count(*) from Object where" }, { "answer_id": 117336, "author": "Geir-Tore Lindsve", "au...
2008/09/22
[ "https://Stackoverflow.com/questions/116188", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14833/" ]
116,195
<p>Yes XML is human readable but so is comma delimited text and properties files.</p> <p>XML is bloated, hard to parse, hard to modify in code, plus a ton of other problems that I can think about with it. </p> <p>My questions is what are XML's most attractive qualities that has made it so popular????</p>
[ { "answer_id": 116420, "author": "MattMcKnight", "author_id": 8136, "author_profile": "https://Stackoverflow.com/users/8136", "pm_score": 0, "selected": false, "text": "</> <my_tag>blah</> my_tag>blah</my_tag>" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/116195", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6788/" ]
116,221
<p>This is not a new topic, but I am curious how everyone is handling either <code>.js</code> or <code>.css</code> that is browser specific. </p> <p>Do you have <code>.js</code> functions that have <code>if/else</code> conditions in them or do you have separate files for each browser? </p> <p>Is this really an issue...
[ { "answer_id": 116251, "author": "neuroguy123", "author_id": 12529, "author_profile": "https://Stackoverflow.com/users/12529", "pm_score": 0, "selected": false, "text": "jQuery.each(jQuery.browser, function(i, val) {});\n" }, { "answer_id": 116265, "author": "Max Rible Kaehn"...
2008/09/22
[ "https://Stackoverflow.com/questions/116221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8530/" ]
116,228
<p>I've got a database which I intend to replicate for backup reasons (performance is not a problem at the moment). </p> <p>We've set up the replication correctly and tested it and all was fine.</p> <p>Then we realized that it replicates all the writes to the temporary tables, which in effect meant that replication o...
[ { "answer_id": 116515, "author": "Nick Gerakines", "author_id": 9532, "author_profile": "https://Stackoverflow.com/users/9532", "pm_score": 2, "selected": false, "text": "[mysqld]\nreplicate-do-db = db1\nreplicate-do-table = db2.mytbl2\nreplicate-wild-do-table= database_name.%\nreplic...
2008/09/22
[ "https://Stackoverflow.com/questions/116228", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8437/" ]
116,276
<p>I'm used to python, so this is a bit confusing to me. I'm trying to take in input, line-by-line, until a user inputs a certain number. The numbers will be stored in an array to apply some statistical maths to them. Currently, I have a main class, the stats classes, and an "reading" class.</p> <p>Two Questions:</p> ...
[ { "answer_id": 116283, "author": "Jason Cohen", "author_id": 4926, "author_profile": "https://Stackoverflow.com/users/4926", "pm_score": 3, "selected": false, "text": "while ( input.get( input.size()-1 ) != end_signal );\n ArrayList ArrayList<Double> list = new ArrayList<Double>();\n" ...
2008/09/22
[ "https://Stackoverflow.com/questions/116276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10636/" ]
116,289
<p>I have VB6 application , I want to put some good error handling finction in it which can tell me what was the error and exact place when it happened , can anyone suggest the good way to do this </p>
[ { "answer_id": 116312, "author": "Kris Erickson", "author_id": 3798, "author_profile": "https://Stackoverflow.com/users/3798", "pm_score": 5, "selected": false, "text": "On Error GoTo {PROCEDURE_NAME}_Error\n\n{PROCEDURE_BODY}\n\n On Error GoTo 0\n Exit {PROCEDURE_TYPE}\n\n{PROCEDU...
2008/09/22
[ "https://Stackoverflow.com/questions/116289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14299/" ]
116,292
<p>I'm a PHP developer and now I use <a href="http://en.wikipedia.org/wiki/Notepad_%28software%29" rel="nofollow noreferrer">Notepad++</a> for code editing, but lately I've been searching for an IDE to ease my work.</p> <p>I've looked into <a href="http://en.wikipedia.org/wiki/Eclipse_%28software%29" rel="nofollow nor...
[ { "answer_id": 116331, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "grep -r springloops.com" }, { "answer_id": 3968521, "author": "arunparamakumar", "author_id": 516129, "aut...
2008/09/22
[ "https://Stackoverflow.com/questions/116292", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20603/" ]
116,343
<p>I've googled around and found most people advocating the use of <code>kmalloc</code>, as you're guaranteed to get contiguous physical blocks of memory. However, it also seems as though <code>kmalloc</code> can fail if a contiguous <strong>physical</strong> block that you want can't be found.<br> What are the advanta...
[ { "answer_id": 116351, "author": "Dark Shikari", "author_id": 11206, "author_profile": "https://Stackoverflow.com/users/11206", "pm_score": 2, "selected": false, "text": "vmalloc" }, { "answer_id": 33996607, "author": "Yogeesh H T", "author_id": 3725702, "author_profi...
2008/09/22
[ "https://Stackoverflow.com/questions/116343", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2132/" ]
116,353
<p>I have a web application that needs to take a file upload from the user and upload it to a remote server. I can take input from user to server fine via file_field, but can't seem to work out the next step of uploading from server to remote. Net::HTTP doesn't do multipart forms out of the box, and I haven't been ab...
[ { "answer_id": 116667, "author": "ctcherry", "author_id": 10322, "author_profile": "https://Stackoverflow.com/users/10322", "pm_score": 1, "selected": false, "text": "BOUNDARY = \"AaB03x\"\n\ndef encode_multipartformdata(parameters = {})\n ret = String.new\n parameters.each do |key, va...
2008/09/22
[ "https://Stackoverflow.com/questions/116353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13710/" ]
116,402
<p>I was given a task to display when a record in the database was added, however the previous developers never made a field for this, and I can't go back and make up dates for all the existing records. Is there an easy way to extract out a record Creation date from a <code>SQL server 2000</code> query. </p> <pre><cod...
[ { "answer_id": 116433, "author": "AR.", "author_id": 1354, "author_profile": "https://Stackoverflow.com/users/1354", "pm_score": 1, "selected": false, "text": "CREATE TRIGGER trigger_RecordInsertDate\nON YourTableName\nAFTER INSERT\nAS\nBEGIN\n -- T-SQL code for inserting a record and ti...
2008/09/22
[ "https://Stackoverflow.com/questions/116402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18893/" ]
116,403
<p>Let's say I have a string holding a mess of text and (x)HTML tags. I want to remove all instances of a given tag (and any attributes of that tag), leaving all other tags and text along. What's the best Regex to get this done?</p> <p>Edited to add: Oh, I appreciate that using a Regex for this particular issue is n...
[ { "answer_id": 116417, "author": "Dan", "author_id": 17121, "author_profile": "https://Stackoverflow.com/users/17121", "pm_score": 5, "selected": true, "text": "</?tag[^>]*?>\n" }, { "answer_id": 116451, "author": "Benjamin Autin", "author_id": 1440933, "author_profil...
2008/09/22
[ "https://Stackoverflow.com/questions/116403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19074/" ]
116,415
<p>I'm working for a customer with a huge legacy codebase consisting of various Java en JSP based applications.</p> <p>Most querying is done using the home-build 'orm' system. Some applications use Plain Old JDBC. Some applications are based on Hibernate (yes HQL build with plus signs is a potential problem as well). ...
[ { "answer_id": 116478, "author": "Hank Gay", "author_id": 4203, "author_profile": "https://Stackoverflow.com/users/4203", "pm_score": 0, "selected": false, "text": "PreparedStatement" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/116415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16685/" ]
116,423
<p>I've been reading a little about temporary tables in MySQL but I'm an admitted newbie when it comes to databases in general and MySQL in particular. I've looked at some examples and the MySQL documentation on how to create a temporary table, but I'm trying to determine just how temporary tables might benefit my app...
[ { "answer_id": 116449, "author": "Daniel Papasian", "author_id": 7548, "author_profile": "https://Stackoverflow.com/users/7548", "pm_score": 5, "selected": true, "text": "\nCREATE TEMPORARY TABLE myTopCustomers\n SELECT customers.*,count(*) num from customers join purchases using(custo...
2008/09/22
[ "https://Stackoverflow.com/questions/116423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7862/" ]
116,432
<p>Suppose we have a stylesheet which pulls in metadata using the key() function. In other words we have instance documents like this:</p> <pre><code>&lt;items&gt; &lt;item type="some_type"/&gt; &lt;item type="another_type"/&gt; &lt;/items&gt; </code></pre> <p>and a table of additional data we would like to assoc...
[ { "answer_id": 117887, "author": "TToni", "author_id": 20703, "author_profile": "https://Stackoverflow.com/users/20703", "pm_score": 0, "selected": false, "text": " <error txt=\"Invalid-Item-Type 'invalid_type'\"/>\n" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/116432", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
116,444
<p>By default netbeans stores it's settings in a directory called .netbeans under the user's home directory. Is it possible to change the location of this directory (especially under Windows)?</p> <p>Thanks to James Schek I now know the answer (change the path in netbeans.conf) but that leads me to another question: ...
[ { "answer_id": 27975026, "author": "pipepiper", "author_id": 2080352, "author_profile": "https://Stackoverflow.com/users/2080352", "pm_score": 2, "selected": false, "text": "c:\\Portable\\Netbeans netbeans_default_userdir=\"c:\\Portable\\Netbeans\\userdir\\8.0\" netbeans_default_userdir=...
2008/09/22
[ "https://Stackoverflow.com/questions/116444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4497/" ]
116,469
<p>Ok so before I even ask my question I want to make one thing clear. I am currently a student at NIU for Computer Science and this does relate to one of my assignments for a class there. So if anyone has a problem read no further and just go on about your business. </p> <p>Now for anyone who is willing to help heres...
[ { "answer_id": 116510, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 4, "selected": true, "text": "not_s = \"\";\nclean_entry(s, not_s);\n\nif((int)not_s.length() == 0)\n {\n input >> s;\n clean_entry(s, not_s);\n ...
2008/09/22
[ "https://Stackoverflow.com/questions/116469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/924/" ]
116,485
<p>I have 2 arrays of 16 elements (chars) that I need to "compare" and see how many elements are equal between the two.</p> <p>This routine is going to be used millions of times (a usual run is about 60 or 70 million times), so I need it to be as fast as possible. I'm working on C++ (C++Builder 2007, for the record)</...
[ { "answer_id": 116504, "author": "Joe Skora", "author_id": 14057, "author_profile": "https://Stackoverflow.com/users/14057", "pm_score": 0, "selected": false, "text": "matches += (array1[0] == array2[0]) + (array1[1] == array2[1]) + ...;\n" }, { "answer_id": 116563, "author":...
2008/09/22
[ "https://Stackoverflow.com/questions/116485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16772/" ]
116,494
<p>How would one write a regular expression to use in Python to split paragraphs?</p> <p>A paragraph is defined by two line breaks (\n). But one can have any amount of spaces/tabs together with the line breaks, and it still should be considered as a paragraph.</p> <p>I am using Python, so the solution can use Python's ...
[ { "answer_id": 116557, "author": "Joseph Bui", "author_id": 3275, "author_profile": "https://Stackoverflow.com/users/3275", "pm_score": 0, "selected": false, "text": "\\s*?\\n\\s*?\\n\\s*?\n" }, { "answer_id": 116622, "author": "Eevee", "author_id": 17875, "author_pro...
2008/09/22
[ "https://Stackoverflow.com/questions/116494", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17160/" ]
116,506
<p>By default, emacs 22.1.1 only shows the top of the compilation buffer when you first issue the compile command. I would like it to scroll to the bottom automatically when I use the compile command in order to save keystrokes. This way I can easily get a status of the current compilation by just looking at the comp...
[ { "answer_id": 116513, "author": "Blair Conrad", "author_id": 1199, "author_profile": "https://Stackoverflow.com/users/1199", "pm_score": 5, "selected": true, "text": "compilation-scroll-output nil" }, { "answer_id": 122539, "author": "jfm3", "author_id": 11138, "auth...
2008/09/22
[ "https://Stackoverflow.com/questions/116506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18415/" ]
116,523
<p>In C# there are <code>String</code> objects and <code>string</code> objects. </p> <p>What is the difference between the two? What are the best practices regarding which to use?</p>
[ { "answer_id": 116536, "author": "Eric Z Beard", "author_id": 1219, "author_profile": "https://Stackoverflow.com/users/1219", "pm_score": 2, "selected": false, "text": ".method private hidebysig static void Main(string[] args) cil managed\n" }, { "answer_id": 116544, "author...
2008/09/22
[ "https://Stackoverflow.com/questions/116523", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1632/" ]
116,525
<p>I have writtent some Oracle storedprocedures in these there are more then 20 input parameters and from them morethen 10 parameters are required , I want all with some value and do not want to accept null values for that , Is there anything that I can declare in the Procedure defination itself which can restrict null...
[ { "answer_id": 18380487, "author": "Neil Vass", "author_id": 607861, "author_profile": "https://Stackoverflow.com/users/607861", "pm_score": 4, "selected": false, "text": "SUBTYPE varchar2_not_null IS VARCHAR2 NOT NULL;\n number_not_null NULL cannot pass NULL to a NOT NULL constrained fo...
2008/09/22
[ "https://Stackoverflow.com/questions/116525", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14299/" ]
116,527
<p>Killing the processs while obtaining this information would be fine.</p>
[ { "answer_id": 116606, "author": "Alex M", "author_id": 9652, "author_profile": "https://Stackoverflow.com/users/9652", "pm_score": 2, "selected": false, "text": "ObjectSpace.each_object{|e| p e}" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/116527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14796/" ]
116,535
<p>When writing an app that one wants to have compile on mac, linux and windows, what is the best way of managing the different libraries that will need to be included on the various operating systems. For example, using the glut opengl toolkit requires different includes on each operating system. </p>
[ { "answer_id": 116562, "author": "Jonathan Rupp", "author_id": 12502, "author_profile": "https://Stackoverflow.com/users/12502", "pm_score": 0, "selected": false, "text": "./configure\nmake\nmake install\n" }, { "answer_id": 116638, "author": "xtofl", "author_id": 6610, ...
2008/09/22
[ "https://Stackoverflow.com/questions/116535", "https://Stackoverflow.com", "https://Stackoverflow.com/users/85/" ]
116,560
<p>I like to use Emacs' shell mode, but it has a few deficiencies. One of those is that it's not smart enough to open a new buffer when a shell command tries to invoke an editor. For example with the environment variable <code>VISUAL</code> set to <code>vim</code> I get the following from <code>svn propedit</code>:</p>...
[ { "answer_id": 116570, "author": "Rich", "author_id": 20640, "author_profile": "https://Stackoverflow.com/users/20640", "pm_score": 5, "selected": true, "text": "emacsclient M-x server-start\n (server-start) .emacs export VISUAL=emacsclient\n emacs emacsclient emacsclient (server-start) ...
2008/09/22
[ "https://Stackoverflow.com/questions/116560", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1412/" ]
116,574
<p>While googling, I see that using <a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html#length%28%29" rel="noreferrer"><code>java.io.File#length()</code></a> can be slow. <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/channels/FileChannel.html" rel="noreferrer"><code>FileChannel</code></a> h...
[ { "answer_id": 116916, "author": "GHad", "author_id": 11705, "author_profile": "https://Stackoverflow.com/users/11705", "pm_score": 8, "selected": true, "text": "LENGTH sum: 10626, per Iteration: 10626.0\n\nCHANNEL sum: 5535, per Iteration: 5535.0\n\nURL sum: 660, per Iteration: 660.0\n ...
2008/09/22
[ "https://Stackoverflow.com/questions/116574", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20641/" ]
116,577
<p>Looking for suggestions on file system management tools. We have several terabytes of images, pdfs, excel sheets, etc.</p> <p>We're looking at some sort of software that will help us to manage, archive, etc the images. </p> <p>We don't store all the files information in a database but some are and we were hoping t...
[ { "answer_id": 118529, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 0, "selected": false, "text": "cp" }, { "answer_id": 139771, "author": "Liam", "author_id": 18333, "author_profile": "https://Stackove...
2008/09/22
[ "https://Stackoverflow.com/questions/116577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/94571/" ]
116,579
<p>I'm developing a Mac App in Java that logs into any one of our client's databases. My users want to have several copies of this program running so they can log into a couple clients at the same time, rather than logging out and logging back in.</p> <p>How can I allow a user to open several copies of my App at once...
[ { "answer_id": 116903, "author": "wprl", "author_id": 17847, "author_profile": "https://Stackoverflow.com/users/17847", "pm_score": 0, "selected": false, "text": "/Applications/TextEdit.app/Contents/MacOS/TextEdit &\n String[] cmd = { \"/bin/sh\", \"-c\", \"[shell commmand goes here]\"...
2008/09/22
[ "https://Stackoverflow.com/questions/116579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/738/" ]
116,587
<p>I need to determine if a Class object representing an interface extends another interface, ie:</p> <pre><code> package a.b.c.d; public Interface IMyInterface extends a.b.d.c.ISomeOtherInterface{ } </code></pre> <p>according to <a href="http://web.archive.org/web/20100705124350/http://java.sun.com:80/j2se/1...
[ { "answer_id": 116615, "author": "Andreas Holstenson", "author_id": 16351, "author_profile": "https://Stackoverflow.com/users/16351", "pm_score": 5, "selected": true, "text": "Class<?> c; // Your class\nfor(Class<?> i : c.getInterfaces()) {\n // test if i is your interface\n}\n publi...
2008/09/22
[ "https://Stackoverflow.com/questions/116587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/292/" ]
116,593
<p>How do you clear the IRB console screen?</p>
[ { "answer_id": 116603, "author": "Ben Hoffstein", "author_id": 4482, "author_profile": "https://Stackoverflow.com/users/4482", "pm_score": 6, "selected": false, "text": "%userprofile%\\.irbrc def cls\n system('cls')\nend\n" }, { "answer_id": 116614, "author": "AShelly", ...
2008/09/22
[ "https://Stackoverflow.com/questions/116593", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1450/" ]
116,626
<p>I'm trying to polish up my Ruby by re writing Kent Beck's xUnit Python example from "Test Driven Development: By Example". I've got quite far but now I get the following error when I run which I don't grok.</p> <pre><code>C:\Documents and Settings\aharmel\My Documents\My Workspace\TDD_Book\TDDBook_xUnit_RubyVersio...
[ { "answer_id": 116688, "author": "John Topley", "author_id": 1450, "author_profile": "https://Stackoverflow.com/users/1450", "pm_score": 0, "selected": false, "text": "send puts \"test was run? (true expected): #{test.wasRun}\"\n puts \"test was run? (true expected): #{@test.wasRun}\"\n"...
2008/09/22
[ "https://Stackoverflow.com/questions/116626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2455/" ]
116,635
<p>(I've asked the same question of the jmeter-user mailing list, but I wanted to try here as well - so at the least I can update this with the answer once I find it).</p> <p>I'm having trouble using <a href="http://jakarta.apache.org/jmeter/" rel="noreferrer">JMeter</a> to test a Tomcat webapp using a self-signed SSL...
[ { "answer_id": 1868392, "author": "Suppressingfire", "author_id": 49922, "author_profile": "https://Stackoverflow.com/users/49922", "pm_score": 0, "selected": false, "text": "Security.setProperty(\"ssl.SocketFactory.provider\", \"com.ibm.jsse2.SSLSocketFactoryImpl\");\n Security.setPrope...
2008/09/22
[ "https://Stackoverflow.com/questions/116635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4249/" ]
116,640
<p>I'm experiencing an issue on a test machine running Red Hat Linux (kernel version is 2.4.21-37.ELsmp) using Java 1.6 (1.6.0_02 or 1.6.0_04). The problem is, once a certain number of threads are created in a single thread group, the operating system is unwilling or unable to create any more.</p> <p>This seems to be ...
[ { "answer_id": 117678, "author": "dsm", "author_id": 7780, "author_profile": "https://Stackoverflow.com/users/7780", "pm_score": 0, "selected": false, "text": "dsm@localhost:~$ javac ThreadTest.java \ndsm@localhost:~$ java ThreadTest \n8113\ndsm@localhost:~$ java -version\njava version \...
2008/09/22
[ "https://Stackoverflow.com/questions/116640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13792/" ]
116,650
<p>I am tasked with writing an authentication component for an open source <code>JAVA</code> app. We have an in-house authentication widget that uses <code>https</code>. I have some example <code>php</code> code that accesses the <code>widget</code> which uses <code>cURL</code> to handle the transfer. </p> <p>My qu...
[ { "answer_id": 116725, "author": "Heath Borders", "author_id": 9636, "author_profile": "https://Stackoverflow.com/users/9636", "pm_score": 7, "selected": true, "text": "HttpURLConnection con = (HttpURLConnection) new URL(\"https://www.example.com\").openConnection();\ncon.setRequestMetho...
2008/09/22
[ "https://Stackoverflow.com/questions/116650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16253/" ]
116,654
<p>C++ is probably the most popular language for <a href="https://stackoverflow.com/questions/112277/best-intro-to-c-static-metaprogramming">static metaprogramming</a> and <a href="https://stackoverflow.com/questions/112320/is-static-metaprogramming-possible-in-java">Java doesn't support it</a>.</p> <p>Are there any o...
[ { "answer_id": 122596, "author": "jfm3", "author_id": 11138, "author_profile": "https://Stackoverflow.com/users/11138", "pm_score": 3, "selected": false, "text": "defmacro" }, { "answer_id": 63435262, "author": "Dmitry Ponyatov", "author_id": 2134384, "author_profile"...
2008/09/22
[ "https://Stackoverflow.com/questions/116654", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10559/" ]
116,682
<p>I have a URI here in which a simple document.cookie query through the console is resulting in three cookies being displayed. I verified this with trivial code such as the following as well:</p> <pre><code>var cookies = document.cookie.split(';'); console.log(cookies.length); </code></pre> <p>The variable cookies ...
[ { "answer_id": 122596, "author": "jfm3", "author_id": 11138, "author_profile": "https://Stackoverflow.com/users/11138", "pm_score": 3, "selected": false, "text": "defmacro" }, { "answer_id": 63435262, "author": "Dmitry Ponyatov", "author_id": 2134384, "author_profile"...
2008/09/22
[ "https://Stackoverflow.com/questions/116682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
116,684
<p>Is there <em>anything</em> available that isn't trivially breakable?</p>
[ { "answer_id": 116767, "author": "Keith", "author_id": 905, "author_profile": "https://Stackoverflow.com/users/905", "pm_score": 3, "selected": false, "text": "[update, now they are] [update, now it is very easy to break] [update, pretty easy up to 9 char passwords now] [You can now rent...
2008/09/22
[ "https://Stackoverflow.com/questions/116684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16398/" ]
116,687
<p>I want to call a few "static" methods of a CPP class defined in a different file but I'm having linking problems. I created a test-case that recreates my problem and the code for it is below.</p> <p>(I'm completely new to C++, I come from a Java background and I'm a little familiar with C.)</p> <pre><code>// CppCl...
[ { "answer_id": 116741, "author": "Thorsten79", "author_id": 19734, "author_profile": "https://Stackoverflow.com/users/19734", "pm_score": 6, "selected": true, "text": "class NewClass {\npublic:\n NewClass();\n int methodA();\n int methodB();\n}; <- don't forget the semicolon\n #inc...
2008/09/22
[ "https://Stackoverflow.com/questions/116687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7205/" ]
116,690
<p>SVN keyword substition gives is not pretty. E.g.,</p> <blockquote> <p>Last updated: $Date$ by $Author$</p> </blockquote> <p>yields</p> <blockquote> <p>Last updated: $Date: 2008-09-22 14:38:43 -0400 (Mon, 22 Sep 2008) $ by $Author: cconway $"</p> </blockquote> <p>Does anybody have a Javascript snippet tha...
[ { "answer_id": 116804, "author": "Dan", "author_id": 17121, "author_profile": "https://Stackoverflow.com/users/17121", "pm_score": 2, "selected": false, "text": "function formatSvnString(string){\n var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'No...
2008/09/22
[ "https://Stackoverflow.com/questions/116690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1412/" ]
116,701
<p>What's the best way for a running C or C++ program that's been launched from the command line to put itself into the background, equivalent to if the user had launched from the unix shell with '&amp;' at the end of the command? (But the user didn't.) It's a GUI app and doesn't need any shell I/O, so there's no rea...
[ { "answer_id": 116813, "author": "Powerlord", "author_id": 15880, "author_profile": "https://Stackoverflow.com/users/15880", "pm_score": 0, "selected": false, "text": "fork() setsid()" }, { "answer_id": 116814, "author": "dsm", "author_id": 7780, "author_profile": "ht...
2008/09/22
[ "https://Stackoverflow.com/questions/116701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3832/" ]
116,760
<p>I have a rather weak understanding of any of oracle's more advanced functionality but this should I think be possible.</p> <p>Say I have a table with the following schema:</p> <pre><code>MyTable Id INTEGER, Col1 VARCHAR2(100), Col2 VARCHAR2(100) </code></pre> <p>I would like to write an sproc with the follo...
[ { "answer_id": 116795, "author": "Cade Roux", "author_id": 18255, "author_profile": "https://Stackoverflow.com/users/18255", "pm_score": 2, "selected": true, "text": "SET a.Col1 = COALESCE(incoming.Col1, a.Col1)\n ,a.Col2 = COALESCE(incoming.Col2, a.Col2)\n" }, { "answer_id": ...
2008/09/22
[ "https://Stackoverflow.com/questions/116760", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5056/" ]
116,775
<p>I am adding custom controls to a FlowLayoutPanel. Each control has a date property. I would like to sort the controls in the flowlayoutpanel based on the date property. I can't presort the controls before I add them because it is possible for the user to add more.</p> <p>My current thought is when the ControlAdded ...
[ { "answer_id": 117766, "author": "wusher", "author_id": 1632, "author_profile": "https://Stackoverflow.com/users/1632", "pm_score": 3, "selected": true, "text": " SortedList<DateTime,Control> sl = new SortedList<DateTime,Control>();\n foreach (Control i in mainContent.Contr...
2008/09/22
[ "https://Stackoverflow.com/questions/116775", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1632/" ]
116,797
<p>I have an int array as a property of a Web User Control. I'd like to set that property inline if possible using the following syntax:</p> <pre><code>&lt;uc1:mycontrol runat="server" myintarray="1,2,3" /&gt; </code></pre> <p>This will fail at runtime because it will be expecting an actual int array, but a string is...
[ { "answer_id": 116953, "author": "Billy Jo", "author_id": 3447, "author_profile": "https://Stackoverflow.com/users/3447", "pm_score": 3, "selected": false, "text": "asp: <uc1:mycontrol runat=\"server\">\n <uc1:myintparam>1</uc1:myintparam>\n <uc1:myintparam>2</uc1:myintparam>\n ...
2008/09/22
[ "https://Stackoverflow.com/questions/116797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5609/" ]
116,810
<p>I'm auditing our existing web application, which makes heavy use of <a href="http://www.w3schools.com/HTML/html_frames.asp" rel="nofollow noreferrer">HTML frames</a>. I would like to download all of the HTML in each frame, is there a method of doing this with <a href="http://www.gnu.org/software/wget/" rel="nofollow...
[ { "answer_id": 116849, "author": "Steve Moyer", "author_id": 17008, "author_profile": "https://Stackoverflow.com/users/17008", "pm_score": 1, "selected": false, "text": "wget --recursive --domains=www.mysite.com http://www.mysite.com\n" }, { "answer_id": 116863, "author": "Ju...
2008/09/22
[ "https://Stackoverflow.com/questions/116810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/302/" ]
116,819
<p>I want an expression that will fail when it encounters words such as "boon.ini" and "http". The goal would be to take this expression and be able to construct for any set of keywords.</p>
[ { "answer_id": 116862, "author": "Justin Poliey", "author_id": 6967, "author_profile": "https://Stackoverflow.com/users/6967", "pm_score": 4, "selected": false, "text": "\\b(boon\\.ini|http)\\b\n true \\b \\b(boon\\.ini|http|foo|bar)\\b\n" }, { "answer_id": 116864, "author": ...
2008/09/22
[ "https://Stackoverflow.com/questions/116819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19161/" ]
116,824
<p>Whats the most efficient way of selecting total number of records from a large table? Currently, Im simply doing</p> <pre><code>$result = mysql_query("SELECT id FROM table"); $total = mysql_num_rows($result) </code></pre> <p>I was told this was not very efficient or fast, if you have a lot of records in the table....
[ { "answer_id": 116829, "author": "Wayne", "author_id": 8236, "author_profile": "https://Stackoverflow.com/users/8236", "pm_score": 3, "selected": false, "text": "$result = mysql_query(\"SELECT COUNT(id) FROM table\");\n" }, { "answer_id": 116840, "author": "Peter Bailey", ...
2008/09/22
[ "https://Stackoverflow.com/questions/116824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
116,830
<p>In Java, one can declare a variable parameterised by an "unknown" generic type, which looks like this:</p> <pre><code>Foo&lt;?&gt; x; </code></pre> <p>Is there an equivalent construct to this question-mark, in C#?</p>
[ { "answer_id": 116881, "author": "Jorge Ferreira", "author_id": 6508, "author_profile": "https://Stackoverflow.com/users/6508", "pm_score": 5, "selected": false, "text": "class Foo\n{\n}\n\nclass Foo<T> : Foo\n{\n}\n Foo t = new Foo<int>();\n" }, { "answer_id": 116948, "autho...
2008/09/22
[ "https://Stackoverflow.com/questions/116830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14113/" ]
116,854
<p>I'm starting work on a project using Rails, but I'm waiting for the 3rd edition of the pragmatic rails book to come out before I purchase a book.</p> <p>Anyway, my question is a bit more pointed than how do I get started...</p> <p>What are some of the must have gems that everyone uses?</p> <p>I need basic authent...
[ { "answer_id": 118880, "author": "Orion Edwards", "author_id": 234, "author_profile": "https://Stackoverflow.com/users/234", "pm_score": 1, "selected": false, "text": "||=" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/116854", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9450/" ]
116,869
<p>I know this is a dumb question. For some reason my mind is blank on this. Any ideas?</p> <p>Sorry should have been more clear. </p> <p>Using a <code>HtmlGenericControl</code> to pull in link description as well as image. </p> <pre><code> private void InternalCreateChildControls() { if (this.DataItem !...
[ { "answer_id": 116929, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 3, "selected": true, "text": "using System;\nusing System.Web;\n\nnamespace Example\n{ \n public class GetImage : IHttpHandler\n {\n\n public...
2008/09/22
[ "https://Stackoverflow.com/questions/116869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7911/" ]
116,876
<p>I'm trying to build a Windows installer using Nullsoft Install System that requires installation by an Administrator. The installer makes a "logs" directory. Since regular users can run this application, that directory needs to be writable by regular users. How do I specify that all users should have permission to...
[ { "answer_id": 116914, "author": "Sören Kuklau", "author_id": 1600, "author_profile": "https://Stackoverflow.com/users/1600", "pm_score": 3, "selected": false, "text": "cacls xcacls" }, { "answer_id": 117088, "author": "Jay R.", "author_id": 5074, "author_profile": "h...
2008/09/22
[ "https://Stackoverflow.com/questions/116876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5074/" ]
116,888
<p>Given this data:</p> <pre><code>CREATE TABLE tmpTable( fldField varchar(10) null); INSERT INTO tmpTable SELECT 'XXX' UNION ALL SELECT 'XXX' UNION ALL SELECT 'ZZZ' UNION ALL SELECT 'ZZZ' UNION ALL SELECT 'YYY' SELECT CASE WHEN fldField like 'YYY' THEN 'OTH' ELSE 'XXX' END AS newField FROM tmpTable </code></pre...
[ { "answer_id": 116924, "author": "curtisk", "author_id": 17651, "author_profile": "https://Stackoverflow.com/users/17651", "pm_score": -1, "selected": false, "text": "SELECT CASE fldField WHEN 'YYY' \nTHEN 'OTH' ELSE 'XXX' END AS newField FROM tmpTable\n" }, { "answer_id": 11693...
2008/09/22
[ "https://Stackoverflow.com/questions/116888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12470/" ]
116,894
<p>I am writing a simple Python web application that consists of several pages of business data formatted for the iPhone. I'm comfortable programming Python, but I'm not very familiar with Python "idiom," especially regarding classes and objects. Python's object oriented design differs somewhat from other languages I'v...
[ { "answer_id": 117769, "author": "ConcernedOfTunbridgeWells", "author_id": 15401, "author_profile": "https://Stackoverflow.com/users/15401", "pm_score": 0, "selected": false, "text": ">>> a={'col1': 'foo', 'col2': 'bar', 'col3': 'wibble'}\n>>> 'Col1=%(col1)s, Col2=%(col2)s, Col3=%(col3)s...
2008/09/22
[ "https://Stackoverflow.com/questions/116894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19031/" ]
116,896
<p>I would like Visual Studio to break when a handled exception happens (i.e. I don't just want to see a "First chance" message, I want to debug the actual exception).</p> <p>e.g. I want the debugger to break at the exception:</p> <pre><code>try { System.IO.File.Delete(someFilename); } catch (Exception) { //we ...
[ { "answer_id": 434023, "author": "Spencer Ruport", "author_id": 52551, "author_profile": "https://Stackoverflow.com/users/52551", "pm_score": 2, "selected": false, "text": "if(!GlobalTestingBool)\n{\n try\n {\n SomeErrorProneMethod();\n }\n catch (...)\n {\n // ... Er...
2008/09/22
[ "https://Stackoverflow.com/questions/116896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
116,905
<p>I would like to use my laptop as a web development (PHP, Python, etc.) machine, but I'm hesitant to do this unless I can ensure that it can not be accessed by the outside world.</p> <p>I'm guessing that something more than a firewall is necessary, such as configurations to the Apache configuration files, but I'm no...
[ { "answer_id": 116920, "author": "Steve Moyer", "author_id": 17008, "author_profile": "https://Stackoverflow.com/users/17008", "pm_score": 3, "selected": true, "text": "Listen 127.0.0.1\n <Directory \"/var/www/localhost/htdocs\">\nAllowOverride None\nDeny from all\nAllow from 127.0.0.1/2...
2008/09/22
[ "https://Stackoverflow.com/questions/116905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/572/" ]
116,951
<p>I wanted to use <code>fstream</code> to read a txt file.</p> <p>I am using <code>inFile &gt;&gt; characterToConvert</code>, but the problem is that this omits any spaces and newline.</p> <p>I am writing an encryption program so I need to include the spaces and newlines.</p> <p>What would be the proper way to go a...
[ { "answer_id": 116980, "author": "mmattax", "author_id": 1638, "author_profile": "https://Stackoverflow.com/users/1638", "pm_score": 2, "selected": false, "text": "\n#include <iostream>\n#include <fstream>\n#include <string>\nusing namespace std;\n\nint main () \n{\n string line;\n ifs...
2008/09/22
[ "https://Stackoverflow.com/questions/116951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
116,957
<p>What java GUI layout manager does everyone use? Lately, I have been using <a href="http://www.miglayout.com/" rel="nofollow noreferrer">MigLayout</a>, which has some powerful component controls. Just wanted to see what other developers are using other than the standard JDK ones.</p>
[ { "answer_id": 122063, "author": "Alex B", "author_id": 6180, "author_profile": "https://Stackoverflow.com/users/6180", "pm_score": 2, "selected": false, "text": "GridBagLayout BorderLayout FlowLayout BoxLayout GridBagLayout" }, { "answer_id": 333165, "author": "OscarRyz", ...
2008/09/22
[ "https://Stackoverflow.com/questions/116957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6186/" ]
116,967
<p>Is it possible to call a JavaScript function from the IMG SRC tag to get an image url?</p> <p>Like this:</p> <pre><code>&lt;IMG SRC="GetImage()" /&gt; &lt;script language="javascript"&gt; function GetImage() {return "imageName/imagePath.jpg"} &lt;/script&gt; </code></pre> <p>This is using .NET 2.0.</p>
[ { "answer_id": 116981, "author": "levik", "author_id": 4465, "author_profile": "https://Stackoverflow.com/users/4465", "pm_score": 1, "selected": false, "text": "<img src=\"\" id=\"myImage\"/>\n<script type=\"text/javascript\">\n document.getElementById(\"myImage\").src = GetImage();\n<...
2008/09/22
[ "https://Stackoverflow.com/questions/116967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20682/" ]
116,968
<p>I have a database full of customer data. It's so big that it's really cumbersome to operate on, and I'd rather just slim it down to 10% of the customers, which is plenty for development. I have an awful lot of tables and I don't want to alter them all with "ON DELETE CASCADE", especially because this is a one-time...
[ { "answer_id": 117239, "author": "Philippe Grondier", "author_id": 11436, "author_profile": "https://Stackoverflow.com/users/11436", "pm_score": 3, "selected": false, "text": "Tbl_A_MyFK ALTER TABLE Tbl_A DROP CONSTRAINT Tbl_A_MyFK Tbl_A_MyFK ALTER TABLE Tbl_A ADD CONSTRAINT Tbl_A_MyFK F...
2008/09/22
[ "https://Stackoverflow.com/questions/116968", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10906/" ]
116,978
<p>I'm trying to get started on what I'm hoping will be a relatively quick web application in Java, yet most of the frameworks I've tried (Apache Wicket, Liftweb) require so much set-up, configuration, and trying to wrap my head around Maven while getting the whole thing to play nice with Eclipse, that I spent the whol...
[ { "answer_id": 117535, "author": "toolkit", "author_id": 3295, "author_profile": "https://Stackoverflow.com/users/3295", "pm_score": 6, "selected": false, "text": "web.xml <web-app>\n <servlet>\n <servlet-name>spring-dispatcher</servlet-name>\n <servlet-class>org.springf...
2008/09/22
[ "https://Stackoverflow.com/questions/116978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16050/" ]
116,988
<p>I have a number of data classes representing various entities. </p> <p>Which is better: writing a generic class (say, to print or output XML) using generics and interfaces, or writing a separate class to deal with each data class?</p> <p>Is there a performance benefit or any other benefit (other than it saving me ...
[ { "answer_id": 118128, "author": "Jason Jackson", "author_id": 13103, "author_profile": "https://Stackoverflow.com/users/13103", "pm_score": 2, "selected": false, "text": "ArrayList listOfNames = new ArrayList();\nList<NameType> listOfNames = new List<NameType>();\n" } ]
2008/09/22
[ "https://Stackoverflow.com/questions/116988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5648/" ]
117,006
<p>In git, it is up to each user to specify the correct author in their local git config file. When they push to a centralized bare repository, the commit messages on the repository will have the author names that they used when committing to their own repository.</p> <p>Is there a way enforce that a set of known aut...
[ { "answer_id": 641979, "author": "Anders Waldenborg", "author_id": 24082, "author_profile": "https://Stackoverflow.com/users/24082", "pm_score": 3, "selected": false, "text": "#!/bin/bash\n#\n# This pre-receive hooks checks that all new commit objects\n# have authors and emails with matc...
2008/09/22
[ "https://Stackoverflow.com/questions/117006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
117,007
<p>I have some WCF methods that are used to transmit information from a server application to a website frontend for use in binding. I'm sending the result as an XElement that is a root of an XML tree containing the data I want to bind against.</p> <p>I'd like to create some tests that examine the data and ensure it ...
[ { "answer_id": 117217, "author": "user19264", "author_id": 19264, "author_profile": "https://Stackoverflow.com/users/19264", "pm_score": 5, "selected": true, "text": "String xsd =\n@\"<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'>\n <xsd:element name='root'>\n <xsd:comple...
2008/09/22
[ "https://Stackoverflow.com/questions/117007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
117,014
<p>How can I retrieve the name of the currently logged in user, using a python script? The function should work regardless of whether it is a domain/ad user or a local user.</p>
[ { "answer_id": 117047, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 5, "selected": false, "text": "import os;\nprint os.environ.get( \"USERNAME\" )\n" }, { "answer_id": 1992923, "author": "Adam", "author_id": ...
2008/09/22
[ "https://Stackoverflow.com/questions/117014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
117,041
<p>On our intranet site, we have various MS Office documents linked. When I click on a Word, Excel or PowerPoint file, Firefox gives me the option to Open, Save or Cancel. When I click on Open, the appropriate app is launched and the file is loaded. This is perfect. But for some reason, when I click on a linked Visio f...
[ { "answer_id": 117515, "author": "Grant Wagner", "author_id": 9254, "author_profile": "https://Stackoverflow.com/users/9254", "pm_score": 1, "selected": false, "text": "application/octet-stream application/octet-stream application/x-visio" }, { "answer_id": 2861953, "author":...
2008/09/22
[ "https://Stackoverflow.com/questions/117041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
117,108
<p>We log values and we only log them once in a table. When we add values to the table we have to do a look up everytime to see if it needs to insert the value or just grab the id. We have an index on the table (not on the primary key) but there are about 350,000 rows (so it is taking 10 seconds to do 10 of these value...
[ { "answer_id": 117425, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 0, "selected": false, "text": "try:\n UPDATE log SET blah blah blah WHERE key = key;\nexcept Missing Key:\n INSERT INTO log(...) VALUES(...);\n" }...
2008/09/22
[ "https://Stackoverflow.com/questions/117108", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7952/" ]
117,110
<p>I can understand the use for one level of namespaces. But 3 levels of namespaces. Looks insane. Is there any practical use for that? Or is it just a misconception?</p>
[ { "answer_id": 117140, "author": "Evan Teran", "author_id": 13430, "author_profile": "https://Stackoverflow.com/users/13430", "pm_score": 2, "selected": false, "text": "plugins::v1::function\n" }, { "answer_id": 117145, "author": "Orion Adrian", "author_id": 7756, "au...
2008/09/22
[ "https://Stackoverflow.com/questions/117110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15054/" ]
117,127
<p>Please excuse the vague title. If anyone has a suggestion, please let me know! Also please retag with more appropriate tags!</p> <p><strong>The Problem</strong></p> <p>I want to have an instance of an imported class be able to view things in the scope (globals, locals) of the importer. Since I'm not sure of the...
[ { "answer_id": 117433, "author": "Torsten Marek", "author_id": 9567, "author_profile": "https://Stackoverflow.com/users/9567", "pm_score": 3, "selected": true, "text": "C1 >>> class C1(object):\n>>> def eval(self, x):\n>>> x()\n>>>\n>>> def f2(): print \"go f2\"\n>>> c = C1()\n...
2008/09/22
[ "https://Stackoverflow.com/questions/117127", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15842/" ]
117,129
<p>Traditionalist argue that stored procedures provide better security than if you use a Object Relational Mapping (ORM) framework such as NHibernate. </p> <p>To counter that argument what are some approaches that can be used with NHibernate to ensure that proper security is in place (for example, preventing sql injec...
[ { "answer_id": 119136, "author": "scott.caligan", "author_id": 14814, "author_profile": "https://Stackoverflow.com/users/14814", "pm_score": 3, "selected": false, "text": "<connectionStrings> connection.connection_string_name connection.connection_string aspnet_regiis <connectionStrings>...
2008/09/22
[ "https://Stackoverflow.com/questions/117129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
117,135
<p>What resources have to be manually cleaned up in <em>C#</em> and what are the consequences of not doing so?</p> <p>For example, say I have the following code:</p> <pre><code>myBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); // Use Brush </code></pre> <p>If I don't clean up the brush using the d...
[ { "answer_id": 117164, "author": "Orion Adrian", "author_id": 7756, "author_profile": "https://Stackoverflow.com/users/7756", "pm_score": 3, "selected": false, "text": "Dispose using using (SolidBrush myBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black))\n{\n // use myB...
2008/09/22
[ "https://Stackoverflow.com/questions/117135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13227/" ]
117,150
<p>I love vim and the speed it gives me. But sometimes, my fingers are too speedy and I find myself typing <code>:WQ</code> instead of <code>:wq</code>. (On a German keyboard, you have to press <kbd>Shift</kbd> to get the colon <code>:</code>.) Vim will then complain that <code>WQ</code> is <code>Not an editor command<...
[ { "answer_id": 117221, "author": "WMR", "author_id": 2844, "author_profile": "https://Stackoverflow.com/users/2844", "pm_score": 7, "selected": true, "text": " :command WQ wq\n :command Wq wq\n :command W w\n :command Q q\n :help command" }, { "answer_id": 119821, "author": "...
2008/09/22
[ "https://Stackoverflow.com/questions/117150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7498/" ]
117,171
<p>When programming by contract a function or method first checks whether its preconditions are fulfilled, before starting to work on its responsibilities, right? The two most prominent ways to do these checks are by <code>assert</code> and by <code>exception</code>. </p> <ol> <li>assert fails only in debug mode. To m...
[ { "answer_id": 117328, "author": "Rik", "author_id": 5409, "author_profile": "https://Stackoverflow.com/users/5409", "pm_score": -1, "selected": false, "text": "assert(value>0);\nif(value<=0) throw new ArgumentOutOfRangeException(\"value\");\n//do stuff\n" }, { "answer_id": 11772...
2008/09/22
[ "https://Stackoverflow.com/questions/117171", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19863/" ]
117,173
<p><strong>I do not currently have this issue</strong>, but you never know, and thought experiments are always fun.</p> <p><strong>Ignoring the obvious problems that you would have to have with your architecture to even be attempting this</strong>, let's assume that you had some horribly-written code of someone else's...
[ { "answer_id": 117202, "author": "Orion Adrian", "author_id": 7756, "author_profile": "https://Stackoverflow.com/users/7756", "pm_score": 3, "selected": false, "text": "On Error Resume Next On Error Resume Next" }, { "answer_id": 117235, "author": "plinth", "author_id": 2...
2008/09/22
[ "https://Stackoverflow.com/questions/117173", "https://Stackoverflow.com", "https://Stackoverflow.com/users/192/" ]
117,189
<p>I have a search form with a query builder. The builder is activated by a button. Something like this</p> <pre><code>&lt;h:form id="search_form"&gt; &lt;h:outputLabel for="expression" value="Expression"/&gt; &lt;h:inputText id="expression" required="true" value="#{searcher.expression}"/&gt; &lt;button onclick=...
[ { "answer_id": 117338, "author": "stefano m", "author_id": 19261, "author_profile": "https://Stackoverflow.com/users/19261", "pm_score": 1, "selected": false, "text": " function KeyDownHandler(event)\n {\n // process only the Enter key\n if (event.keyCode == 13)\n ...
2008/09/22
[ "https://Stackoverflow.com/questions/117189", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4893/" ]
117,211
<p>I have a Tix.ComboBox with an editable text field. How do I force the variable holding the value for the text to update?</p> <p>Let me give a more concrete explanation. I have a combo box and a button. When I click the button, it pops up a message box with the value of the combo box. Let's say the combo box text fi...
[ { "answer_id": 117384, "author": "Moe", "author_id": 3051, "author_profile": "https://Stackoverflow.com/users/3051", "pm_score": 4, "selected": true, "text": "self.combo['selection']\n self.combo['value']\n" }, { "answer_id": 207117, "author": "tzot", "author_id": 6899, ...
2008/09/22
[ "https://Stackoverflow.com/questions/117211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3051/" ]
117,226
<p>I have a <code>PHP</code> script that listens on a queue. Theoretically, it's never supposed to die. Is there something to check if it's still running? Something like <code>Ruby's God ( http://god.rubyforge.org/ )</code> for <code>PHP</code>?</p> <p>God is language agnostic but it would be nice to have a solution t...
[ { "answer_id": 117287, "author": "Mez", "author_id": 20010, "author_profile": "https://Stackoverflow.com/users/20010", "pm_score": 2, "selected": false, "text": "#!/bin/bash\nwhile [true]; do\n if ! pidof -x script.php;\n then\n php script.php &\n fi\ndone\n" }, { ...
2008/09/22
[ "https://Stackoverflow.com/questions/117226", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
117,245
<p>I've always just FTPed files down from sites, edited them and put them back up when creating sites, but feel it's worth learning to do things properly.</p> <p>I've just commited everything to a SVN repo, and have tried sshing into the server and checking out a tagged build, as well as updating that build using swit...
[ { "answer_id": 117271, "author": "edgars", "author_id": 6865, "author_profile": "https://Stackoverflow.com/users/6865", "pm_score": 2, "selected": false, "text": "svn update" }, { "answer_id": 122519, "author": "Daniel Schierbeck", "author_id": 20321, "author_profile"...
2008/09/22
[ "https://Stackoverflow.com/questions/117245", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16511/" ]
117,248
<p>I have a number of tables that use the trigger/sequence column to simulate auto_increment on their primary keys which has worked great for some time.</p> <p>In order to speed the time necessary to perform regression testing against software that uses the db, I create control files using some sample data, and added ...
[ { "answer_id": 117360, "author": "cagcowboy", "author_id": 19629, "author_profile": "https://Stackoverflow.com/users/19629", "pm_score": 2, "selected": true, "text": "SELECT 'CREATE SEQUENCE '||sequence_name||' START WITH '||last_number||';'\nFROM ALL_SEQUENCES\nWHERE OWNER = your_sch...
2008/09/22
[ "https://Stackoverflow.com/questions/117248", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9940/" ]
117,250
<p>For example, the standard division symbol '/' rounds to zero:</p> <pre><code>&gt;&gt;&gt; 4 / 100 0 </code></pre> <p>However, I want it to return 0.04. What do I use?</p>
[ { "answer_id": 117258, "author": "moonshadow", "author_id": 11834, "author_profile": "https://Stackoverflow.com/users/11834", "pm_score": 2, "selected": false, "text": ">>> 4/100.0\n0.040000000000000001\n" }, { "answer_id": 117264, "author": "Torsten Marek", "author_id": ...
2008/09/22
[ "https://Stackoverflow.com/questions/117250", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
117,262
<p>MySQL's explain output is pretty straightforward. PostgreSQL's is a little more complicated. I haven't been able to find a good resource that explains it either.</p> <p>Can you describe what exactly explain is saying or at least point me in the direction of a good resource?</p>
[ { "answer_id": 118122, "author": "user11318", "author_id": 11318, "author_profile": "https://Stackoverflow.com/users/11318", "pm_score": 5, "selected": false, "text": "EXPLAIN explain analyze\nselect a.attributeid, a.attributevalue, b.productid\nfrom orderitemattribute a, orderitem b\nwh...
2008/09/22
[ "https://Stackoverflow.com/questions/117262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38359/" ]
117,293
<p>How far do you go with <code>const</code>? Do you just make functions <code>const</code> when necessary or do you go the whole hog and use it everywhere? For example, imagine a simple mutator that takes a single boolean parameter:</p> <pre><code>void SetValue(const bool b) { my_val_ = b; } </code></pre> <p>Is th...
[ { "answer_id": 117308, "author": "Greg Rogers", "author_id": 5963, "author_profile": "https://Stackoverflow.com/users/5963", "pm_score": 9, "selected": true, "text": "const const const_iterator const" }, { "answer_id": 117311, "author": "Asaf R", "author_id": 6827, "a...
2008/09/22
[ "https://Stackoverflow.com/questions/117293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9236/" ]