qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
84,243
<p>I am developing a website that relies much on XML data. The web site has an interface where user can update data. The data provided by user will be updated to the respective XML file. However, the changes is not reflected until after 1 or 2 minutes.</p> <p>Anyone knows how to force the browser to load the latest XM...
[ { "answer_id": 84351, "author": "Jim", "author_id": 8427, "author_profile": "https://Stackoverflow.com/users/8427", "pm_score": 2, "selected": false, "text": "Cache-Control: no-cache Pragma: no-cache" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/84243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
84,263
<p>I'm designing a web site navigation hierarchy. It's a tree of nodes.</p> <p>Most nodes are pages. Some nodes are links (think shortcuts in Windows).</p> <p>Most pages hold HTML content. Some execute code.</p> <p>I'd like to represent these as this collection of classes and abstract (MustInherit) classes&hellip...
[ { "answer_id": 84336, "author": "Sunny Milenov", "author_id": 8220, "author_profile": "https://Stackoverflow.com/users/8220", "pm_score": 1, "selected": false, "text": "class Node\n{\n private bool isRootNode;\n public bool IsRootNode;\n\n private StylingData stylingData;\n publi...
2008/09/17
[ "https://Stackoverflow.com/questions/84263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/83/" ]
84,278
<p>How do I use <code>RelativeSource</code> with WPF bindings and what are the different use-cases?</p>
[ { "answer_id": 84314, "author": "Bob King", "author_id": 6897, "author_profile": "https://Stackoverflow.com/users/6897", "pm_score": 5, "selected": false, "text": "<Binding RelativeSource=\"{RelativeSource TemplatedParent}\"/>\n {Binding RelativeSource={RelativeSource TemplatedParent}}\n...
2008/09/17
[ "https://Stackoverflow.com/questions/84278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4918/" ]
84,285
<p>is it legal for a thread to call this.start() inside its own constructor? and if so what potential issues can this cause? I understand that the object wont have fully initialized until the constructor has run to completion but aside from this are there any other issues? </p>
[ { "answer_id": 84550, "author": "Eli Courtwright", "author_id": 1694, "author_profile": "https://Stackoverflow.com/users/1694", "pm_score": 2, "selected": false, "text": "Thread t = new CustomThread();\nt.start();\nactiveThreads.add(t);\n activeThreads.add( new CustomThread() );\n start ...
2008/09/17
[ "https://Stackoverflow.com/questions/84285", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
84,290
<p>How do I get a a complete list of all the urls that my rails application could generate? </p> <p>I don't want the routes that I get get form rake routes, instead I want to get the actul URLs corrosponding to all the dynmically generated pages in my application...</p> <p>Is this even possible?</p> <p>(Background: ...
[ { "answer_id": 84482, "author": "Jeremiah Peschka", "author_id": 11780, "author_profile": "https://Stackoverflow.com/users/11780", "pm_score": 1, "selected": false, "text": "rake routes" }, { "answer_id": 90868, "author": "kch", "author_id": 13989, "author_profile": "...
2008/09/17
[ "https://Stackoverflow.com/questions/84290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7473/" ]
84,310
<p>I'm connecting to an AS/400 stored procedure layer using the IBM iSeries Access for Windows package. This provides a .NET DLL with classes similar to those in the <code>System.Data</code> namespace. As such we use their implementation of the connection class and provide it with a connection string.</p> <p>Does anyo...
[ { "answer_id": 84374, "author": "Dillie-O", "author_id": 71, "author_profile": "https://Stackoverflow.com/users/71", "pm_score": 1, "selected": false, "text": "<add name=\"AS400ConnectionString\" connectionString=\"Data Source=DEVL820;Initial Catalog=Q1A_DATABASE_SRVR;Persist Security In...
2008/09/17
[ "https://Stackoverflow.com/questions/84310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12277/" ]
84,322
<p>It appears that using perldoc perl gives the list of, e.g. perlre, perlvar, etc.</p> <p>Is this the best place to find the list of what's available as an overview or tutorial or reference manual section? Is there another, better list?</p>
[ { "answer_id": 84417, "author": "moritz", "author_id": 14132, "author_profile": "https://Stackoverflow.com/users/14132", "pm_score": 4, "selected": true, "text": "perldoc perltoc\n perldoc perlmodlib\n" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/84322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8763/" ]
84,330
<p><strong>Here is the updated question:</strong></p> <p>the current query is doing something like:<br></p> <pre><code>$sql1 = "TRUNCATE TABLE fubar"; $sql2 = "CREATE TEMPORARY TABLE IF NOT EXISTS fubar SELECT id, name FROM barfu"; </code></pre> <p>The first time the method containing this is run, it generates an er...
[ { "answer_id": 84396, "author": "Ben", "author_id": 11522, "author_profile": "https://Stackoverflow.com/users/11522", "pm_score": 2, "selected": false, "text": "DROP TABLE IF EXISTS fubar;\nCREATE TABLE fubar;\n" }, { "answer_id": 84405, "author": "Mark Janssen", "author_...
2008/09/17
[ "https://Stackoverflow.com/questions/84330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16186/" ]
84,331
<p>Is there a macro or a way to conditionally copy rows from one worksheet to another in Excel 2003?</p> <p>I'm pulling a list of data from SharePoint via a web query into a blank worksheet in Excel, and then I want to copy the rows for a particular month to a particular worksheet (for example, all July data from a Sh...
[ { "answer_id": 84526, "author": "BKimmel", "author_id": 13776, "author_profile": "https://Stackoverflow.com/users/13776", "pm_score": 0, "selected": false, "text": "rows = ActiveSheet.UsedRange.Rows\nn = 0\n\nwhile n <= rows\n if ActiveSheet.Rows(n).Cells(DateColumnOrdinal).Value > '8/1...
2008/09/17
[ "https://Stackoverflow.com/questions/84331", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
84,332
<p>My Access 2000 DB causes me problems - sometimes (haven't pinpointed the cause) the "book" form won't close. Clicking its close button does nothing, File -> Close does nothing, even closing Access results in no action. I don't have an OnClose handler for this form. The only workaround I can find involves opening ...
[ { "answer_id": 84907, "author": "Chris OC", "author_id": 11041, "author_profile": "https://Stackoverflow.com/users/11041", "pm_score": 0, "selected": false, "text": "If Me.chkbox Then\n If Me.chkbox.Value Then\n" }, { "answer_id": 88914, "author": "David-W-Fenton", "autho...
2008/09/17
[ "https://Stackoverflow.com/questions/84332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12874/" ]
84,341
<p>I have a core file generated on a remote system that I don't have direct access to. I also have local copies of the library files from the remote system, and the executable file for the crashing program.</p> <p>I'd like to analyse this core dump in gdb.</p> <p>For example:</p> <pre><code>gdb path/to/executable p...
[ { "answer_id": 84546, "author": "Drew Frezell", "author_id": 10954, "author_profile": "https://Stackoverflow.com/users/10954", "pm_score": 7, "selected": true, "text": "set solib-absolute-prefix ./usr\nfile path/to/executable\ncore-file path/to/corefile\n set solib-search-path <path>\n s...
2008/09/17
[ "https://Stackoverflow.com/questions/84341", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13956/" ]
84,346
<p>How do I create an index on a column in MySQL v 5.0 (myisam db engine) based upon the length of its value its a TEXT data type up to 7000 characters, do I have to add another column with the length of the first column?</p>
[ { "answer_id": 84500, "author": "Henning", "author_id": 7034, "author_profile": "https://Stackoverflow.com/users/7034", "pm_score": 3, "selected": true, "text": "ADD INDEX myIndex(LENGTH(text)))" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/84346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16191/" ]
84,378
<p>When using <code>divs</code> when is it best to use a <code>class</code> vs <code>id</code>? </p> <p>Is it best to use <code>class</code>, on say font variant or elements within the html? Then use <code>id</code> for the structure/containers? </p> <p>This is something I've always been a little uncertain on, any he...
[ { "answer_id": 84409, "author": "Oli", "author_id": 12870, "author_profile": "https://Stackoverflow.com/users/12870", "pm_score": 5, "selected": false, "text": "<div id=\"section\" class=\"section\">Text</div>\n #section {font-color:#fff}\n.section {font-color:#000}\n" }, { "answ...
2008/09/17
[ "https://Stackoverflow.com/questions/84378", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16195/" ]
84,404
<p>Visual Studio 2003 and 2005 (and perhaps 2008 for all I know) require the command line user to run in the 'Visual Studio Command Prompt'. When starting this command prompt it sets various environment variables that the C++ compiler, cl, uses when compiling.</p> <p>This is not always desirable. If, for example, I ...
[ { "answer_id": 84431, "author": "ljs", "author_id": 3394, "author_profile": "https://Stackoverflow.com/users/3394", "pm_score": 3, "selected": false, "text": "C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\vcvarsall.bat\n" }, { "answer_id": 87052, "author": "Eclipse", ...
2008/09/17
[ "https://Stackoverflow.com/questions/84404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6839/" ]
84,421
<p>Is there a built in way to convert an integer in Ruby into its hexadecimal equivalent?</p> <p>Something like the opposite of <a href="http://ruby-doc.org/core-2.0.0/String.html#method-i-to_i" rel="noreferrer"><code>String#to_i</code></a>:</p> <pre><code>"0A".to_i(16) #=&gt;10 </code></pre> <p>Like perhaps:</p> <...
[ { "answer_id": 84455, "author": "flxkid", "author_id": 13036, "author_profile": "https://Stackoverflow.com/users/13036", "pm_score": 6, "selected": false, "text": "% sprintf i = 20\n\"%x\" % i #=> \"14\"\n" }, { "answer_id": 84485, "author": "Jean", "author_id": 7898, ...
2008/09/17
[ "https://Stackoverflow.com/questions/84421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6106/" ]
84,422
<p>in XSLT processing, is there a performance difference between apply-template and call-template? In my stylesheets there are many instances where I can use either, which is the best choice?</p>
[ { "answer_id": 85514, "author": "JeniT", "author_id": 6739, "author_profile": "https://Stackoverflow.com/users/6739", "pm_score": 6, "selected": false, "text": "<xsl:apply-templates> <xsl:apply-templates> <xsl:for-each> <xsl:choose> <xsl:call-template> <xsl:for-each> <xsl:call-template> ...
2008/09/17
[ "https://Stackoverflow.com/questions/84422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
84,427
<p>Specifically, is the following legal C++?</p> <pre>class A{}; void foo(A*); void bar(const A&); int main(void) { foo(&A()); // 1 bar(A()); // 2 }</pre> <p>It appears to work correctly, but that doesn't mean it's necessarily legal. Is it?</p> <p><i>Edit - changed <code>A&amp;</code> to <code>const A&a...
[ { "answer_id": 84494, "author": "roo", "author_id": 716, "author_profile": "https://Stackoverflow.com/users/716", "pm_score": -1, "selected": false, "text": "int dosomething(error_code& _e = ignore_errorcode()) {\n //do something\n}\n error_code" }, { "answer_id": 84521, "...
2008/09/17
[ "https://Stackoverflow.com/questions/84427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9530/" ]
84,449
<p>The XML Schema Part 2 specifies that an instance of a datatype that is defined as boolean can have the following legal literals {true, false, 1, 0}. The following XML, for example, when deserialized, sets the boolean property "Emulate" to <code>true</code>.</p> <pre><code>&lt;root&gt; &lt;emulate&gt;1&lt;/emula...
[ { "answer_id": 85468, "author": "Simon Steele", "author_id": 4591, "author_profile": "https://Stackoverflow.com/users/4591", "pm_score": 6, "selected": false, "text": "[XmlIgnore]\npublic bool MyValue { get; set; }\n\n/// <summary>Get a value purely for serialization purposes</summary>\n...
2008/09/17
[ "https://Stackoverflow.com/questions/84449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8205/" ]
84,460
<p>I've been using Destop.open() to launch a .pdf viewer on Windows machines, both Vista and XP, and most of them work just fine. However, on one XP machine the call does not work, simply returning without throwing any exceptions, and the viewer does not launch. On that machine the file association is properly set up...
[ { "answer_id": 84529, "author": "Martin Spamer", "author_id": 15527, "author_profile": "https://Stackoverflow.com/users/15527", "pm_score": 2, "selected": false, "text": "Control Panel->Java Control Panel->Advanced->Java Console.\n" }, { "answer_id": 9962004, "author": "Lund ...
2008/09/17
[ "https://Stackoverflow.com/questions/84460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16213/" ]
84,463
<p>For example I want to be able to programatically hit a line of code like the following where the function name is dynamically assigned without using Evaluate(). The code below of course doesn't work but represents what I would like to do.</p> <pre><code>application.obj[funcName](argumentCollection=params) </code></...
[ { "answer_id": 84836, "author": "Ben Doom", "author_id": 12267, "author_profile": "https://Stackoverflow.com/users/12267", "pm_score": 4, "selected": true, "text": "<!--- Create the component instance. --->\n<cfobject component=\"tellTime2\" name=\"tellTimeObj\">\n<!--- Invoke the method...
2008/09/17
[ "https://Stackoverflow.com/questions/84463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8345/" ]
84,486
<p>I've spent far too much time trying to figure this out. This should be the simplest thing and everyone who distributes Java applications in jars must have to deal with it.</p> <p>I just want to know the proper way to add versioning to my Java app so that I can access the version information when I'm testing, e.g. ...
[ { "answer_id": 84945, "author": "Martin Spamer", "author_id": 15527, "author_profile": "https://Stackoverflow.com/users/15527", "pm_score": 1, "selected": false, "text": "this.getClass().getClassLoader().getResourceAsStream( ... ) ;\n Thread.currentThread().getContextClassLoader().getRes...
2008/09/17
[ "https://Stackoverflow.com/questions/84486", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16216/" ]
84,488
<p>Is there some built-in way to share files between Xen guests? I don't currently need to share the actual images, just some data files.</p>
[ { "answer_id": 35119359, "author": "Vorell", "author_id": 5865147, "author_profile": "https://Stackoverflow.com/users/5865147", "pm_score": 1, "selected": false, "text": "xvda3 /dev/md0 /dev/vg0/lg0" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/84488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9594/" ]
84,506
<p>I find from reading perldoc perlvar, about a thousand lines in is help for %ENV. Is there a way to find that from the command line directly?</p> <p>On my Windows machine, I've tried the following</p> <pre><code>perldoc ENV perldoc %ENV perldoc %%ENV perldoc -r ENV (returns info about Use Env) perldoc -r %ENV perld...
[ { "answer_id": 84786, "author": "Eli Bendersky", "author_id": 8206, "author_profile": "https://Stackoverflow.com/users/8206", "pm_score": 0, "selected": false, "text": "unixutils perldoc perlvar | grep -A10 %env" }, { "answer_id": 84791, "author": "Ovid", "author_id": 800...
2008/09/17
[ "https://Stackoverflow.com/questions/84506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8763/" ]
84,556
<p>Personally I like this one:</p> <p><img src="https://i.stack.imgur.com/ZNtvc.jpg" alt=""></p> <p>P.S. Do not hotlink the cartoon without the site's permission please. </p>
[ { "answer_id": 1469915, "author": "fixxxer", "author_id": 170005, "author_profile": "https://Stackoverflow.com/users/170005", "pm_score": 3, "selected": false, "text": "HAI\nCAN HAS STDIO?\nI HAS A VAR\nIM IN YR LOOP\n UP VAR!!1\n VISIBLE VAR\n IZ VAR BIGGER THAN 10? KTHXBYE\nIM...
2008/09/17
[ "https://Stackoverflow.com/questions/84556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4230/" ]
84,583
<p>The DBAs here maintain all SQL Server and SQL Reporting servers. I have a custom developed SQL Reporting 2005 project in Visual Studio that runs fine on my local SQL Database and Reporting instances. I need to deploy to a production server, so I had a folder created on a SQL Reporting 2005 server with permissions ...
[ { "answer_id": 156077, "author": "Peter Wone", "author_id": 1715673, "author_profile": "https://Stackoverflow.com/users/1715673", "pm_score": 2, "selected": false, "text": " <DataSources>\n <DataSource Name=\"preserve the datasource name you've been using\">\n <ConnectionPropert...
2008/09/17
[ "https://Stackoverflow.com/questions/84583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3347/" ]
84,644
<p>To make it short: hibernate doesn't support projections and query by example? I found this post:</p> <p>The code is this:</p> <pre><code>User usr = new User(); usr.setCity = 'TEST'; getCurrentSession().createCriteria(User.class) .setProjection( Projections.distinct( Projections.projectionList() .add( Projections.p...
[ { "answer_id": 86752, "author": "Arthur Thomas", "author_id": 14009, "author_profile": "https://Stackoverflow.com/users/14009", "pm_score": 5, "selected": true, "text": "getCurrentSession().createCriteria(User.class)\n.setProjection( Projections.distinct( Projections.projectionList()\n.a...
2008/09/17
[ "https://Stackoverflow.com/questions/84644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
84,661
<p>Sometimes, in PL SQL you want to add a parameter to a Package, Function or Procedure in order to prepare future functionality. For example:</p> <pre><code>create or replace function doGetMyAccountMoney( Type_Of_Currency IN char := 'EUR') return number is Result number(12,2); begin Result := 10000; IF char ...
[ { "answer_id": 88742, "author": "Sergey Stadnik", "author_id": 10557, "author_profile": "https://Stackoverflow.com/users/10557", "pm_score": 1, "selected": false, "text": "ALTER SESSION SET PLSQL_WARNINGS='ENABLE:SEVERE';\n" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/84661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16206/" ]
84,680
<p>I'm writing a Spring web application that requires users to login. My company has an Active Directory server that I'd like to make use of for this purpose. However, I'm having trouble using Spring Security to connect to the server.</p> <p>I'm using Spring 2.5.5 and Spring Security 2.0.3, along with Java 1.6.</p> ...
[ { "answer_id": 86367, "author": "delfuego", "author_id": 16414, "author_profile": "https://Stackoverflow.com/users/16414", "pm_score": 6, "selected": true, "text": "<beans:bean id=\"contextSource\"\n class=\"org.springframework.security.ldap.DefaultSpringSecurityContextSource\">\n ...
2008/09/17
[ "https://Stackoverflow.com/questions/84680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13379/" ]
84,716
<p>I use the jQuery <a href="http://docs.jquery.com/Utilities/jQuery.extend" rel="nofollow noreferrer">extend</a> function to extend a class prototype.</p> <p>For example:</p> <pre><code>MyWidget = function(name_var) { this.init(name_var); } $.extend(MyWidget.prototype, { // object variables widget_name: '',...
[ { "answer_id": 84824, "author": "Jonny Buchanan", "author_id": 6760, "author_profile": "https://Stackoverflow.com/users/6760", "pm_score": 6, "selected": false, "text": "var MyWidget = Class.extend({\n init: function(widget_name){\n this.widget_name = widget_name;\n },\n\n doSometh...
2008/09/17
[ "https://Stackoverflow.com/questions/84716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13850/" ]
84,717
<p>What are the best conventions of naming testing-assemblies in .NET (or any other language or platform)?</p> <p>What I'm mainly split between are these options (please provide others!):</p> <ul> <li><strong>Company.Website</strong> - <em>the project</em></li> <li><strong>Company.Website.Tests</strong></li> </ul> <...
[ { "answer_id": 84809, "author": "Tom Carr", "author_id": 14954, "author_profile": "https://Stackoverflow.com/users/14954", "pm_score": 1, "selected": false, "text": "Company.Namespace.Test\nCompany.Namespace.Data.Test\n" }, { "answer_id": 84972, "author": "Claus Thomsen", ...
2008/09/17
[ "https://Stackoverflow.com/questions/84717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2429/" ]
84,759
<p>This is an Eclipse question, and you can assume the Java package for all these Eclipse classes is <code>org.eclipse.core.resources</code>. </p> <p>I want to get an <code>IFile</code> corresponding to a location <code>String</code> I have:</p> <pre><code> "platform:/resource/Tracbility_All_Supported_lib/processes/...
[ { "answer_id": 85074, "author": "Paul Reiners", "author_id": 7648, "author_profile": "https://Stackoverflow.com/users/7648", "pm_score": 2, "selected": false, "text": "String platformLocationString = portTypeContainer\n .getLocation();\nString locationString = platformLocationStri...
2008/09/17
[ "https://Stackoverflow.com/questions/84759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7648/" ]
84,782
<p>I am writting JAVA programme using JDBC for database conntectivity , I am calling one stored procedure in that which is returning ORACLE REF CURSOR , IS there any way I can handle that without importing ORACLE PACKAGES ?</p>
[ { "answer_id": 85766, "author": "jwiklund", "author_id": 4208, "author_profile": "https://Stackoverflow.com/users/4208", "pm_score": 2, "selected": true, "text": "select * from table( sp_returning( ? ) )\n" }, { "answer_id": 411052, "author": "tuinstoel", "author_id": 439...
2008/09/17
[ "https://Stackoverflow.com/questions/84782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14299/" ]
84,795
<p>How can I optimize the following code, which currently takes over 2 minutes to retrieve and loop through 800+ records from a pool of over 100K records, returning 6 fields per record (adds approximately 20 seconds per additional field):</p> <pre><code>&lt;cfset dllPath="C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\S...
[ { "answer_id": 85913, "author": "Peter Boughton", "author_id": 9360, "author_profile": "https://Stackoverflow.com/users/9360", "pm_score": 3, "selected": true, "text": "<cfset dllPath=\"C:\\WINDOWS\\Microsoft.NET\\Framework\\v1.1.4322\\System.DirectoryServices.dll\" />\n<cfset LDAPPath=\...
2008/09/17
[ "https://Stackoverflow.com/questions/84795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16289/" ]
84,800
<p>I am looking for an efficient way to pull the data I want out of an array called $submission_info so I can easily auto-fill my form fields. The array size is about 120.</p> <p>I want to find the field name and extract the content. In this case, the field name is <strong>loanOfficer</strong> and the content is <stro...
[ { "answer_id": 85117, "author": "Randy", "author_id": 9361, "author_profile": "https://Stackoverflow.com/users/9361", "pm_score": 3, "selected": true, "text": "foreach($submission_info as $elem) {\n $newarray[$elem[\"field_name\"]] = $elem[\"content\"];\n}\n" }, { "answer_id":...
2008/09/17
[ "https://Stackoverflow.com/questions/84800", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16292/" ]
84,803
<p>has anyone else seen this error message. a quick check with google doesn't show me much.</p>
[ { "answer_id": 84900, "author": "jessegavin", "author_id": 5651, "author_profile": "https://Stackoverflow.com/users/5651", "pm_score": 2, "selected": false, "text": "alert($(\"#myElement\").tagName);\n alert($(\"#myElement\")[0].tagName);\n" }, { "answer_id": 5640718, "author...
2008/09/17
[ "https://Stackoverflow.com/questions/84803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13800/" ]
84,817
<p>We are producing a portable code (win+macOs) and we are looking at how to make the code more rubust as it crashes every so often... (overflows or bad initializations usually) :-(</p> <p>I was reading that Google Chrome uses a process for every tab so if something goes wrong then the program does not crash compleate...
[ { "answer_id": 85289, "author": "paercebal", "author_id": 14089, "author_profile": "https://Stackoverflow.com/users/14089", "pm_score": 1, "selected": false, "text": "doSomethingBad(T * t)\n{\n if(t == NULL) return ;\n\n // do the processing.\n}\n doSomethingBad(T * t)\n{\n if(t ==...
2008/09/17
[ "https://Stackoverflow.com/questions/84817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16269/" ]
84,837
<p>I have an ASP.NET 1.1 application, and on my local machine the submit button on my page works fine, but when I deploy it to our development application server, I click on Submit and nothing happens.. I'm assuming that the Page_Validate() function is failing and disabling the POSTBACK, but how do I debug this and det...
[ { "answer_id": 145061, "author": "Mauricio Scheffer", "author_id": 21239, "author_profile": "https://Stackoverflow.com/users/21239", "pm_score": 0, "selected": false, "text": "aspnet_regiis.exe -c" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/84837", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7243/" ]
84,839
<p>I am trying to create an XML file based on data fields from a table, and I want to have the nodes named based on the value in a field from the table. The problem is that sometimes values entered in that column contain spaces and other characters not allowed in Node names.</p> <p>Does anyone have any code that will ...
[ { "answer_id": 145061, "author": "Mauricio Scheffer", "author_id": 21239, "author_profile": "https://Stackoverflow.com/users/21239", "pm_score": 0, "selected": false, "text": "aspnet_regiis.exe -c" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/84839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1889/" ]
84,842
<p>I'm programmatically adding ToolStripButton items to a context menu.</p> <p>That part is easy.</p> <pre><code>this.tsmiDelete.DropDownItems.Add("The text on the item."); </code></pre> <p>However, I also need to wire up the events so that when the user clicks the item something actually happens!</p> <p>How do I d...
[ { "answer_id": 84909, "author": "Andy", "author_id": 3857, "author_profile": "https://Stackoverflow.com/users/3857", "pm_score": 3, "selected": true, "text": "ToolStripButton btn = new ToolStripButton(\"The text on the item.\");\nthis.tsmiDelete.DropDownItems.Add(btn);\nbtn.Click += new ...
2008/09/17
[ "https://Stackoverflow.com/questions/84842", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7837/" ]
84,847
<p>How do I create a self-signed certificate for code signing using tools from the Windows SDK?</p>
[ { "answer_id": 201277, "author": "Roger Lipscombe", "author_id": 8446, "author_profile": "https://Stackoverflow.com/users/8446", "pm_score": 10, "selected": true, "text": "makecert -r -pe -n \"CN=My CA\" -ss CA -sr CurrentUser ^\n -a sha256 -cy authority -sky signature -sv MyCA.p...
2008/09/17
[ "https://Stackoverflow.com/questions/84847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8446/" ]
84,882
<p>This is a pretty simple question, at least it seems like it should be, about sudo permissions in Linux.</p> <p>There are a lot of times when I just want to append something to <code>/etc/hosts</code> or a similar file but end up not being able to because both <code>&gt;</code> and <code>&gt;&gt;</code> are not allo...
[ { "answer_id": 84898, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 4, "selected": false, "text": "sudo sh -c \"echo 127.0.0.1 localhost >> /etc/hosts\"\n" }, { "answer_id": 84899, "author": "Matt P", ...
2008/09/17
[ "https://Stackoverflow.com/questions/84882", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9908/" ]
84,885
<p>Wondering if anybody out there has any success in using the JDEdwards XMLInterop functionality. I've been using it for a while (with a simple PInvoke, will post code later). I'm looking to see if there's a better and/or more robust way.</p> <p>Thanks.</p>
[ { "answer_id": 154634, "author": "Jon Dewees", "author_id": 1365, "author_profile": "https://Stackoverflow.com/users/1365", "pm_score": 4, "selected": true, "text": "namespace YourNameSpace\n /// <summary>\n/// This webservice allows you to submit JDE XML CallObject requests via a c# web...
2008/09/17
[ "https://Stackoverflow.com/questions/84885", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1365/" ]
84,912
<p>Making a web page display correctly im all major browsers today is a very time consuming task.</p> <p>Is there a easy way to make a CSS style that looks identical in every browser? Or at least do you have some tips to make this work easier?</p>
[ { "answer_id": 84975, "author": "Toby Mills", "author_id": 12377, "author_profile": "https://Stackoverflow.com/users/12377", "pm_score": 3, "selected": false, "text": "<!--[if lte IE 6]>\n<link href=\"/css/eqtr_ie6.css\" rel=\"stylesheet\" type=\"text/css\" />\n<![endif]-->\n" }, { ...
2008/09/17
[ "https://Stackoverflow.com/questions/84912", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14635/" ]
84,932
<p>I have Perl script and need to determine the full path and filename of the script during execution. I discovered that depending on how you call the script <code>$0</code> varies and sometimes contains the <code>fullpath+filename</code> and sometimes just <code>filename</code>. Because the working directory can vary ...
[ { "answer_id": 84959, "author": "Ovid", "author_id": 8003, "author_profile": "https://Stackoverflow.com/users/8003", "pm_score": 7, "selected": false, "text": "use Cwd 'abs_path';\nprint abs_path($0);\n" }, { "answer_id": 84973, "author": "Sean", "author_id": 4919, "a...
2008/09/17
[ "https://Stackoverflow.com/questions/84932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16331/" ]
84,968
<p>If I open a file in Design View (web form), I get intellisense for my display code, but not my script code.. If I open with source code editor I, occasionally, get intellisense within the script tags. </p> <p>Anyone know how to get intellisense working all of the time for all of my code? </p> <p>Been living with...
[ { "answer_id": 85583, "author": "devlord", "author_id": 16454, "author_profile": "https://Stackoverflow.com/users/16454", "pm_score": 1, "selected": false, "text": "<script runat=\"server\"> <%@ Page Language=\"C#\" %>\n <script>" }, { "answer_id": 86256, "author": "madcolor"...
2008/09/17
[ "https://Stackoverflow.com/questions/84968", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13954/" ]
84,992
<p>I'm trying to register an externally hosted SQL 2000 server through Enterprise Manager which isn't on the default port and I can't see anywhere to change it within Enterprise Manager.</p> <p>So, the question is, how do I connect to the database if:</p> <p>I.P. Address is 123.456.789 (example)</p> <p>Port is 1334</p>...
[ { "answer_id": 86031, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "\\\\[instance]" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/84992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
84,995
<p>I'm looking for a way to stream a PDF file from my server to the browser using .NET 2.0 (in binary).</p> <p>I'm trying to grab an existing PDF file from a server path and push that up as binary to the browser.</p>
[ { "answer_id": 85002, "author": "Darren Kopp", "author_id": 77, "author_profile": "https://Stackoverflow.com/users/77", "pm_score": 1, "selected": false, "text": "Response.OutputStream Content-Disposition" }, { "answer_id": 85053, "author": "foxxtrot", "author_id": 10369,...
2008/09/17
[ "https://Stackoverflow.com/questions/84995", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2701/" ]
85,006
<p>I have loaded image into a new, initialized Oracle ORDImage object and am processing it by PL/SQL. I can read its properties, but cannot process it with the process() method. </p> <pre><code>vLocalImage ORDImage := ORDImage.init(); ... vLocalImage.source.localdata := PORTAL.wwdoc_admin.get_document_blob_content(pFi...
[ { "answer_id": 253114, "author": "Sten Vesterli", "author_id": 9363, "author_profile": "https://Stackoverflow.com/users/9363", "pm_score": 3, "selected": true, "text": " vNewImage ORDImage;\n...\n vLocalImage.processCopy('maxScale 534 401', vNewImage);\n" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/85006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9363/" ]
85,019
<p>Google Maps used to do this bit where when you hit the &quot;Print&quot; link, what would be sent to the printer wasn't exactly what you had on the screen, but rather a differently-formatted version of mostly the same information.</p> <p>It appears that they've largely moved away from this concept (I guess people di...
[ { "answer_id": 85061, "author": "skamradt", "author_id": 9217, "author_profile": "https://Stackoverflow.com/users/9217", "pm_score": 3, "selected": false, "text": "<link rel=\"stylesheet\" type=\"text/css\" href=\"print.css\" media=\"print, handheld\" />\n<link rel=\"stylesheet\" type=\"...
2008/09/17
[ "https://Stackoverflow.com/questions/85019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2577/" ]
85,033
<p>I am wrapping a native C++ class, which has the following methods:</p> <pre><code>class Native { public: class Local { std::string m_Str; int m_Int; }; typedef std::vector&lt;Local&gt; LocalVec; typedef LocalVec::iterator LocalIter; LocalIter BeginLocals(); LocalIte...
[ { "answer_id": 85402, "author": "Philip Rieck", "author_id": 12643, "author_profile": "https://Stackoverflow.com/users/12643", "pm_score": 4, "selected": true, "text": " vector<int> a_vector;\n vector<int>::iterator a_iterator;\n for(int i= 0; i < 100; i++)\n {\n a_vector.push_bac...
2008/09/17
[ "https://Stackoverflow.com/questions/85033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3114/" ]
85,034
<p>I want to make a table in SqlServer that will add, on insert, a auto incremented primary key. This should be an autoincremented id similar to MySql auto_increment functionality. (Below)</p> <pre><code>create table foo ( user_id int not null auto_increment, name varchar(50) ) </code></pre> <p>Is there a ...
[ { "answer_id": 85042, "author": "SQLMenace", "author_id": 740, "author_profile": "https://Stackoverflow.com/users/740", "pm_score": 5, "selected": true, "text": "create table foo \n( \nuser_id int not null identity, \nname varchar(50) \n)\n" }, { "answer_id": 85858, "auth...
2008/09/17
[ "https://Stackoverflow.com/questions/85034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12942/" ]
85,036
<p>I need to manually migrate modified stored procedures from a DEV SQL Server 2005 database instance to a TEST instance. Except for the changes I'm migrating, the databases have the same schemas. How can I quickly identify which stored procedures have been modified in the DEV database for migration to the TEST insta...
[ { "answer_id": 85084, "author": "RBS", "author_id": 14299, "author_profile": "https://Stackoverflow.com/users/14299", "pm_score": 0, "selected": false, "text": "SELECT name\n FROM sys.objects\n WHERE type = 'P'\n AND DATEDIFF(D,modify_date, GETDATE()) < 7\n" }, { "an...
2008/09/17
[ "https://Stackoverflow.com/questions/85036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16137/" ]
85,046
<p>Are there any good books or website that go over creating a <code>JTable</code>? I want to make one column editable. I would like to actually put a inherited <code>JCheckBox</code> component (that we created here) into one of the table columns instead of just having the table put <code>JCheckBox</code> in based on ...
[ { "answer_id": 105005, "author": "Richard Walton", "author_id": 15075, "author_profile": "https://Stackoverflow.com/users/15075", "pm_score": 0, "selected": false, "text": "Package javax.swing.table TableModel tablemodel AbstractTableModel DefaultTableModel arrays[] Vectors isCellEditabl...
2008/09/17
[ "https://Stackoverflow.com/questions/85046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14009/" ]
85,051
<p>Assuming network access is sporadic with no central server, what would be the best way to use git to keep three or more branches in sync? Is there a way to extract just my deltas, email those, and merge them on the other end?</p>
[ { "answer_id": 85079, "author": "Jim Puls", "author_id": 6010, "author_profile": "https://Stackoverflow.com/users/6010", "pm_score": 3, "selected": false, "text": "git-format-patch git-am" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/85051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16203/" ]
85,058
<p>I see <a href="http://www.is-research.de/info/vmlanguages/index.html" rel="noreferrer">here</a> that there are a load of languages aside from Java that run on the JVM. I'm a bit confused about the whole concept of other languages running in the JVM. So:</p> <p>What is the advantage in having other languages for the...
[ { "answer_id": 86201, "author": "toluju", "author_id": 12457, "author_profile": "https://Stackoverflow.com/users/12457", "pm_score": 6, "selected": true, "text": "from java.net import URL\nu = URL('http://jython.org')\n object Timer {\n def oncePerSecond(callback: () => unit) {\n whi...
2008/09/17
[ "https://Stackoverflow.com/questions/85058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/142/" ]
85,085
<p>I've got an RMI call defined as:</p> <pre><code>public void remoteGetCustomerNameNumbers(ArrayList&lt;String&gt; customerNumberList, ArrayList&lt;String&gt; customerNameList) throws java.rmi.RemoteException; </code></pre> <p>The function does a database lookup and populates the two ArrayLists. The calling functio...
[ { "answer_id": 86847, "author": "BCunningham", "author_id": 7689, "author_profile": "https://Stackoverflow.com/users/7689", "pm_score": 1, "selected": false, "text": "public ArrayList<String> getCustomerNames() throws java.rmi.RemoteException;\n\npublic ArrayList<String> getCustomerNumbe...
2008/09/17
[ "https://Stackoverflow.com/questions/85085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16345/" ]
85,091
<p>OK, this begins to drive me crazy. I have an asp.net webapp. Pretty straightforward, most of the code in the .aspx.vb, and a few classes in App_Code.</p> <p>The problem, which has begun to occur only today (even though most of the code was already written), is that once in a while, I have this error message :</p> ...
[ { "answer_id": 156933, "author": "thomasb", "author_id": 6776, "author_profile": "https://Stackoverflow.com/users/6776", "pm_score": 4, "selected": true, "text": "Imports CMS\n\nSub Whatever()\n Dim a as new Arbo.MyObject() ' Arbo is a namespace inside CMS\n Dim b as new Util.MyOth...
2008/09/17
[ "https://Stackoverflow.com/questions/85091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6776/" ]
85,116
<p>I want the server to always serve dates in UTC in the HTML, and have JavaScript on the client site convert it to the user's local timezone.</p> <p>Bonus if I can output in the user's locale date format.</p>
[ { "answer_id": 85161, "author": "japollock", "author_id": 1210318, "author_profile": "https://Stackoverflow.com/users/1210318", "pm_score": -1, "selected": false, "text": "usersLocalTime = new Date();\n" }, { "answer_id": 85213, "author": "dave", "author_id": 14355, "...
2008/09/17
[ "https://Stackoverflow.com/questions/85116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13989/" ]
85,119
<p>I know you can do redirection based on the domain or path to rewrite the URI to point at a site-specific location and I've also seen some brutish <code>if</code> and <code>elif</code> statements for every site as shown in the following code, which I would like to avoid.</p> <pre class="lang-py prettyprint-override">...
[ { "answer_id": 85134, "author": "Jim", "author_id": 8427, "author_profile": "https://Stackoverflow.com/users/8427", "pm_score": 5, "selected": true, "text": "Host" }, { "answer_id": 86705, "author": "Gabriel Ross", "author_id": 10751, "author_profile": "https://Stacko...
2008/09/17
[ "https://Stackoverflow.com/questions/85119", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4919/" ]
85,122
<p>On Windows I have a problem I never encountered on Unix. That is how to get a thread to sleep for less than one millisecond. On Unix you typically have a number of choices (sleep, usleep and nanosleep) to fit your needs. On Windows, however, there is only <em>Sleep</em> with millisecond granularity. </p> <p>On Unix...
[ { "answer_id": 85143, "author": "Jorge Ferreira", "author_id": 6508, "author_profile": "https://Stackoverflow.com/users/6508", "pm_score": -1, "selected": true, "text": "select WORD wVersionRequested = MAKEWORD(1,0);\nWSADATA wsaData;\nWSAStartup(wVersionRequested, &wsaData);\n int uslee...
2008/09/17
[ "https://Stackoverflow.com/questions/85122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6508/" ]
85,137
<p>Say I have a class named Frog, it looks like:</p> <pre><code>public class Frog { public int Location { get; set; } public int JumpCount { get; set; } public void OnJump() { JumpCount++; } } </code></pre> <p>I need help with 2 things:</p> <ol> <li>I want to create an event name...
[ { "answer_id": 85188, "author": "Quintin Robinson", "author_id": 12707, "author_profile": "https://Stackoverflow.com/users/12707", "pm_score": 7, "selected": true, "text": "public event EventHandler Jump;\npublic void OnJump()\n{\n EventHandler handler = Jump;\n if (null != handler...
2008/09/17
[ "https://Stackoverflow.com/questions/85137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1368/" ]
85,147
<p>I've never used any of the .NET generics in my work, but I understand that they are fairly popular. Does anyone have any good links or book suggestions for learning them? As a bonus; I only vaguely understand what .NET generic collections are and what they do...does anyone have any practical examples of how they m...
[ { "answer_id": 85249, "author": "William Yeung", "author_id": 16371, "author_profile": "https://Stackoverflow.com/users/16371", "pm_score": -1, "selected": false, "text": "public T GetValue<T>() {\n return (T) ...;\n}\n public class MyList<T>\n{\n private List<T> _list;\n...\npublic T ...
2008/09/17
[ "https://Stackoverflow.com/questions/85147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13776/" ]
85,159
<p>Is there any way to parse a string in the format HH:MM into a Date (or other) object using the standard libraries?</p> <p>I know that I can parse something like "9/17/2008 10:30" into a Date object using</p> <pre><code>var date:Date = new Date(Date.parse("9/17/2008 10:30"); </code></pre> <p>But I want to parse ju...
[ { "answer_id": 87125, "author": "mikechambers", "author_id": 10232, "author_profile": "https://Stackoverflow.com/users/10232", "pm_score": 2, "selected": false, "text": "var str:String = \"9/17/2008 10:30\"\n\nvar items:Array = str.split(\" \");\nvar dateElements:Array = items[0].split(\...
2008/09/17
[ "https://Stackoverflow.com/questions/85159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1247/" ]
85,181
<p>This is pretty weird.</p> <p>I have my Profiler open and it obviously shows that a stored procedure is called. I open the database and the SP list, but the SP doesn't exist. However, there's another SP whose name is the same except it has a prefix 'x'</p> <p>Is SQL Server 2005 mapping the SP name to a different on...
[ { "answer_id": 85341, "author": "Kevin Crumley", "author_id": 1818, "author_profile": "https://Stackoverflow.com/users/1818", "pm_score": 4, "selected": true, "text": "select *\nfrom sys.objects\nwhere name = 'THE_NAME_YOU_WANT'\n" }, { "answer_id": 6598930, "author": "Amit S...
2008/09/17
[ "https://Stackoverflow.com/questions/85181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10088/" ]
85,183
<p>I have an object that implements IDisposable that is registered with the Windsor Container and I would like to dispose of it so it's Dispose method is called and next time Resolve is called it fetches a new instance.</p> <p>Does </p> <pre><code>container.Release(obj); </code></pre> <p>automatically call Dispose(...
[ { "answer_id": 85498, "author": "Philip Rieck", "author_id": 12643, "author_profile": "https://Stackoverflow.com/users/12643", "pm_score": 2, "selected": false, "text": "using(ISomeService service = container.Resolve<ISomeService>())\n{\n // Do stuff here\n // service.Dispose is automati...
2008/09/17
[ "https://Stackoverflow.com/questions/85183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5056/" ]
85,190
<p>Consider:</p> <pre><code>List&lt;String&gt; someList = new ArrayList&lt;String&gt;(); // add "monkey", "donkey", "skeleton key" to someList </code></pre> <pre><code>for (String item : someList) { System.out.println(item); } </code></pre> <p>What would the equivalent <code>for</code> loop look like without u...
[ { "answer_id": 85206, "author": "nsayer", "author_id": 13757, "author_profile": "https://Stackoverflow.com/users/13757", "pm_score": 11, "selected": true, "text": "for (Iterator<String> i = someIterable.iterator(); i.hasNext();) {\n String item = i.next();\n System.out.println(item...
2008/09/17
[ "https://Stackoverflow.com/questions/85190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5074/" ]
85,223
<p>Of course most languages have library functions for this, but suppose I want to do it myself.</p> <p>Suppose that the float is given like in a C or Java program (except for the 'f' or 'd' suffix), for example "<code>4.2e1</code>", "<code>.42e2</code>" or simply "<code>42</code>". In general, we have the "integer pa...
[ { "answer_id": 85526, "author": "user7116", "author_id": 7116, "author_profile": "https://Stackoverflow.com/users/7116", "pm_score": 5, "selected": false, "text": "/* use this to start your atof implementation */\n\n/* atoi - christopher.watford@gmail.com */\n/* PUBLIC DOMAIN */\nlong at...
2008/09/17
[ "https://Stackoverflow.com/questions/85223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14637/" ]
85,272
<p>Anyone can read the GoF book to learn what design patterns are and how to use them, but what is the process for figuring out when a design pattern solves a problem? Does the knowledge of the pattern drive the design, or is there a way to figure out how a pattern can be used to change a design?</p> <p>In other words...
[ { "answer_id": 279828, "author": "Charlie Martin", "author_id": 35092, "author_profile": "https://Stackoverflow.com/users/35092", "pm_score": 4, "selected": false, "text": "TYPE_t ary[SIZE] = // ... gets initialized somehow\nsize_t ix ; // Your index variable\n\nfor(ix=0; ix < SIZ...
2008/09/17
[ "https://Stackoverflow.com/questions/85272", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7565/" ]
85,275
<p>I'm working on a game where I create a random map of provinces (a la Risk or Diplomacy). To create that map, I'm first generating a series of semi-random points, then figuring the Delaunay triangulations of those points. </p> <p>With that done, I am now looking to create a Voronoi diagram of the points to serve a...
[ { "answer_id": 85484, "author": "Alexandra Franks", "author_id": 16203, "author_profile": "https://Stackoverflow.com/users/16203", "pm_score": 3, "selected": false, "text": "for yloop = 0 to height-1\n for xloop = 0 to width-1\n\n // Generate maximal value\n closest_distance = wid...
2008/09/17
[ "https://Stackoverflow.com/questions/85275", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8365/" ]
85,282
<p>In C# you can make a block inside of a method that is not attached to any other statement.</p> <pre><code> public void TestMethod() { { string x = "test"; string y = x; { int z = 42; int zz = z; } } } </code>...
[ { "answer_id": 85323, "author": "Anthony", "author_id": 5599, "author_profile": "https://Stackoverflow.com/users/5599", "pm_score": 2, "selected": false, "text": "if (someCondition)\n SimpleStatement();\n\nif (SomeCondition)\n{\n BlockOfStatements();\n}\n" }, { "answer_id": 854...
2008/09/17
[ "https://Stackoverflow.com/questions/85282", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3289/" ]
85,283
<p>I'm writting a financial C# application which receive messages from the network, translate them into different object according to the message type and finaly apply the application business logic on them.</p> <p>The point is that after the business logic is applied, I'm very sure I will never need this instance aga...
[ { "answer_id": 87982, "author": "Eddie Velasquez", "author_id": 12851, "author_profile": "https://Stackoverflow.com/users/12851", "pm_score": 2, "selected": false, "text": "public class MyClass: IDisposable\n{\n private bool _disposed;\n\n public void Dispose()\n {\n Disp...
2008/09/17
[ "https://Stackoverflow.com/questions/85283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8315/" ]
85,353
<p>What is the best (or as good as possible) general SVN ignore pattern to use? </p> <p>There are a number of different IDE, editor, compiler, plug-in, platform, etc. specific files and some file types that "overlap" (i.e. desirable for some types projects and not for others). </p> <p><strong>There are however, a lar...
[ { "answer_id": 85371, "author": "icelava", "author_id": 2663, "author_profile": "https://Stackoverflow.com/users/2663", "pm_score": 3, "selected": false, "text": "*/bin */obj *.user *.suo\n" }, { "answer_id": 85440, "author": "noah", "author_id": 12034, "author_profil...
2008/09/17
[ "https://Stackoverflow.com/questions/85353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2233/" ]
85,370
<p>My strongest lead is that the code who deals with the incoming XMLs is actually receiving an invalid/incomplete file hence failing the DOM parsing. Any suggestions?</p>
[ { "answer_id": 85448, "author": "Hank", "author_id": 7610, "author_profile": "https://Stackoverflow.com/users/7610", "pm_score": 2, "selected": false, "text": "doc.selectSingleNode(\"//some/element/in/a/structure\");\n" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/85370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6992/" ]
85,373
<p>In SQL Server, how do I "floor" a DATETIME to the second/minute/hour/day/year?</p> <p>Let's say that I have a date of <strong>2008-09-17 12:56:53.430</strong>, then the output of flooring should be:</p> <ul> <li>Year: 2008-01-01 00:00:00.000</li> <li>Month: 2008-09-01 00:00:00.000</li> <li>Day: 2008-09-17 00:00:0...
[ { "answer_id": 85379, "author": "Portman", "author_id": 1690, "author_profile": "https://Stackoverflow.com/users/1690", "pm_score": 8, "selected": true, "text": "declare @datetime datetime;\nset @datetime = getdate();\nselect @datetime;\nselect dateadd(year,datediff(year,0,@datetime),0);...
2008/09/17
[ "https://Stackoverflow.com/questions/85373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1690/" ]
85,451
<p>Which is better to use for timing in Python? time.clock() or time.time()? Which one provides more accuracy?</p> <p>for example:</p> <pre><code>start = time.clock() ... do something elapsed = (time.clock() - start) </code></pre> <p>vs.</p> <pre><code>start = time.time() ... do something elapsed = (time.time() - s...
[ { "answer_id": 85489, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 4, "selected": false, "text": "clock() clock() time() time()" }, { "answer_id": 85511, "author": "PierreBdR", "author_id": 7136, ...
2008/09/17
[ "https://Stackoverflow.com/questions/85451", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16148/" ]
85,457
<p>I am trying to inherit from my generated datacontext in LinqToSQL - something like this </p> <pre><code>public class myContext : dbDataContext { public System.Data.Linq.Table&lt;User&gt;() Users { return (from x in base.Users() where x.DeletedOn.HasValue == false select x); } } </code></pre> <p>But my Linq sta...
[ { "answer_id": 85507, "author": "Scott Nichols", "author_id": 4299, "author_profile": "https://Stackoverflow.com/users/4299", "pm_score": 1, "selected": false, "text": "Users.OfType<ActiveUsers>\n" }, { "answer_id": 85989, "author": "Scott Nichols", "author_id": 4299, ...
2008/09/17
[ "https://Stackoverflow.com/questions/85457", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16416/" ]
85,459
<p>I have a series of PDFs named sequentially like so:</p> <ul> <li>01_foo.pdf</li> <li>02_bar.pdf</li> <li>03_baz.pdf</li> <li>etc.</li> </ul> <p>Using Ruby, is it possible to combine these into one big PDF while keeping them in sequence? I don't mind installing any necessary gems to do the job.</p> <p>If this isn'...
[ { "answer_id": 85576, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 2, "selected": false, "text": "system()" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/85459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1944/" ]
85,479
<p>Can someone give an example of a good time to actually use "unsafe" and "fixed" in C# code? I've played with it before, but never actually found a good use for it. </p> <p>Consider this code...</p> <pre><code>fixed (byte* pSrc = src, pDst = dst) { //Code that copies the bytes in a loop } </code></pre> <p>comp...
[ { "answer_id": 85774, "author": "Rune", "author_id": 7948, "author_profile": "https://Stackoverflow.com/users/7948", "pm_score": 5, "selected": false, "text": "unsafe\n{\n BitmapData bmData = bm.LockBits(...)\n byte *bits = (byte*)pixels.ToPointer();\n // Do stuff with bits\n}\n...
2008/09/17
[ "https://Stackoverflow.com/questions/85479", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
85,481
<p>Say I've got this table (SQL Server 2005):</p> <pre><code>Id =&gt; integer MyField =&gt; XML </code></pre> <p><b>Id MyField</b> </p> <pre><code>1 &lt; Object&gt;&lt; Type&gt;AAA&lt; /Type&gt;&lt; Value&gt;10&lt; /Value&gt;&lt; /Object&gt;&lt; Object&gt;&lt; Type&gt;BBB&lt; /Type&gt;&lt;Value&gt;20&lt; /Valu...
[ { "answer_id": 85535, "author": "Darren Kopp", "author_id": 77, "author_profile": "https://Stackoverflow.com/users/77", "pm_score": 1, "selected": false, "text": "select id, MyField.query('/Object/Type[.=\"AAA\"]/Value') as AAA, MyField.query('/Object/Type[.=\"BBB\"]/Value) AS BBB\n" }...
2008/09/17
[ "https://Stackoverflow.com/questions/85481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15928/" ]
85,486
<p>I'm trying to add an SVN repository to Eclipse. </p> <p>I've installed <a href="http://subclipse.tigris.org/" rel="noreferrer">Subclipse</a>, and it seems to be working fine. But, when I try to "add a new SVN repository", I input this, for example:</p> <p><em><a href="http://svn.python.org/projects/peps/trunk" rel...
[ { "answer_id": 85619, "author": "bengineerd", "author_id": 10428, "author_profile": "https://Stackoverflow.com/users/10428", "pm_score": 2, "selected": false, "text": "$ svn checkout http://svn.python.org/projects/peps/trunk\n" }, { "answer_id": 85852, "author": "Mike Tunnicl...
2008/09/17
[ "https://Stackoverflow.com/questions/85486", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1179/" ]
85,487
<p>How do I perform a reverse DNS lookup, that is how do I resolve an IP address to its DNS hostname in Perl?</p>
[ { "answer_id": 85573, "author": "Joakim", "author_id": 16432, "author_profile": "https://Stackoverflow.com/users/16432", "pm_score": 4, "selected": false, "text": "use Socket;\n$iaddr = inet_aton(\"127.0.0.1\"); # or whatever address\n$name = gethostbyaddr($iaddr, AF_INET);\n" }, { ...
2008/09/17
[ "https://Stackoverflow.com/questions/85487", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16432/" ]
85,500
<p>First time working with UpdatePanels in .NET. </p> <p>I have an updatepanel with a trigger pointed to an event on a FormView control. The UpdatePanel holds a ListView with related data from a separate database.</p> <p>When the UpdatePanel refreshes, it needs values from the FormView control so that on the server i...
[ { "answer_id": 86520, "author": "StingyJack", "author_id": 16391, "author_profile": "https://Stackoverflow.com/users/16391", "pm_score": 3, "selected": true, "text": "<html xmlns=\"http://www.w3.org/1999/xhtml\" >\n<head runat=\"server\">\n <title>Untitled Page</title>\n <script ty...
2008/09/17
[ "https://Stackoverflow.com/questions/85500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16426/" ]
85,553
<p>MSDN says that you should use structs when you need lightweight objects. Are there any other scenarios when a struct is preferable over a class?</p> <p>Some people might have forgotten that:</p> <ol> <li><em>structs</em> can have methods.</li> <li><em>structs</em> cannot be inherited.</li> </ol> <p>I understand t...
[ { "answer_id": 470416, "author": "Andrei Rînea", "author_id": 1796, "author_profile": "https://Stackoverflow.com/users/1796", "pm_score": 6, "selected": false, "text": "public struct ThreeDimensionalPoint\n{\n public readonly int X, Y, Z;\n public ThreeDimensionalPoint(int x, int y...
2008/09/17
[ "https://Stackoverflow.com/questions/85553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/781/" ]
85,559
<p>I have a problem in my project with the .designer which as everyone know is autogenerated and I ahvent changed at all. One day I was working fine, I did a back up and next day boom! the project suddenly stops working and sends a message that the designer cant procees a code line... and due to this I get more errores...
[ { "answer_id": 85602, "author": "Quintin Robinson", "author_id": 12707, "author_profile": "https://Stackoverflow.com/users/12707", "pm_score": 1, "selected": false, "text": "If(Not DesignMode) Then Me.CrystalReportViewer1.ReportSource = Me.CrystalReport11\n Public Sub New()\n Initiali...
2008/09/17
[ "https://Stackoverflow.com/questions/85559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
85,577
<p>I'd like to search for a given MAC address on my network, all from within a Python script. I already have a map of all the active IP addresses in the network but I cannot figure out how to glean the MAC address. Any ideas?</p>
[ { "answer_id": 85632, "author": "Sylvain Defresne", "author_id": 5353, "author_profile": "https://Stackoverflow.com/users/5353", "pm_score": 1, "selected": false, "text": "arping" }, { "answer_id": 86541, "author": "akiva", "author_id": 65724, "author_profile": "https...
2008/09/17
[ "https://Stackoverflow.com/questions/85577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11760/" ]
85,622
<p>Most precompiled Windows binaries are made with the MSYS+gcc toolchain. It uses MSVCRT runtime, which is incompatible with Visual C++ 2005/2008.</p> <p>So, how to go about and compile Cairo 1.6.4 (or later) for Visual C++ only. Including dependencies (png,zlib,pixman).</p>
[ { "answer_id": 96168, "author": "jfs", "author_id": 6223, "author_profile": "https://Stackoverflow.com/users/6223", "pm_score": 0, "selected": false, "text": "config.h" }, { "answer_id": 6704146, "author": "Sergeq", "author_id": 846031, "author_profile": "https://Stac...
2008/09/17
[ "https://Stackoverflow.com/questions/85622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14455/" ]
85,649
<p>How do I remove a USB drive using the Win32 API? I do a lot of work on embedded systems and on one of these I have to copy my programs on a USB stick and insert it into the target hardware.</p> <p>Since I mostly work on the console I don't like to use the mouse and click on the small task-bar icon hundred times a d...
[ { "answer_id": 85678, "author": "Grant Wagner", "author_id": 9254, "author_profile": "https://Stackoverflow.com/users/9254", "pm_score": 3, "selected": false, "text": "sync -e [drive_letter]" }, { "answer_id": 85694, "author": "Kris Kumler", "author_id": 4281, "author...
2008/09/17
[ "https://Stackoverflow.com/questions/85649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15955/" ]
85,675
<p>I have two tables I would like to complare. One of the columns is type CLOB. I would like to do something like this:</p> <pre><code>select key, clob_value source_table minus select key, clob_value target_table </code></pre> <p>Unfortunately, Oracle can't perform minus operations on clobs. How can I do this?</p>...
[ { "answer_id": 85716, "author": "hamishmcn", "author_id": 3590, "author_profile": "https://Stackoverflow.com/users/3590", "pm_score": 2, "selected": false, "text": "select key, to_hash_str_val(glob_value) from source_table\nminus\nselect key, to_hash_str_val(glob_value) from target_table...
2008/09/17
[ "https://Stackoverflow.com/questions/85675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16484/" ]
85,699
<p>I'm building a group calendar application that needs to support recurring events, but all the solutions I've come up with to handle these events seem like a hack. I can limit how far ahead one can look, and then generate all the events at once. Or I can store the events as repeating and dynamically display them when...
[ { "answer_id": 85909, "author": "Purfideas", "author_id": 4615, "author_profile": "https://Stackoverflow.com/users/4615", "pm_score": 2, "selected": false, "text": "#!/usr/bin/ruby\nrequire 'date'\n\nstart_date = Date.parse('2008-01-01')\nend_date = Date.parse('2008-04-01')\nwday = 5 #...
2008/09/17
[ "https://Stackoverflow.com/questions/85699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6262/" ]
85,701
<p>I have a database field that contains a raw date field (stored as character data), such as </p> <blockquote> <p>Friday, September 26, 2008 8:30 PM Eastern Daylight Time</p> </blockquote> <p>I can parse this as a Date easily, with SimpleDateFormat</p> <pre><code>DateFormat dbFormatter = new SimpleDateFormat("EEE...
[ { "answer_id": 86183, "author": "Ed Thomas", "author_id": 8256, "author_profile": "https://Stackoverflow.com/users/8256", "pm_score": 2, "selected": false, "text": " DateFormat dbFormatter = new SimpleDateFormat(\"EEEE, MMMM dd, yyyy hh:mm aa zzzz\");\n dbFormatter.setTimeZ...
2008/09/17
[ "https://Stackoverflow.com/questions/85701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4249/" ]
85,702
<p>I want to have a "select-only" <code>ComboBox</code> that provides a list of items for the user to select from. Typing should be disabled in the text portion of the <code>ComboBox</code> control.</p> <p>My initial googling of this turned up an overly complex, misguided suggestion to capture the <code>KeyPress</code...
[ { "answer_id": 85706, "author": "Cory Engebretson", "author_id": 3406, "author_profile": "https://Stackoverflow.com/users/3406", "pm_score": 10, "selected": true, "text": "stateComboBox.DropDownStyle = ComboBoxStyle.DropDownList;\n" }, { "answer_id": 26005210, "author": "inve...
2008/09/17
[ "https://Stackoverflow.com/questions/85702", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3406/" ]
85,724
<p>I've got an Active Directory synchronization tool (.NET 2.0 / C#) written as a Windows Service that I've been working on for a while and have recently been tasked with adding the ability to drive events based on changes in group membership. The basic scenario is that users are synchronized with a security database a...
[ { "answer_id": 86141, "author": "Claus Thomsen", "author_id": 15555, "author_profile": "https://Stackoverflow.com/users/15555", "pm_score": 2, "selected": false, "text": " EventLog myLog = new EventLog(\"Security\");\n\n // set event handler\n myLog.EntryWritten += n...
2008/09/17
[ "https://Stackoverflow.com/questions/85724", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12063/" ]
85,726
<p>Is it possible to convert floating point exceptions (signals) into C++ exceptions on x86 Linux?</p> <p>This is for debugging purposes, so nonportability and imperfection is okay (e.g., if it isn't 100% guaranteed that all destructors are called).</p>
[ { "answer_id": 88829, "author": "jwfearn", "author_id": 10559, "author_profile": "https://Stackoverflow.com/users/10559", "pm_score": 3, "selected": false, "text": "fetestexcept feraiseexcept feclearexcept" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/85726", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16480/" ]
85,761
<p>I have an external variable coming in as a string and I would like to do a switch/case on it. How do I do that in xquery?</p>
[ { "answer_id": 85780, "author": "Sixty4Bit", "author_id": 1681, "author_profile": "https://Stackoverflow.com/users/1681", "pm_score": 2, "selected": false, "text": "let $str := \"kitchen\"\nlet $room := element {$str} {}\n return typeswitch($room)\n case element(bathroom) return \"loo\"...
2008/09/17
[ "https://Stackoverflow.com/questions/85761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1681/" ]
85,770
<p>here is the input i am getting from my flash file </p> <p>process.php?Q2=898&amp;Aa=Grade1&amp;Tim=0%3A0%3A12&amp;Q1=908&amp;Bb=lkj&amp;Q4=jhj&amp;Q3=08&amp;Cc=North%20America&amp;Q0=1</p> <p>and in php i use this code foreach ($_GET as $field => $label) { $datarray[]=$_GET[$field];</p> <pre><code>echo "$fi...
[ { "answer_id": 85792, "author": "terminus", "author_id": 9232, "author_profile": "https://Stackoverflow.com/users/9232", "pm_score": 4, "selected": true, "text": "ksort($_GET);\n $_GET" }, { "answer_id": 85841, "author": "micahwittman", "author_id": 11181, "author_pro...
2008/09/17
[ "https://Stackoverflow.com/questions/85770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16458/" ]
85,773
<p>My source code needs to support both .NET version 1.1 and 2.0 ... how do I test for the different versions &amp; what is the best way to deal with this situation.</p> <p>I'm wondering if I should have the two sections of code inline, in separate classes, methods etc. What do you think?</p>
[ { "answer_id": 85902, "author": "Scott Dorman", "author_id": 1559, "author_profile": "https://Stackoverflow.com/users/1559", "pm_score": 2, "selected": true, "text": "#if NET11\n// .NET 1.1 code\n#elif NET20\n// .NET 2.0 code\n#endif\n" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/85773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4491/" ]
85,804
<p>Is there a better way to forcefully disconnect all users from an Oracle 10g database schema than restarting the Oracle database services?</p> <p>We have several developers using SQL Developer connecting to the same schema on a single Oracle 10g server. The problem is that when we want to drop the schema to rebuild...
[ { "answer_id": 86739, "author": "Sten Vesterli", "author_id": 9363, "author_profile": "https://Stackoverflow.com/users/9363", "pm_score": 8, "selected": true, "text": "select sid,serial# from v$session where username = '<your_schema>' and program = 'SQL Developer' os_user alter system ki...
2008/09/17
[ "https://Stackoverflow.com/questions/85804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15766/" ]
85,815
<p>How do you tell if a function in JavaScript is defined?</p> <p>I want to do something like this</p> <pre><code>function something_cool(text, callback) { alert(text); if( callback != null ) callback(); } </code></pre> <p>But it gets me a</p> <blockquote> <p>callback is not a function</p> </blockquote> ...
[ { "answer_id": 85822, "author": "Tom Ritter", "author_id": 8435, "author_profile": "https://Stackoverflow.com/users/8435", "pm_score": 10, "selected": true, "text": "typeof callback === \"function\"\n" }, { "answer_id": 85825, "author": "bdukes", "author_id": 2688, "a...
2008/09/17
[ "https://Stackoverflow.com/questions/85815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8351/" ]
85,816
<p>I've got just one page that I want to force to be accessed as an HTTPS page (PHP on Apache). How do I do this without making the whole directory require HTTPS? Or, if you submit a form to an HTTPS page from an HTTP page, does it send it by HTTPS instead of HTTP?</p> <p>Here is my example:</p> <pre><code>http://www.e...
[ { "answer_id": 85835, "author": "thebigjc", "author_id": 16507, "author_profile": "https://Stackoverflow.com/users/16507", "pm_score": 6, "selected": false, "text": "<Location /buyCrap.php>\nRewriteEngine On\nRewriteCond %{HTTPS} off\nRewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}\n...
2008/09/17
[ "https://Stackoverflow.com/questions/85816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
85,880
<p>Currently I'm doing some unit tests which are executed from bash. Unit tests are initialized, executed and cleaned up in a bash script. This script usualy contains an init(), execute() and cleanup() functions. But they are not mandatory. I'd like to test if they are or are not defined.</p> <p>I did this previously ...
[ { "answer_id": 85903, "author": "JBB", "author_id": 12332, "author_profile": "https://Stackoverflow.com/users/12332", "pm_score": 9, "selected": true, "text": "[[ $(type -t foo) == function ]] && echo \"Foo exists\" type $ LC_ALL=C type foo\nbash: type: foo: not found\n\n$ LC_ALL=C type ...
2008/09/17
[ "https://Stackoverflow.com/questions/85880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9232/" ]