qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
277,566
<p>I'm looking for a Windows tool that is able to log every action (read &amp; write) that were made to a specific path inside the local Filesystem in order to debug a program (find out why it is sometimes slow and sometimes not). In theory it could work like a virus scanner that is recognizing every file that any of t...
[ { "answer_id": 277622, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 1, "selected": false, "text": "jpegPhoto jpegPhoto" } ]
2008/11/10
[ "https://Stackoverflow.com/questions/277566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25782/" ]
277,569
<p>In PHP, is there an easy way to convert a number to a word? For instance, <em>27</em> to <em>twenty-seven</em>.</p>
[ { "answer_id": 277586, "author": "Chris", "author_id": 4742, "author_profile": "https://Stackoverflow.com/users/4742", "pm_score": 6, "selected": true, "text": "<?php\n/**\n * English Number Converter - Collection of PHP functions to convert a number\n * into E...
2008/11/10
[ "https://Stackoverflow.com/questions/277569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21709/" ]
277,589
<p>How to perform validation for a radio button group (one radio button should be selected) using jQuery validation plugin?</p>
[ { "answer_id": 1843196, "author": "Mahes", "author_id": 301960, "author_profile": "https://Stackoverflow.com/users/301960", "pm_score": 5, "selected": false, "text": "myRadioGroupName : {required :true}\n" }, { "answer_id": 3347969, "author": "Brandon Rome", "author_id": ...
2008/11/10
[ "https://Stackoverflow.com/questions/277589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27052/" ]
277,607
<p>After tinkering around to solve [this][1] problem, I think the core of the problem is the following:</p> <p>When you use the Html.RadioButton() html helper with an Enum as value field, you can only choose your option once. AFter reposting the page, the helpers will ignore the value set in the call and set all radio...
[ { "answer_id": 283605, "author": "Boris Callens", "author_id": 11333, "author_profile": "https://Stackoverflow.com/users/11333", "pm_score": 1, "selected": false, "text": "/*ToDo: remove when patched in framework*/\npublic static string MonkeyPatchedRadio(this HtmlHelper htmlHelper, stri...
2008/11/10
[ "https://Stackoverflow.com/questions/277607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11333/" ]
277,618
<ul> <li>What exactly is a learning curve?</li> <li>And why is it wrong to use the term "steep learning curve" for something which has high entry barriers and takes quite some time to get into?</li> </ul> <p>As to the why-ness of this question:</p> <ul> <li>The terms are used often and inconsistently on Stack Overflo...
[ { "answer_id": 277794, "author": "bendin", "author_id": 33412, "author_profile": "https://Stackoverflow.com/users/33412", "pm_score": 4, "selected": false, "text": "unix.rulez.org/~calver" } ]
2008/11/10
[ "https://Stackoverflow.com/questions/277618", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11995/" ]
277,623
<p>I'm trying to get a Server application to expose some status information using WCF. In particular I'm after using WCF services with RESTful "API". I'm hitting somewhat of a wall when it comes to consuming the REST api from a silverlight app/page that I want to have as an additional type of client...</p> <p>So far I...
[ { "answer_id": 314685, "author": "Donn Felker", "author_id": 5210, "author_profile": "https://Stackoverflow.com/users/5210", "pm_score": 1, "selected": false, "text": "WebClient rest = new WebClient();\nrest.DownloadStringCompleted += new DownloadStringCompletedEventHandler(rest_Download...
2008/11/10
[ "https://Stackoverflow.com/questions/277623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9172/" ]
277,625
<p>I am working on a database that usually uses GUIDs as primary keys.</p> <p>By default SQL Server places a clustered index on primary key columns. I understand that this is a silly idea for GUID columns, and that non-clustered indexes are better.</p> <p>What do you think - should I get rid of all the clustered inde...
[ { "answer_id": 277636, "author": "Galwegian", "author_id": 3201, "author_profile": "https://Stackoverflow.com/users/3201", "pm_score": 3, "selected": false, "text": "IDENTITY SELECT INSERT SELECT" }, { "answer_id": 277743, "author": "HTTP 410", "author_id": 13118, "au...
2008/11/10
[ "https://Stackoverflow.com/questions/277625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21966/" ]
277,630
<p>Is it possible to use a DB sequence for some column that <strong>is not the identifier/is not part of a composite identifier</strong>? </p> <p>I'm using hibernate as jpa provider, and I have a table that has some columns that are generated values (using a sequence), although they are not part of the identifier.</p>...
[ { "answer_id": 283603, "author": "alasdairg", "author_id": 15768, "author_profile": "https://Stackoverflow.com/users/15768", "pm_score": 4, "selected": false, "text": "<property name=\"foo\" generated=\"insert\"/>\n <property name=\"foo\" generated=\"always\"/>\n <property name=\"foo\" u...
2008/11/10
[ "https://Stackoverflow.com/questions/277630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22992/" ]
277,634
<p>still new to the world of linq, and i need some help flatening a list of parents that have children, into a single list of ParentChild's.</p> <p>Just like this:</p> <pre><code>class Program { static void Main() { List&lt;Parent&gt; parents = new List&lt;Parent&gt;(); parents.Add(new Parent...
[ { "answer_id": 277637, "author": "Kent Boogaart", "author_id": 5380, "author_profile": "https://Stackoverflow.com/users/5380", "pm_score": 5, "selected": true, "text": "from parent in parents\nfrom child in parent.Children\nselect new ParentChild() { ParentName = parent.Name, ChildName =...
2008/11/10
[ "https://Stackoverflow.com/questions/277634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26759/" ]
277,640
<p>SPListItem.GetFormattedValue seems to have a strange behavior for DateTime fields. It retrieves the DateTime value through SPListItem's indexer which according to this <a href="http://msdn.microsoft.com/en-us/library/ms197282.aspx" rel="noreferrer">MSDN article</a> returns <em>local</em> time. Here's a snippet from ...
[ { "answer_id": 457151, "author": "Soda", "author_id": 56623, "author_profile": "https://Stackoverflow.com/users/56623", "pm_score": 4, "selected": true, "text": "DateTime localTime = (DateTime)item[\"DueDate\"];\n// this is local time but if you do localDateTime.Kind it returns Unspecifi...
2008/11/10
[ "https://Stackoverflow.com/questions/277640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/578/" ]
277,646
<p>I am having a number of panels in my page in which I am collecting user information and saving the page details. The page panel has textbox, dropdown list, listbox.</p> <p>When I need to come to this page. I need to show the Page if these controls have any values. How to do this?</p>
[ { "answer_id": 277654, "author": "Cristian Libardo", "author_id": 16526, "author_profile": "https://Stackoverflow.com/users/16526", "pm_score": 6, "selected": true, "text": " IEnumerable<Control> EnumerateControlsRecursive(Control parent)\n {\n foreach (Control child in pare...
2008/11/10
[ "https://Stackoverflow.com/questions/277646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22162/" ]
277,655
<p>I've always wondered why the C++ Standard library has instantiated basic_[io]stream and all its variants using the <code>char</code> type instead of the <code>unsigned char</code> type. <code>char</code> means (depending on whether it is signed or not) you can have overflow and underflow for operations like get(), w...
[ { "answer_id": 2924394, "author": "Daniel Trebbien", "author_id": 196844, "author_profile": "https://Stackoverflow.com/users/196844", "pm_score": 4, "selected": false, "text": "iostream char char char char signed char unsigned char char signed char unsigned char signed char unsigned char...
2008/11/10
[ "https://Stackoverflow.com/questions/277655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34509/" ]
277,660
<p>3/10/2008 = 1822556159</p> <p>2/10/2008 = 1822523391</p> <p>1/10/2008 = 1822490623</p> <p>30/09/2008 = 1822392319</p> <p>29/09/2008 = 1822359551</p> <p>This is all the information that I know at the current time. </p> <p>Dates increment by 32768 except when changing month when the increment is 32768 x 2 (65536...
[ { "answer_id": 277683, "author": "Alnitak", "author_id": 6782, "author_profile": "https://Stackoverflow.com/users/6782", "pm_score": 3, "selected": false, "text": "1822392319 = 0x6c9f7fff\n0x6c = 108 = 2008 (based on 1900 start date)\n0x9 = 9 = September\n0xf7fff - take top 5 bits = 0x1e...
2008/11/10
[ "https://Stackoverflow.com/questions/277660", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
277,710
<p>I'm passing small (2-10 KB)XML documents as input to a WCF service. now I've two option to read data values from incoming XML</p> <ol> <li>Deserialize to a strongly typed object and use object properties to access values</li> <li>use XPath to access values</li> </ol> <p>which approach is faster? some statistics to...
[ { "answer_id": 37665391, "author": "Jon Raynor", "author_id": 750873, "author_profile": "https://Stackoverflow.com/users/750873", "pm_score": 2, "selected": false, "text": "[Serializable]\n public class FoobarXml\n {\n public string Name { get; set; }\n public int Age...
2008/11/10
[ "https://Stackoverflow.com/questions/277710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7722/" ]
277,714
<p>We have some SQL server reporting services reports. I didn't write then but I have to take care of them.</p> <p>These reports fire when opened in the browser, and with the default parameters (search terms and restrictions are blank) they retrieve a lot of data, which is slow. The client would prefer that the report...
[ { "answer_id": 16279481, "author": "Teis Lindemark", "author_id": 1726499, "author_profile": "https://Stackoverflow.com/users/1726499", "pm_score": 2, "selected": false, "text": "<rsweb:ReportViewer \n ID=\"rv\" \n runat=\"server\" \n Width=\"100%\" \n Height...
2008/11/10
[ "https://Stackoverflow.com/questions/277714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5599/" ]
277,715
<p>i tried the following</p> <ol> <li><code>svnadmin create svn_repos</code></li> <li><code>svn import my_first_proj file:///c:/svn_repos -m "initial import"</code></li> <li><code>svn checkout file:///c:/svn_repos</code></li> </ol> <p>and the command returned</p> <pre><code>A svn_repos\trunk A svn_repos\trunk\...
[ { "answer_id": 277737, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 1, "selected": false, "text": "dir /AH" }, { "answer_id": 277738, "author": "Mitch Haile", "author_id": 28807, "author_profile": "https:...
2008/11/10
[ "https://Stackoverflow.com/questions/277715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
277,726
<p>I have a query that is currently using a correlated subquery to return the results, but I am thinking the problem could be solved more eloquently perhaps using ROW_NUMBER().</p> <p>The problem is around the profile of a value v, through a number of years for an Item. Each item has a number of versions, each with i...
[ { "answer_id": 277762, "author": "Bliek", "author_id": 17434, "author_profile": "https://Stackoverflow.com/users/17434", "pm_score": 4, "selected": true, "text": "WITH Result AS\n(\n SELECT Row_Number() OVER (PARTITION BY ItemId, Year\nORDER BY ItemversionId DESC) AS RowNumber\n ,I...
2008/11/10
[ "https://Stackoverflow.com/questions/277726", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21197/" ]
277,744
<p>I'm getting an Exception while trying to insert a row in oracle table. I'm using ojdbc5.jar for oracle 11 this is the sql i'm trying </p> <pre><code>INSERT INTO rule_definitions(RULE_DEFINITION_SYS,rule_definition_type, rule_name,rule_text,rule_comment,rule_message,rule_condition,rule_active, rule_type,current_valu...
[ { "answer_id": 280527, "author": "Raimonds Simanovskis", "author_id": 16829, "author_profile": "https://Stackoverflow.com/users/16829", "pm_score": 6, "selected": true, "text": "INSERT INTO rule_definitions(RULE_DEFINITION_SYS,rule_definition_type,\nrule_name,rule_text,rule_comment,rule_...
2008/11/10
[ "https://Stackoverflow.com/questions/277744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11247/" ]
277,771
<p>How do I create, execute and control a winform from within a console application?</p>
[ { "answer_id": 277776, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 8, "selected": true, "text": "using System.Windows.Forms;\n\n[STAThread]\nstatic void Main() {\n Application.EnableVisualStyles();\n Applicati...
2008/11/10
[ "https://Stackoverflow.com/questions/277771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30717/" ]
277,772
<p>I keep stumbling on the format specifiers for the printf() family of functions. What I want is to be able to print a double (or float) with a maximum given number of digits after the decimal point. If I use:</p> <pre><code>printf("%1.3f", 359.01335); printf("%1.3f", 359.00999); </code></pre> <p>I get</p> <pre><...
[ { "answer_id": 277779, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 6, "selected": false, "text": "float num = 1.33;\nprintf(\"%g\", num); //output: 1.33\n" }, { "answer_id": 277810, "author": "paxdiablo", ...
2008/11/10
[ "https://Stackoverflow.com/questions/277772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25824/" ]
277,775
<p>I want to call a c# function from my javascript function.</p> <p>I have a link button in my ascx (please see the code below). The problem is that if you press enter in firefox is not working however it is working fine in internet explorer.</p> <pre><code>&lt;li class="clearfix border_top"&gt; &lt;label for="title"...
[ { "answer_id": 277779, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 6, "selected": false, "text": "float num = 1.33;\nprintf(\"%g\", num); //output: 1.33\n" }, { "answer_id": 277810, "author": "paxdiablo", ...
2008/11/10
[ "https://Stackoverflow.com/questions/277775", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30394/" ]
277,793
<p>I'm using Java's <a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/transform/Transformer.html" rel="nofollow noreferrer">Transformer</a> class to process an XML Document object.</p> <p>This is the code that creates the Transformer:</p> <pre><code>import javax.xml.transform.TransformerFactory; import javax...
[ { "answer_id": 284615, "author": "phihag", "author_id": 35070, "author_profile": "https://Stackoverflow.com/users/35070", "pm_score": 3, "selected": true, "text": "<svg xmlns=\"SVGNS\" /> <svg:svg xmlns:svg=\"SVGNS\" /> setNamespaceAware(true) DocumentBuilderFactory" } ]
2008/11/10
[ "https://Stackoverflow.com/questions/277793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15649/" ]
277,814
<p>Is there a catch or hidden problem in using a <a href="http://www.danrigsby.com/blog/index.php/2008/03/15/disposable-base-class/" rel="nofollow noreferrer">DisposableBase base class</a> instead of recoding the Dispose pattern on every class?</p> <p>Why aren't everyone using such a <strong>relevant</strong> class?</...
[ { "answer_id": 277820, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 2, "selected": false, "text": "IDisposable" } ]
2008/11/10
[ "https://Stackoverflow.com/questions/277814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11236/" ]
277,817
<h2>Scenario</h2> <p>I have two wrappers around Microsoft Office, one for 2003 and one for 2007. Since having two versions of Microsoft Office running side by side is "not officially possible" nor recommended by Microsoft, we have two boxes, one with Office 2003 and the other with Office 2007. We compile the wrappers ...
[ { "answer_id": 277835, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 2, "selected": false, "text": "dynamic" }, { "answer_id": 284462, "author": "Eric Rosenberger", "author_id": 36979, "author_prof...
2008/11/10
[ "https://Stackoverflow.com/questions/277817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2684/" ]
277,857
<p>This code does not seem to compile, I just need to write something to a small log text file (a new row to end of file).</p> <pre><code>&lt;%@ Import Namespace="System.IO" %&gt; void Page_Load( object sender, EventArgs e ){ FileSystem myFileSystem = new FileSystem(); myFileSystem.WriteAllText(logFile, hash...
[ { "answer_id": 277873, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 3, "selected": true, "text": "System.IO File WriteAllText File.AppendAllText" }, { "answer_id": 277905, "author": "Tom", "author_id": 2...
2008/11/10
[ "https://Stackoverflow.com/questions/277857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20979/" ]
277,869
<p>In a piece of C# that I am writing at the moment I need to handle several methods with the same signature in the same way. Also there might be more of these methods in the future. Instead of repeating the same kind of logic over and over I thought up the following:</p> <pre><code>private delegate bool cleanStep(Bui...
[ { "answer_id": 277882, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 3, "selected": false, "text": "cleanStep CleanStep foreach(CleanStep step in steps)\n{\n string failureText;\n if (!step(build, out failureText))...
2008/11/10
[ "https://Stackoverflow.com/questions/277869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6434/" ]
277,881
<p>I have a WCF service, hosted in IIS 7.0 that needs to run database queries. In order to get the right permissions to do this I am impersonating within the service as follows:</p> <h3>Code</h3> <pre><code>[OperationBehavior(Impersonation = ImpersonationOption.Allowed)] public void MyOperation(int arg) </code></pre>...
[ { "answer_id": 320917, "author": "huseyint", "author_id": 39, "author_profile": "https://Stackoverflow.com/users/39", "pm_score": 3, "selected": false, "text": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<configuration>\n <system.serviceModel>\n\n <!-- .... -->\n\n <be...
2008/11/10
[ "https://Stackoverflow.com/questions/277881", "https://Stackoverflow.com", "https://Stackoverflow.com/users/994/" ]
277,884
<p>I need to check the <code>RequestType</code> of an <code>HttpRequest</code> in ASP.NET (or <code>WebRequest.Method</code>). I know that I can just use the string values "<code>POST</code>" or "<code>GET</code>" for the request type, but I could have sworn there was a constant somewhere in some class in .NET that con...
[ { "answer_id": 277908, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 8, "selected": true, "text": "System.Net.WebRequestMethods.Http\n .Connect = \"CONNECT\"\n .Get = \"GET\"\n .Head = \"HEAD\"\n .MkCol = ...
2008/11/10
[ "https://Stackoverflow.com/questions/277884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/392/" ]
277,891
<p>Looking for some direction here as I'm running into some migration problems.</p> <p>We have a legacy application. The 'infrastructure' is running just fine. Business logic and data access layers written in VB calling SQL Server for the database.</p> <p>I have a LOT of experience writing Winforms (desktop) applic...
[ { "answer_id": 277921, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 0, "selected": false, "text": "<input" }, { "answer_id": 278093, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": ...
2008/11/10
[ "https://Stackoverflow.com/questions/277891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15891/" ]
277,899
<p>Is it alright to do this?</p> <pre><code>$author = strtolower($_SESSION['valid_username']); </code></pre> <p>I want to enter all authors into the table as lower case.</p>
[ { "answer_id": 277910, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 3, "selected": true, "text": "$_SESSION['valid_username'] if (isset($_SESSION['valid_username']))" }, { "answer_id": 277911, "author": "Vincent ...
2008/11/10
[ "https://Stackoverflow.com/questions/277899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
277,914
<p>I've got a PHPUnit mock object that returns <code>'return value'</code> no matter what its arguments:</p> <pre><code>// From inside a test... $mock = $this-&gt;getMock('myObject', 'methodToMock'); $mock-&gt;expects($this-&gt;any)) -&gt;method('methodToMock') -&gt;will($this-&gt;returnValue('return value')...
[ { "answer_id": 277975, "author": "eddy147", "author_id": 30759, "author_profile": "https://Stackoverflow.com/users/30759", "pm_score": 0, "selected": false, "text": "public function TestSomeCondition($condition){\n $mockObj = $this->getMockObject();\n $mockObj->setReturnValue('yourMeth...
2008/11/10
[ "https://Stackoverflow.com/questions/277914", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36191/" ]
277,922
<p>How can I bind arguments to a Python function so that I can call it later without arguments (or with fewer additional arguments)?</p> <p>For example:</p> <pre><code>def add(x, y): return x + y add_5 = magic_function(add, 5) assert add_5(3) == 8 </code></pre> <p>What is the <code>magic_function</code> I need her...
[ { "answer_id": 277932, "author": "Jeremy", "author_id": 1114, "author_profile": "https://Stackoverflow.com/users/1114", "pm_score": 7, "selected": true, "text": "functools.partial import sys\nimport functools\n\nprint_hello = functools.partial(sys.stdout.write, \"Hello world\\n\")\n\npri...
2008/11/10
[ "https://Stackoverflow.com/questions/277922", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20003/" ]
277,923
<p>How can we find the junit tests in our suite that take the longest amount of time to run? The default output of the junitreport ant task is helpful, but our suite has thousands of tests organized into many smaller suites, so it gets tedious, and the worst offenders are always changing.</p> <p>We use luntbuild but ...
[ { "answer_id": 280352, "author": "Jeffrey Fredrick", "author_id": 35894, "author_profile": "https://Stackoverflow.com/users/35894", "pm_score": 5, "selected": true, "text": "<?xml version=\"1.0\"?>\n<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">\n <x...
2008/11/10
[ "https://Stackoverflow.com/questions/277923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23572/" ]
277,924
<p>I'm trying to expand navigation options of the context menu on certain elements (specifically, <code>h1</code> and <code>h2</code> tags) I want to prevent the browser's default action when right-clicking on those elements.</p> <p>I found nice information at <a href="http://ajaxcookbook.org/disable-browser-context-m...
[ { "answer_id": 277945, "author": "James Hughes", "author_id": 34671, "author_profile": "https://Stackoverflow.com/users/34671", "pm_score": 3, "selected": true, "text": "$(it).observe(\"contextmenu\", function(e){\n e.stop();\n});\n $$('h1, h2').each(function(it){\n $(it).observe(\...
2008/11/10
[ "https://Stackoverflow.com/questions/277924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17600/" ]
277,925
<p>My huge 32-bit web services LLBLGen-based data access application is running alone on a dedicated 64-bit machine. Its physical memory consumption steadily grows up to approximately 2GB when the process releases almost all of the allocated space (up to 1,5GB) and continues to grow from that point again. There is no o...
[ { "answer_id": 278013, "author": "Ed Guiness", "author_id": 4200, "author_profile": "https://Stackoverflow.com/users/4200", "pm_score": 0, "selected": false, "text": "<contentious> </contentious>" }, { "answer_id": 278338, "author": "CYBRFRK", "author_id": 32496, "aut...
2008/11/10
[ "https://Stackoverflow.com/questions/277925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
277,926
<p>I am writing an application that is linked to Active Directory, and I need to store the userPrincipalName in a database table, but I do not know how big the field would need to be.</p> <p><a href="http://msdn.microsoft.com/en-us/library/ms680857(VS.85).aspx" rel="noreferrer">On MSDN</a>, no Length is given, and nei...
[ { "answer_id": 64866997, "author": "AlwaysLearning", "author_id": 390122, "author_profile": "https://Stackoverflow.com/users/390122", "pm_score": 1, "selected": false, "text": " cn: User-Principal-Name\n ldapDisplayName: userPrincipalName\n attributeId: 1.2.840.113556.1.4.656\n attribute...
2008/11/10
[ "https://Stackoverflow.com/questions/277926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91/" ]
277,930
<p>I need to use feature stapler to add some text columns to Posts list inside OOTB blog site definition. I plan not to use site columns, but only to add those columns to list (I don't use site columns because I have multiple site collections and there will be only one Posts list per site collection, so site columns ar...
[ { "answer_id": 278957, "author": "Ganesha", "author_id": 35175, "author_profile": "https://Stackoverflow.com/users/35175", "pm_score": 2, "selected": false, "text": "<Elements xmlns=\"http://schemas.microsoft.com/sharepoint/\">\n<CustomAction Id=\"XXXXXXXX\"\n RegistrationType=\"List\"...
2008/11/10
[ "https://Stackoverflow.com/questions/277930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/481/" ]
277,931
<p>So, lets say I have a number 123456. 123456 % 97 = 72. How can I determine what two digits need to be added to the end of 123456 such that the new number % 97 = 1? Note--it must always be two digits.</p> <p>For example, 123456<strong>76</strong> % 97 = 1. In this case, I need to add the digits "76" to the end o...
[ { "answer_id": 277940, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 3, "selected": false, "text": "x = 123456\n\nx = x * 100\nnewX = x + 1 + 97 - (x % 97)\n" }, { "answer_id": 277950, "author": "Pablo Retyk", ...
2008/11/10
[ "https://Stackoverflow.com/questions/277931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/681/" ]
277,942
<p>I am attempting to create a struts2 component using freemarker. I created an <code>ftl</code> file with code like this:</p> <pre><code>&lt;script type="text/javascript" src="${parameters.library?default('')}"&gt;&lt;/script&gt; </code></pre> <p>Which is expecting a parameter named <code>library</code> to be passed...
[ { "answer_id": 286226, "author": "Vincent Ramdhanie", "author_id": 27439, "author_profile": "https://Stackoverflow.com/users/27439", "pm_score": 0, "selected": false, "text": "<script type=\"text/javascript\" src=\"${parameters.get('library')?default('')}\">\n</script>\n" }, { "a...
2008/11/10
[ "https://Stackoverflow.com/questions/277942", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27439/" ]
277,944
<p>I have to read a binary file in a legacy format with Java. </p> <p>In a nutshell the file has a header consisting of several integers, bytes and fixed-length char arrays, followed by a list of records which also consist of integers and chars.</p> <p>In any other language I would create <code>struct</code>s (C/C++)...
[ { "answer_id": 277992, "author": "Vincent Ramdhanie", "author_id": 27439, "author_profile": "https://Stackoverflow.com/users/27439", "pm_score": 4, "selected": false, "text": "DataInputStream in = new DataInputStream(new BufferedInputStream(\n new FileInputStream(...
2008/11/10
[ "https://Stackoverflow.com/questions/277944", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23368/" ]
277,953
<p>I have a table of events with a recorded start and end time as a MySQL DATETIME object (in the format <code>YYYY-MM-DD HH:MM:SS</code>. I want to find all events that occur in a specific date range. However, events can span multiple days (and go outside of my date range, but I want to return them if they even overla...
[ { "answer_id": 277967, "author": "Bill the Lizard", "author_id": 1288, "author_profile": "https://Stackoverflow.com/users/1288", "pm_score": 2, "selected": false, "text": "SELECT *\nFROM table\nWHERE startdate >= 'starting date' AND startdate < 'ending date'\n OR enddate >= 'starting ...
2008/11/10
[ "https://Stackoverflow.com/questions/277953", "https://Stackoverflow.com", "https://Stackoverflow.com/users/572/" ]
277,959
<p>Just curious here: is it possible to invoke a Windows Blue Screen of Death using .net managed code under Windows XP/Vista? And if it is possible, what could the example code be?</p> <p>Just for the record, this is not for any malicious purpose, I am just wondering what kind of code it would take to actually kill th...
[ { "answer_id": 278311, "author": "bk1e", "author_id": 8090, "author_profile": "https://Stackoverflow.com/users/8090", "pm_score": 1, "selected": false, "text": "Device\\PhysicalMemory .dump" }, { "answer_id": 9793356, "author": "Stephen Kennedy", "author_id": 397817, ...
2008/11/10
[ "https://Stackoverflow.com/questions/277959", "https://Stackoverflow.com", "https://Stackoverflow.com/users/506/" ]
277,965
<p>I am writing a script at the moment that will grab certain information from HTML using dom4j.</p> <p>Since Python/Jython does not have a native <strong>switch</strong> statement I decided to use a whole bunch of <strong>if</strong> statements that call the appropriate method, like below:</p> <pre><code>if type == ...
[ { "answer_id": 277972, "author": "Brian", "author_id": 9493, "author_profile": "https://Stackoverflow.com/users/9493", "pm_score": 5, "selected": true, "text": "class MyHandler(object):\n def handle_extractTitle(self, dom):\n # do something\n\n def handle_extractMetaTags(se...
2008/11/10
[ "https://Stackoverflow.com/questions/277965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30786/" ]
277,996
<p>Do you know of a JAXB setting to prevent <strong>standalone="yes"</strong> from being generated in the resulting XML?</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt; </code></pre>
[ { "answer_id": 352107, "author": "Sam", "author_id": 37575, "author_profile": "https://Stackoverflow.com/users/37575", "pm_score": 7, "selected": true, "text": "marshaller.setProperty(\"com.sun.xml.bind.xmlDeclaration\", false);\n <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes...
2008/11/10
[ "https://Stackoverflow.com/questions/277996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9707/" ]
277,997
<p>I am tasked with moving quite a few web apps including the databases to new servers, they are ASP.NET. I was not the one to create and setup these originally so I must try to figure out what exactly I need to replicate in order to not break anything and so the customers have no idea that anything was moved. </p> <p...
[ { "answer_id": 1536242, "author": "warren", "author_id": 4418, "author_profile": "https://Stackoverflow.com/users/4418", "pm_score": 1, "selected": false, "text": "$CURRENT_SERVER $NEW_SERVER $NEW_SERVER $DB_SERVER $NEW_SERVER" } ]
2008/11/10
[ "https://Stackoverflow.com/questions/277997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18309/" ]
277,999
<p>I know that to find all the <code>.h</code> files I need to use:</p> <pre><code>find . -name "*.h" </code></pre> <p>but how to find all the <code>.h</code> AND <code>.cpp</code> files?</p>
[ { "answer_id": 278002, "author": "Paul Tomblin", "author_id": 3333, "author_profile": "https://Stackoverflow.com/users/3333", "pm_score": 7, "selected": true, "text": "find . -name \\*.h -print -o -name \\*.cpp -print\n find . \\( -name \\*.h -o -name \\*.cpp \\) -print\n" }, { "...
2008/11/10
[ "https://Stackoverflow.com/questions/277999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
278,031
<p>What's the best way to store timezone information with dates/times in a uniform way so people can enter times from anywhere in the world in their own local time? Other users would then have the ability to view the times in their own local time and the original localtime on the web page.</p>
[ { "answer_id": 1481509, "author": "Haluk", "author_id": 174559, "author_profile": "https://Stackoverflow.com/users/174559", "pm_score": 3, "selected": false, "text": "\"INSERT INTO abc_table (registrationtime) VALUES (UTC_TIMESTAMP())\"\n <? while($row = mysql_fetch_array($registration)...
2008/11/10
[ "https://Stackoverflow.com/questions/278031", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
278,034
<p>I have an authentication script (<strong><code>CheckLogin.aspx</code></strong>), and if any of the credentials do not match my application will redirect (via <strong><code>Server.Transfer</code></strong>) to the access denied page (<strong><code>forbidden.aspx</code></strong>). Each time my script runs,it gets an <...
[ { "answer_id": 278042, "author": "DOK", "author_id": 27637, "author_profile": "https://Stackoverflow.com/users/27637", "pm_score": 3, "selected": true, "text": "'~/forbidden.aspx'\n" }, { "answer_id": 278044, "author": "Kon", "author_id": 22303, "author_profile": "htt...
2008/11/10
[ "https://Stackoverflow.com/questions/278034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25515/" ]
278,037
<p>I'm working with a third party to integrate some of our systems with theirs and they provide us with a SOAP interface to make certain requests and changes in their connected systems. The problem for me is that they do not supply a WSDL-file for me to work against. If I had a WSDL-file it would be a simple matter jus...
[ { "answer_id": 278074, "author": "Bradley Grainger", "author_id": 23633, "author_profile": "https://Stackoverflow.com/users/23633", "pm_score": 2, "selected": false, "text": "System.Web.Services.Protocols.SoapHttpClientProtocol WebServiceBinding SoapDocumentMethod" }, { "answer_i...
2008/11/10
[ "https://Stackoverflow.com/questions/278037", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26746/" ]
278,039
<p>I have a timely operation that runs on a background thread. While running, I currently put the cursor in a wait state:</p> <pre><code>Mouse.OverrideCursor = Cursors.Wait </code></pre> <p>I just implemented a feature that allows the user to click a "Cancel" button if they're tired of waiting. However, some users ...
[ { "answer_id": 278052, "author": "Martin", "author_id": 8157, "author_profile": "https://Stackoverflow.com/users/8157", "pm_score": 5, "selected": true, "text": "Me.Cursor = Cursors.AppStarting\n" } ]
2008/11/10
[ "https://Stackoverflow.com/questions/278039", "https://Stackoverflow.com", "https://Stackoverflow.com/users/132931/" ]
278,046
<p>Are there any free tools to help simplify working with an NHibernate project in .NET 3.5? Primarily, I'm looking for some kind of code and config file generator to automate some of the more tedious parts of working with NHibernate.</p>
[ { "answer_id": 280349, "author": "Erik Öjebo", "author_id": 276, "author_profile": "https://Stackoverflow.com/users/276", "pm_score": 5, "selected": true, "text": "public CustomerMap : ClassMap<Customer>\n{\n public CustomerMap()\n {\n Id(x => x.ID);\n Map(x => x.Name);\n Map(...
2008/11/10
[ "https://Stackoverflow.com/questions/278046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2147/" ]
278,062
<p>I've got a cool piece of code taken from a VC++ project which gets complete information of the hard disk drive WITHOUT using WMI (since WMI has got its own problems).</p> <p>I ask those of you who are comfortable with API functions to try to convert this VB6 code into VB.NET (or C#) and help A LOT of people who are ...
[ { "answer_id": 278124, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 0, "selected": false, "text": "Type Structure System.IntPtr" }, { "answer_id": 278195, "author": "masfenix", "author_id": 36212, ...
2008/11/10
[ "https://Stackoverflow.com/questions/278062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
278,068
<p>I have an image that I want to show some 'spotlights' on, like they do on TV. The rest of the image should be darker than the original, and the person that I'm spotlighting should be normal. I have the x,y and radius of the spotlight, but I'm not sure how to change the brightness at that location. </p> <p>Also, ...
[ { "answer_id": 278261, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": " public void spotLight(int x, int y, int w, int h)\n {\n BufferedImage i = biDest.getSubimage(x, y, w, h);\n\n ...
2008/11/10
[ "https://Stackoverflow.com/questions/278068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
278,071
<p>I want to get the overall total CPU usage for an application in C#. I've found many ways to dig into the properties of processes, but I only want the CPU usage of the processes, and the total CPU like you get in the TaskManager.</p> <p>How do I do that?</p>
[ { "answer_id": 278088, "author": "Christian C. Salvadó", "author_id": 5445, "author_profile": "https://Stackoverflow.com/users/5445", "pm_score": 8, "selected": false, "text": "PerformanceCounter cpuCounter;\nPerformanceCounter ramCounter;\n\ncpuCounter = new PerformanceCounter(\"Process...
2008/11/10
[ "https://Stackoverflow.com/questions/278071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
278,075
<p>I am monitoring a folder with a .net filewatcher for certain kind of files(*.mbxml). I am using the created event of filewatcher for it. Once the created event fires I have to move this file to another folder. The problem with this approach is that the created event is fired as soon as the file copying starts. So if...
[ { "answer_id": 278115, "author": "h0st1le", "author_id": 26170, "author_profile": "https://Stackoverflow.com/users/26170", "pm_score": 3, "selected": true, "text": " private static bool creationComplete(string fileName)\n {\n // if the file can be opened it is no longer lock...
2008/11/10
[ "https://Stackoverflow.com/questions/278075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25125/" ]
278,081
<p>I've been using Git on Windows (msysgit) to track changes for some design work I've been doing.</p> <p>Today I've been working on a different PC (with remote repo <code>brian</code>) and I'm now trying to merge the edits done today back into my regular local version on my laptop.</p> <p>On my laptop, I've used <co...
[ { "answer_id": 278207, "author": "VolkA", "author_id": 25472, "author_profile": "https://Stackoverflow.com/users/25472", "pm_score": 7, "selected": false, "text": "git commit -a -m \"Fix merge conflict in test.foo\"\n git checkout --ours -- path/to/file.txt\ngit checkout --theirs -- path...
2008/11/10
[ "https://Stackoverflow.com/questions/278081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33721/" ]
278,089
<p>is there a quick way to sort the items of a select element? Or I have to resort to writing javascript?</p> <p>Please any ideas.</p> <pre><code>&lt;select size="4" name="lstALL" multiple="multiple" id="lstALL" tabindex="12" style="font-size:XX-Small;height:95%;width:100%;"&gt; &lt;option value="0"&gt; XXX&lt;/optio...
[ { "answer_id": 278509, "author": "Matty", "author_id": 26241, "author_profile": "https://Stackoverflow.com/users/26241", "pm_score": 7, "selected": true, "text": "document.getElementById('lstALL') function sortSelect(selElem) {\n var tmpAry = new Array();\n for (var i=0;i<selElem.o...
2008/11/10
[ "https://Stackoverflow.com/questions/278089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13370/" ]
278,090
<p>What is a good way to create and read an OpenOffice spreadsheet in Perl?</p>
[ { "answer_id": 2780194, "author": "Chloe", "author_id": 148844, "author_profile": "https://Stackoverflow.com/users/148844", "pm_score": 1, "selected": false, "text": "use Win32::OLE;\n\nWin32::OLE->Option(Warn => 3); # Turn on warnings for easier debugging\n\n#Win32::OLE->GetActiveObject...
2008/11/10
[ "https://Stackoverflow.com/questions/278090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
278,112
<p>Is there any c library to get a video from the webcam on linux?</p>
[ { "answer_id": 4025769, "author": "karlphillip", "author_id": 176769, "author_profile": "https://Stackoverflow.com/users/176769", "pm_score": 4, "selected": false, "text": "#include <stdio.h>\n#include \"cv.h\"\n#include \"highgui.h\"\n\n\ntypedef IplImage* (*callback_prototype)(IplImage...
2008/11/10
[ "https://Stackoverflow.com/questions/278112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
278,121
<p>Its my understanding that the recommended approach to localization in WPF is to use the LocBaml tool to extract the localizable items into e.g. a csv file, translate the items into the desired language and regenerate a new sattelite assembly from this csv file. However from my experiments this seems to conflict with...
[ { "answer_id": 992410, "author": "Rick Strahl", "author_id": 11197, "author_profile": "https://Stackoverflow.com/users/11197", "pm_score": 3, "selected": true, "text": "LocBaml.exe /generate ..\\obj\\WpfLocalization.g.en-US.resources \n /trans:Res\\de.csv /out:de /culture:de\n...
2008/11/10
[ "https://Stackoverflow.com/questions/278121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9222/" ]
278,122
<p>We're using Prototype for all of our Ajax request handling and to keep things simple we simple render HTML content which is then assigned to the appropriate div using the following function:</p> <pre><code>function ajaxModify(controller, parameters, div_id) { var div = $(div_id); var request = new Ajax.Req...
[ { "answer_id": 278138, "author": "Diodeus - James MacFarlane", "author_id": 12579, "author_profile": "https://Stackoverflow.com/users/12579", "pm_score": 5, "selected": true, "text": "evalScripts:true\n" }, { "answer_id": 278139, "author": "Kon", "author_id": 22303, "...
2008/11/10
[ "https://Stackoverflow.com/questions/278122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20178/" ]
278,132
<p>I need to impersonate myself as a domain user in a ASP.NET application running on VMWare machine. Since the VMWare machine is not itself in the domain, ASP.NET is unable to resolve the user token (specified in web.config). Is there a way to do that?</p> <p>Thanks in advance, Petr</p>
[ { "answer_id": 278434, "author": "Ricardo Villamil", "author_id": 19314, "author_profile": "https://Stackoverflow.com/users/19314", "pm_score": 2, "selected": true, "text": "using System;\nusing System.Security.Principal;\n\n/// <summary>\n/// Changes the security context the application...
2008/11/10
[ "https://Stackoverflow.com/questions/278132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15497/" ]
278,136
<p>and to spice things a bit , what is the best approach for globalization in Asp.net Mvc App </p>
[ { "answer_id": 278179, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 0, "selected": false, "text": "\\Views\\Home\\*.asp\n\\Views\\Admin\\*.asp\n\\Views\\Products\\*.asp\n \\en\\Views\\Home\\*.asp\n\\en\\Views\\Admin\...
2008/11/10
[ "https://Stackoverflow.com/questions/278136", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1409636/" ]
278,137
<p>I am using some custom controls one of which is a tooltip controller that can display images, so I am using th ebelow code to instantiate it:</p> <pre><code>Image newImage = Image.FromFile(imagePath); e.ToolTipImage = newImage; </code></pre> <p>obviously could inline it but just testing at the moment. The trouble ...
[ { "answer_id": 278166, "author": "John Rudy", "author_id": 14048, "author_profile": "https://Stackoverflow.com/users/14048", "pm_score": 2, "selected": true, "text": "Image newImage = Image.FromFile(myFilePath);\nSize outputSize = new Size(200, 200);\nBitmap backgroundBitmap = new Bitmap...
2008/11/10
[ "https://Stackoverflow.com/questions/278137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16989/" ]
278,140
<p>Is there a client event that I can use for when a DropDownList's data has been loaded/bound onto the control? I need to trigger event on their side when this happens.</p> <hr> <p>Basically, I am trying to lock out the controls while the data is being loaded as if there is a slowdown (not uncommon) a user can start...
[ { "answer_id": 635985, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": " var boolDoPostBack = false;\n\n if (__doPostBack)\n {\n // save a reference to the original __doPostBack\n ...
2008/11/10
[ "https://Stackoverflow.com/questions/278140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35454/" ]
278,149
<p>We have an application that downloads some files in the background. Our application pops up when an Internet connection is made, and after prompting the user to accept the downloads, we'd like to switch back to the home screen while we do our stuff.</p> <p>We can't work out how to do to this. We can emulate pressin...
[ { "answer_id": 635985, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": " var boolDoPostBack = false;\n\n if (__doPostBack)\n {\n // save a reference to the original __doPostBack\n ...
2008/11/10
[ "https://Stackoverflow.com/questions/278149", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21755/" ]
278,163
<p>I need to catch the HTML of a ASP.NET just before it is being sent to the client in order to do last minute string manipulations on it, and then send the modified version to the client.</p> <p>e.g.</p> <p>The Page is loaded Every control has been rendered correctly The Full html of the page is ready to be transferre...
[ { "answer_id": 288740, "author": "Atanas Korchev", "author_id": 10141, "author_profile": "https://Stackoverflow.com/users/10141", "pm_score": 5, "selected": true, "text": "protected override void Render(HtmlTextWriter writer)\n{\n StringWriter output = new StringWriter();\n base.Re...
2008/11/10
[ "https://Stackoverflow.com/questions/278163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32582/" ]
278,186
<p>I've got a simple little WPF app with a TextBox and a WebBrowser control. As I type into the TextBox the WebBrowser updates with its content.</p> <p>But on each keystroke, when the WebBrowser updates, it makes a click sound. How can I disable the WebBrowser control's refresh click sound?</p> <p><a href="http://i...
[ { "answer_id": 288740, "author": "Atanas Korchev", "author_id": 10141, "author_profile": "https://Stackoverflow.com/users/10141", "pm_score": 5, "selected": true, "text": "protected override void Render(HtmlTextWriter writer)\n{\n StringWriter output = new StringWriter();\n base.Re...
2008/11/10
[ "https://Stackoverflow.com/questions/278186", "https://Stackoverflow.com", "https://Stackoverflow.com/users/83/" ]
278,189
<p>What is the string concatenation operator in Oracle SQL? </p> <p>Are there any "interesting" features I should be careful of? </p> <p>(This seems obvious, but I couldn't find a previous question asking it). </p>
[ { "answer_id": 278198, "author": "Tony Andrews", "author_id": 18747, "author_profile": "https://Stackoverflow.com/users/18747", "pm_score": 9, "selected": true, "text": "|| select 'Mr ' || ename from emp;\n 'x' || null 'x' null" }, { "answer_id": 279351, "author": "Gary Myers...
2008/11/10
[ "https://Stackoverflow.com/questions/278189", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7211/" ]
278,192
<p>How do I view the history of an individual file with complete details of what has changed?</p> <p><code>git log -- [filename]</code> shows me the commit history of a file, but how do I see the file content that changed?</p>
[ { "answer_id": 278239, "author": "cori", "author_id": 8151, "author_profile": "https://Stackoverflow.com/users/8151", "pm_score": 3, "selected": false, "text": "Repository Visualize master's History" }, { "answer_id": 278242, "author": "VolkA", "author_id": 25472, "au...
2008/11/10
[ "https://Stackoverflow.com/questions/278192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36214/" ]
278,213
<p>Why do Linux distros have different package managers?</p> <p>I find this very strange because other software such as text editors, desktop environments and graphics software (Inkscape, Blender, GIMP) are shared among distributions. Why not have a common setup tool?</p>
[ { "answer_id": 278288, "author": "cms", "author_id": 28532, "author_profile": "https://Stackoverflow.com/users/28532", "pm_score": 5, "selected": true, "text": ".deb .rpm" } ]
2008/11/10
[ "https://Stackoverflow.com/questions/278213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45603/" ]
278,215
<p>I'm working with an existing XML document which has a structure (in part) like so:</p> <pre><code>&lt;Group&gt; &lt;Entry&gt; &lt;Name&gt; Bob &lt;/Name&gt; &lt;ID&gt; 1 &lt;/ID&gt; &lt;/Entry&gt; &lt;Entry&gt; &lt;Name&gt; Larry &lt;/Name&gt; &lt;/Entry&gt; &lt;/Group&gt; </...
[ { "answer_id": 278233, "author": "Cristian Libardo", "author_id": 16526, "author_profile": "https://Stackoverflow.com/users/16526", "pm_score": 2, "selected": false, "text": " public static string OptionalElement(this XElement actionElement, string elementName)\n {\n var ele...
2008/11/10
[ "https://Stackoverflow.com/questions/278215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7862/" ]
278,237
<p>I realize that this would be COMPLETELY bad practice in normal situations, but this is just for a test app that needs to be taking input from a bar code scanner (emulating a keyboard). The problem is that I need to start up some scripts while scanning, so I need the window to regain focus directly after I click the...
[ { "answer_id": 278256, "author": "Ray Hayes", "author_id": 7093, "author_profile": "https://Stackoverflow.com/users/7093", "pm_score": 5, "selected": true, "text": "Form true" }, { "answer_id": 1609443, "author": "Ken", "author_id": 177227, "author_profile": "https://...
2008/11/10
[ "https://Stackoverflow.com/questions/278237", "https://Stackoverflow.com", "https://Stackoverflow.com/users/194/" ]
278,259
<p>I'm trying to write an iterator for results from a PDO statement but I can't find any way of rewinding to the first row. I would like to avoid the overhead of calling fetchAll and storing all the result data.</p> <pre><code>// first loop works fine foreach($statement as $result) { // do something with result } ...
[ { "answer_id": 278682, "author": "troelskn", "author_id": 18180, "author_profile": "https://Stackoverflow.com/users/18180", "pm_score": 5, "selected": true, "text": "fetchAll" }, { "answer_id": 278763, "author": "Exception e", "author_id": 27541, "author_profile": "ht...
2008/11/10
[ "https://Stackoverflow.com/questions/278259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20074/" ]
278,273
<p>Using C or C++, After I decrypt a file to disk- how can I guarantee it is deleted if the application crashes or the system powers off and can't clean it up properly? Using C or C++, on Windows and Linux?</p>
[ { "answer_id": 278285, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 1, "selected": false, "text": "m(un)lock* family of functions" }, { "answer_id": 278652, "author": "Jonathan Leffler", "au...
2008/11/10
[ "https://Stackoverflow.com/questions/278273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35223/" ]
278,278
<p>I'd like to change this:</p> <pre><code>&lt;a href='foo'&gt; &lt;div&gt; Moo &lt;/div&gt; &lt;/a&gt; </code></pre> <p>to be standards compliant (you're not supposed to have block elements in inline elements). Wiring javascript to the divs just for navigation seems like a hack and degrades accessibility.. In t...
[ { "answer_id": 278305, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 1, "selected": false, "text": "<a > <tr > onclick" }, { "answer_id": 278561, "author": "Mr. Shiny and New 安宇", "author_id": 7867, ...
2008/11/10
[ "https://Stackoverflow.com/questions/278278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4435/" ]
278,286
<p><strike>All of the errors are on auto-generated files, not within the files that were created by me. Here are a few of them:</p> <pre><code>'Context' is not a member of 'auth_cookies' 'ProcessRequest' cannot be declared 'Overrides' because it does not override a sub in a base class 'Server' is not a member of 'ASP...
[ { "answer_id": 278319, "author": "Kon", "author_id": 22303, "author_profile": "https://Stackoverflow.com/users/22303", "pm_score": 2, "selected": true, "text": "<%@Page%> <%@Master%>" }, { "answer_id": 278330, "author": "Anders", "author_id": 25515, "author_profile": ...
2008/11/10
[ "https://Stackoverflow.com/questions/278286", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25515/" ]
278,290
<p>Is there some elegant way to add an empty option to a DropDownList bound with a LinqDataSource?</p>
[ { "answer_id": 278315, "author": "DOK", "author_id": 27637, "author_profile": "https://Stackoverflow.com/users/27637", "pm_score": 4, "selected": true, "text": "<asp:DropDownList ID=\"categories\" runat=\"server\" AppendDataBoundItems=\"True\" AutoPostBack=\"True\" DataSourceID=\"categor...
2008/11/10
[ "https://Stackoverflow.com/questions/278290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12111/" ]
278,294
<p>The new Vista Audio subsystem is set up to be a chain of devices starting with the inputs, going through all the various controls (like mixers and volumen controls) and then ending up at various endpoints (like speakers or headphones).</p> <p>My question is: Is there a tool out there that will show all the endpoint...
[ { "answer_id": 278315, "author": "DOK", "author_id": 27637, "author_profile": "https://Stackoverflow.com/users/27637", "pm_score": 4, "selected": true, "text": "<asp:DropDownList ID=\"categories\" runat=\"server\" AppendDataBoundItems=\"True\" AutoPostBack=\"True\" DataSourceID=\"categor...
2008/11/10
[ "https://Stackoverflow.com/questions/278294", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17958/" ]
278,296
<p>I've got a PHP script which I'm running from a command line (windows) that performs a variety of tasks, and the only output it gives is via 'print' statements which output direct to screen.</p> <p>What I want to do is capture this to a log file as well.</p> <p>I know I can do: </p> <pre><code>php-cli script.php ...
[ { "answer_id": 278403, "author": "Charles Beattie", "author_id": 97554, "author_profile": "https://Stackoverflow.com/users/97554", "pm_score": 0, "selected": false, "text": "for /f \"delims=\" %a in ('php-cli script.php') do @echo %a&echo %a>>log.txt\n for /f \"delims=\" %%a in ('php-cli...
2008/11/10
[ "https://Stackoverflow.com/questions/278296", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11905/" ]
278,304
<p>What is the best way to stop a user from resizing the top-level window of an application written in WPF?</p>
[ { "answer_id": 278332, "author": "Todd White", "author_id": 30833, "author_profile": "https://Stackoverflow.com/users/30833", "pm_score": 8, "selected": true, "text": "ResizeMode.NoResize <Window x:Class=\"WpfApplication5.Window1\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xam...
2008/11/10
[ "https://Stackoverflow.com/questions/278304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15985/" ]
278,308
<p>I've written <a href="http://www.automatous-monk.com/bluepoles/BluePoles.htm" rel="nofollow noreferrer">a Java applet</a>. A user reports that he tried to run it in Firefox 3.0.3 on OS X 10.5.5 but no go. It wants him to download a plug-in, but when he tells it to install missing plug-ins it can't find the appropri...
[ { "answer_id": 279793, "author": "Paul Reiners", "author_id": 7648, "author_profile": "https://Stackoverflow.com/users/7648", "pm_score": 1, "selected": false, "text": "<param name = \"type\" value = \"application/x-java-applet;version=1.6\">\n <param name = \"type\" value = \"applicatio...
2008/11/10
[ "https://Stackoverflow.com/questions/278308", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7648/" ]
278,351
<p>I'm painfully new to PHP, and was trying to set up phpBB on my local site. I have a stock debian install of apache2 and php5. The phpBB installer ran fine, connected to the database and created all its tables with no problem. But when I tried to open the login page, I got a 0-byte response.</p> <p>A little diggi...
[ { "answer_id": 278394, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "<?php\nphpinfo();\n?>\n" }, { "answer_id": 278467, "author": "okoman", "author_id": 35903, "author_profile...
2008/11/10
[ "https://Stackoverflow.com/questions/278351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36228/" ]
278,361
<p>I'm updating a long list of records. In my code, everything run as predicted until it execute the query. I get an </p> <blockquote> <p>Incorrect syntax near 'TempUpdatePhysicalCityStateZip' </p> </blockquote> <p>(my stored procedure name). I've tested it with SQL Server Management Studio and it runs fine. So, I'...
[ { "answer_id": 278380, "author": "DOK", "author_id": 27637, "author_profile": "https://Stackoverflow.com/users/27637", "pm_score": 3, "selected": false, "text": "cmdUpdate.CommandType = CommandType.StoredProcedure;\n" }, { "answer_id": 278405, "author": "StingyJack", "aut...
2008/11/10
[ "https://Stackoverflow.com/questions/278361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28647/" ]
278,362
<p>C# What is the easiest way to disable a control after 10 seconds? Using a Timer or a stopwatch? I'm new to both so thanks for the help.</p>
[ { "answer_id": 278375, "author": "Galwegian", "author_id": 3201, "author_profile": "https://Stackoverflow.com/users/3201", "pm_score": 0, "selected": false, "text": "System.Windows.Forms.Timer" }, { "answer_id": 278376, "author": "Jon Skeet", "author_id": 22656, "auth...
2008/11/10
[ "https://Stackoverflow.com/questions/278362", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
278,363
<p>My lack of C++ experience, or rather my early learning in garbage collected languages is really stinging me at the moment and I have a problem working with strings in C++.</p> <p>To make it very clear, using std::string or equlivents is not an option - this is char* 's all the way.</p> <p>So: what I need to do is ...
[ { "answer_id": 278411, "author": "Evan Teran", "author_id": 13430, "author_profile": "https://Stackoverflow.com/users/13430", "pm_score": 2, "selected": false, "text": "char * LoadStuff()\n{\n char* suffix = GetSuffix();\n char* nameToUse = new char[50];\n sprintf(\"%s%s\",mBase...
2008/11/10
[ "https://Stackoverflow.com/questions/278363", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15667/" ]
278,381
<p><strong>Background</strong></p> <p>I am capturing video using the video4linux 2 spec. It is captured using a C program in real-time. I also have a Java frontend that can run both locally and remotely. The remote side was easy, I just compress the images to JPEG and ship them over a mini-http server to the client...
[ { "answer_id": 278450, "author": "Alnitak", "author_id": 6782, "author_profile": "https://Stackoverflow.com/users/6782", "pm_score": 2, "selected": false, "text": "Socket shmat" } ]
2008/11/10
[ "https://Stackoverflow.com/questions/278381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29773/" ]
278,398
<p>I'd like to have a blank line after my bash prompt and before the output on my Mac. It should look like this would:</p> <pre><code>echo; ls </code></pre> <p>Can I add a newline to my bash prompt and then go back up one line to wait for user input? Is there something obvious I'm missing?</p>
[ { "answer_id": 278422, "author": "HanClinto", "author_id": 26933, "author_profile": "https://Stackoverflow.com/users/26933", "pm_score": 2, "selected": false, "text": "ESC [ 1 A\n0x1B 0x5B 0x31 0x41\n \\e[1A\n" }, { "answer_id": 278502, "author": "warren", "author_...
2008/11/10
[ "https://Stackoverflow.com/questions/278398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1019/" ]
278,429
<p>I have a piece of code looking like this : </p> <pre><code>TAxis *axis = 0; if (dynamic_cast&lt;MonitorObjectH1C*&gt;(obj)) axis = (dynamic_cast&lt;MonitorObjectH1C*&gt;(obj))-&gt;GetXaxis(); </code></pre> <p>Sometimes it crashes : </p> <pre><code>Thread 1 (Thread -1208658240 (LWP 11400)): #0 0x0019e7a2 in _d...
[ { "answer_id": 278575, "author": "bradtgmurray", "author_id": 1546, "author_profile": "https://Stackoverflow.com/users/1546", "pm_score": 4, "selected": false, "text": "if (MonitorObjectH1C* monitorObject = dynamic_cast<MonitorObjectH1C*>(obj))\n{\n axis = monitorObject->GetXaxis();\n...
2008/11/10
[ "https://Stackoverflow.com/questions/278429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20986/" ]
278,439
<p>What's the best way to get a temp directory name in Windows? I see that I can use <code>GetTempPath</code> and <code>GetTempFileName</code> to create a temporary file, but is there any equivalent to the Linux / BSD <a href="http://linux.die.net/man/3/mkdtemp" rel="noreferrer"><code>mkdtemp</code></a> function for c...
[ { "answer_id": 278457, "author": "Scott Dorman", "author_id": 1559, "author_profile": "https://Stackoverflow.com/users/1559", "pm_score": 9, "selected": true, "text": "public string GetTemporaryDirectory()\n{\n string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileN...
2008/11/10
[ "https://Stackoverflow.com/questions/278439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25507/" ]
278,440
<p>I need to do a modulus operation on very large integers. The biggest integer supported by my platform (edit: .NET 2.0) is a 64 bit integer, which aren't big enough for the numbers I'm working with.</p> <p>How can I do a modulus on really big integers, like 12654875632126424875387321657498462167853687516876876?</p>...
[ { "answer_id": 278468, "author": "Tony Arkles", "author_id": 13868, "author_profile": "https://Stackoverflow.com/users/13868", "pm_score": 4, "selected": true, "text": "(a + b) MOD n = ((a MOD n) + (b MOD n)) MOD n\n ab MOD n = (a MOD n)(b MOD n) MOD n\n" }, { "answer_id": 574222...
2008/11/10
[ "https://Stackoverflow.com/questions/278440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/681/" ]
278,466
<p>In an application I work on, any business logic error causes an exception to be thrown, and the calling code handles the exception. This pattern is used throughout the application and works well. </p> <p>I have a situation where I will be attempting to execute a number of business tasks from inside the business l...
[ { "answer_id": 278511, "author": "Hath", "author_id": 5186, "author_profile": "https://Stackoverflow.com/users/5186", "pm_score": 4, "selected": false, "text": "public class TaskExceptionList : Exception\n{\n public List<Exception> TaskExceptions { get; set; }\n public TaskExceptio...
2008/11/10
[ "https://Stackoverflow.com/questions/278466", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13103/" ]
278,469
<p>I'm starting a project which I think would benefit from bindings (I've got a source list table, several browser views, etc), but I think it would also be quite doable, and perhaps more understandable, without them. From my limited experience I've found bindings to be difficult to troubleshoot and very "magic" (e.g. ...
[ { "answer_id": 278597, "author": "Peter Hosey", "author_id": 30461, "author_profile": "https://Stackoverflow.com/users/30461", "pm_score": 5, "selected": true, "text": "NSView NSCell NSWindow NSController NSArrayController @synthesize" } ]
2008/11/10
[ "https://Stackoverflow.com/questions/278469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1512/" ]
278,475
<p>I'm trying to animate Visio objects with a loop, such as:</p> <pre><code>For reposition = 2 To 6 xpos = reposition ypos = reposition sh1.SetCenter xpos, ypos Sleep 1000 Next reposition </code></pre> <p>While this DOES move the object from the starting position to the ending, the intermediate ste...
[ { "answer_id": 278923, "author": "DJ.", "author_id": 10492, "author_profile": "https://Stackoverflow.com/users/10492", "pm_score": 3, "selected": true, "text": "DoEvents" }, { "answer_id": 281749, "author": "user32848", "author_id": 32848, "author_profile": "https://S...
2008/11/10
[ "https://Stackoverflow.com/questions/278475", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32848/" ]
278,476
<p>I must confess I'm somewhat of an OOP skeptic. Bad pedagogical and laboral experiences with object orientation didn't help. So I converted into a fervent believer in Visual Basic (the classic one!).</p> <p>Then one day I found out C++ had changed and now had the STL and templates. I really liked that! Made the lang...
[ { "answer_id": 278527, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 4, "selected": false, "text": "class Point( object ):\n # some set of features: attributes, methods, etc.\n\nclass PointWithMass( Point ):\n # An ad...
2008/11/10
[ "https://Stackoverflow.com/questions/278476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21258/" ]
278,488
<p>You are given a 32-bit unsigned integer array with length up to 2<sup>32</sup>, with the property that more than half of the entries in the array are equal to N, for some 32-bit unsigned integer N. Find N looking at each number in the array only once and using at most 2 kB of memory.</p> <p>Your solution must be d...
[ { "answer_id": 278601, "author": "Franci Penov", "author_id": 17028, "author_profile": "https://Stackoverflow.com/users/17028", "pm_score": 2, "selected": false, "text": "int lNumbers = (size_of(arrNumbers)/size_of(arrNumbers[0]);\n\nfor (int i = 0; i < lNumbers; i++)\n for (int bi = 0;...
2008/11/10
[ "https://Stackoverflow.com/questions/278488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2683/" ]
278,507
<p>At my current job we have a CMS system that is .NET/SQL Server based. While customizing a couple of the modules for some internal use, I was a little surprised to see that instead of having APIs that returned data via your typical result set that was bound to a DataGrid/DataList/Repeater control, that the APIs retur...
[ { "answer_id": 278601, "author": "Franci Penov", "author_id": 17028, "author_profile": "https://Stackoverflow.com/users/17028", "pm_score": 2, "selected": false, "text": "int lNumbers = (size_of(arrNumbers)/size_of(arrNumbers[0]);\n\nfor (int i = 0; i < lNumbers; i++)\n for (int bi = 0;...
2008/11/10
[ "https://Stackoverflow.com/questions/278507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/71/" ]
278,539
<p>I have written a simple PowerShell filter that pushes the current object down the pipeline if its date is between the specified begin and end date. The objects coming down the pipeline are always in ascending date order so as soon as the date exceeds the specified end date I know my work is done and I would like to...
[ { "answer_id": 278785, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "filter FirstObject ([string]$vName = '') {\n if ($vName) {sv $vName $_ -s 1} else {$_}\n break\n}\n\nfilter FirstElements ([in...
2008/11/10
[ "https://Stackoverflow.com/questions/278539", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30026/" ]
278,542
<p>the problem I have is that I have two sets of values in a drop down list. If type 'A' is selected I want a text box to be populated with a value from the database and be read only. If Type 'B' is selected the box is to be empty and editable.</p> <p>My original code is written in jsp/struts and I have sort of achiev...
[ { "answer_id": 279015, "author": "Mr. Shiny and New 安宇", "author_id": 7867, "author_profile": "https://Stackoverflow.com/users/7867", "pm_score": 1, "selected": false, "text": "<script>\n function reload() {\n document.forms[0].action=\"reloadFormData.jsp\";\n document.forms[0].su...
2008/11/10
[ "https://Stackoverflow.com/questions/278542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
278,564
<p>After some time I wanted to update my git repo, and then something went wrong. What is the proper way out of this situation?</p> <pre><code>mblsha@siruba:~/src/psi/ $ git status iris: needs merge # On branch master # Changes to be committed: # (use "git reset HEAD &lt;file&gt;..." to unstage) # # modified: sr...
[ { "answer_id": 306308, "author": "Daniel Lucraft", "author_id": 11951, "author_profile": "https://Stackoverflow.com/users/11951", "pm_score": 4, "selected": true, "text": "1. deleting the submodule (rm -r iris)\n2. recreating it again (git submodule update)\n" }, { "answer_id": 8...
2008/11/10
[ "https://Stackoverflow.com/questions/278564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8950/" ]