qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
329,556
<p>I have <code>DataTemplate</code> containing a <code>TextBox</code>. I'm setting this template to a listbox item on a selection.</p> <p>I'm unable to set focus to textbox in the template. I tried to call MyTemplate.FindName, but it ends up with an Invalid Operation Exception: This operation is valid only on elements...
[ { "answer_id": 329571, "author": "Matt Hamilton", "author_id": 615, "author_profile": "https://Stackoverflow.com/users/615", "pm_score": 4, "selected": true, "text": "TextBox" }, { "answer_id": 3121634, "author": "Jay", "author_id": 114994, "author_profile": "https://...
2008/11/30
[ "https://Stackoverflow.com/questions/329556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19146/" ]
329,570
<p>Is it possble to have something like this in ASP.NET MVC...</p> <pre><code>[Authorize] [AcceptVerbs(HttpVerbs.Get)] public string AddData(string Issues, string LabelGUID) { return "Authorized"; } [AcceptVerbs(HttpVerbs.Get)] public string AddData() { return "Not Authorized"; } </code></pre> <p>So if the u...
[ { "answer_id": 329594, "author": "Todd Smith", "author_id": 31624, "author_profile": "https://Stackoverflow.com/users/31624", "pm_score": 1, "selected": false, "text": "if (Request.IsAuthenticated)\n{ \n return \"Authorized\";\n}\nelse\n{ \n return \"Not Authorized\";\n}\n" }, ...
2008/11/30
[ "https://Stackoverflow.com/questions/329570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1231/" ]
329,607
<p>I am writing an xmpp library and I am trying to write a stream to support the zlib compressed data. I have two different versions one based on zlib.net and the other using SharpZipLib. The zlib.net version doesn't recognize the compression and the SharpZipLib version enters an infinite loop. You can find the appr...
[ { "answer_id": 330091, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 0, "selected": false, "text": "offset" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/329607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42015/" ]
329,613
<p>I write financial applications where I constantly battle the decision to use a double vs using a decimal.</p> <p>All of my math works on numbers with no more than 5 decimal places and are not larger than ~100,000. I have a feeling that all of these can be represented as doubles anyways without rounding error, but h...
[ { "answer_id": 329738, "author": "mezoid", "author_id": 39532, "author_profile": "https://Stackoverflow.com/users/39532", "pm_score": 3, "selected": false, "text": "double one = 3.05;\ndouble two = 0.05;\n\nSystem.Console.WriteLine((one + two) == 3.1);\n" }, { "answer_id": 329758...
2008/11/30
[ "https://Stackoverflow.com/questions/329613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10094/" ]
329,622
<p>Well basically I have this script that takes a long time to execute and occasionally times out and leaves semi-complete data floating around my database. (Yes I know in a perfect world I would fix THAT instead of implementing commits and rollbacks but I am forced to not do that)</p> <p>Here is my basic code (dumbed...
[ { "answer_id": 329629, "author": "Brian C. Lane", "author_id": 27461, "author_profile": "https://Stackoverflow.com/users/27461", "pm_score": 4, "selected": true, "text": "$dbh->beginTransaction();\n...\n$dbh->commit();\n" }, { "answer_id": 625437, "author": "Community", "...
2008/11/30
[ "https://Stackoverflow.com/questions/329622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/428190/" ]
329,652
<p>One thing I really like about AS3 over AS2 is how much more compile-time type-checking it adds. However, it seems to be somewhat lacking in that there is no type-checked enumeration structure available. What's a good (best / accepted) way to do custom enumerated types in AS3?</p>
[ { "answer_id": 14155541, "author": "Joachim Lous", "author_id": 628371, "author_profile": "https://Stackoverflow.com/users/628371", "pm_score": 1, "selected": false, "text": "public final class FruitEnum {\n private static const CREATE:Object = {};\n\n public static const APPLE:Fru...
2008/12/01
[ "https://Stackoverflow.com/questions/329652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26933/" ]
329,658
<p>How do I achieve authorization with MVC asp.net?</p>
[ { "answer_id": 717312, "author": "Dan", "author_id": 230, "author_profile": "https://Stackoverflow.com/users/230", "pm_score": 7, "selected": true, "text": "[Authorize]\npublic ActionResult MyAction()\n{\n //stuff\n}\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/329658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29445/" ]
329,676
<p>In a WPF UserControl, I have to make to call to a WebService. I am making this call on a separate thread but I want to inform the user that the call may take some time. </p> <p>The WebMethod returns me a collection of objects and I bind it to a ListBox in my UC. So far, so good... This part works really well. Howev...
[ { "answer_id": 329714, "author": "Rob", "author_id": 18505, "author_profile": "https://Stackoverflow.com/users/18505", "pm_score": 4, "selected": true, "text": " <Grid x:Name=\"layoutRoot\">\n <Grid x:Name=\"contentGrid\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Cente...
2008/12/01
[ "https://Stackoverflow.com/questions/329676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42024/" ]
329,682
<p>One of the nice feature of the Image control is that we can specified an Uri as the ImageSource and the image is automatically downloaded for us. This is great! <strong>However, the control doesn't seem to have a property indicating if the image loading is in progress or not.</strong></p> <p>Is there a property tel...
[ { "answer_id": 330323, "author": "Ramiro Berrelleza", "author_id": 548, "author_profile": "https://Stackoverflow.com/users/548", "pm_score": 3, "selected": true, "text": "<Grid>\n <Grid.RowDefinitions>\n <RowDefinition Height=\"50\" />\n <RowDefinition Height=\"50\" />\n...
2008/12/01
[ "https://Stackoverflow.com/questions/329682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42024/" ]
329,686
<p>I am attempting to create a UML diagram representative of some Java code.</p> <p>In a class I have a method that is overloaded.</p> <p>As far as I know, parameters for methods aren't shown in UML diagrams.</p> <p>How do I represent method overloading in UML?</p> <p>Thanks.</p>
[ { "answer_id": 329784, "author": "Vincent Ramdhanie", "author_id": 27439, "author_profile": "https://Stackoverflow.com/users/27439", "pm_score": 2, "selected": false, "text": "+doSomething(p:AThing):int{redefines}\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/329686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25985/" ]
329,724
<p>I have this marked as PHP but only because I'll be using PHP code to show my problem.</p> <p>So I have some code like this for the controller:</p> <pre><code>switch ($page) { case "home": require "views/home.php"; break; case "search": require "views/search.php"; break; } </...
[ { "answer_id": 329854, "author": "genehack", "author_id": 39933, "author_profile": "https://Stackoverflow.com/users/39933", "pm_score": 1, "selected": false, "text": " require \"templates/header.php\";\n require \"templates/navigation.php\";\n require \"views/$page.php\";\n r...
2008/12/01
[ "https://Stackoverflow.com/questions/329724", "https://Stackoverflow.com", "https://Stackoverflow.com/users/428190/" ]
329,775
<p>I'm having trouble with a web application that will deadlock occasionally</p> <p>There are 3 queries involved. 2 are trying to update a table</p> <pre><code>UPDATE AttendanceRoll SET ErrorFlag = 0 WHERE ContractID = @ContractID AND DATEPART(month,AttendanceDate) = DATEPART(month,@Month_Beginning) AND DATEPART(year...
[ { "answer_id": 2655303, "author": "erikkallen", "author_id": 47161, "author_profile": "https://Stackoverflow.com/users/47161", "pm_score": 0, "selected": false, "text": "for (;;) {\n try {\n using (var t = BeginTransaction()) {\n DoTheCall();\n t.Commit();...
2008/12/01
[ "https://Stackoverflow.com/questions/329775", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
329,805
<p>In jQuery, if I assign <code>class=auto_submit_form</code> to a form, it will be submitted whenever any element is changed, with the following code:</p> <pre><code>/* automatically submit if any element in the form changes */ $(function() { $(".auto_submit_form").change(function() { this.submit(); }); }); <...
[ { "answer_id": 329810, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 6, "selected": true, "text": " /* submit if elements of class=auto_submit_item in the form changes */\n$(function() {\n $(\".auto_submit_item\").cha...
2008/12/01
[ "https://Stackoverflow.com/questions/329805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41759/" ]
329,822
<p>I have three tables in the many-to-many format. I.e, table A, B, and AB set up as you'd expect. </p> <p>Given some set of A ids, I need to select only the rows in AB that match all of the ids. </p> <p>Something like the following won't work:</p> <p>"SELECT * FROM AB WHERE A_id = 1 AND A_id = 2 AND A_id = 3 AND .....
[ { "answer_id": 329841, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 1, "selected": false, "text": "AB" }, { "answer_id": 329862, "author": "Rick", "author_id": 14138, "author_profile": "https://Stack...
2008/12/01
[ "https://Stackoverflow.com/questions/329822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42033/" ]
329,837
<p>I need to create simple reusable javascript object publishing several methods and parameterized constructor. After reading through several "OOP in JavaScript" guides I'm sitting here with an empty head. How on the Earth can I do this?</p> <p>Here my last non-working code:</p> <pre><code>SomeClass = function(id) { ...
[ { "answer_id": 329846, "author": "JW.", "author_id": 4321, "author_profile": "https://Stackoverflow.com/users/4321", "pm_score": 3, "selected": false, "text": "MyClass = function(x, y, z) {\n // This is the constructor. When you use it with \"new MyClass(),\"\n // then \"this\" refer...
2008/12/01
[ "https://Stackoverflow.com/questions/329837", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2313/" ]
329,838
<p>I have, for my game, a Packet class, which represents network packet and consists basically of an array of data, and some pure virtual functions</p> <p>I would then like to have classes deriving from Packet, for example: StatePacket, PauseRequestPacket, etc. Each one of these sub-classes would implement the virtual...
[ { "answer_id": 329851, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 4, "selected": true, "text": "virtual Packet * clone() const = 0;\n" }, { "answer_id": 330797, "author": "coryan", "author...
2008/12/01
[ "https://Stackoverflow.com/questions/329838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42029/" ]
329,865
<p>I am trying to create a serial port in VB.net using code only. Because I am creating a class library I cannot use the built-in component. I have tried instantiating a new SeialPort() object, but that does not seem to be enough. I'm sure there is something simple I am missing and any help would be greatly appreciated...
[ { "answer_id": 329894, "author": "BCS", "author_id": 1343, "author_profile": "https://Stackoverflow.com/users/1343", "pm_score": 2, "selected": false, "text": "port = new System.IO.Ports.SerialPort(name, 4800, System.IO.Ports.Parity.None, 8, System.IO.Ports.StopBits.One);\nport.DataRecei...
2008/12/01
[ "https://Stackoverflow.com/questions/329865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21958/" ]
329,866
<p>I can successfully connect to MySQL from a DOS prompt, but when I try to connect from cygwin, it just hangs.</p> <pre><code>$/cygdrive/c/Program\ Files/MySQL/MySQL\ Server\ 5.1/bin/mysql -u root -p </code></pre> <p>What's wrong?</p>
[ { "answer_id": 329941, "author": "Ken Gentle", "author_id": 8709, "author_profile": "https://Stackoverflow.com/users/8709", "pm_score": 5, "selected": true, "text": "DOS" }, { "answer_id": 9996769, "author": "Svend Hansen", "author_id": 779130, "author_profile": "http...
2008/12/01
[ "https://Stackoverflow.com/questions/329866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1094969/" ]
329,876
<p>i have a few classes that i am trying to move to using generics</p> <p>Class1: Curve</p> <p>this class has the following code:</p> <pre><code>public class Curve : IEnumerable IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); // Calls non-interface method } public RTRatePointE...
[ { "answer_id": 329888, "author": "C. Broadbent", "author_id": 28859, "author_profile": "https://Stackoverflow.com/users/28859", "pm_score": 0, "selected": false, "text": "IEnumerable<T> and IEnumerator<T>" }, { "answer_id": 329915, "author": "JaredPar", "author_id": 23283...
2008/12/01
[ "https://Stackoverflow.com/questions/329876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
329,886
<p>Basically, I would like to build a list comprehension over the "cartesian product" of two iterators. Think about the following <a href="http://www.haskell.org/haskellwiki/List_comprehension" rel="noreferrer">Haskell code</a>:</p> <pre><code>[(i,j) | i &lt;- [1,2], j &lt;- [1..4]] </code></pre> <p>which yields</p> ...
[ { "answer_id": 329904, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 5, "selected": true, "text": "[ (i,j) for i in range(1,3) for j in range(1,5) ]\n" }, { "answer_id": 329978, "author": "A. Coady", "author...
2008/12/01
[ "https://Stackoverflow.com/questions/329886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18770/" ]
329,900
<p>My question revolves around CSS Fixed Layout vs a Float Layout that extends to fill the width of the browser.</p> <p>Right now the issue I'm running into is to have the masthead resize depending on the width of the page (something that I understand isn't possible given current browser implementation of <a href="htt...
[ { "answer_id": 333628, "author": "gregnostic", "author_id": 41891, "author_profile": "https://Stackoverflow.com/users/41891", "pm_score": 4, "selected": true, "text": "<div id=\"page\">\n <div id=\"masthead\">...</div>\n <div id=\"navigation\">...</div>\n ...\n</div>\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/329900", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16587/" ]
329,918
<h2>What I'm trying to accomplish</h2> <ul> <li>My app generates some tabular data</li> <li>I want the user to be able to launch Excel and click "paste" to place the data as cells in Excel</li> <li>Windows accepts a format called "CommaSeparatedValue" that is used with it's APIs so this seems possible</li> <li>Putting...
[ { "answer_id": 329967, "author": "BFree", "author_id": 15861, "author_profile": "https://Stackoverflow.com/users/15861", "pm_score": 3, "selected": false, "text": "Clipboard.SetText(\"1\\t2\\t3\\t4\\t3\\t2\\t3\\t4\", TextDataFormat.Text);\n" }, { "answer_id": 369219, "author"...
2008/12/01
[ "https://Stackoverflow.com/questions/329918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13477/" ]
329,925
<p>A program that I work on assumes that the UUID generated by the Windows RPC API call UuidCreateSequential() contains the MAC address of the primary ethernet adapter. Is this assumption correct or should I use a different method to get the MAC address?</p>
[ { "answer_id": 329979, "author": "Charlie", "author_id": 18529, "author_profile": "https://Stackoverflow.com/users/18529", "pm_score": 2, "selected": false, "text": "NetworkInterface" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/329925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19489/" ]
329,931
<p>I'm wondering if this is possible in SQL. Say you have two tables A and B, and you do a select on table A and join on table B:</p> <pre><code>SELECT a.*, b.* FROM TABLE_A a JOIN TABLE_B b USING (some_id); </code></pre> <p>If table A has columns 'a_id', 'name', and 'some_id', and table B has 'b_id', 'name', and 'some...
[ { "answer_id": 329976, "author": "Bill Karwin", "author_id": 20860, "author_profile": "https://Stackoverflow.com/users/20860", "pm_score": 4, "selected": false, "text": "PRAGMA full_column_names" }, { "answer_id": 330076, "author": "Cade Roux", "author_id": 18255, "au...
2008/12/01
[ "https://Stackoverflow.com/questions/329931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26353/" ]
329,950
<p>Is there a reason why zero is used as a "default" function return value? I noticed that several functions from the stdlib and almost everywhere else, when not returning a proper number (e.g pow(), strcpy()) or an error (negative numbers), simply return zero.</p> <p>I just became curious after seeing several tests p...
[ { "answer_id": 329966, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 4, "selected": false, "text": "// Perfectly good K&R C code.\nNoReturn()\n{\n // do stuff;\n return;\n}\n\nint unknownValue = NoReturn();\n" }...
2008/12/01
[ "https://Stackoverflow.com/questions/329950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42040/" ]
329,956
<p>First, context: I'm trying to create a command-line-based tool (Linux) that requires login. Accounts on this tool have nothing to do with system-level accounts -- none of this looks at /etc/passwd.</p> <p>I am planning to store user accounts in a text file using the same format (roughly) as /etc/passwd.</p> <p>Des...
[ { "answer_id": 330000, "author": "HUAGHAGUAH", "author_id": 27233, "author_profile": "https://Stackoverflow.com/users/27233", "pm_score": 3, "selected": true, "text": "string_to_hash = user.stored_salt + entered_password\nsuccessful_login = (sha1(string_to_hash) == user.stored_password_h...
2008/12/01
[ "https://Stackoverflow.com/questions/329956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19207/" ]
329,957
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/164926/c-sharp-how-do-i-round-a-decimal-value-to-2-decimal-places-for-output-on-a-pa">c# - How do I round a decimal value to 2 decimal places (for output on a page)</a> </p> </blockquote> <p>I want to truncate ...
[ { "answer_id": 329982, "author": "Christian C. Salvadó", "author_id": 5445, "author_profile": "https://Stackoverflow.com/users/5445", "pm_score": 6, "selected": false, "text": "decimal rounded = Math.Round(2.22939393, 3); //Returns 2.229\n" }, { "answer_id": 330005, "author":...
2008/12/01
[ "https://Stackoverflow.com/questions/329957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/709/" ]
329,962
<p>I wrote a program out, which was all in one file, and the methods were forward declared in a header. The program initially worked perfectly when it was in one file. But when I separated the program, I kept getting random occurrences for the destructor of one of the classes which was declared in the header file. <...
[ { "answer_id": 329997, "author": "coppro", "author_id": 16855, "author_profile": "https://Stackoverflow.com/users/16855", "pm_score": 1, "selected": false, "text": "int MyClass::static_var;\n" }, { "answer_id": 330048, "author": "Mark Ransom", "author_id": 5987, "auth...
2008/12/01
[ "https://Stackoverflow.com/questions/329962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33481/" ]
329,963
<p>I would like to know the best way to replace a standard textarea field with a rich text editor in Django Admin?</p>
[ { "answer_id": 337114, "author": "vvarp", "author_id": 42786, "author_profile": "https://Stackoverflow.com/users/42786", "pm_score": 4, "selected": false, "text": "$(document).ready(function() {\n $(\"textarea\").each(function(n, obj) {\n fck = new FCKeditor(obj.id) ;\n ...
2008/12/01
[ "https://Stackoverflow.com/questions/329963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41736/" ]
329,977
<p>When creating a string using the following notation:</p> <pre><code>NSString *foo = @"Bar"; </code></pre> <p>Does one need to release <code>foo</code>? Or is <code>foo</code> autoreleased in this case?</p>
[ { "answer_id": 4469722, "author": "Madhup Singh Yadav", "author_id": 165260, "author_profile": "https://Stackoverflow.com/users/165260", "pm_score": 3, "selected": false, "text": "alloc" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/329977", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40882/" ]
329,986
<p>I developed a greasemonkey script that refreshes a page and checks for certain updates. I would like to run this script in a tab and browse the internet in another tab, but then have the script automatically activate it's tab when an update is found.</p> <p>Im not sure how clear that was, maybe this is better:</p> ...
[ { "answer_id": 330227, "author": "Ovesh", "author_id": 3751, "author_profile": "https://Stackoverflow.com/users/3751", "pm_score": 3, "selected": true, "text": "alert()" }, { "answer_id": 5214463, "author": "erikvold", "author_id": 219166, "author_profile": "https://S...
2008/12/01
[ "https://Stackoverflow.com/questions/329986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29595/" ]
329,993
<p>As of right now I believe only Firefox support <code>-moz-border-radius</code> property. I am surprised that twitter uses it.</p> <p>Are any other browsers planning on supporting this or does CSS3 have something like this in the works?</p> <p><strong>Edit:</strong> I also found <a href="http://www.css3.info/previe...
[ { "answer_id": 330015, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 3, "selected": false, "text": "border-radius" }, { "answer_id": 330913, "author": "Paul D. Waite", "author_id": 20578, "author_profile": "...
2008/12/01
[ "https://Stackoverflow.com/questions/329993", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27570/" ]
330,004
<p>What causes the publish error: "fl.getDocumentDOM() has no properties" ?</p> <p>The error occurs only when using the "Test Project" button in the project pane. It doesn't cause the publish to fail, it's just annoying.</p>
[ { "answer_id": 330015, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 3, "selected": false, "text": "border-radius" }, { "answer_id": 330913, "author": "Paul D. Waite", "author_id": 20578, "author_profile": "...
2008/12/01
[ "https://Stackoverflow.com/questions/330004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26331/" ]
330,010
<p>I'm trying to display a caret (<code>^</code>) in math mode in LaTeX to represent the exclusive or operation implemented in the "C languages". By default, <code>^</code> is for creating a superscript in math mode. The closest I can seem to get is by using <code>\wedge</code>, which isn't the same.</p>
[ { "answer_id": 330019, "author": "genehack", "author_id": 39933, "author_profile": "https://Stackoverflow.com/users/39933", "pm_score": 3, "selected": false, "text": "\\^{}\n" }, { "answer_id": 330033, "author": "paxdiablo", "author_id": 14860, "author_profile": "http...
2008/12/01
[ "https://Stackoverflow.com/questions/330010", "https://Stackoverflow.com", "https://Stackoverflow.com/users/488/" ]
330,027
<p>I recently got a Dell XPS 64-bit Vista for myself. Eclipse doesn't have their 64-bit version, but I've read on forums that they download Eclipse and work with Java 1.5 on the Vista with only some problems. I have Java 1.6 and Netbeans was easily downloadable.</p> <p>What's the basic/big difference that I'll notice ...
[ { "answer_id": 334609, "author": "James Schek", "author_id": 17871, "author_profile": "https://Stackoverflow.com/users/17871", "pm_score": 5, "selected": false, "text": "<sarcasm>" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330027", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
330,030
<p>I have an object, and I want to list all the selectors to which it responds. It feels like this should be perfectly possible, but I'm having trouble finding the APIs.</p>
[ { "answer_id": 330084, "author": "Rob", "author_id": 386102, "author_profile": "https://Stackoverflow.com/users/386102", "pm_score": 0, "selected": false, "text": "-(BOOL) respondsToSelector:(SEL)aSelector {\n printf(\"Selector: %s\\n\", [NSStringFromSelector(aSelector) UTF8String]);\...
2008/12/01
[ "https://Stackoverflow.com/questions/330030", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18017/" ]
330,032
<p>I've seen some methods of <a href="http://www.anastasiosyal.com/archive/2007/04/17/3.aspx" rel="noreferrer">checking if a PEFile is a .NET assembly by examining the binary structure</a>.</p> <p>Is that the fastest method to test multiple files? I assume that trying to load each file (e.g. via <a href="http://msdn.m...
[ { "answer_id": 331677, "author": "Jeff Atwood", "author_id": 1, "author_profile": "https://Stackoverflow.com/users/1", "pm_score": 3, "selected": false, "text": "StreamReader" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5/" ]
330,034
<p>When I pass a list of objects out of my silverlight app using WCF everything works fine until the List grows too big. It seems that when I exceed 80 items I get the error: The remote server returned an unexpected response: (404) Not Found</p> <p>I'm presuming that it's because the List has grown too big as when the...
[ { "answer_id": 377300, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "basicHttpBinding" }, { "answer_id": 3213034, "author": "Jacob Adams", "author_id": 32518, "author_profile"...
2008/12/01
[ "https://Stackoverflow.com/questions/330034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
330,035
<p>I am trying to establish the best practice for handling the creation of child objects when the parent object is incomplete or doesn't yet exist in a web application. I want to handle this in a stateless way so in memory objects are out.</p> <p>For example, say we have a bug tracking application.</p> <p>A Bug has a...
[ { "answer_id": 330069, "author": "mshroyer", "author_id": 40511, "author_profile": "https://Stackoverflow.com/users/40511", "pm_score": 1, "selected": false, "text": "use CGI qw(:standard);\nmy $query = CGI->new;\nprint \"Bug title: \" . $query->param(\"title\") . \"\\n\";\nprint \"Descr...
2008/12/01
[ "https://Stackoverflow.com/questions/330035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11523/" ]
330,043
<p>I have a structure that represents a wire format packet. In this structure is an array of other structures. I have generic code that handles this very nicely for most cases but this array of structures case is throwing the marshaller for a loop.</p> <p>Unsafe code is a no go since I can't get a pointer to a struc...
[ { "answer_id": 330090, "author": "grieve", "author_id": 34329, "author_profile": "https://Stackoverflow.com/users/34329", "pm_score": 2, "selected": false, "text": "public ref class Writer abstract sealed\n {\n public:\n generic <typename T> where T : value class\n st...
2008/12/01
[ "https://Stackoverflow.com/questions/330043", "https://Stackoverflow.com", "https://Stackoverflow.com/users/109736/" ]
330,053
<p>I have a simple row that I edit using LINQ. It has about 30 columns, including a primary key numeric sequence.</p> <p>When an UPDATE is performed through LINQ, the UPDATE statement includes all the columns of the table (for concurrency checking). </p> <p>I'm wondering how inefficient this is - if not negligibiel. ...
[ { "answer_id": 330073, "author": "Jeff Atwood", "author_id": 1, "author_profile": "https://Stackoverflow.com/users/1", "pm_score": 5, "selected": false, "text": "UpdateCheck=\"never\"" }, { "answer_id": 330103, "author": "Marc Gravell", "author_id": 23354, "author_pro...
2008/12/01
[ "https://Stackoverflow.com/questions/330053", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16940/" ]
330,056
<p>I'm trying to see if anyone knows how to cluster some Lat/Long results, using a database, to reduce the number of results sent over the wire to the application.</p> <p>There are a number of resources about how to cluster, either on the client side OR in the server (application) side .. but not in the database side ...
[ { "answer_id": 330068, "author": "Dustin", "author_id": 39975, "author_profile": "https://Stackoverflow.com/users/39975", "pm_score": 3, "selected": false, "text": "def compute_chunk(latitude, longitude)\n (floor_lon(longitude) * 0x1000) | floor_lat(latitude)\nend\n\ndef floor_lon(longi...
2008/12/01
[ "https://Stackoverflow.com/questions/330056", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30674/" ]
330,060
<p>I create an <code>NSURLRequest</code> to post my data in the iPhone application to a server to proceed the PHP script. My PHP script is look like this.</p> <pre><code>&lt;?php $name = $_POST['name']; $email = $_POST['email']; $link = mysql_connect("localhost", "fffasfdas","Nfdsafafs") or die ("Unable t...
[ { "answer_id": 330064, "author": "superfell", "author_id": 41455, "author_profile": "https://Stackoverflow.com/users/41455", "pm_score": 6, "selected": false, "text": "&" }, { "answer_id": 7205645, "author": "Spire", "author_id": 450606, "author_profile": "https://Sta...
2008/12/01
[ "https://Stackoverflow.com/questions/330060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
330,074
<p>I've one plist file and I want to parse it and copy it's content into NSArray,and code that I am using for that is. </p> <pre><code>NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsPath = [paths objectAtIndex:0]; NSString *fooPath = [documentsP...
[ { "answer_id": 332583, "author": "Amit Vaghela", "author_id": 451867, "author_profile": "https://Stackoverflow.com/users/451867", "pm_score": 0, "selected": false, "text": "self.myArray = [[NSArray arrayWithContentsOfURL:URlPath] retain];\n" }, { "answer_id": 2143869, "author...
2008/12/01
[ "https://Stackoverflow.com/questions/330074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/451867/" ]
330,085
<p>My aim is to convert a stream of byte code sent from an Alesis synthesizer to a human readable format. I need to be able to take a "Program Dump" and read the 10 character string that makes up the patch name.</p> <p>In order to receive the "Program Dump" from the synth, I sent the synth the following command via M...
[ { "answer_id": 331329, "author": "PhiLho", "author_id": 15459, "author_profile": "https://Stackoverflow.com/users/15459", "pm_score": 2, "selected": false, "text": "0 - b07 b06 b05 b04 b03 b02 b01 b00\n1 - b17 b16 b15 b14 b13 b12 b11 b10\n2 - b27 b26 b25 b24 b23 b22 b21 b20\n3 - b37 b36 ...
2008/12/01
[ "https://Stackoverflow.com/questions/330085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42054/" ]
330,092
<p>I'm not familiar with shell scripting, so I'm not sure how to do it or if it is possible. If you can give me links or advice, that would be great.</p> <p>What I want to do is:</p> <ul> <li><p>Create a file, simple text file EX:</p> <p>param1 (RANDOMVALUE)</p> <p>Where randomvalue is a random number generated.</p> ...
[ { "answer_id": 330105, "author": "Federico A. Ramponi", "author_id": 18770, "author_profile": "https://Stackoverflow.com/users/18770", "pm_score": 2, "selected": false, "text": "#!/bin/sh\nperl -e 'print \"TheWord (\", int(rand(1000)), \")\\n\"' > tempfile\n./program tempfile > A\n./Anot...
2008/12/01
[ "https://Stackoverflow.com/questions/330092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
330,115
<p>In C#, it is possible to retrieve assembly related information like product name, version etc using reflection:</p> <pre><code>string productName = Assembly.GetCallingAssembly().GetName().Name; string versionString = Assembly.GetCallingAssembly().GetName().Version.ToString(); </code></pre> <p>How do I do the equiv...
[ { "answer_id": 330314, "author": "Dirk Vollmar", "author_id": 40347, "author_profile": "https://Stackoverflow.com/users/40347", "pm_score": 0, "selected": false, "text": "Sub Main()\n Dim arrHeaders(41)\n\n Dim shell As New Shell32.Shell\n Dim objFolder As Shell32.Folder\n\n ...
2008/12/01
[ "https://Stackoverflow.com/questions/330115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4368/" ]
330,125
<p>Can anyone please help me to get the keycodes for the arrow keys in c# .net keypress events? Can you help me to get out of this check point?</p> <p>best regards, Arun.</p>
[ { "answer_id": 26214404, "author": "Ashu", "author_id": 3378851, "author_profile": "https://Stackoverflow.com/users/3378851", "pm_score": 0, "selected": false, "text": "e.KeyValue==39 \n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/201406/" ]
330,138
<p>I have got these two classes interacting and I am trying to call four different classes from class one for use in class two.</p> <p>The methods are public and they do return values but for some reason there is not a connection being made. The error I get when I try is: <code>"An object reference is required for the...
[ { "answer_id": 330140, "author": "Jeffrey L Whitledge", "author_id": 10174, "author_profile": "https://Stackoverflow.com/users/10174", "pm_score": 2, "selected": false, "text": "GradeBook myGradeBook = new GradeBook();\n" }, { "answer_id": 330141, "author": "JaredPar", "a...
2008/12/01
[ "https://Stackoverflow.com/questions/330138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29756/" ]
330,149
<p>I'm looking to spend a bit of my lunch break each day teaching myself some C#. I have access to some books on the subject via my employer-paid Books24x7 subscription, but I have no way of running code while I'm at work.</p> <p>My work PC is rather locked down (no admin privileges, read-only "Program Files" - though...
[ { "answer_id": 330156, "author": "Jeffrey L Whitledge", "author_id": 10174, "author_profile": "https://Stackoverflow.com/users/10174", "pm_score": 2, "selected": false, "text": "C:\\Windows\\Microsoft.NET\\Framework\\[VERSION]\\" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330149", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1588/" ]
330,151
<p>I'm not sure if this has been asked or not yet, but how much logic should you put in your UI classes?</p> <p>When I started programming I used to put all my code behind events on the form which as everyone would know makes it an absolute pain in the butt to test and maintain. Overtime I have come to release how ba...
[ { "answer_id": 330284, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 4, "selected": true, "text": "if (totalAmount < 0)\n color = \"RED\";\nelse\n color = \"BLACK\";\n" }, { "answer_id": 330414, "a...
2008/12/01
[ "https://Stackoverflow.com/questions/330151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6335/" ]
330,155
<p>Can someone tell me how to change directories using FtpWebRequest? This seems like it should be an easy thing to do, but I'm not seeing it.</p> <p><strong>EDIT</strong></p> <p>I just want to add...I don't have my heart set on FtpWebRequest. If there's a better (easier) way to do FTP in .NET please let me know.</...
[ { "answer_id": 330177, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 5, "selected": true, "text": "String uri = \"ftp://myFtpUserName:myFtpUserPassword@myFtpUrl\";\nFtpWebRequest Request = (FtpWebRequest)WebRequest.Creat...
2008/12/01
[ "https://Stackoverflow.com/questions/330155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4050/" ]
330,169
<p>It's been quite a while since I last used <a href="http://digitalmars.com/d" rel="nofollow noreferrer">D Programming Language</a>, and now I'm using it for some project that involves scientific calculations.</p> <p>I have a bunch of floating point data, but when I print them using <code>writefln</code>, I get resul...
[ { "answer_id": 330192, "author": "Federico A. Ramponi", "author_id": 18770, "author_profile": "https://Stackoverflow.com/users/18770", "pm_score": 2, "selected": false, "text": "writefln(\"%.3f\", a);\n" }, { "answer_id": 330338, "author": "Sascha", "author_id": 36372, ...
2008/12/01
[ "https://Stackoverflow.com/questions/330169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35364/" ]
330,178
<p>Checkstyle reports this code as "The double-checked locking idiom is broken", but I don't think that my code actually is affected by the problems with double-checked locking.</p> <p>The code is supposed to create a row in a database if a row with that id doesn't exist. It runs in a multi-threaded environment and I ...
[ { "answer_id": 330184, "author": "Dustin", "author_id": 39975, "author_profile": "https://Stackoverflow.com/users/39975", "pm_score": 3, "selected": true, "text": "row = dao().create(id);\n" }, { "answer_id": 330189, "author": "Greg Hewgill", "author_id": 893, "author...
2008/12/01
[ "https://Stackoverflow.com/questions/330178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40136/" ]
330,186
<p>I'm currently working on a DNA database class and I currently associate each row in the database with both a match score (based on edit distance) and the actual DNA sequence itself, is it safe to modify first this way within an iteration loop?</p> <pre><code>typedef std::pair&lt;int, DnaDatabaseRow&gt; DnaPairT; ty...
[ { "answer_id": 330196, "author": "e.James", "author_id": 33686, "author_profile": "https://Stackoverflow.com/users/33686", "pm_score": 4, "selected": true, "text": "first" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330186", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2594/" ]
330,206
<p>In PHP, depending on your error reporting level, if you don't define a constant and then call it like so:</p> <pre><code>&lt;?= MESSAGE ?&gt; </code></pre> <p>It may print the name of the constant instead of the value!</p> <p>So, I wrote the following function to get around this problem, but I wanted to know if y...
[ { "answer_id": 330271, "author": "enobrev", "author_id": 14651, "author_profile": "https://Stackoverflow.com/users/14651", "pm_score": 3, "selected": false, "text": "function C($constant) {\n return defined($constant) ? constant($constant) : 'Undefined';\n}\n\necho C('MESSAGE') . '<br...
2008/12/01
[ "https://Stackoverflow.com/questions/330206", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
330,207
<p>One concept I've always wondered about is the use of cryptographic hash functions and values. I understand that these functions can generate a hash value that is unique and virtually impossible to reverse, but here's what I've always wondered:</p> <p>If on my server, in PHP I produce:</p> <pre><code>md5("stackover...
[ { "answer_id": 330232, "author": "Trevel", "author_id": 25110, "author_profile": "https://Stackoverflow.com/users/25110", "pm_score": 4, "selected": false, "text": "\"hello\" -> \"1ab53\"\n\"Hello\" -> \"993LB\"\n\"ZR#!RELSIEKF\" -> \"1ab53\"\n" }, { "answer_id": 929885, "aut...
2008/12/01
[ "https://Stackoverflow.com/questions/330207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1390354/" ]
330,215
<p>Is there a Php function to determine if a string consist of only ASCII alphanumerical characters?</p> <p>Note: I'm sorry if the question sounds dumb to some, but I couldn't easily find such a function in the Php manual.</p>
[ { "answer_id": 330225, "author": "eyelidlessness", "author_id": 17964, "author_profile": "https://Stackoverflow.com/users/17964", "pm_score": 1, "selected": false, "text": "preg_match('/^[a-z0-9]+$/i', $str);\n" }, { "answer_id": 24667031, "author": "Fabrizio", "author_id...
2008/12/01
[ "https://Stackoverflow.com/questions/330215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15124/" ]
330,229
<p>When presenting preformatted text on the web (e.g. code samples), line wrapping can be a problem. You want to wrap for readability without scrolling, but also need it to be unambiguous to the user that it is all one line with no line break.</p> <p>For example, you may have a really long command line to display, lik...
[ { "answer_id": 330352, "author": "Jack Ryan", "author_id": 28882, "author_profile": "https://Stackoverflow.com/users/28882", "pm_score": 3, "selected": true, "text": "p.codeLine\n{\n font-size: 12px;\n line-height: 12px;\n font-family: Monospace;\n background: transparent url...
2008/12/01
[ "https://Stackoverflow.com/questions/330229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6329/" ]
330,241
<p>From my code (Java) I want to ensure that a row exists in the database (DB2) after my code is executed.</p> <p>My code now does a <code>select</code> and if no result is returned it does an <code>insert</code>. I really don't like this code since it exposes me to concurrency issues when running in a multi-threaded...
[ { "answer_id": 330364, "author": "Winston Smith", "author_id": 35086, "author_profile": "https://Stackoverflow.com/users/35086", "pm_score": 5, "selected": false, "text": "MERGE INTO target_table USING source_table ON match-condition\n{WHEN [NOT] MATCHED \n THEN [UPDATE SET ...|...
2008/12/01
[ "https://Stackoverflow.com/questions/330241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40136/" ]
330,268
<p>I have an array full of random content item ids. I need to run a mysql query (id in the array goes in the WHERE clause), using each ID that's in the array, in the order that they appear in the said array. How would I do this? </p> <p>This will be an UPDATE query, for each individual ID in the array.</p>
[ { "answer_id": 330274, "author": "Dean Rather", "author_id": 14966, "author_profile": "https://Stackoverflow.com/users/14966", "pm_score": 2, "selected": false, "text": "$ids = array(2,4,6,8);\n$ids = implode($ids);\n$sql=\"SELECT * FROM my_table WHERE id IN($ids);\";\nmysql_query($sql);...
2008/12/01
[ "https://Stackoverflow.com/questions/330268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
330,303
<p>Is it possible to create a stored procedure as</p> <pre><code>CREATE PROCEDURE Dummy @ID INT NOT NULL AS BEGIN END </code></pre> <p>Why is it not possible to do something like this?</p>
[ { "answer_id": 330324, "author": "dkretz", "author_id": 31641, "author_profile": "https://Stackoverflow.com/users/31641", "pm_score": 1, "selected": true, "text": "IF ISNULL(@param) THEN\n raise error ....\nEND IF\n" }, { "answer_id": 330333, "author": "Unsliced", "aut...
2008/12/01
[ "https://Stackoverflow.com/questions/330303", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21586/" ]
330,320
<p>In an aspx page I get the Windows username with the function <code>Request.LogonUserIdentity.Name</code>. This function returns a string in the format "domain\user".</p> <p>Is there some function to only get the username, without resorting to the <code>IndexOf</code> and <code>Substring</code>, like this?</p> <pre...
[ { "answer_id": 330408, "author": "Russ Cam", "author_id": 1831, "author_profile": "https://Stackoverflow.com/users/1831", "pm_score": 7, "selected": true, "text": "var user = System.Web.HttpContext.Current.User; \nvar name = user.Identity.Name;\n\nvar slashIndex = name.IndexOf(\"\\\\\"...
2008/12/01
[ "https://Stackoverflow.com/questions/330320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/56/" ]
330,331
<p>I just recently installed <a href="http://www.oddsock.org/tools/gen_songrequester/" rel="nofollow noreferrer">Winamp Song Requester</a> wich is a Winamp web song requester plugin with a built in minimal HTTP CGI Server.</p> <p>What the plugin does is that it runs a web server, serves a html page with some special v...
[ { "answer_id": 330398, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 6, "selected": true, "text": "$.ajaxSetup({\n 'beforeSend' : function(xhr) {\n xhr.overrideMimeType('text/html; charset=UTF-8');\n },\n});\n$('#s...
2008/12/01
[ "https://Stackoverflow.com/questions/330331", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32728/" ]
330,334
<p>What would be the best way to do this.</p> <p>The input string is </p> <pre><code>&lt;133_3&gt;&lt;135_3&gt;&lt;116_2&gt;The other system worked for about 1 month&lt;/116_2&gt; got some good images &lt;137_3&gt;on it then it started doing the same thing as the first one&lt;/137_3&gt; so then I quit using either ca...
[ { "answer_id": 330463, "author": "Daniel Naab", "author_id": 32638, "author_profile": "https://Stackoverflow.com/users/32638", "pm_score": 3, "selected": true, "text": "from xml.parsers.expat import ParserCreate\n\nopen_elements = {}\nresult_dict = {}\n\ndef start_element(name, attrs):\n...
2008/12/01
[ "https://Stackoverflow.com/questions/330334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33612/" ]
330,337
<p>I have a greasemonkey user script with this single line of code...</p> <pre><code>window.close(); </code></pre> <p>but firefox does not allow a user script to close a window (as reported by an error message in the error console)</p> <p>Is there a work around to this problem?</p>
[ { "answer_id": 330372, "author": "M.N", "author_id": 18615, "author_profile": "https://Stackoverflow.com/users/18615", "pm_score": 6, "selected": true, "text": "function closeTab(){\n window.open('', '_self', '');\n window.close();\n} \n" }, { "answer_id": 54340012, "au...
2008/12/01
[ "https://Stackoverflow.com/questions/330337", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39648/" ]
330,339
<p>Is there any way to re-generate views from newly updated model?</p>
[ { "answer_id": 331746, "author": "Benny Wong", "author_id": 2999, "author_profile": "https://Stackoverflow.com/users/2999", "pm_score": 5, "selected": true, "text": "./script/generate -f scaffold Model\n" }, { "answer_id": 34286633, "author": "jbheren", "author_id": 50258...
2008/12/01
[ "https://Stackoverflow.com/questions/330339", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27257/" ]
330,367
<p>I'm writing a reasonably complex web application. The Python backend runs an algorithm whose state depends on data stored in several interrelated database tables which does not change often, plus user specific data which does change often. The algorithm's per-user state undergoes many small changes as a user works w...
[ { "answer_id": 330580, "author": "Rafał Dowgird", "author_id": 12166, "author_profile": "https://Stackoverflow.com/users/12166", "pm_score": 3, "selected": true, "text": "multiprocessing" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330367", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40076/" ]
330,371
<p>I've been a web developer for some time now, and have recently started learning some functional programming. Like others, I've had some significant trouble apply many of these concepts to my professional work. For me, the primary reason for this is I see a conflict between between FP's goal of remaining stateless ...
[ { "answer_id": 10498495, "author": "animal", "author_id": 96640, "author_profile": "https://Stackoverflow.com/users/96640", "pm_score": 4, "selected": false, "text": "# Start: Time T\nlikes(db, \"Bob\")\n=> \"Suzie\"\n# Change who bob likes\n...\nlikes(db \"Bob\")\n=> \"Alice\"\n# Recove...
2008/12/01
[ "https://Stackoverflow.com/questions/330371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30529/" ]
330,374
<p>As per c99 standard, size of <code>long long</code> should be minimum 64 bits. How is this implemented in a 32 bit machine (eg. addition or multiplication of 2 <code>long long</code>s). Also, What is the equivalent of <code>long long</code> in C++.</p>
[ { "answer_id": 330377, "author": "csl", "author_id": 21028, "author_profile": "https://Stackoverflow.com/users/21028", "pm_score": 2, "selected": false, "text": "#include <stdint.h>\n\nint32_t n;\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330374", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39615/" ]
330,383
<p>Given a string as below, I need to convert:</p> <p>1 Dec 2008 06:43:00 +0100</p> <p>to</p> <p>MM/DD/YYYY HH:MM:SSAM</p> <p>using jython what is the best way to do this?</p>
[ { "answer_id": 330466, "author": "Dustin", "author_id": 39975, "author_profile": "https://Stackoverflow.com/users/39975", "pm_score": 3, "selected": true, "text": "import java\nsdf = java.text.SimpleDateFormat\n\nfmt_in = sdf('d MMM yyyy HH:mm:ss Z')\nfmt_out = sdf('MM/dd/yyyy HH:mm:ssaa...
2008/12/01
[ "https://Stackoverflow.com/questions/330383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21537/" ]
330,387
<p>While checking out the generic collection in .net i found about KeyedByTypeCollection. Although I worked with it and got to know how to use it, I did not get in which scenario it will be useful.</p> <p>I read through <a href="https://stackoverflow.com/questions/178255/serviceprovider-cache-etc-done-with-generics-wi...
[ { "answer_id": 349304, "author": "Prensen", "author_id": 43633, "author_profile": "https://Stackoverflow.com/users/43633", "pm_score": 5, "selected": true, "text": "KeyedCollection<KEY,VALUE>" }, { "answer_id": 13703707, "author": "Hugh", "author_id": 925090, "author_...
2008/12/01
[ "https://Stackoverflow.com/questions/330387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41968/" ]
330,390
<p>I'm writing a web application that will have "plugins". The plugins will be .DLL files which will export their functionality through predefined interfaces 'n stuff. All the .DLL files are in a folder called "Plugins", and the ASP.NET application loads them all upon startup (by using Assembly.LoadFrom).</p> <p>The p...
[ { "answer_id": 330440, "author": "annakata", "author_id": 13018, "author_profile": "https://Stackoverflow.com/users/13018", "pm_score": 2, "selected": false, "text": "HttpRuntime.UnloadAppDomain();" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41360/" ]
330,391
<p>Because this is not the kind of company where wiki's are accepted, we tend to do a lot of communication through outlook. Sending code snippets through it is painfull. Is there some way to get the markdown thing we have here, but in outlook?</p>
[ { "answer_id": 330711, "author": "Dirk Vollmar", "author_id": 40347, "author_profile": "https://Stackoverflow.com/users/40347", "pm_score": 3, "selected": false, "text": "__text__" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330391", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11333/" ]
330,395
<p>I am setting up a development server in my flat. I have set up an Ubuntu DNS server on it and have added the zone weddinglist (just weddinglist - no <a href="http://en.wikipedia.org/wiki/Top-level_domain" rel="noreferrer">TLD</a>. It's just an internal domain.)</p> <p>This works fine on my Ubuntu laptop.</p> <p>On...
[ { "answer_id": 330409, "author": "Alnitak", "author_id": 6782, "author_profile": "https://Stackoverflow.com/users/6782", "pm_score": 6, "selected": false, "text": "nslookup" }, { "answer_id": 330411, "author": "Stephen Darlington", "author_id": 2998, "author_profile":...
2008/12/01
[ "https://Stackoverflow.com/questions/330395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42088/" ]
330,405
<p>If I have a table where <strong>the cells in a column should not have the same values</strong>, how do I check this and update? (I know I can set constraints in the settings, but I don't want to do that.)</p> <p>Say the column name is called <em>unique hash name</em> and contains </p> <pre> Peter Peter Peter Dave ...
[ { "answer_id": 330695, "author": "Timothy Khouri", "author_id": 11917, "author_profile": "https://Stackoverflow.com/users/11917", "pm_score": 4, "selected": true, "text": "UPDATE Persons SET UniqueName = temp.DeDupded FROM\n (SELECT ID,\n CASE WHEN ROW_NUMBER() OVER\n ...
2008/12/01
[ "https://Stackoverflow.com/questions/330405", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2429/" ]
330,427
<p>I want to develop JavaScript on my Windows machine. Do you know a browser where I can turn off <em>Same Origin Policy</em> so I can develop locally? Firefox would be optimal.</p> <p>Or if you know a proxy I could use for a SOAP/WSDL site it would be great too.</p> <p>I am trying to work with the <a href="http://ww...
[ { "answer_id": 2771363, "author": "miek", "author_id": 102170, "author_profile": "https://Stackoverflow.com/users/102170", "pm_score": 4, "selected": false, "text": "if (navigator.userAgent.indexOf(\"Firefox\") != -1) {\n try {\n netscape.security.PrivilegeManager.enablePrivile...
2008/12/01
[ "https://Stackoverflow.com/questions/330427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19929/" ]
330,444
<p>I've got a MenuItem whos ItemsSource is databound to a simple list of strings, its showing correctly, but I'm struggling to see how I can handle click events for them!</p> <p>Here's a simple app that demonstrates it:</p> <pre><code>&lt;Window x:Class="WPFDataBoundMenu.Window1" xmlns="http://schemas.microsoft.com/w...
[ { "answer_id": 330566, "author": "Kent Boogaart", "author_id": 5380, "author_profile": "https://Stackoverflow.com/users/5380", "pm_score": 3, "selected": false, "text": "<MenuItem Header=\"My Items\" ItemsSource=\"{Binding Path=MyMenuItems}\">\n <MenuItem.ItemContainerStyle>\n ...
2008/12/01
[ "https://Stackoverflow.com/questions/330444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26759/" ]
330,447
<p>How can I compile a .cs file into a DLL?</p> <p>My project name is WA. In my <code>bin</code> folder after the compilation, I found:</p> <ul> <li><code>WA.exe</code></li> <li><code>WA.vshost.exe</code></li> <li><code>WA.pdb</code></li> </ul>
[ { "answer_id": 330450, "author": "leppie", "author_id": 15541, "author_profile": "https://Stackoverflow.com/users/15541", "pm_score": 4, "selected": false, "text": "csc /t:library source.cs -> source.dll\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330447", "https://Stackoverflow.com", "https://Stackoverflow.com/users/201406/" ]
330,458
<p>Is there a clean and OS independent way to determine the local machine's IP addresses from Perl?</p> <p>So far I have found the following solutions:</p> <ul> <li><p>parse the output of ifconfig and ipconfig (hard, different windows versions have different ipconfig outputs)</p></li> <li><p>establish a network conne...
[ { "answer_id": 330564, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 4, "selected": false, "text": "Sys::Hostname" }, { "answer_id": 330641, "author": "Leon Timmermans", "author_id": 4727, "author_profile": ...
2008/12/01
[ "https://Stackoverflow.com/questions/330458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/686/" ]
330,461
<p>How do I get the battery status on an iPhone?</p>
[ { "answer_id": 2605569, "author": "Paresh Thakor", "author_id": 1149180, "author_profile": "https://Stackoverflow.com/users/1149180", "pm_score": 6, "selected": true, "text": "UIDevice *myDevice = [UIDevice currentDevice];\n[myDevice setBatteryMonitoringEnabled:YES];\nfloat batLeft = [my...
2008/12/01
[ "https://Stackoverflow.com/questions/330461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42078/" ]
330,471
<p>Explain why a nullable int can't be assigned the value of null e.g</p> <pre><code>int? accom = (accomStr == "noval" ? null : Convert.ToInt32(accomStr)); </code></pre> <p>What's wrong with that code?</p>
[ { "answer_id": 330484, "author": "Harry Steinhilber", "author_id": 6118, "author_profile": "https://Stackoverflow.com/users/6118", "pm_score": 9, "selected": true, "text": "int? accom = (accomStr == \"noval\" ? (int?)null : Convert.ToInt32(accomStr));\n" }, { "answer_id": 330490,...
2008/12/01
[ "https://Stackoverflow.com/questions/330471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40623/" ]
330,482
<p>I was wondering if anyone has a good solution to a problem I've encountered numerous times during the last years.</p> <p>I have a shopping cart and my customer explicitly requests that it's order is significant. So I need to persist the order to the DB.</p> <p>The obvious way would be to simply insert some OrderFi...
[ { "answer_id": 330510, "author": "Binary Worrier", "author_id": 18797, "author_profile": "https://Stackoverflow.com/users/18797", "pm_score": 3, "selected": false, "text": "SELECT" }, { "answer_id": 10356675, "author": "Kickaha", "author_id": 1318601, "author_profile"...
2008/12/01
[ "https://Stackoverflow.com/questions/330482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21699/" ]
330,493
<p>In many places in our code we have collections of objects, from which we need to create a comma-separated list. The type of collection varies: it may be a DataTable from which we need a certain column, or a List&lt;Customer&gt;, etc.</p> <p>Now we loop through the collection and use string concatenation, for exampl...
[ { "answer_id": 330522, "author": "Matt Howells", "author_id": 16881, "author_profile": "https://Stackoverflow.com/users/16881", "pm_score": 4, "selected": false, "text": "static string ToCsv<T>(IEnumerable<T> things, Func<T, string> toStringMethod)\n{\n StringBuilder sb = new StringBu...
2008/12/01
[ "https://Stackoverflow.com/questions/330493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9449/" ]
330,496
<p>I'm busy writing a class that monitors the status of RAS connections. I need to test to make sure that the connection is not only connected, but also that it can communicate with my web service. Since this class will be used in many future projects, I'd like a way to test the connection to the webservice without k...
[ { "answer_id": 1013945, "author": "Blue Toque", "author_id": 116268, "author_profile": "https://Stackoverflow.com/users/116268", "pm_score": 4, "selected": false, "text": "public static bool ServiceExists(\n string url, \n bool throwExceptions, \n out string errorMessage)\n{\n ...
2008/12/01
[ "https://Stackoverflow.com/questions/330496", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6389/" ]
330,497
<p>I just stumbled across this bug in some legacy code:</p> <pre><code>class MyAPIHandler { private: int handle; public: void MyApiHandler() // default constructor { handle = 42; }; }; </code></pre> <p>It compiles fine, with no warnings - but the behaviour wasn't what I intended, bec...
[ { "answer_id": 330511, "author": "Vilx-", "author_id": 41360, "author_profile": "https://Stackoverflow.com/users/41360", "pm_score": 0, "selected": false, "text": "#define CONSTRUCTOR\n" }, { "answer_id": 330553, "author": "James Hopkin", "author_id": 11828, "author_p...
2008/12/01
[ "https://Stackoverflow.com/questions/330497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1737/" ]
330,500
<p>This is a Windows Console application (actually a service) that a previous guy built 4 years ago and is installed and running. I now need to make some changes but can't even build the current version! Here is the build output:</p> <pre><code>--------------------Configuration: MyApp - Win32 Debug--------------------...
[ { "answer_id": 330531, "author": "user41013", "author_id": 41013, "author_profile": "https://Stackoverflow.com/users/41013", "pm_score": 2, "selected": true, "text": "_socket_noblock" }, { "answer_id": 330540, "author": "atzz", "author_id": 23252, "author_profile": "h...
2008/12/01
[ "https://Stackoverflow.com/questions/330500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41013/" ]
330,529
<p>What is the difference between the selectitem and selectitems tags in jsf?</p>
[ { "answer_id": 330552, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 5, "selected": true, "text": "selectitem" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40933/" ]
330,532
<p>I'm looking for a complete solution to a automated "building" and testing of PHP application. I came across PhpUnderControl, a solution for running automated application builds created around Cruise Control.</p> <p>Unfortunately PhpUC is still in it's early stages of development and I can't get it to work on window...
[ { "answer_id": 9148587, "author": "VDH", "author_id": 1190494, "author_profile": "https://Stackoverflow.com/users/1190494", "pm_score": 1, "selected": false, "text": " <log type=\"junit\" target=\"...../cruisecontrol-bin-2.8.4/projects/<projname>/build/logs/logfile.xml\" logIncompleteSk...
2008/12/01
[ "https://Stackoverflow.com/questions/330532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38769/" ]
330,542
<p>I'd like the iPhone virtual keyboard to appear pre-set to a particular language (Russian for example) when the user taps a UITextField. Is there a way to do this in Cocoa code?</p>
[ { "answer_id": 1612457, "author": "slatvick", "author_id": 72766, "author_profile": "https://Stackoverflow.com/users/72766", "pm_score": 2, "selected": false, "text": "self.searchBar.keyboardType = UIKeyboardTypeURL;\n" }, { "answer_id": 5871456, "author": "Nestor", "auth...
2008/12/01
[ "https://Stackoverflow.com/questions/330542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42100/" ]
330,543
<p>I have this php code, with which I am trying to generate a popup window that will contain the contents of a html file, however after adding in the script tags, no html is displayed. I tried echoing out $row2, but the word array is printed to the screen and nothing else.</p> <pre><code>&lt;?php session_start(); if (...
[ { "answer_id": 330550, "author": "Gonzalo Quero", "author_id": 40996, "author_profile": "https://Stackoverflow.com/users/40996", "pm_score": 0, "selected": false, "text": "<script>" }, { "answer_id": 330561, "author": "Greg", "author_id": 24181, "author_profile": "htt...
2008/12/01
[ "https://Stackoverflow.com/questions/330543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246613/" ]
330,545
<p>I have a page with 3 layers, one for navigation, one for database records and one for results. When I click on a database record, the results are displayed in the result layer via ajax. For navigation, the links will simply be different queries. I am wondering if it would make sense to have each different query be s...
[ { "answer_id": 330550, "author": "Gonzalo Quero", "author_id": 40996, "author_profile": "https://Stackoverflow.com/users/40996", "pm_score": 0, "selected": false, "text": "<script>" }, { "answer_id": 330561, "author": "Greg", "author_id": 24181, "author_profile": "htt...
2008/12/01
[ "https://Stackoverflow.com/questions/330545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246613/" ]
330,562
<p>My usage-scenario may seem a bit unusual, but here it is: When using vim (it's one of about 4 different editors I use regularly), I use it in two different situations. The first is via the GUI, in which I'll have multiple buffers and have some settings different than when I use it from the command-line (by testing "...
[ { "answer_id": 330689, "author": "rampion", "author_id": 9859, "author_profile": "https://Stackoverflow.com/users/9859", "pm_score": 4, "selected": true, "text": ".gvimrc" }, { "answer_id": 5851557, "author": "connermcd", "author_id": 733685, "author_profile": "https:...
2008/12/01
[ "https://Stackoverflow.com/questions/330562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6421/" ]
330,569
<p>Is there a way to find a node matched on part of a value.</p> <p>If I have the following:</p> <pre><code>&lt;competition id="100" name="Barclays Premier League"/&gt; &lt;competition id="101" name="CocaCola Championship" /&gt; &lt;competition id="102" name="CocaCola League 1" /&gt; </code></pre> <p>Given the strin...
[ { "answer_id": 330583, "author": "annakata", "author_id": 13018, "author_profile": "https://Stackoverflow.com/users/13018", "pm_score": 5, "selected": true, "text": "//competition[contains(@name,'Prem')]\n" }, { "answer_id": 330840, "author": "Dimitre Novatchev", "author_...
2008/12/01
[ "https://Stackoverflow.com/questions/330569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/274/" ]
330,571
<p>I have a DataGrid that looks like this (slightly simplified here):</p> <pre><code>&lt;asp:DataGrid ID="grdQuotas" runat="server" AutoGenerateColumns="False"&gt; &lt;HeaderStyle CssClass="quotas-header" /&gt; &lt;Columns&gt; &lt;asp:TemplateColumn&gt; &lt;HeaderTemplate&gt; ...
[ { "answer_id": 330642, "author": "netadictos", "author_id": 31791, "author_profile": "https://Stackoverflow.com/users/31791", "pm_score": 1, "selected": false, "text": " protected void dg_ItemDataBound(object sender, DataGridItemEventArgs e)\n {\n if (e.Item.ItemType != ListIte...
2008/12/01
[ "https://Stackoverflow.com/questions/330571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39709/" ]
330,585
<p>Up till now we've been rewriting URL's using a custon 404 page: the url would not map to any file in the site, and we configured the IIS to send 404 error to a aspx page which redirected those url's to the correct URL.<br> Now we want to stop using redirects, so after reading Scott Guthrie's article on Url Rewriting...
[ { "answer_id": 2243942, "author": "adinas", "author_id": 5754, "author_profile": "https://Stackoverflow.com/users/5754", "pm_score": 2, "selected": false, "text": "<modules runAllManagedModulesForAllRequests=\"true\">\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/278/" ]
330,590
<p>I'm using a JComboBox with an ItemListener on it. When the value is changed, the itemStateChanged event is called twice. The first call, the ItemEvent is showing the original item selected. On the second time, it is showing the item that has been just selected by the user. Here's some tester code:</p> <pre><code>pu...
[ { "answer_id": 330602, "author": "kgiannakakis", "author_id": 24054, "author_profile": "https://Stackoverflow.com/users/24054", "pm_score": 6, "selected": true, "text": "import javax.swing.*;\nimport java.awt.*;\nimport java.awt.event.*;\n\npublic class Tester {\n\n public Tester(){\n...
2008/12/01
[ "https://Stackoverflow.com/questions/330590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21144/" ]
330,601
<p>Is there a way to make stack trace to display the whole generated SQL statement when there is an error instead just the first few characters of it?</p> <p>This is what it currently displays</p> <blockquote> <p>...\Zend\Db\Adapter\Pdo\Abstract.php(220): Zend_Db_Adapter_Abstract->query('UPDATE "diction...', Array)...
[ { "answer_id": 332110, "author": "Solid Rhino", "author_id": 42111, "author_profile": "https://Stackoverflow.com/users/42111", "pm_score": 4, "selected": false, "text": "Zend_Debug::Dump($select);\nexit;\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
330,609
<p>I have an animation which moves some views around. When this animation completes I want the window to recalculate the keyview loop. My code is simmilar to the follow mock code:</p> <pre><code>[NSAnimationContext beginGrouping]; [newView setAlpha: 0.0]; //hide newView [self addSubView:newView]; //position t...
[ { "answer_id": 331142, "author": "Peter Hosey", "author_id": 30461, "author_profile": "https://Stackoverflow.com/users/30461", "pm_score": 2, "selected": false, "text": "-animationForKey:" }, { "answer_id": 332464, "author": "Ashley Clark", "author_id": 4556, "author_...
2008/12/01
[ "https://Stackoverflow.com/questions/330609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
330,612
<p>I have a table of time-series data of which I need to find all columns that contain at least one non-null value within a given time period. So far I am using the following query:</p> <pre><code>select max(field1),max(field2),max(field3),... from series where t_stamp between x and y </code></pre> <p>Afterwards ...
[ { "answer_id": 330626, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 0, "selected": false, "text": "COALESCE" }, { "answer_id": 330627, "author": "Tony Andrews", "author_id": 18747, "author_profile": "http...
2008/12/01
[ "https://Stackoverflow.com/questions/330612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33805/" ]