qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
10,915
<p>Warning - I am very new to NHibernate. I know this question seems simple - and I'm sure there's a simple answer, but I've been spinning my wheels for some time on this one. I am dealing with a legacy db which really can't be altered structurally. I have a details table which lists payment plans that have been accept...
[ { "answer_id": 11164, "author": "DavidWhitney", "author_id": 1297, "author_profile": "https://Stackoverflow.com/users/1297", "pm_score": 3, "selected": true, "text": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<hibernate-mapping default-cascade=\"save-update\" xmlns=\"urn:nhibernate-ma...
2008/08/14
[ "https://Stackoverflow.com/questions/10915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1284/" ]
10,926
<p>I'm building a listing/grid control in a <code>Flex</code> application and using it in a <code>.NET</code> web application. To make a really long story short I am getting XML from a webservice of serialized objects. I have a page limit of how many things can be on a page. I've taken a data grid and made it page, ...
[ { "answer_id": 11048, "author": "Matt Dillard", "author_id": 863, "author_profile": "https://Stackoverflow.com/users/863", "pm_score": 0, "selected": false, "text": "delete idOfReplacee delete (this._DataPages[this._Options.PageIndex].Data..(@Id == idOfReplacee)[0]);\n Data" }, { ...
2008/08/14
[ "https://Stackoverflow.com/questions/10926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1290/" ]
10,933
<p>We have an SVN repository running on a Windows server, and I want to link internal documentation, feature changes, bugs and so on to code changes.</p> <p>We've found WebSVN to be amazingly slow - the repository is too large for it (I think).</p> <p>The team using it is primarily coding in C#, and while some have e...
[ { "answer_id": 11772, "author": "icco", "author_id": 1063, "author_profile": "https://Stackoverflow.com/users/1063", "pm_score": 2, "selected": false, "text": "svn log --xml\n" } ]
2008/08/14
[ "https://Stackoverflow.com/questions/10933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/905/" ]
10,949
<p>Let's say I have a complex .NET class, with lots of arrays and other class object members. I need to be able to generate a deep clone of this object - so I write a Clone() method, and implement it with a simple BinaryFormatter serialize/deserialize - or perhaps I do the deep clone using some other technique which i...
[ { "answer_id": 24166, "author": "Andrew", "author_id": 1948, "author_profile": "https://Stackoverflow.com/users/1948", "pm_score": 1, "selected": false, "text": "[Conditional(\"DEBUG\")]\npublic static void DebugAssertValueEquality<T>(T current, T other, bool expected, \n ...
2008/08/14
[ "https://Stackoverflow.com/questions/10949", "https://Stackoverflow.com", "https://Stackoverflow.com/users/987/" ]
10,985
<p>Does anyone know how I can, in platform-independent C++ code prevent an object from being created on the heap? That is, for a class "Foo", I want to prevent users from doing this:</p> <pre><code>Foo *ptr = new Foo; </code></pre> <p>and only allow them to do this:</p> <pre><code>Foo myfooObject; </code></pre> <p>...
[ { "answer_id": 11003, "author": "Nick", "author_id": 1236, "author_profile": "https://Stackoverflow.com/users/1236", "pm_score": 4, "selected": false, "text": "class Foo {\nprivate:\n void* operator new(size_t size);\n};\n" }, { "answer_id": 11014, "author": "pauldoo", "...
2008/08/14
[ "https://Stackoverflow.com/questions/10985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1304/" ]
10,990
<p>Sorry for the basic question - I'm a .NET developer and don't have much experience with LAMP setups.</p> <p>I have a PHP site that will allow uploads to a specific folder. I have been told that this folder needs to be owned by the webserver user for the upload process to work, so I created the folder and then set p...
[ { "answer_id": 11029, "author": "Max", "author_id": 1309, "author_profile": "https://Stackoverflow.com/users/1309", "pm_score": 4, "selected": false, "text": "move_uploaded_file" }, { "answer_id": 9460755, "author": "M. Ahmad Zafar", "author_id": 462732, "author_profi...
2008/08/14
[ "https://Stackoverflow.com/questions/10990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1153/" ]
11,028
<p>When I'm joining three or more tables together by a common column, I'd write my query like this:</p> <pre><code>SELECT * FROM a, b, c WHERE a.id = b.id AND b.id = c.id </code></pre> <p>a colleague recently asked my why I didn't do explicit <em>Join Transitive Closure</em> in my queries like this:</p> <pre><...
[ { "answer_id": 11114, "author": "Stu", "author_id": 414, "author_profile": "https://Stackoverflow.com/users/414", "pm_score": 2, "selected": false, "text": "Select\n * -- Oh, and don't ever use *, either\nFrom\n A \n Inner Join B On A.ID = B.ID\n Inner Join C On B.ID = C.ID\n" } ]
2008/08/14
[ "https://Stackoverflow.com/questions/11028", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1030/" ]
11,043
<p>What are the pros and cons of using table aliases in SQL? I personally try to avoid them, as I think they make the code less readable (especially when reading through large where/and statements), but I'd be interested in hearing any counter-points to this. When is it generally a good idea to use table aliases, and...
[ { "answer_id": 11053, "author": "Rob Allen", "author_id": 149, "author_profile": "https://Stackoverflow.com/users/149", "pm_score": 6, "selected": true, "text": "select person.FirstName\n ,person.LastName\n ,addr.StreetAddress\n ,addr.City\n ,addr.State\n ,addr.Z...
2008/08/14
[ "https://Stackoverflow.com/questions/11043", "https://Stackoverflow.com", "https://Stackoverflow.com/users/637/" ]
11,045
<p>How can I get a user-defined function to re-evaluate itself based on changed data in the spreadsheet?</p> <p>I tried <strong><kbd>F9</kbd></strong> and <strong><kbd>Shift</kbd>+<kbd>F9</kbd></strong>.</p> <p>The only thing that seems to work is editing the cell with the function call and then pressing Enter.</p>
[ { "answer_id": 12018, "author": "vzczc", "author_id": 224, "author_profile": "https://Stackoverflow.com/users/224", "pm_score": 8, "selected": true, "text": "Application.Volatile Function doubleMe(d)\n Application.Volatile\n doubleMe = d * 2\nEnd Function\n" }, { "answer_id...
2008/08/14
[ "https://Stackoverflow.com/questions/11045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/767/" ]
11,060
<p>This is a difficult and open-ended question I know, but I thought I'd throw it to the floor and see if anyone had any interesting suggestions.</p> <p>I have developed a code-generator that takes our python interface to our C++ code (generated via SWIG) and generates code needed to expose this as WebServices. When ...
[ { "answer_id": 70778, "author": "0124816", "author_id": 11521, "author_profile": "https://Stackoverflow.com/users/11521", "pm_score": 0, "selected": false, "text": "int x = 0;\nGENERATED_CODE\nassert(x == 100);\n" }, { "answer_id": 2870088, "author": "Sean B", "author_id"...
2008/08/14
[ "https://Stackoverflow.com/questions/11060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/912/" ]
11,085
<p>In Perl, an object is just a reference to any of the basic Perl data types that has been blessed into a particular class. When you use the ref() function on an unblessed reference, you are told what data type the reference points to. However, when you call ref() on a blessed reference, you are returned the name of...
[ { "answer_id": 64160, "author": "Michael Carman", "author_id": 8233, "author_profile": "https://Stackoverflow.com/users/8233", "pm_score": 5, "selected": true, "text": "Scalar::Util::reftype() Scalar::Util UNIVERSAL::isa() $x->isa('HASH') # if $x is known to be an object\nUNI...
2008/08/14
[ "https://Stackoverflow.com/questions/11085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/166/" ]
11,088
<p>In Java, there is no such thing as an unsigned byte.</p> <p>Working with some low level code, occasionally you need to work with bytes that have unsigned values greater than 128, which causes Java to interpret them as a negative number due to the MSB being used for sign.</p> <p>What's a good way to work around thi...
[ { "answer_id": 11101, "author": "pauldoo", "author_id": 755, "author_profile": "https://Stackoverflow.com/users/755", "pm_score": 5, "selected": true, "text": "byte[] foobar = ..;\nint value = foobar[10];\nif (value < 0) value += 256 // Patch up the 'falsely' negative value\n" }, { ...
2008/08/14
[ "https://Stackoverflow.com/questions/11088", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1309/" ]
11,099
<p>In the case of languages that support single decision and action without brackets, such as the following example:</p> <pre><code>if (var == true) doSomething(); </code></pre> <p>What is the preferred way of writing this? Should brackets always be used, or should their usage be left as a preference of the indiv...
[ { "answer_id": 11106, "author": "Jon Limjap", "author_id": 372, "author_profile": "https://Stackoverflow.com/users/372", "pm_score": 2, "selected": false, "text": "if (cond1)\n{\n SomeOperation();\n Another();\n}\nelseif (cond2)\n{\n DoSomething();\n}\nelse\n{\n DoNothing();\n ...
2008/08/14
[ "https://Stackoverflow.com/questions/11099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1185/" ]
11,112
<p>Most wiki software I've presents lots of "features" on their pages. This is fine for desktop users, but is annoying when using an iPhone or other mobile device. <br /><br />I'd prefer pages that just had the content, along with maybe an Edit button and a Search button. The editors are also often too fancy for mob...
[ { "answer_id": 11106, "author": "Jon Limjap", "author_id": 372, "author_profile": "https://Stackoverflow.com/users/372", "pm_score": 2, "selected": false, "text": "if (cond1)\n{\n SomeOperation();\n Another();\n}\nelseif (cond2)\n{\n DoSomething();\n}\nelse\n{\n DoNothing();\n ...
2008/08/14
[ "https://Stackoverflow.com/questions/11112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175/" ]
11,127
<p>In a C++ Windows (XP and NT, if it makes a difference) application I'm working on, I need to get the network name associated with the computer the code is executing on, so that I can convert local filenames from C:\filename.ext to \\network_name\C$\filename.ext. How would I do this?</p> <p>Alternatively, if there's...
[ { "answer_id": 71343, "author": "jilles de wit", "author_id": 7531, "author_profile": "https://Stackoverflow.com/users/7531", "pm_score": 1, "selected": false, "text": "#include <winsock2.h> //of course this is the way to go on windows only\n\n#pragma comment(lib, \"Ws2_32.lib\")\n\nvoid...
2008/08/14
[ "https://Stackoverflow.com/questions/11127", "https://Stackoverflow.com", "https://Stackoverflow.com/users/179/" ]
11,135
<p>I need to create an ASP page (classic, not ASP.NET) which runs remote shell scripts on a UNIX server, then captures the output into variables in VBScript within the page itself.</p> <p>I have never done ASP or VBScipt before. I have tried to google this stuff, but all I find are references to remote server side scr...
[ { "answer_id": 71343, "author": "jilles de wit", "author_id": 7531, "author_profile": "https://Stackoverflow.com/users/7531", "pm_score": 1, "selected": false, "text": "#include <winsock2.h> //of course this is the way to go on windows only\n\n#pragma comment(lib, \"Ws2_32.lib\")\n\nvoid...
2008/08/14
[ "https://Stackoverflow.com/questions/11135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311/" ]
11,145
<p>I am trying to code a flowchart generator for a language using Ruby. </p> <p>I wanted to know if there were any libraries that I could use to draw various shapes for the various flowchart elements and write out text to those shapes. </p> <p>I would really prefer not having to write code for drawing basic shapes, i...
[ { "answer_id": 11191, "author": "Nathan Clark", "author_id": 1331, "author_profile": "https://Stackoverflow.com/users/1331", "pm_score": 2, "selected": false, "text": "draw.rectangle(x1, y1, x2, y2)\ndraw.polygon(x1, y1,...,xN, yN)\n" }, { "answer_id": 12120, "author": "Mike ...
2008/08/14
[ "https://Stackoverflow.com/questions/11145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311/" ]
11,194
<p>We're working on a Log Viewer. The use will have the option to filter by user, severity, etc. In the Sql days I'd add to the query string, but I want to do it with Linq. How can I conditionally add where-clauses?</p>
[ { "answer_id": 11201, "author": "TheSmurf", "author_id": 1975282, "author_profile": "https://Stackoverflow.com/users/1975282", "pm_score": 0, "selected": false, "text": "var items = dc.Users.Where(l => l.Date == DateTime.Today && l.Severity == \"Critical\")\n" }, { "answer_id": 1...
2008/08/14
[ "https://Stackoverflow.com/questions/11194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1204/" ]
11,200
<p>I'm guessing it needs to be something like:</p> <pre><code>CONVERT(CHAR(24), lastModified, 101) </code></pre> <p>However I'm not sure of the right value for the third parameter.</p> <p>Thanks!</p> <hr> <p>Well I'm trying to write a script to copy my sql server db to a sqlite file, which gets downloaded to an ai...
[ { "answer_id": 11216, "author": "SQLMenace", "author_id": 740, "author_profile": "https://Stackoverflow.com/users/740", "pm_score": 2, "selected": false, "text": "SELECT DATEDIFF(s,'19700101 05:00:00:000',lastModified)\n" }, { "answer_id": 11234, "author": "SQLMenace", "a...
2008/08/14
[ "https://Stackoverflow.com/questions/11200", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26/" ]
11,219
<p>I'd like to start moving our application business layers into a collection of REST web services. However, most of our Intranet has been built using Classic ASP and most of the developers where I work keep programming in Classic ASP. Ideally, then, for them to benefit from the advantages of a unique set of web APIs, ...
[ { "answer_id": 11238, "author": "KP.", "author_id": 439, "author_profile": "https://Stackoverflow.com/users/439", "pm_score": 6, "selected": true, "text": "Set HttpReq = Server.CreateObject(\"MSXML2.ServerXMLHTTP\")\nHttpReq.open \"GET\", \"Rest_URI\", False\nHttpReq.send\n" }, { ...
2008/08/14
[ "https://Stackoverflow.com/questions/11219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/160/" ]
11,279
<p>I have a small VB.NET application that I'm working on using the full version of Visual Studio 2005. In the <strong>Publish</strong> properties of the project, I have it set to <em>Automatically increment revision with each publish</em>.</p> <p>The issue is that it's only incrementing the revision in the Setup files...
[ { "answer_id": 11297, "author": "Stu", "author_id": 414, "author_profile": "https://Stackoverflow.com/users/414", "pm_score": 2, "selected": true, "text": "Me.LabelVersion.Text = String.Format(\"Version {0}\", My.Application.Deployment.CurrentVersion.ToString)\n" }, { "answer_id"...
2008/08/14
[ "https://Stackoverflow.com/questions/11279", "https://Stackoverflow.com", "https://Stackoverflow.com/users/305/" ]
11,288
<p>So WPF doesn't support standard sorting or filtering behavior for views of CompositeCollections, so what would be a best practice for solving this problem. </p> <p>There are two or more object collections of different types. You want to combine them into a single sortable and filterable collection (withing having t...
[ { "answer_id": 11297, "author": "Stu", "author_id": 414, "author_profile": "https://Stackoverflow.com/users/414", "pm_score": 2, "selected": true, "text": "Me.LabelVersion.Text = String.Format(\"Version {0}\", My.Application.Deployment.CurrentVersion.ToString)\n" }, { "answer_id"...
2008/08/14
[ "https://Stackoverflow.com/questions/11288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1346/" ]
11,291
<p>I'm slowly learning Objective-C and Cocoa, and the only way I see so far to capture key events in Text Views is to use delegation, but I'm having trouble finding useful documentation and examples on how to implement such a solution. Can anyone point me in the right direction or supply some first-hand help? </p>
[ { "answer_id": 11312, "author": "TheSmurf", "author_id": 1975282, "author_profile": "https://Stackoverflow.com/users/1975282", "pm_score": 5, "selected": true, "text": "- (void)keyUp:(NSEvent *)theEvent\n" }, { "answer_id": 12874, "author": "Brian Warshaw", "author_id": 1...
2008/08/14
[ "https://Stackoverflow.com/questions/11291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1344/" ]
11,305
<p>I work in VBA, and want to parse a string eg</p> <pre><code>&lt;PointN xsi:type='typens:PointN' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema'&gt; &lt;X&gt;24.365&lt;/X&gt; &lt;Y&gt;78.63&lt;/Y&gt; &lt;/PointN&gt; </code></pre> <p>and get the X &amp; Y...
[ { "answer_id": 11406, "author": "Devdatta Tengshe", "author_id": 895, "author_profile": "https://Stackoverflow.com/users/895", "pm_score": 6, "selected": false, "text": "Dim objXML As MSXML2.DOMDocument\n\nSet objXML = New MSXML2.DOMDocument\n\nIf Not objXML.loadXML(strXML) Then 'strXML...
2008/08/14
[ "https://Stackoverflow.com/questions/11305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/895/" ]
11,311
<p>Is it possible to format certain text in a WinForm Label instead of breaking the text into multiple labels? Please disregard the HTML tags within the label's text; it's only used to get my point out.</p> <p>For example:</p> <pre><code>Dim myLabel As New Label myLabel.Text = "This is &lt;b&gt;bold&lt;/b&gt; text. ...
[ { "answer_id": 24207716, "author": "Geoff", "author_id": 55487, "author_profile": "https://Stackoverflow.com/users/55487", "pm_score": 4, "selected": false, "text": "Links.Add() linkLabel1.Text = \"You are accessing a government system, and all activity \" +\n \"will be ...
2008/08/14
[ "https://Stackoverflow.com/questions/11311", "https://Stackoverflow.com", "https://Stackoverflow.com/users/299/" ]
11,318
<p>Imagine you want to animate some object on a WinForm. You setup a timer to update the state or model, and override the paint event of the Form. But from there, what's the best way to continually repaint the Form for the animation?</p> <ul> <li>Invalidate the Form as soon as you are done drawing?</li> <li>Setup a se...
[ { "answer_id": 11404, "author": "Peteter", "author_id": 1192, "author_profile": "https://Stackoverflow.com/users/1192", "pm_score": 4, "selected": true, "text": "private void AnimationTimer_Tick(object sender, EventArgs args)\n{\n // First paint background, like Clear(Control.Backgrou...
2008/08/14
[ "https://Stackoverflow.com/questions/11318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/322/" ]
11,330
<p>Let's say I'm creating a chess program. I have a function</p> <pre><code>void foreachMove( void (*action)(chess_move*), chess_game* game); </code></pre> <p>which will call the function pointer action on each valid move. This is all well and good, but what if I need to pass more parameters to the action function? ...
[ { "answer_id": 11335, "author": "Antonio Haley", "author_id": 390, "author_profile": "https://Stackoverflow.com/users/390", "pm_score": 3, "selected": false, "text": "void foreachMove( void (*action)(chess_move*, int), chess_game* game )\n" }, { "answer_id": 11379, "author": ...
2008/08/14
[ "https://Stackoverflow.com/questions/11330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/432/" ]
11,341
<p>I would like to automatically generate PDF documents from <a href="https://en.wikipedia.org/wiki/WebObjects" rel="nofollow noreferrer">WebObjects</a> based on mulitpage forms. Assuming I have a class which can assemble the related forms (java/wod files) is there a good way to then parse the individual forms into a P...
[ { "answer_id": 13431, "author": "Chris Hanson", "author_id": 714, "author_profile": "https://Stackoverflow.com/users/714", "pm_score": 3, "selected": true, "text": "WOComponent" } ]
2008/08/14
[ "https://Stackoverflow.com/questions/11341", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1104/" ]
11,345
<p>What is the story behind XPath and support for namespaces? Did XPath as a specification precede namespaces? If I have a document where elements have been given a default namespace: </p> <pre><code>&lt;foo xmlns="uri" /&gt; </code></pre> <p>It appears as though some of the XPath processor libraries won't recognize...
[ { "answer_id": 11351, "author": "Stu", "author_id": 414, "author_profile": "https://Stackoverflow.com/users/414", "pm_score": 4, "selected": false, "text": "<foo xmlns='urn:foo'>\n <bar>\n <asdf/>\n </bar> \n</foo>\n //*[local-name()='bar'] \n //bar\n" }, { "an...
2008/08/14
[ "https://Stackoverflow.com/questions/11345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/64/" ]
11,381
<p>Here's a coding problem for those that like this kind of thing. Let's see your implementations (in your language of choice, of course) of a function which returns a human readable String representation of a specified Integer. For example:</p> <ul> <li>humanReadable(1) returns "one". <li>humanReadable(53) returns "f...
[ { "answer_id": 11415, "author": "Ryan Ahearn", "author_id": 75, "author_profile": "https://Stackoverflow.com/users/75", "pm_score": 1, "selected": false, "text": "String humanReadable(int inputNumber) {\n if (inputNumber == -1) {\n return \"\";\n }\n int remainder;\n int quotient;...
2008/08/14
[ "https://Stackoverflow.com/questions/11381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1030/" ]
11,405
<p>The following code doesn't compile with gcc, but does with Visual Studio:</p> <pre><code>template &lt;typename T&gt; class A { public: T foo; }; template &lt;typename T&gt; class B: public A &lt;T&gt; { public: void bar() { cout &lt;&lt; foo &lt;&lt; endl; } }; </code></pre> <p>I get the error:</p> <blockqu...
[ { "answer_id": 11425, "author": "Derek Park", "author_id": 872, "author_profile": "https://Stackoverflow.com/users/872", "pm_score": 4, "selected": false, "text": "template <typename T> struct B {\n int m;\n int n;\n int f ();\n int g ();\n};\nint n;\nint g ();\ntemplate <typename T>...
2008/08/14
[ "https://Stackoverflow.com/questions/11405", "https://Stackoverflow.com", "https://Stackoverflow.com/users/112/" ]
11,491
<p>What is the best way people have found to do String to Lower case / Upper case in C++?</p> <p>The issue is complicated by the fact that C++ isn't an English only programming language. Is there a good multilingual method?</p>
[ { "answer_id": 11502, "author": "Darren Kopp", "author_id": 77, "author_profile": "https://Stackoverflow.com/users/77", "pm_score": 6, "selected": true, "text": "#include <algorithm>\nstd::string data = \"Abc\";\nstd::transform(data.begin(), data.end(), data.begin(), ::toupper);\n" }, ...
2008/08/14
[ "https://Stackoverflow.com/questions/11491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1366/" ]
11,532
<p>How can I find any unused functions in a PHP project?</p> <p>Are there features or APIs built into PHP that will allow me to analyse my codebase - for example <a href="http://ie.php.net/manual/en/language.oop5.reflection.php" rel="noreferrer">Reflection</a>, <a href="http://php.net/manual/en/function.token-get-all....
[ { "answer_id": 14625, "author": "Stacey Richards", "author_id": 1142, "author_profile": "https://Stackoverflow.com/users/1142", "pm_score": 6, "selected": true, "text": "<?php\n $functions = array();\n $path = \"/path/to/my/php/project\";\n define_dir($path, $functions);\n re...
2008/08/14
[ "https://Stackoverflow.com/questions/11532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1142/" ]
11,561
<p>I've used Apache CXF to expose about ten java classes as web services.</p> <p>I've generated clients using CXF, Axis, and .NET.</p> <p>In Axis and CXF a "Service" or "Locator" is generated. From this service you can get a "Port". The "Port" is used to make individual calls to the methods exposed by the web servic...
[ { "answer_id": 23066361, "author": "pHneutre", "author_id": 1585148, "author_profile": "https://Stackoverflow.com/users/1585148", "pm_score": 2, "selected": false, "text": "<port> <endpoint> port endpoint" } ]
2008/08/14
[ "https://Stackoverflow.com/questions/11561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1310/" ]
11,562
<p><code>std::swap()</code> is used by many std containers (such as <code>std::list</code> and <code>std::vector</code>) during sorting and even assignment.</p> <p>But the std implementation of <code>swap()</code> is very generalized and rather inefficient for custom types.</p> <p>Thus efficiency can be gained by ove...
[ { "answer_id": 11599, "author": "Wilka", "author_id": 1367, "author_profile": "https://Stackoverflow.com/users/1367", "pm_score": 6, "selected": false, "text": "namespace std\n{\n template<>\n void swap(my_type& lhs, my_type& rhs)\n {\n // ... blah\n }\n}\n class Base\n...
2008/08/14
[ "https://Stackoverflow.com/questions/11562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1366/" ]
11,585
<p>For my blog I am wanting to use the Output Cache to save a cached version of a perticular post for around 10 minutes, and thats fine...</p> <pre><code>&lt;%@OutputCache Duration="600" VaryByParam="*" %&gt; </code></pre> <p>However, if someone posts a comment, I want to clear the cache so that the page is refreshed...
[ { "answer_id": 11621, "author": "palmsey", "author_id": 521, "author_profile": "https://Stackoverflow.com/users/521", "pm_score": 1, "selected": false, "text": "//add dependency\nstring key = \"post.aspx?id=\" + PostID.ToString();\nCache[key] = new object();\nResponse.AddCacheItemDepende...
2008/08/14
[ "https://Stackoverflow.com/questions/11585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383/" ]
11,586
<p>What's the penetration of design patterns in the real world? Do you use them in your day to day job - discussing how and where to apply them with your coworkers - or do they remain more of an academic concept? </p> <p>Do they actually provide actual value to your job? Or are they just something that people talk abo...
[ { "answer_id": 11617, "author": "Derek Park", "author_id": 872, "author_profile": "https://Stackoverflow.com/users/872", "pm_score": 7, "selected": true, "text": "Facade Observer Strategy" } ]
2008/08/14
[ "https://Stackoverflow.com/questions/11586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/322/" ]
11,620
<p>I want to rename a database, but keep getting the error that 'couldn't get exclusive lock' on the database, which implies there is some connection(s) still active.</p> <p>How can I kill all the connections to the database so that I can rename it?</p>
[ { "answer_id": 11624, "author": "SQLMenace", "author_id": 740, "author_profile": "https://Stackoverflow.com/users/740", "pm_score": 10, "selected": true, "text": "-- set your current connection to use master otherwise you might get an error\n\nuse master\nALTER DATABASE YourDatabase SET ...
2008/08/14
[ "https://Stackoverflow.com/questions/11620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1341/" ]
11,632
<p>Certainly there's the difference in general syntax, but what other critical distinctions exist? There are <em>some</em> differences, right?</p>
[ { "answer_id": 11677, "author": "Keith", "author_id": 905, "author_profile": "https://Stackoverflow.com/users/905", "pm_score": 1, "selected": false, "text": "handles '''" } ]
2008/08/14
[ "https://Stackoverflow.com/questions/11632", "https://Stackoverflow.com", "https://Stackoverflow.com/users/337/" ]
11,635
<p>What is the best way of doing case-insensitive string comparison in C++ without transforming a string to all uppercase or all lowercase?</p> <p>Please indicate whether the methods are Unicode-friendly and how portable they are.</p>
[ { "answer_id": 11654, "author": "Darren Kopp", "author_id": 77, "author_profile": "https://Stackoverflow.com/users/77", "pm_score": 4, "selected": false, "text": "_wcsnicmp" }, { "answer_id": 11669, "author": "Wedge", "author_id": 332, "author_profile": "https://Stack...
2008/08/14
[ "https://Stackoverflow.com/questions/11635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1366/" ]
11,665
<p>Here is the sample code for my accordion:</p> <pre><code>&lt;mx:Accordion x="15" y="15" width="230" height="599" styleName="myAccordion"&gt; &lt;mx:Canvas id="pnlSpotlight" label="SPOTLIGHT" height="100%" width="100%" horizontalScrollPolicy="off"&gt; &lt;mx:VBox width="100%" height="80%" paddingTop="2" ...
[ { "answer_id": 12266, "author": "Theo", "author_id": 1109, "author_profile": "https://Stackoverflow.com/users/1109", "pm_score": 1, "selected": false, "text": "<mx:Accordion>\n <mx:headerRenderer>\n <mx:Component>\n <AccordionHeader xmlns=\"mx.containers.accordionCla...
2008/08/14
[ "https://Stackoverflow.com/questions/11665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26/" ]
11,689
<p>I am intentionally leaving this quite vague at first. I'm looking for discussion and what issues are important more than I'm looking for hard answers.</p> <p>I'm in the middle of designing an app that does something like portfolio management. The design I have so far is</p> <ul> <li>Problem: a problem that needs...
[ { "answer_id": 12231, "author": "Eric Z Beard", "author_id": 1219, "author_profile": "https://Stackoverflow.com/users/1219", "pm_score": 1, "selected": false, "text": "foreign key (thing_id, thing_type) -> problems.id or solutions.id\n problem_id and solution_id \n" }, { "answer_...
2008/08/14
[ "https://Stackoverflow.com/questions/11689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1190/" ]
11,690
<p>I've got some Japanese in the ALT attribute, but the tooltip is showing me the ugly block characters in the tooltip. The rest of the content on the page renders correctly. So far, it seems to be limited to the tooltips.</p>
[ { "answer_id": 11747, "author": "eplawless", "author_id": 1370, "author_profile": "https://Stackoverflow.com/users/1370", "pm_score": 1, "selected": false, "text": "<img src=\"test.png\" alt=\"日本語\" />\n" } ]
2008/08/14
[ "https://Stackoverflow.com/questions/11690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/337/" ]
11,699
<p>I'm getting notifications to back up my encryption key for EFS in Vista, however i haven't enabled bit locker or drive encryption.</p> <p>Anyone know how to find out what files may be encrypted or have an explanation for why it would notify me?</p>
[ { "answer_id": 232734, "author": "ParanoidMike", "author_id": 452120, "author_profile": "https://Stackoverflow.com/users/452120", "pm_score": 5, "selected": false, "text": "CIPHER.EXE /U /N\n" } ]
2008/08/14
[ "https://Stackoverflow.com/questions/11699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/580/" ]
11,720
<p>What I would like to do is create a clean virtual machine image as the output of a build of an application.</p> <p>So a new virtual machine would be created (from a template is fine, with the OS installed, and some base software installed) --- a new web site would be created in IIS, and the web app build output cop...
[ { "answer_id": 232734, "author": "ParanoidMike", "author_id": 452120, "author_profile": "https://Stackoverflow.com/users/452120", "pm_score": 5, "selected": false, "text": "CIPHER.EXE /U /N\n" } ]
2008/08/14
[ "https://Stackoverflow.com/questions/11720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1341/" ]
11,724
<p>On my <strong>Windows XP</strong> machine Visual Studio 2003 2005 and 2008 all complain that I cannot start debugging my <strong>web application</strong> because I must either be a member of the Debug Users group or of the Administrators group. So, I am an Administrator and I added Debug Users just in case, and it s...
[ { "answer_id": 11842, "author": "Matt Nelson", "author_id": 788, "author_profile": "https://Stackoverflow.com/users/788", "pm_score": 0, "selected": false, "text": "VsJITDebugger.exe -p <PID> VsJITDebugger.exe /?" } ]
2008/08/14
[ "https://Stackoverflow.com/questions/11724", "https://Stackoverflow.com", "https://Stackoverflow.com/users/459/" ]
11,734
<p>I am developing an application to install a large number of data files from multiple DVDs. The application will prompt the user to insert the next disk, however Windows will automatically try to open that disk either in an explorer window or ask the user what to do with the new disk.<br> How can I intercept and can...
[ { "answer_id": 11735, "author": "Brian Ensink", "author_id": 1254, "author_profile": "https://Stackoverflow.com/users/1254", "pm_score": 3, "selected": true, "text": "IQueryCancelAutoPlay" } ]
2008/08/14
[ "https://Stackoverflow.com/questions/11734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1254/" ]
11,740
<p>In a web application like wiki or forums or blogging software, it is often useful to store your data in a relational database. Since many hosting companies offer a single database with their hosting plans (with additional databases costing extra) it is very useful for your users when your database objects (tables, v...
[ { "answer_id": 12089, "author": "Keith", "author_id": 905, "author_profile": "https://Stackoverflow.com/users/905", "pm_score": 1, "selected": false, "text": "schema select * from dbo.clientAProduct\nselect * from dbo.clientBroduct\n select * from clientA.Product\nselect * from clientB.P...
2008/08/14
[ "https://Stackoverflow.com/questions/11740", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1336/" ]
11,761
<p>I have a web service that queries data from this json file, but I don't want the web service to have to access the file every time. I'm thinking that maybe I can store the data somewhere else (maybe in memory) so the web service can just get the data from there the next time it's trying to query the same data. I kin...
[ { "answer_id": 11826, "author": "Mark Glorie", "author_id": 952, "author_profile": "https://Stackoverflow.com/users/952", "pm_score": 4, "selected": true, "text": "Context.Cache.Insert(\"foo\", _\n Foo, _\n Nothing, _\n DateAdd(DateInterval...
2008/08/14
[ "https://Stackoverflow.com/questions/11761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1381/" ]
11,762
<p>I needed some simple string encryption, so I wrote the following code (with a great deal of "inspiration" from <a href="http://www.codeproject.com/KB/security/DotNetCrypto.aspx" rel="noreferrer">here</a>):</p> <pre><code> // create and initialize a crypto algorithm private static SymmetricAlgorithm getAlgori...
[ { "answer_id": 14971080, "author": "jbtule", "author_id": 637783, "author_profile": "https://Stackoverflow.com/users/637783", "pm_score": 3, "selected": false, "text": "AESThenHMAC.AesSimpleDecryptWithPassword(ciphertext, password) null null" }, { "answer_id": 19835066, "auth...
2008/08/14
[ "https://Stackoverflow.com/questions/11762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/369/" ]
11,767
<p>How can I present a control to the user that allows him/her to select a directory?</p> <p>There doesn't seem to be any native .net controls which do this?</p>
[ { "answer_id": 11781, "author": "David Wengier", "author_id": 489, "author_profile": "https://Stackoverflow.com/users/489", "pm_score": 3, "selected": false, "text": "FolderBrowserDialog System.Windows.Forms" }, { "answer_id": 7634179, "author": "Chandima", "author_id": 9...
2008/08/14
[ "https://Stackoverflow.com/questions/11767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/234/" ]
11,783
<p>Given an empty method body, will the JIT optimize out the call (I know the C# compiler won't). How would I go about finding out? What tools should I be using and where should I be looking?</p> <p>Since I'm sure it'll be asked, the reason for the empty method is a preprocessor directive.</p> <hr> <p>@Chris: Makes ...
[ { "answer_id": 12078, "author": "Keith", "author_id": 905, "author_profile": "https://Stackoverflow.com/users/905", "pm_score": 4, "selected": false, "text": "void DoSomethingIfCompFlag() {\n#if COMPILER_FLAG\n //your code\n#endif\n}\n partial void DoSomethingIfCompFlag();\n\n#if COMP...
2008/08/14
[ "https://Stackoverflow.com/questions/11783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34/" ]
11,804
<p>I'm working on a web service at the moment and there is the potential that the returned results could be quite large ( > 5mb). </p> <p>It's perfectly valid for this set of data to be this large and the web service can be called either sync or async, but I'm wondering what people's thoughts are on the following:</p>...
[ { "answer_id": 920922, "author": "DavidValeri", "author_id": 107057, "author_profile": "https://Stackoverflow.com/users/107057", "pm_score": 3, "selected": true, "text": "WS-ReliableMessaging" } ]
2008/08/15
[ "https://Stackoverflow.com/questions/11804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/493/" ]
11,806
<p>I'm trying to run powershell commands through a web interface (ASP.NET/C#) in order to create mailboxes/etc on Exchange 2007. When I run the page using Visual Studio (Cassini), the page loads up correctly. However, when I run it on IIS (v5.1), I get the error "unknown user name or bad password". The biggest problem ...
[ { "answer_id": 12554, "author": "Otto", "author_id": 519, "author_profile": "https://Stackoverflow.com/users/519", "pm_score": 3, "selected": false, "text": "using System;\nusing System.Data;\nusing System.Configuration;\nusing System.Web;\nusing System.Web.Security;\nusing System.Web.UI...
2008/08/15
[ "https://Stackoverflow.com/questions/11806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/889/" ]
11,809
<p>The only thing I've found has been;</p> <pre class="lang-css prettyprint-override"><code>.hang { text-indent: -3em; margin-left: 3em; } </code></pre> <p>The only way for this to work is putting text in a paragraph, which causes those horribly unsightly extra lines. I'd much rather just have them in a <cod...
[ { "answer_id": 11815, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 5, "selected": true, "text": "<span> <p> <div> display: run-in" }, { "answer_id": 8090502, "author": "David Barnett", "author_id": 1008297, ...
2008/08/15
[ "https://Stackoverflow.com/questions/11809", "https://Stackoverflow.com", "https://Stackoverflow.com/users/362/" ]
11,820
<p>This <a href="https://stackoverflow.com/questions/11782/file-uploads-via-web-services">question and answer</a> shows how to send a file as a byte array through an XML web service. How much overhead is generated by using this method for file transfer? I assume the data looks something like this:</p> <pre><code>&lt;...
[ { "answer_id": 11832, "author": "Kevin Dente", "author_id": 9, "author_profile": "https://Stackoverflow.com/users/9", "pm_score": 5, "selected": true, "text": "base64 base64" } ]
2008/08/15
[ "https://Stackoverflow.com/questions/11820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26/" ]
11,854
<p>In a project our team is using object lists to perform mass operations on sets of data that should all be processed in a similar way. In particular, different objects would ideally act the same, which would be very easily achieved with polymorphism. The problem I have with it is that inheritance implies the <em>is...
[ { "answer_id": 11859, "author": "Derek Park", "author_id": 872, "author_profile": "https://Stackoverflow.com/users/872", "pm_score": 0, "selected": false, "text": "Damageable DamageCounter Damageable" }, { "answer_id": 11864, "author": "Derek Park", "author_id": 872, ...
2008/08/15
[ "https://Stackoverflow.com/questions/11854", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1256/" ]
11,879
<p>Instead of returning a common string, is there a way to return classic objects? If not: what are the best practices? Do you transpose your object to xml and rebuild the object on the other side? What are the other possibilities? </p>
[ { "answer_id": 11899, "author": "lomaxx", "author_id": 493, "author_profile": "https://Stackoverflow.com/users/493", "pm_score": 4, "selected": true, "text": "[Serializable]\npublic class MyClass\n{\n public string MyString {get; set;}\n\n [Serializable]\n public MyOtherClass My...
2008/08/15
[ "https://Stackoverflow.com/questions/11879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/391/" ]
11,915
<p>How would you reccommend handling RSS Feeds in ASP.NET MVC? Using a third party library? Using the RSS stuff in the BCL? Just making an RSS view that renders the XML? Or something completely different?</p>
[ { "answer_id": 13662, "author": "Ricky", "author_id": 653, "author_profile": "https://Stackoverflow.com/users/653", "pm_score": 5, "selected": false, "text": "<%@ Page ContentType=\"application/rss+xml\" Language=\"C#\" AutoEventWireup=\"true\" CodeBehind=\"PostRSS.aspx.cs\" Inherits=\"r...
2008/08/15
[ "https://Stackoverflow.com/questions/11915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/571/" ]
11,919
<p>Okay, I've looked all over the internet for a good solution to get PHP and MySQL working on IIS7.0. It's nearly impossible, I've tried it so many times and given up in vain. Please please help by linking some great step-by-step tutorial to adding PHP and MySQL on IIS7.0 from scratch. PHP and MySQL are essential for ...
[ { "answer_id": 94341, "author": "Zack Peterson", "author_id": 83, "author_profile": "https://Stackoverflow.com/users/83", "pm_score": 2, "selected": false, "text": ";extension=php_mysql.dll\n Request path: *.php\nExecutable: C:\\php\\php5isapi.dll\nName: PHP\n <html>\n<head>\n<...
2008/08/15
[ "https://Stackoverflow.com/questions/11919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1392/" ]
11,926
<p>I'm new to MVC (and ASP.Net routing). I'm trying to map <code>*.aspx</code> to a controller called <code>PageController</code>. </p> <pre><code>routes.MapRoute( "Page", "{name}.aspx", new { controller = "Page", action = "Index", id = "" } ); </code></pre> <p>Wouldn't the code above map *.aspx to <code>P...
[ { "answer_id": 11937, "author": "Dale Ragan", "author_id": 1117, "author_profile": "https://Stackoverflow.com/users/1117", "pm_score": 0, "selected": false, "text": "routes.MapRoute(\n \"Page\", \n \"{Page}.aspx\", \n new { controller = \"Page\", action = \"Index\", id = \"\" }\...
2008/08/15
[ "https://Stackoverflow.com/questions/11926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/105/" ]
11,930
<p>How can I determine the IP of my router/gateway in Java? I can get my IP easily enough. I can get my internet IP using a service on a website. But how can I determine my gateway's IP?</p> <p>This is somewhat easy in .NET if you know your way around. But how do you do it in Java?</p>
[ { "answer_id": 11960, "author": "Nick Brosnahan", "author_id": 528, "author_profile": "https://Stackoverflow.com/users/528", "pm_score": 1, "selected": false, "text": "traceroute to www.amazon.com (72.21.203.1), 1 hops max, 40 byte packets\n 1 10.0.1.1 (10.0.1.1) 0.694 ms 0.445 ms 0....
2008/08/15
[ "https://Stackoverflow.com/questions/11930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/338/" ]
11,950
<p>I'm looking for the best way to log errors in an ASP.NET application. I want to be able to receive emails when errors occurs in my application, with detailed information about the Exception and the current Request.</p> <p>In my company we used to have our own ErrorMailer, catching everything in the Global.asax Appl...
[ { "answer_id": 11961, "author": "brendan", "author_id": 225, "author_profile": "https://Stackoverflow.com/users/225", "pm_score": 0, "selected": false, "text": "Try\n Dim p as New Person()\n p.Name = \"Joe\"\n p.Age = 30\nCatch ex as Exception\n Log.LogException(ex,\"Err creating per...
2008/08/15
[ "https://Stackoverflow.com/questions/11950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1130/" ]
12,009
<p>How can I pipe the new password to smbpasswd so I can automate my installation process.</p>
[ { "answer_id": 12026, "author": "Mark Harrison", "author_id": 116, "author_profile": "https://Stackoverflow.com/users/116", "pm_score": 4, "selected": false, "text": "(echo oldpasswd; echo newpasswd) | smbpasswd -s\n" }, { "answer_id": 12032, "author": "UnkwnTech", "autho...
2008/08/15
[ "https://Stackoverflow.com/questions/12009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115/" ]
12,039
<p>I have an application that sometimes causes a BSOD on a Win XP machine. Trying to find out more, I loaded up the resulting *.dmp file (from C:\Windows\Minidump), but get this message when in much of the readout when doing so:</p> <pre><code>********************************************************************* * Sy...
[ { "answer_id": 12132, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 3, "selected": false, "text": "_NT_SYMBOL_PATH srv*C:\\Windows\\Symbols*http //msdl.microsoft.com/download/symbols C:\\Windows\\Symbols _NT_SYMBOL_PATH srv*...
2008/08/15
[ "https://Stackoverflow.com/questions/12039", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
12,051
<p>If I inherit from a base class and want to pass something from the constructor of the inherited class to the constructor of the base class, how do I do that?</p> <p>For example, if I inherit from the Exception class I want to do something like this:</p> <pre><code>class MyExceptionClass : Exception { public M...
[ { "answer_id": 12052, "author": "Jon Limjap", "author_id": 372, "author_profile": "https://Stackoverflow.com/users/372", "pm_score": 12, "selected": true, "text": "public class MyExceptionClass : Exception\n{\n public MyExceptionClass(string message, string extrainfo) : base(message)\...
2008/08/15
[ "https://Stackoverflow.com/questions/12051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/493/" ]
12,088
<p>I wonder if anyone uses commercial/free java obfuscators on his own commercial product. I know only about one project that actually had an obfuscating step in the ant build step for releases.</p> <p>Do you obfuscate? And if so, why do you obfuscate?</p> <p>Is it really a way to protect the code or is it just a bet...
[ { "answer_id": 12100, "author": "izb", "author_id": 974, "author_profile": "https://Stackoverflow.com/users/974", "pm_score": 4, "selected": false, "text": "public void doSomething()\n{\n /* Generated config class containing static finals: */\n if (Configuration.ISMOTOROLA)\n {\...
2008/08/15
[ "https://Stackoverflow.com/questions/12088", "https://Stackoverflow.com", "https://Stackoverflow.com/users/834/" ]
12,095
<p>Our team is creating a new recruitment workflow system to replace an old one. I have been tasked with migrating the old data into the new schema. I have decided to do this by creating a small Windows Forms project as the schema are radically different and straight TSQL scripts are not an adequate solution.</p> <p>T...
[ { "answer_id": 12115, "author": "Peteter", "author_id": 1192, "author_profile": "https://Stackoverflow.com/users/1192", "pm_score": 0, "selected": false, "text": "Application.DoEvents();" } ]
2008/08/15
[ "https://Stackoverflow.com/questions/12095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2083160/" ]
12,103
<p>When I am running the following statement:</p> <pre><code>@filtered = map {s/&amp;nbsp;//g} @outdata; </code></pre> <p>it is returning an empty list instead of the filtered list that I expected. What I am trying to do is remove every occurrence of <code>&amp;nbsp;</code> from an array of string (which is an XML f...
[ { "answer_id": 12108, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 4, "selected": true, "text": "@filtered = map {s/&nbsp;//g; $_} @outdata;\n" }, { "answer_id": 13685, "author": "Cebjyre", "author_id": 1...
2008/08/15
[ "https://Stackoverflow.com/questions/12103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/274/" ]
12,135
<p>I'm using an XmlSerializer to deserialize a particular type in mscorelib.dll</p> <pre><code>XmlSerializer ser = new XmlSerializer( typeof( [.Net type in System] ) ); return ([.Net type in System]) ser.Deserialize( new StringReader( xmlValue ) ); </code></pre> <p>This throws a caught <code>FileNotFoundException</co...
[ { "answer_id": 953571, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "XmlRootAttribute rootAttribute = new XmlRootAttribute();\nrootAttribute.ElementName = \"SomeRootName\";\nrootAttribute.IsNulla...
2008/08/15
[ "https://Stackoverflow.com/questions/12135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/905/" ]
12,140
<p>A database application that I'm currently working on, stores all sorts of settings in the database. Most of those settings are there to customize certain business rules, but there's also some other stuff in there.</p> <p>The app contains objects that specifically do a certain task, e.g., a certain complicated calcu...
[ { "answer_id": 12183, "author": "Lars Mæhlum", "author_id": 960, "author_profile": "https://Stackoverflow.com/users/960", "pm_score": 0, "selected": false, "text": "public class MySettings\n{\n public static double Setting1\n { get { return SettingsCache.Instance.GetDouble(\"Se...
2008/08/15
[ "https://Stackoverflow.com/questions/12140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1037/" ]
12,141
<p>For example: Updating all rows of the customer table because you forgot to add the where clause.</p> <ol> <li>What was it like, realizing it and reporting it to your coworkers or customers? </li> <li>What were the lessons learned?</li> </ol>
[ { "answer_id": 12145, "author": "Keith", "author_id": 905, "author_profile": "https://Stackoverflow.com/users/905", "pm_score": 3, "selected": false, "text": "delete from [table] where [condition]\n delete [table] where [condition]\n" }, { "answer_id": 12149, "author": "Surgi...
2008/08/15
[ "https://Stackoverflow.com/questions/12141", "https://Stackoverflow.com", "https://Stackoverflow.com/users/990/" ]
12,144
<p>OK, so I don't want to start a holy-war here, but we're in the process of trying to consolidate the way we handle our application configuration files and we're struggling to make a decision on the best approach to take. At the moment, every application we distribute is using it's own ad-hoc configuration files, whet...
[ { "answer_id": 12277, "author": "engtech", "author_id": 175, "author_profile": "https://Stackoverflow.com/users/175", "pm_score": 5, "selected": false, "text": "<user id=\"babooey\" on=\"cpu1\">\n <firstname>Bob</firstname>\n <lastname>Abooey</lastname>\n <department>adv</depart...
2008/08/15
[ "https://Stackoverflow.com/questions/12144", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1030/" ]
12,159
<p>I have thus far avoided the nightmare that is testing multi-threaded code since it just seems like too much of a minefield. I'd like to ask how people have gone about testing code that relies on threads for successful execution, or just how people have gone about testing those kinds of issues that only show up when...
[ { "answer_id": 12223, "author": "Dale Ragan", "author_id": 1117, "author_profile": "https://Stackoverflow.com/users/1117", "pm_score": 2, "selected": false, "text": "PropertyNotifyChanged WaitCallback ConditionalWaiter" }, { "answer_id": 125487, "author": "Kevin Wong", "a...
2008/08/15
[ "https://Stackoverflow.com/questions/12159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/912/" ]
12,176
<p>Is there any way to include the SVN repository revision number in the version string of a .NET assembly? Something like Major.Minor.SVNRev</p> <p>I've seen mention of doing this with something like CC.NET (although on ASP.NET actually), but is there any way to do it without any extra software? I've done similar t...
[ { "answer_id": 653382, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "using System;\nusing Microsoft.Build.Framework;\nusing Microsoft.Build.Utilities;\nusing DotSVN.Common;\nusing DotSVN.Common.E...
2008/08/15
[ "https://Stackoverflow.com/questions/12176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/194/" ]
12,225
<p>I have a database that contains a date and we are using the MaskedEditExtender (MEE) and MaskedEditValidator to make sure the dates are appropriate. However, we want the Admins to be able to go in and change the data (specifically the date) if necessary. </p> <p>How can I have the MEE field pre-populate with the ...
[ { "answer_id": 16718, "author": "Keng", "author_id": 730, "author_profile": "https://Stackoverflow.com/users/730", "pm_score": 2, "selected": true, "text": "Mask=\"99/99/9999 99:99:99\"" } ]
2008/08/15
[ "https://Stackoverflow.com/questions/12225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/730/" ]
12,271
<p>I have created a template for Visual Studio 2008 and it currently shows up under File->New Project->Visual C#. However, it is only really specific to Visual C#/Windows but I can't work out how to get it to show up under the "Windows" category and not the more general "Visual C#".</p>
[ { "answer_id": 12491, "author": "Aidan Ryan", "author_id": 1042, "author_profile": "https://Stackoverflow.com/users/1042", "pm_score": 4, "selected": true, "text": "<VisualStudioInstallDir>\\Common7\\IDE\\ItemTemplates\\CSharp\\\nMy Documents\\Visual Studio 2008\\Templates\\ProjectTempla...
2008/08/15
[ "https://Stackoverflow.com/questions/12271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214/" ]
12,297
<p>I've got a Repeater that lists all the <code>web.sitemap</code> child pages on an ASP.NET page. Its <code>DataSource</code> is a <code>SiteMapNodeCollection</code>. But, I don't want my registration form page to show up there.</p> <pre><code>Dim Children As SiteMapNodeCollection = SiteMap.CurrentNode.ChildNodes ...
[ { "answer_id": 12303, "author": "Keith", "author_id": 905, "author_profile": "https://Stackoverflow.com/users/905", "pm_score": 1, "selected": false, "text": "//this will now be an enumeration, rather than a read only collection\nDim children = SiteMap.CurrentNode.ChildNodes.Where( _\n ...
2008/08/15
[ "https://Stackoverflow.com/questions/12297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/83/" ]
12,304
<p>This is a problem I have seen other people besides myself having, and I haven't found a good explanation.</p> <p>Let's say you have a maintenance plan with a task to check the database, something like this:</p> <pre><code>USE [MyDb] GO DBCC CHECKDB with no_infomsgs, all_errormsgs </code></pre> <p>If you go look i...
[ { "answer_id": 12320, "author": "Stu", "author_id": 414, "author_profile": "https://Stackoverflow.com/users/414", "pm_score": 1, "selected": false, "text": "GO" } ]
2008/08/15
[ "https://Stackoverflow.com/questions/12304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1219/" ]
12,306
<p>I'm trying to serialize a Type object in the following way:</p> <pre><code>Type myType = typeof (StringBuilder); var serializer = new XmlSerializer(typeof(Type)); TextWriter writer = new StringWriter(); serializer.Serialize(writer, myType); </code></pre> <p>When I do this, the call to Serialize throws the followin...
[ { "answer_id": 12314, "author": "AdamSane", "author_id": 805, "author_profile": "https://Stackoverflow.com/users/805", "pm_score": 1, "selected": false, "text": "public abstract class Type : System.Reflection.MemberInfo\n Member of System\n\nSummary:\nRepresents type declarations: cla...
2008/08/15
[ "https://Stackoverflow.com/questions/12306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/767/" ]
12,319
<p>I'm looking to the equivalent of Windows <a href="http://msdn.microsoft.com/fr-fr/library/yeby3zcb.aspx" rel="noreferrer"><code>_wfopen()</code></a> under Mac OS X. Any idea?</p> <p>I need this in order to port a Windows library that uses <code>wchar*</code> for its File interface. As this is intended to be a cross...
[ { "answer_id": 13562, "author": "Chris Hanson", "author_id": 714, "author_profile": "https://Stackoverflow.com/users/714", "pm_score": 3, "selected": false, "text": "fopen open fopen wcstombs LATIN SMALL LETTER E WITH ACUTE LATIN SMALL LETTER E COMBINING ACUTE ACCENT" }, { "answe...
2008/08/15
[ "https://Stackoverflow.com/questions/12319", "https://Stackoverflow.com", "https://Stackoverflow.com/users/268/" ]
12,330
<p>Is there any known way of listing the WMI classes and their properties available for a particular system? Im interested in a vbscript approach, but please suggest anything really :)</p> <p>P.S. Great site.</p>
[ { "answer_id": 78268, "author": "JustinD", "author_id": 12063, "author_profile": "https://Stackoverflow.com/users/12063", "pm_score": 2, "selected": false, "text": "ManagementPath l_Path = new ManagementPath(l_className);\nManagementClass l_Class = new ManagementClass(myScope, l_Manageme...
2008/08/15
[ "https://Stackoverflow.com/questions/12330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
12,332
<p>I am looking for a more technical explanation than the OS calls the function.</p> <p>Is there a website or book?</p>
[ { "answer_id": 12353, "author": "Vincent Robert", "author_id": 268, "author_profile": "https://Stackoverflow.com/users/268", "pm_score": 3, "selected": false, "text": "main() WinMainCRTStartup() argc, argv, end main() main() atexit() WinMainCRTStartup" }, { "answer_id": 33300, ...
2008/08/15
[ "https://Stackoverflow.com/questions/12332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
12,348
<p>I'm running PHP 5.2.3 on Windows 2000 Server with IIS 5. I'm trying to get cURL working, so in my <strong>php.ini</strong> file, I have this line:</p> <blockquote> <p>extension_dir ="F:\PHP\ext"</p> </blockquote> <p>And later, I have:</p> <blockquote> <p>extension=php_curl.dll</p> </blockquote> <p>The file ...
[ { "answer_id": 12349, "author": "Derek Kurth", "author_id": 1418, "author_profile": "https://Stackoverflow.com/users/1418", "pm_score": 6, "selected": true, "text": "php_curl.dll php_curl.dll libeay32.dll SSLeay32.dll C:\\Windows\\system32 extension_dir php.ini libeay32.dll SSLeay32.dll"...
2008/08/15
[ "https://Stackoverflow.com/questions/12348", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1418/" ]
12,368
<p>The .NET garbage collector will eventually free up memory, but what if you want that memory back immediately? What code do you need to use in a class <code>MyClass</code> to call</p> <pre><code>MyClass.Dispose() </code></pre> <p>and free up all the used space by variables and objects in <code>MyClass</code>?</p>
[ { "answer_id": 12377, "author": "Darren Kopp", "author_id": 77, "author_profile": "https://Stackoverflow.com/users/77", "pm_score": 2, "selected": false, "text": "public class MyClass : IDisposable\n{\n public void Dispose()\n {\n // cleanup here\n }\n}\n MyClass todispose...
2008/08/15
[ "https://Stackoverflow.com/questions/12368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1271/" ]
12,374
<p>We’ve found that the unit tests we’ve written for our C#/C++ code have really paid off. But we still have thousands of lines of business logic in stored procedures, which only really get tested in anger when our product is rolled out to a large number of users. </p> <p>What makes this worse is that some of these s...
[ { "answer_id": 25204, "author": "Toran Billups", "author_id": 2701, "author_profile": "https://Stackoverflow.com/users/2701", "pm_score": 5, "selected": true, "text": "Public MustInherit Class Repository(Of T As Class)\n Implements IRepository(Of T)\n\n Private mConnectionString As...
2008/08/15
[ "https://Stackoverflow.com/questions/12374", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1078/" ]
12,406
<p>From what I've read, <a href="http://blogs.msdn.com/astebner/archive/2008/08/11/8849574.aspx" rel="nofollow noreferrer">VS 2008 SP1 and Team Foundation Server SP1 packages are traditional service packs that require you to first install the original versions before you will be able to install the SP</a>.</p> <p>Is t...
[ { "answer_id": 1707074, "author": "Nagendra", "author_id": 207684, "author_profile": "https://Stackoverflow.com/users/207684", "pm_score": 2, "selected": false, "text": "::Extract the original visual studio 2008 installation to directory VS2k8WithSP1.\nmsiexec.exe /a \"g:\\vs_setup.msi\"...
2008/08/15
[ "https://Stackoverflow.com/questions/12406", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5/" ]
12,476
<p>This is a self-explanatory question:</p> <p>Why does this thing bubble into my try catch's even when nothing is wrong? </p> <p>Why is it showing up in my log, hundreds of times?</p> <p><strong>I know its a newb question, but if this site is gonna get search ranking and draw in newbs we have to ask them</strong></...
[ { "answer_id": 18507130, "author": "Luke Puplett", "author_id": 107783, "author_profile": "https://Stackoverflow.com/users/107783", "pm_score": 0, "selected": false, "text": "Thread.Abort Response.Redirect HttpApplication.Error HttpResponse HttpContext private void CheckIPhoneAccess() { ...
2008/08/15
[ "https://Stackoverflow.com/questions/12476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1220/" ]
12,482
<p>I have CruiseControl.NET Version 1.4 set up on my development server. Whenever a developer checks in code, it makes a compile. </p> <p>Now we're at a place where we can start giving our application to the testers. We'd like to use ClickOnce to distribute the application, with the idea being that when a tester go...
[ { "answer_id": 12512, "author": "Judah Gabriel Himango", "author_id": 536, "author_profile": "https://Stackoverflow.com/users/536", "pm_score": 5, "selected": false, "text": "msbuild /target:publish /p:Configuration=Release /p:Platform=AnyCPU; \"c:\\yourProject.csproj\"\n" }, { "...
2008/08/15
[ "https://Stackoverflow.com/questions/12482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/702/" ]
12,489
<p>How do you scan a directory for folders and files in C? It needs to be cross-platform.</p>
[ { "answer_id": 12506, "author": "Clayton", "author_id": 1449, "author_profile": "https://Stackoverflow.com/users/1449", "pm_score": 6, "selected": false, "text": "#define _XOPEN_SOURCE 700\n#include <stdio.h>\n#include <sys/types.h>\n#include <dirent.h>\n\nint main (void)\n{\n DIR *dp;\...
2008/08/15
[ "https://Stackoverflow.com/questions/12489", "https://Stackoverflow.com", "https://Stackoverflow.com/users/432/" ]
12,492
<p>I use emacs to edit my xml files (nxml-mode) and the files were generated by machine don't have any pretty formatting of the tags. </p> <p>I have searched for pretty printing the entire file with indentation and saving it, but wasn't able to find an automatic way.</p> <p>Is there a way? Or atleast some editor on l...
[ { "answer_id": 570049, "author": "Christian Berg", "author_id": 5035, "author_profile": "https://Stackoverflow.com/users/5035", "pm_score": 6, "selected": false, "text": "indent-region C-x h\nC-M-\\\n (defun bf-pretty-print-xml-region (begin end)\n \"Pretty format XML markup in region. ...
2008/08/15
[ "https://Stackoverflow.com/questions/12492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1448/" ]
12,501
<p>I thought that I had the latest CTP of PowerShell 2 but when I try the command:</p> <p><code>invoke-expression –computername Server01 –command 'get-process PowerShell'</code></p> <p>I get an error message:<br> <strong>A parameter cannot be found that matches parameter name 'computername'.</strong></p> <p>So the q...
[ { "answer_id": 12525, "author": "Kev", "author_id": 419, "author_profile": "https://Stackoverflow.com/users/419", "pm_score": 2, "selected": false, "text": "$host.version.tostring()" }, { "answer_id": 68933, "author": "Jaykul", "author_id": 8718, "author_profile": "ht...
2008/08/15
[ "https://Stackoverflow.com/questions/12501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1463/" ]
12,516
<p>This morning, I was reading <a href="http://steve.yegge.googlepages.com/when-polymorphism-fails" rel="noreferrer">Steve Yegge's: When Polymorphism Fails</a>, when I came across a question that a co-worker of his used to ask potential employees when they came for their interview at Amazon.</p> <blockquote> <p>As a...
[ { "answer_id": 12674, "author": "Chris Conway", "author_id": 1412, "author_profile": "https://Stackoverflow.com/users/1412", "pm_score": 2, "selected": false, "text": " +\n / \\\n + 3\n / \\\n1 2\n +\n / \\\n 1 +\n / \\\n 2 3\n" }, { "answer_id": 12688...
2008/08/15
[ "https://Stackoverflow.com/questions/12516", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25/" ]
12,533
<p>Is there a quick one-liner to call datepart in Sql Server and get back the name of the day instead of just the number?</p> <pre><code>select datepart(dw, getdate()); </code></pre> <p>This will return 1-7, with Sunday being 1. I would like 'Sunday' instead of 1.</p>
[ { "answer_id": 12548, "author": "Erick B", "author_id": 1373, "author_profile": "https://Stackoverflow.com/users/1373", "pm_score": 5, "selected": true, "text": "select datename(weekday, getdate());\n" }, { "answer_id": 12549, "author": "Eric Z Beard", "author_id": 1219, ...
2008/08/15
[ "https://Stackoverflow.com/questions/12533", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1219/" ]
12,556
<p>It looks interesting and I've played around with it some --- but the development IDE in a web browser seems to be nightmare eventually.</p> <p>Does anyone have experience using it and what are your thoughts?</p>
[ { "answer_id": 16222, "author": "Kieron", "author_id": 588, "author_profile": "https://Stackoverflow.com/users/588", "pm_score": 5, "selected": true, "text": "style" } ]
2008/08/15
[ "https://Stackoverflow.com/questions/12556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1341/" ]
12,565
<p>In Ruby, what's the difference between <code>{}</code> and <code>[]</code>?</p> <p><code>{}</code> seems to be used for both code blocks and hashes.</p> <p>Are <code>[]</code> only for arrays?</p> <p>The documention isn't very clear.</p>
[ { "answer_id": 12575, "author": "John Topley", "author_id": 1450, "author_profile": "https://Stackoverflow.com/users/1450", "pm_score": 3, "selected": false, "text": "{} do end [] Hash[\"key\" => \"value\"]\n { \"key\" => \"value\" }\n" }, { "answer_id": 12608, "author": "Jam...
2008/08/15
[ "https://Stackoverflow.com/questions/12565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1470/" ]
12,576
<p>What can I do to increase the performance/speed of my PHP scripts without installing software on my servers?</p>
[ { "answer_id": 12584, "author": "Frank Krueger", "author_id": 338, "author_profile": "https://Stackoverflow.com/users/338", "pm_score": 5, "selected": true, "text": "function foo($stuff) {\n ...\n return ...;\n}\n function foo($stuff) {\n trace_push_fn('foo');\n ...\n trac...
2008/08/15
[ "https://Stackoverflow.com/questions/12576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115/" ]
12,591
<p>Is there a way, when I parse an XML document using lxml, to validate that document against its DTD using an external catalog file? I need to be able to work the fixed attributes defined in a document’s DTD.</p>
[ { "answer_id": 13040, "author": "Michael Twomey", "author_id": 995, "author_profile": "https://Stackoverflow.com/users/995", "pm_score": 1, "selected": false, "text": "f = StringIO(\"<!ELEMENT b EMPTY>\")\ndtd = etree.DTD(f)\ndtd = etree.DTD(external_id = \"-//OASIS//DTD DocBook XML V4.2...
2008/08/15
[ "https://Stackoverflow.com/questions/12591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/207/" ]
12,592
<p>Is it possible to write a <code>doctest</code> unit test that will check that an exception is raised?<br /> For example, if I have a function <code>foo(x)</code> that is supposed to raise an exception if <code>x &lt; 0</code>, how would I write the <code>doctest</code> for that?</p>
[ { "answer_id": 12609, "author": "cnu", "author_id": 1448, "author_profile": "https://Stackoverflow.com/users/1448", "pm_score": 8, "selected": true, "text": " >>> x\n Traceback (most recent call last):\n ...\n NameError: name 'x' is not defined\n" }, { "answer_id": 3378...
2008/08/15
[ "https://Stackoverflow.com/questions/12592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/742/" ]
12,594
<p>Let's say I have a drive such as <strong>C:\</strong>, and I want to find out if it's shared and what it's share name (e.g. <strong>C$</strong>) is.</p> <p>To find out if it's shared, I can use <a href="https://learn.microsoft.com/en-us/windows/desktop/api/Lmshare/nf-lmshare-netsharecheck" rel="nofollow noreferrer"...
[ { "answer_id": 12634, "author": "Andrew Grant", "author_id": 1043, "author_profile": "https://Stackoverflow.com/users/1043", "pm_score": 0, "selected": false, "text": "SHGetFileInfo with SHGFI_ATTRIBUTES\n" } ]
2008/08/15
[ "https://Stackoverflow.com/questions/12594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/179/" ]