qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
151,303
<p>Using the <code>AddHandler</code> method, if I never use <code>RemoveHandler</code>, will that lead to memory leaks in some conditions and situations? I'm not so sure about the truth of this.</p> <p>And are there other causes to memory leaks that are solely available in VB as opposed to C#?</p>
[ { "answer_id": 151430, "author": "Gishu", "author_id": 1695, "author_profile": "https://Stackoverflow.com/users/1695", "pm_score": 4, "selected": false, "text": "button1.Click += new EventHandler(Form_Click_Handler);\n childForm.Event -= new EventHandler(Form_Handler)\n" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/151303", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8505/" ]
151,335
<p>Is there anyway to combine all resources into a single exe file such as app.config and associated DLL's?</p> <p>Some applications seem to do this such as eMule.</p> <p>I don't want my app.config sitting there waiting to be edited.</p> <p>Thanks</p>
[ { "answer_id": 151352, "author": "Mark Glorie", "author_id": 952, "author_profile": "https://Stackoverflow.com/users/952", "pm_score": 4, "selected": true, "text": "Solution Explorer Right-click Properties Build Action Embedded Resource" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/151335", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17211/" ]
151,337
<p>I'm looking for a cross-browser method - I know IE has something (I've already forgotten what), and the way to do it in Mozilla may have to do with a focusNode thing I found, that seems related to getting text selections.</p> <p>Methods involving jQuery or another common JS library are fine by me.</p> <p>Thanks!</...
[ { "answer_id": 151364, "author": "ironfroggy", "author_id": 19687, "author_profile": "https://Stackoverflow.com/users/19687", "pm_score": 1, "selected": false, "text": "var currentFocus = null; \n$(':input').focus( function() { \n currentFocus = this; \n}).blur( function() { \n\n c...
2008/09/30
[ "https://Stackoverflow.com/questions/151337", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1507554/" ]
151,338
<p>How can I add an instance variable to a defined class at <b>runtime</b>, and later get and set its value from outside of the class?</p> <p>I'm looking for a metaprogramming solution that allows me to modify the class instance at runtime instead of modifying the source code that originally defined the class. A few ...
[ { "answer_id": 151354, "author": "Gordon Wilson", "author_id": 23071, "author_profile": "https://Stackoverflow.com/users/23071", "pm_score": 6, "selected": false, "text": "instance_variable_get instance_variable_set >> foo = Object.new\n=> #<Object:0x2aaaaaacc400>\n\n>> foo.instance_vari...
2008/09/30
[ "https://Stackoverflow.com/questions/151338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
151,348
<p>Why is NodeList undefined in IE6/7?</p> <pre><code>&lt;form action="/" method="post" id="testform"&gt; &lt;input type="checkbox" name="foobar[]" value="1" id="" /&gt; &lt;input type="checkbox" name="foobar[]" value="2" id="" /&gt; &lt;input type="checkbox" name="foobar[]" value="3" id="" /&gt; &lt;/...
[ { "answer_id": 151631, "author": "Adam Franco", "author_id": 15872, "author_profile": "https://Stackoverflow.com/users/15872", "pm_score": 4, "selected": false, "text": "...\n\nif (typeof el.length == 'number' \n && typeof el.item == 'function'\n && typeof el.nextNode == 'function'...
2008/09/30
[ "https://Stackoverflow.com/questions/151348", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8369/" ]
151,350
<p>What are my options? I tried MonoDevelop over a year ago but it was extremely buggy. Is the latest version a stable development environment?</p>
[ { "answer_id": 171663, "author": "Sklivvz", "author_id": 7028, "author_profile": "https://Stackoverflow.com/users/7028", "pm_score": 3, "selected": false, "text": "make run" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/151350", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9825/" ]
151,362
<p>For posting AJAX forms in a form with many parameters, I am using a solution of creating an <code>iframe</code>, posting the form to it by POST, and then accessing the <code>iframe</code>'s content. specifically, I am accessing the content like this:</p> <pre><code>$("some_iframe_id").get(0).contentWindow.document...
[ { "answer_id": 151395, "author": "Ris Adams", "author_id": 15683, "author_profile": "https://Stackoverflow.com/users/15683", "pm_score": 0, "selected": false, "text": "document.domain = www.foo.com\n" }, { "answer_id": 151404, "author": "Ovesh", "author_id": 3751, "au...
2008/09/30
[ "https://Stackoverflow.com/questions/151362", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3751/" ]
151,369
<p>Given an HTML page that has a complex table-based layout and many tags that are duplicated and wasteful, e.g.:</p> <pre><code>td align="left" class="tableformat" width="65%" style="border-bottom:1px solid #ff9600; border-right:1px solid #ff9600; background-color:#FDD69E" nowrap etc. </code></pre> <p>Are there tool...
[ { "answer_id": 151549, "author": "gregmac", "author_id": 7913, "author_profile": "https://Stackoverflow.com/users/7913", "pm_score": 1, "selected": false, "text": "<body>\n <div id=\"header\">\n <img id=\"logo\"/>\n <h1 id=\"title\">\n My Site\n </h1>\n <div id=\"subtit...
2008/09/30
[ "https://Stackoverflow.com/questions/151369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10116/" ]
151,392
<p>Does anyone know any good tool that I can use to perform stress tests on a video streaming server? I need to test how well my server handles 5,000+ connections. </p>
[ { "answer_id": 151650, "author": "Andrew Edgecombe", "author_id": 11694, "author_profile": "https://Stackoverflow.com/users/11694", "pm_score": 4, "selected": true, "text": "$i = 0;\n$myurl = \"udp://someurl\";\n@cmdline = (\"/usr/bin/vlc\", \"\");\nfor( $i = 1; $i <= 5000; $i++ )\n{\n ...
2008/09/30
[ "https://Stackoverflow.com/questions/151392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23637/" ]
151,403
<p>According to the answers to <a href="https://stackoverflow.com/questions/151250/how-do-i-embed-a-file-version-in-an-msi-file-with-visual-studio">this</a> question, I cannot embed a file version in my .msi file. </p> <p>The installer that I give the client needs to have a file version. </p> <p>So, what I want to do...
[ { "answer_id": 151423, "author": "Steven A. Lowe", "author_id": 9345, "author_profile": "https://Stackoverflow.com/users/9345", "pm_score": 1, "selected": false, "text": "VersionInfoVersion = 1.1.0.0\n" }, { "answer_id": 151833, "author": "Blorgbeard", "author_id": 369, ...
2008/09/30
[ "https://Stackoverflow.com/questions/151403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/369/" ]
151,407
<p>Under Linux, my C++ application is using fork() and execv() to launch multiple instances of OpenOffice so as to view some powerpoint slide shows. This part works.</p> <p>Next I want to be able to move the OpenOffice windows to specific locations on the display. I can do that with the XMoveResizeWindow() function bu...
[ { "answer_id": 27486173, "author": "Gauthier", "author_id": 108802, "author_profile": "https://Stackoverflow.com/users/108802", "pm_score": 3, "selected": false, "text": "xdotool #!/bin/bash\n# --any and --name present only as a work-around, see: https://github.com/jordansissel/xdotool/i...
2008/09/30
[ "https://Stackoverflow.com/questions/151407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5324/" ]
151,414
<p>Here is the directory layout that was installed with Leopard. What is the "A" directory and why the "Current" directory in addition to the "CurrentJDK"?</p> <p>It seems like you can easily switch the current JDK by move the CurrentJDK link, but then the contents under Current and A will be out of sync.</p> <pre> ...
[ { "answer_id": 151463, "author": "Chris Hanson", "author_id": 714, "author_profile": "https://Stackoverflow.com/users/714", "pm_score": 4, "selected": true, "text": "A Current A JavaVM.framework CurrentJDK" }, { "answer_id": 151515, "author": "Joe Liversedge", "author_id"...
2008/09/30
[ "https://Stackoverflow.com/questions/151414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21176/" ]
151,418
<p>I have a function pointer defined by:</p> <pre><code>typedef void (*EventFunction)(int nEvent); </code></pre> <p>Is there a way to handle that function with a specific instance of a C++ object?</p> <pre><code>class A { private: EventFunction handler; public: void SetEvent(EventFunction func) { handler = ...
[ { "answer_id": 151427, "author": "markets", "author_id": 4662, "author_profile": "https://Stackoverflow.com/users/4662", "pm_score": 1, "selected": false, "text": "typedef void (*B::EventFunction)(int nEvent); static void EventFrom A(int nEvent);" }, { "answer_id": 151439, "a...
2008/09/30
[ "https://Stackoverflow.com/questions/151418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4592/" ]
151,434
<p>I have a web service API. Some calls return objects containing text fields with information provided by the user. From both a design and a security standpoint, what are the downsides to returning null in those fields when no information has been provided? Is there a clear advantage to always returning an empty strin...
[ { "answer_id": 151457, "author": "MusiGenesis", "author_id": 14606, "author_profile": "https://Stackoverflow.com/users/14606", "pm_score": 0, "selected": false, "text": "string.IsNullOrEmpty()\n" }, { "answer_id": 151685, "author": "Robert Paulson", "author_id": 14033, ...
2008/09/30
[ "https://Stackoverflow.com/questions/151434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14128/" ]
151,448
<p>Bearing in mind this is for <strong>classic asp</strong></p> <p>Which is better, all HTML contained within Response.Write Statements or inserting variables into HTML via &lt;%= %>.<br> Eg </p> <pre><code>Response.Write "&lt;table&gt;" &amp; vbCrlf Response.Write "&lt;tr&gt;" &amp;vbCrLf Response.Write "&lt;td cla...
[ { "answer_id": 151455, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 1, "selected": false, "text": "<%= %> Response.Write()" }, { "answer_id": 151536, "author": "Russell Myers", "author_id": 18194, "a...
2008/09/30
[ "https://Stackoverflow.com/questions/151448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4665/" ]
151,472
<p>In .NET, what is the difference between <code>String.Empty</code> and <code>""</code>, and are they interchangable, or is there some underlying reference or Localization issues around equality that <code>String.Empty</code> will ensure are not a problem?</p>
[ { "answer_id": 151481, "author": "Brian R. Bondy", "author_id": 3153, "author_profile": "https://Stackoverflow.com/users/3153", "pm_score": 9, "selected": true, "text": "\"\" string.Empty string.Empty \"\" \"\" .Empty .Length == 0 .Length == 0 .Empty" }, { "answer_id": 156100, ...
2008/09/30
[ "https://Stackoverflow.com/questions/151472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5302/" ]
151,496
<p>I am converting an excel sheet formula to java but I can't understand how excel manages to take the following: 0.22 Applies a formula: =TEXT(R5/14, "h:mm") and somehow arrives at: 0.22</p> <p>Again if I provide: 2.8 it arrives at 4.48 Can someone please explain to me how it does this. I have read a little regarding...
[ { "answer_id": 151535, "author": "stimms", "author_id": 361, "author_profile": "https://Stackoverflow.com/users/361", "pm_score": 0, "selected": false, "text": "int msInADay= 86400000;\nTime value = new Time(R5/14 * msInADay);\n" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/151496", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
151,505
<p>I came from Java, and now I am working more with Ruby. </p> <p>One language feature I am not familiar with is the <code>module</code>. I am wondering what exactly is a <code>module</code> and when do you use one, and why use a <code>module</code> over a <code>class</code>?</p>
[ { "answer_id": 151534, "author": "hurcane", "author_id": 21363, "author_profile": "https://Stackoverflow.com/users/21363", "pm_score": 5, "selected": false, "text": "http://www.rubycentral.com/pickaxe/classes.html" }, { "answer_id": 9778021, "author": "Sergii Shevchyk", "...
2008/09/30
[ "https://Stackoverflow.com/questions/151505", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5004/" ]
151,520
<p>It is unclear to me from the <a href="http://msdn.microsoft.com/en-us/library/system.icloneable.aspx" rel="nofollow noreferrer">MSDN documentation</a> if I should provide a deep or a shallow clone when implementing ICloneable. What is the preferred option?</p>
[ { "answer_id": 20873097, "author": "supercat", "author_id": 363751, "author_profile": "https://Stackoverflow.com/users/363751", "pm_score": 1, "selected": false, "text": "Foo List<Bar> Foo List<Bar> List<IdentityOfFoo> List<MutableStateOfFoo>" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/151520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20164/" ]
151,521
<p>I'm a LINQ to XML newbie, and a KML newbie as well; so bear with me. </p> <p>My goal is to extract individual Placemarks from a KML file. My KML begins thusly:</p> <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Document xmlns="http://earth.google.com/kml/2.0"&gt; ...
[ { "answer_id": 151561, "author": "Bruce Murdock", "author_id": 23650, "author_profile": "https://Stackoverflow.com/users/23650", "pm_score": 0, "selected": false, "text": "Dim ns as string = \"http://earth.google.com/kml/2.0\"\ndim foo = Kml.Descendants(ns + \"Document\") \n XElement.Nam...
2008/09/30
[ "https://Stackoverflow.com/questions/151521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/239663/" ]
151,528
<p>I have this big data-entry sort of page, a table kind of layout using divs. Each row has subrows which can be toggled open/closed. The toggling is triggered using css visibility settings. Each "cell" of the table has a little image in its corner, you click on the image, and a popup window opens that allows you to pu...
[ { "answer_id": 152633, "author": "user20916", "author_id": 20916, "author_profile": "https://Stackoverflow.com/users/20916", "pm_score": 3, "selected": false, "text": "hasLayout zoom: 1 * {\n zoom: 1;\n}\n zoom" }, { "answer_id": 801622, "author": "Community", "author_...
2008/09/30
[ "https://Stackoverflow.com/questions/151528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13800/" ]
151,544
<p>I'm looking for a cross-browser method of detecting that a client web browser is scrolled all the way to the bottom (or top) of the screen.</p> <p>Really, the top is fairly easy, as<br> <code>scrY = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop</code><br> is zero if you're ...
[ { "answer_id": 1090683, "author": "yanchenko", "author_id": 15187, "author_profile": "https://Stackoverflow.com/users/15187", "pm_score": 2, "selected": false, "text": "function isTop() {\n return window.pageYOffset == 0;\n}\n\nfunction isBottom() {\n return window.pageYOffset >= w...
2008/09/30
[ "https://Stackoverflow.com/questions/151544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13623/" ]
151,545
<p>I need to get the fully expanded hostname of the host that my Ruby script is running on. In Perl I've used Sys::Hostname::Long with good results. Google seems to suggest I should use Socket.hostname in ruby, but that's returning just the nodename, not the full hostname.</p>
[ { "answer_id": 151570, "author": "dvorak", "author_id": 19235, "author_profile": "https://Stackoverflow.com/users/19235", "pm_score": 4, "selected": false, "text": "hostname = Socket.gethostbyname(Socket.gethostname).first \n" }, { "answer_id": 12046321, "author": "Alexis Lê-...
2008/09/30
[ "https://Stackoverflow.com/questions/151545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19235/" ]
151,555
<p>I'm creating a Firefox extension for demo purposes. I to call a specific JavaScript function in the document from the extension. I wrote this in my HTML document (not inside extension, but a page that is loaded by Firefox):</p> <pre><code>document.funcToBeCalled = function() { // function body }; </code></pre> ...
[ { "answer_id": 2525816, "author": "Carlos Rendon", "author_id": 43851, "author_profile": "https://Stackoverflow.com/users/43851", "pm_score": 3, "selected": false, "text": "document.wrappedJSObject.funcToBeCalled();\n" }, { "answer_id": 2896066, "author": "user307635", "a...
2008/09/30
[ "https://Stackoverflow.com/questions/151555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11238/" ]
151,587
<p>I'm a huge fan of bzr and I'm glad they're working on tortoise for it, but currently it's WAY too slow to be useful. The icons are almost always incorrect and when I load a directory in explorer with a lot of branches it locks up my entire system for anywhere from 10 seconds to 2 minutes. I look forward to trying ...
[ { "answer_id": 151911, "author": "Jason Anderson", "author_id": 5142, "author_profile": "https://Stackoverflow.com/users/5142", "pm_score": 2, "selected": false, "text": "python tortoise-bzr.py --unregister\n" }, { "answer_id": 542445, "author": "PhiLho", "author_id": 154...
2008/09/30
[ "https://Stackoverflow.com/questions/151587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14651/" ]
151,590
<p>How do you detect if <code>Socket#close()</code> has been called on a socket on the remote side?</p>
[ { "answer_id": 152116, "author": "WMR", "author_id": 2844, "author_profile": "https://Stackoverflow.com/users/2844", "pm_score": 7, "selected": true, "text": "isConnected true public class MyServer {\n public static final int PORT = 12345;\n public static void main(String[] args) t...
2008/09/30
[ "https://Stackoverflow.com/questions/151590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4792/" ]
151,594
<p>You can have different naming convention for class members, static objects, global objects, and structs. Some of the examples of them are as below.</p> <pre><code>_member m_member </code></pre> <p>or in Java case, the usage of <code>this.member</code>.</p> <p>But is there any good technique or naming convention f...
[ { "answer_id": 151693, "author": "KPexEA", "author_id": 13676, "author_profile": "https://Stackoverflow.com/users/13676", "pm_score": 0, "selected": false, "text": " m_varname - Class member variables\n g_varname - Global variables\n" }, { "answer_id": 3282684, "author": "Tio...
2008/09/30
[ "https://Stackoverflow.com/questions/151594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17382/" ]
151,595
<p>I'm looking to try out JRuby and JRuby on Rails. I'm having trouble finding information on what's difference between JRuby on Rails and Ruby on Rails. </p> <p>What's the differences I need to look out for?</p>
[ { "answer_id": 11258063, "author": "kares", "author_id": 454312, "author_profile": "https://Stackoverflow.com/users/454312", "pm_score": 6, "selected": false, "text": "config.threadsafe!" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/151595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16204/" ]
151,639
<p>I am trying to get the yasnippet and pabbrev packages working together with emacs, but I cannot seem to get any love. How can I get them to play nicely together?</p> <p>The crux of the problem is that pabbrev and yasnippet are binding to the tab keys. Both packages seem to do this fallback when a match isn't foun...
[ { "answer_id": 152047, "author": "Justin Tanner", "author_id": 609, "author_profile": "https://Stackoverflow.com/users/609", "pm_score": 2, "selected": false, "text": "(require 'hippie-exp)\n\n(setq hippie-expand-try-functions-list\n '(yas/hippie-try-expand\n try-expand-dabbr...
2008/09/30
[ "https://Stackoverflow.com/questions/151639", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11052/" ]
151,641
<p>Banging my head against the wall here. I don't want to reinvent the wheel.</p> <p>The default Flex 3 classs for PopupButton is a combination of two buttons. One is a normal button with label and/or icon, and the second is the arrow which opens the popup. </p> <p>My struggle here is that I just want a button with a...
[ { "answer_id": 153567, "author": "Brandon", "author_id": 23133, "author_profile": "https://Stackoverflow.com/users/23133", "pm_score": 0, "selected": false, "text": "print(</mx:Script>\n <![CDATA[\n import mx.controls.Alert;\n public var myAlert:Alert = new Alert();\...
2008/09/30
[ "https://Stackoverflow.com/questions/151641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11814/" ]
151,652
<p>This question might not seem programming related at first, but let me explain.</p> <p>I'm stuck with using a keyboard that doesn't have <kbd>home</kbd> <kbd>end</kbd> <kbd>page up</kbd> and <kbd>page down</kbd> buttons. I need those functions for programming.</p> <p>So the question is: what's a good/free utility t...
[ { "answer_id": 153653, "author": "lajos", "author_id": 3740, "author_profile": "https://Stackoverflow.com/users/3740", "pm_score": 1, "selected": false, "text": "#Right::End\n#Left::Home \n#Up::PgUp\n#Down::PgDn\n#BS::Del\n" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/151652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3740/" ]
151,660
<p>In PHP5, is the __destruct() method guaranteed to be called for each object instance? Can exceptions in the program prevent this from happening?</p>
[ { "answer_id": 8293937, "author": "Mikko Rantalainen", "author_id": 334451, "author_profile": "https://Stackoverflow.com/users/334451", "pm_score": 4, "selected": false, "text": "exit() FATAL" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/151660", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4682/" ]
151,677
<p>I'm looking for a tool that will, in bulk, add a license header to some source files, some of which already have the header. Is there a tool out there that will insert a header, if it is not already present?</p> <p><em>Edit: I am intentionally not marking an answer to this question, since answers are basically all...
[ { "answer_id": 151684, "author": "Silver Dragon", "author_id": 9440, "author_profile": "https://Stackoverflow.com/users/9440", "pm_score": 4, "selected": false, "text": "excludedir # updates the copyright information for all .cs files\n# usage: call recursive_traversal, with the followin...
2008/09/30
[ "https://Stackoverflow.com/questions/151677", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5897/" ]
151,682
<pre><code> &lt;my:DataGridTemplateColumn CanUserResize="False" Width="150" Header="{Binding MeetingName, Source={StaticResource LocStrings}}" SortMemberPath="MeetingName"&gt; &lt;/my:DataGridTemplateColumn&gt; </code></pre> <p>I have the above column in a Silver...
[ { "answer_id": 151879, "author": "Adam Kinney", "author_id": 1973, "author_profile": "https://Stackoverflow.com/users/1973", "pm_score": 6, "selected": true, "text": "xmlns:data=\"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data\"\nxmlns:dataprimitives=\"clr-na...
2008/09/30
[ "https://Stackoverflow.com/questions/151682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23663/" ]
151,686
<p><strong><em>Note</strong>: The code in this question is part of <a href="http://www.codeplex.com/desleeper" rel="noreferrer">deSleeper</a> if you want the full source.</em></p> <p>One of the things I wanted out of commands was a baked design for asynchronous operations. I wanted the button pressed to disable while...
[ { "answer_id": 228713, "author": "nedruod", "author_id": 5504, "author_profile": "https://Stackoverflow.com/users/5504", "pm_score": 3, "selected": true, "text": "public abstract class AsyncCommand : ICommand\n{\n public event EventHandler CanExecuteChanged;\n public event EventHan...
2008/09/30
[ "https://Stackoverflow.com/questions/151686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5504/" ]
151,687
<p>I'm developing an embedded system which currently boots linux with console output on serial port 1 (using the console boot param from the boot loader). However, eventually we will be using this serial port. What is the best solution for the kernel console output? /dev/null? Can it be put on a pty somehow so that...
[ { "answer_id": 228713, "author": "nedruod", "author_id": 5504, "author_profile": "https://Stackoverflow.com/users/5504", "pm_score": 3, "selected": true, "text": "public abstract class AsyncCommand : ICommand\n{\n public event EventHandler CanExecuteChanged;\n public event EventHan...
2008/09/30
[ "https://Stackoverflow.com/questions/151687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20889/" ]
151,701
<p>Our company runs a web site (oursite.com) with affiliate partners who send us traffic. In some cases, we set up our affiliates with their own subdomain (affiliate.oursite.com), and they display selected content from our site on their site (affiliate.com) using an iframe.</p> <p>Example of a page on their site:</p> ...
[ { "answer_id": 152389, "author": "Silver Dragon", "author_id": 9440, "author_profile": "https://Stackoverflow.com/users/9440", "pm_score": 5, "selected": true, "text": "example_page.html <iframe> </iframe>" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/151701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15088/" ]
151,731
<p>I've been trying to submit a form with the FormPanel using the Action class Ext defaults to. However, I'd like it to consider the response as a script, not JSON-encoded.</p> <p>Has anyone had any experience on this?</p>
[ { "answer_id": 152134, "author": "Dave Nolan", "author_id": 9474, "author_profile": "https://Stackoverflow.com/users/9474", "pm_score": 3, "selected": true, "text": "Ext.form.Action eval response result success Ext.form.BasicForm" }, { "answer_id": 1160562, "author": "Ballsac...
2008/09/30
[ "https://Stackoverflow.com/questions/151731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5646/" ]
151,752
<p>I've created some fairly simple XAML, and it works perfectly (at least in KAXML). The storyboards run perfectly when called from within the XAML, but when I try to access them from outside I get the error:</p> <pre><code>'buttonGlow' name cannot be found in the name scope of 'System.Windows.Controls.Button'. </cod...
[ { "answer_id": 154189, "author": "Kris Erickson", "author_id": 3798, "author_profile": "https://Stackoverflow.com/users/3798", "pm_score": 5, "selected": true, "text": "pressedButtonStoryboard.Begin(_xamlButton);\n pressedButtonStoryboard.Begin(_xamlButton, _xamlButton.Template);\n" },...
2008/09/30
[ "https://Stackoverflow.com/questions/151752", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3798/" ]
151,756
<p>Is it possible for a web server to know which <em>type</em> of device request has been received from?</p> <p>For example, can a create a website which shows different contents if request came from a computer (Firefox) and something different if it came from iPhone?</p>
[ { "answer_id": 151759, "author": "Mitch Wheat", "author_id": 16076, "author_profile": "https://Stackoverflow.com/users/16076", "pm_score": 1, "selected": false, "text": "User-Agent" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/151756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23671/" ]
151,769
<p>Originally there was the DAL object which my BO's called for info and then passed to UI. Then I started noticing reduced code in UI and there were Controller classes. What's the decent recomendation.</p> <p>I currently structure mine</p> <pre><code>Public Class OrderDAL Private _id Integer Private _order ...
[ { "answer_id": 152228, "author": "Sklivvz", "author_id": 7028, "author_profile": "https://Stackoverflow.com/users/7028", "pm_score": 1, "selected": true, "text": "OrderControllerFactory.ConfiguredOrderController().GetOrder(42);\n public interface IOrderController\n{\n Order GetOrder(i...
2008/09/30
[ "https://Stackoverflow.com/questions/151769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23667/" ]
151,777
<p>I've been working on the Android SDK platform, and it is a little unclear how to save an application's state. So given this minor re-tooling of the 'Hello, Android' example:</p> <pre class="lang-java prettyprint-override"><code>package com.android.hello; import android.app.Activity; import android.os.Bundle; import...
[ { "answer_id": 151822, "author": "Dave L.", "author_id": 3093, "author_profile": "https://Stackoverflow.com/users/3093", "pm_score": 9, "selected": false, "text": "savedInstanceState onCreate onSaveInstanceState" }, { "answer_id": 151940, "author": "Reto Meier", "author_i...
2008/09/30
[ "https://Stackoverflow.com/questions/151777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/61/" ]
151,778
<p>I'm making a mini ORM for a Java program I'm writing... there is a class for each table in my db, all inheriting from <code>ModelBase</code>.</p> <p><code>ModelBase</code> is abstract &amp; provides a bunch of static methods for finding &amp; binding objects from the db, for example:</p> <pre><code>public static A...
[ { "answer_id": 152170, "author": "Bruno De Fraine", "author_id": 6918, "author_profile": "https://Stackoverflow.com/users/6918", "pm_score": 1, "selected": false, "text": "public abstract class BaseFactory<E> {\n public abstract String getSelectSQL();\n public List<E> findAll(Class...
2008/09/30
[ "https://Stackoverflow.com/questions/151778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16925/" ]
151,783
<p>just curious to know which CPU architectures support compare and swap atomic primitives? </p>
[ { "answer_id": 151802, "author": "mat_geek", "author_id": 11032, "author_profile": "https://Stackoverflow.com/users/11032", "pm_score": 3, "selected": false, "text": "bool_t My_CompareAndSwap(IN int *ptr, IN int old, IN int new)\n{\n unsigned char ret;\n\n /* Note that sete...
2008/09/30
[ "https://Stackoverflow.com/questions/151783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14069/" ]
151,794
<p>Any idea on how to unit test the views in ASP.NET MVC?</p> <p>I am sick of encountering the yellow screen of death when I launch my MVC project just because I forget to update the views when one of the <code>Action</code> methods of my controller changes name.</p>
[ { "answer_id": 1110422, "author": "Richard Ev", "author_id": 39709, "author_profile": "https://Stackoverflow.com/users/39709", "pm_score": 3, "selected": false, "text": "<MvcBuildViews> <Target Name=\"AfterBuild\" Condition=\"'$(MvcBuildViews)'=='true'\">\n <AspNetCompiler VirtualPath=\...
2008/09/30
[ "https://Stackoverflow.com/questions/151794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3834/" ]
151,800
<p>Given a database field named "widget_ids", containing data like "67/797/124/" or "45/", where the numbers are slash separated widget_ids... how would you make an update statement with SQL that would say: "if the widget_ids of the row with id X contains the text "somenumber/" do nothing, otherwise append "somenumber/...
[ { "answer_id": 151829, "author": "Logan", "author_id": 3518, "author_profile": "https://Stackoverflow.com/users/3518", "pm_score": 4, "selected": true, "text": "update <tablename>\n set widget_id = widget_id + \"somenumber/\"\n where row_id = X\n and widget_id not like \"%/somenumbe...
2008/09/30
[ "https://Stackoverflow.com/questions/151800", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14278/" ]
151,804
<p>I want to watch a folder tree on a network server for changes. The files all have a specific extension. There are about 200 folders in the tree and about 1200 files with the extension I am watching.</p> <p>I can't write a service to run on the server (off-limits!) so the solution has to be local to the client. Time...
[ { "answer_id": 37476692, "author": "trevorwong77", "author_id": 1089235, "author_profile": "https://Stackoverflow.com/users/1089235", "pm_score": 1, "selected": false, "text": "var fileNames = Directory.GetFiles(srcFolder);\nforeach (string fileName in fileNames)\n{\n string[] lines = ...
2008/09/30
[ "https://Stackoverflow.com/questions/151804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/492/" ]
151,841
<p>I'd like to document what high-level (i.e. C++ not inline assembler ) functions or macros are available for Compare And Swap (CAS) atomic primitives... </p> <p>E.g., WIN32 on x86 has a family of functions <code>_InterlockedCompareExchange</code> in the <code>&lt;_intrin.h&gt;</code> header.</p>
[ { "answer_id": 151847, "author": "Michael Burr", "author_id": 12711, "author_profile": "https://Stackoverflow.com/users/12711", "pm_score": 5, "selected": true, "text": "atomic_compare_exchange() \n" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/151841", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14069/" ]
151,844
<p>Since Unicode lacks a series of zero width sorting characters, I need to determine equivalent characters that will allow me to force a certain order on a list that is automatically sorted by character values. Unfortunately the list items are not in an alphabetical order, nor is it acceptable to prefix them with visi...
[ { "answer_id": 151918, "author": "JasonTrue", "author_id": 13433, "author_profile": "https://Stackoverflow.com/users/13433", "pm_score": 1, "selected": false, "text": "usort(array, comparisonFunction)" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/151844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5697/" ]
151,846
<p>This isn't as malicious as it sounds, I want to get the current size of their windows, not look at what is in them. The purpose is to figure out that if every other window is fullscreen then I should start up like that too. Or if all the other processes are only 800x600 despite there being a huge resolution then t...
[ { "answer_id": 152094, "author": "Swaroop C H", "author_id": 4869, "author_profile": "https://Stackoverflow.com/users/4869", "pm_score": 2, "selected": false, "text": "win32gui" }, { "answer_id": 152454, "author": "DzinX", "author_id": 18745, "author_profile": "https:...
2008/09/30
[ "https://Stackoverflow.com/questions/151846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3176/" ]
151,850
<p>In many languages, assignments are legal in conditions. I never understood the reason behind this. Why would you write:</p> <pre><code>if (var1 = var2) { ... } </code></pre> <p>instead of:</p> <pre><code>var1 = var2; if (var1) { ... } </code></pre> <p>?</p>
[ { "answer_id": 151855, "author": "Michael Burr", "author_id": 12711, "author_profile": "https://Stackoverflow.com/users/12711", "pm_score": 5, "selected": false, "text": "while ((c = getchar()) != EOF) {\n // process the character\n}\n\n// end of file reached...\n" }, { "answe...
2008/09/30
[ "https://Stackoverflow.com/questions/151850", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3740/" ]
151,872
<p>I have a form where i have used Infragistics windows grid control to display the data. In this, i have placed a button on one of the cell. I want to set its visibility either True or False based on the row condition. I have handled the <strong>InitializeRow</strong> event of <strong>UltraWinGrid</strong> control a...
[ { "answer_id": 152634, "author": "Christoffer Lette", "author_id": 11808, "author_profile": "https://Stackoverflow.com/users/11808", "pm_score": 2, "selected": false, "text": "UltraGridRow row = ...\n\nrow.Cells[buttonCellIndex].Hidden = true;\n UltraGrid" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/151872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
151,874
<p>I am working with web Dynpro java.. I have created a stateless session bean wherein I have created business methods for inserting and retrieving records from my dictionary table. My table has two fields of <code>java.sql.Date</code> type The web service that i have created is working fine for <code>insertRecords()...
[ { "answer_id": 22613604, "author": "sharkbait", "author_id": 1353274, "author_profile": "https://Stackoverflow.com/users/1353274", "pm_score": 0, "selected": false, "text": "try {\n ctx = new InitialContext();\n\n Object o = ctx\n .lookup(\"sc.fia...
2008/09/30
[ "https://Stackoverflow.com/questions/151874", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
151,905
<p>What's the best way of inserting information in table A and using the index from table A to relate to table B. </p> <p>The "solution" I tried is inserting the info in table A (which has a automatically generated ID), then, select the last index and insert it in table B. This may not be very useful, as the last ind...
[ { "answer_id": 151912, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 2, "selected": false, "text": "postgres=# create table foo(id serial primary key, text varchar);\nNOTICE: CREATE TABLE will create implicit sequen...
2008/09/30
[ "https://Stackoverflow.com/questions/151905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23146/" ]
151,917
<p>What is the best way to free resources (in this case unlock the ReadWriteLock) when leaving the scope ? How to cover all possible ways (return, break, exceptions etc)?</p>
[ { "answer_id": 151932, "author": "Michael Barker", "author_id": 6365, "author_profile": "https://Stackoverflow.com/users/6365", "pm_score": 5, "selected": true, "text": "Lock l = new Lock();\nl.lock(); // Call the lock before calling try.\ntry {\n // Do some processing.\n // All c...
2008/09/30
[ "https://Stackoverflow.com/questions/151917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18174/" ]
151,919
<p>Visual Studio includes support for __forceinline. The Microsoft Visual Studio 2005 documentation states:</p> <blockquote> <p>The __forceinline keyword overrides the cost/benefit analysis and relies on the judgment of the programmer instead.</p> </blockquote> <p>This raises the question: When is the compil...
[ { "answer_id": 161473, "author": "Johann Gerell", "author_id": 6345, "author_profile": "https://Stackoverflow.com/users/6345", "pm_score": 3, "selected": false, "text": "__forceinline" }, { "answer_id": 46281942, "author": "Cookie", "author_id": 698504, "author_profil...
2008/09/30
[ "https://Stackoverflow.com/questions/151919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22244/" ]
151,929
<p>I'm using the <code>mechanize</code> module to execute some web queries from Python. I want my program to be error-resilient and handle all kinds of errors (wrong URLs, 403/404 responsese) gracefully. However, I can't find in mechanize's documentation the errors / exceptions it throws for various errors.</p> <p>I j...
[ { "answer_id": 155127, "author": "jfs", "author_id": 4279, "author_profile": "https://Stackoverflow.com/users/4279", "pm_score": 4, "selected": true, "text": "$ perl -0777 -ne'print qq($1) if /__all__ = \\[(.*?)\\]/s' __init__.py | grep Error \n\n'BrowserStateError',\n'ContentTooShortErr...
2008/09/30
[ "https://Stackoverflow.com/questions/151929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8206/" ]
151,936
<p>I have some code where I'm returning an array of objects.</p> <p>Here's a simplified example:</p> <pre><code>string[] GetTheStuff() { List&lt;string&gt; s = null; if( somePredicate() ) { s = new List&lt;string&gt;(); // imagine we load some data or something } return (s == null) ? ne...
[ { "answer_id": 151947, "author": "Dr8k", "author_id": 6014, "author_profile": "https://Stackoverflow.com/users/6014", "pm_score": 0, "selected": false, "text": "List<string> GetTheStuff()\n{\n List<string> s = new List<string();\n if (somePredicarte())\n {\n // more code\n }...
2008/09/30
[ "https://Stackoverflow.com/questions/151936", "https://Stackoverflow.com", "https://Stackoverflow.com/users/234/" ]
151,945
<p>Emacs puts backup files named <code>foo~</code> everywhere and I don't like having to remember to delete them. Also, if I edit a file that has a hard link somewhere else in the file system, the hard link points to the backup when I'm done editing, and that's confusing and awful. How can I either eliminate these ba...
[ { "answer_id": 151946, "author": "jfm3", "author_id": 11138, "author_profile": "https://Stackoverflow.com/users/11138", "pm_score": 10, "selected": true, "text": ".emacs (setq backup-directory-alist `((\".\" . \"~/.saves\")))\n (setq backup-by-copying t)\n backup-by-copying-when-linked C...
2008/09/30
[ "https://Stackoverflow.com/questions/151945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11138/" ]
151,952
<p>The Project's Web section (under project properties in VS2008) has a list of debuggers: ASP.NET, Native Code, SQL Server. What is Native Code?</p>
[ { "answer_id": 16656663, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": " [ CPU ] ==================================== [ RAM ]\n ^^^^^\n | |\n\n LOAD _memoryAddress12, D1 ; te...
2008/09/30
[ "https://Stackoverflow.com/questions/151952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1463/" ]
151,959
<p>I have 2 fields in the database month (numeric) and year (numeric) and I want to combine them in a report that combines those 2 fields and format them with MMM-YYYY. e.g 7-2008 becomes Jul-2008. How do I do that?</p>
[ { "answer_id": 152114, "author": "Brannon", "author_id": 5745, "author_profile": "https://Stackoverflow.com/users/5745", "pm_score": 2, "selected": true, "text": "DateSerial 1" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/151959", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20879/" ]
151,963
<p>Is it possible to get the route/virtual url associated with a controller action or on a view? I saw that Preview 4 added LinkBuilder.BuildUrlFromExpression helper, but it's not very useful if you want to use it on the master, since the controller type can be different. Any thoughts are appreciated.</p>
[ { "answer_id": 691985, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 4, "selected": false, "text": "<%= this.Url.RouteUrl(this.ViewContext.RouteData.Values) %> /Home/About" }, { "answer_id": 1268335, "author": "Jim...
2008/09/30
[ "https://Stackoverflow.com/questions/151963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3085/" ]
151,966
<p>I want to use remote debugging. The program that I want to debug runs on machine b. Visual Studio runs on machine a. </p> <p>On machine b I have a folder with the following files:</p> <ul> <li>msvcr72.dll</li> <li>msvsmon.exe</li> <li>NatDbgDE.dll</li> <li>NatDbgDEUI.dll</li> <li>NatDbgEE.dll</li> <li>NatDbgEEUI.d...
[ { "answer_id": 1144616, "author": "BrianR", "author_id": 140302, "author_profile": "https://Stackoverflow.com/users/140302", "pm_score": 4, "selected": false, "text": "_NT_SYMBOL_PATH" }, { "answer_id": 54309251, "author": "Joel", "author_id": 7392502, "author_profile...
2008/09/30
[ "https://Stackoverflow.com/questions/151966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23681/" ]
151,969
<p>In PHP 5, what is the difference between using <code>self</code> and <code>$this</code>?</p> <p>When is each appropriate?</p>
[ { "answer_id": 151975, "author": "cruizer", "author_id": 6441, "author_profile": "https://Stackoverflow.com/users/6441", "pm_score": 4, "selected": false, "text": "$self $this self" }, { "answer_id": 151976, "author": "John Millikin", "author_id": 3560, "author_profil...
2008/09/30
[ "https://Stackoverflow.com/questions/151969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4682/" ]
151,979
<p>Have a look at this very simple example WPF program:</p> <pre><code>&lt;Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"&gt; &lt;GroupBox&gt; ...
[ { "answer_id": 151999, "author": "rudigrobler", "author_id": 5147, "author_profile": "https://Stackoverflow.com/users/5147", "pm_score": 2, "selected": false, "text": "<GroupBox BorderBrush=\"{x:Null}\">\n" }, { "answer_id": 152562, "author": "Ian Oakes", "author_id": 216...
2008/09/30
[ "https://Stackoverflow.com/questions/151979", "https://Stackoverflow.com", "https://Stackoverflow.com/users/615/" ]
152,003
<p>I need to scan uploaded files for viruses on a Linux server, but I'm not sure how to go about it.</p> <p>What are my options, if any? I'm also interested in how the scanners perform when multiple users send multiple files at the same time.</p>
[ { "answer_id": 152014, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 5, "selected": true, "text": "clamscan" }, { "answer_id": 165899, "author": "kari.patila", "author_id": 21716, "author_profile": "ht...
2008/09/30
[ "https://Stackoverflow.com/questions/152003", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21716/" ]
152,005
<p>What is currying?</p> <p>How can currying be done in C++?</p> <p>Please Explain binders in STL container?</p>
[ { "answer_id": 152020, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 6, "selected": true, "text": "f(x, y) Y g(x) g(x) == f(x, Y)\n f Y #include <functional>\n#include <iostream>\n#include <vector>\n\nusing namespace std;...
2008/09/30
[ "https://Stackoverflow.com/questions/152005", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22076/" ]
152,006
<p>I've got a php script. Most of the time the script returns html, which is working fine, but on one occasion (parameter ?Format=XML) the script returns XML instead of HTML.</p> <p>Is there any way to change the returned mime type of the php output on the fly from text/html to text/xml or application/xml?</p>
[ { "answer_id": 152009, "author": "nickf", "author_id": 9021, "author_profile": "https://Stackoverflow.com/users/9021", "pm_score": 8, "selected": true, "text": "header('Content-type: application/xml');\n header()" }, { "answer_id": 152010, "author": "John Millikin", "auth...
2008/09/30
[ "https://Stackoverflow.com/questions/152006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7021/" ]
152,016
<p>What is the most reliable way to find out CPU architecture when compiling C or C++ code? As far as I can tell, different compilers have their own set of non-standard preprocessor definitions (<code>_M_X86</code> in MSVS, <code>__i386__</code>, <code>__arm__</code> in GCC, etc).</p> <p>Is there a <em>standard</em> w...
[ { "answer_id": 152034, "author": "John Millikin", "author_id": 3560, "author_profile": "https://Stackoverflow.com/users/3560", "pm_score": 4, "selected": false, "text": "#if MSVC\n#ifdef _M_X86\n#define ARCH_X86\n#endif\n#endif\n\n#if GCC\n#ifdef __i386__\n#define ARCH_X86\n#endif\n#endi...
2008/09/30
[ "https://Stackoverflow.com/questions/152016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23643/" ]
152,019
<p>.Net 3.5 doesn't support tuples. Too bad, But not sure whether the future version of .net will support tuples or not? </p>
[ { "answer_id": 152026, "author": "dimarzionist", "author_id": 10778, "author_profile": "https://Stackoverflow.com/users/10778", "pm_score": 6, "selected": false, "text": "#region tuples\n\n public class Tuple<T>\n {\n public Tuple(T first)\n {\n First = fir...
2008/09/30
[ "https://Stackoverflow.com/questions/152019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3834/" ]
152,024
<p>I have a submission table that is very simple: userId, submissionGuid</p> <p>I want to select the username (simple inner join to get it) of all the users who have more than 10 submissions in the table. </p> <p>I would do this with embedded queries and a group by to count submissions... but is there a better way of...
[ { "answer_id": 152030, "author": "cagcowboy", "author_id": 19629, "author_profile": "https://Stackoverflow.com/users/19629", "pm_score": 1, "selected": false, "text": "select userId, count(*)\nfrom submissions\nhaving count(*) > 10\ngroup by userId\n" }, { "answer_id": 152037, ...
2008/09/30
[ "https://Stackoverflow.com/questions/152024", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23695/" ]
152,028
<p>I want to be able to compare an image taken from a webcam to an image stored on my computer.</p> <p>The library doesn't need to be one hundred percent accurate as it won't be used in anything mission critical (e.g. police investigation), I just want something OK I can work with.</p> <p>I have tried a demonstration...
[ { "answer_id": 152059, "author": "mattlant", "author_id": 14642, "author_profile": "https://Stackoverflow.com/users/14642", "pm_score": 7, "selected": true, "text": "// The class also can be used to get similarity level between two image of the same size, which can be useful to get infor...
2008/09/30
[ "https://Stackoverflow.com/questions/152028", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20900/" ]
152,071
<p>I'm trying to display a boolean field in Report Designer in Visual Studio 2008. When I tried to run it, an error occurred:</p> <pre><code> "An error has occurred during report processing. String was not recognized as a valid Boolean." </code></pre> <p>I tried to convert it using CBool() but it didn't work. ...
[ { "answer_id": 169691, "author": "roman m", "author_id": 3661, "author_profile": "https://Stackoverflow.com/users/3661", "pm_score": 2, "selected": false, "text": "=iif(Fields!YourBool.Value, \"True\", \"False\") \n" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/152071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20877/" ]
152,077
<p>I agree, that programming against interfaces is a good practice. In most cases in Java "interface" in this sense means the language construct interface, so that you write an interface and an implementation class and that you use the interface instead of the implementation class most of the time.</p> <p>I wonder if ...
[ { "answer_id": 1056141, "author": "Rogério", "author_id": 2326914, "author_profile": "https://Stackoverflow.com/users/2326914", "pm_score": 2, "selected": false, "text": "ArrayList List" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/152077", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18722/" ]
152,084
<p>I'm interested in actual examples of using fixed point combinators (such as the <a href="https://stackoverflow.com/questions/93526/what-is-a-y-combinator">y-combinator</a> in C++. Have you ever used a fixed point combinator with <a href="http://p-stade.sourceforge.net/boost/libs/egg/doc/html/boost_egg/function_adapt...
[ { "answer_id": 154267, "author": "Ted", "author_id": 8965, "author_profile": "https://Stackoverflow.com/users/8965", "pm_score": 6, "selected": true, "text": "boost::bind #include <boost/function.hpp>\n#include <boost/bind.hpp>\n#include <iostream>\n\n// Y-combinator compatible factorial...
2008/09/30
[ "https://Stackoverflow.com/questions/152084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3146/" ]
152,099
<p>I have an ASP.NET page with a gridview control on it with a CommandButton column with delete and select commands active.</p> <p>Pressing the enter key causes the first command button in the gridview to fire, which deletes a row. I don't want this to happen. Can I change the gridview control in a way that it does no...
[ { "answer_id": 233011, "author": "Timothy Khouri", "author_id": 11917, "author_profile": "https://Stackoverflow.com/users/11917", "pm_score": 3, "selected": false, "text": "myGridView.Attributes.Add(\"onkeydown\", \"if(event.keyCode==13)return false;\");\n" }, { "answer_id": 2348...
2008/09/30
[ "https://Stackoverflow.com/questions/152099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23697/" ]
152,101
<p>I want to learn MVC "architecture pattern" but I don't want to jump into a framework like Rails or Django just yet. I want to understand the concept first and write some simple code in my currently familiar environment, which happens to be PHP/HTML/CSS/MySQL. I don't necessarily need a tutorial that is based on PH...
[ { "answer_id": 599262, "author": "dbr", "author_id": 745, "author_profile": "https://Stackoverflow.com/users/745", "pm_score": 4, "selected": false, "text": "class Model:\n def get_post(self, id):\n # Would query database, perhaps\n return {\"title\": \"A test\", \"body\...
2008/09/30
[ "https://Stackoverflow.com/questions/152101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23701/" ]
152,104
<p>I work on a Webproject using <a href="http://jquery.com/" rel="nofollow noreferrer">jQuery</a> and CakePHP. I use <a href="http://www.appelsiini.net/projects/jeditable" rel="nofollow noreferrer">jeditable</a> as an inplace edit plugin. For textareas I extend it using the <a href="http://www.appelsiini.net/2008/4/aut...
[ { "answer_id": 154377, "author": "Alexander Pendleton", "author_id": 21201, "author_profile": "https://Stackoverflow.com/users/21201", "pm_score": 3, "selected": true, "text": "<script type=\"text/javascript\">\n/* This is the growfield integration into jeditable\n You can use almost...
2008/09/30
[ "https://Stackoverflow.com/questions/152104", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17981/" ]
152,115
<p>How can I set points on a 24h period spreaded by the Gaussian distributions? For example to have the peak at 10 o'clock?</p>
[ { "answer_id": 153016, "author": "Chris Johnson", "author_id": 23732, "author_profile": "https://Stackoverflow.com/users/23732", "pm_score": 4, "selected": true, "text": "$peak=10; // Peak at 10-o-clock\n$stdev=2; // Standard deviation of two hours\n$hoursOnClock=24; // 24-hour clock\n\n...
2008/09/30
[ "https://Stackoverflow.com/questions/152115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22470/" ]
152,127
<p>I am trying to use Lucene Java 2.3.2 to implement search on a catalog of products. Apart from the regular fields for a product, there is field called 'Category'. A product can fall in multiple categories. Currently, I use FilteredQuery to search for the same search term with every Category to get the number of resul...
[ { "answer_id": 152764, "author": "Matt Quail", "author_id": 15790, "author_profile": "https://Stackoverflow.com/users/15790", "pm_score": 2, "selected": false, "text": "public static void countDocumentsInCategories(IndexReader reader) throws IOException {\n TermEnum terms = null;\n ...
2008/09/30
[ "https://Stackoverflow.com/questions/152127", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
152,137
<p>I don't need a Link but rather only the href= part of the ActionLink.</p> <p>But if I call Html.ActionLink(...) I get a back. Is there a way to just return the URL of the Action while not getting the ?</p>
[ { "answer_id": 152165, "author": "Casper", "author_id": 18729, "author_profile": "https://Stackoverflow.com/users/18729", "pm_score": 2, "selected": false, "text": "<% =Html.BuildUrlFromExpression<YourController>(c => c.YourAction(parameter)) %>\n" }, { "answer_id": 152898, "...
2008/09/30
[ "https://Stackoverflow.com/questions/152137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21699/" ]
152,138
<p>I have a class proposing translations utilities. The translations themselves should be reloaded every 30 minutes. I use Spring Timer support for that. Basically, my class looks like :</p> <pre><code>public interface Translator { public void loadTranslations(); public String getTranslation(String key); } </c...
[ { "answer_id": 152201, "author": "Ewan Makepeace", "author_id": 9731, "author_profile": "https://Stackoverflow.com/users/9731", "pm_score": 0, "selected": false, "text": "if (instance == null) {\n synchronized {\n if (instance == null) {\n instance = new SomeClass();\n }\n ...
2008/09/30
[ "https://Stackoverflow.com/questions/152138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23704/" ]
152,160
<p>Has anyone used the <a href="http://www.cs.tufts.edu/~nr/noweb/" rel="noreferrer">noweb</a> literate programming tool on a large Java project, where several source code files must be generated in different subdirectories? How did you manage this with noweb? Are there any resources and/or best practices out there?</p...
[ { "answer_id": 775062, "author": "Jason Catena", "author_id": 27685, "author_profile": "https://Stackoverflow.com/users/27685", "pm_score": 3, "selected": false, "text": "<</path/to/file.java>>=\n reallyImportantVariable += 1;\n@ %def reallyImportantVariable\n" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/152160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1428/" ]
152,187
<p>What type of authentication would you suggest for the service that is:</p> <ul> <li>implemented as WCF and exposed via varios enpoints (including XML-RPC)</li> <li>has to be consumed easily by various cross-platform clients</li> </ul> <p>Why?</p> <p>Options that I'm aware of are:</p> <ul> <li>Forms-based authent...
[ { "answer_id": 775062, "author": "Jason Catena", "author_id": 27685, "author_profile": "https://Stackoverflow.com/users/27685", "pm_score": 3, "selected": false, "text": "<</path/to/file.java>>=\n reallyImportantVariable += 1;\n@ %def reallyImportantVariable\n" } ]
2008/09/30
[ "https://Stackoverflow.com/questions/152187", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47366/" ]
152,188
<p>I have read in some of the ClickOnce posts that ClickOnce does not allow you to create a desktop icon for you application. Is there any way around this?</p>
[ { "answer_id": 152194, "author": "1800 INFORMATION", "author_id": 3146, "author_profile": "https://Stackoverflow.com/users/3146", "pm_score": 0, "selected": false, "text": ".application" }, { "answer_id": 152208, "author": "Timo", "author_id": 15415, "author_profile":...
2008/09/30
[ "https://Stackoverflow.com/questions/152188", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18826/" ]
152,190
<p>I'm using StringBuffer in Java to concat strings together, like so:</p> <pre><code>StringBuffer str = new StringBuffer(); str.append("string value"); </code></pre> <p>I would like to know if there's a method (although I didn't find anything from a quick glance at the documentation) or some other way to add "paddi...
[ { "answer_id": 152210, "author": "David Webb", "author_id": 3171, "author_profile": "https://Stackoverflow.com/users/3171", "pm_score": 2, "selected": false, "text": "StringBuffer appendWithTrailingSpace() CustomStringBuffer str = new CustomStringBuffer();\nstr.appendWithTrailingSpace(\"...
2008/09/30
[ "https://Stackoverflow.com/questions/152190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6618/" ]
152,205
<p>I'm working on a Java library and would like to remove some functions from it. My reasons for this is public API and design cleanup. Some objects have setters, but should be immutable, some functionality has been implemented better/cleaner in different methods, etc.</p> <p>I have marked these methods 'deprecated', ...
[ { "answer_id": 152235, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 4, "selected": true, "text": "/**\n * @deprecated\n * This method will be removed after Halloween!\n * @see #newLocationForFunctionality\n */\n" ...
2008/09/30
[ "https://Stackoverflow.com/questions/152205", "https://Stackoverflow.com", "https://Stackoverflow.com/users/706/" ]
152,216
<p>Boost range library (<a href="http://www.boost.org/doc/libs/1_35_0/libs/range/index.html" rel="noreferrer">http://www.boost.org/doc/libs/1_35_0/libs/range/index.html</a>) allows us to abstract a pair of iterators into a range. Now I want to combine two ranges into one, viz:</p> <p>given two ranges r1 and r2, define...
[ { "answer_id": 3308176, "author": "amit kumar", "author_id": 19501, "author_profile": "https://Stackoverflow.com/users/19501", "pm_score": 4, "selected": true, "text": "#include \"boost/range/join.hpp\"\n#include \"boost/foreach.hpp\"\n#include <iostream>\n\nint main() {\n int a[]...
2008/09/30
[ "https://Stackoverflow.com/questions/152216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19501/" ]
152,218
<p>Here's the problem:</p> <pre><code>split=re.compile('\\W*') </code></pre> <p>This regular expression works fine when dealing with regular words, but there are occasions where I need the expression to include words like <code>k&amp;amp;auml;ytt&amp;amp;auml;j&amp;aml;auml;</code>.</p> <p>What should I add to the r...
[ { "answer_id": 152225, "author": "PierreBdR", "author_id": 7136, "author_profile": "https://Stackoverflow.com/users/7136", "pm_score": 4, "selected": true, "text": "[^ \\t\\n]*\n [a-zA-Z0-9&;]*\n (\\w+|&\\w+;)*\n" }, { "answer_id": 152245, "author": "Steven Oxley", "autho...
2008/09/30
[ "https://Stackoverflow.com/questions/152218", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21716/" ]
152,243
<p>I have a database scenario (I'm using Oracle) in which several processes make inserts into a table and a single process selects from it. The table is basically used as intermediate storage, to which multiple processes (in the following called the Writers) write log events, and from which a single process (in the fo...
[ { "answer_id": 152375, "author": "AJ.", "author_id": 7211, "author_profile": "https://Stackoverflow.com/users/7211", "pm_score": 1, "selected": false, "text": "SELECT *\nFROM TRANSACTION_LOG\nWHERE id > (SELECT last_id\n FROM READER_STATUS)\nOR id IN ( SELECT id from...
2008/09/30
[ "https://Stackoverflow.com/questions/152243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7742/" ]
152,248
<p>We have a website running on Apache, access to which has a number of static pages protected via HTTP Basic authentication.</p> <p>I've written a new part of the site with Django using Django's built in support for user management.</p> <p>The problem I have is that users have to log in once via the HTTP Basic authe...
[ { "answer_id": 156593, "author": "akaihola", "author_id": 15770, "author_profile": "https://Stackoverflow.com/users/15770", "pm_score": 3, "selected": false, "text": "RemoteUserAuthMiddleware AuthenticationMiddleware AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.RemoteUserAuth...
2008/09/30
[ "https://Stackoverflow.com/questions/152248", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3171/" ]
152,250
<p>I have my winform application gathering data using databinding. Everything looks fine except that I have to link the <strong>property</strong> with the <strong>textedit</strong> using a string:</p> <blockquote> <p>Me.TextEdit4.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.MyClassBindingSource,...
[ { "answer_id": 152279, "author": "aku", "author_id": 1196, "author_profile": "https://Stackoverflow.com/users/1196", "pm_score": 4, "selected": true, "text": "[AttributeUsage(AttributeTargets.Property)]\nclass TextProperyAttribute: Attribute\n{}\n\nclass MyTextBox\n{\n [TextPropery]\n...
2008/09/30
[ "https://Stackoverflow.com/questions/152250", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
152,259
<p>Say if I had a table of books in a MySQL database and I wanted to search the 'title' field for keywords (input by the user in a search field); what's the best way of doing this in PHP? Is the MySQL <code>LIKE</code> command the most efficient way to search?</p>
[ { "answer_id": 152320, "author": "Paul Dixon", "author_id": 6521, "author_profile": "https://Stackoverflow.com/users/6521", "pm_score": 3, "selected": false, "text": "$terms=explode(',', $_GET['keywords']);\n$clauses=array();\nforeach($terms as $term)\n{\n //remove any chars you don't...
2008/09/30
[ "https://Stackoverflow.com/questions/152259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21709/" ]
152,262
<p>I am in charge of a website at work and recently I have added ajaxy requests to make it faster and more responsive. But it has raised an issue.</p> <p>On my pages, there is an index table on the left, like a menu. Once you have clicked on it, it makes a request that fills the rest of the page. At anytime you can cl...
[ { "answer_id": 152273, "author": "Guvante", "author_id": 16800, "author_profile": "https://Stackoverflow.com/users/16800", "pm_score": 1, "selected": false, "text": "<a href=\"/Whatever/Wherever.htm\" onclick=\"handler(); return false;\" />\n" }, { "answer_id": 152274, "autho...
2008/09/30
[ "https://Stackoverflow.com/questions/152262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16070/" ]
152,276
<p>I have report on my asp page and every time I change a filter and click view report, I get this error:</p> <p>Microsoft JScript runtime error: 'this._postBackSettings.async' is null or not an object</p> <p>I tried change the EnablePartialRendering="true" to EnablePartialRendering="false" but then people can't logi...
[ { "answer_id": 1289646, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "event.cancelBubble = true;\nif (event.stopPropagation)\n event.stopPropagation();\n" }, { "answer_id": 3342506, ...
2008/09/30
[ "https://Stackoverflow.com/questions/152276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12311/" ]
152,288
<p>I've been pulling my hear out over this problem for a few hours yesterday:</p> <p>I've a database on MySQL 4.1.22 server with encoding set to "UTF-8 Unicode (utf8)" (as reported by phpMyAdmin). Tables in this database have default charset set to <b>latin2</b>. But, the web application (CMS Made Simple written in PH...
[ { "answer_id": 152740, "author": "kolrie", "author_id": 14540, "author_profile": "https://Stackoverflow.com/users/14540", "pm_score": 5, "selected": false, "text": "mysql --default-character-set=utf8 -h ddd -u zzz -p dbname < dump.sql\n" }, { "answer_id": 21157493, "author": ...
2008/09/30
[ "https://Stackoverflow.com/questions/152288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23723/" ]
152,299
<p>I am about to set up a subversion server to be accessed via svn+ssh. I was wondering, where the <em>default</em> repository location is (on a unix box).</p> <p>Do you put it in</p> <pre><code>/opt/svn </code></pre> <p>or</p> <pre><code>/home/svn </code></pre> <p>or</p> <pre><code>/usr/subversion </code></pre> ...
[ { "answer_id": 152403, "author": "Mihai Limbășan", "author_id": 14444, "author_profile": "https://Stackoverflow.com/users/14444", "pm_score": 4, "selected": true, "text": "/var /var/lib/svn /var /usr /usr /var" }, { "answer_id": 152428, "author": "agnul", "author_id": 606...
2008/09/30
[ "https://Stackoverflow.com/questions/152299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1870/" ]
152,307
<p>I've got an ASP.NET 2.0 website with a custom 404 page. When content is not found the site serves the custom 404 page with a query string addition of aspxerrorpath=/mauro.aspx. The 404 page itself is served with an <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol" rel="nofollow noreferrer">HTTP</a> ...
[ { "answer_id": 152366, "author": "Mauro", "author_id": 2208, "author_profile": "https://Stackoverflow.com/users/2208", "pm_score": 2, "selected": true, "text": "protected void Application_BeginRequest(object sender, EventArgs e)\n{\n string url = Request.RawUrl;\n if ((url.Contains...
2008/09/30
[ "https://Stackoverflow.com/questions/152307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2208/" ]
152,313
<p>When should you use XML attributes and when should you use XML elements?</p> <p>e.g.</p> <pre><code>&lt;customData&gt; &lt;records&gt; &lt;record name="foo" description="bar" /&gt; &lt;/records&gt; &lt;/customData&gt; </code></pre> <p>or</p> <pre><code>&lt;customData&gt; &lt;records&gt; &lt;record&...
[ { "answer_id": 152346, "author": "Rory Becker", "author_id": 11356, "author_profile": "https://Stackoverflow.com/users/11356", "pm_score": 3, "selected": false, "text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<data>\n <people>\n <person name=\"Rory\" surname=\"Becker\" age...
2008/09/30
[ "https://Stackoverflow.com/questions/152313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23726/" ]
152,319
<p>I'm looking for a decent sort implementation for arrays in VBA. A Quicksort would be preferred. Or any other <a href="http://web.archive.org/web/20180224071555/http://www.cs.ubc.ca:80/~harrison/Java/sorting-demo.html" rel="noreferrer">sort algorithm</a> other than bubble or merge would suffice.</p> <p>Please note t...
[ { "answer_id": 152325, "author": "Jorge Ferreira", "author_id": 6508, "author_profile": "https://Stackoverflow.com/users/6508", "pm_score": 8, "selected": true, "text": "0 UBound(myArray) Call QuickSort(myArray, 0, UBound(myArray)) myArray Public Sub QuickSort(vArray As Variant, inLow As...
2008/09/30
[ "https://Stackoverflow.com/questions/152319", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4134/" ]