qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
75,145
<p>How to you find the URL that represents the documentation of a .NET framework method on the MSDN website?</p> <p>For example, I want to embed the URL for the .NET framework method into some comments in some code. The normal "mangled" URL that one gets searching MSDN isn't very friendly looking: <a href="http://msd...
[ { "answer_id": 75167, "author": "user7116", "author_id": 7116, "author_profile": "https://Stackoverflow.com/users/7116", "pm_score": 3, "selected": false, "text": "http://msdn.microsoft.com/en-us/library/system.windows.application_events.aspx\n http://msdn.microsoft.com/en-us/library/sys...
2008/09/16
[ "https://Stackoverflow.com/questions/75145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2459/" ]
75,156
<p>This is a shared hosting environment. I control the server, but not necessarily the content. I've got a client with a Perl script that seems to run out of control every now and then and suck down 50% of the processor until the process is killed.</p> <p>With ASP scripts, I'm able to restrict the amount of time the...
[ { "answer_id": 75875, "author": "arclight", "author_id": 13366, "author_profile": "https://Stackoverflow.com/users/13366", "pm_score": 1, "selected": false, "text": "eval {\n # Create signal handler and make it local so it falls out of scope\n # outside the eval block\n local $S...
2008/09/16
[ "https://Stackoverflow.com/questions/75156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13282/" ]
75,159
<p>I need to provide statistics on how many lines of code <code>(LOC)</code> associated with a system. The application part is easy but I need to also include any code residing within the SQL Server database. This would apply to stored procedures, functions, triggers, etc. </p> <p>How can I easily get that info? Can i...
[ { "answer_id": 75412, "author": "Chris Bilson", "author_id": 12934, "author_profile": "https://Stackoverflow.com/users/12934", "pm_score": 2, "selected": false, "text": "$conn = new-object System.Data.SqlClient.SqlConnection(\"Server=server;Database=database;Integrated Security=SSPI\")\n...
2008/09/16
[ "https://Stackoverflow.com/questions/75159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
75,175
<p>Is it possible to create an instance of a generic type in Java? I'm thinking based on what I've seen that the answer is <code>no</code> (<em>due to type erasure</em>), but I'd be interested if anyone can see something I'm missing:</p> <pre><code>class SomeContainer&lt;E&gt; { E createContents() { re...
[ { "answer_id": 75254, "author": "Justin Rudd", "author_id": 12968, "author_profile": "https://Stackoverflow.com/users/12968", "pm_score": 9, "selected": false, "text": "new E() private static class SomeContainer<E> {\n E createContents(Class<E> clazz) {\n return clazz.newInstan...
2008/09/16
[ "https://Stackoverflow.com/questions/75175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5309/" ]
75,180
<p>If you have a statically allocated array, the Visual Studio debugger can easily display all of the array elements. However, if you have an array allocated dynamically and pointed to by a pointer, it will only display the first element of the array when you click the + to expand it. Is there an easy way to tell the...
[ { "answer_id": 75202, "author": "shoosh", "author_id": 9611, "author_profile": "https://Stackoverflow.com/users/9611", "pm_score": 9, "selected": true, "text": "char *a = new char[10];\n a,10\n" }, { "answer_id": 12477304, "author": "wog", "author_id": 1022328, "autho...
2008/09/16
[ "https://Stackoverflow.com/questions/75180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9530/" ]
75,182
<p>How can one detect being in a chroot jail without root privileges? Assume a standard BSD or Linux system. The best I came up with was to look at the inode value for "/" and to consider whether it is reasonably low, but I would like a more accurate method for detection.</p> <p><code>[edit 20080916 142430 EST]</cod...
[ { "answer_id": 8070267, "author": "Gilles 'SO- stop being evil'", "author_id": 387076, "author_profile": "https://Stackoverflow.com/users/387076", "pm_score": 3, "selected": false, "text": "/proc/1/root / /proc [ \"$(stat -c %d:%i /)\" != \"$(stat -c %d:%i /proc/1/root/.)\" ]\n# With ash...
2008/09/16
[ "https://Stackoverflow.com/questions/75182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13277/" ]
75,191
<p>In C/C++, what an <code>unsigned char</code> is used for? How is it different from a regular <code>char</code>?</p>
[ { "answer_id": 75238, "author": "Todd Gamblin", "author_id": 9122, "author_profile": "https://Stackoverflow.com/users/9122", "pm_score": 7, "selected": false, "text": "char signed unsigned signed char unsigned char char signed char unsigned char signed char -128 127 unsigned char 0 255 c...
2008/09/16
[ "https://Stackoverflow.com/questions/75191", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1785/" ]
75,213
<p>In C++, what is the purpose of the scope resolution operator when used without a scope? For instance:</p> <pre><code>::foo(); </code></pre>
[ { "answer_id": 75262, "author": "Mark", "author_id": 4405, "author_profile": "https://Stackoverflow.com/users/4405", "pm_score": 7, "selected": true, "text": "void bar(); // this is a global function\n\nclass foo {\n void some_func() { ::bar(); } // this function is calling the ...
2008/09/16
[ "https://Stackoverflow.com/questions/75213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1785/" ]
75,218
<p>How can I detect when an Exception has been thrown anywhere in my application?</p> <p>I'm try to auto-magically send myself an email whenever an exception is thrown anywhere in my Java Desktop Application. I figure this way I can be more proactive.</p> <p>I know I could just explicitly log and notify myself whene...
[ { "answer_id": 75298, "author": "Mat Mannion", "author_id": 6282, "author_profile": "https://Stackoverflow.com/users/6282", "pm_score": 1, "selected": false, "text": "<error-page>\n <error-code>500</error-code>\n <location>/error/500.htm</location>\n</error-page>\n Exception exception ...
2008/09/16
[ "https://Stackoverflow.com/questions/75218", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2443/" ]
75,230
<p>How do you quickly find the URL for a Win32 API on MSDN? It's easy for .NET methods -- just add the method name (for example, System.Byte.ToString) to <a href="http://msdn.microsoft.com/library/" rel="nofollow noreferrer">http://msdn.microsoft.com/library/</a>.</p> <p>However, for Win32 APIs (say GetLongPathName),...
[ { "answer_id": 1138828, "author": "peterchen", "author_id": 31317, "author_profile": "https://Stackoverflow.com/users/31317", "pm_score": 0, "selected": false, "text": "// see msdn:GetLongPathName\n" }, { "answer_id": 1138850, "author": "Kirill V. Lyadvinsky", "author_id"...
2008/09/16
[ "https://Stackoverflow.com/questions/75230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2459/" ]
75,245
<p>Is it possible to reach the individual columns of table2 using HQL with a configuration like this?</p> <pre><code>&lt;hibernate-mapping&gt; &lt;class table="table1"&gt; &lt;set name="table2" table="table2" lazy="true" cascade="all"&gt; &lt;key column="result_id"/&gt; &lt;many-to-many column="group...
[ { "answer_id": 75272, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 1, "selected": false, "text": "select t1.table2.property1, t1.table2.property2, ... from table1 as t1\n select t2.property1, t2.property2, ... \n from ta...
2008/09/16
[ "https://Stackoverflow.com/questions/75245", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
75,255
<p>When you're doing a usual gdb session on an executable file on the same computer, you can give the run command and it will start the program over again.</p> <p>When you're running gdb on an embedded system, as with the command <code>target localhost:3210</code>, how do you start the program over again without quitti...
[ { "answer_id": 76727, "author": "Drew Frezell", "author_id": 10954, "author_profile": "https://Stackoverflow.com/users/10954", "pm_score": 3, "selected": false, "text": "jump function set $pc=address main" }, { "answer_id": 5200638, "author": "pdileepa", "author_id": 5537...
2008/09/16
[ "https://Stackoverflow.com/questions/75255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11138/" ]
75,261
<p>I got this output when running <code>sudo cpan Scalar::Util::Numeric</code></p> <pre> jmm@freekbox:~/bfwsandbox/sa/angel/astroportal/dtu8e/resources$ sudo cpan Scalar::Util::Numeric [sudo] password for jmm: CPAN: Storable loaded ok Going to read /home/jmm/.cpan/Metadata Database was generated on Tue, 09 Sep 2008 1...
[ { "answer_id": 75399, "author": "Mark Grimes", "author_id": 13233, "author_profile": "https://Stackoverflow.com/users/13233", "pm_score": 2, "selected": false, "text": "sys/types.h" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/75261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
75,267
<p>In how many languages is Null not equal to anything not even Null?</p>
[ { "answer_id": 75278, "author": "Josh Bush", "author_id": 1672, "author_profile": "https://Stackoverflow.com/users/1672", "pm_score": 2, "selected": false, "text": "SELECT * FROM dual WHERE NULL=null; --no rows returned\n" }, { "answer_id": 75472, "author": "AShelly", "a...
2008/09/16
[ "https://Stackoverflow.com/questions/75267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6178/" ]
75,270
<p>Does anyone know of a good open source plugin for database querying and exploring within Eclipse? </p> <p>The active Database Exploring plugin within Eclipse is really geared around being associated with a Java project. While I am just trying to run ad-hoc queries and explore the schema. I am effectively looking fo...
[ { "answer_id": 75278, "author": "Josh Bush", "author_id": 1672, "author_profile": "https://Stackoverflow.com/users/1672", "pm_score": 2, "selected": false, "text": "SELECT * FROM dual WHERE NULL=null; --no rows returned\n" }, { "answer_id": 75472, "author": "AShelly", "a...
2008/09/16
[ "https://Stackoverflow.com/questions/75270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12600/" ]
75,273
<p>I'm in an <strong>ASP.NET UserControl</strong>. When I type Control-K, Control-D to reformat all the markup, I get a series of messages from VS 2008:</p> <p>"Could not reformat the document. The original format was restored."</p> <p>"Could not complete the action."</p> <p>"The operation could not be completed. ...
[ { "answer_id": 75308, "author": "palehorse", "author_id": 312, "author_profile": "https://Stackoverflow.com/users/312", "pm_score": 2, "selected": false, "text": "<div><h1>My Title</div></h1\n" }, { "answer_id": 41345298, "author": "ViVi", "author_id": 5621607, "autho...
2008/09/16
[ "https://Stackoverflow.com/questions/75273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5486/" ]
75,282
<p>I'm handling the <code>onSelectIndexChanged</code> event. An event is raised when the DropDownList selection changes. the problem is that the DropDownList still returns the old values for <code>SelectedValue</code> and <code>SelectedIndex</code>. What am I doing wrong?</p> <p>Here is the DropDownList definition fro...
[ { "answer_id": 75437, "author": "axk", "author_id": 578, "author_profile": "https://Stackoverflow.com/users/578", "pm_score": 2, "selected": false, "text": "if(!IsPostback) d.SelectedValue = \"Default\"\n" }, { "answer_id": 75827, "author": "Jason Stevenson", "author_id":...
2008/09/16
[ "https://Stackoverflow.com/questions/75282", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4491/" ]
75,322
<p>I have an ASP.Net/AJAX control kit project that i am working on. 80% of the time there is no problem. The page runs as it should. If you refresh the page it will sometimes show a javascript error "Sys is undefined".</p> <p>It doesn't happen all the time, but it is reproducible. When it happens, the user has to ...
[ { "answer_id": 75460, "author": "Compulsion", "author_id": 3675, "author_profile": "https://Stackoverflow.com/users/3675", "pm_score": 3, "selected": false, "text": "<asp:ScriptManager ID=\"ScriptManager1\" runat=\"server\" EnablePartialRendering=\"true\" /> \n" }, { "answer_id":...
2008/09/16
[ "https://Stackoverflow.com/questions/75322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
75,340
<p>Can anyone recommend an efficient method to execute XSLT transforms of XML data within a Ruby application? The XSL gem (REXSL) is not available yet, and while I have seen a project or two that implement it, I'm wary of using them so early on. A friend had recommended a shell out call to Perl, but I'm worried about r...
[ { "answer_id": 75460, "author": "Compulsion", "author_id": 3675, "author_profile": "https://Stackoverflow.com/users/3675", "pm_score": 3, "selected": false, "text": "<asp:ScriptManager ID=\"ScriptManager1\" runat=\"server\" EnablePartialRendering=\"true\" /> \n" }, { "answer_id":...
2008/09/16
[ "https://Stackoverflow.com/questions/75340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13320/" ]
75,347
<p>I've been asked to implement some code that will update a row in a MS SQL Server database and then use a stored proc to insert the update in a history table. We can't add a stored proc to do this since we don't control the database. I know in stored procs you can do the update and then call execute on another stor...
[ { "answer_id": 75852, "author": "osp70", "author_id": 2357, "author_profile": "https://Stackoverflow.com/users/2357", "pm_score": 0, "selected": false, "text": "sSQL = \"BEGIN TRANSACTION;\" & _\n \" Update table set col1 = @col1, col2 = @col2\" & _\n \" where col3 = ...
2008/09/16
[ "https://Stackoverflow.com/questions/75347", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2357/" ]
75,361
<p>I have a column containing the strings 'Operator (1)' and so on until 'Operator (600)' so far.</p> <p>I want to get them numerically ordered and I've come up with</p> <pre><code>select colname from table order by cast(replace(replace(colname,'Operator (',''),')','') as int) </code></pre> <p>which is very very ug...
[ { "answer_id": 150106, "author": "Constantin", "author_id": 20310, "author_profile": "https://Stackoverflow.com/users/20310", "pm_score": 0, "selected": false, "text": "operator" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/75361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5190/" ]
75,379
<p>The problem is simple, but I'm struggling a bit already.</p> <pre><code>Server server = new Server(8080); Context context = new Context(server, "/", Context.NO_SESSIONS); context.addServlet(MainPageView.class, "/"); context.addServlet(UserView.class, "/signup"); server.start(); </code></pre> <p>That's a pretty s...
[ { "answer_id": 75424, "author": "Justin Rudd", "author_id": 12968, "author_profile": "https://Stackoverflow.com/users/12968", "pm_score": 0, "selected": false, "text": "Context.addServlet ServletHolder ServletHolder Servlet myServlet = new MyServlet();\nServletHolder holder = new Servlet...
2008/09/16
[ "https://Stackoverflow.com/questions/75379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3105/" ]
75,385
<p>The Visual Studio compiler does not seem to warn on signed/unsigned assignments, only on comparisons. For example the code below will generate a warning on the if statement but not the initial assignments.</p> <p>Is there anyway to make it catch these? I'm already at W4 but thought (hoped) there may be another sett...
[ { "answer_id": 75711, "author": "Michael Burr", "author_id": 12711, "author_profile": "https://Stackoverflow.com/users/12711", "pm_score": 0, "selected": false, "text": "C:\\Temp>cl /Wall /c foo.c\nMicrosoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86\nCopyright...
2008/09/16
[ "https://Stackoverflow.com/questions/75385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1043/" ]
75,401
<p>User <a href="https://stackoverflow.com/users/1065/kokos">kokos</a> answered the wonderful <em><a href="https://stackoverflow.com/questions/9033/hidden-features-of-c">Hidden Features of C#</a></em> question by mentioning the <code>using</code> keyword. Can you elaborate on that? What are the uses of <code>using</cod...
[ { "answer_id": 75426, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 7, "selected": false, "text": "using (var conn = new SqlConnection(\"connection string\"))\n{\n conn.Open();\n\n // Execute SQL statement here on...
2008/09/16
[ "https://Stackoverflow.com/questions/75401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13332/" ]
75,432
<p>I am using URLDownloadToFile to retrieve a file from a website. Subsequent calls return the original file rather than an updated version. I assume it is retrieving a cached version.</p>
[ { "answer_id": 20701711, "author": "user3122475", "author_id": 3122475, "author_profile": "https://Stackoverflow.com/users/3122475", "pm_score": 2, "selected": false, "text": "// Limpa cache do Internet Explorer\nprocedure DeletaIECache;\nvar\n lpEntryInfo: PInternetCacheEntryInfo;\n...
2008/09/16
[ "https://Stackoverflow.com/questions/75432", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8761/" ]
75,440
<p>What method do I call to get the name of a class?</p>
[ { "answer_id": 75456, "author": "clahey", "author_id": 8453, "author_profile": "https://Stackoverflow.com/users/8453", "pm_score": 5, "selected": false, "text": "__name__ class.__name__ object.__class__.__name__" }, { "answer_id": 75467, "author": "Mr Shark", "author_id":...
2008/09/16
[ "https://Stackoverflow.com/questions/75440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8453/" ]
75,441
<p>As part of the Nant copy task, I would like to change the properties of the files in the target location. For instance make the files "read-write" from "read-only". How would I do this?</p>
[ { "answer_id": 75481, "author": "Phillip Wells", "author_id": 3012, "author_profile": "https://Stackoverflow.com/users/3012", "pm_score": 4, "selected": true, "text": "<attrib file=\"test.txt\" readonly=\"false\"/>\n" }, { "answer_id": 76863, "author": "LordHits", "author...
2008/09/16
[ "https://Stackoverflow.com/questions/75441", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8088/" ]
75,446
<p>I have just started reading DDD. I am unable to completely grasp the concept of Entity vs Value objects.. Can someone please explain the problems (maintainability, performance.. etc) a system could face when a Value object is designed as a Entity object? Example would be great...</p>
[ { "answer_id": 47422311, "author": "Ramin Farajpour", "author_id": 3269793, "author_profile": "https://Stackoverflow.com/users/3269793", "pm_score": 2, "selected": false, "text": "Entities Value Objects" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/75446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
75,463
<p>Does anyone know of some good resources related to setting up heirarchical user account systems? I'm currently setting one up and am struggling with some of the more complex logic (especially with determining permissions). I was hoping I might be able to find some resources to help me along.</p> <p><strong>Some Bac...
[ { "answer_id": 458047, "author": "Ben Aston", "author_id": 38522, "author_profile": "https://Stackoverflow.com/users/38522", "pm_score": 2, "selected": false, "text": "00 Permission A Permission B 01 10 OR Permission set for Group A 01\nPermission set for Group B 10 OR \n ...
2008/09/16
[ "https://Stackoverflow.com/questions/75463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5291/" ]
75,482
<p>I am serving all content through apache with <code>Content-Encoding: zip</code> but that compresses on the fly. A good amount of my content is static files on the disk. I want to gzip the files beforehand rather than compressing them every time they are requested.</p> <p>This is something that, I believe, <code>m...
[ { "answer_id": 75682, "author": "Aristotle Pagaltzis", "author_id": 9410, "author_profile": "https://Stackoverflow.com/users/9410", "pm_score": 5, "selected": true, "text": "MultiViews Options AddEncoding" }, { "answer_id": 75697, "author": "Brian Matthews", "author_id": ...
2008/09/16
[ "https://Stackoverflow.com/questions/75482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9594/" ]
75,489
<p>I am pulling a long timestamp from a database, but want to present it as a Date using Tags only, no embedded java in the JSP.<br><br> I've created my own tag to do this because I was unable to get the parseDate and formatDate tags to work, but that's not to say they don't work.<br> <br> Any advice?</p> <p>Thanks.</...
[ { "answer_id": 75674, "author": "ScArcher2", "author_id": 1310, "author_profile": "https://Stackoverflow.com/users/1310", "pm_score": 4, "selected": true, "text": "long longvalue = ...;//from database.\njava.util.Date dateValue = new java.util.Date(longvalue);\nrequest.setAttribute(\"dat...
2008/09/16
[ "https://Stackoverflow.com/questions/75489", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9450/" ]
75,495
<p>When creating a UserControl in WPF, I find it convenient to give it some arbitrary Height and Width values so that I can view my changes in the Visual Studio designer. When I run the control, however, I want the Height and Width to be undefined, so that the control will expand to fill whatever container I place it i...
[ { "answer_id": 75527, "author": "Brian Leahy", "author_id": 580, "author_profile": "https://Stackoverflow.com/users/580", "pm_score": 6, "selected": false, "text": " xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \n xmlns:mc=\"http://schemas.openxmlformats.org/markup...
2008/09/16
[ "https://Stackoverflow.com/questions/75495", "https://Stackoverflow.com", "https://Stackoverflow.com/users/317/" ]
75,500
<p>I have around 1000 pdf filesand I need to convert them to 300 dpi tiff files. What is the best way to do this? If there is an SDK or something or a tool that can be scripted that would be ideal. </p>
[ { "answer_id": 75567, "author": "Aeon", "author_id": 13289, "author_profile": "https://Stackoverflow.com/users/13289", "pm_score": 7, "selected": true, "text": "convert foo.pdf pages-%03d.tiff\n gs -q -dNOPAUSE -sDEVICE=tiffg4 -sOutputFile=a.tif foo.pdf -c quit\n" }, { "answer_id...
2008/09/16
[ "https://Stackoverflow.com/questions/75500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/260/" ]
75,508
<p>I have 28,000 images I need to convert into a movie. I tried </p> <pre><code>mencoder mf://*.jpg -mf w=640:h=480:fps=30:type=jpg -ovc lavc -lavcopts vcodec=msmpeg4v2 -nosound -o ../output-msmpeg4v2.avi </code></pre> <p>But it seems to crap out at 7500 frames.</p> <p>The files are named webcam_2007-04-16_070804.jp...
[ { "answer_id": 75668, "author": "moonshadow", "author_id": 11834, "author_profile": "https://Stackoverflow.com/users/11834", "pm_score": 3, "selected": true, "text": "mf://@filename" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/75508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11950/" ]
75,533
<p>I'm trying to have the same KDE Konsole experience within Mac OS X.</p> <p>Here's my (overly complicated?) setup:</p> <ul> <li>I have Control and Command swapped at the System Preferences level. (Can't live without this)</li> <li>Parallels lets you, at the Parallels application level, also reverse Control and Com...
[ { "answer_id": 194426, "author": "haa", "author_id": 12115, "author_profile": "https://Stackoverflow.com/users/12115", "pm_score": 2, "selected": false, "text": "ssh -X user@host_or_ipaddress emacs& X11.app launchd" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/75533", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8913/" ]
75,538
<p>No C++ love when it comes to the "hidden features of" line of questions? Figured I would throw it out there. What are some of the hidden features of C++?</p>
[ { "answer_id": 76606, "author": "MSN", "author_id": 6210, "author_profile": "https://Stackoverflow.com/users/6210", "pm_score": 6, "selected": false, "text": "const MyClass& x = MyClass(); // temporary exists as long as x is in scope\n" }, { "answer_id": 78484, "author": "Jas...
2008/09/16
[ "https://Stackoverflow.com/questions/75538", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2328/" ]
75,608
<p>I'm working on a product feature that will allow the user to export data from a SQL CE database on one copy of my application and re-import it into SQL CE on the other end. This data is not whole tables, but the result of queries.</p> <p>I had hoped to take advantage of .net's built-in XML-based serialization like ...
[ { "answer_id": 75681, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 1, "selected": false, "text": "SqlCeDataAdapter .Fill() .WriteXml()" }, { "answer_id": 75702, "author": "Jonathan Rupp", "author_id": ...
2008/09/16
[ "https://Stackoverflow.com/questions/75608", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5287/" ]
75,614
<p>The following question answers how to get large memory pages on Windows :<br> "<a href="https://stackoverflow.com/questions/39059/how-do-i-run-my-app-with-large-pages-in-windows">how do i run my app with large pages in windows</a>".</p> <p>The problem I'm trying to solve is how do I configure it on Vista and 2008 S...
[ { "answer_id": 75681, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 1, "selected": false, "text": "SqlCeDataAdapter .Fill() .WriteXml()" }, { "answer_id": 75702, "author": "Jonathan Rupp", "author_id": ...
2008/09/16
[ "https://Stackoverflow.com/questions/75614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8782/" ]
75,621
<p>I have a web report that uses a Django form (new forms) for fields that control the query used to generate the report (start date, end date, ...). The issue I'm having is that the page should work using the form's initial values (unbound), but I can't access the cleaned_data field unless I call <code>is_valid()</cod...
[ { "answer_id": 75815, "author": "Justin Voss", "author_id": 5616, "author_profile": "https://Stackoverflow.com/users/5616", "pm_score": 0, "selected": false, "text": "if request.method == \"GET\":\n # calculate my_start_date and my_end_date here...\n form = MyForm( { 'start_date': ...
2008/09/16
[ "https://Stackoverflow.com/questions/75621", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8247/" ]
75,626
<p>I have a JSP page that contains a scriplet where I instantiate an object. I would like to pass that object to the JSP tag without using any cache. </p> <p>For example I would like to accomplish this: </p> <pre><code>&lt;%@ taglib prefix="wf" uri="JspCustomTag" %&gt; &lt;% Object myObject = new Object(); %&gt;...
[ { "answer_id": 75843, "author": "Garth Gilmour", "author_id": 2635682, "author_profile": "https://Stackoverflow.com/users/2635682", "pm_score": 3, "selected": false, "text": "<wf:my-tag obj=\"<%= myObject %>\" />\n" }, { "answer_id": 76187, "author": "Pavel Feldman", "aut...
2008/09/16
[ "https://Stackoverflow.com/questions/75626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13393/" ]
75,650
<p>I'm working in a team environment where each developer works from their local desktop and deploys to a virtual machine that they own on the network. What I'm trying to do is set up the Visual Studio solution so that when they build the solution each projects deployment is handled in the post-build event to that dev...
[ { "answer_id": 75843, "author": "Garth Gilmour", "author_id": 2635682, "author_profile": "https://Stackoverflow.com/users/2635682", "pm_score": 3, "selected": false, "text": "<wf:my-tag obj=\"<%= myObject %>\" />\n" }, { "answer_id": 76187, "author": "Pavel Feldman", "aut...
2008/09/16
[ "https://Stackoverflow.com/questions/75650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3957/" ]
75,652
<p>or "How do I answer questions on SO in Firefox using gVim inside the textboxes?"</p>
[ { "answer_id": 75686, "author": "Clinton Dreisbach", "author_id": 6262, "author_profile": "https://Stackoverflow.com/users/6262", "pm_score": 3, "selected": false, "text": "#!/bin/sh\nexec xterm -e /usr/bin/vim \"$@\"\n" }, { "answer_id": 830078, "author": "Hamish Downer", ...
2008/09/16
[ "https://Stackoverflow.com/questions/75652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13060/" ]
75,675
<p>How do I dump the data, and only the data, not the schema, of some SQLite3 tables of a database (not all the tables)? The dump should be in SQL format, as it should be easily re-entered into the database later and should be done from the command line. Something like</p> <pre><code>sqlite3 db .dump </code></pre> <p...
[ { "answer_id": 79168, "author": "harningt", "author_id": 12713, "author_profile": "https://Stackoverflow.com/users/12713", "pm_score": 2, "selected": false, "text": "SELECT 'INSERT INTO ' || tableName || ' VALUES( ' || \n {for each value} ' quote(' || value || ')' (+ commas until fi...
2008/09/16
[ "https://Stackoverflow.com/questions/75675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6068/" ]
75,677
<p>How can I convert a uniform distribution (as most random number generators produce, e.g. between 0.0 and 1.0) into a normal distribution? What if I want a mean and standard deviation of my choosing?</p>
[ { "answer_id": 77976, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": -1, "selected": false, "text": "function distRandom(){\n do{\n x=random(DISTRIBUTION_DOMAIN);\n }while(random(DISTRIBUTION_RANGE)>=distributionFunction(x...
2008/09/16
[ "https://Stackoverflow.com/questions/75677", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8062/" ]
75,700
<p>I have one applicationContext.xml file, and it has two org.springframework.orm.jpa.JpaTransactionManager (each with its own persistence unit, different databases) configured in a Spring middleware custom application. <br><br>I want to use annotation based transactions (@Transactional), to not mess around with Transa...
[ { "answer_id": 78479, "author": "toolkit", "author_id": 3295, "author_profile": "https://Stackoverflow.com/users/3295", "pm_score": 4, "selected": true, "text": "<bean id=\"firstRealService\" class=\"com.acme.FirstServiceImpl\"/>\n<bean id=\"firstService\" \n class=\"org.springframew...
2008/09/16
[ "https://Stackoverflow.com/questions/75700", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13143/" ]
75,701
<p>Let's say I write a DLL in C++, and declare a global object of a class with a non-trivial destructor. Will the destructor be called when the DLL is unloaded?</p>
[ { "answer_id": 76677, "author": "MSN", "author_id": 6210, "author_profile": "https://Stackoverflow.com/users/6210", "pm_score": 3, "selected": false, "text": "%ProgramFiles%\\Visual Studio 8\\vc\\crt\\src\\dllcrt0.c _cexit()" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/75701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13313/" ]
75,704
<p>I see that within MySQL there are <code>Cast()</code> and <code>Convert()</code> functions to create integers from values, but is there any way to check to see if a value is an integer? Something like <code>is_int()</code> in PHP is what I am looking for.</p>
[ { "answer_id": 75739, "author": "JBB", "author_id": 12332, "author_profile": "https://Stackoverflow.com/users/12332", "pm_score": 4, "selected": false, "text": "CREATE FUNCTION IsNumeric (sIn varchar(1024)) RETURNS tinyint\nRETURN sIn REGEXP '^(-|\\\\+){0,1}([0-9]+\\\\.[0-9]*|[0-9]*\\\\....
2008/09/16
[ "https://Stackoverflow.com/questions/75704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8224/" ]
75,705
<p>I have searched for various techniques on how to read/write dBase III (dbf) files using OLEDB or ODBC with C#/.NET. I have tried almost all of the tecniques posted, but without success. Can someone point me in the right direction?</p> <p>Thanks for your time.</p>
[ { "answer_id": 75915, "author": "Fionnuala", "author_id": 2548, "author_profile": "https://Stackoverflow.com/users/2548", "pm_score": 3, "selected": false, "text": " ConnectionString = \"Provider=Microsoft.Jet.OLEDB.4.0;\" & _\n\"Data Source=e:\\My Documents\\dBase;Extended Properties=dB...
2008/09/16
[ "https://Stackoverflow.com/questions/75705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10333/" ]
75,712
<p>I'm using membership and roles for authentication in my vb .net application. We have about 5 roles in the application with certain roles filling out a specific profile value. Example is the role is store and the profile value is store number. Obviously if you work for headquarters you don't have a store number so I ...
[ { "answer_id": 76517, "author": "Alfonso Pajares", "author_id": 12369, "author_profile": "https://Stackoverflow.com/users/12369", "pm_score": 0, "selected": false, "text": " Public Shared Function LoadALLUsersInRole(ByVal Code As Integer, ByVal Role As String) As ArrayList\n Di...
2008/09/16
[ "https://Stackoverflow.com/questions/75712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12369/" ]
75,713
<p>I'm trying to bind controls in a WPF form to an interface and I get a runtime error that it can't find the interface's properties.</p> <p>Here's the class I'm using as a datasource:</p> <pre><code>public interface IPerson { string UserId { get; set; } string UserName { get; set; } string Email { get; s...
[ { "answer_id": 77322, "author": "Robert Jeppesen", "author_id": 9436, "author_profile": "https://Stackoverflow.com/users/9436", "pm_score": 3, "selected": true, "text": "var person = PolicyInjection.Wrap<IPerson>(new Person());\n IPerson person = new Person();\n" }, { "answer_id"...
2008/09/16
[ "https://Stackoverflow.com/questions/75713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6542/" ]
75,722
<p>In C#, if I want to deterministically clean up non-managed resources, I can use the "using" keyword. But for multiple dependent objects, this ends up nesting further and further:</p> <pre><code>using (FileStream fs = new FileStream("c:\file.txt", FileMode.Open)) { using (BufferedStream bs = new BufferedStream(...
[ { "answer_id": 75741, "author": "Abe Heidebrecht", "author_id": 9268, "author_profile": "https://Stackoverflow.com/users/9268", "pm_score": -1, "selected": false, "text": " try\n {\n obj declaration\n ...\n }\n finally\n {\n obj.Dispose();\n }\n" }, { "...
2008/09/16
[ "https://Stackoverflow.com/questions/75722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8701/" ]
75,732
<p>I've seen numerous people mentions that you shouldn't use widths and padding or margins on the same element with CSS. Why is that?</p>
[ { "answer_id": 78455, "author": "nickf", "author_id": 9021, "author_profile": "https://Stackoverflow.com/users/9021", "pm_score": 0, "selected": false, "text": "#content {\n width: 100%;\n padding: 0 10px;\n}\n <div id=\"content\">\n <div class=\"inner\">\n content here.\...
2008/09/16
[ "https://Stackoverflow.com/questions/75732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12930/" ]
75,746
<pre><code>EmployeeNumber = string.IsNullOrEmpty(employeeNumberTextBox.Text) ? null : Convert.ToInt32(employeeNumberTextBox.Text), </code></pre> <p>I often find myself wanting to do things like this (<code>EmployeeNumber</code> is a <code>Nullable&lt;int&gt;</code> as it's a property on a LINQ-to-SQL dbml objec...
[ { "answer_id": 75795, "author": "Abe Heidebrecht", "author_id": 9268, "author_profile": "https://Stackoverflow.com/users/9268", "pm_score": 2, "selected": false, "text": "EmployeeNumber = string.IsNullOrEmpty(employeeNumberTextBox.Text)\n ? null\n : (int?)Convert.ToInt32(employeeNumb...
2008/09/16
[ "https://Stackoverflow.com/questions/75746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12975/" ]
75,752
<p>I'm building a quick csv from a mysql table with a query like:</p> <pre><code>select DATE(date),count(date) from table group by DATE(date) order by date asc; </code></pre> <p>and just dumping them to a file in perl over a:</p> <pre><code>while(my($date,$sum) = $sth-&gt;fetchrow) { print CSV "$date,$sum\n" } <...
[ { "answer_id": 75807, "author": "Aeon", "author_id": 13289, "author_profile": "https://Stackoverflow.com/users/13289", "pm_score": 3, "selected": false, "text": "SELECT DATE(r.date),count(d.date) \nFROM dates AS r \nLEFT JOIN table AS d ON d.date = r.date \nGROUP BY DATE(r.date) \nORDER ...
2008/09/16
[ "https://Stackoverflow.com/questions/75752", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13196/" ]
75,759
<p>What's the best way to implement the enum idiom in Ruby? I'm looking for something which I can use (almost) like the Java/C# enums.</p>
[ { "answer_id": 75787, "author": "Jan Krüger", "author_id": 12471, "author_profile": "https://Stackoverflow.com/users/12471", "pm_score": 1, "selected": false, "text": ":foo_bar" }, { "answer_id": 75801, "author": "emk", "author_id": 12089, "author_profile": "https://S...
2008/09/16
[ "https://Stackoverflow.com/questions/75759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4110/" ]
75,763
<p>1.exe doesn't give enough time for me to launch the IDE and attach 1.exe to the debugger to break into.</p>
[ { "answer_id": 75803, "author": "Greg Hurlman", "author_id": 35, "author_profile": "https://Stackoverflow.com/users/35", "pm_score": 0, "selected": false, "text": "#ifdef DEBUG\nThread.Sleep(10000);\n#endif\n" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/75763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13432/" ]
75,777
<p>I assumed that the C# margin property had a meaning like in CSS - the spacing around the outside of the control. But Margin values seem to be ignored to matter what values I enter.</p> <p>Then I read on the SDK: </p> <blockquote> <p>Setting the Margin property on a docked control has no effect on the distanc...
[ { "answer_id": 75911, "author": "OwenP", "author_id": 2547, "author_profile": "https://Stackoverflow.com/users/2547", "pm_score": 3, "selected": false, "text": "TableLayoutPanel using System.Drawing;\nusing System.Windows.Forms;\n\nnamespace WindowsFormsApplication1\n{\n public partia...
2008/09/16
[ "https://Stackoverflow.com/questions/75777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
75,785
<p>Is there any complete guidance on doing AppBar docking (such as locking to the screen edge) in WPF? I understand there are InterOp calls that need to be made, but I'm looking for either a proof of concept based on a simple WPF form, or a componentized version that can be consumed.</p> <p>Related resources:</p> <ul...
[ { "answer_id": 84987, "author": "Philip Rieck", "author_id": 12643, "author_profile": "https://Stackoverflow.com/users/12643", "pm_score": 8, "selected": true, "text": "AppBarFunctions.SetAppBar( this, ABEdge.Right );\n AppBarFunctions.SetAppBar( this, ABEdge.None );\n using System;\nusi...
2008/09/16
[ "https://Stackoverflow.com/questions/75785", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7301/" ]
75,786
<p>(Eclipse 3.4, Ganymede)</p> <p>I have an existing Dynamic Web Application project in Eclipse. When I created the project, I specified 'Default configuration for Apache Tomcat v6' under the 'Configuration' drop down.</p> <p>It's a month or 2 down the line, and I would now like to change the configuration to Tomcat ...
[ { "answer_id": 76205, "author": "William", "author_id": 9193, "author_profile": "https://Stackoverflow.com/users/9193", "pm_score": 7, "selected": true, "text": "org.eclipse.wst.common.project.facet.core.xml \n <installed facet=\"jst.web\" version=\"2.5\"/>\n <web-app version=\"2.4\" ...
2008/09/16
[ "https://Stackoverflow.com/questions/75786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13360/" ]
75,798
<p>I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? </p> <p>Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of the Java monstrosities out ther...
[ { "answer_id": 97778, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 2, "selected": false, "text": "/opt/this /opt/that" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/75798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13436/" ]
75,809
<p>Given the case I made <strong>two independent changes</strong> in <em>one</em> file: eg. added a new method and changed another method.</p> <p>I often don't want to commit both changes as <strong>one</strong> commit, but as <strong>two</strong> independent commits.</p> <p>On a git repository I would use the <stron...
[ { "answer_id": 75918, "author": "Aeon", "author_id": 13289, "author_profile": "https://Stackoverflow.com/users/13289", "pm_score": 2, "selected": false, "text": "cp file file.new\nsvn revert file\nopendiff file.new file -merge file\n svn ci -m 'first hunk' file\nmv file.new file\nsvn ci ...
2008/09/16
[ "https://Stackoverflow.com/questions/75809", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4308/" ]
75,819
<p>I'm having an issue with a query that currently uses </p> <pre><code>LEFT JOIN weblog_data AS pwd ON (pwd.field_id_41 != '' AND pwd.field_id_41 LIKE CONCAT('%', ewd.field_id_32, '%')) </code></pre> <p>However I'm discovering that I need it to only use that if there is no exact match first. What's happening i...
[ { "answer_id": 75973, "author": "Jonathan Rupp", "author_id": 12502, "author_profile": "https://Stackoverflow.com/users/12502", "pm_score": 3, "selected": true, "text": "LEFT JOIN weblog_data AS pwd1 ON (pwd.field_id_41 != '' AND pwd.field_id_41 = ewd.field_id_32)\nLEFT JOIN weblog_data ...
2008/09/16
[ "https://Stackoverflow.com/questions/75819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12073/" ]
75,829
<p>All the docs for SQLAlchemy give <code>INSERT</code> and <code>UPDATE</code> examples using the local table instance (e.g. <code>tablename.update()</code>... )</p> <p>Doing this seems difficult with the declarative syntax, I need to reference <code>Base.metadata.tables["tablename"]</code> to get the table reference...
[ { "answer_id": 77962, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "__table__" }, { "answer_id": 156968, "author": "GHZ", "author_id": 18138, "author_profile": "https://Stacko...
2008/09/16
[ "https://Stackoverflow.com/questions/75829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
75,848
<p>I'm trying to insert a <a href="http://en.wikipedia.org/wiki/Spry_framework" rel="nofollow noreferrer">Spry</a> <a href="http://en.wikipedia.org/wiki/Accordion_(GUI)" rel="nofollow noreferrer">accordion</a> into an already existing <a href="http://en.wikipedia.org/wiki/JavaServer_Faces" rel="nofollow noreferrer">JSF...
[ { "answer_id": 81534, "author": "Dave Smylie", "author_id": 1505600, "author_profile": "https://Stackoverflow.com/users/1505600", "pm_score": 3, "selected": true, "text": " <div id=\"Accordion1\" class=\"Accordion\">\n <div class=\"AccordionPanel\">\n <div cla...
2008/09/16
[ "https://Stackoverflow.com/questions/75848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1459442/" ]
75,891
<p>I need an algorithm that can determine whether two images are 'similar' and recognizes similar patterns of color, brightness, shape etc.. I might need some pointers as to what parameters the human brain uses to 'categorize' images. .. </p> <p>I have looked at hausdorff based matching but that seems mainly for match...
[ { "answer_id": 49534462, "author": "duhaime", "author_id": 1727392, "author_profile": "https://Stackoverflow.com/users/1727392", "pm_score": 3, "selected": false, "text": "from __future__ import absolute_import, division, print_function\n\n\"\"\"\n\nThis is a modification of the classify...
2008/09/16
[ "https://Stackoverflow.com/questions/75891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13466/" ]
75,924
<p>This may be a no-brainer for the WPF cognoscenti, but I'd like to know if there's a simple way to put text on the WPF ProgressBar. To me, an empty progress bar looks naked. That's screen real estate that could carry a message about <strong>what</strong> is in progress, or even just add numbers to the representation....
[ { "answer_id": 99245, "author": "SmartyP", "author_id": 18005, "author_profile": "https://Stackoverflow.com/users/18005", "pm_score": 6, "selected": false, "text": "CustomControl Adorner <Grid Width=\"300\" Height=\"50\"> \n <ProgressBar Value=\"50\" />\n <TextBlock HorizontalAlignm...
2008/09/16
[ "https://Stackoverflow.com/questions/75924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1336/" ]
75,937
<p>I am using <strong>gcc</strong> for <strong>windows</strong>. The OS is <strong>windows XP</strong>. How do I import the homepath variable into my c program so I can write to c:\%homepath%\desktop? I would like to use something similar to:</p> <p><code>fd = fopen("C:\\%%homepath%%\\desktop\\helloworld.txt","w")</c...
[ { "answer_id": 76146, "author": "ljorquera", "author_id": 9132, "author_profile": "https://Stackoverflow.com/users/9132", "pm_score": 1, "selected": false, "text": "getenv(\"homepath\") getenv NULL sprintf char * homepath = getenv(\"homepath\");\n\nif(homepath == null) {\n /* variable...
2008/09/16
[ "https://Stackoverflow.com/questions/75937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13461/" ]
75,943
<p>I'm working on a web page where I'm making an AJAX call that returns a chunk of HTML like: </p> <pre><code>&lt;div&gt; &lt;!-- some html --&gt; &lt;script type="text/javascript"&gt; /** some javascript */ &lt;/script&gt; &lt;/div&gt; </code></pre> <p>I'm inserting the whole thing into the DOM, but the Ja...
[ { "answer_id": 76003, "author": "Scott Nichols", "author_id": 4299, "author_profile": "https://Stackoverflow.com/users/4299", "pm_score": 4, "selected": false, "text": "div.innerHTML = response;\nvar scripts = div.getElementsByTagName('script');\nfor (var ix = 0; ix < scripts.length; ix+...
2008/09/16
[ "https://Stackoverflow.com/questions/75943", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4243/" ]
75,976
<p>I've always been told that adding an element to an array happens like this:</p> <blockquote> <p>An empty copy of the array+1element is created and then the data from the original array is copied into it then the new data for the new element is then loaded</p> </blockquote> <p>If this is true, then using ...
[ { "answer_id": 76001, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 6, "selected": true, "text": "List<T>" }, { "answer_id": 76059, "author": "Alex Lyman", "author_id": 5897, "author_profile": "http...
2008/09/16
[ "https://Stackoverflow.com/questions/75976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/730/" ]
75,978
<p>In a .NET Win console application, I would like to access an App.config file in a location different from the console application binary. For example, how can C:\bin\Text.exe get its settings from C:\Test.exe.config?</p>
[ { "answer_id": 76067, "author": "Santiago Palladino", "author_id": 12791, "author_profile": "https://Stackoverflow.com/users/12791", "pm_score": 3, "selected": false, "text": "ConfigurationManager.OpenExeConfiguration(exePath)\n" }, { "answer_id": 76071, "author": "Michael Me...
2008/09/16
[ "https://Stackoverflow.com/questions/75978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2748/" ]
75,980
<p>When encoding a query string to be sent to a web server - when do you use <code>escape()</code> and when do you use <code>encodeURI()</code> or <code>encodeURIComponent()</code>:</p> <p>Use escape:</p> <pre><code>escape("% +&amp;="); </code></pre> <p>OR</p> <p>use encodeURI() / encodeURIComponent()</p> <pre><co...
[ { "answer_id": 3608791, "author": "Arne Evertsson", "author_id": 16686, "author_profile": "https://Stackoverflow.com/users/16686", "pm_score": 12, "selected": true, "text": "escape() %xx %uxxxx query = *( pchar / \"/\" / \"?\" )\npchar = unreserved / pct-encoded / sub-delim...
2008/09/16
[ "https://Stackoverflow.com/questions/75980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1341/" ]
76,065
<p>I know that with mysql you can write SQL statements into a .sql file and run the file from the mysql command line like this:</p> <pre><code>mysql&gt; source script.sql </code></pre> <p>How do I pass a variable to the script? For example, if I want to run a script that retrieves all the employees in a department, I...
[ { "answer_id": 76124, "author": "Brad Choate", "author_id": 553, "author_profile": "https://Stackoverflow.com/users/553", "pm_score": 6, "selected": true, "text": "set @department := 'Engineering';\n @department update employee set salary = salary + 10000 where department = @department;\...
2008/09/16
[ "https://Stackoverflow.com/questions/76065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13519/" ]
76,074
<p>I have a couple old services that I want to completely uninstall. How can I do this?</p>
[ { "answer_id": 76101, "author": "Mark Schill", "author_id": 9482, "author_profile": "https://Stackoverflow.com/users/9482", "pm_score": 6, "selected": false, "text": "regedit HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services" }, { "answer_id": 76127, "author": "Lasse V....
2008/09/16
[ "https://Stackoverflow.com/questions/76074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1204/" ]
76,076
<p>I am trying to solve numerically a set of partial differential equations in three dimensions. In each of the equations the next value of the unknown in a point depends on the current value of each unknown in the closest points.</p> <p>To write an efficient code I need to keep the points close in the three dimension...
[ { "answer_id": 83362, "author": "Nils Pipenbrinck", "author_id": 15955, "author_profile": "https://Stackoverflow.com/users/15955", "pm_score": 3, "selected": false, "text": "int morton3 (int a)\n{\n int result = 0;\n int i;\n for (i=0; i<11; i++)\n {\n // check if the i'th bit is...
2008/09/16
[ "https://Stackoverflow.com/questions/76076", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13405/" ]
76,079
<p>can anyone please suggest a <strong>good code example</strong> of vb.net/c# code to put the application in system tray when minized.</p>
[ { "answer_id": 76120, "author": "Phillip Wells", "author_id": 3012, "author_profile": "https://Stackoverflow.com/users/3012", "pm_score": 5, "selected": true, "text": " private void frm_main_Resize(object sender, EventArgs e)\n {\n if (this.WindowState == FormWindowState.Min...
2008/09/16
[ "https://Stackoverflow.com/questions/76079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13337/" ]
76,080
<p>We need to reliably get the Quick Launch folder for both All and Current users under both Vista and XP. I'm developing in C++, but this is probably more of a general Windows API question.</p> <p>For reference, here is code to get the Application Data folder under both systems:</p> <pre><code> HRESULT hres; ...
[ { "answer_id": 76323, "author": "Judah Gabriel Himango", "author_id": 536, "author_profile": "https://Stackoverflow.com/users/536", "pm_score": 1, "selected": false, "text": "GetSpecialFolderPath(APP_DATA) + \"\\\\Fonts\"" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/76080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10973/" ]
76,096
<p>I'm trying to keep dependencies to a minimum for a program I contribute to, it's a small text editor.</p> <p>GTK Textview doesn't seem to come with a built-in undo function. Is there any reference implementation I've been missing on so far? Is everyone writing their own undo function for their TextView widgets?</p>...
[ { "answer_id": 48927176, "author": "oxidworks", "author_id": 1907997, "author_profile": "https://Stackoverflow.com/users/1907997", "pm_score": 0, "selected": false, "text": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport gi\ngi.require_version('Gtk', '3.0')\nfrom gi.repository...
2008/09/16
[ "https://Stackoverflow.com/questions/76096", "https://Stackoverflow.com", "https://Stackoverflow.com/users/64673/" ]
76,134
<p>I have 4 2D points in screen-space, and I need to reverse-project them back into 3D space. I know that each of the 4 points is a corner of a 3D-rotated rigid rectangle, and I know the size of the rectangle. How can I get 3D coordinates from this?</p> <p>I am not using any particular API, and I do not have an existi...
[ { "answer_id": 78057, "author": "user14208", "author_id": 14208, "author_profile": "https://Stackoverflow.com/users/14208", "pm_score": 3, "selected": false, "text": "void YCamera :: CalculateWorldCoordinates(float x, float y, YVector3 *vec)\n{\n // START\n GLint viewport[4];\n ...
2008/09/16
[ "https://Stackoverflow.com/questions/76134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8409/" ]
76,194
<p>I seldom use inheritance, but when I do, I never use protected attributes because I think it breaks the encapsulation of the inherited classes.</p> <p>Do you use protected attributes ? what do you use them for ?</p>
[ { "answer_id": 87360, "author": "paercebal", "author_id": 14089, "author_profile": "https://Stackoverflow.com/users/14089", "pm_score": 2, "selected": false, "text": "[+] Base\n |\n +--[+] BaseMap\n | |\n | +--[+] Map\n | |\n | +--[+] HashMap\n |\n +--[+] // something else ?\n" ...
2008/09/16
[ "https://Stackoverflow.com/questions/76194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13501/" ]
76,204
<p>I am receiving a 3rd party feed of which I cannot be certain of the namespace so I am currently having to use the local-name() function in my XSLT to get the element values. However I need to get an attribute from one such element and I don't know how to do this when the namespaces are unknown (hence need for local-...
[ { "answer_id": 76497, "author": "Santiago Palladino", "author_id": 12791, "author_profile": "https://Stackoverflow.com/users/12791", "pm_score": 5, "selected": true, "text": "*[local-name()='category']/@*[local-name()='term']\n" }, { "answer_id": 76627, "author": "elarson", ...
2008/09/16
[ "https://Stackoverflow.com/questions/76204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/258/" ]
76,208
<p>Is there a good way to time SQL queries when using Linq to SQL? I really like logging feature, but it would be great if you could somehow also time that query. Any ideas?</p>
[ { "answer_id": 76262, "author": "Quintin Robinson", "author_id": 12707, "author_profile": "https://Stackoverflow.com/users/12707", "pm_score": 2, "selected": false, "text": "System.Diagnostics.Stopwatch Console.Out" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/76208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11063/" ]
76,223
<p>I am working on a project where the requirement is to have a date calculated as being the last Friday of a given month. I think I have a solution that only uses standard Java, but I was wondering if anyone knew of anything more concise or efficient. Below is what I tested with for this year:</p> <pre><code> for...
[ { "answer_id": 76389, "author": "Binil Thomas", "author_id": 3973, "author_profile": "https://Stackoverflow.com/users/3973", "pm_score": 1, "selected": false, "text": "public int getLastFriday(int month, int year) {\n Calendar cal = Calendar.getInstance();\n cal.set(year, month, 1,...
2008/09/16
[ "https://Stackoverflow.com/questions/76223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7008/" ]
76,227
<p>I'm teaching a kid programming, and am introducing some basic artificial intelligence concepts at the moment. To begin with we're going to implement a tic-tac-toe game that searches the entire game tree and as such plays perfectly. Once we finish that I want to apply the same concepts to a game that has too many pos...
[ { "answer_id": 500848, "author": "mdm", "author_id": 25318, "author_profile": "https://Stackoverflow.com/users/25318", "pm_score": 1, "selected": false, "text": "eval_score = 0\nfor all possible rows/lines/diagonals of length 4 on the board:\n if (#player_pieces = 0) // possible to co...
2008/09/16
[ "https://Stackoverflow.com/questions/76227", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12981/" ]
76,254
<p>Any advice on how to read auto-incrementing identity field assigned to newly created record from call through <code>java.sql.Statement.executeUpdate</code>?</p> <p>I know how to do this in SQL for several DB platforms, but would like to know what database independent interfaces exist in <code>java.sql</code> to do ...
[ { "answer_id": 76348, "author": "Daniel Spiewak", "author_id": 9815, "author_profile": "https://Stackoverflow.com/users/9815", "pm_score": 6, "selected": true, "text": "PreparedStatement stmt = conn.prepareStatement(sql, \n Statement.RETURN_GENERATED_KEYS)...
2008/09/16
[ "https://Stackoverflow.com/questions/76254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5446/" ]
76,274
<p>In Microsoft IL, to call a method on a value type you need an indirect reference. Lets say we have an ILGenerator named "il" and that currently we have a Nullable on top of the stack, if we want to check whether it has a value then we could emit the following:</p> <pre><code>var local = il.DeclareLocal(typeof(Nulla...
[ { "answer_id": 76320, "author": "Abe Heidebrecht", "author_id": 9268, "author_profile": "https://Stackoverflow.com/users/9268", "pm_score": 3, "selected": true, "text": "DynamicMethod method = new DynamicMethod(\"M\", typeof(bool), Type.EmptyTypes);\nILGenerator il = method.GetILGenerato...
2008/09/16
[ "https://Stackoverflow.com/questions/76274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13552/" ]
76,275
<p>I have multiple users running attachemate on a Windows 2003 server. I want to kill attachemate.exe started by user_1 without killing attachemate.exe started by user_2.</p> <p>I want to use VBScript.</p>
[ { "answer_id": 89397, "author": "unrealtrip", "author_id": 11130, "author_profile": "https://Stackoverflow.com/users/11130", "pm_score": 4, "selected": true, "text": "strComputer = \".\"\nstrOwner = \"A111111\"\nstrProcess = \"'notepad.exe'\"\n\n' Connect to WMI service and Win32_Process...
2008/09/16
[ "https://Stackoverflow.com/questions/76275", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9882/" ]
76,300
<p>In my SWT Java app I often want to return information from inside a Display.syncExec() call. The best way I've found so far to do this is:</p> <pre><code>final ArrayList&lt;Integer&gt; result = new ArrayList&lt;Integer&gt;(); GUI.display().syncExec(new Runnable(){ public void run() { MessageBox mb = /* ... */; ...
[ { "answer_id": 76431, "author": "Heath Borders", "author_id": 9636, "author_profile": "https://Stackoverflow.com/users/9636", "pm_score": 4, "selected": true, "text": "ArrayList List Collections.synchronizedList AtomicInteger AtomicReference final AtomicInteger resultAtomicInteger = new ...
2008/09/16
[ "https://Stackoverflow.com/questions/76300", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13581/" ]
76,314
<p>I'm trying to figure out what a Java applet's class file is doing under the hood. Opening it up with Notepad or Textpad just shows a bunch of gobbledy-gook.</p> <p>Is there any way to wrangle it back into a somewhat-readable format so I can try to figure out what it's doing?</p> <ul> <li>Environment == Windows w/ ...
[ { "answer_id": 76351, "author": "Drew Frezell", "author_id": 10954, "author_profile": "https://Stackoverflow.com/users/10954", "pm_score": 3, "selected": false, "text": "javap" }, { "answer_id": 76375, "author": "Michael Myers", "author_id": 13531, "author_profile": "...
2008/09/16
[ "https://Stackoverflow.com/questions/76314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2312/" ]
76,324
<p>I really want to get the google Calendar Api up an running. I found a <a href="http://www.ibm.com/developerworks/library/x-googleclndr/" rel="nofollow noreferrer">great article</a> about how to get started. I downloaded the Zend GData classes. I have php 5 running on my dev box and all the exetensions should be lo...
[ { "answer_id": 202809, "author": "Daniel Rucci", "author_id": 27604, "author_profile": "https://Stackoverflow.com/users/27604", "pm_score": 2, "selected": false, "text": "<?php echo phpinfo();?>\n [PHP_OPENSSL]\nextension=php_openssl.dll\n" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/76324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6244/" ]
76,325
<p>How do I move an active directory group to another organizational unit using Powershell?</p> <p>ie.</p> <p>I would like to move the group "IT Department" from:</p> <pre><code> (CN=IT Department, OU=Technology Department, OU=Departments,DC=Company,DC=ca) </code></pre> <p>to:</p> <pre><code> (CN=IT Department, ...
[ { "answer_id": 80253, "author": "Steven Murawski", "author_id": 1233, "author_profile": "https://Stackoverflow.com/users/1233", "pm_score": 2, "selected": false, "text": "$objectlocation= 'CN=IT Department, OU=Technology Department, OU=Departments,DC=Company,DC=ca'\n$newlocation = 'OU=Te...
2008/09/16
[ "https://Stackoverflow.com/questions/76325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/889/" ]
76,327
<p>I'm writing a Java application that runs on Linux (using Sun's JDK). It keeps creating <code>/tmp/hsperfdata_username</code> directories, which I would like to prevent. Is there any way to stop java from creating these files?</p>
[ { "answer_id": 76423, "author": "Kyle Renfro", "author_id": 8187, "author_profile": "https://Stackoverflow.com/users/8187", "pm_score": 6, "selected": true, "text": "-XX:+UsePerfData\n\n Enables the perfdata feature. This option is enabled by default\n to allow JVM monitoring and p...
2008/09/16
[ "https://Stackoverflow.com/questions/76327", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13582/" ]
76,328
<p>PHP5 has a "magic method" <code>__call()</code>that can be defined on any class that is invoked when an undefined method is called -- it is roughly equivalent to Ruby's <code>method_missing</code> or Perl's <code>AUTOLOAD</code>. Is it possible to do something like this in older versions of PHP?</p>
[ { "answer_id": 76399, "author": "Adam Wright", "author_id": 1200, "author_profile": "https://Stackoverflow.com/users/1200", "pm_score": 0, "selected": false, "text": "function __call($method_name, $parameters, &$return)\n{\n $return_value = \"You called ${method_name}!\";\n}\n" }, {...
2008/09/16
[ "https://Stackoverflow.com/questions/76328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13195/" ]
76,334
<p>Does anyone know a mechanism to calculate at compile-time the LCM (Least Common Multiple) and/or GCD (Greatest Common Denominator) of at least two number in <strong>C</strong> (<strong>not C++</strong>, I know that template magic is available there)?</p> <p>I generally use <strong>GCC</strong> and recall that it ca...
[ { "answer_id": 76746, "author": "Kevin", "author_id": 6386, "author_profile": "https://Stackoverflow.com/users/6386", "pm_score": 3, "selected": false, "text": "#define GCD(a,b) ((a>=b)*GCD_1(a,b)+(a<b)*GCD_1(b,a))\n#define GCD_1(a,b) ((((!(b)))*(a)) + (!!(b))*GCD_2((b), (a)%((b)+!(b))))...
2008/09/16
[ "https://Stackoverflow.com/questions/76334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12713/" ]
76,346
<p>I just got surprised by something in TSQL. I thought that if xact_abort was on, calling something like</p> <pre><code>raiserror('Something bad happened', 16, 1); </code></pre> <p>would stop execution of the stored procedure (or any batch).</p> <p>But my ADO.NET error message just proved the opposite. I got both...
[ { "answer_id": 76416, "author": "Philip Rieck", "author_id": 12643, "author_profile": "https://Stackoverflow.com/users/12643", "pm_score": 6, "selected": false, "text": "RAISERROR 16" }, { "answer_id": 77140, "author": "ninegrid", "author_id": 13661, "author_profile":...
2008/09/16
[ "https://Stackoverflow.com/questions/76346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1219/" ]
76,349
<p>I have VS2005 and I am currently trying to debug an ASP.net web application. I want to change some code around in the code behind file, but every time I stop at a break point and try to edit something I get the following error message: "Changes are not allowed when the debugger has been attached to an already runnin...
[ { "answer_id": 76414, "author": "Jarrett Meyer", "author_id": 5834, "author_profile": "https://Stackoverflow.com/users/5834", "pm_score": 1, "selected": false, "text": "*.aspx *.cs/*.vb *.designer.cs/*.designer.vb" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/76349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13556/" ]
76,359
<p>Does ADOdb do data sanitation or escaping within the same functionality by default? Or am I just confusing it with Code Igniter's built-in processes?</p> <p>Does binding variables to parameters in ADOdb for PHP prevent SQL injection in any way? </p>
[ { "answer_id": 76528, "author": "Brendon-Van-Heyzen", "author_id": 1425, "author_profile": "https://Stackoverflow.com/users/1425", "pm_score": 2, "selected": false, "text": "$rs = $db->Execute('select * from table where val=?', array('10'));\n" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/76359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13320/" ]
76,411
<p>How can I create a regular expression that will grab delimited text from a string? For example, given a string like </p> <pre><code>text ###token1### text text ###token2### text text </code></pre> <p>I want a regex that will pull out <code>###token1###</code>. Yes, I do want the delimiter as well. By adding an...
[ { "answer_id": 76427, "author": "David Beleznay", "author_id": 13359, "author_profile": "https://Stackoverflow.com/users/13359", "pm_score": 3, "selected": true, "text": "/###(.+?)###/\n /(###.+?###)/\n '###token1### text text ###token2###'" }, { "answer_id": 76445, "author":...
2008/09/16
[ "https://Stackoverflow.com/questions/76411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/410/" ]
76,412
<p>When developing WPF UserControls, what is the best way to expose a DependencyProperty of a child control as a DependencyProperty of the UserControl? The following example shows how I would currently expose the Text property of a TextBox inside a UserControl. Surely there is a better / simpler way to accomplish this...
[ { "answer_id": 77094, "author": "user7116", "author_id": 7116, "author_profile": "https://Stackoverflow.com/users/7116", "pm_score": 5, "selected": true, "text": "<UserControl x:Class=\"WpfApplication3.UserControl1\" x:Name=\"UserControl1\"\n xmlns=\"http://schemas.microsoft.com/winfx...
2008/09/16
[ "https://Stackoverflow.com/questions/76412", "https://Stackoverflow.com", "https://Stackoverflow.com/users/317/" ]
76,424
<p>XmlElement.Attributes.Remove* methods are working fine for arbitrary attributes resulting in the removed attributes being removed from XmlDocument.OuterXml property. Xmlns attribute however is different. Here is an example:</p> <pre><code>XmlDocument doc = new XmlDocument(); doc.InnerXml = @"&lt;Element1 attr1=""va...
[ { "answer_id": 77502, "author": "Vin", "author_id": 1747, "author_profile": "https://Stackoverflow.com/users/1747", "pm_score": 2, "selected": false, "text": "XmlNamespaceManager mgr = new XmlNamespaceManager(\"xmlnametable\");\nmgr.RemoveNamespace(\"prefix\", \"uri\");\n" }, { "...
2008/09/16
[ "https://Stackoverflow.com/questions/76424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/578/" ]
76,455
<p>In C#.NET I am trying to programmatically change the color of the border in a group box.</p> <p>Update: This question was asked when I was working on a winforms system before we switched to .NET.</p>
[ { "answer_id": 5629954, "author": "swajak", "author_id": 100258, "author_profile": "https://Stackoverflow.com/users/100258", "pm_score": 1, "selected": false, "text": "GroupBox box = new GroupBox();\n[...]\nbox.Paint += delegate(object o, PaintEventArgs p)\n{\n p.Graphics.Clear(someCo...
2008/09/16
[ "https://Stackoverflow.com/questions/76455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/300930/" ]