qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
58,280 | <p>Is it possible to use an UnhandledException Handler in a Windows Service?</p>
<p>Normally I would use a custom built Exception Handling Component that does logging, phone home, etc. This component adds a handler to System.AppDomain.CurrentDomain.UnhandledException but as far as I can tell this doesn’t achieve anyth... | [
{
"answer_id": 58450,
"author": "Scott",
"author_id": 6042,
"author_profile": "https://Stackoverflow.com/users/6042",
"pm_score": 5,
"selected": true,
"text": "\nPrivate Sub ServiceQueuedMainCallback(ByVal state As Object)\n Dim args As String() = DirectCast(state, String())\n Try ... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58280",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6042/"
] |
58,294 | <p>When I call <code>socket.getsockname()</code> on a socket object, it returns a tuple of my machine's internal IP and the port. However, I would like to retrieve my external IP. What's the cheapest, most efficient manner of doing this?</p>
| [
{
"answer_id": 2646313,
"author": "frankjania",
"author_id": 317610,
"author_profile": "https://Stackoverflow.com/users/317610",
"pm_score": 0,
"selected": false,
"text": "import urllib\ndef get_my_ip_address():\n whatismyip = 'http://www.whatismyip.com/automation/n09230945.asp'\n ... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58294",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5342/"
] |
58,305 | <p>Simple as the title states: Can you use only Java commands to take a screenshot and save it? Or, do I need to use an OS specific program to take the screenshot and then grab it off the clipboard?</p>
| [
{
"answer_id": 58326,
"author": "David Citron",
"author_id": 5309,
"author_profile": "https://Stackoverflow.com/users/5309",
"pm_score": 9,
"selected": true,
"text": "java.awt.Robot Rectangle screenRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());\nBufferedImage capture ... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58305",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2598/"
] |
58,306 | <p>I am trying to determine the best time efficient algorithm to accomplish the task described below.</p>
<p>I have a set of records. For this set of records I have connection data which indicates how pairs of records from this set connect to one another. This basically represents an undirected graph, with the records... | [
{
"answer_id": 58444,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 1,
"selected": false,
"text": "static bool[] visited;//all false\nStack<int> currentway; initialize empty\n\nfunction findnodes(int nextnode)\n{\nif (nextnode... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58306",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3534/"
] |
58,340 | <p>Using win forms with an <a href="http://en.wikipedia.org/wiki/Model-view-controller" rel="noreferrer">MVC</a>/<a href="http://msdn.microsoft.com/en-us/magazine/cc188690.aspx" rel="noreferrer">MVP</a> architecture, I would normally use a class to wrap a view to test the UI while using mocks for the model and controll... | [
{
"answer_id": 40271736,
"author": "Justas",
"author_id": 407108,
"author_profile": "https://Stackoverflow.com/users/407108",
"pm_score": 4,
"selected": false,
"text": "using TestStack.White;\nusing TestStack.White.UIItems;\nusing TestStack.White.Factory;\n\n[TestMethod]\npublic void Tes... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58340",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3826/"
] |
58,354 | <p>What are some simple algorithm or data structure related "white boarding" problems that you find effective during the candidate screening process?</p>
<p>I have some simple ones that I use to validate problem solving skills and that can be simply expressed but have some opportunity for the application of some heuri... | [
{
"answer_id": 90047,
"author": "user11318",
"author_id": 11318,
"author_profile": "https://Stackoverflow.com/users/11318",
"pm_score": 2,
"selected": false,
"text": "# @a and @b are two arrays which are already populated.\nmy @int;\nOUTER: for my $x (@a) {\n for my $y (@b) {\n if ($... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58354",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3957/"
] |
58,380 | <p>The following bit of code catches the EOS Exception</p>
<pre><code>using (var reader = new BinaryReader(httpRequestBodyStream)) {
try {
while (true) {
bodyByteList.Add(reader.ReadByte());
}
} catch (EndOfStreamException) { }
}
</code></pre>
<p>So why do I still receive first-ch... | [
{
"answer_id": 58409,
"author": "loudej",
"author_id": 6056,
"author_profile": "https://Stackoverflow.com/users/6056",
"pm_score": 4,
"selected": false,
"text": "while (reader.PeekChar() != -1)\n{\n bodyByteList.Add(reader.ReadByte());\n}\n"
},
{
"answer_id": 1247084,
"aut... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/209/"
] |
58,384 | <p>I am facing a problem with .NET generics. The thing I want to do is saving an array of generics types (GraphicsItem):</p>
<pre><code>public class GraphicsItem<T>
{
private T _item;
public void Load(T item)
{
_item = item;
}
}
</code></pre>
<p>How can I save such open generic type in ... | [
{
"answer_id": 58406,
"author": "Alex Duggleby",
"author_id": 5790,
"author_profile": "https://Stackoverflow.com/users/5790",
"pm_score": 0,
"selected": false,
"text": "static void foo()\n{\n var _bar = List<GraphicsItem<T>>();\n}\n static GraphicsItem<T>[] CreateArrays<T>()\n{\n Gra... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58384",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2078/"
] |
58,399 | <p>I love the way Mac OS <em>beautifully</em> renders fonts (not just browsers). I was wondering if we could somehow get the same rendering in browsers running on Windows?</p>
<p>Someone recommended sIFR but I guess that's useful when I need to use non-standard fonts?</p>
| [
{
"answer_id": 2573130,
"author": "William",
"author_id": 213197,
"author_profile": "https://Stackoverflow.com/users/213197",
"pm_score": 0,
"selected": false,
"text": "g.setFont(new Font(\"Century Schoolbook\", Font.PLAIN, 36));\ng.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,\... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58399",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6059/"
] |
58,425 | <p>I have a simple WPF application which I am trying to start. I am following the Microsoft Patterns and Practices "Composite Application Guidance for WPF". I've followed their instructions however my WPF application fails immediately with a "TypeInitializationException".</p>
<p>The InnerException property reveals t... | [
{
"answer_id": 58464,
"author": "Adrian Clark",
"author_id": 148,
"author_profile": "https://Stackoverflow.com/users/148",
"pm_score": 6,
"selected": true,
"text": "<configuration>\n <startup>\n <supportedRuntime version=\"v2.0.50727\" sku=\"Client\"/>\n </startup>\n <configSection... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58425",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148/"
] |
58,429 | <p>How can I have SQL repeat some set-based operation an arbitrary number of times without looping? How can I have SQL perform an operation against a range of numbers? I'm basically looking for a way to do a set-based for loop.<p>
I know I can just create a small table with integers in it, say from 1 to 1000 and then u... | [
{
"answer_id": 59314,
"author": "Chris Ammerman",
"author_id": 2729,
"author_profile": "https://Stackoverflow.com/users/2729",
"pm_score": 4,
"selected": true,
"text": "WITH\n digits AS -- Limit recursion by just using it for digits.\n (SELECT\n LEVEL - 1 AS num\n FROM\n ... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58429",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4489/"
] |
58,431 | <p>I have wondered for some time, what a nice, clean solution for joining an array of strings might look like.
Example: I have ["Alpha", "Beta", "Gamma"] and want to join the strings into one, separated by commas – "Alpha, Beta, Gamma".</p>
<p>Now I know that most programming languages offer some kind of join method f... | [
{
"answer_id": 58437,
"author": "Mendelt",
"author_id": 3320,
"author_profile": "https://Stackoverflow.com/users/3320",
"pm_score": 4,
"selected": false,
"text": "separator = \"\"\nforeach(item in stringCollection)\n{\n concatenatedString += separator + item\n separator = \",\"\n}\... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58431",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4991/"
] |
58,457 | <p>How do you randomly select a table row in T-SQL based on an applied weight for all candidate rows?</p>
<p>For example, I have a set of rows in a table weighted at 50, 25, and 25 (which adds up to 100 but does not need to), and I want to select one of them randomly with a statistical outcome equivalent to the respec... | [
{
"answer_id": 58459,
"author": "Dane",
"author_id": 2929,
"author_profile": "https://Stackoverflow.com/users/2929",
"pm_score": 3,
"selected": false,
"text": "DECLARE @id int, @weight_sum int, @weight_point int\nDECLARE @table TABLE (id int, weight int)\n\nINSERT INTO @table(id, weight)... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58457",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2929/"
] |
58,478 | <p>I want to send email from a Ruby application. Is there a call in the core language to do this or is there a library I should use? What's the best way to do this?</p>
| [
{
"answer_id": 59285,
"author": "pauliephonic",
"author_id": 5374,
"author_profile": "https://Stackoverflow.com/users/5374",
"pm_score": 1,
"selected": false,
"text": "require 'net/smtp'\nSMTP_SERVER = 'mailserver01' #change to your server\n\ndef send_emails(sender_address, recipients, s... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58478",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/381/"
] |
58,482 | <p>I'm not entirely sure if this is possible in Ruby, but hopefully there's an easy way to do this. I want to declare a variable and later find out the name of the variable. That is, for this simple snippet:</p>
<pre><code>foo = ["goo", "baz"]
</code></pre>
<p>How can I get the name of the array (here, "foo") back? I... | [
{
"answer_id": 58492,
"author": "Josh Moore",
"author_id": 5004,
"author_profile": "https://Stackoverflow.com/users/5004",
"pm_score": 2,
"selected": false,
"text": "instance_variables object.instance_variables\n self.instance_variables\n"
},
{
"answer_id": 58734,
"author": "... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58482",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/422/"
] |
58,493 | <p>I have an array of numbers that potentially have up to 8 decimal places and I need to find the smallest common number I can multiply them by so that they are all whole numbers. I need this so all the original numbers can all be multiplied out to the same scale and be processed by a sealed system that will only deal ... | [
{
"answer_id": 58512,
"author": "Evil Andy",
"author_id": 4431,
"author_profile": "https://Stackoverflow.com/users/4431",
"pm_score": 0,
"selected": false,
"text": "myNumber.ToString().Substring(myNumber.ToString().IndexOf(\".\")+1).Length\n"
},
{
"answer_id": 60085,
"author"... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58493",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6042/"
] |
58,510 | <p>I am looking for a simple way to get a mime type where the file extension is incorrect or not given, something similar to <a href="https://stackoverflow.com/questions/51438/getting-a-files-mime-type-in-java">this question</a> only in .Net.</p>
| [
{
"answer_id": 58570,
"author": "Steve Morgan",
"author_id": 5806,
"author_profile": "https://Stackoverflow.com/users/5806",
"pm_score": 7,
"selected": true,
"text": "FindMimeFromData FindMimeFromData"
},
{
"answer_id": 62007,
"author": "Richard Gourlay",
"author_id": 267... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58510",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2674/"
] |
58,513 | <p>How do I Unit Test a MVC redirection?</p>
<pre><code>public ActionResult Create(Product product)
{
_productTask.Save(product);
return RedirectToAction("Success");
}
public ActionResult Success()
{
return View();
}
</code></pre>
<p>Is <a href="http://www.ayende.com/Blog/archive/2007/12/13/Dont-lik... | [
{
"answer_id": 58818,
"author": "Matt Hinze",
"author_id": 2676,
"author_profile": "https://Stackoverflow.com/users/2676",
"pm_score": 6,
"selected": true,
"text": "[TestFixture]\npublic class RedirectTester\n{\n [Test]\n public void Should_redirect_to_success_action()\n {\n ... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58513",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/230/"
] |
58,517 | <p>Is there a way to combine Enums in VB.net?</p>
| [
{
"answer_id": 58526,
"author": "Jonas Follesø",
"author_id": 1199387,
"author_profile": "https://Stackoverflow.com/users/1199387",
"pm_score": 1,
"selected": false,
"text": "Enum |= &= Enum Flags Anchor"
},
{
"answer_id": 58527,
"author": "Dave Arkell",
"author_id": 4002... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5055/"
] |
58,520 | <p>We need to regularly synchronize many dozens of binary files (project executables and DLLs) between many developers at several different locations, so that every developer has an up to date environment to build and test at. Due to nature of the project, updates must be done often and on-demand (overnight updates are... | [
{
"answer_id": 58576,
"author": "Rob Wells",
"author_id": 2974,
"author_profile": "https://Stackoverflow.com/users/2974",
"pm_score": 0,
"selected": false,
"text": "const char cvsid[] = \"@(#)INETOPS_filter_ip_$Revision: 1.9 $\"; what filter_ip | grep INETOPS INETOPS_filter_ip_$Revision:... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58520",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5733/"
] |
58,538 | <p>I'm creating an installer for a website that uses a custom event log source. I would like our WiX based installer to create that event log source during installation.</p>
<p>Does anyone know the best way to do this using the WiX framework.</p>
| [
{
"answer_id": 58686,
"author": "Paul Lalonde",
"author_id": 5782,
"author_profile": "https://Stackoverflow.com/users/5782",
"pm_score": 7,
"selected": true,
"text": "<Wix xmlns=\"http://schemas.microsoft.com/wix/2006/wi\"\n xmlns:util=\"http://schemas.microsoft.com/wix/UtilExtension\... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58538",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5182/"
] |
58,540 | <p>When trying to enter a SQL query with parameters using the Oracle OLE DB provider I get the following error:</p>
<blockquote>
<p>Parameters cannot be extracted from the SQL command. The provider might not help to parse parameter information from the command. In that case, use the "SQL command from variable" acces... | [
{
"answer_id": 59116,
"author": "Rich Lawrence",
"author_id": 1281,
"author_profile": "https://Stackoverflow.com/users/1281",
"pm_score": 5,
"selected": true,
"text": "select * from book where book.BOOK_ID = ?\n \"select * from book where book.BOOK_ID = \" + @[User::BookID]\n"
},
{
... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58540",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1281/"
] |
58,543 | <p>I have an application that I would like to embed inside our companies CMS. The only way to do that (I am told), is to load it in an <code><iframe></code>.</p>
<p>Easy: just set <code>height</code> and <code>width</code> to <code>100%</code>! Except, it doesn't work.</p>
<p>I did find out about setting <code>... | [
{
"answer_id": 58562,
"author": "Adam Hepton",
"author_id": 2268,
"author_profile": "https://Stackoverflow.com/users/2268",
"pm_score": 0,
"selected": false,
"text": "scrolling=no iframe"
}
] | 2008/09/12 | [
"https://Stackoverflow.com/questions/58543",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2260/"
] |
58,547 | <p>In C++ we acquiring a resource in a constructor and release it in a destructor.</p>
<p>So when an exception rises in a middle of a function there will be no resource leak or locked mutexes or whatever.</p>
<p>AFAIK java classes don't have destructors. So how does one do the resource management in Java.</p>
<p>For... | [
{
"answer_id": 58552,
"author": "qbeuek",
"author_id": 5348,
"author_profile": "https://Stackoverflow.com/users/5348",
"pm_score": 3,
"selected": true,
"text": "public int foo() {\n Resource f = new Resource();\n try {\n DoSomething(f);\n }\n finally {\n f.Relea... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58547",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1007/"
] |
58,554 | <p>I'm using Eclipse as my IDE for a C++ project, and I would love for it to tell me where a given symbol is defined and what the parameters are for a function.</p>
<p>However, there's a catch: I also use <a href="http://www.lazycplusplus.com/" rel="nofollow noreferrer">Lazy C++</a>, a tool that takes a single source ... | [
{
"answer_id": 837016,
"author": "Mike Kucera",
"author_id": 102367,
"author_profile": "https://Stackoverflow.com/users/102367",
"pm_score": 1,
"selected": false,
"text": "$hdr $end $src"
}
] | 2008/09/12 | [
"https://Stackoverflow.com/questions/58554",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2095/"
] |
58,558 | <p>I'm trying to check, using an automated discovery tool, when JAR files in remote J2EE application servers have changed content. Currently, the system downloads the whole JAR using WMI to checksum it locally, which is slow for large JARs.</p>
<p>For UNIXy servers (and Windows servers with Cygwin), I can just log in ... | [
{
"answer_id": 837016,
"author": "Mike Kucera",
"author_id": 102367,
"author_profile": "https://Stackoverflow.com/users/102367",
"pm_score": 1,
"selected": false,
"text": "$hdr $end $src"
}
] | 2008/09/12 | [
"https://Stackoverflow.com/questions/58558",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4702/"
] |
58,561 | <p>I'm trying to get only the list of id of object bob for example instead of the list of bob. It's ok with a HQL request, but I would know if it's possible using criteria ?</p>
<p>An example :</p>
<pre><code>final StringBuilder hql = new StringBuilder();
hql.append( "select bob.id from " )
.append( bob.class.get... | [
{
"answer_id": 58624,
"author": "agnul",
"author_id": 6069,
"author_profile": "https://Stackoverflow.com/users/6069",
"pm_score": 6,
"selected": false,
"text": "Criteria.forClass(bob.class.getName())\n .add(Restrictions.gt(\"id\", 10))\n .setProjection(Projections.property(... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58561",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
58,564 | <p>I have a core dump file from a process that has probably a file descriptor leak (it opens files and sockets but apparently sometimes forgets to close some of them). Is there a way to find out which files and sockets the process had opened before crashing? I can't easily reproduce the crash, so analyzing the core fil... | [
{
"answer_id": 58580,
"author": "mweerden",
"author_id": 4285,
"author_profile": "https://Stackoverflow.com/users/4285",
"pm_score": 2,
"selected": false,
"text": "strace open socket close"
},
{
"answer_id": 58606,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"auth... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58564",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2148773/"
] |
58,584 | <p>Selecting a large amount of text that extends over many screens in an IDE like Eclipse is fairly easy since you can use the mouse, but what is the best way to e.g. select and delete multiscreen blocks of text or write e.g. three large methods out to another file and then delete them for testing purposes in Vim when ... | [
{
"answer_id": 58588,
"author": "zigdon",
"author_id": 4913,
"author_profile": "https://Stackoverflow.com/users/4913",
"pm_score": 6,
"selected": true,
"text": "vim Eclipse yank cut VISUAL :'<,'>s/^/# /\n # '< '>"
},
{
"answer_id": 58592,
"author": "Swaroop C H",
"author_... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58584",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4639/"
] |
58,614 | <p>I'm developing a multi-threaded app for a Linux embedded platform.</p>
<p>At the moment I'm setting the stack size for each thread (via pthread_set_attr) to a fairly large default value. I would like to fine tune that value for each thread to something smaller to reduce my application's memory usage. I could go thr... | [
{
"answer_id": 58628,
"author": "Tobi",
"author_id": 5422,
"author_profile": "https://Stackoverflow.com/users/5422",
"pm_score": 2,
"selected": false,
"text": "__thread void* stack_start;\n__thread long stack_max_size = 0L;\n\nvoid check_stack_size() {\n // address of 'nowhere' approxim... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58614",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6089/"
] |
58,620 | <p>How do I create a button control (with <code>CreateWindow</code> of a <code>BUTTON</code> window class) that has a standard system-wide size (especially height) that's consistent with the rest of Windows applications?
I should of course take DPI into account and probably other settings.</p>
<blockquote>
<p><stron... | [
{
"answer_id": 58689,
"author": "macbirdie",
"author_id": 5049,
"author_profile": "https://Stackoverflow.com/users/5049",
"pm_score": 4,
"selected": true,
"text": "LONG units = GetDialogBaseUnits();\nm_hButton = CreateWindow(TEXT(\"BUTTON\"), TEXT(\"Close\"), \n WS_VISIBL... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58620",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5049/"
] |
58,621 | <p>How do I make an MD5 hash of a string with Delphi?</p>
| [
{
"answer_id": 58626,
"author": "devstopfix",
"author_id": 3366,
"author_profile": "https://Stackoverflow.com/users/3366",
"pm_score": 5,
"selected": false,
"text": "uses SysUtils, IdGlobal, IdHash, IdHashMessageDigest;\n\nwith TIdHashMessageDigest5.Create do\ntry\n Result := TIdHash1... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58621",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3366/"
] |
58,622 | <p>I like Doxygen to create documentation of C or PHP code. I have an upcoming Python project and I think I remember that Python doesn't have <code>/* .. */</code> comments, and also has its own self-documentation facility which seems to be the pythonic way to document.</p>
<p>Since I'm familiar with Doxygen, how can I... | [
{
"answer_id": 58701,
"author": "Blair Conrad",
"author_id": 1199,
"author_profile": "https://Stackoverflow.com/users/1199",
"pm_score": 7,
"selected": true,
"text": "\"\"\"@package docstring\nDocumentation for this module.\n\nMore details.\n\"\"\"\n\ndef func():\n \"\"\"Documentation... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58622",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2077/"
] |
58,638 | <p>How do I take a set of polygons which contain arbitrary values and create a corresponding bitmap where each pixel contains the value of the polygon at that location?</p>
<p>To put the question into context, my polygons contain information about the average number of people per square kilometre within the polygon. I... | [
{
"answer_id": 58793,
"author": "Chris Upchurch",
"author_id": 2600,
"author_profile": "https://Stackoverflow.com/users/2600",
"pm_score": 2,
"selected": false,
"text": "PolygonToRaster_conversion (in_features, value_field, out_raster_dataset, cell_assignment, priority_field, cellsize)\n... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58638",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5932/"
] |
58,649 | <p>I would like to write a small program in C# which goes through my jpeg photos and, for example, sorts them into dated folders (using MY dating conventions, dammit...). </p>
<p>Does anyone know a relatively easy way to get at the EXIF data such as Date And Time or Exposure programatically?
Thanks!</p>
| [
{
"answer_id": 156640,
"author": "Dave Griffiths",
"author_id": 15379,
"author_profile": "https://Stackoverflow.com/users/15379",
"pm_score": 6,
"selected": true,
"text": "var directories = ImageMetadataReader.ReadMetadata(imagePath);\n\n// print out all metadata\nforeach (var directory ... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58649",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6091/"
] |
58,670 | <p>Does anyone know a method to programmatically close the CD tray on Windows 2000 or higher?
Open CD tray exists, but I can't seem to make it close especially under W2k. </p>
<p>I am especially looking for a method to do this from a batch file, if possible, but API calls would be OK.</p>
| [
{
"answer_id": 58725,
"author": "DaveK",
"author_id": 4244,
"author_profile": "https://Stackoverflow.com/users/4244",
"pm_score": 4,
"selected": true,
"text": "\n[DllImport(\"winmm.dll\", EntryPoint = \"mciSendStringA\", CharSet = CharSet.Ansi)]\n protected static extern int mciSe... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58670",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3225/"
] |
58,694 | <p>I want to prevent XSS attacks in my web application. I found that HTML Encoding the output can really prevent XSS attacks. Now the problem is that how do I HTML encode every single output in my application? I there a way to automate this?</p>
<p>I appreciate answers for JSP, ASP.net and PHP.</p>
| [
{
"answer_id": 58791,
"author": "reefnet_alex",
"author_id": 2745,
"author_profile": "https://Stackoverflow.com/users/2745",
"pm_score": 1,
"selected": false,
"text": "echo \"blah\";\n myecho('blah');\n"
},
{
"answer_id": 58938,
"author": "Peter Bernier",
"author_id": 611... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58694",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/184/"
] |
58,697 | <p>The situation: I have a pieceofcrapuous laptop. One of the things that make it pieceofcrapuous is that the battery is dead, and the power cable pulls out of the back with little effort.</p>
<p>I recently received a non-pieceofcrapuous laptop, and I am in the process of copying everything from old to new. I'm trying... | [
{
"answer_id": 58729,
"author": "Fionnuala",
"author_id": 2548,
"author_profile": "https://Stackoverflow.com/users/2548",
"pm_score": 4,
"selected": true,
"text": "xcopy \"O:\\*.*\" N:\\Whatever /C /D /S /H \n\n/C Continues copying even if errors occur. \n/D:m-d-y Copies files changed on... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58697",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2757/"
] |
58,709 | <p>I'm using ADO.NET to access SQL Server 2005 and would like to be able to log from inside the T-SQL stored procedures that I'm calling. Is that somehow possible?</p>
<p>I'm unable to see output from the 'print'-statement when using ADO.NET and since I want to use logging just for debuging the ideal solution would be... | [
{
"answer_id": 59017,
"author": "hollystyles",
"author_id": 2083160,
"author_profile": "https://Stackoverflow.com/users/2083160",
"pm_score": 0,
"selected": false,
"text": "create procedure usp_LoggableProc \n\n@log varchar(max) OUTPUT \n\nas\n\n-- T-SQL statement here ...\n\nselect @log... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58709",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4164/"
] |
58,711 | <p>I have been playing with the Ruby library "shoes". Basically you can write a GUI application in the following way:</p>
<pre><code>Shoes.app do
t = para "Not clicked!"
button "The Label" do
alert "You clicked the button!" # when clicked, make an alert
t.replace "Clicked!" # ..and replace the label's text... | [
{
"answer_id": 58990,
"author": "dF.",
"author_id": 3002,
"author_profile": "https://Stackoverflow.com/users/3002",
"pm_score": 2,
"selected": false,
"text": "from Boots import App, Para, Button, alert\n\ndef Shoeless(App):\n t = Para(text = 'Not Clicked')\n b = Button(label = 'The... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58711",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/745/"
] |
58,743 | <p>As an example take the following code:</p>
<pre><code>public enum ExampleEnum { FooBar, BarFoo }
public class ExampleClass : INotifyPropertyChanged
{
private ExampleEnum example;
public ExampleEnum ExampleProperty
{ get { return example; } { /* set and notify */; } }
}
</code></pre>
<p>I want a to d... | [
{
"answer_id": 58766,
"author": "rudigrobler",
"author_id": 5147,
"author_profile": "https://Stackoverflow.com/users/5147",
"pm_score": 5,
"selected": false,
"text": "typesComboBox1.ItemsSource = Enum.GetValues(typeof(ExampleEnum));\n"
},
{
"answer_id": 58819,
"author": "rudi... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58743",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1733/"
] |
58,744 | <p>I want to copy the entire contents of a directory from one location to another in C#.</p>
<p>There doesn't appear to be a way to do this using <code>System.IO</code> classes without lots of recursion.</p>
<p>There is a method in VB that we can use if we add a reference to <code>Microsoft.VisualBasic</code>:</p>
<... | [
{
"answer_id": 58759,
"author": "Josef",
"author_id": 5581,
"author_profile": "https://Stackoverflow.com/users/5581",
"pm_score": 6,
"selected": false,
"text": "Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory(fromDirectory, toDirectory);\n"
},
{
"answer_id": 58762,
"aut... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58744",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/905/"
] |
58,750 | <p>Is it possible to obtain raw logs from Google Analytic? Is there any tool that can generate the raw logs from GA?</p>
| [
{
"answer_id": 68766,
"author": "Shermozle",
"author_id": 10788,
"author_profile": "https://Stackoverflow.com/users/10788",
"pm_score": 5,
"selected": true,
"text": "var _ugifpath2=\"http://www.google-analytics.com/__utm.gif\";\nif (_udl.protocol==\"https:\") _ugifpath2=\"https://ssl.goo... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58750",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/370899/"
] |
58,755 | <p>What is the best way to do per-user database connections in <code>Rails</code>? </p>
<p>I realize this is a poor Rails design practice, but we're gradually replacing an existing web application that uses one database per user. A complete redesign/rewrite is not feasible.</p>
| [
{
"answer_id": 59063,
"author": "Kevin Kaske",
"author_id": 2737,
"author_profile": "https://Stackoverflow.com/users/2737",
"pm_score": 4,
"selected": true,
"text": "class ApplicationController < ActionController::Base\n\n before_filter :hijack_db\n\n def hijack_db\n db_name = reque... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58755",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/624/"
] |
58,774 | <p>I want to paste something I have cut from my desktop into a file open in Vi.</p>
<p>But if I paste the tabs embed on top of each other across the page.</p>
<p>I think it is some sort of visual mode change but can't find the command.</p>
| [
{
"answer_id": 58794,
"author": "Antti Kissaniemi",
"author_id": 2948,
"author_profile": "https://Stackoverflow.com/users/2948",
"pm_score": 7,
"selected": true,
"text": "autoindent <Esc> :set noai\n\n<paste all you want>\n\n<Esc> :set ai\n .exrc map ^P :set noai^M\nmap ^N :set ai^M\n pa... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6096/"
] |
58,782 | <p>I need to copy files using Windows command-line (available on XP Pro or later by default) and show progress during the process.</p>
<p>The progress indicator could be in a terminal or a GUI window. It is intended to be used during batch file scripting.</p>
| [
{
"answer_id": 58785,
"author": "Kent Boogaart",
"author_id": 5380,
"author_profile": "https://Stackoverflow.com/users/5380",
"pm_score": 4,
"selected": false,
"text": "robocopy"
},
{
"answer_id": 13695754,
"author": "djangofan",
"author_id": 118228,
"author_profile":... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58782",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
58,783 | <p>I know there are quite a few line count tools around. Is there something simple that's not a part some other big package that you use ?</p>
| [
{
"answer_id": 58811,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://Stackoverflow.com/users/5190",
"pm_score": 1,
"selected": false,
"text": "find . -name *.cs -exec wc -l {} \\;\n"
},
{
"answer_id": 212802,
"author": "Constantin",
"author_id"... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58783",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4694/"
] |
58,825 | <p>Has anyone else found VIM's syntax highlighting of Javascript sub-optimal? I'm finding that sometimes I need to scroll around in order to get the syntax highlighting adjusted, as sometimes it mysteriously drops all highlighting.</p>
<p>Are there any work-arounds or ways to fix this? I'm using vim 7.1.</p>
| [
{
"answer_id": 59211,
"author": "Thomas Kammeyer",
"author_id": 4410,
"author_profile": "https://Stackoverflow.com/users/4410",
"pm_score": 4,
"selected": false,
"text": ":syn sync fromstart\n :help syn-sync\n :help syntax\n"
},
{
"answer_id": 5652956,
"author": "Jose Elera",... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58825",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1693/"
] |
58,827 | <p>OK, I am not sure if the title it completely accurate, open to suggestions!</p>
<p>I am in the process of creating an ASP.NET custom control, this is something that is still relatively new to me, so please bear with me.</p>
<p>I am thinking about the event model. Since we are not using Web Controls there are no ev... | [
{
"answer_id": 59211,
"author": "Thomas Kammeyer",
"author_id": 4410,
"author_profile": "https://Stackoverflow.com/users/4410",
"pm_score": 4,
"selected": false,
"text": ":syn sync fromstart\n :help syn-sync\n :help syntax\n"
},
{
"answer_id": 5652956,
"author": "Jose Elera",... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58827",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/832/"
] |
58,831 | <p>My boss found a bug in a query I created, and I don't understand the reasoning behind the bug, although the query results prove he's correct. Here's the query (simplified version) before the fix:</p>
<pre><code>select PTNO,PTNM,CATCD
from PARTS
left join CATEGORIES on (CATEGORIES.CATCD=PARTS.CATCD);
</code></pre>... | [
{
"answer_id": 58902,
"author": "SQLMenace",
"author_id": 740,
"author_profile": "https://Stackoverflow.com/users/740",
"pm_score": 2,
"selected": false,
"text": "select id\nfrom sysobjects s\nleft join syscolumns c on s.id = c.id\n select id\nfrom sysobjects \nleft join syscolumns on s... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58831",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3751/"
] |
58,841 | <p>How can I get precompiled headers working with GCC?</p>
<p>I have had no luck in my attempts and I haven't seen many good examples for how to set it up. I've tried on <a href="https://en.wikipedia.org/wiki/Cygwin" rel="nofollow noreferrer">Cygwin</a> GCC 3.4.4 and using 4.0 on <a href="https://en.wikipedia.org/wiki... | [
{
"answer_id": 60577,
"author": "simon",
"author_id": 4875,
"author_profile": "https://Stackoverflow.com/users/4875",
"pm_score": 3,
"selected": false,
"text": "g++ $(CPPFLAGS) test.h\n"
},
{
"answer_id": 1191407,
"author": "Brian R. Bondy",
"author_id": 3153,
"author... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58841",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5200/"
] |
58,851 | <p>I am running an application through gdb and I want to set a breakpoint for any time a specific variable is accessed / changed. Is there a good method for doing this? I would also be interested in other ways to monitor a variable in C/C++ to see if/when it changes.</p>
| [
{
"answer_id": 58892,
"author": "mweerden",
"author_id": 4285,
"author_profile": "https://Stackoverflow.com/users/4285",
"pm_score": 3,
"selected": false,
"text": " $ cat gdbtest.c\n int abc = 43;\n\n int main()\n {\n abc = 10;\n }\n $ gcc -g -o gdbtest gdbtest.c\n $ gdb gdbtest\n ...\... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3022/"
] |
58,872 | <p>I've read in several places that the rectangle functions in emacs are very useful. I've read a bit about them, and I can't quite figure why. I mean, when you want to kill a paragraph, you mark the first row/column and then the last one, and that's actually a rectangle, right? But you can still use the normal kill..... | [
{
"answer_id": 58885,
"author": "David Webb",
"author_id": 3171,
"author_profile": "https://Stackoverflow.com/users/3171",
"pm_score": 6,
"selected": true,
"text": "M-x delete-rectangle M-x kill-rectangle M-x yank-rectangle 1. alligator alphorn\n2. baboon bugle\n3. crocodile ... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58872",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3785/"
] |
58,910 | <p>I've been trying to convert SVG images to PNG using C#, without having to write too much code. Can anyone recommend a library or example code for doing this?</p>
| [
{
"answer_id": 548553,
"author": "stevenvh",
"author_id": 66056,
"author_profile": "https://Stackoverflow.com/users/66056",
"pm_score": 3,
"selected": false,
"text": "procedure ExecNewProcess(ProgramName : String; Wait: Boolean);\nvar\n StartInfo : TStartupInfo;\n ProcInfo : TProcessIn... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5744/"
] |
58,916 | <p>Suppose I have a table called Companies that has a DepartmentID column. There's also a Departaments table that has as EmployeeID column. Of course I have an Employee table as well. The problem is that I want to delete a company, so first i have to delete all the employees for every departament and then all the depar... | [
{
"answer_id": 58943,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://Stackoverflow.com/users/5190",
"pm_score": 0,
"selected": false,
"text": "BEGIN\n delete from Employee where departmentId = 1;\n BEGIN\n delete from Department where companyId = 2;\n ... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58916",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1360/"
] |
58,925 | <p>I have any ASP.NET control. I want the HTML string how to do I get the HTML string of the control?</p>
| [
{
"answer_id": 58931,
"author": "David Basarab",
"author_id": 2469,
"author_profile": "https://Stackoverflow.com/users/2469",
"pm_score": 6,
"selected": true,
"text": "public string RenderControlToHtml(Control ControlToRender)\n{\n System.Text.StringBuilder sb = new System.Text.String... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58925",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2469/"
] |
58,937 | <p>Using VB.NET, how do I toggle the state of Caps Lock? </p>
| [
{
"answer_id": 58941,
"author": "GEOCHET",
"author_id": 5640,
"author_profile": "https://Stackoverflow.com/users/5640",
"pm_score": 4,
"selected": true,
"text": "Imports System.Runtime.InteropServices\n\nPublic Class Form2\n\n Private Declare Sub keybd_event Lib \"user32\" ( _\n ... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58937",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133/"
] |
58,939 | <p>I'm trying to get an event to fire whenever a choice is made from a <code>JComboBox</code>.</p>
<p>The problem I'm having is that there is no obvious <code>addSelectionListener()</code> method.</p>
<p>I've tried to use <code>actionPerformed()</code>, but it never fires.</p>
<p>Short of overriding the model for th... | [
{
"answer_id": 58963,
"author": "jodonnell",
"author_id": 4223,
"author_profile": "https://Stackoverflow.com/users/4223",
"pm_score": 9,
"selected": true,
"text": "combo.addActionListener (new ActionListener () {\n public void actionPerformed(ActionEvent e) {\n doSomething();\n... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58939",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2443/"
] |
58,940 | <p>I'm using SQL Server 2005, and I would like to know how to access different result sets from within transact-sql. The following stored procedure returns two result sets, how do I access them from, for example, another stored procedure?</p>
<pre><code>CREATE PROCEDURE getOrder (@orderId as numeric) AS
BEGIN
s... | [
{
"answer_id": 59015,
"author": "Brannon",
"author_id": 5745,
"author_profile": "https://Stackoverflow.com/users/5745",
"pm_score": 6,
"selected": true,
"text": "INSERT INTO #Table (...columns...)\nEXEC MySproc ...parameters...\n"
},
{
"answer_id": 879516,
"author": "Communit... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58940",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1836/"
] |
58,969 | <p>I'm starting to learn how to use PHPUnit to test the website I'm working on. The problem I'm running into is that I have five different user types defined and I need to be able to test every class with the different types. I currently have a user class and I would like to pass this to each function but I can't fig... | [
{
"answer_id": 63442,
"author": "Andrew Culver",
"author_id": 7549,
"author_profile": "https://Stackoverflow.com/users/7549",
"pm_score": 3,
"selected": true,
"text": "class User\n{\n public function commonFunctionality()\n {\n return 'Something';\n }\n\n public functi... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58969",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4437/"
] |
58,976 | <p>How do I find out whether or not Caps Lock is activated, using VB.NET?</p>
<p>This is a follow-up to my <a href="https://stackoverflow.com/questions/58937/how-do-i-toggle-caps-lock-in-vbnet">earlier question</a>.</p>
| [
{
"answer_id": 58991,
"author": "aku",
"author_id": 1196,
"author_profile": "https://Stackoverflow.com/users/1196",
"pm_score": 2,
"selected": false,
"text": "Declare Function GetKeyState Lib \"user32\" \n Alias \"GetKeyState\" (ByValnVirtKey As Int32) As Int16\n\nPrivate Const VK_CAPS... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58976",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133/"
] |
58,988 | <p>The Interface Segregation Principle (ISP) says that many client specific interfaces are better than one general purpose interface. Why is this important?</p>
| [
{
"answer_id": 17999321,
"author": "isJustMe",
"author_id": 571946,
"author_profile": "https://Stackoverflow.com/users/571946",
"pm_score": 3,
"selected": false,
"text": "public interface Reportable {\n\n void printPDF();\n void printWord();\n void printExcel();\n ... | 2008/09/12 | [
"https://Stackoverflow.com/questions/58988",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3012/"
] |
59,007 | <p>I'd like to automate TortoiseSVN as part of a commit process.
Specifically I'd like to dynamically create a log entry for the commit dialog.</p>
<p>I know that I can launch the commit dialog either from the commandline or by right clicking on a folder and selecting svncommit.</p>
<p>I'd like to use the start commi... | [
{
"answer_id": 59379,
"author": "Nathan Jones",
"author_id": 5848,
"author_profile": "https://Stackoverflow.com/users/5848",
"pm_score": 1,
"selected": false,
"text": "GenerateLogMsg.exe > tmp.msg\n\"C:\\Program Files\\TortoiseSVN\\bin\\TortoiseProc.exe\" /command:commit /path:. /logmsgf... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59007",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5427/"
] |
59,013 | <p>Context:
I'm in charge of running a service written in .NET. Proprietary application. It uses a SQL Server database. It ran as a user member of the Administrators group in the local machine. It worked alright before I added the machine to a domain.</p>
<p>So, I added the machine to a domain (Win 2003) and changed ... | [
{
"answer_id": 59071,
"author": "Mark Ingram",
"author_id": 986,
"author_profile": "https://Stackoverflow.com/users/986",
"pm_score": 3,
"selected": true,
"text": "HKEY_CURRENT_USER\\Control Panel\\International\n"
}
] | 2008/09/12 | [
"https://Stackoverflow.com/questions/59013",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5190/"
] |
59,016 | <p>The Open/Closed Principle states that software entities (classes, modules, etc.) should be open for extension, but closed for modification. What does this mean, and why is it an important principle of good object-oriented design?</p>
| [
{
"answer_id": 44913685,
"author": "maysara",
"author_id": 5503714,
"author_profile": "https://Stackoverflow.com/users/5503714",
"pm_score": 3,
"selected": false,
"text": "var juiceTypes = ['Mango','Apple','Lemon'];\nfunction juiceMaker(type){\n if(juiceTypes.indexOf(type)!=-1)\n ... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59016",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3012/"
] |
59,022 | <p>We are currently storing plain text passwords for a web app that we have. </p>
<p>I keep advocating moving to a password hash but another developer said that this would be less secure -- more passwords could match the hash and a dictionary/hash attack would be faster.</p>
<p>Is there any truth to this argument? ... | [
{
"answer_id": 59054,
"author": "Tim Howland",
"author_id": 4276,
"author_profile": "https://Stackoverflow.com/users/4276",
"pm_score": 1,
"selected": false,
"text": "String hashedPass=CryptUtils.MD5(\"alsdl;ksahglhkjfsdkjhkjhkfsdlsdf\" + user.getCreateDate().toString() + user.getPasswo... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5882/"
] |
59,044 | <p>Question is pretty self explanitory. I want to do a simple find and replace, like you would in a text editor on the data in a column of my database (which is MsSQL on MS Windows server 2003)</p>
| [
{
"answer_id": 59055,
"author": "SQLMenace",
"author_id": 740,
"author_profile": "https://Stackoverflow.com/users/740",
"pm_score": 8,
"selected": true,
"text": "a b UPDATE \n YourTable\nSET \n Column1 = REPLACE(Column1,'a','b')\nWHERE \n Column1 LIKE '%a%'\n"
},
{
"answ... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59044",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2908/"
] |
59,075 | <p>How do I save each sheet in an Excel workbook to separate <code>CSV</code> files with a macro?</p>
<p>I have an excel with multiple sheets and I was looking for a macro that will save each sheet to a separate <code>CSV (comma separated file)</code>. Excel will not allow you to save all sheets to different <code>CSV... | [
{
"answer_id": 59078,
"author": "Alex Duggleby",
"author_id": 5790,
"author_profile": "https://Stackoverflow.com/users/5790",
"pm_score": 4,
"selected": false,
"text": "Private Sub SaveAllSheetsAsCSV()\nOn Error GoTo Heaven\n\n' each sheet reference\nDim Sheet As Worksheet\n' path to out... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5790/"
] |
59,083 | <h2>Question</h2>
<p>Alright, I'm confused by all the buzzwords and press release bingo going on.</p>
<ul>
<li>What is the relationship between flash and flex:
<ul>
<li>Replace flash (not really compatible)</li>
<li>Enhance flash</li>
<li>The next version of flash but still basically compatible</li>
<li>Separate tec... | [
{
"answer_id": 2276350,
"author": "JD Isaacks",
"author_id": 46011,
"author_profile": "https://Stackoverflow.com/users/46011",
"pm_score": 2,
"selected": false,
"text": ".net"
}
] | 2008/09/12 | [
"https://Stackoverflow.com/questions/59083",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2915/"
] |
59,098 | <p>We have some Win32 console applications running on Windows Server 2003 Service Pack 2 that regularly fail with this:</p>
<blockquote>
<p>Error 1450 (<code>ERROR_NO_SYSTEM_RESOURCES</code>): "Insufficient system resources exist to complete the requested service."</p>
</blockquote>
<p>All the documentation we've f... | [
{
"answer_id": 139529,
"author": "MSalters",
"author_id": 15416,
"author_profile": "https://Stackoverflow.com/users/15416",
"pm_score": 0,
"selected": false,
"text": "ERROR_NO_SYSTEM_RESOURCES"
}
] | 2008/09/12 | [
"https://Stackoverflow.com/questions/59098",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5536/"
] |
59,099 | <p>Visually both of the following snippets produce the same UI. So why are there 2 controls..<br>
<strong>Snippet1</strong> </p>
<pre><code><TextBlock>Name:</TextBlock>
<TextBox Name="nameTextBox" />
</code></pre>
<p><strong>Snippet2</strong></p>
<pre><code><Label>Name:</Label>
<Tex... | [
{
"answer_id": 59104,
"author": "Gishu",
"author_id": 1695,
"author_profile": "https://Stackoverflow.com/users/1695",
"pm_score": 4,
"selected": false,
"text": "<Label Target=\"{Binding ElementName=nameTextBox}\">_Name:</Label>\n<TextBox x:Name=\"nameTextBox\" />\n"
},
{
"answer_... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59099",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1695/"
] |
59,102 | <p>Let's say that I'm writing a function to convert between temperature scales. I want to support at least Celsius, Fahrenheit, and Kelvin. Is it better to pass the source scale and target scale as separate parameters of the function, or some sort of combined parameter?</p>
<p>Example 1 - separate parameters:
function... | [
{
"answer_id": 59108,
"author": "jodonnell",
"author_id": 4223,
"author_profile": "https://Stackoverflow.com/users/4223",
"pm_score": 5,
"selected": true,
"text": "convertTemperature (TempScale.CELSIUS, TempScale.FAHRENHEIT, 22)\n"
},
{
"answer_id": 59117,
"author": "Adam Wri... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59102",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6126/"
] |
59,105 | <p>Almost 5 years ago Joel Spolsky wrote this article, <a href="http://www.joelonsoftware.com/articles/Unicode.html" rel="nofollow noreferrer">"The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)"</a>.</p>
<p>Like many, I read it carefully, real... | [
{
"answer_id": 59225,
"author": "OwenP",
"author_id": 2547,
"author_profile": "https://Stackoverflow.com/users/2547",
"pm_score": 2,
"selected": false,
"text": "StreamReader StreamWriter StringWriter Encoding.ASCII.GetBytes()"
}
] | 2008/09/12 | [
"https://Stackoverflow.com/questions/59105",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5023/"
] |
59,107 | <p>I'm converting an application to use Java 1.5 and have found the following method:</p>
<pre><code> /**
* Compare two Comparables, treat nulls as -infinity.
* @param o1
* @param o2
* @return -1 if o1&lt;o2, 0 if o1==o2, 1 if o1&gt;o2
*/
protected static int nullCompare(Comparable o1, Compar... | [
{
"answer_id": 59119,
"author": "jodonnell",
"author_id": 4223,
"author_profile": "https://Stackoverflow.com/users/4223",
"pm_score": 5,
"selected": true,
"text": "protected static <T extends Comparable<T>> int nullCompare(T o1, T o2) {\n"
},
{
"answer_id": 85739,
"author": "... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59107",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4389/"
] |
59,120 | <p>I am getting this error now that I hit version number 1.256.0:
Error 4 Invalid product version '1.256.0'. Must be of format '##.##.####'</p>
<p>The installer was fine with 1.255.0 but something with 256 (2^8) it doesn't like. I found this stated on msdn.com:
The Version property must be formatted as N.N.N, whe... | [
{
"answer_id": 59119,
"author": "jodonnell",
"author_id": 4223,
"author_profile": "https://Stackoverflow.com/users/4223",
"pm_score": 5,
"selected": true,
"text": "protected static <T extends Comparable<T>> int nullCompare(T o1, T o2) {\n"
},
{
"answer_id": 85739,
"author": "... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59120",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5967/"
] |
59,128 | <p>What GUI should use to run my JUnit tests, and how exactly do I do that? My entire background is in .NET, so I'm used to just firing up my NUnit gui and running my unit tests. If the lights are green, I'm clean. </p>
<p>Now, I have to write some Java code and want to run something similar using JUnit. The JUnit doc... | [
{
"answer_id": 11132066,
"author": "antonv",
"author_id": 472020,
"author_profile": "https://Stackoverflow.com/users/472020",
"pm_score": 1,
"selected": false,
"text": "junit.textui.TestRunner %your_class% junit.swingui.TestRunner [%your_class%]"
}
] | 2008/09/12 | [
"https://Stackoverflow.com/questions/59128",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
59,154 | <p>When I press F5 in Visual Studio 2008, I want Google Chrome launched as the browser that my ASP.NET app runs in. May I know how this can be done?</p>
| [
{
"answer_id": 44865188,
"author": "Soenhay",
"author_id": 1339704,
"author_profile": "https://Stackoverflow.com/users/1339704",
"pm_score": 2,
"selected": false,
"text": "C:\\Users\\[UserName]\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe\n"
},
{
"answer_id": 72770808... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59154",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3834/"
] |
59,166 | <p>So I have an object which has some fields, doesn't really matter what.
I have a generic list of these objects.</p>
<pre><code>List<MyObject> myObjects = new List<MyObject>();
myObjects.Add(myObject1);
myObjects.Add(myObject2);
myObjects.Add(myObject3);
</code></pre>
<p>So I want to remove objects from my... | [
{
"answer_id": 59172,
"author": "Erik van Brakel",
"author_id": 909,
"author_profile": "https://Stackoverflow.com/users/909",
"pm_score": 7,
"selected": true,
"text": "myObjects.RemoveAll(delegate (MyObject m) { return m.X >= 10; });\n myObjects.RemoveAll(m => m.X >= 10);\n"
},
{
... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59166",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/454247/"
] |
59,181 | <p>I have a WCF service that gets called from client side JavaScript. The call fails with a Service is null JavaScript error. WebDevelopment helper trace shows that the calls to load the jsdebug support file results in a 404 (file not found) error. </p>
<p>Restarting IIS or clearing out the Temp ASP.Net files or setti... | [
{
"answer_id": 59764,
"author": "rams",
"author_id": 3635,
"author_profile": "https://Stackoverflow.com/users/3635",
"pm_score": 5,
"selected": true,
"text": "<services>\n <service name=\"MyService\">\n <endpoint address=\"\" behaviorConfiguration=\"MyServiceAspNetAjaxBehavio... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59181",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3635/"
] |
59,182 | <p>What is the best way to keep an asp:button from displaying it's URL on the status bar of the browser? The button is currently defines like this:</p>
<pre><code><asp:button id="btnFind"
runat="server"
Text="Find Info"
onclick="btnFind_Click">
</asp:button>
</code><... | [
{
"answer_id": 59234,
"author": "FlySwat",
"author_id": 1965,
"author_profile": "https://Stackoverflow.com/users/1965",
"pm_score": -1,
"selected": false,
"text": "javascript:__doPostBack('btn','');\n btnFind.Attributes.Add(\"onmouseover\",\"window.status = '';\");\nbtnFind.Attributes.Ad... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59182",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/206/"
] |
59,191 | <p>I'm using a deploy project to deploy my ASP.net web application.
When I build the deploy project, all the .compiled files are re-created.</p>
<p>Do I need to FTP them to the production web server?<br>
If I do a small change do I need to copy all the web site again?</p>
| [
{
"answer_id": 2142674,
"author": "Bob",
"author_id": 45,
"author_profile": "https://Stackoverflow.com/users/45",
"pm_score": 0,
"selected": false,
"text": ".compiled -r"
}
] | 2008/09/12 | [
"https://Stackoverflow.com/questions/59191",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2385/"
] |
59,213 | <p>What's the easiest way to add a header and footer to a .Net PrintDocument object, either pragmatically or at design-time?</p>
<p>Specifically I'm trying to print a 3rd party grid control (Infragistics GridEx v4.3), which takes a PrintDocument object and draws itself into it.</p>
<p>The resulting page just contains... | [
{
"answer_id": 224934,
"author": "Andrew",
"author_id": 5662,
"author_profile": "https://Stackoverflow.com/users/5662",
"pm_score": 3,
"selected": false,
"text": "Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click\n\n Dim ... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59213",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5662/"
] |
59,217 | <p>Is there a built in function in .NET 2.0 that will take two arrays and merge them into one array?</p>
<p>The arrays are both of the same type. I'm getting these arrays from a widely used function within my code base and can't modify the function to return the data in a different format.</p>
<p>I'm looking to avoid... | [
{
"answer_id": 59233,
"author": "Joel Coehoorn",
"author_id": 3043,
"author_profile": "https://Stackoverflow.com/users/3043",
"pm_score": 3,
"selected": false,
"text": "Array.Copy() List<T> .AddRange()"
},
{
"answer_id": 59246,
"author": "apandit",
"author_id": 6128,
... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3058/"
] |
59,220 | <p>I'm writing a utility for myself, partly as an exercise in learning C# Reflection and partly because I actually want the resulting tool for my own use.</p>
<p>What I'm after is basically pointing the application at an assembly and choosing a given class from which to select properties that should be included in an ... | [
{
"answer_id": 59243,
"author": "Kent Boogaart",
"author_id": 5380,
"author_profile": "https://Stackoverflow.com/users/5380",
"pm_score": 5,
"selected": true,
"text": "AppDomain.AssemblyResolve LoadFile AppDomain AppDomain Assembly.ReflectionOnlyLoad"
},
{
"answer_id": 37060921,
... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59220",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1124/"
] |
59,221 | <p>I am using ActiveScaffold in a Ruby on Rails app, and to save space in the table I have replaced the default "actions" text in the table (ie. "edit", "delete", "show") with icons using CSS. I have also added a couple of custom actions with action_link.add ("move" and "copy").</p>
<p>For clarity, <strong>I would lik... | [
{
"answer_id": 59226,
"author": "Joel Coehoorn",
"author_id": 3043,
"author_profile": "https://Stackoverflow.com/users/3043",
"pm_score": 1,
"selected": false,
"text": "alt background:url(...);"
},
{
"answer_id": 59228,
"author": "Prestaul",
"author_id": 5628,
"author... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59221",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3764/"
] |
59,232 | <p>What's the simplest SQL statement that will return the duplicate values for a given column and the count of their occurrences in an Oracle database table?</p>
<p>For example: I have a <code>JOBS</code> table with the column <code>JOB_NUMBER</code>. How can I find out if I have any duplicate <code>JOB_NUMBER</code>... | [
{
"answer_id": 59242,
"author": "Bill the Lizard",
"author_id": 1288,
"author_profile": "https://Stackoverflow.com/users/1288",
"pm_score": 10,
"selected": true,
"text": "SELECT column_name, COUNT(column_name)\nFROM table_name\nGROUP BY column_name\nHAVING COUNT(column_name) > 1;\n"
},... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59232",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5662/"
] |
59,267 | <p>Starting from ASP.NET MVC Preview 3, HTML.Button ( and other related HTML controls) are no longer supported.</p>
<p>The question is, what is the equivalent for them? I've an app that was built using Preview 2, now I have to make it compatible with the latest CTP releases.</p>
| [
{
"answer_id": 59271,
"author": "Joel Coehoorn",
"author_id": 3043,
"author_profile": "https://Stackoverflow.com/users/3043",
"pm_score": 4,
"selected": false,
"text": "<input type=\"button\" ... />"
},
{
"answer_id": 59286,
"author": "Thunder3",
"author_id": 2832,
"a... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59267",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3834/"
] |
59,280 | <p>I need to update a <code>combobox</code> with a new value so it changes the reflected text in it. The cleanest way to do this is after the <code>combobox</code>has been initialised and with a message.</p>
<p>So I am trying to craft a <code>postmessage</code> to the hwnd that contains the <code>combobox</code>.</p>
... | [
{
"answer_id": 59317,
"author": "Simon Steele",
"author_id": 4591,
"author_profile": "https://Stackoverflow.com/users/4591",
"pm_score": 4,
"selected": true,
"text": "ComboBox_SetCurSel(hWndCombo, n);\n m_combo.SetCurSel(2);\n"
},
{
"answer_id": 59350,
"author": "Mark Ingram"... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59280",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/342/"
] |
59,294 | <p>I have the following query:</p>
<pre><code>select column_name, count(column_name)
from table
group by column_name
having count(column_name) > 1;
</code></pre>
<p>What would be the difference if I replaced all calls to <code>count(column_name)</code> to <code>count(*)</code>?</p>
<p>This question was inspired b... | [
{
"answer_id": 59302,
"author": "SQLMenace",
"author_id": 740,
"author_profile": "https://Stackoverflow.com/users/740",
"pm_score": 9,
"selected": true,
"text": "count(*) count(column) create table #bla(id int,id2 int)\ninsert #bla values(null,null)\ninsert #bla values(1,null)\ninsert #b... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59294",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1288/"
] |
59,297 | <p>When setting up foreign keys in SQL Server, under what circumstances should you have it cascade on delete or update, and what is the reasoning behind it?</p>
<p>This probably applies to other databases as well.</p>
<p>I'm looking most of all for concrete examples of each scenario, preferably from someone who has u... | [
{
"answer_id": 216301,
"author": "WW.",
"author_id": 14663,
"author_profile": "https://Stackoverflow.com/users/14663",
"pm_score": 2,
"selected": false,
"text": " DELETE FROM table WHERE SomeDate < 7 years ago;\n FOR EACH R IN (SELECT FROM table WHERE SomeDate < 7 years ago) LOOP\n DE... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59297",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3043/"
] |
59,299 | <p>I'm migrating a Hibernate application's cache from EHCache to JBoss TreeCache.
I'm trying to find how to configure the equivalent to maxElementsOnDisk to limit the cache size on disk, but I couldn't find anything similar to configure in a FileCacheLoader with passivation activated.</p>
<p>Thanks</p>
| [
{
"answer_id": 61394,
"author": "Mat Mannion",
"author_id": 6282,
"author_profile": "https://Stackoverflow.com/users/6282",
"pm_score": 2,
"selected": false,
"text": "<attribute name=\"MaxCapacity\">20000</attribute>"
}
] | 2008/09/12 | [
"https://Stackoverflow.com/questions/59299",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5425/"
] |
59,309 | <p>What is the best way to vertically center the content of a div when the height of the content is variable. In my particular case, the height of the container div is fixed, but it would be great if there were a solution that would work in cases where the container has a variable height as well. Also, I would love a ... | [
{
"answer_id": 59324,
"author": "Prestaul",
"author_id": 5628,
"author_profile": "https://Stackoverflow.com/users/5628",
"pm_score": 4,
"selected": false,
"text": "position:table\\table-cell <div class=\"valign-outer\">\n <div class=\"valign-middle\">\n <div class=\"valign-inne... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59309",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5651/"
] |
59,322 | <p>I have the following code:</p>
<pre><code>SELECT <column>, count(*)
FROM <table>
GROUP BY <column> HAVING COUNT(*) > 1;
</code></pre>
<p>Is there any difference to the results or performance if I replace the COUNT(*) with COUNT('x')?</p>
<p>(This question is related to a <a href="https://stac... | [
{
"answer_id": 59385,
"author": "Brannon",
"author_id": 5745,
"author_profile": "https://Stackoverflow.com/users/5745",
"pm_score": 2,
"selected": false,
"text": "select count(*) from table\n"
},
{
"answer_id": 59412,
"author": "Matt Rogish",
"author_id": 2590,
"autho... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59322",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5662/"
] |
59,331 | <p>Suppose I have <code>fileA.h</code> which declares a class <code>classA</code> with template function <code>SomeFunc<T>()</code>. This function is implemented directly in the header file (as is usual for template functions). Now I add a specialized implementation of <code>SomeFunc()</code> (like for <code>Some... | [
{
"answer_id": 59359,
"author": "Brandon",
"author_id": 5959,
"author_profile": "https://Stackoverflow.com/users/5959",
"pm_score": 0,
"selected": false,
"text": "SomeFunc<int>()"
},
{
"answer_id": 59361,
"author": "Serge",
"author_id": 1007,
"author_profile": "https:... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59331",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2148773/"
] |
59,357 | <p><strong>Edit</strong>: Let me completely rephrase this, because I'm not sure there's an XML way like I was originally describing.</p>
<p><strong>Yet another edit</strong>: This needs to be a repeatable process, and it has to be able to be set up in a way that it can be called in C# code.</p>
<p>In database A, I h... | [
{
"answer_id": 59407,
"author": "Josef",
"author_id": 5581,
"author_profile": "https://Stackoverflow.com/users/5581",
"pm_score": 1,
"selected": false,
"text": "SELECT declare @xml xml \nset @xml='<People Key=\"1\" FirstName=\"Bob\" LastName=\"Smith\">\n <PeopleAddresses PeopleKey=\"1\"... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59357",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5486/"
] |
59,380 | <p>I have a wildcard subdomain enabled and dynamically parse the URL by passing it as-is to my <code>index.php</code> (ex. <code>somecity.domain.com</code>). </p>
<p>Now, I wish to create a few subdomains that are static where I can install different application and not co-mingle with my current one (ex. <code>blog.d... | [
{
"answer_id": 59403,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 0,
"selected": false,
"text": "NameVirtualHost *:80\n\n# Begin virtual host directives.\n\n<VirtualHost *:80>\n\n# myblog.com virtual host.\n\nServerAdmin web... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6140/"
] |
59,390 | <p>In a ColdFusion Component (CFC), is it necessary to use fully qualified names for variables-scoped variables?</p>
<p>Am I going to get myself into trouble if I change this:</p>
<pre><code><cfcomponent>
<cfset variables.foo = "a private instance variable">
<cffunction name = "doSomething">... | [
{
"answer_id": 59554,
"author": "Soldarnal",
"author_id": 3420,
"author_profile": "https://Stackoverflow.com/users/3420",
"pm_score": 4,
"selected": true,
"text": "<cfcomponent>\n <cfset foo = \"a private instance variable\">\n\n <cffunction name=\"doSomething\">\n <cfargume... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59390",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/437/"
] |
59,396 | <p>I have a Data Access Object TransactionDao. When you call TransactionDao.Save(transaction) I would like for it to setting a transaction.IsSaved=true flag (this is a simplification the actual thing I'm trying to do is not quite so banal). So when mocking my TransactionDao with RhinoMocks how can I indicate that it ... | [
{
"answer_id": 59420,
"author": "chrissie1",
"author_id": 2936,
"author_profile": "https://Stackoverflow.com/users/2936",
"pm_score": -1,
"selected": false,
"text": "ITransaction transaction = _Mocker.dynamicMock<ITransaction>;\nExpect.Call(transaction.IsSaved).IgnoreArguments.Return(tru... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59396",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5056/"
] |
59,422 | <p>Is accessing a <strong>bool</strong> field atomic in C#? In particular, do I need to put a lock around:</p>
<pre><code>class Foo
{
private bool _bar;
//... in some function on any thread (or many threads)
_bar = true;
//... same for a read
if (_bar) { ... }
}
</code></pre>
| [
{
"answer_id": 59505,
"author": "McKenzieG1",
"author_id": 3776,
"author_profile": "https://Stackoverflow.com/users/3776",
"pm_score": 5,
"selected": false,
"text": "_bar _bar _bar volatile Thread.MemoryBarrier()"
},
{
"answer_id": 106301,
"author": "Dror Helper",
"author... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59422",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/838/"
] |
59,423 | <p>I've got the following in my .css file creating a little image next to each link on my site:</p>
<pre class="lang-css prettyprint-override"><code>div.post .text a[href^="http:"]
{
background: url(../../pics/remote.gif) right top no-repeat;
padding-right: 10px;
white-space: nowrap;
}
</code></pre>
<p>Ho... | [
{
"answer_id": 59448,
"author": "Thunder3",
"author_id": 2832,
"author_profile": "https://Stackoverflow.com/users/2832",
"pm_score": 1,
"selected": false,
"text": "<a> div.post .text a.noimage{\n background:none;\n}\n"
},
{
"answer_id": 59454,
"author": "scunliffe",
"au... | 2008/09/12 | [
"https://Stackoverflow.com/questions/59423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1683/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.