qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
48,397
<p>Is there a redistributable .Net 3.5 installation package that is a silent installer? </p> <p>Or alternatively, is there a switch that can be passed to the main redistributable .Net 3.5 installer to make it silent?</p>
[ { "answer_id": 59395072, "author": "Jean Fiedler", "author_id": 7761893, "author_profile": "https://Stackoverflow.com/users/7761893", "pm_score": -1, "selected": false, "text": "DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:\"Path\\To\\microsoft-windows-netfx...
2008/09/07
[ "https://Stackoverflow.com/questions/48397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3153/" ]
48,426
<p>My gcc build toolchain produces a .map file. How do I display the memory map graphically?</p>
[ { "answer_id": 112078, "author": "Frank Krueger", "author_id": 338, "author_profile": "https://Stackoverflow.com/users/338", "pm_score": 6, "selected": true, "text": "sections" }, { "answer_id": 35893722, "author": "Sredni", "author_id": 1761205, "author_profile": "ht...
2008/09/07
[ "https://Stackoverflow.com/questions/48426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/445087/" ]
48,432
<p>Being relatively new to the .net game, I was wondering, has anyone had any experience of the pros / cons between the use of LINQ and what could be considered more traditional methods working with lists / collections? </p> <p>For a specific example of a project I'm working on : a list of unique id / name pairs are ...
[ { "answer_id": 48545, "author": "John Boker", "author_id": 2847, "author_profile": "https://Stackoverflow.com/users/2847", "pm_score": 3, "selected": true, "text": "public string branchName (string branchId) \n{\n //branchList populated in the constructor\n branch_summary bs = (fro...
2008/09/07
[ "https://Stackoverflow.com/questions/48432", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4396/" ]
48,442
<p>Anyone have a good rule of thumb for choosing between different implementations of Java Collection interfaces like List, Map, or Set?</p> <p>For example, generally why or in what cases would I prefer to use a Vector or an ArrayList, a Hashtable or a HashMap?</p>
[ { "answer_id": 48525, "author": "Jason Cohen", "author_id": 4926, "author_profile": "https://Stackoverflow.com/users/4926", "pm_score": 4, "selected": false, "text": "ArrayList" }, { "answer_id": 59806362, "author": "Basil Bourque", "author_id": 642706, "author_profil...
2008/09/07
[ "https://Stackoverflow.com/questions/48442", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1294/" ]
48,446
<p>How do you schedule a Windows Mobile application to periodically start up to perform some background processing. For example, assume I'm writing an email client and want to check for email every hour, regardless of whether my app is running at the time.</p> <p>The app is a native C/C++ app on Windows Mobile 5.0 or...
[ { "answer_id": 48466, "author": "quick_dry", "author_id": 3716, "author_profile": "https://Stackoverflow.com/users/3716", "pm_score": 3, "selected": true, "text": "CeRunAppAtTime( appname, time )" } ]
2008/09/07
[ "https://Stackoverflow.com/questions/48446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2716/" ]
48,458
<p>I started an application in Google App Engine right when it came out, to play with the technology and work on a pet project that I had been thinking about for a long time but never gotten around to starting. The result is <a href="http://www.bowlsk.com" rel="noreferrer">BowlSK</a>. However, as it has grown, and fe...
[ { "answer_id": 70271, "author": "fuentesjr", "author_id": 10708, "author_profile": "https://Stackoverflow.com/users/10708", "pm_score": 8, "selected": true, "text": "import wsgiref.handlers\n\nfrom google.appengine.ext import webapp\nfrom myapp.views import *\n\napplication = webapp.WSGI...
2008/09/07
[ "https://Stackoverflow.com/questions/48458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/96/" ]
48,470
<p>Whenever I use a macro in Visual Studio I get an annoying tip balloon in the system tray and an accompanying "pop" sound. It says:</p> <blockquote> <p>Visual Studio .NET macros</p> <p>To stop the macro from running, double-click the spinning cassette.<br> Click here to not show this balloon again.</p> </bl...
[ { "answer_id": 48478, "author": "Owen", "author_id": 4790, "author_profile": "https://Stackoverflow.com/users/4790", "pm_score": 2, "selected": false, "text": "System.Threading.Thread.Sleep(2000)\n" }, { "answer_id": 296494, "author": "Community", "author_id": -1, "au...
2008/09/07
[ "https://Stackoverflow.com/questions/48470", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4790/" ]
48,474
<p>I'm a beginner at rails programming, attempting to show many images on a page. Some images are to lay on top of others. To make it simple, say I want a blue square, with a red square in the upper right corner of the blue square (but not tight in the corner). I am trying to avoid compositing (with ImageMagick and ...
[ { "answer_id": 48484, "author": "Espo", "author_id": 2257, "author_profile": "https://Stackoverflow.com/users/2257", "pm_score": 6, "selected": false, "text": "img {\n position: absolute;\n top: 25px;\n left: 25px;\n}\n.imgA1 {\n z-index: 1;\n}\n.imgB1 {\n z-index: 3;\n}" }, { ...
2008/09/07
[ "https://Stackoverflow.com/questions/48474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5038/" ]
48,475
<p>How would you design a database to support the following tagging features:</p> <ul> <li>items can have a large number of tags</li> <li>searches for all items that are tagged with a given set of tags must be quick (the items must have ALL tags, so it's an AND-search, not an OR-search)</li> <li>creating/writing items...
[ { "answer_id": 48480, "author": "Slartibartfast", "author_id": 4433, "author_profile": "https://Stackoverflow.com/users/4433", "pm_score": 4, "selected": false, "text": "SELECT * FROM items WHERE id IN \n (SELECT DISTINCT item_id FROM item_tag WHERE \n tag_id = tag1 OR tag_id = t...
2008/09/07
[ "https://Stackoverflow.com/questions/48475", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5035/" ]
48,491
<p>I have two machines, speed and mass. speed has a fast Internet connection and is running a crawler which downloads a lot of files to disk. mass has a lot of disk space. I want to move the files from speed to mass after they're done downloading. Ideally, I'd just run:</p> <pre><code>$ rsync --remove-source-files spe...
[ { "answer_id": 48517, "author": "Jason Cohen", "author_id": 4926, "author_profile": "https://Stackoverflow.com/users/4926", "pm_score": 3, "selected": false, "text": "mass" }, { "answer_id": 48628, "author": "Grey Panther", "author_id": 1265, "author_profile": "https:...
2008/09/07
[ "https://Stackoverflow.com/questions/48491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4300/" ]
48,497
<p>The following XHTML code is not working:</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; ...
[ { "answer_id": 48554, "author": "Brian Gianforcaro", "author_id": 3415, "author_profile": "https://Stackoverflow.com/users/3415", "pm_score": 1, "selected": false, "text": "<script type=\"text/javascript\" src=\"/dojotoolkit/dojo/dojo.js\" djConfig=\"parseOnLoad: true\"/>\n" } ]
2008/09/07
[ "https://Stackoverflow.com/questions/48497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4875/" ]
48,505
<p>Does anyone know of a similar product to Citrix Server that'll run on the Mac OS?</p> <p>Essentially, I'm looking to allow multiple remote users to log in to the same OSX Server at the same time (with full visual desktop, not SSH).</p>
[ { "answer_id": 48729, "author": "ceejayoz", "author_id": 1902010, "author_profile": "https://Stackoverflow.com/users/1902010", "pm_score": 2, "selected": true, "text": "@Soeren Kuklau" } ]
2008/09/07
[ "https://Stackoverflow.com/questions/48505", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1902010/" ]
48,521
<p>I would like to use a component that exposes the datasource property, but instead of supplying the datasource with whole list of objects, I would like to use only simple object. Is there any way to do this ?</p> <p>The mentioned component is DevExpress.XtraDataLayout.DataLayoutControl - this is fairly irrelevant to...
[ { "answer_id": 48522, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 4, "selected": true, "text": "DataBindObject.DataSource = new List<YourObject>().Add(YourObjectInstance);\n" }, { "answer_id": 48523, "author": ...
2008/09/07
[ "https://Stackoverflow.com/questions/48521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4694/" ]
48,526
<p>I've been looking into different web statistics programs for my site, and one promising one is <a href="http://www.hping.org/visitors/" rel="nofollow noreferrer">Visitors</a>. Unfortunately, it's a C program and I don't know how to call it from the web server. I've tried using PHP's <a href="http://us.php.net/manual...
[ { "answer_id": 48721, "author": "Kyle Cronin", "author_id": 658, "author_profile": "https://Stackoverflow.com/users/658", "pm_score": 1, "selected": true, "text": "#!/bin/sh\n\nprintf \"Content-type: text/html\\n\\n\"\nexec visitors -A /home/logs/access_log\n" } ]
2008/09/07
[ "https://Stackoverflow.com/questions/48526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/658/" ]
48,550
<p>I am trying to publish an Asp.net MVC web application locally using the NAnt and MSBuild. This is what I am using for my NAnt target;</p> <pre><code>&lt;target name="publish-artifacts-to-build"&gt; &lt;msbuild project="my-solution.sln" target="Publish"&gt; &lt;property name="Configuration" value="debug" /...
[ { "answer_id": 6762142, "author": "Alexander Beletsky", "author_id": 386751, "author_profile": "https://Stackoverflow.com/users/386751", "pm_score": 4, "selected": false, "text": "msbuild /t:ResolveReferences;_WPPCopyWebApplication /p:BuildingProject=true;OutDir=C:\\Temp\\buidl\\ Test.cs...
2008/09/07
[ "https://Stackoverflow.com/questions/48550", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4642/" ]
48,555
<p>I have a few sites on a shared host that is running Apache 2. I would like to compress the HTML, CSS and Javascript that is delivered to the browser. The host has disabled mod_deflate and mod_gzip, so these options are out. I do have PHP 5 at my disposal, though, so I could use the gzip component of that.</p> <p>I ...
[ { "answer_id": 48583, "author": "macbirdie", "author_id": 5049, "author_profile": "https://Stackoverflow.com/users/5049", "pm_score": 1, "selected": false, "text": "$_SERVER['QUERY_STRING']" }, { "answer_id": 48592, "author": "Sören Kuklau", "author_id": 1600, "author...
2008/09/07
[ "https://Stackoverflow.com/questions/48555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1944/" ]
48,562
<p>I was wondering if anyone here had some experience writing this type of script and if they could give me some pointers.</p> <p>I would like to modify this <a href="http://wordaligned.org/articles/a-subversion-pre-commit-hook" rel="nofollow noreferrer">script</a> to validate that the check-in file does not have a Ca...
[ { "answer_id": 50507, "author": "Stephen Johnson", "author_id": 5063, "author_profile": "https://Stackoverflow.com/users/5063", "pm_score": 3, "selected": true, "text": "svn:eol-style" } ]
2008/09/07
[ "https://Stackoverflow.com/questions/48562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5060/" ]
48,567
<p>I wrote a simple Windows Forms program in C#. I want to be able to input a windows user name and password and when I click a login button to run code run as the user I've entered as input.</p>
[ { "answer_id": 48571, "author": "Espo", "author_id": 2257, "author_profile": "https://Stackoverflow.com/users/2257", "pm_score": 3, "selected": true, "text": "// This sample demonstrates the use of the WindowsIdentity class to impersonate a user.\n// IMPORTANT NOTES:\n// This sample can ...
2008/09/07
[ "https://Stackoverflow.com/questions/48567", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1360/" ]
48,570
<p>I would like to implement something similar to a c# delegate method in PHP. A quick word to explain what I'm trying to do overall: I am trying to implement some asynchronous functionality. Basically, some resource-intensive calls that get queued, cached and dispatched when the underlying system gets around to it. ...
[ { "answer_id": 48585, "author": "Nick Stinemates", "author_id": 4960, "author_profile": "https://Stackoverflow.com/users/4960", "pm_score": 2, "selected": false, "text": "// This function uses a callback function. \nfunction doIt($callback) \n{ \n $data = \"this is my data\";\n $ca...
2008/09/07
[ "https://Stackoverflow.com/questions/48570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5056/" ]
48,578
<p>Not entirely sure what's going on here; any help would be appreciated.</p> <p>I'm trying to create a new .NET MVC web app. I was pretty sure I had it set up correctly, but I'm getting the following error:</p> <pre><code>The type 'System.Web.Mvc.ViewPage' is ambiguous: it could come from assembly 'C:\MyProject\bin...
[ { "answer_id": 48589, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 1, "selected": false, "text": " Inherits=\"System.Web.Mvc.ViewPage\"\n" }, { "answer_id": 48594, "author": "Dale Ragan", "author_id": 1117, ...
2008/09/07
[ "https://Stackoverflow.com/questions/48578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1540/" ]
48,605
<p>Almost every Java book I read talks about using the interface as a way to share state and behaviour between objects that when first "constructed" did not seem to share a relationship. </p> <p>However, whenever I see architects design an application, the first thing they do is start programming to an interface. How ...
[ { "answer_id": 48611, "author": "Brian Warshaw", "author_id": 1344, "author_profile": "https://Stackoverflow.com/users/1344", "pm_score": 6, "selected": true, "text": "IPoweredByMotor" }, { "answer_id": 48624, "author": "Eugene Yokota", "author_id": 3827, "author_prof...
2008/09/07
[ "https://Stackoverflow.com/questions/48605", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
48,616
<p>How do I set a property of a user control in <code>ListView</code>'s <code>LayoutTemplate</code> from the code-behind?</p> <pre><code>&lt;asp:ListView ...&gt; &lt;LayoutTemplate&gt; &lt;myprefix:MyControl id="myControl" ... /&gt; &lt;/LayoutTemplate&gt; ... &lt;/asp:ListView&gt; </code></pre> <p>I want to do this:...
[ { "answer_id": 48636, "author": "chakrit", "author_id": 3055, "author_profile": "https://Stackoverflow.com/users/3055", "pm_score": 1, "selected": false, "text": "var control = (MyControl)Item.FindControl(\"yourControlId\");\n" }, { "answer_id": 1315742, "author": "Community"...
2008/09/07
[ "https://Stackoverflow.com/questions/48616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31505/" ]
48,642
<p>I want to write a command that specifies "the word under the cursor" in VIM. For instance, let's say I have the cursor on a word and I make it appear twice. For instance, if the word is "abc" and I want "abcabc" then I could type: </p> <pre><code>:s/\(abc\)/\1\1/ </code></pre> <p>But then I'd like to be able to...
[ { "answer_id": 48657, "author": "hazzen", "author_id": 5066, "author_profile": "https://Stackoverflow.com/users/5066", "pm_score": 7, "selected": true, "text": "<cword>" }, { "answer_id": 76316, "author": "Community", "author_id": -1, "author_profile": "https://Stacko...
2008/09/07
[ "https://Stackoverflow.com/questions/48642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1084/" ]
48,647
<p>I came across <a href="http://www.ddj.com/cpp/184403758" rel="noreferrer">this article</a> written by Andrei Alexandrescu and Petru Marginean many years ago, which presents and discusses a utility class called ScopeGuard for writing exception-safe code. I'd like to know if coding with these objects truly leads to be...
[ { "answer_id": 48663, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 7, "selected": true, "text": "catch" }, { "answer_id": 48786, "author": "1800 INFORMATION", "author_id": 3146, "author_profile": ...
2008/09/07
[ "https://Stackoverflow.com/questions/48647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4928/" ]
48,668
<p>I've seen lots of descriptions how anonymous types work, but I'm not sure how they're really useful. What are some scenarios that anonymous types can be used to address in a well-designed program?</p>
[ { "answer_id": 48677, "author": "George Mauer", "author_id": 5056, "author_profile": "https://Stackoverflow.com/users/5056", "pm_score": 3, "selected": false, "text": "var pl = new List<Object>();\nforeach(var p in Process.GetProcesses())\n pl.Add(new {p.Id, p.ProcessName, Memory=p.Work...
2008/09/07
[ "https://Stackoverflow.com/questions/48668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
48,669
<p>I receive HTML pages from our creative team, and then use those to build aspx pages. One challenge I frequently face is getting the HTML I spit out to match theirs exactly. I almost always end up screwing up the nesting of <code>&lt;div&gt;</code>s between my page and the master pages.</p> <p>Does anyone know of a...
[ { "answer_id": 49348, "author": "Peter Hilton", "author_id": 2670, "author_profile": "https://Stackoverflow.com/users/2670", "pm_score": 3, "selected": false, "text": "tidy -asxml index.html\n" } ]
2008/09/07
[ "https://Stackoverflow.com/questions/48669", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2757/" ]
48,679
<p>Anybody know of a way to copy a file from path A to path B and suppressing the Windows file system cache?<br> Typical use is copying a large file from a USB drive, or server to your local machine. Windows seems to swap everything out if the file is really big, e.g. 2GiB. Prefer example in C#, but I'm guessing this w...
[ { "answer_id": 6198881, "author": "nietras", "author_id": 98692, "author_profile": "https://Stackoverflow.com/users/98692", "pm_score": 3, "selected": false, "text": " public static byte[] ReadAllBytesUnbuffered(string filePath)\n {\n const FileOptions FileFlagNoBuffering = ...
2008/09/07
[ "https://Stackoverflow.com/questions/48679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5080/" ]
48,680
<p>Say I have a <code>Textbox</code> nested within a <code>TabControl</code>. </p> <p>When the form loads, I would like to focus on that <code>Textbox</code> (by default the focus is set to the <code>TabControl</code>).</p> <p>Simply calling <code>textbox1.focus()</code> in the <code>Load</code> event of the form do...
[ { "answer_id": 48719, "author": "samjudson", "author_id": 1908, "author_profile": "https://Stackoverflow.com/users/1908", "pm_score": 7, "selected": true, "text": "private void frmMainLoad(object sender, EventArgs e)\n{\n ActiveControl = textBox1;\n}\n" }, { "answer_id": 63485...
2008/09/07
[ "https://Stackoverflow.com/questions/48680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1736/" ]
48,744
<h2>How do you find the phone numbers in 50,000 HTML pages?<br><br></h2> <blockquote> <h3>Jeff Attwood posted 5 Questions for programmers applying for jobs:</h3> <p>In an effort to make life simpler for phone screeners, I've put together this list of Five Essential Questions that you need to ask during an S...
[ { "answer_id": 48767, "author": "Ande Turner", "author_id": 4857, "author_profile": "https://Stackoverflow.com/users/4857", "pm_score": 1, "selected": false, "text": "#!/usr/bin/perl\nwhile (<*.html>) {\n my $filename = $_;\n my @data = <$filename>;\n\n # Loop once through w...
2008/09/07
[ "https://Stackoverflow.com/questions/48744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4857/" ]
48,772
<p>I have never "hand-coded" object creation code for SQL Server and foreign key decleration is seemingly different between SQL Server and Postgres. Here is my sql so far:</p> <pre><code>drop table exams; drop table question_bank; drop table anwser_bank; create table exams ( exam_id uniqueidentifier primary key, ...
[ { "answer_id": 48778, "author": "John Boker", "author_id": 2847, "author_profile": "https://Stackoverflow.com/users/2847", "pm_score": 9, "selected": true, "text": "create table question_bank\n(\n question_id uniqueidentifier primary key,\n question_exam_id uniqueidentifier not nul...
2008/09/07
[ "https://Stackoverflow.com/questions/48772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1638/" ]
48,773
<p>I've created a custom exception for a very specific problem that can go wrong. I receive data from another system, and I raise the exception if it bombs while trying to parse that data. In my custom exception, I added a field called "ResponseData", so I can track exactly what my code couldn't handle.</p> <p>In cust...
[ { "answer_id": 48792, "author": "Sören Kuklau", "author_id": 1600, "author_profile": "https://Stackoverflow.com/users/1600", "pm_score": 4, "selected": true, "text": ".Message" }, { "answer_id": 155606, "author": "Atif Aziz", "author_id": 6682, "author_profile": "http...
2008/09/07
[ "https://Stackoverflow.com/questions/48773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
48,774
<p>What's the "right" way to do the following as a boolean expression?</p> <pre><code>for i in `ls $1/resources`; do if [ $i != "database.db" ] then if [ $i != "tiles" ] then if [ $i != "map.pdf" ] then if [ $i != "map.png" ] then ...
[ { "answer_id": 48787, "author": "frizz", "author_id": 1003, "author_profile": "https://Stackoverflow.com/users/1003", "pm_score": 1, "selected": false, "text": "for i in `ls $1/resources`; do\n if [ $i != \"database.db\" ] && [ $i != \"tiles\" ] && [ $i != \"map.pdf\" ] && [ $i != \"m...
2008/09/07
[ "https://Stackoverflow.com/questions/48774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/79/" ]
48,794
<p>Here is a scenario: Let's say I have site with two controllers responsible for displaying different type of content - Pages and Articles. I need to embed Partial View into my masterpage that will list pages and articles filtered with some criteria, and be displayed on each page. I cannot set Model on my masterpage (...
[ { "answer_id": 919625, "author": "user113588", "author_id": 113588, "author_profile": "https://Stackoverflow.com/users/113588", "pm_score": 2, "selected": false, "text": " public static void RenderPartialAction<TController>(this HtmlHelper helper, Func<TController, PartialViewResult> act...
2008/09/07
[ "https://Stackoverflow.com/questions/48794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/481/" ]
48,805
<p>Some e-Marketing tools claim to choose which web page to display based on where you were before. That is, if you've been browsing truck sites and then go to Ford.com, your first page would be of the Ford Explorer.</p> <p>I know you can get the immediate preceding page with HTTP_REFERRER, but how do you know where t...
[ { "answer_id": 5494272, "author": "heymatthew", "author_id": 81271, "author_profile": "https://Stackoverflow.com/users/81271", "pm_score": 3, "selected": false, "text": "document.referrer" } ]
2008/09/07
[ "https://Stackoverflow.com/questions/48805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2757/" ]
48,872
<p>In <a href="https://web.archive.org/web/20141127115939/https://blogs.msmvps.com/kathleen/2008/09/05/in-praise-of-nested-classes/" rel="noreferrer">Kathleen Dollard's 2008 blog post</a>, she presents an interesting reason to use nested classes in .net. However, she also mentions that FxCop doesn't like nested classes...
[ { "answer_id": 48879, "author": "hazzen", "author_id": 5066, "author_profile": "https://Stackoverflow.com/users/5066", "pm_score": 8, "selected": true, "text": "public class SortedMap {\n private class TreeNode {\n TreeNode left;\n TreeNode right;\n }\n}\n" }, { ...
2008/09/07
[ "https://Stackoverflow.com/questions/48872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/100/" ]
48,884
<p>What Python libraries do folks use for querying Amazon product data? (Amazon Associates Web Service - used to be called E-Commerce API, or something along those lines).</p> <p>Based on my research, <a href="http://pyaws.sourceforge.net/" rel="noreferrer">PyAWS</a> seems okay, but still pretty raw (and hasn't been u...
[ { "answer_id": 4251893, "author": "tobych", "author_id": 76452, "author_profile": "https://Stackoverflow.com/users/76452", "pm_score": 5, "selected": false, "text": "ACCESS_KEY_ID = \"...\"\nSECRET_KEY = \"...\"\nASSOC_TAG = \"...\"\n\nimport bottlenose\namazon = bottlenose.Amazon(ACCESS...
2008/09/07
[ "https://Stackoverflow.com/questions/48884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2678/" ]
48,908
<p>I am a bit confused about socket programming in C.</p> <p>You create a socket, bind it to an interface and an IP address and get it to listen. I found a couple of web resources on that, and understood it fine. In particular, I found an article <s><a href="http://users.actcom.co.il/~choo/lupg/tutorials/internetworki...
[ { "answer_id": 48929, "author": "dfjacobs", "author_id": 4848, "author_profile": "https://Stackoverflow.com/users/4848", "pm_score": 5, "selected": true, "text": "/* buffer points to memory block that is bigger than the number of bytes to be read */\n/* socket is open socket that is conn...
2008/09/08
[ "https://Stackoverflow.com/questions/48908", "https://Stackoverflow.com", "https://Stackoverflow.com/users/277/" ]
48,916
<p>I want a splash screen to show while the application is loading. I have a form with a system tray control tied to it. I want the splash screen to display while this form loads, which takes a bit of time since it's accessing a web service API to populate some drop-downs. I also want to do some basic testing for depen...
[ { "answer_id": 48944, "author": "McKenzieG1", "author_id": 3776, "author_profile": "https://Stackoverflow.com/users/3776", "pm_score": 3, "selected": false, "text": "<STAThread()> Public Shared Sub Main()\n\n splash = New frmSplash\n splash.Show()\n\n ' Your startup code goes he...
2008/09/08
[ "https://Stackoverflow.com/questions/48916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4246/" ]
48,919
<p>What is the JavaScript to scroll to the top when a button/link/etc. is clicked?</p>
[ { "answer_id": 48925, "author": "John Boker", "author_id": 2847, "author_profile": "https://Stackoverflow.com/users/2847", "pm_score": 4, "selected": true, "text": "<a href=\"javascript:scroll(0, 0)\">Top</a>\n" }, { "answer_id": 48939, "author": "Rob Rolnick", "author_id...
2008/09/08
[ "https://Stackoverflow.com/questions/48919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2469/" ]
48,931
<p>I used jQuery to set hover callbacks for elements on my page. I'm now writing a module which needs to temporarily set new hover behaviour for some elements. The new module has no access to the original code for the hover functions.</p> <p>I want to store the old hover functions before I set new ones so I can restor...
[ { "answer_id": 49126, "author": "Shadow2531", "author_id": 1697, "author_profile": "https://Stackoverflow.com/users/1697", "pm_score": 1, "selected": false, "text": "\n<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <title>Jquery - Get, change a...
2008/09/08
[ "https://Stackoverflow.com/questions/48931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5114/" ]
48,933
<p>Does anybody know of a way to list up the "loaded plugins" in <strong>Vim</strong>? I know I should be keeping track of this kind of stuff myself but it would always be nice to be able to check the current status.</p>
[ { "answer_id": 48952, "author": "Rob Rolnick", "author_id": 4798, "author_profile": "https://Stackoverflow.com/users/4798", "pm_score": 10, "selected": true, "text": "\" where was an option set \n:scriptnames : list all plugins, _vimrcs loaded (super) \n:verbose set history?...
2008/09/08
[ "https://Stackoverflow.com/questions/48933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4037/" ]
48,934
<p>I copied some Delphi code from one project to another, and found that it doesn't compile in the new project, though it did in the old one. The code looks something like this:</p> <pre><code>procedure TForm1.CalculateGP(..) const Price : money = 0; begin ... Price := 1.0; ... end; </code></pre> <p>So in...
[ { "answer_id": 48938, "author": "Ray", "author_id": 233, "author_profile": "https://Stackoverflow.com/users/233", "pm_score": 6, "selected": true, "text": "{$J+}" }, { "answer_id": 100061, "author": "PatrickvL", "author_id": 12170, "author_profile": "https://Stackover...
2008/09/08
[ "https://Stackoverflow.com/questions/48934", "https://Stackoverflow.com", "https://Stackoverflow.com/users/369/" ]
48,935
<p>I'm building an application in C# using WPF. How can I bind to some keys?</p> <p>Also, how can I bind to the <a href="http://en.wikipedia.org/wiki/Windows_key" rel="noreferrer">Windows key</a>?</p>
[ { "answer_id": 49102, "author": "Andy", "author_id": 3857, "author_profile": "https://Stackoverflow.com/users/3857", "pm_score": 0, "selected": false, "text": "RegisterHotKey()" }, { "answer_id": 49171, "author": "Gishu", "author_id": 1695, "author_profile": "https://...
2008/09/08
[ "https://Stackoverflow.com/questions/48935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146637/" ]
48,947
<p>How are callbacks written in PHP?</p>
[ { "answer_id": 48948, "author": "Nick Stinemates", "author_id": 4960, "author_profile": "https://Stackoverflow.com/users/4960", "pm_score": 5, "selected": false, "text": "// This function uses a callback function. \nfunction doIt($callback) \n{ \n $data = \"this is my data\";\n $ca...
2008/09/08
[ "https://Stackoverflow.com/questions/48947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4960/" ]
48,984
<p>We're using WatiN for testing our UI, but one page (which is unfortunately not under our teams control) takes forever to finish loading. Is there a way to get WatiN to click a link on the page before the page finishes rendering completely?</p>
[ { "answer_id": 49136, "author": "Glenn Slaven", "author_id": 2975, "author_profile": "https://Stackoverflow.com/users/2975", "pm_score": 5, "selected": true, "text": "IE browser = new IE(....);\nbrowser.Button(\"SlowPageLoadingButton\").ClickNoWait();\nLink continueLink = browser.Link(Fi...
2008/09/08
[ "https://Stackoverflow.com/questions/48984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2975/" ]
48,993
<p>I am wondering if anyone has any experience using a JQuery plugin that converts a html </p> <pre><code>&lt;select&gt; &lt;option&gt; Blah &lt;/option&gt; &lt;/select&gt; </code></pre> <p>combo box into something (probably a div) where selecting an item acts the same as clicking a link.</p> <p>I guess you coul...
[ { "answer_id": 49027, "author": "Matt Mitchell", "author_id": 364, "author_profile": "https://Stackoverflow.com/users/364", "pm_score": 0, "selected": false, "text": "onchange=\"if(this.options[this.selectedIndex].value!=''){this.form.submit()}\"\n" }, { "answer_id": 49419, "...
2008/09/08
[ "https://Stackoverflow.com/questions/48993", "https://Stackoverflow.com", "https://Stackoverflow.com/users/364/" ]
48,999
<p>The problem I'm trying to solve is "What's at this position?"</p> <p>It's fairly trivial to get the x/y position (offset) of a DIV, but what about the reverse? How do I get the id of a DIV (or any element) given an x/y position?</p>
[ { "answer_id": 49936, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "function getDivByXY(x,y) {\n var alldivs = document.getElementsByTagName('div');\n\n for(var d = 0; d < alldivs.length; d++...
2008/09/08
[ "https://Stackoverflow.com/questions/48999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5123/" ]
49,002
<p>Why prefer composition over inheritance? What trade-offs are there for each approach? When should you choose inheritance over composition?</p>
[ { "answer_id": 891820, "author": "aleemb", "author_id": 50475, "author_profile": "https://Stackoverflow.com/users/50475", "pm_score": 8, "selected": false, "text": "class Person {\n String Title;\n String Name;\n Int Age\n}\n\nclass Employee : Person {\n Int Salary;\n String Ti...
2008/09/08
[ "https://Stackoverflow.com/questions/49002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
49,035
<p>Given a declaration like this:</p> <pre><code>class A { public: void Foo() const; }; </code></pre> <p>What does it mean?</p> <p>Google turns up this:</p> <blockquote> <p>Member functions should be declared with the const keyword after them if they can operate on a const (this) object. If the function is no...
[ { "answer_id": 49039, "author": "1800 INFORMATION", "author_id": 3146, "author_profile": "https://Stackoverflow.com/users/3146", "pm_score": 2, "selected": false, "text": "const" }, { "answer_id": 49044, "author": "dfjacobs", "author_id": 4848, "author_profile": "http...
2008/09/08
[ "https://Stackoverflow.com/questions/49035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/61/" ]
49,046
<p>Why does <code>n</code> not equal to <code>8</code> in the following function?</p> <pre><code>void foo(char cvalue[8]) { int n = sizeof (cvalue); } </code></pre> <p>But <code>n</code> <em>does</em> equal to <code>8</code> in this version of the function:</p> <pre><code>void bar() { char cvalue[8]; int n = s...
[ { "answer_id": 49055, "author": "Nick Retallack", "author_id": 2653, "author_profile": "https://Stackoverflow.com/users/2653", "pm_score": 7, "selected": true, "text": "// These all do the same thing\nvoid foo(char cvalue[8])\nvoid foo(char cvalue[])\nvoid foo(char *cvalue)\n" }, { ...
2008/09/08
[ "https://Stackoverflow.com/questions/49046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5065/" ]
49,066
<p>I have a vs.net project, and after some refactoring, have modified the name of the project. How can I easily rename the underlying windows folder name to match this new project name under a TFS controlled project and solution?<br> Note, I used to be able to do by fiddling with things in the background using SourceS...
[ { "answer_id": 10853509, "author": "Scott Munro", "author_id": 81595, "author_profile": "https://Stackoverflow.com/users/81595", "pm_score": 7, "selected": false, "text": "No" } ]
2008/09/08
[ "https://Stackoverflow.com/questions/49066", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5110/" ]
49,092
<p>Where can I find an online interactive console for programming language or api?</p> <ul> <li><a href="http://tryruby.org/" rel="nofollow noreferrer">Ruby</a></li> <li><a href="http://shell.appspot.com/" rel="nofollow noreferrer">Python</a></li> <li><a href="http://groovyconsole.appspot.com/" rel="nofollow noreferre...
[ { "answer_id": 6141374, "author": "OnesimusUnbound", "author_id": 24755, "author_profile": "https://Stackoverflow.com/users/24755", "pm_score": 1, "selected": false, "text": "# Script text here\nimport itertools\n\ng = itertools.chain(\"AB\", range(2))\n\nprint g.next()\nprint g.next()\n...
2008/09/08
[ "https://Stackoverflow.com/questions/49092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2653/" ]
49,098
<p>So I have a function that looks something like this:</p> <pre><code>float function(){ float x = SomeValue; return x / SomeOtherValue; } </code></pre> <p>At some point, this function overflows and returns a really large negative value. To try and track down exactly where this was happening, I added a cout ...
[ { "answer_id": 50068, "author": "David Joyner", "author_id": 1146, "author_profile": "https://Stackoverflow.com/users/1146", "pm_score": 2, "selected": false, "text": "const" } ]
2008/09/08
[ "https://Stackoverflow.com/questions/49098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2147/" ]
49,107
<p>Actionscript 3.0 (and I assume Javascript and ECMAScript in general) lacks pass-by-reference for native types like ints. As a result I'm finding getting values back from a function really clunky. What's the normal pattern to work around this? </p> <p>For example, is there a clean way to implement <em>swap( intA, ...
[ { "answer_id": 49109, "author": "Nick Retallack", "author_id": 2653, "author_profile": "https://Stackoverflow.com/users/2653", "pm_score": -1, "selected": false, "text": "[a,b] = [b,a]\n" }, { "answer_id": 50755, "author": "hasseg", "author_id": 4111, "author_profile"...
2008/09/08
[ "https://Stackoverflow.com/questions/49107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4969/" ]
49,110
<p>I'm looking for the basic loop like:</p> <pre><code>for(int i = 0; i &lt; MAX; i++) { doSomething(i); } </code></pre> <p>but for Bash.</p>
[ { "answer_id": 49111, "author": "Rob Rolnick", "author_id": 4798, "author_profile": "https://Stackoverflow.com/users/4798", "pm_score": 8, "selected": true, "text": "for i in $(seq 1 10);\ndo\n echo $i\ndone\n" }, { "answer_id": 49114, "author": "Nick Stinemates", "aut...
2008/09/08
[ "https://Stackoverflow.com/questions/49110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3535/" ]
49,137
<p>I would like to call python script files from my c++ program.</p> <p>I am not sure that the people I will distribute to will have python installed.</p>
[ { "answer_id": 53325201, "author": "ingomueller.net", "author_id": 651937, "author_profile": "https://Stackoverflow.com/users/651937", "pm_score": 5, "selected": false, "text": "#include <pybind11/embed.h> // everything needed for embedding\nnamespace py = pybind11;\n\nint main() {\n ...
2008/09/08
[ "https://Stackoverflow.com/questions/49137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3153/" ]
49,147
<p>I have just installed C# for the first time, and at first glance it appears to be very similar to VB6. I decided to start off by trying to make a 'Hello, World!' UI Edition.</p> <p>I started in the Form Designer and made a button named "Click Me!" proceeded to double-click it and typed in</p> <pre><code>MessageBox...
[ { "answer_id": 49151, "author": "moobaa", "author_id": 3569, "author_profile": "https://Stackoverflow.com/users/3569", "pm_score": 5, "selected": false, "text": "using System.Windows.Forms;\n\n...\n\nMessageBox.Show( \"hello world\" );\n" }, { "answer_id": 49152, "author": "G...
2008/09/08
[ "https://Stackoverflow.com/questions/49147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4960/" ]
49,158
<p>I've got quite a few GreaseMonkey scripts that I wrote at my work which automatically log me into the internal sites we have here. I've managed to write a script for nearly each one of these sites except for our time sheet application, which uses HTTP authentication. </p> <p>Is there a way I can use GreaseMonkey ...
[ { "answer_id": 49736, "author": "pkaeding", "author_id": 4257, "author_profile": "https://Stackoverflow.com/users/4257", "pm_score": 2, "selected": false, "text": "http://username:password@host/\n" }, { "answer_id": 55744, "author": "jklp", "author_id": 3847, "author_...
2008/09/08
[ "https://Stackoverflow.com/questions/49158", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3847/" ]
49,164
<p>How do I turn a python program into an .egg file?</p>
[ { "answer_id": 49169, "author": "dF.", "author_id": 3002, "author_profile": "https://Stackoverflow.com/users/3002", "pm_score": 5, "selected": true, "text": "distutils" }, { "answer_id": 61389995, "author": "Manthan Trivedi", "author_id": 12557421, "author_profile": "...
2008/09/08
[ "https://Stackoverflow.com/questions/49164", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4491/" ]
49,194
<p>I have an action like this:</p> <pre><code>public class News : System.Web.Mvc.Controller { public ActionResult Archive(int year) { / *** / } } </code></pre> <p>With a route like this:</p> <pre><code>routes.MapRoute( "News-Archive", ...
[ { "answer_id": 49223, "author": "Matt Mitchell", "author_id": 364, "author_profile": "https://Stackoverflow.com/users/364", "pm_score": 0, "selected": false, "text": "routes.MapRoute(\n \"News-Archive\", \n \"News.mvc/Archive/{year...
2008/09/08
[ "https://Stackoverflow.com/questions/49194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/364/" ]
49,211
<p>I have an existing application that is written in C++ for Windows. This application uses the Win32 CryptoAPI to generate a TripleDES session key for encrypting/decrypting data. We're using the <a href="http://www.phdcc.com/cryptorc4.htm" rel="nofollow noreferrer">exponent of one trick</a> to export the session key o...
[ { "answer_id": 345696, "author": "Scott Saad", "author_id": 4916, "author_profile": "https://Stackoverflow.com/users/4916", "pm_score": 4, "selected": true, "text": "Array.Reverse( keyByteArray );\n" } ]
2008/09/08
[ "https://Stackoverflow.com/questions/49211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4916/" ]
49,214
<p>I need a list of integers from 1 to x where x is set by the user. I could build it with a for loop eg assuming x is an integer set previously:</p> <pre><code>List&lt;int&gt; iList = new List&lt;int&gt;(); for (int i = 1; i &lt;= x; i++) { iList.Add(i); } </code></pre> <p>This seems dumb, surely there's a more...
[ { "answer_id": 49216, "author": "aku", "author_id": 1196, "author_profile": "https://Stackoverflow.com/users/1196", "pm_score": 6, "selected": false, "text": "// Adding value to existing list\nvar list = new List<int>();\nlist.AddRange(Enumerable.Range(1, x));\n\n// Creating new list\nva...
2008/09/08
[ "https://Stackoverflow.com/questions/49214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2975/" ]
49,251
<p>Following this question:<br> <a href="https://stackoverflow.com/questions/49224/good-crash-reporting-library-in-c">Good crash reporting library in c#</a></p> <p>Is there any library like CrashRpt.dll that does the same on Linux? That is, generate a failure report including a core dump and any necessary environment...
[ { "answer_id": 54243, "author": "Martin Del Vecchio", "author_id": 5397, "author_profile": "https://Stackoverflow.com/users/5397", "pm_score": 0, "selected": false, "text": "x86" } ]
2008/09/08
[ "https://Stackoverflow.com/questions/49251", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1084/" ]
49,252
<p>For a project I am working on in ruby I am overriding the method_missing method so that I can set variables using a method call like this, similar to setting variables in an ActiveRecord object:</p> <p><code>Object.variable_name= 'new value'</code> </p> <p>However, after implementing this I found out that many of ...
[ { "answer_id": 49255, "author": "Nick Retallack", "author_id": 2653, "author_profile": "https://Stackoverflow.com/users/2653", "pm_score": 4, "selected": true, "text": "attr_writer :bar\nattr_reader :baz\nattr_accessor :foo\n" }, { "answer_id": 49575, "author": "James A. Rose...
2008/09/08
[ "https://Stackoverflow.com/questions/49252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5004/" ]
49,258
<p>I am writing my first serious wxWidgets program. I'd like to use the wxConfig facility to make the program's user options persistent. However I <em>don't</em> want wxConfigBase to automatically use the Windows registry. Even though I'm initially targeting Windows, I'd prefer to use a configuration (eg .ini) file. Do...
[ { "answer_id": 49255, "author": "Nick Retallack", "author_id": 2653, "author_profile": "https://Stackoverflow.com/users/2653", "pm_score": 4, "selected": true, "text": "attr_writer :bar\nattr_reader :baz\nattr_accessor :foo\n" }, { "answer_id": 49575, "author": "James A. Rose...
2008/09/08
[ "https://Stackoverflow.com/questions/49258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3955/" ]
49,267
<p>Embedded custom-tag in dynamic content (nested tag) not rendering.</p> <p>I have a page that pulls dynamic content from a javabean and passes the list of objects to a custom tag for processing into html. Within each object is a bunch of html to be output that contains a second custom tag that I would like to also b...
[ { "answer_id": 49410, "author": "Georgy Bolyuba", "author_id": 4052, "author_profile": "https://Stackoverflow.com/users/4052", "pm_score": 2, "selected": true, "text": "<bodycontent>JSP</bodycontent>\n" }, { "answer_id": 6538030, "author": "Samuel Marchant", "author_id": ...
2008/09/08
[ "https://Stackoverflow.com/questions/49267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3431280/" ]
49,269
<p>I have a number of application settings (in user scope) for my custom grid control. Most of them are color settings. I have a form where the user can customize these colors and I want to add a button for reverting to default color settings. How can I read the default settings?</p> <p>For example:</p> <ol> <li>I ha...
[ { "answer_id": 49289, "author": "aku", "author_id": 1196, "author_profile": "https://Stackoverflow.com/users/1196", "pm_score": 6, "selected": true, "text": "Settings.Default.Properties[\"property\"].DefaultValue // initial value from config file\n" }, { "answer_id": 49336, "...
2008/09/08
[ "https://Stackoverflow.com/questions/49269", "https://Stackoverflow.com", "https://Stackoverflow.com/users/976/" ]
49,274
<p>I have a string, say <code>'123'</code>, and I want to convert it to the integer <code>123</code>.</p> <p>I know you can simply do <code>some_string.to_i</code>, but that converts <code>'lolipops'</code> to <code>0</code>, which is not the effect I have in mind. I want it to blow up in my face when I try to convert...
[ { "answer_id": 49282, "author": "Slartibartfast", "author_id": 4433, "author_profile": "https://Stackoverflow.com/users/4433", "pm_score": 9, "selected": true, "text": "Integer('1001') # => 1001 \nInteger('1001 nights') \n# ArgumentError: invalid valu...
2008/09/08
[ "https://Stackoverflow.com/questions/49274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018/" ]
49,284
<p>I've come across a rather interesing (and frustrating) problem with IE6. We are serving up some server generated pdfs and then simply setting headers in PHP to force a browser download of the file. Works fine and all, except in IE6 but <strong>only</strong> if the windows user account is set to standard user (ie. no...
[ { "answer_id": 49306, "author": "Stu Thompson", "author_id": 2961, "author_profile": "https://Stackoverflow.com/users/2961", "pm_score": 1, "selected": false, "text": " response.setHeader(\"Content-Type\", \"application/pdf \"; name=\" + file.getName());\n response.setContentType(\...
2008/09/08
[ "https://Stackoverflow.com/questions/49284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3196/" ]
49,299
<p>I am considering building a application using PRISM (Composite WPF Guidance/Library). The application modules will be vertically partitioned (i.e. Customers, Suppliers, Sales Orders, etc). This is still all relatively easy... I also have a Shell with a main region were all the work will happen but now I need the fol...
[ { "answer_id": 881213, "author": "Scott Barnes", "author_id": 94167, "author_profile": "https://Stackoverflow.com/users/94167", "pm_score": 2, "selected": false, "text": "MyConstructor(IRegionManager regionManager, IUnityContainer container) \n" }, { "answer_id": 3321851, "au...
2008/09/08
[ "https://Stackoverflow.com/questions/49299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5147/" ]
49,302
<p>We have some legacy code that needs to identify in the Page_Load which event caused the postback. At the moment this is implemented by checking the Request data like this...</p> <p>if (Request.Form["__EVENTTARGET"] != null<br> &amp;&amp; (Request.Form["__EVENTTARGET"].IndexOf("BaseGrid") > -1 // BaseGrid event ( e....
[ { "answer_id": 49311, "author": "Espo", "author_id": 2257, "author_profile": "https://Stackoverflow.com/users/2257", "pm_score": 4, "selected": true, "text": "public static Control GetPostBackControl(Page page)\n{\n Control control = null;\n\n string ctrlname = page.Request.Params....
2008/09/08
[ "https://Stackoverflow.com/questions/49302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1127460/" ]
49,307
<p>Using the <code>zip</code> function, Python allows for loops to traverse multiple sequences in parallel. </p> <p><code>for (x,y) in zip(List1, List2):</code></p> <p>Does MATLAB have an equivalent syntax? If not, what is the best way to iterate over two parallel arrays at the same time using MATLAB?</p>
[ { "answer_id": 49514, "author": "sven", "author_id": 46, "author_profile": "https://Stackoverflow.com/users/46", "pm_score": 3, "selected": false, "text": "for i=1:length(a)\n c(i) = a(i) + b(i);\nend\n" }, { "answer_id": 51137, "author": "DMC", "author_id": 3148, "a...
2008/09/08
[ "https://Stackoverflow.com/questions/49307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5148/" ]
49,334
<p>In my database, I have an entity table (let's call it Entity). Each entity can have a number of entity types, and the set of entity types is static. Therefore, there is a connecting table that contains rows of the entity id and the name of the entity type. In my code, EntityType is an enum, and Entity is a Hibernate...
[ { "answer_id": 50402, "author": "Hank Gay", "author_id": 4203, "author_profile": "https://Stackoverflow.com/users/4203", "pm_score": 0, "selected": false, "text": "EntityType" }, { "answer_id": 53405, "author": "marcospereira", "author_id": 4600, "author_profile": "ht...
2008/09/08
[ "https://Stackoverflow.com/questions/49334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2819/" ]
49,346
<p>Is it possible to prevent an asp.net Hyperlink control from linking, i.e. so that it appears as a label, without actually having to replace the control with a label? Maybe using CSS or setting an attribute?</p> <p>I know that marking it as disabled works but then it gets displayed differently (greyed out).</p> <p>...
[ { "answer_id": 49358, "author": "Jon Limjap", "author_id": 372, "author_profile": "https://Stackoverflow.com/users/372", "pm_score": 2, "selected": false, "text": "a: link, visited, hover, active {\n text-decoration: none;\n}\n" }, { "answer_id": 49362, "author": "Slartiba...
2008/09/08
[ "https://Stackoverflow.com/questions/49346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1127460/" ]
49,350
<p>What can be a practical solution to center vertically and horizontally content in HTML that works in Firefox, IE6 and IE7?</p> <p>Some details:</p> <ul> <li><p>I am looking for solution for the entire page.</p></li> <li><p>You need to specify only width of the element to be centered. Height of the element is not k...
[ { "answer_id": 49353, "author": "Oleksandr Yanovets", "author_id": 5139, "author_profile": "https://Stackoverflow.com/users/5139", "pm_score": 2, "selected": false, "text": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">...
2008/09/08
[ "https://Stackoverflow.com/questions/49350", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5139/" ]
49,356
<p>We have the standard Subversion trunk/branches/tags layout. We have several branches for medium- and long-term projects, but none so far for a release. This is approaching fast.</p> <p>Should we:</p> <ol> <li>Mix release branches and project branches together?</li> <li>Create a releases folder? If so, is there a b...
[ { "answer_id": 49366, "author": "Polsonby", "author_id": 137, "author_profile": "https://Stackoverflow.com/users/137", "pm_score": -1, "selected": false, "text": "trunk\n fooapp\n stuff...\n barapp\n stuff...\ntags\n fooapp\n 1.0.0\n 1.0.1\n ...
2008/09/08
[ "https://Stackoverflow.com/questions/49356", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3984/" ]
49,368
<p><a href="http://www.w3.org/TR/REC-CSS2/selector.html#attribute-selectors" rel="noreferrer">CSS Attribute selectors</a> allow the selection of elements based on attribute values. Unfortunately, I've not used them in years (mainly because they're not supported by all modern browsers). However, I remember distinctly th...
[ { "answer_id": 49373, "author": "Antti Kissaniemi", "author_id": 2948, "author_profile": "https://Stackoverflow.com/users/2948", "pm_score": 6, "selected": true, "text": "a[href^=http]\n{\n background: url(external-uri);\n padding-left: 12px;\n}\n" }, { "answer_id": 49462, ...
2008/09/08
[ "https://Stackoverflow.com/questions/49368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1968/" ]
49,379
<p>How do I lock compiled Java classes to prevent decompilation?</p> <p>I know this must be very well discussed topic on the Internet, but I could not come to any conclusion after referring them.</p> <p>Many people do suggest obfuscator, but they just do renaming of classes, methods, and fields with tough-to-remember...
[ { "answer_id": 9598442, "author": "Yury Bendersky", "author_id": 1239661, "author_profile": "https://Stackoverflow.com/users/1239661", "pm_score": 2, "selected": false, "text": "ClassLoader.defineClass(...)" } ]
2008/09/08
[ "https://Stackoverflow.com/questions/49379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/959/" ]
49,382
<p>Are the naming conventions similar in different languages? If not, what are the differences?</p>
[ { "answer_id": 49530, "author": "Anders Sandvig", "author_id": 1709, "author_profile": "https://Stackoverflow.com/users/1709", "pm_score": 3, "selected": true, "text": "lowercase, lowercase_with_underscores" } ]
2008/09/08
[ "https://Stackoverflow.com/questions/49382", "https://Stackoverflow.com", "https://Stackoverflow.com/users/184/" ]
49,402
<p>Imagine a DOS style .cmd file which is used to launch interdependent windowed applications in the right order.</p> <p>Example:<br> 1) Launch a server application by calling an exe with parameters.<br> 2) Wait for the server to become initialized (or a fixed amount of time).<br> 3) Launch client application by calli...
[ { "answer_id": 49520, "author": "Blair Conrad", "author_id": 1199, "author_profile": "https://Stackoverflow.com/users/1199", "pm_score": 0, "selected": false, "text": "launch-server-application serverparam1 serverparam2 ...\nStart-Sleep -s 10\nlaunch-client-application clientparam1 clien...
2008/09/08
[ "https://Stackoverflow.com/questions/49402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5085/" ]
49,403
<p>I have a filename in a format like:</p> <blockquote> <p><code>system-source-yyyymmdd.dat</code></p> </blockquote> <p>I'd like to be able to parse out the different bits of the filename using the "-" as a delimiter.</p>
[ { "answer_id": 49406, "author": "David", "author_id": 381, "author_profile": "https://Stackoverflow.com/users/381", "pm_score": 3, "selected": false, "text": "cut" }, { "answer_id": 49409, "author": "Bobby Jack", "author_id": 5058, "author_profile": "https://Stackover...
2008/09/08
[ "https://Stackoverflow.com/questions/49403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4003/" ]
49,404
<p>I have a table containing prices for a lot of different "things" in a MS SQL 2005 table. There are hundreds of records per thing per day and the different things gets price updates at different times.</p> <pre><code>ID uniqueidentifier not null, ThingID int NOT NULL, PriceDateTime datetime NOT NULL, Price decimal(1...
[ { "answer_id": 49414, "author": "BlaM", "author_id": 999, "author_profile": "https://Stackoverflow.com/users/999", "pm_score": 5, "selected": true, "text": "SELECT *\n FROM Thing\n WHERE ID IN (SELECT max(ID) FROM Thing \n WHERE ThingID IN (1,2,3,4)\n ...
2008/09/08
[ "https://Stackoverflow.com/questions/49404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1008/" ]
49,426
<p>Take a .Net Winforms App.. mix in a flakey wireless network connection, stir with a few users who like to simply pull the blue plug out occasionally and for good measure, add a Systems Admin that decides to reboot the SQL server box without warning now and again just to keep everyone on their toes.</p> <p>What are ...
[ { "answer_id": 49433, "author": "Simon Keep", "author_id": 1127460, "author_profile": "https://Stackoverflow.com/users/1127460", "pm_score": 1, "selected": false, "text": "Main()" } ]
2008/09/08
[ "https://Stackoverflow.com/questions/49426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3849/" ]
49,430
<p>I have just started working with the <code>AnimationExtender</code>. I am using it to show a new div with a list gathered from a database when a button is pressed. The problem is the button needs to do a postback to get this list as I don't want to make the call to the database unless it's needed. The postback ho...
[ { "answer_id": 57774, "author": "Andrew Johnson", "author_id": 5109, "author_profile": "https://Stackoverflow.com/users/5109", "pm_score": 2, "selected": true, "text": "function linkPostback() {\n\n var prm = Sys.WebForms.PageRequestManager.getInstance();\n prm.add_endRequest(playA...
2008/09/08
[ "https://Stackoverflow.com/questions/49430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5170/" ]
49,442
<p>When do you recommend integrating a custom view into Interface Builder with a plug-in? When skimming through Apple's <a href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/IBPlugInGuide/CreatingPluginBundle/chapter_2_section_3.html#//apple_ref/doc/uid/TP40004323-CH4-DontLinkElementID_15" rel="no...
[ { "answer_id": 89185, "author": "Chris Hanson", "author_id": 714, "author_profile": "https://Stackoverflow.com/users/714", "pm_score": 4, "selected": true, "text": "-awakeFromNib" } ]
2008/09/08
[ "https://Stackoverflow.com/questions/49442", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5156/" ]
49,445
<p>I have a WCF service which includes UI components, which forces me to be in STA mode.</p> <p>How do I set the service behaviour to STA-mode?</p> <hr> <p>The service uses a reference to a WPF DLL file which opens a UI window (used as view port) for picture analysis. When the service is trying to create an instance...
[ { "answer_id": 49448, "author": "John Sibly", "author_id": 1078, "author_profile": "https://Stackoverflow.com/users/1078", "pm_score": 0, "selected": false, "text": "[STAThread]\nstatic void Main()\n{\n ServiceBase[] ServicesToRun;\n ServicesToRun = new ServiceBase[] { new ...
2008/09/08
[ "https://Stackoverflow.com/questions/49445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
49,450
<p>I'm just about wrapped up on a project where I was using a commercial SVN provider to store the source code. The web host the customer ultimately picked includes a repository as part of the hosting package, so, now that the project is over, I'd like to relocate the repository to their web host and discontinue the co...
[ { "answer_id": 49468, "author": "pilif", "author_id": 5083, "author_profile": "https://Stackoverflow.com/users/5083", "pm_score": 3, "selected": false, "text": "svnadmin dump\n" }, { "answer_id": 49483, "author": "Tadmas", "author_id": 3750, "author_profile": "https:/...
2008/09/08
[ "https://Stackoverflow.com/questions/49450", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1344/" ]
49,458
<p>We have an application that has to be flexible in how it displays it's main form to the user - depending on the user, the form should be slightly different, maybe an extra button here or there, or some other nuance. In order to stop writing code to explicitly remove or add controls etc, I turned to visual inheritan...
[ { "answer_id": 49554, "author": "Mendelt", "author_id": 3320, "author_profile": "https://Stackoverflow.com/users/3320", "pm_score": 2, "selected": false, "text": "public class MyForm<MyObject> : Form\n" }, { "answer_id": 258868, "author": "Tigraine", "author_id": 21699, ...
2008/09/08
[ "https://Stackoverflow.com/questions/49458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5175/" ]
49,461
<p>Is there a C# equivalent for the VB.NET <code>FormatNumber</code> function? </p> <p>I.e.:</p> <pre><code>JSArrayString += "^" + (String)FormatNumber(inv.RRP * oCountry.ExchangeRate, 2); </code></pre>
[ { "answer_id": 49476, "author": "d91-jal", "author_id": 5085, "author_profile": "https://Stackoverflow.com/users/5085", "pm_score": 1, "selected": false, "text": "double MyNumber = inv.RRP * oCountry.ExchangeRate;\nJSArrayString += \"^\" + MyNumber.ToString(\"#0.00\");\n" }, { "a...
2008/09/08
[ "https://Stackoverflow.com/questions/49461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1583/" ]
49,473
<p>Is <a href="http://bouncycastle.org/java.html" rel="nofollow noreferrer">Bouncy Castle API</a> Thread Safe ? Especially,</p> <pre><code>org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher org.bouncycastle.crypto.paddings.PKCS7Padding org.bouncycastle.crypto.engines.AESFastEngine org.bouncycastle.crypto.modes...
[ { "answer_id": 49498, "author": "Tnilsson", "author_id": 4165, "author_profile": "https://Stackoverflow.com/users/4165", "pm_score": 5, "selected": true, "text": "E(X) = Enctrypt message X\nD(X) = Dectrypt X. (Note that D(E(X)) = X)\nIV = Initialization vector. A random sequence to boots...
2008/09/08
[ "https://Stackoverflow.com/questions/49473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/959/" ]
49,478
<p>Which files should I include in <code>.gitignore</code> when using <em>Git</em> in conjunction with <em>Xcode</em>?</p>
[ { "answer_id": 49488, "author": "Hagelin", "author_id": 5156, "author_profile": "https://Stackoverflow.com/users/5156", "pm_score": 8, "selected": false, "text": ".DS_Store\n*.swp\n*~.nib\n\nbuild/\n\n*.pbxuser\n*.perspective\n*.perspectivev3\n" }, { "answer_id": 50283, "auth...
2008/09/08
[ "https://Stackoverflow.com/questions/49478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5156/" ]
49,500
<p>I'm trying to redirect requests for a wildcard domain to a sub-directory.<br /> ie. <code>something.blah.example.com</code> --&gt; <code>blah.example.com/something</code></p> <p>I don't know how to get the subdomain name to use in the rewrite rule.</p> <p><strong>Final Solution:</strong></p> <pre><code>RewriteCond %...
[ { "answer_id": 49504, "author": "pilif", "author_id": 5083, "author_profile": "https://Stackoverflow.com/users/5083", "pm_score": 6, "selected": true, "text": "RewriteCond %{HTTP_HOST} ^([^.]+)\\.blah\\.domain\\.com$\nRewriteRule ^/(.*)$ http://blah.domain.com/%1/$1 [L,R] \n" ...
2008/09/08
[ "https://Stackoverflow.com/questions/49500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/428/" ]
49,507
<p>The system I'm currently working on consists of a controller PC running XP with .Net 2 connected to a set of embedded systems. All these components communicate with each other over an ethernet network. I'm currently using TcpClient.Connect on the XP computer to open a connection to the embedded systems to send TCP/I...
[ { "answer_id": 49545, "author": "Hath", "author_id": 5186, "author_profile": "https://Stackoverflow.com/users/5186", "pm_score": 3, "selected": false, "text": " int port = 1234;\n\n IPHostEntry entry = Dns.GetHostEntry(Dns.GetHostName());\n\n //find ip address for your adapter h...
2008/09/08
[ "https://Stackoverflow.com/questions/49507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1898/" ]
49,510
<p>How do you set your Cocoa application as the default web browser?</p> <p>I want to create an application that is launched by default when the user clicks on an HTTP or HTTPS link in other applications (Mail, iChat etc.).</p>
[ { "answer_id": 49512, "author": "georgebrock", "author_id": 5168, "author_profile": "https://Stackoverflow.com/users/5168", "pm_score": 7, "selected": true, "text": "http://" }, { "answer_id": 65479328, "author": "vauxhall", "author_id": 4691224, "author_profile": "ht...
2008/09/08
[ "https://Stackoverflow.com/questions/49510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5168/" ]
49,511
<p>I have played with the idea of using a wiki (MediaWiki) to centralize all project information for a development project. This was done using extensions that pull information from SVN (using <a href="http://svnkit.com/" rel="nofollow noreferrer">SVNKit</a>) and by linking to Bugzilla to extract work assigned to a de...
[ { "answer_id": 49541, "author": "Richard Tasker", "author_id": 2939, "author_profile": "https://Stackoverflow.com/users/2939", "pm_score": 0, "selected": false, "text": "<project file=\"AOZA_BEPPI_Billing_Project_Plan_v0.2.mpp\" type=\"list\" user=\"Martin\" />\n" } ]
2008/09/08
[ "https://Stackoverflow.com/questions/49511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2939/" ]
49,536
<p>You find plenty of tutorials on menu bars in HTML, but for this specific (though IMHO generic) case, I haven't found any decent solution:</p> <pre><code># THE MENU ITEMS SHOULD BE JUSTIFIED JUST AS PLAIN TEXT WOULD BE # # ^ ...
[ { "answer_id": 49538, "author": "Jordi Bunster", "author_id": 4272, "author_profile": "https://Stackoverflow.com/users/4272", "pm_score": 2, "selected": false, "text": "<p>" }, { "answer_id": 49558, "author": "flight", "author_id": 3377, "author_profile": "https://Sta...
2008/09/08
[ "https://Stackoverflow.com/questions/49536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3377/" ]
49,547
<p>Our investigations have shown us that not all browsers respect the HTTP cache directives in a uniform manner.</p> <p>For security reasons we do not want certain pages in our application to be cached, <strong>ever,</strong> by the web browser. This must work for at least the following browsers:</p> <ul> <li>Interne...
[ { "answer_id": 49549, "author": "Edward Wilde", "author_id": 5182, "author_profile": "https://Stackoverflow.com/users/5182", "pm_score": 5, "selected": false, "text": "Response.ClearHeaders(); \nResponse.AppendHeader(\"Cache-Control\", \"no-cache\"); //HTTP 1.1\nResponse.AppendHeader(\"C...
2008/09/08
[ "https://Stackoverflow.com/questions/49547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5182/" ]
49,562
<p>I think this is a fun engineering-level question.</p> <p>I need to design a control which displays a line chart. What I want to be able to do is use a designer to add multiple <code>Pens</code> which actually describe the data and presentation so that it ends up with Xaml something along these lines:</p> <pre><co...
[ { "answer_id": 334399, "author": "Rhys", "author_id": 22169, "author_profile": "https://Stackoverflow.com/users/22169", "pm_score": 1, "selected": false, "text": "<Chart>\n <Chart.Pens>\n <Pen Name=\"SalesData\" Data=\"{Binding Name=SalesData}\" /> \n <Pen Name=\"CostData\"...
2008/09/08
[ "https://Stackoverflow.com/questions/49562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/93/" ]
49,564
<p>I would like display something more meaningful that animated gif while users upload file to my web application. What possibilities do I have? </p> <p><em>Edit: I am using .Net but I don't mind if somebody shows me platform agnostic version.</em></p>
[ { "answer_id": 51641, "author": "georgebrock", "author_id": 5168, "author_profile": "https://Stackoverflow.com/users/5168", "pm_score": 2, "selected": false, "text": "uploadStarted" } ]
2008/09/08
[ "https://Stackoverflow.com/questions/49564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2361/" ]
49,582
<p>In our current database development evironment we have automated build procceses check all the sql code out of svn create database scripts and apply them to the various development/qa databases.</p> <p>This is all well and good, and is a tremdous improvement over what we did in the past, but we have a problem with ...
[ { "answer_id": 49597, "author": "Ryan Lanciaux", "author_id": 1385358, "author_profile": "https://Stackoverflow.com/users/1385358", "pm_score": 1, "selected": false, "text": "http://www.rikware.com/RikMigrations.html\n" }, { "answer_id": 49845, "author": "Ben Scheirman", ...
2008/09/08
[ "https://Stackoverflow.com/questions/49582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1942/" ]