qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
143,745
<p>One thing that's really been making life difficult in getting up to speed on the codebase on an ASP classic project is that the include file situation is kind of a mess. I sometimes find the function I was looking for being included in an include file that is totally unrelated. Does anyone have any advice on how t...
[ { "answer_id": 148124, "author": "Cirieno", "author_id": 17615, "author_profile": "https://Stackoverflow.com/users/17615", "pm_score": 2, "selected": false, "text": "initialise.asp lib_http.asp lib_mssql.asp '..\\'" }, { "answer_id": 148366, "author": "Eduardo Molteni", "...
2008/09/27
[ "https://Stackoverflow.com/questions/143745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2147/" ]
143,746
<p>I know most people think that as a <em>bad practice</em> but when you are trying to make your class public interface only work with references, keeping pointers inside and only when necessary, I think there is no way to return something telling that the value you are looking doesn't exist in the container.</p> <pre...
[ { "answer_id": 143758, "author": "MidnightGun", "author_id": 13220, "author_profile": "https://Stackoverflow.com/users/13220", "pm_score": -1, "selected": false, "text": "MyType *pObj = nullptr;\nreturn *pObj\n" }, { "answer_id": 143782, "author": "Martin Cote", "author_i...
2008/09/27
[ "https://Stackoverflow.com/questions/143746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18623/" ]
143,747
<p>I'm writing some JavaScript code that needs to fire the <code>click</code> event for a link. In Internet Explorer I can do this </p> <pre><code>var button = document.getElementById('myButton'); button.click(); </code></pre> <p>But this doesn't work in Firefox, and I assume any other browser. In Firefox, I've done...
[ { "answer_id": 143771, "author": "Chris MacDonald", "author_id": 18146, "author_profile": "https://Stackoverflow.com/users/18146", "pm_score": 6, "selected": false, "text": "function fireEvent(element,event) {\n if (document.createEvent) {\n // dispatch for firefox + others\n ...
2008/09/27
[ "https://Stackoverflow.com/questions/143747", "https://Stackoverflow.com", "https://Stackoverflow.com/users/392/" ]
143,756
<p>I need to rename the database but when I do in <code>PGAdmin : ALTER DATABASE "databaseName" RENAME TO "databaseNameOld"</code> it told me that it cannot.</p> <p>How can I do it?</p> <p>(<strong>Version 8.3 on WindowsXP</strong>)</p> <p><strong>Update</strong></p> <ul> <li><p>The first error message : Cannot be...
[ { "answer_id": 143764, "author": "bmdhacks", "author_id": 14032, "author_profile": "https://Stackoverflow.com/users/14032", "pm_score": 8, "selected": false, "text": "ALTER DATABASE people RENAME TO customers;\n" }, { "answer_id": 143852, "author": "Milen A. Radev", "auth...
2008/09/27
[ "https://Stackoverflow.com/questions/143756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13913/" ]
143,791
<p>I have a system (Ubuntu) with many processes and one (or more) have a memory leak. Is there a good way to find the process that has the leak? Some of the process are JVMs, some are not. Some are home grown some are open source.</p>
[ { "answer_id": 143809, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 4, "selected": false, "text": "top top -b -n 1" }, { "answer_id": 147322, "author": "Dprado", "author_id": 21943, "author_profi...
2008/09/27
[ "https://Stackoverflow.com/questions/143791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
143,793
<p>According to this article <a href="http://msdn.microsoft.com/en-us/library/cc197951(VS.95).aspx" rel="nofollow noreferrer">Silverlight 2 Beta 2</a> supports the <code>DataContractJsonSerializer</code> object. But, when I try to use it VS says </p> <blockquote> <p>"Type 'DataContractJsonSerializer' is not defined"...
[ { "answer_id": 143824, "author": "Chris Pietschmann", "author_id": 7831, "author_profile": "https://Stackoverflow.com/users/7831", "pm_score": 1, "selected": false, "text": "Sys.Serialization.JavaScriptSerializer.serialize(obj);\nSys.Serialization.JavaScriptSerializer.deserialize(json);\...
2008/09/27
[ "https://Stackoverflow.com/questions/143793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7831/" ]
143,808
<p>We have fairly large C++ application which is composed of about 60 projects in Visual Studio 2005. It currently takes 7 minutes to link in Release mode and I would like to try to reduce the time. Are there any tips for improving the link time?</p> <p>Most of the projects compile to static libraries, this makes test...
[ { "answer_id": 145386, "author": "bk1e", "author_id": 8090, "author_profile": "https://Stackoverflow.com/users/8090", "pm_score": 5, "selected": true, "text": "/GL /LTCG /Z7 .obj /Zi .pdb" } ]
2008/09/27
[ "https://Stackoverflow.com/questions/143808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5022/" ]
143,814
<p>In an ideal world, our development processes would be perfect, resulting in regular releases that were so thoroughly tested that it would never be necessary to "hotfix" a running application.</p> <p>But, unfortunately, we live in the real world, and sometimes bugs slip past us and don't rear their ugly heads until ...
[ { "answer_id": 143851, "author": "Till", "author_id": 2859, "author_profile": "https://Stackoverflow.com/users/2859", "pm_score": 2, "selected": false, "text": "/repo/trunk/\n/repo/tags/1.1\n/repo/tags/1.2\n/repo/tags/1.3\n tags/x svn update tags/x trunk" } ]
2008/09/27
[ "https://Stackoverflow.com/questions/143814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1219/" ]
143,815
<p>Can I use JavaScript to check (irrespective of scrollbars) if an HTML element has overflowed its content? For example, a long div with small, fixed size, the overflow property set to visible, and no scrollbars on the element.</p>
[ { "answer_id": 143833, "author": "Chris MacDonald", "author_id": 18146, "author_profile": "https://Stackoverflow.com/users/18146", "pm_score": 4, "selected": false, "text": "element.scrollHeight element.scrollWidth element.offsetHeight element.offsetWidth" }, { "answer_id": 14388...
2008/09/27
[ "https://Stackoverflow.com/questions/143815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
143,822
<p>this wiki page gave a general idea of how to convert a single char to ascii <a href="http://en.wikibooks.org/wiki/Ruby_Programming/ASCII" rel="noreferrer">http://en.wikibooks.org/wiki/Ruby_Programming/ASCII</a></p> <p>But say if I have a string and I wanted to get each character's ascii from it, what do i need to d...
[ { "answer_id": 143834, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 7, "selected": true, "text": "c \"string\".each_byte do |c|\n puts c\nend\n 115\n116\n114\n105\n110\n103\n" }, { "answer_id": 1557734, ...
2008/09/27
[ "https://Stackoverflow.com/questions/143822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2668/" ]
143,847
<p>What is the best way to find if an object is in an array?</p> <p>This is the best way I know:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>function include(arr, obj) ...
[ { "answer_id": 143863, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 11, "selected": true, "text": "includes() arr.includes(obj);\n function include(arr,obj) {\n return (arr.indexOf(obj) != -1);\n}\n if (!Array...
2008/09/27
[ "https://Stackoverflow.com/questions/143847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17533/" ]
143,850
<p>let's say we have a c++ class like:</p> <pre><code>class MyClass { void processArray( &lt;an array of 255 integers&gt; ) { int i ; for (i=0;i&lt;255;i++) { // do something with values in the array } } } </code></pre> <p>and one instance of the class like: </p> <pre><code>MyCl...
[ { "answer_id": 143853, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 5, "selected": true, "text": "i i" } ]
2008/09/27
[ "https://Stackoverflow.com/questions/143850", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23000/" ]
143,855
<p>Do you use code-generation tools (aside from those used to generate proxies and from designers built-in to visual studio)? </p> <p>What part(s) of your application do you generate? </p> <p>Do you typically roll your own generator? If so, what type of generator do you write (asp templates, coddom etc.). If not, wha...
[ { "answer_id": 144177, "author": "Jacob Krall", "author_id": 3140, "author_profile": "https://Stackoverflow.com/users/3140", "pm_score": 3, "selected": false, "text": "<ActiveRecord(\"Kiwi\")> _\nClass CKiwi\nEnd Class\n" } ]
2008/09/27
[ "https://Stackoverflow.com/questions/143855", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17744/" ]
143,872
<p>I am writing a data conversion in PL/SQL that processes data and loads it into a table. According to the PL/SQL Profiler, one of the slowest parts of the conversion is the actual insert into the target table. The table has a single index.</p> <p>To prepare the data for load, I populate a variable using the rowtype ...
[ { "answer_id": 143946, "author": "CaptainPicard", "author_id": 15203, "author_profile": "https://Stackoverflow.com/users/15203", "pm_score": 5, "selected": true, "text": "INSERT /*+APPEND*/" }, { "answer_id": 13887303, "author": "skk", "author_id": 1905348, "author_pr...
2008/09/27
[ "https://Stackoverflow.com/questions/143872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20625/" ]
143,925
<p>I want to be able to run a single spec file's tests &mdash; for the one file I'm editing, for example. <code>rake spec</code> executes all the specs. My project is not a Rails project, so <code>rake spec:doc</code> doesn't work.</p> <p>Don't know if this matters, but here is my directory structure.</p> <pre> ./R...
[ { "answer_id": 144063, "author": "Cameron Booth", "author_id": 14873, "author_profile": "https://Stackoverflow.com/users/14873", "pm_score": 10, "selected": true, "text": "bundle exec rspec path/to/spec/file.rb\n bundle exec spec path/to/spec/file.rb\n" }, { "answer_id": 146612, ...
2008/09/27
[ "https://Stackoverflow.com/questions/143925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12887/" ]
143,933
<p>My side question is there really any difference between tinyblob &amp; tinytext? </p> <p>Buy my real question is what reason, if any, would I choose varchar(255) over tinyblob or tinytext? </p>
[ { "answer_id": 143943, "author": "sethbc", "author_id": 21722, "author_profile": "https://Stackoverflow.com/users/21722", "pm_score": 4, "selected": false, "text": "M L M M L L L L" } ]
2008/09/27
[ "https://Stackoverflow.com/questions/143933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1444/" ]
143,947
<p>More than about LINQ to [insert your favorite provider here], this question is about searching or filtering in-memory collections. </p> <p>I know LINQ (or searching/filtering extension methods) works in objects implementing <code>IEnumerable</code> or <code>IEnumerable&lt;T&gt;</code>. The question is: <em>because ...
[ { "answer_id": 144002, "author": "Sklivvz", "author_id": 7028, "author_profile": "https://Stackoverflow.com/users/7028", "pm_score": 2, "selected": false, "text": "IEnumerable" }, { "answer_id": 144089, "author": "Tobi", "author_id": 5422, "author_profile": "https://S...
2008/09/27
[ "https://Stackoverflow.com/questions/143947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18552/" ]
143,971
<p>I think title should be good enough.</p>
[ { "answer_id": 188077, "author": "ColinYounger", "author_id": 1223, "author_profile": "https://Stackoverflow.com/users/1223", "pm_score": 0, "selected": false, "text": "v1.0 <-- Branch \n v1.0.1 <-- Tag \n v1.0.2 <-- Tag \nv1.1 <-- Branch \n v1.1.1 <-- Tag \n v1.1.2 <-- Tag \nv...
2008/09/27
[ "https://Stackoverflow.com/questions/143971", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4406/" ]
143,973
<p>I happened upon a brief discussion recently on another site about C# runtime compilation recently while searching for something else and thought the idea was interesting. Have you ever used this? I'm trying to determine how/when one might use this and what problem it solves. I'd be very interested in hearing how ...
[ { "answer_id": 143988, "author": "Matt Howells", "author_id": 16881, "author_profile": "https://Stackoverflow.com/users/16881", "pm_score": 2, "selected": false, "text": "IMyProxy : IXmlRpcProxy\n{\n [XmlRpcMethod]\n int Add(int a, int b);\n}\n IMyProxy proxy = (IMyProxy)XmlRcpFact...
2008/09/27
[ "https://Stackoverflow.com/questions/143973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7862/" ]
143,997
<p>In Jesse Liberty's Learning C# book, he says "Objects of one type can be converted into objects of another type. This is called casting."</p> <p>If you investigate the IL generated from the code below, you can clearly see that the casted assignment isn't doing the same thing as the converted assignment. In the form...
[ { "answer_id": 144006, "author": "Sklivvz", "author_id": 7028, "author_profile": "https://Stackoverflow.com/users/7028", "pm_score": 5, "selected": false, "text": "static void Main(string[] args)\n{\n long l = long.MaxValue;\n\n Console.WriteLine(l);\n\n byte b = (byte) l;\n\n ...
2008/09/27
[ "https://Stackoverflow.com/questions/143997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2536/" ]
144,058
<p>I just installed Ganymede and am exploring an old project in it. All of my JSPs are giving me weird validation errors. I'm seeing stuff like - </p> <pre><code>Syntax error on token "}", delete this token Syntax error on token "catch", Identifier expected Syntax error, insert "Finally" to complete TryStatement </cod...
[ { "answer_id": 281282, "author": "Greg", "author_id": 28002, "author_profile": "https://Stackoverflow.com/users/28002", "pm_score": 1, "selected": false, "text": "<% if(message != null) { %>\n <p id=\"message\"><%=message %></p>\n<% } else { %>\n <p>Please login to view your acco...
2008/09/27
[ "https://Stackoverflow.com/questions/144058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/543/" ]
144,088
<p>I'm playing with ASP.NET MVC for the last few days and was able to build a small site. Everything works great. </p> <p>Now, I need to pass the page's META tags (title, description, keywords, etc.) via the ViewData. (i'm using a master page).</p> <p>How you're dealing with this? Thank you in advance.</p>
[ { "answer_id": 144127, "author": "Ricky", "author_id": 653, "author_profile": "https://Stackoverflow.com/users/653", "pm_score": 5, "selected": true, "text": "<head>\n<asp:ContentPlaceHolder ID=\"cphHead\" runat=\"server\">\n <title>Default Title</title>\n <meta name=\"description\...
2008/09/27
[ "https://Stackoverflow.com/questions/144088", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19610/" ]
144,118
<p>While trying to generate classes from a xsd, i got this error:</p> <pre><code>java.lang.IllegalArgumentException: Illegal class inheritance loop. Outer class OrderPropertyList may not subclass from inner class: OrderPropertyList </code></pre> <p>My xsd define a element to group a unbounded element like this:</p> ...
[ { "answer_id": 179916, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 5, "selected": true, "text": "<jaxb:globalBindings localScoping=\"toplevel\"/>\n <jaxb:bindings schemaLocation=\"../xsd/Schema.xsd\" node=\"/xs:schema\">\n ...
2008/09/27
[ "https://Stackoverflow.com/questions/144118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21370/" ]
144,134
<p>How does C handle converting between integers and characters? Say you've declared an integer variable and ask the user for a number but they input a string instead. What would happen?</p>
[ { "answer_id": 144199, "author": "Eclipse", "author_id": 8701, "author_profile": "https://Stackoverflow.com/users/8701", "pm_score": 2, "selected": false, "text": "char foo = 'a'; // The ascii value representation for lower-case 'a' is 97\nint bar = foo; // bar now contains the value 97 ...
2008/09/27
[ "https://Stackoverflow.com/questions/144134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1972/" ]
144,147
<p>I have a sparse array in Jscript, with non-null elements occuring at both negative and positive indices. When I try to use a for in loop, it doesn't traverse the array from the lowest (negative) index to the highest positive index. Instead it returns the array in the order that I added the elements. Enumeration does...
[ { "answer_id": 144182, "author": "Ricky", "author_id": 653, "author_profile": "https://Stackoverflow.com/users/653", "pm_score": 4, "selected": true, "text": "<script type=\"text/javascript\">\n//define and initialize your object/hastable\nvar obj = {};\nobj[20] = 'C';\nobj[10] = 'B';\no...
2008/09/27
[ "https://Stackoverflow.com/questions/144147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
144,151
<p>My macro updates a large spreadsheet with numbers, but it runs very slowly as excel is rendering the result as it computes it. How do I stop excel from rendering the output until the macro is complete?</p>
[ { "answer_id": 144160, "author": "Joe", "author_id": 13087, "author_profile": "https://Stackoverflow.com/users/13087", "pm_score": 2, "selected": false, "text": "Public Sub MyMacro\n On Error GoTo ErrHandler\n Application.ScreenUpdating = False\n ... do my stuff that might raise...
2008/09/27
[ "https://Stackoverflow.com/questions/144151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5472/" ]
144,167
<p>I am using Oracle SQL (in SQLDeveloper, so I don't have access to SQLPLUS commands such as COLUMN) to execute a query that looks something like this:</p> <pre><code>select assigner_staff_id as staff_id, active_flag, assign_date, complete_date, mod_date from work where assigner_staff_id = '2096'; </code></pre> <p...
[ { "answer_id": 144187, "author": "Thomas Jones-Low", "author_id": 23030, "author_profile": "https://Stackoverflow.com/users/23030", "pm_score": 3, "selected": true, "text": "select substr(assigner_staff_id, 8) as staff_id, \n active_flag as Flag, \n to_char(assign_date, 'DD/MM/...
2008/09/27
[ "https://Stackoverflow.com/questions/144167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13140/" ]
144,176
<p>I need to convert a (possibly) null terminated array of ascii bytes to a string in C# and the fastest way I've found to do it is by using my UnsafeAsciiBytesToString method shown below. This method uses the String.String(sbyte*) constructor which contains a warning in it's remarks:</p> <p>"The value parameter is as...
[ { "answer_id": 144189, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 5, "selected": true, "text": "String(sbyte*, int, int) public static string UnsafeAsciiBytesToString(byte[] buffer, int offset, int length)\n{\n uns...
2008/09/27
[ "https://Stackoverflow.com/questions/144176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16387/" ]
144,218
<p>So I've decided to try to solve my physics homework by writing some python scripts to solve problems for me. One problem that I'm running into is that significant figures don't always seem to come out properly. For example this handles significant figures properly:</p> <pre><code>from decimal import Decimal &gt;&...
[ { "answer_id": 144231, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "decimal.getcontext().prec=2\n" }, { "answer_id": 144263, "author": "S.Lott", "author_id": 10661, "author_p...
2008/09/27
[ "https://Stackoverflow.com/questions/144218", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2147/" ]
144,226
<p>From what I know, the em keyword in CSS means the current size of a font.</p> <p>So if you put 1.2 em, it means 120% of the font height.</p> <p>It doesn't seem right though that em is used for setting the width of divs etc like YUI grids does:</p> <pre><code>margin-right:24.0769em;*margin-right:23.62em; </code></...
[ { "answer_id": 144238, "author": "Fczbkk", "author_id": 22920, "author_profile": "https://Stackoverflow.com/users/22920", "pm_score": 0, "selected": false, "text": "em" }, { "answer_id": 144271, "author": "Ross", "author_id": 2025, "author_profile": "https://Stackover...
2008/09/27
[ "https://Stackoverflow.com/questions/144226", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1368/" ]
144,246
<p>I have an application that is causing a lot of headaches. It's a .NET app connecting to SQL Server 2005 via a web service. The program has grid that is filled by a long running stored procedure that is prone to timing out. In the case when it does time out and a SqlException is thrown, there is no execption handling...
[ { "answer_id": 144251, "author": "Codewerks", "author_id": 17729, "author_profile": "https://Stackoverflow.com/users/17729", "pm_score": 0, "selected": false, "text": "finally\n{\n if (cn != null)\n {\n cn.Dispose();\n cn = null;\n }\n}\n" }, { "answer_id": 144252...
2008/09/27
[ "https://Stackoverflow.com/questions/144246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22273/" ]
144,250
<p>I am writing an iPhone application and need to essentially implement something equivalent to the 'eyedropper' tool in photoshop, where you can touch a point on the image and capture the RGB values for the pixel in question to determine and match its color. Getting the UIImage is the easy part, but is there a way to...
[ { "answer_id": 144928, "author": "lajos", "author_id": 3740, "author_profile": "https://Stackoverflow.com/users/3740", "pm_score": 4, "selected": false, "text": "CGImageRef cgImage = [image CGImage];\nCGDataProviderRef provider = CGImageGetDataProvider(cgImage);\nCFDataRef bitmapData = C...
2008/09/27
[ "https://Stackoverflow.com/questions/144250", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17123/" ]
144,261
<p>Does Apple's Xcode development environment provide any tools for memory leak detection?</p> <p>I am especially interested in tools that apply to the iPhone SDK. Currently my favourite platform for hobby programming projects</p> <p>Documentations/tutorials for said tools would be very helpful.</p>
[ { "answer_id": 144491, "author": "KevDog", "author_id": 13139, "author_profile": "https://Stackoverflow.com/users/13139", "pm_score": 2, "selected": false, "text": "Instruments User Guide" }, { "answer_id": 144494, "author": "titaniumdecoy", "author_id": 18091, "autho...
2008/09/27
[ "https://Stackoverflow.com/questions/144261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22502/" ]
144,283
<p>Is it just that <code>nvarchar</code> supports multibyte characters? If that is the case, is there really any point, other than storage concerns, to using <code>varchars</code>?</p>
[ { "answer_id": 144311, "author": "Mike Spross", "author_id": 17862, "author_profile": "https://Stackoverflow.com/users/17862", "pm_score": 4, "selected": false, "text": "nvarchar varchar nvarchar varchar nvarchar varchar" }, { "answer_id": 147302, "author": "Jeffrey L Whitled...
2008/09/27
[ "https://Stackoverflow.com/questions/144283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/361/" ]
144,321
<p>I'm processing a huge file with (GNU) <code>awk</code>, (other available tools are: Linux shell tools, some old (>5.0) version of Perl, but can't install modules).</p> <p>My problem: if some field1, field2, field3 contain X, Y, Z I must search for a file in another directory which contains field4, and field5 on one...
[ { "answer_id": 144406, "author": "Adam Bellaire", "author_id": 21632, "author_profile": "https://Stackoverflow.com/users/21632", "pm_score": 0, "selected": false, "text": "## perl code to do some dirty work\n\nfor my $line (`grep 'X Y Z' myhugefile`) {\n chomp $line;\n my ($a, $b, ...
2008/09/27
[ "https://Stackoverflow.com/questions/144321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11621/" ]
144,375
<p>I want a nice 2 column layout using CSS float's.</p> <p>Column#1 160 px Column#2 100% (i.e. the rest of the space).</p> <p>I want to place the Col#2's div first, so my layout looks like:</p> <pre><code>&lt;div id="header"&gt;&lt;/div&gt; &lt;div id="content"&gt; &lt;div id="col2"&gt;&lt;/div&gt; &lt;div...
[ { "answer_id": 144384, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 0, "selected": false, "text": "div#col2 {\n padding-left: 160px;\n width: 100%;\n}\n\ndiv#col1 {\n float: left;\n width: 160px;\n}\n #col1 #col2 #col1 ...
2008/09/27
[ "https://Stackoverflow.com/questions/144375", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1368/" ]
144,380
<p>I'm writing a game which is taking user input and rendering it on-screen. The engine I'm using for this is entirely unicode-friendly, so I'd like to keep that if at all possible. The problem is that the rendering loop looks like this:</p> <pre><code>"string".each_byte do |c| render_this_letter(c) end </code><...
[ { "answer_id": 144384, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 0, "selected": false, "text": "div#col2 {\n padding-left: 160px;\n width: 100%;\n}\n\ndiv#col1 {\n float: left;\n width: 160px;\n}\n #col1 #col2 #col1 ...
2008/09/27
[ "https://Stackoverflow.com/questions/144380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2555346/" ]
144,435
<p>I'm looking into a mechanism for serialize data to be passed over a socket or shared-memory in a language-independent mechanism. I'm reluctant to use XML since this data is going to be very structured, and encoding/decoding speed is vital. Having a good C API that's liberally licensed is important, but ideally the...
[ { "answer_id": 18711717, "author": "anish", "author_id": 911576, "author_profile": "https://Stackoverflow.com/users/911576", "pm_score": 0, "selected": false, "text": "1. Storage\n2. Encoding Style (1 byte 2 byte)\n3. TLV standards\n" } ]
2008/09/27
[ "https://Stackoverflow.com/questions/144435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14032/" ]
144,439
<p>If i have lots of directory names either as literal strings or contained in variables, what is the easiest way of combining these to make a complete path?</p> <p>I know of <pre>Path.Combine</pre> but this only takes 2 string parameters, i need a solution that can take any number number of directory parameters.</p> ...
[ { "answer_id": 144441, "author": "OregonGhost", "author_id": 20363, "author_profile": "https://Stackoverflow.com/users/20363", "pm_score": 5, "selected": true, "text": "string CombinePaths(params string[] parts) {\n string result = String.Empty;\n foreach (string s in parts) {\n ...
2008/09/27
[ "https://Stackoverflow.com/questions/144439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13227/" ]
144,453
<p>I want to get a files these attributes as integer values. </p>
[ { "answer_id": 144461, "author": "OregonGhost", "author_id": 20363, "author_profile": "https://Stackoverflow.com/users/20363", "pm_score": 5, "selected": true, "text": "FindFirst SearchRec GetFileAttributesEx" }, { "answer_id": 144475, "author": "Toon Krijthe", "author_id...
2008/09/27
[ "https://Stackoverflow.com/questions/144453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
144,466
<p>Greetings,</p> <p>I'm trying to find either a free .NET library or a command-line executable that lets me convert M4A files to either MP3s or WMA files. Please help :).</p>
[ { "answer_id": 6774014, "author": "cat", "author_id": 712124, "author_profile": "https://Stackoverflow.com/users/712124", "pm_score": 2, "selected": false, "text": "ffmpeg -i infile.m4a tmp.wav\nlame tmp.wav outfile.mp3\n #!/bin/bash\n\nn=0\nmaxjobs=3\n\nfor i in *.m4a ; do\n ffmpeg -...
2008/09/27
[ "https://Stackoverflow.com/questions/144466", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5021/" ]
144,468
<p>Is there a way to track changes in Windows registry? I'd like to see what changes in the registry are made during installation of various programs. </p>
[ { "answer_id": 144629, "author": "olle", "author_id": 22422, "author_profile": "https://Stackoverflow.com/users/22422", "pm_score": 1, "selected": false, "text": "RegistryKeyChangeEvent __InstanceCreationEvent __InstanceDeletionEvent __InstanceModificationEvent" }, { "answer_id":...
2008/09/27
[ "https://Stackoverflow.com/questions/144468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11439/" ]
144,474
<p>I'm used to working with PHP but lately I've been working with Java and I'm having a headache trying to figure this out. I want to save this representation in Java:</p> <pre> Array ( ["col_name_1"] => Array ( 1 => ["col_value_1"], 2 => ["col_v...
[ { "answer_id": 144485, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 3, "selected": false, "text": "List<String> col1Vals = new java.util.ArrayList<String>();\ncol1Vals.add(\"col_value_1\");\ncol1Vals.add(\"col_value_2\");\n...
2008/09/27
[ "https://Stackoverflow.com/questions/144474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6618/" ]
144,503
<p>I initially designed my system following the s# architecture example <a href="http://wwww.codeproject.com/KB/architecture/NHibernateBestPractices.aspx" rel="nofollow noreferrer">outlined in this codeproject article</a> (Unfortunately, I am not using NHibernate). The basic idea is that for each domain object that wo...
[ { "answer_id": 144538, "author": "Mladen Mihajlovic", "author_id": 11421, "author_profile": "https://Stackoverflow.com/users/11421", "pm_score": 1, "selected": false, "text": "IQueriable T GetById<T>(int id)" }, { "answer_id": 144541, "author": "Noah Goodrich", "author_id...
2008/09/27
[ "https://Stackoverflow.com/questions/144503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5056/" ]
144,530
<p>Why use one over the other?</p>
[ { "answer_id": 144535, "author": "John Millikin", "author_id": 3560, "author_profile": "https://Stackoverflow.com/users/3560", "pm_score": 7, "selected": true, "text": "Equals() null Equals() String DateTime ==" }, { "answer_id": 144562, "author": "John Rudy", "author_id"...
2008/09/27
[ "https://Stackoverflow.com/questions/144530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/230/" ]
144,542
<p><a href="http://www.ruby-lang.org" rel="noreferrer">Ruby</a> is truly memory-hungry - but also worth every single bit. </p> <p>What do you do to keep the memory usage low? Do you avoid big strings and use smaller arrays/hashes instead or is it no problem to concern about for you and let the garbage collector do the...
[ { "answer_id": 147262, "author": "Orion Edwards", "author_id": 234, "author_profile": "https://Stackoverflow.com/users/234", "pm_score": 2, "selected": false, "text": "Image#destroy!" }, { "answer_id": 161164, "author": "Grant Hutchins", "author_id": 6304, "author_pro...
2008/09/27
[ "https://Stackoverflow.com/questions/144542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18179/" ]
144,550
<p><strong>Problem:</strong></p> <p>Ajax suggest-search on [<em>n</em>] ingredients in recipes. That is: match recipes against multiple ingredients.</p> <p>For instance: <code>SELECT Recipes using "flower", "salt"</code> would produce: <code>"Pizza", "Bread", "Saltwater"</code> and so forth.</p> <p><strong>Tables:</...
[ { "answer_id": 144626, "author": "albertein", "author_id": 23020, "author_profile": "https://Stackoverflow.com/users/23020", "pm_score": 2, "selected": false, "text": "using System.Data;\nusing System.Data.SqlClient;\nusing System.Text;\n\nclass Foo\n{\n public static void Main ()\n ...
2008/09/27
[ "https://Stackoverflow.com/questions/144550", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20946/" ]
144,570
<p>I thought that there was some way in .net 3.0 to give an array list a type so that it didnt just return Object's but I'm having trouble doing so. Is it possible? If so, how?</p>
[ { "answer_id": 144574, "author": "OregonGhost", "author_id": 20363, "author_profile": "https://Stackoverflow.com/users/20363", "pm_score": 2, "selected": false, "text": "<T>" }, { "answer_id": 144575, "author": "Mark Cidade", "author_id": 1659, "author_profile": "http...
2008/09/27
[ "https://Stackoverflow.com/questions/144570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2128/" ]
144,583
<p>I'm looking for a really good dialog resizer class that will stretch and shrink individual items as needed as the screen is resized. Stephan Keil has a good one (DlgResizeHelper) which basically resizes everything by a set ratio, but I'm looking for something smarter.</p> <p>For example:</p> <ul> <li><p>Icons sho...
[ { "answer_id": 144945, "author": "Sergey Kornilov", "author_id": 10969, "author_profile": "https://Stackoverflow.com/users/10969", "pm_score": 0, "selected": false, "text": "SetResize(IDC_EDIT1, 0, 0, 0.5, 1);\nSetResize(IDC_EDIT2, 0.5, 0, 1, 1);\n" } ]
2008/09/27
[ "https://Stackoverflow.com/questions/144583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7442/" ]
144,630
<p>I am working on an ASP.NET MVC web app that allows people to publish content, but other than publish the content to a remote server, I want to allow people to use their domain name directly. For example, the user "Tom" can have his domain name TomSite.com point to <a href="http://www.mywebapp.com/user/tom" rel="nof...
[ { "answer_id": 145544, "author": "Troels Thomsen", "author_id": 20138, "author_profile": "https://Stackoverflow.com/users/20138", "pm_score": 3, "selected": true, "text": "if (Dns.GetHostEntry(\"www.user.example.com\").HostName == \"www.example.com\")\n{\n // www.user.example.com is a...
2008/09/27
[ "https://Stackoverflow.com/questions/144630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20067/" ]
144,639
<p>By default (using the <code>plain</code> style) BibTeX orders citations alphabetically. </p> <p>How to order the citations by order of appearance in the document?</p>
[ { "answer_id": 144640, "author": "Brendan", "author_id": 199, "author_profile": "https://Stackoverflow.com/users/199", "pm_score": 5, "selected": false, "text": "unsrt plain \\bibliographystyle{unsrt}\n\\bibliography{bibliography}\n" }, { "answer_id": 144665, "author": "linde...
2008/09/27
[ "https://Stackoverflow.com/questions/144639", "https://Stackoverflow.com", "https://Stackoverflow.com/users/199/" ]
144,642
<p>I require a tree / directed acyclic graph implementation something like this:</p> <pre><code>public class TreeNode&lt;K, V&gt; { private K key; // 'key' for this node, always present private V value; // 'value' for this node, doesn't have to be set private TreeNode&lt;K, V&gt; parent; private Set&l...
[ { "answer_id": 144652, "author": "stimms", "author_id": 361, "author_profile": "https://Stackoverflow.com/users/361", "pm_score": 5, "selected": true, "text": "public class TreeNode<T>\n{\n private LinkedList<TreeNode<T>> children = new LinkedList<TreeNode<T>>();\n public T value {...
2008/09/27
[ "https://Stackoverflow.com/questions/144642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1666/" ]
144,651
<p>I've the following rewrite rule in .htaccess:</p> <pre><code>RewriteRule ^groups/([^/\.]+)/?$ groupdetail.php?gname=$1 [L,NC] </code></pre> <p>This takes something like www.example.com/groups/groupname and calls www.example/groupdetail.php?gname=groupname. And it works just fine.</p> <p>But all the relative lin...
[ { "answer_id": 144676, "author": "Kevin Hakanson", "author_id": 22514, "author_profile": "https://Stackoverflow.com/users/22514", "pm_score": 1, "selected": false, "text": "RewriteRule ^groups/([^/.]+)/?$ groupdetail.php?gname=$1 [L,NC,R]\n" }, { "answer_id": 155824, "author"...
2008/09/27
[ "https://Stackoverflow.com/questions/144651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
144,657
<p>I have a Java program that uses Hibernate and MySQL to store a lot of tracing data about the use of the Eclipse IDE. This data contains a lot of strings such as method names, directories, perspective name, etc. </p> <p>For example, an event object (which is then reflected in a record) can specify the source file an...
[ { "answer_id": 144674, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 0, "selected": false, "text": "class StringHolder {\n private Long id;\n private String string;\n\n public StringHolder() {/* Not sure if this is necess...
2008/09/27
[ "https://Stackoverflow.com/questions/144657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23072/" ]
144,659
<p>So I managed to get a page with Ajax <a href="http://docs.jquery.com/UI/Tabs" rel="nofollow noreferrer">ui.tab</a> and in one of the tab I put <a href="http://projects.bundleweb.com.ar/jWYSIWYG/" rel="nofollow noreferrer">jWYSIWYG</a> textarea plugin. Unfortunately, I can only see normal textarea.</p> <p>However, a...
[ { "answer_id": 1541706, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "$('#dialogContent').bind('dialogopen', function(event, ui) {\n $('textarea').wysiwyg( {\n css :burl + 'public/css/t...
2008/09/27
[ "https://Stackoverflow.com/questions/144659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15345/" ]
144,661
<p>I'm currently primarily a <a href="https://en.wikipedia.org/wiki/D_(programming_language)" rel="nofollow noreferrer">D</a> programmer and am looking to add another language to my toolbox, preferably one that supports the metaprogramming hacks that just can't be done in a statically compiled language like D.</p> <p>...
[ { "answer_id": 395999, "author": "jfs", "author_id": 4279, "author_profile": "https://Stackoverflow.com/users/4279", "pm_score": 3, "selected": false, "text": "myList myList.collect { |f| f.description }.select { |d| d != \"\" }.join(\"\\n\")\n myList.map(&:description).reject(&:empty?)....
2008/09/27
[ "https://Stackoverflow.com/questions/144661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23903/" ]
144,669
<p>I've removed a checked in file from the CVS branch, i.e.:</p> <pre><code>cvs remove -f file.txt cvs commit </code></pre> <p>How do I restore the file?</p>
[ { "answer_id": 144672, "author": "Jason Etheridge", "author_id": 2193, "author_profile": "https://Stackoverflow.com/users/2193", "pm_score": 6, "selected": true, "text": "cvs add file.txt\ncvs commit file.txt\n" }, { "answer_id": 145377, "author": "Harry", "author_id": 47...
2008/09/27
[ "https://Stackoverflow.com/questions/144669", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4704/" ]
144,701
<p>I frequently start with a simple console application to try out an idea, then create a new GUI based project and copy the code in. Is there a better way? Can I convert my existing console application easily?</p>
[ { "answer_id": 144720, "author": "albertein", "author_id": 23020, "author_profile": "https://Stackoverflow.com/users/23020", "pm_score": 7, "selected": true, "text": "Main Application.EnableVisualStyles();\n Application.SetCompatibleTextRenderingDefault(false);\n Application.Ru...
2008/09/27
[ "https://Stackoverflow.com/questions/144701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5/" ]
144,713
<p>I have an XML document with un-namespaced elements, and I want to use XSLT to add namespaces to them. Most elements will be in namespace A; a few will be in namespace B. How do I do this?</p>
[ { "answer_id": 144724, "author": "Craig Walker", "author_id": 3488, "author_profile": "https://Stackoverflow.com/users/3488", "pm_score": 1, "selected": false, "text": "<xsl:template match=\"*\">\n <xsl:element name=\"{local-name()}\" namespace=\"A\" >\n <xsl:apply-templates />...
2008/09/27
[ "https://Stackoverflow.com/questions/144713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3488/" ]
144,731
<p>Are there any commonly used patterns in Javascript for storing the URL's of endpoints that will be requested in an AJAX application?</p> <p>For example would you create a "Service" class to abstract the URL's away?</p>
[ { "answer_id": 146844, "author": "David Robbins", "author_id": 19799, "author_profile": "https://Stackoverflow.com/users/19799", "pm_score": 1, "selected": false, "text": "function ControlValuePair(Id, Value)\n{ \n this.Id = Id;\n this.Value = Value;\n}\n\nfunction CreateCollecti...
2008/09/27
[ "https://Stackoverflow.com/questions/144731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21875/" ]
144,745
<p>The prompt says that if I install the software into a directory with spaces:</p> <blockquote> <p>the rebuild build tool used by the D Shared Source System will fail to build</p> </blockquote> <p>and that I will be</p> <blockquote> <p>forced to reinstall in a different location</p> </blockquote> <p>However, I...
[ { "answer_id": 144763, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 0, "selected": false, "text": "subst subst x: \"c:\\program files\\d\"\n" }, { "answer_id": 144867, "author": "Matthew Scharley", "autho...
2008/09/27
[ "https://Stackoverflow.com/questions/144745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/572/" ]
144,761
<p>I have a problem with a string in C++ which has several words in Spanish. This means that I have a lot of words with accents and tildes. I want to replace them for their not accented counterparts. Example: I want to replace this word: "había" for habia. I tried replace it directly but with replace method of string c...
[ { "answer_id": 144769, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": -1, "selected": false, "text": "tr tr sed #!/bin/sed -f\ns/á/a/g;\ns/é/e/g;\ns/í/i/g;\ns/ó/o/g;\ns/ú/u/g;\ns/ñ/n/g;\n" }, { "answer_id": 144804, ...
2008/09/27
[ "https://Stackoverflow.com/questions/144761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23084/" ]
144,774
<p>I'm writing a program that uses <a href="http://msdn.microsoft.com/en-us/library/dd145102(VS.85).aspx" rel="nofollow noreferrer"><code>SetWindowRgn</code></a> to make transparent holes in a window that belongs to another process. (This is done only when the user explicitly requests it.)</p> <p>The program has to as...
[ { "answer_id": 144856, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 5, "selected": true, "text": "SetWindowRgn()" }, { "answer_id": 144896, "author": "HitScan", "author_id": 9490, "author_profile": "https://...
2008/09/27
[ "https://Stackoverflow.com/questions/144774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23091/" ]
144,783
<p>Should each class in my C# project get its own file (in your opinion)?</p>
[ { "answer_id": 144791, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 8, "selected": true, "text": "partial" }, { "answer_id": 145356, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://...
2008/09/27
[ "https://Stackoverflow.com/questions/144783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7529/" ]
144,807
<p>Unfortunately, sometimes the only way to debug a program is by going through its long log files. </p> <p>I searched for a decent log viewer for a while now, and haven't found a real solution. The only program that seemed to be most appropriate was <a href="http://logging.apache.org/chainsaw/2.x/download.html" rel="...
[ { "answer_id": 7943087, "author": "Kumba", "author_id": 482691, "author_profile": "https://Stackoverflow.com/users/482691", "pm_score": 2, "selected": false, "text": "# Display level 6 alerts from 192.168.5.90 in WireShark\nsyslog.level == 6 && ip.addr == 192.168.5.90\n" }, { "an...
2008/09/28
[ "https://Stackoverflow.com/questions/144807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23094/" ]
144,810
<p>Recently I have started playing with jQuery, and have been following a couple of tutorials. Now I feel slightly competent with using it (it's pretty easy), and I thought it would be cool if I were able to make a 'console' on my webpage (as in, you press the ` key like you do in <a href="http://en.wiktionary.org/wiki...
[ { "answer_id": 144818, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 4, "selected": false, "text": "testArea.value\n" }, { "answer_id": 144836, "author": "Eran Galperin", "author_id": 10585, "author_profi...
2008/09/28
[ "https://Stackoverflow.com/questions/144810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20900/" ]
144,824
<p>Can you use the bash "getopts" function twice in the same script?</p> <p>I have a set of options that would mean different things depending on the value of a specific option. Since I can't guarantee that getopts will evaluate that specific option first, I would like to run getopts one time, using only that specifi...
[ { "answer_id": 144838, "author": "andrewdotn", "author_id": 14558, "author_profile": "https://Stackoverflow.com/users/14558", "pm_score": 4, "selected": true, "text": "#!/bin/bash\n\nset -- -1\nwhile getopts 1 opt; do\n case \"${opt}\" in\n 1) echo \"Worked!\";;\n *) exi...
2008/09/28
[ "https://Stackoverflow.com/questions/144824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17925/" ]
144,833
<p>I know that attributes are extremely useful. There are some predefined ones such as <code>[Browsable(false)]</code> which allows you to hide properties in the properties tab. Here is a good question explaining attributes: <a href="https://stackoverflow.com/questions/20346/c-what-are-attributes">What are attributes i...
[ { "answer_id": 144841, "author": "Gilligan", "author_id": 12356, "author_profile": "https://Stackoverflow.com/users/12356", "pm_score": 6, "selected": false, "text": "[Serializable]" }, { "answer_id": 144847, "author": "Shog9", "author_id": 811, "author_profile": "htt...
2008/09/28
[ "https://Stackoverflow.com/questions/144833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1632/" ]
144,872
<p>I'm using an XYPlot in JFreeChart. All the lines on it are XYSeries objects. Both axes are NumberAxis objects. The Y-Axis range is from 0-1, with ticks every .1. Along with displaying the numbers though, I'd like to display text on the Y-Axis, like High/Medium/Low. High would cover .7-1, etc. What is the best way to...
[ { "answer_id": 21879964, "author": "Salem Gharbi", "author_id": 2711813, "author_profile": "https://Stackoverflow.com/users/2711813", "pm_score": 0, "selected": false, "text": "XYTextAnnotation textAnnotaion = new XYTextAnnotation(description, xMid, yMid);\nplot.addAnnotation(textAnnotai...
2008/09/28
[ "https://Stackoverflow.com/questions/144872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/723/" ]
144,892
<p>What's the easiest way to centre a <code>java.awt.Window</code>, such as a <code>JFrame</code> or a <code>JDialog</code>?</p>
[ { "answer_id": 144950, "author": "Dónal", "author_id": 2648, "author_profile": "https://Stackoverflow.com/users/2648", "pm_score": 6, "selected": false, "text": "public static void centreWindow(Window frame) {\n Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();\n i...
2008/09/28
[ "https://Stackoverflow.com/questions/144892", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10433/" ]
144,898
<p>Code below is not working as expected to detect if it is in design mode (VS.Net 2003 - Control Library):</p> <p>if (this.Site != null &amp;&amp; this.Site.DesignMode == true) <br> {<br> // Design Mode<br> }<br> else<br> {<br> // Run-time<br> }<br></p> <p>It is used in a complex user control, deriving from anot...
[ { "answer_id": 297987, "author": "Nicholas Piasecki", "author_id": 32187, "author_profile": "https://Stackoverflow.com/users/32187", "pm_score": 4, "selected": true, "text": "DesignMode if (System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Designtim...
2008/09/28
[ "https://Stackoverflow.com/questions/144898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23087/" ]
144,902
<p>Recently I had to do some very processing heavy stuff with data stored in a DataSet. It was heavy enough that I ended up using a tool to help identify some bottlenecks in my code. When I was analyzing the bottlenecks, I noticed that although DataSet lookups were not terribly slow (they weren't the bottleneck), it wa...
[ { "answer_id": 145299, "author": "faulty", "author_id": 20007, "author_profile": "https://Stackoverflow.com/users/20007", "pm_score": 2, "selected": false, "text": "const int SomeTable_SomeColumn = 0;\n\nDataTable dt = new DataTable();\nif(dt.Columns.Contains(SomeTable_SomeColumn))\n{\n ...
2008/09/28
[ "https://Stackoverflow.com/questions/144902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/392/" ]
144,957
<p>How have you used the Exception.Data property in C# projects that you've worked on? </p> <p>I'd like answers that suggest a pattern, rather than those that are very specific to your app.</p>
[ { "answer_id": 30399137, "author": "Chris Marisic", "author_id": 37055, "author_profile": "https://Stackoverflow.com/users/37055", "pm_score": 5, "selected": false, "text": ".Data IDictionary foreach(var kvp in exception.Data) object foreach (DictionaryEntry de in e.Data)\n Console.Wr...
2008/09/28
[ "https://Stackoverflow.com/questions/144957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7529/" ]
144,960
<p>Can this be done? How?</p> <hr> <p>I want to write my own extension. Can Get the current page sorcecode in my own extension?</p>
[ { "answer_id": 145419, "author": "Rich Bradshaw", "author_id": 16511, "author_profile": "https://Stackoverflow.com/users/16511", "pm_score": 2, "selected": false, "text": "view-source:http://stackoverflow.com/posts/edit/145419\n" }, { "answer_id": 145768, "author": "ConroyP",...
2008/09/28
[ "https://Stackoverflow.com/questions/144960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7883/" ]
144,965
<p>I have Visual Studio 2005 Professional ENU installed and want to create GUIDs using its Create GUIDs utility. However, I cannot find it under the Tools menu. What should I do to get this utility? Thanks</p>
[ { "answer_id": 144970, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": -1, "selected": false, "text": "9a005ff3-5dee-4667-b5b9-7663fee2b0f9\ndb031ebf-7ffa-4604-a6b6-7d60a38c60ca\n96f1854c-3654-46a7-8f57-20eb23f62375\nf43a4642-...
2008/09/28
[ "https://Stackoverflow.com/questions/144965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8203/" ]
144,980
<p>Greetings.</p> <p>I'm trying to implement some multithreaded code in an application. The purpose of this code is to validate items that the database gives it. Validation can take quite a while (a few hundred ms to a few seconds), so this process needs to be forked off into its own thread for each item.</p> <p>The ...
[ { "answer_id": 145087, "author": "Ted Elliott", "author_id": 16501, "author_profile": "https://Stackoverflow.com/users/16501", "pm_score": 2, "selected": false, "text": "Environment.ProcessorCount" }, { "answer_id": 145089, "author": "Mitch Wheat", "author_id": 16076, ...
2008/09/28
[ "https://Stackoverflow.com/questions/144980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11574/" ]
144,983
<p>Every time I start Emacs I see a page of help text and a bunch of messages suggesting that I try the tutorial. How do I stop this from happening?</p>
[ { "answer_id": 144984, "author": "jfm3", "author_id": 11138, "author_profile": "https://Stackoverflow.com/users/11138", "pm_score": 4, "selected": true, "text": ".emacs" }, { "answer_id": 144986, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://St...
2008/09/28
[ "https://Stackoverflow.com/questions/144983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11138/" ]
144,985
<p>I was reading <a href="https://stackoverflow.com/questions/144735/best-way-to-get-started-with-programming-other-things-than-your-computer#144843">this</a> answer previously and it got me interested in purchasing a Nintendo DS Lite for learning to program embedded devices. Before I go out and splurge on a DS I had ...
[ { "answer_id": 158909, "author": "Cristián Romo", "author_id": 1256, "author_profile": "https://Stackoverflow.com/users/1256", "pm_score": 5, "selected": true, "text": "examples" } ]
2008/09/28
[ "https://Stackoverflow.com/questions/144985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15534/" ]
144,993
<p>A lot of literature talks about using inline functions to "avoid the overhead of a function call". However I haven't seen quantifiable data. What is the actual overhead of a function call i.e. what sort of performance increase do we achieve by inlining functions?</p>
[ { "answer_id": 14329151, "author": "doug65536", "author_id": 1127972, "author_profile": "https://Stackoverflow.com/users/1127972", "pm_score": 2, "selected": false, "text": "Foo::result_type MakeMeFaster()\n{\n Foo t = 0;\n for (auto i = 0; i < 1000; ++i)\n t += CheckOverhead(Someth...
2008/09/28
[ "https://Stackoverflow.com/questions/144993", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23120/" ]
145,006
<p>Very simply put, I have the following code snippet:</p> <pre><code>FILE* test = fopen("C:\\core.u", "w"); printf("Filepointer at: %d\n", ftell(test)); fwrite(data, size, 1, test); printf("Written: %d bytes.\n", size); fseek(test, 0, SEEK_END); printf("Filepointer is now at %d.\n", ftell(test)); fclose(test); </code...
[ { "answer_id": 145013, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 5, "selected": true, "text": "\"c:\\\" \"wb\" FILE* test = fopen(\"C:\\\\core.u\", \"wb\");\n 7.19.5.3 The fopen function r w a rb wb ab r+ w+ a+ r+b r...
2008/09/28
[ "https://Stackoverflow.com/questions/145006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
145,017
<p>I haven't been around Java development for 8 years, but am starting to build a NetBeans Web Application. When I walk through the Web Application wizard, it asks for the server I'm going to be using. </p> <p>What would be the best and simplest server for me to start using with NetBeans?</p>
[ { "answer_id": 228524, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "http://localhost:4848 \n http://glassfish.dev.java.net/downloads/quickstart/index.html\n http://download.java.net/javaee5/sc...
2008/09/28
[ "https://Stackoverflow.com/questions/145017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3289/" ]
145,025
<p>I'm implementing a secure WCF service. Authentication is done using username / password or Windows credentials. The service is hosted in a Windows Service process. Now, I'm trying to find out the best way to implement <em>authorization</em> for each service operation.</p> <p>For example, consider the following meth...
[ { "answer_id": 146615, "author": "TheSoftwareJedi", "author_id": 18941, "author_profile": "https://Stackoverflow.com/users/18941", "pm_score": 3, "selected": true, "text": "public abstract class MyServiceImpl\n{\n public void MyMethod(string entityId)\n {\n CheckPermissions(...
2008/09/28
[ "https://Stackoverflow.com/questions/145025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6995/" ]
145,052
<p>Is there any libraries that would allow me to use the same known notation as we use in BeanUtils for extracting POJO parameters, but for easily replacing placeholders in a string?</p> <p>I know it would be possible to roll my own, using BeanUtils itself or other libraries with similar features, but I didn't want to...
[ { "answer_id": 145156, "author": "Brian", "author_id": 700, "author_profile": "https://Stackoverflow.com/users/700", "pm_score": 1, "selected": false, "text": "foxtype = 'quick'\nfoxcolor = ['b', 'r', 'o', 'w', 'n']\nprintln \"The $foxtype ${foxcolor.join()} fox\"\n public int countOfAct...
2008/09/28
[ "https://Stackoverflow.com/questions/145052", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14540/" ]
145,056
<p>A friend came across a quadratic Bézier curve function in his codebase that used a gigantic rats nest of a switch table to perform the computation. He challenged me to find a single, short expression that would allow him to replace the gigantic block of code.</p> <p>In attempting to satisfy two different curiositie...
[ { "answer_id": 145142, "author": "nlucaroni", "author_id": 157, "author_profile": "https://Stackoverflow.com/users/157", "pm_score": 2, "selected": false, "text": "List.rev b2i List.rev ?(epsilon=0.1)" }, { "answer_id": 146000, "author": "Thelema", "author_id": 12874, ...
2008/09/28
[ "https://Stackoverflow.com/questions/145056", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18446/" ]
145,096
<p>I am taking a class in C++ programming and the professor told us that there is no need to learn C because C++ contains everything in C plus object-oriented features. However, some others have told me that this is not necessarily true. Can anyone shed some light on this?</p>
[ { "answer_id": 145098, "author": "Brian R. Bondy", "author_id": 3153, "author_profile": "https://Stackoverflow.com/users/3153", "pm_score": 7, "selected": true, "text": "int *i = malloc(sizeof(int) * 5); \n int *i = (int *) malloc(sizeof(int) * 5)\n void fn(void)\n {\n goto flack;\n ...
2008/09/28
[ "https://Stackoverflow.com/questions/145096", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23126/" ]
145,103
<p>I need to do some performance benchmarks on .NET programs (C#) in Windows, but I haven't done benchmarking much in the Windows world. I've looked into using the Windows 2000/XP Performance monitor with custom counters for this, but I don't think this is quite what I want.</p> <p>Are there any good system facilitie...
[ { "answer_id": 145113, "author": "Mitch Wheat", "author_id": 16076, "author_profile": "https://Stackoverflow.com/users/16076", "pm_score": 3, "selected": false, "text": "using System.Diagnostics;\n....\n\nStopwatch sw = new Stopwatch();\n\nsw.Start();\n\n// Code you want to time...\n\n//...
2008/09/28
[ "https://Stackoverflow.com/questions/145103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3279/" ]
145,110
<p>My understanding is that C/C++ produces native code to run on a particular machine architecture. Conversely, languages like Java and C# run on top of a virtual machine which abstracts away the native architecture. Logically it would seem impossible for Java or C# to match the speed of C++ because of this intermedi...
[ { "answer_id": 145559, "author": "paercebal", "author_id": 14089, "author_profile": "https://Stackoverflow.com/users/14089", "pm_score": 8, "selected": false, "text": "using finally using readonly final const using" }, { "answer_id": 7318496, "author": "J D", "author_id":...
2008/09/28
[ "https://Stackoverflow.com/questions/145110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23126/" ]
145,131
<p>I work with a lot of web applications that are driven by databases of varying complexity on the backend. Typically, there's an <a href="http://en.wikipedia.org/wiki/Object-relational_mapping" rel="noreferrer">ORM</a> layer separate from the business and presentation logic. This makes unit-testing the business logic ...
[ { "answer_id": 18004673, "author": "Lukas Eder", "author_id": 521799, "author_profile": "https://Stackoverflow.com/users/521799", "pm_score": 4, "selected": false, "text": "MockConnection" }, { "answer_id": 52240164, "author": "Roman-Stop RU aggression in UA", "author_id"...
2008/09/28
[ "https://Stackoverflow.com/questions/145131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20745/" ]
145,154
<p>My singleton accessor method is usually some variant of:</p> <pre><code>static MyClass *gInstance = NULL; + (MyClass *)instance { @synchronized(self) { if (gInstance == NULL) gInstance = [[self alloc] init]; } return(gInstance); } </code></pre> <p>What could I be doing to impr...
[ { "answer_id": 145164, "author": "Ben Hoffstein", "author_id": 4482, "author_profile": "https://Stackoverflow.com/users/4482", "pm_score": 7, "selected": false, "text": "@interface MySingleton : NSObject\n{\n}\n\n+ (MySingleton *)sharedSingleton;\n@end\n\n@implementation MySingleton\n\n+...
2008/09/28
[ "https://Stackoverflow.com/questions/145154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23113/" ]
145,155
<p>I am making a Python gui project that needs to duplicate the look of a Windows gui environment (ie Explorer). I have my own custom icons to draw but they should be selectable by the same methods as usual; click, ctrl-click, drag box etc. Are any of the gui toolkits going to help with this or will I have to impleme...
[ { "answer_id": 145162, "author": "John Millikin", "author_id": 3560, "author_profile": "https://Stackoverflow.com/users/3560", "pm_score": 3, "selected": true, "text": "gtk.IconView" } ]
2008/09/28
[ "https://Stackoverflow.com/questions/145155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3176/" ]
145,169
<p>I'm using the current version of restful_authentication that is found on github and I'm having a bunch of strange session issues. The server seems to be somehow assigning sessions to users it shouldn't be. This only happens when crossing the logged out/logged in barrier.</p> <p>Here's an example. With no sessions a...
[ { "answer_id": 147032, "author": "Nathan de Vries", "author_id": 11109, "author_profile": "https://Stackoverflow.com/users/11109", "pm_score": 2, "selected": false, "text": "User.current_user" } ]
2008/09/28
[ "https://Stackoverflow.com/questions/145169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23128/" ]
145,175
<p>Right now I write expressions in the <code>*scratch*</code> buffer and test them by evaluating with <kbd>C-x</kbd> <kbd>C-e</kbd>. I would really appreciate having an interactive interpreter like SLIME or irb, in which I could test Emacs Lisp expressions.</p>
[ { "answer_id": 145205, "author": "cjm", "author_id": 8355, "author_profile": "https://Stackoverflow.com/users/8355", "pm_score": 1, "selected": false, "text": "*scratch*" }, { "answer_id": 145212, "author": "Kyle Burton", "author_id": 19784, "author_profile": "https:/...
2008/09/28
[ "https://Stackoverflow.com/questions/145175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21998/" ]
145,190
<p>I'm trying to come up with a way to estimate the number of English words a translation from Japanese will turn into. Japanese has three main scripts -- <a href="http://en.wikipedia.org/wiki/Kanji" rel="nofollow noreferrer">Kanji</a>, <a href="http://en.wikipedia.org/wiki/Hiragana" rel="nofollow noreferrer">Hiragana<...
[ { "answer_id": 145235, "author": "Eugene Yokota", "author_id": 3827, "author_profile": "https://Stackoverflow.com/users/3827", "pm_score": 2, "selected": false, "text": "Expected increase\n1-5 100%\n6-12 80%\n13-20 60%\n21-30 40%\n31-50 20%\nover 50 10%\n" }, ...
2008/09/28
[ "https://Stackoverflow.com/questions/145190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10658/" ]
145,209
<p>I want to mount some internal and external NTFS drives in CentOS 5.2, preferably automatically upon boot-up. Doesn't matter if it's read/write or read-only, but read/write would be preferred, if it's safe.</p> <p>Edit: Thanks for all answers, I summarized them below =)</p>
[ { "answer_id": 145219, "author": "PostMan", "author_id": 18405, "author_profile": "https://Stackoverflow.com/users/18405", "pm_score": 3, "selected": false, "text": "fdisk -l\n mount /dev/sda2 /mnt/windows\n yum install ntfs-3g\n /dev/sda2 /mnt/temp ntfs defaults 0 0\n" }, ...
2008/09/28
[ "https://Stackoverflow.com/questions/145209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18406/" ]
145,241
<h2><strong>Edit: I have solved this by myself. See <a href="https://stackoverflow.com/questions/145241/change-the-value-of-a-text-box-to-its-current-order-in-a-sortable-tab/145388#145388">my answer below</a></strong></h2> <p>I have set up a nice sortable table with jQuery and it is quite nice. But now i want to extend...
[ { "answer_id": 145284, "author": "Sugendran", "author_id": 22466, "author_profile": "https://Stackoverflow.com/users/22466", "pm_score": 0, "selected": false, "text": "$(\"input:text\", \"#table-2\").each( function(i){ this.value=i+1; });\n" }, { "answer_id": 145388, "author"...
2008/09/28
[ "https://Stackoverflow.com/questions/145241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2592/" ]
145,262
<p>I have a home-spun 2000 lines VBScript script, that has become progressively slow with each additional code I add. It was created as a private debugging aid and now that it has become really useful. I want to polish it and ship it along with our product.</p> <p>I thought I could speed it up by compiling it and maki...
[ { "answer_id": 641813, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "wscript.echo \"Begin: \" & Time\ntStartTime = Timer\n'... do stuff ...\ntStopTime = Timer\nwscript.echo \"Elapsed time: \" & t...
2008/09/28
[ "https://Stackoverflow.com/questions/145262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17224/" ]
145,263
<p><a href="http://en.wikipedia.org/wiki/Total_functional_programming" rel="noreferrer">Wikipedia</a> has this to say:</p> <blockquote> <p>Total functional programming (also known as strong functional programming, to be contrasted with ordinary, or weak functional programming) is a programming paradigm whi...
[ { "answer_id": 145318, "author": "Jörg W Mittag", "author_id": 2988, "author_profile": "https://Stackoverflow.com/users/2988", "pm_score": 6, "selected": true, "text": "v v" } ]
2008/09/28
[ "https://Stackoverflow.com/questions/145263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19784/" ]
145,270
<p>What would be the quickest way to construct a Python binding to a C or C++ library?</p> <p>(I am using Windows if this matters.)</p>
[ { "answer_id": 145283, "author": "Ben Hoffstein", "author_id": 4482, "author_profile": "https://Stackoverflow.com/users/4482", "pm_score": 6, "selected": false, "text": "/* File : example.c */\nint fact(int n) {\n if (n <= 1) return 1;\n else return n*fact(n-1);\n}\n /* example.i *...
2008/09/28
[ "https://Stackoverflow.com/questions/145270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9611/" ]
145,291
<p>Can you have smart behavior for the home key in Emacs? By smart I mean that instead of going to the character number 0, it should go to the first non-blank character, and go to 0 on a second pressing, and back to the first non-blank in a third and so on. Having smart end would be nice as well.</p>
[ { "answer_id": 145359, "author": "cjm", "author_id": 8355, "author_profile": "https://Stackoverflow.com/users/8355", "pm_score": 7, "selected": true, "text": "(defun smart-beginning-of-line ()\n \"Move point to first non-whitespace character or beginning-of-line.\n\nMove point to the fi...
2008/09/28
[ "https://Stackoverflow.com/questions/145291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6068/" ]
145,304
<p>I have been trying to learn multi-threaded programming in C# and I am confused about when it is best to use a thread pool vs. create my own threads. One book recommends using a thread pool for small tasks only (whatever that means), but I can't seem to find any real guidelines.</p> <p>What are some pros and cons of ...
[ { "answer_id": 145420, "author": "Brannon", "author_id": 5745, "author_profile": "https://Stackoverflow.com/users/5745", "pm_score": 3, "selected": false, "text": "FileStream BeginRead EndRead HttpWebRequest BeginGetResponse EndGetResponse" }, { "answer_id": 208621, "author":...
2008/09/28
[ "https://Stackoverflow.com/questions/145304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]