qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
336,909
<p>I'm looking for a method to grep for multiple atoms e.g. "foo" and "bar". I'm aware i can use <br /> <code>grep 'foo' file | grep 'bar'</code><br /> to get both of them but i was wondering if there was a more efficient way. Any googleing seems to only throw results for an 'or' based search rather than 'and'. </p...
[ { "answer_id": 336920, "author": "activout.se", "author_id": 20444, "author_profile": "https://Stackoverflow.com/users/20444", "pm_score": 2, "selected": false, "text": "egrep '(foo.*bar|bar.*foo)'\n# or\ngrep -E '(foo.*bar|bar.*foo)'\n" }, { "answer_id": 336926, "author": "u...
2008/12/03
[ "https://Stackoverflow.com/questions/336909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42789/" ]
336,919
<p>The code I have pasted below is meant to display images on the middle 2 links without text and go back to text on the reset and fourth link. I have set display:none for the span tag only, but it does nothing. Is there anyway to do what I am after simply, without using a framework?</p> <p>edit: example</p> <pre><co...
[ { "answer_id": 336939, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 3, "selected": true, "text": "rel" }, { "answer_id": 336943, "author": "Gareth", "author_id": 31582, "author_profile": "https://St...
2008/12/03
[ "https://Stackoverflow.com/questions/336919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246613/" ]
336,922
<p>Is this still the recommended library in use? ThickBox 3.1</p>
[ { "answer_id": 336939, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 3, "selected": true, "text": "rel" }, { "answer_id": 336943, "author": "Gareth", "author_id": 31582, "author_profile": "https://St...
2008/12/03
[ "https://Stackoverflow.com/questions/336922", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41291/" ]
336,925
<p>I have a number of heroshot images, that have a modal popup when clicked. I'm trying to get my cursor to turn into magnifying glass whenever it is moved over the image. The following CSS does not appear to work even though my <code>magnify.cur</code> is present in the right location.</p> <pre><code>a.heroshot img...
[ { "answer_id": 336931, "author": "activout.se", "author_id": 20444, "author_profile": "https://Stackoverflow.com/users/20444", "pm_score": 2, "selected": false, "text": "a.heroshot img {\ncursor:url('/img/magnify.cur'), pointer;\n}\n" }, { "answer_id": 337266, "author": "isan...
2008/12/03
[ "https://Stackoverflow.com/questions/336925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26107/" ]
336,942
<p>I hava an ajax application that will not display an image, or make a popup window from html stored in a file.</p> <p>This is the code I am usiong for the popup:</p> <pre><code>echo '&lt;script&gt; function makewindows(){ child1 = window.open ("about:blank"); child1.document.write(' . json_encode($row2["ARTICLE_DE...
[ { "answer_id": 337221, "author": "Michał Niedźwiedzki", "author_id": 2169, "author_profile": "https://Stackoverflow.com/users/2169", "pm_score": 0, "selected": false, "text": "<script>...</script>" }, { "answer_id": 337294, "author": "Tom Haigh", "author_id": 22224, "...
2008/12/03
[ "https://Stackoverflow.com/questions/336942", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246613/" ]
336,946
<p>Does the MySQL command :</p> <pre><code>FLUSH TABLES; </code></pre> <p>flush every table in the current database, or every table on the server ?</p> <p>I'm using MySQL 5.0 - the <a href="http://dev.mysql.com/doc/refman/5.0/en/flush.html" rel="noreferrer">documentation</a> is unclear, although it does mention tha...
[ { "answer_id": 341414, "author": "Bill Karwin", "author_id": 20860, "author_profile": "https://Stackoverflow.com/users/20860", "pm_score": 3, "selected": false, "text": "FLUSH TABLES" }, { "answer_id": 65326082, "author": "Jihad Mehdi", "author_id": 3120117, "author_p...
2008/12/03
[ "https://Stackoverflow.com/questions/336946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36214/" ]
336,948
<p>When does script added to the page with <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.registerstartupscript.aspx" rel="nofollow noreferrer">Page.ClientScript.RegisterStartupScript()</a> actually run? MSDN states &quot;when the page finishes loading but before the page's <code>OnL...
[ { "answer_id": 341414, "author": "Bill Karwin", "author_id": 20860, "author_profile": "https://Stackoverflow.com/users/20860", "pm_score": 3, "selected": false, "text": "FLUSH TABLES" }, { "answer_id": 65326082, "author": "Jihad Mehdi", "author_id": 3120117, "author_p...
2008/12/03
[ "https://Stackoverflow.com/questions/336948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6651/" ]
336,960
<p>Can you tell me if there anybody has implemented a <strong>custom validator for checking that one of two (or N)</strong> input fields are filled?</p> <pre><code> "Insert phone number or email address" </code></pre> <p>I'm using ASP.NET (Ajax) 3.5, the ajaxToolkit:ValidatorCalloutExtender (and jQuery if it's nece...
[ { "answer_id": 3785900, "author": "Ian Grainger", "author_id": 48348, "author_profile": "https://Stackoverflow.com/users/48348", "pm_score": 3, "selected": false, "text": "function validatePhoneOrEmail(source, args) {\n if ($(\"[id$='txtEmail']\").val() == \"\" && $(\"[id$='txtTel']\"...
2008/12/03
[ "https://Stackoverflow.com/questions/336960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6461/" ]
336,961
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/72264/how-can-a-c-windows-dll-be-merged-into-a-c-sharp-application-exe">How can a C++ windows dll be merged into a C# application exe?</a> </p> </blockquote> <p>Is anybody aware of a program that can pack sever...
[ { "answer_id": 337163, "author": "Arnout", "author_id": 3496, "author_profile": "https://Stackoverflow.com/users/3496", "pm_score": 2, "selected": false, "text": "LoadLibrary()" }, { "answer_id": 337218, "author": "Skizz", "author_id": 1898, "author_profile": "https:/...
2008/12/03
[ "https://Stackoverflow.com/questions/336961", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13618/" ]
336,963
<p>I am not sure what <code>optparse</code>'s <code>metavar</code> parameter is used for. I see it is used all around, but I can't see its use.</p> <p>Can someone make it clear to me? Thanks.</p>
[ { "answer_id": 336992, "author": "Blair Conrad", "author_id": 1199, "author_profile": "https://Stackoverflow.com/users/1199", "pm_score": 6, "selected": true, "text": "metavar" }, { "answer_id": 3882232, "author": "Yuda Prawira", "author_id": 454229, "author_profile":...
2008/12/03
[ "https://Stackoverflow.com/questions/336963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
336,965
<p>Today one of my friends said: </p> <pre><code>if (typeof isoft == "undefined") var isoft = new Object(); </code></pre> <p>is such kind of code is writted by a freshman and writes</p> <pre><code>if(!isoft) var isoft = new Object(); </code></pre> <p>I originally consider there must be some difference. But I can't ...
[ { "answer_id": 336982, "author": "stesch", "author_id": 41860, "author_profile": "https://Stackoverflow.com/users/41860", "pm_score": 1, "selected": false, "text": "isoft" }, { "answer_id": 337906, "author": "Grant Wagner", "author_id": 9254, "author_profile": "https:...
2008/12/03
[ "https://Stackoverflow.com/questions/336965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
336,988
<p>I use XML serialization for the reading of my Config-POCOs. </p> <p>To get intellisense support in Visual Studio for XML files I need a schema file. I can create the schema with xsd.exe mylibrary.dll and this works fine.</p> <p>But I want that the schema is always created if I serialize an object to the file syste...
[ { "answer_id": 337008, "author": "leppie", "author_id": 15541, "author_profile": "https://Stackoverflow.com/users/15541", "pm_score": 3, "selected": true, "text": "System.Xml.Serialization.XmlSchemaExporter" }, { "answer_id": 338100, "author": "Community", "author_id": -1...
2008/12/03
[ "https://Stackoverflow.com/questions/336988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
336,997
<p>Following up this question: "<a href="https://stackoverflow.com/questions/336846/database-enums-pros-and-cons">Database enums - pros and cons</a>", I'd like to know which database systems support enumeration data types, and a bit of detail on how they do it (e.g. what is stored internally, what are the limits, query...
[ { "answer_id": 337120, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 3, "selected": false, "text": "SELECT enum_col+0" }, { "answer_id": 337131, "author": "mat", "author_id": 42083, "author_profile": "h...
2008/12/03
[ "https://Stackoverflow.com/questions/336997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18771/" ]
337,019
<p>In the below program:</p> <pre><code>class Main { static string staticVariable = "Static Variable"; string instanceVariable = "Instance Variable"; public Main(){} } </code></pre> <p>The <code>instanceVariable</code> will be stored inside the memory allocated for object instance. Where will the <...
[ { "answer_id": 337032, "author": "leppie", "author_id": 15541, "author_profile": "https://Stackoverflow.com/users/15541", "pm_score": 5, "selected": true, "text": "object[]" } ]
2008/12/03
[ "https://Stackoverflow.com/questions/337019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26036/" ]
337,023
<p>While trying to answer a question in the vicinity '<a href="https://stackoverflow.com/questions/331215/unit-test-wpf-bindings">Unit Testing WPF Bindings</a>' I had the following niggling question..<br> <strong>What's the best way to find if you have WPF Data Binding wiring setup incorrectly (or you just broke someth...
[ { "answer_id": 337026, "author": "Gishu", "author_id": 1695, "author_profile": "https://Stackoverflow.com/users/1695", "pm_score": 6, "selected": true, "text": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<configuration>\n <system.diagnostics>\n <sources>\n <source name=\"Syste...
2008/12/03
[ "https://Stackoverflow.com/questions/337023", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1695/" ]
337,024
<p>I am working with an SVN repository with many projects. I need to move a few of the projects out of that repository into individual repositories, one for each project, keeping the history.</p> <p>I've been able to use <code>svnadmin dump</code> to dump the entire repository and <code>svnadmin load</code> it into an...
[ { "answer_id": 337110, "author": "Avi", "author_id": 1605, "author_profile": "https://Stackoverflow.com/users/1605", "pm_score": 7, "selected": true, "text": "\n$ svnadmin dump /path/to/repo \n | svndumpfilter include /proj > dump-file\n$ svnadmin create /new/proj/repo\n$ svnadmin lo...
2008/12/03
[ "https://Stackoverflow.com/questions/337024", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1142/" ]
337,029
<p>How do I implement this equality comparison is a sane java way? </p> <pre><code>boolean x = (a == b) || (a.equals(b)) </code></pre> <p>I want to make sure the content of both objects is equal but null is also ok, i.e. both can be null and are thus equal.</p> <p>Update: just to be clear, I have to implement thi...
[ { "answer_id": 337039, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 3, "selected": false, "text": "boolean x = (a == null && b == null) || (a != null && a.equals(b))\n" }, { "answer_id": 337056, "author": "...
2008/12/03
[ "https://Stackoverflow.com/questions/337029", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6460/" ]
337,037
<p>This is related to a chapter from <a href="https://rads.stackoverflow.com/amzn/click/com/0596510047" rel="noreferrer" rel="nofollow noreferrer">beautiful code</a>. And in that chapter I read about the nested <code>if</code>s.</p> <p>The author was talking about deeply nested <code>if</code>s as originator of bugs a...
[ { "answer_id": 337105, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 4, "selected": false, "text": "if (i == 1) {\n // action 1\n} else {\n if (i == 2) {\n // action 2\n } else {\n if (i == 3) {\n ...
2008/12/03
[ "https://Stackoverflow.com/questions/337037", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41968/" ]
337,038
<p>I have an interface called Dictionary which has a method <code>insert()</code>. This interface is implemented by class <code>BSTree</code>, but I also have a class <code>AVLTree</code> which is a child class of <code>BSTree</code>. <code>AVLTree</code> redefines the <code>insert()</code> so it suits it's needs. Now ...
[ { "answer_id": 337093, "author": "huo73", "author_id": 15657, "author_profile": "https://Stackoverflow.com/users/15657", "pm_score": 2, "selected": false, "text": "public Interface Dictionary {\n ...\n public void insert();\n ...\n}\n\npublic Class BSTree implements Dictionary {\n .....
2008/12/03
[ "https://Stackoverflow.com/questions/337038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42803/" ]
337,058
<p>How do I integrate AJAX toolkit into MVC applications in .net?</p>
[ { "answer_id": 337093, "author": "huo73", "author_id": 15657, "author_profile": "https://Stackoverflow.com/users/15657", "pm_score": 2, "selected": false, "text": "public Interface Dictionary {\n ...\n public void insert();\n ...\n}\n\npublic Class BSTree implements Dictionary {\n .....
2008/12/03
[ "https://Stackoverflow.com/questions/337058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42791/" ]
337,060
<p>We recently had a project where we released beta of a big web app on our client's server. Our client requested us to do bug fixes as they come, and we tried to do it same way. Normally while building an app on our prototype server is way easier, as I just have to issue simple 'svn up' command which takes a second. <...
[ { "answer_id": 337092, "author": "mat", "author_id": 42083, "author_profile": "https://Stackoverflow.com/users/42083", "pm_score": 2, "selected": false, "text": "svn diff -r x:y" } ]
2008/12/03
[ "https://Stackoverflow.com/questions/337060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
337,066
<p>I am developing a wrapper for a third party function library that is interfacing with some special hardware. So basically, I want to encapsulate the dll functions (<code>bool Connect()</code>, <code>void Disconnect()</code> etc) in a MyHardwareObject with connect- and disconnect methods.</p> <p>The Connect function...
[ { "answer_id": 337127, "author": "Petar Petrov", "author_id": 42377, "author_profile": "https://Stackoverflow.com/users/42377", "pm_score": 2, "selected": false, "text": " bool MyHardwareObject.Connect()\n{\n try\n {\n ThirdPartyLibrary.Connect();\n }\n catch (SomeExce...
2008/12/03
[ "https://Stackoverflow.com/questions/337066", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22114/" ]
337,072
<p>Can anyone explain in simple words what First and Second Level caching in Hibernate/NHibernate are?</p>
[ { "answer_id": 25072915, "author": "Thadeuse", "author_id": 1733575, "author_profile": "https://Stackoverflow.com/users/1733575", "pm_score": 7, "selected": false, "text": "evict()" }, { "answer_id": 51306851, "author": "Vlad Mihalcea", "author_id": 1025118, "author_p...
2008/12/03
[ "https://Stackoverflow.com/questions/337072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38807/" ]
337,087
<p>Say I have some code like</p> <pre><code>namespace Portal { public class Author { public Author() { } private void SomeMethod(){ string myMethodName = ""; // myMethodName = "Portal.Author.SomeMethod()"; } } } </code></pre> <p>Can I find out the name of the me...
[ { "answer_id": 337091, "author": "leppie", "author_id": 15541, "author_profile": "https://Stackoverflow.com/users/15541", "pm_score": 5, "selected": true, "text": "MethodInfo.GetCurrentMethod().Name\n" }, { "answer_id": 337109, "author": "mookid8000", "author_id": 6560, ...
2008/12/03
[ "https://Stackoverflow.com/questions/337087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31765/" ]
337,090
<p>I have created a TCP client that connects to a listening server. We implemeted TCP keep alive also. Some times the client crashes and core dumped. Below are the core dump traces.</p> <p>Problem is in linux kernel version Update 4, kernel 2.6.9-42.0.10.</p> <p>we had two core dumps.</p> <pre><code>(gdb) where #0 0...
[ { "answer_id": 337748, "author": "CesarB", "author_id": 28258, "author_profile": "https://Stackoverflow.com/users/28258", "pm_score": 1, "selected": false, "text": "_dl_sysinfo_int80" }, { "answer_id": 346046, "author": "Community", "author_id": -1, "author_profile": ...
2008/12/03
[ "https://Stackoverflow.com/questions/337090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
337,103
<p>I have a form with a few buttons which execute code when pressed like running validations on the database.</p> <p>Some code can run for a few minutes so is there any way to show the time remaining or a message to display the % of process completed?</p> <p>Or pop out a message when code evaluation starts and the me...
[ { "answer_id": 337129, "author": "Mike Powell", "author_id": 205, "author_profile": "https://Stackoverflow.com/users/205", "pm_score": 0, "selected": false, "text": "DoEvents" }, { "answer_id": 337506, "author": "BIBD", "author_id": 685, "author_profile": "https://Sta...
2008/12/03
[ "https://Stackoverflow.com/questions/337103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31132/" ]
337,112
<p>I need to round decimal numbers to six places using JavaScript, but I need to consider legacy browsers so I <a href="http://www.hunlock.com/blogs/The_Complete_Javascript_Number_Reference" rel="noreferrer">can't rely on Number.toFixed</a> </p> <blockquote> <p>The big catch with toExponential, toFixed, and toPrecis...
[ { "answer_id": 337139, "author": "PhiLho", "author_id": 15459, "author_profile": "https://Stackoverflow.com/users/15459", "pm_score": 0, "selected": false, "text": "javascript: var num = 3.1415926535897932384; alert(num.toFixed(7));\n" }, { "answer_id": 337146, "author": "Ser...
2008/12/03
[ "https://Stackoverflow.com/questions/337112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20074/" ]
337,115
<p>We're trying to tune an application that accepts messages via TCP and also uses TCP for some of its internal messaging. While load testing, we noticed that response time degrades significantly (and then stops altogether) as more simultaneous requests are made to the system. During this time, we see a lot of TCP c...
[ { "answer_id": 338132, "author": "yogman", "author_id": 24349, "author_profile": "https://Stackoverflow.com/users/24349", "pm_score": -1, "selected": false, "text": "int listen(int sockfd, int backlog);\n" }, { "answer_id": 15593859, "author": "Synetech", "author_id": 119...
2008/12/03
[ "https://Stackoverflow.com/questions/337115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2890/" ]
337,121
<p>Suppose I have a class 'Application'. In order to be initialised it takes certain settings in the constructor. Let's also assume that the number of settings is so many that it's compelling to place them in a class of their own.</p> <p>Compare the following two implementations of this scenario.</p> <p>Implementatio...
[ { "answer_id": 337132, "author": "leppie", "author_id": 15541, "author_profile": "https://Stackoverflow.com/users/15541", "pm_score": 0, "selected": false, "text": "public abstract class Outer\n{\n protected class Inner\n {\n }\n}\n" }, { "answer_id": 337143, "author": "Jo...
2008/12/03
[ "https://Stackoverflow.com/questions/337121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32688/" ]
337,141
<p>I am working with an order system that has two tables Order and OrderLine pretty standard stuff. I want to work out an order line number for the order lines with respect to the order e.g.</p> <p>Orderid Orderlineid linenumber<br> 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp...
[ { "answer_id": 337214, "author": "kristof", "author_id": 3241, "author_profile": "https://Stackoverflow.com/users/3241", "pm_score": 3, "selected": true, "text": "select \n ol1.orderId,\n ol1.orderLineId,\n count(*) as lineNumber\nfrom \n orderLine ol1\n inner join orderLi...
2008/12/03
[ "https://Stackoverflow.com/questions/337141", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2253/" ]
337,158
<p>I have researched and haven't found a way to run INTERSECT and MINUS operations in MS Access. Does any way exist</p>
[ { "answer_id": 337203, "author": "LeppyR64", "author_id": 16592, "author_profile": "https://Stackoverflow.com/users/16592", "pm_score": 6, "selected": true, "text": "select distinct\n a.*\nfrom\n a\n inner join b on a.id = b.id\n" }, { "answer_id": 337580, "author": "Dave ...
2008/12/03
[ "https://Stackoverflow.com/questions/337158", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6613/" ]
337,159
<p>In an application I need to execute other programs with another user's credentials. Currently I use <strong><a href="http://msdn.microsoft.com/en-us/library/ed04yy3t.aspx" rel="nofollow noreferrer">System.Diagnostics.Process.Start</a></strong> to execute the program:</p> <pre><code>public static Process Start( s...
[ { "answer_id": 337396, "author": "BlaM", "author_id": 999, "author_profile": "https://Stackoverflow.com/users/999", "pm_score": 3, "selected": false, "text": " Process p = new Process();\n\n p.StartInfo.FileName = textFilename.Text;\n p.StartInfo.Arguments = textArgu...
2008/12/03
[ "https://Stackoverflow.com/questions/337159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/999/" ]
337,165
<p>This code is executed by many way. When it's executed by the form button it works (the button start a thread and in the loop it call this method = it works). BUT it doesn't work when I have a call to that method from my BackgroundWorker in the form. </p> <p>With the following code:</p> <pre><code>private void resi...
[ { "answer_id": 337171, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 4, "selected": true, "text": "private void resizeThreadSafe(int width, int height)\n{\n if (this.form.InvokeRequired)\n {\n this.form.Invo...
2008/12/03
[ "https://Stackoverflow.com/questions/337165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21386/" ]
337,175
<p>I was once given this task to do in an RDBMS:</p> <p>Given tables customer, order, orderlines and product. Everything done with the usual fields and relationships, with a comment memo field on the orderline table.</p> <p>For one customer retrieve a list of all products that customer has ever ordered with product n...
[ { "answer_id": 338183, "author": "Bill Karwin", "author_id": 20860, "author_profile": "https://Stackoverflow.com/users/20860", "pm_score": 4, "selected": true, "text": "JOIN" }, { "answer_id": 338769, "author": "GalacticCowboy", "author_id": 29638, "author_profile": "...
2008/12/03
[ "https://Stackoverflow.com/questions/337175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37771/" ]
337,179
<p>I'm running tomcat and have some jsp pages that display a subset of a table. I show 20 rows at a time on a single page. When the table has large amounts of data, the jsp page doesn't render. I'm guessing that the ResultSet is using a client side cursor. I've worked with ASP in the past, and we always used server...
[ { "answer_id": 337206, "author": "adam", "author_id": 33604, "author_profile": "https://Stackoverflow.com/users/33604", "pm_score": 2, "selected": false, "text": "Statement stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY);\nResultSet rs = stmt.executeQuery(sql);\n" }, { "a...
2008/12/03
[ "https://Stackoverflow.com/questions/337179", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15852/" ]
337,181
<p>I need to create a rectangle bubble with rounded corners with text inside, like a cartoon speech bubble. I need the bubble to expand horizontally and vertically depending on the size of the text it contain. I would like the speech arrow and the radius of the rounded corners to remain constant.</p> <p>I could simpl...
[ { "answer_id": 337644, "author": "Jobi Joy", "author_id": 8091, "author_profile": "https://Stackoverflow.com/users/8091", "pm_score": 6, "selected": true, "text": "<Grid x:Name=\"grid\">\n <Grid.RowDefinitions>\n <RowDefinition Height=\"*\"/>\n <RowDefinition Height=\"40...
2008/12/03
[ "https://Stackoverflow.com/questions/337181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42826/" ]
337,183
<p>I'd like to output html controls using xslt, but I need to be able to name the controls so that I can get at them when the form posts back.</p> <p>I'd like to be able to name the radio button <code>"action_" + _case_id</code>.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;?xml-stylesheet type="te...
[ { "answer_id": 337227, "author": "Artur...", "author_id": 41465, "author_profile": "https://Stackoverflow.com/users/41465", "pm_score": 0, "selected": false, "text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<?xml-stylesheet type=\"text/xsl\" href=\"data.xsl\"?>\n<NewDataSet>\n <Case...
2008/12/03
[ "https://Stackoverflow.com/questions/337183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42697/" ]
337,186
<p>My if statement is always evaluating to false and not entering the <code>&lt;span&gt;</code> block. Because of which, I'm not able to get the value of "index" in the if condition, I've tried every thing appending index with # and %. Can anybody suggest the solution?</p> <pre><code>&lt;c:forEach var="index" begin="1...
[ { "answer_id": 337212, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 0, "selected": false, "text": "<s:if test=\"%{index == 1}\">\n" }, { "answer_id": 337228, "author": "adam", "author_id": 33604, "author...
2008/12/03
[ "https://Stackoverflow.com/questions/337186", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28557/" ]
337,208
<p>MS Access appears to support nulls in code, but I can't for the life of me figure out how to enter a null directly in a table. This is maddening because once a field has had a figure entered in it, it can never be deleted/set to null. Normally, allowing zero length strings would take care of this, but Access treat...
[ { "answer_id": 337235, "author": "Patrick Harrington", "author_id": 41165, "author_profile": "https://Stackoverflow.com/users/41165", "pm_score": 2, "selected": false, "text": "UPDATE test SET test.test = Null;\n" } ]
2008/12/03
[ "https://Stackoverflow.com/questions/337208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1537/" ]
337,223
<p>Disclaimer: I'm fairly new to python!</p> <p>If I want all the lines of a file until (edit: and including) the line containing some string <code>stopterm</code>, is there a way of using the list syntax for it? I was hoping there would be something like:</p> <pre><code>usefullines = [line for line in file until sto...
[ { "answer_id": 337247, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 1, "selected": false, "text": "def enum_until(source, until_criteria):\n for k in source:\n if until_criteria(k):\n break;\n ...
2008/12/03
[ "https://Stackoverflow.com/questions/337223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36537/" ]
337,237
<p>I need the current user and the domain. I am using a VB 6 application. </p> <p>Thanks</p>
[ { "answer_id": 337262, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 5, "selected": true, "text": "Dim UserName As String\nDim UserDomain As String\nUserName = Environ(\"USERNAME\")\nUserDomain = Environ(\"USERDOMAIN\")\...
2008/12/03
[ "https://Stackoverflow.com/questions/337237", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1154/" ]
337,239
<p>In C#, if I declare an auto-implemented property, why do I have to declare BOTH the get and set part? </p> <p>i.e.</p> <pre><code>public string ThisWorks { get; set; } public string ThisDoesnt { get; } </code></pre> <p>Isn't this just syntactic sugar - i.e. the compiler inserts a private field for the property?...
[ { "answer_id": 337246, "author": "stusmith", "author_id": 6604, "author_profile": "https://Stackoverflow.com/users/6604", "pm_score": 6, "selected": true, "text": "public string Foo\n{\n get;\n private set;\n}\n" }, { "answer_id": 337252, "author": "Jon Skeet", "author_...
2008/12/03
[ "https://Stackoverflow.com/questions/337239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7140/" ]
337,254
<p>I wonder if there is something like a standalone Version of Visual Studios "Immediate Window"? Sometimes I just want to test some simple stuff, like "DateTime.Parse("blah")" to see if that works. But everytime i have to create a new console application, put in my code and test it.</p> <p>The Immediate Window sadly ...
[ { "answer_id": 337286, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 2, "selected": false, "text": "public static void Foo()\n{ \n Console.WriteLine(\"Hello\");\n}\n...\nFoo();\n" }, { "answer_id": 4269853, ...
2008/12/03
[ "https://Stackoverflow.com/questions/337254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91/" ]
337,268
<p>What is the 'correct' way to store a native pointer inside a Java object?</p> <p>I could treat the pointer as a Java <code>int</code>, if I happen to know that native pointers are &lt;= 32 bits in size, or a Java <code>long</code> if I happen to know that native pointers are &lt;= 64 bits in size. But is there a be...
[ { "answer_id": 337303, "author": "Avi", "author_id": 1605, "author_profile": "https://Stackoverflow.com/users/1605", "pm_score": 2, "selected": false, "text": "int" }, { "answer_id": 337359, "author": "Tom Hawtin - tackline", "author_id": 4725, "author_profile": "http...
2008/12/03
[ "https://Stackoverflow.com/questions/337268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31662/" ]
337,272
<p>How do I trigger a delay, let's say I want to call a method (once) in 3 seconds from now, and how do I cancel that call if I need to?</p>
[ { "answer_id": 337302, "author": "adam", "author_id": 33604, "author_profile": "https://Stackoverflow.com/users/33604", "pm_score": 1, "selected": false, "text": "NSTimer *timer;\n" }, { "answer_id": 337310, "author": "Stephen Darlington", "author_id": 2998, "author_p...
2008/12/03
[ "https://Stackoverflow.com/questions/337272", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36182/" ]
337,293
<p>I need to edit (using javascript) an SVG document embedded in an html page.</p> <p>When the SVG is loaded, I can access the dom of the SVG and its elements. But I am not able to know if the SVG dom is ready or not, so I cant' perform default actions on the SVG when the html page is loaded.</p> <p>To access the SVG...
[ { "answer_id": 337383, "author": "Mocky", "author_id": 3211, "author_profile": "https://Stackoverflow.com/users/3211", "pm_score": -1, "selected": true, "text": "function checkReady() {\n var svg = document.getElementById(\"chart\").getSVGDocument();\n if (svg == null) {\n s...
2008/12/03
[ "https://Stackoverflow.com/questions/337293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36587/" ]
337,300
<p>We need to validate an user on Microsoft's Active Directory using Delphi 7, what is the best way to do that?</p> <p>We can have two scenarios: the user inputs its network username and password, where the username may include the domain, and we check on active directory if it is a valid, active user. Or we get the c...
[ { "answer_id": 337804, "author": "Mick", "author_id": 12458, "author_profile": "https://Stackoverflow.com/users/12458", "pm_score": 3, "selected": false, "text": " try\n ADSISearch1.Filter := WideString('samaccountname=' + GetUserFromWindows());\n\n try\n ADSISearch1.Search;\...
2008/12/03
[ "https://Stackoverflow.com/questions/337300", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
337,304
<p>Which Eclipse files is it appropriate to put under source control, aside from the sources obviously?</p> <p>In my project, specifically, I'm wondering about:</p> <blockquote> <p>.metadata/*<br> project-dir/.project<br> project-dir/.classpath<br> project-dir/.settings/* </p> </blockquote> <p>If there are ...
[ { "answer_id": 337317, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 8, "selected": true, "text": ".launch" }, { "answer_id": 10884014, "author": "Alex McCarrier", "author_id": 1298438, "author_profile": "ht...
2008/12/03
[ "https://Stackoverflow.com/questions/337304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4893/" ]
337,305
<p>Is it architecturally sound to use Rails and Oracle? My concern is that Oracle would be too "heavy and hi-end" for Rails. Any thoughts? Thanks.</p>
[ { "answer_id": 337470, "author": "Mike Woodhouse", "author_id": 1060, "author_profile": "https://Stackoverflow.com/users/1060", "pm_score": 4, "selected": true, "text": "DATE" } ]
2008/12/03
[ "https://Stackoverflow.com/questions/337305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/430254/" ]
337,330
<p>I'm hopeless at Javascript. This is what I have:</p> <pre><code>&lt;script type="text/javascript"&gt; function beginrefresh(){ //set the id of the target object var marquee = document.getElementById("marquee_text"); if(marquee.scrollLeft &gt;= marquee.scrollWidth - parseInt(marquee.sty...
[ { "answer_id": 26372490, "author": "Stano", "author_id": 1422309, "author_profile": "https://Stackoverflow.com/users/1422309", "pm_score": 3, "selected": false, "text": "window.addEventListener('load', function () {\n function go() {\n i = i < width ? i + step : 1;\n m.style.marginLeft...
2008/12/03
[ "https://Stackoverflow.com/questions/337330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31168/" ]
337,333
<p>I want to insert a new row into an Access database. I'm looking at doing something like: </p> <pre><code>oConnection = new Connection("connectionstring") oTable = oCennection.table("Orders") oRow = oTable.NewRow oRow.field("OrderNo")=21 oRow.field("Customer") = "ABC001" oTable.insert </code></pre> <p>Which seems t...
[ { "answer_id": 337461, "author": "Stefan", "author_id": 19307, "author_profile": "https://Stackoverflow.com/users/19307", "pm_score": 3, "selected": true, "text": "cn = New OleDbConnection(\"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\emp.mdb;\")\ncn.Open()\nstr = \"insert into tabl...
2008/12/03
[ "https://Stackoverflow.com/questions/337333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1726/" ]
337,334
<p>I am trying to send an anonymous object over a web service. Is there anyway I can do this without manually creating a class and casting it to that class? Currently its throwing an exception saying Anonymous object could not be serialized.</p> <pre><code>// Some code has been removed here to simplify the example. [W...
[ { "answer_id": 337366, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 4, "selected": true, "text": "new" }, { "answer_id": 339320, "author": "Shawn", "author_id": 26, "author_profile": "https://Stackov...
2008/12/03
[ "https://Stackoverflow.com/questions/337334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26/" ]
337,352
<p>Is there a way to 'pre-build' a snippet of HTML before adding it to the DOM?</p> <p>For example:</p> <pre><code>$mysnippet.append("&lt;h1&gt;hello&lt;/h1&gt;"); $mysnippet.append("&lt;h1&gt;world&lt;/h1&gt;"); $("destination").append($mysnippet); </code></pre> <p>where <strong>$mysnippet</strong> doesnt exist in ...
[ { "answer_id": 337385, "author": "adam", "author_id": 33604, "author_profile": "https://Stackoverflow.com/users/33604", "pm_score": 6, "selected": true, "text": "$('<div>').attr('id', 'yourid').addClass('yourclass').append().append()...\n" }, { "answer_id": 337387, "author": ...
2008/12/03
[ "https://Stackoverflow.com/questions/337352", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39655/" ]
337,355
<p>I need to bitwise shift a value 64 times in JavaScript. But JavaScript starts rounding after <code>32</code>.</p> <p>For example:</p> <pre><code>for(var j = 0; j &lt; 64; j++) { mask = mask &lt;&lt; 1; console.log(mask); } </code></pre> <p>This prints value from <code>0</code> to <code>1073741824</code> b...
[ { "answer_id": 337572, "author": "itsadok", "author_id": 7581, "author_profile": "https://Stackoverflow.com/users/7581", "pm_score": 6, "selected": true, "text": "for(var j = 0; j < 64; j++) {\n mask = mask * 2;\n console.log(mask);\n}\n" }, { "answer_id": 72466714, "author":...
2008/12/03
[ "https://Stackoverflow.com/questions/337355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42846/" ]
337,389
<p>This should be easy for many of you, but for me it's just another bit of rust needing to be chipped away as I get back into basic Java coding. Using bloody associative arrays for so long in other languages have turned me nice and spoiled. :P</p> <p>My problem is simple: I'm storing a set of objects, each containin...
[ { "answer_id": 337410, "author": "JeeBee", "author_id": 17832, "author_profile": "https://Stackoverflow.com/users/17832", "pm_score": 2, "selected": false, "text": "" }, { "answer_id": 338926, "author": "Duc", "author_id": 335066, "author_profile": "https://Stackoverf...
2008/12/03
[ "https://Stackoverflow.com/questions/337389", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19825/" ]
337,406
<p>In Visual Studio as most of you will have noticed that related file can be collapsed in to one. E.G.</p> <ul> <li>Form1.cs <ul> <li>Form1.Designer.cs</li> </ul></li> </ul> <p>I'm creating a DAL library and will be splitting partial classes in to several files such as:</p> <ul> <li>SomeTableClass.cs <ul> <li>So...
[ { "answer_id": 337458, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 4, "selected": true, "text": "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Projects\\{E24C65DC-7377-472B-9ABA-BC803B73C61A}\\RelatedF...
2008/12/03
[ "https://Stackoverflow.com/questions/337406", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35389/" ]
337,419
<p>What is the best way to ascertain the length (in characters) of the longest element in an array?</p> <p>I need to find the longest element in an array of option values for a select box so that I can set the width dynamically.</p>
[ { "answer_id": 337435, "author": "mat", "author_id": 42083, "author_profile": "https://Stackoverflow.com/users/42083", "pm_score": 1, "selected": false, "text": "fixed width" }, { "answer_id": 337441, "author": "adam", "author_id": 33604, "author_profile": "https://St...
2008/12/03
[ "https://Stackoverflow.com/questions/337419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/69346/" ]
337,422
<p>How to UDP Broadcast with C in Linux?</p>
[ { "answer_id": 337437, "author": "unwind", "author_id": 28169, "author_profile": "https://Stackoverflow.com/users/28169", "pm_score": 2, "selected": false, "text": "sendto()" }, { "answer_id": 337465, "author": "shodanex", "author_id": 11589, "author_profile": "https:...
2008/12/03
[ "https://Stackoverflow.com/questions/337422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1100/" ]
337,431
<p>I've been doing some performance testing around the use of System.Diagnostics.Debug, and it seems that all code related to the static class Debug gets completely removed when the Release configuration is built. I was wondering how the compiler knows that. Maybe there is some class or configuration attribute that all...
[ { "answer_id": 337444, "author": "ZombieSheep", "author_id": 377, "author_profile": "https://Stackoverflow.com/users/377", "pm_score": 2, "selected": false, "text": "#if DEBUG\n //code\n#endif\n" }, { "answer_id": 337462, "author": "Dave R.", "author_id": 42841, "a...
2008/12/03
[ "https://Stackoverflow.com/questions/337431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10688/" ]
337,449
<p>I need to declare an array of pointers to functions like so:</p> <pre><code>extern void function1(void); extern void function2(void); ... void (*MESSAGE_HANDLERS[])(void) = { function1, function2, ... }; </code></pre> <p>However, I want the the array to be declared as constant -- both the data in the arr...
[ { "answer_id": 337477, "author": "unwind", "author_id": 28169, "author_profile": "https://Stackoverflow.com/users/28169", "pm_score": 4, "selected": false, "text": "typedef" }, { "answer_id": 337486, "author": "David Norman", "author_id": 34502, "author_profile": "htt...
2008/12/03
[ "https://Stackoverflow.com/questions/337449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1491/" ]
337,459
<p>In every form we derive from <code>FormBaseControl</code>, we have the following code. I'm sure there is a better way to type the controller object than this, but at the moment we have it included in every page. In the example below, <code>base.Controller</code> is of type <code>BaseController</code>, from which <...
[ { "answer_id": 337495, "author": "Andrew Rollings", "author_id": 40410, "author_profile": "https://Stackoverflow.com/users/40410", "pm_score": 2, "selected": true, "text": " private ExportController MyController\n {\n get { return base.Controller as ExportController; }\n }\n" } ...
2008/12/03
[ "https://Stackoverflow.com/questions/337459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8741/" ]
337,476
<p>I have a <code>ListBox</code> where the number of items is added based on and integer property set by a user. The items are created from a <code>ControlTemplate</code> resource that which is comprised of a Label and a <code>TextBox</code> inside of a <code>DockPanel</code>. The label is not data bound but I would li...
[ { "answer_id": 337495, "author": "Andrew Rollings", "author_id": 40410, "author_profile": "https://Stackoverflow.com/users/40410", "pm_score": 2, "selected": true, "text": " private ExportController MyController\n {\n get { return base.Controller as ExportController; }\n }\n" } ...
2008/12/03
[ "https://Stackoverflow.com/questions/337476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42858/" ]
337,479
<p>MySQL ResultSets are by default retrieved completely from the server before any work can be done. In cases of huge result sets this becomes unusable. I would like instead to actually retrieve the rows one by one from the server.</p> <p>In Java, following the instructions <a href="http://dev.mysql.com/doc/refman/5.1...
[ { "answer_id": 337560, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 3, "selected": false, "text": "row = cursor.fetchone() \nwhile row is not None:\n # process\n row = cursor.fetchone()\n" }, { "answer_id": 3...
2008/12/03
[ "https://Stackoverflow.com/questions/337479", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7581/" ]
337,482
<p>I want to display print dialog in servlet/jsp. Below is my code:</p> <pre><code>DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE; PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet () ; PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras); PrintService defaultService = P...
[ { "answer_id": 341754, "author": "Paul Whelan", "author_id": 3050, "author_profile": "https://Stackoverflow.com/users/3050", "pm_score": 0, "selected": false, "text": "window.print();" } ]
2008/12/03
[ "https://Stackoverflow.com/questions/337482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
337,503
<p>When designing tables, I've developed a habit of having one column that is unique and that I make the primary key. This is achieved in three ways depending on requirements:</p> <ol> <li>Identity integer column that auto increments.</li> <li>Unique identifier (GUID)</li> <li>A short character(x) or integer (or other...
[ { "answer_id": 337716, "author": "Tony Andrews", "author_id": 18747, "author_profile": "https://Stackoverflow.com/users/18747", "pm_score": 7, "selected": false, "text": "state_id state_code state_name\n137 TX Texas\n... ... ...\n249 TX ...
2008/12/03
[ "https://Stackoverflow.com/questions/337503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21807/" ]
337,505
<p>I am trying to develop a way to change a flash file displayed on the screen to another file by clicking a button. I have been able to do this with jpg images, but I can't get it to work with flash files. Can anyone help? I would greatly appreciate it. Below are two html's: the first one changes jpg images and it wor...
[ { "answer_id": 337716, "author": "Tony Andrews", "author_id": 18747, "author_profile": "https://Stackoverflow.com/users/18747", "pm_score": 7, "selected": false, "text": "state_id state_code state_name\n137 TX Texas\n... ... ...\n249 TX ...
2008/12/03
[ "https://Stackoverflow.com/questions/337505", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39973/" ]
337,519
<p>I moved an ex-site based on joomla to wordpress. Import worked fine but the problem is that the old links don't work anymore. Because there is only 50 or so articles, i thought will be a good idea to put a rule for each post (in .htaccess).</p> <p>Well... Not always things are like you want, so redirects dont work ...
[ { "answer_id": 338449, "author": "Ionuț Staicu", "author_id": 23810, "author_profile": "https://Stackoverflow.com/users/23810", "pm_score": 1, "selected": false, "text": "if(isset($_GET['option'])) {\n if(is_numeric($_GET['id'])){\n header ('HTTP/1.1 301 Moved Permanently');\n ...
2008/12/03
[ "https://Stackoverflow.com/questions/337519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23810/" ]
337,522
<p>I'm trying to write a windows batch file that can delete files from subdirectories. I would rather not hard code the directory structure in, so I can use this process with other projects.</p> <ul> <li>I need to delete files of X type,</li> <li>I have the parent folder <code>C:\MyProject</code>,</li> <li>There are ...
[ { "answer_id": 337542, "author": "Pedrin", "author_id": 36183, "author_profile": "https://Stackoverflow.com/users/36183", "pm_score": 6, "selected": true, "text": "c:\ncd MyProject\ndel /S *.type\n" }, { "answer_id": 341244, "author": "Joe Pineda", "author_id": 21258, ...
2008/12/03
[ "https://Stackoverflow.com/questions/337522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34183/" ]
337,570
<p>I'm currently building a project and I would like to make use of some simple javascript - I know some people have it disabled to prevent XSS and other things. Should I...</p> <p>a) Use the simple javascript, those users with it disabled are missing out</p> <p>b) Don't use the simple javascript, users with it enabl...
[ { "answer_id": 337782, "author": "Kent Fredric", "author_id": 15614, "author_profile": "https://Stackoverflow.com/users/15614", "pm_score": 4, "selected": false, "text": ":set sarcasm" } ]
2008/12/03
[ "https://Stackoverflow.com/questions/337570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29595/" ]
337,581
<p>In the case when I want to check, if a certain entry in the database exists I have two options.</p> <p>I can create an sql query using COUNT() and then check, if the result is >0...</p> <p>...or I can just retrieve the record(s) and then count the number of rows in the returned rowset. For example with $result->nu...
[ { "answer_id": 337595, "author": "rebra", "author_id": 2282296, "author_profile": "https://Stackoverflow.com/users/2282296", "pm_score": 2, "selected": false, "text": "SELECT EXISTS ([your query here])\n" }, { "answer_id": 337634, "author": "TravisO", "author_id": 35116, ...
2008/12/03
[ "https://Stackoverflow.com/questions/337581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11995/" ]
337,588
<p>According to <a href="http://www.builderau.com.au/program/perl/soa/Obtain-user-group-and-process-information-in-Perl/0,339028313,339222142,00.htm" rel="nofollow noreferrer">this site</a> I can simply write </p> <pre><code>$user = getlogin(); </code></pre> <p>but the group handling functions seem not to be able to ...
[ { "answer_id": 337640, "author": "fB.", "author_id": 36218, "author_profile": "https://Stackoverflow.com/users/36218", "pm_score": 4, "selected": true, "text": "use strict;\nuse warnings;\n\n# use $< for the real uid and $> for the effective uid\nmy ($user, $passwd, $uid, $gid ) = getpwu...
2008/12/03
[ "https://Stackoverflow.com/questions/337588", "https://Stackoverflow.com", "https://Stackoverflow.com/users/686/" ]
337,598
<p>Ok, bear with me guys and girls as I'm learning. Here's my question.</p> <p>I can't figure out why I can't override a method from a parent class. Here's the code from the base class (yes, I pilfered the java code from an OOP book and am trying to rewrite it in C#).</p> <pre><code>using System; public class Mood...
[ { "answer_id": 337622, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 1, "selected": false, "text": "public class SadObject: MoodyObject\n {\n override String getMood()\n" }, { "answer_id": 337630, ...
2008/12/03
[ "https://Stackoverflow.com/questions/337598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38317/" ]
337,601
<p>Is there a simple process in SQL 2005 for spitting all of my stored procedures out to individual .sql files. I'd like to move them into VSS, but am not too excited by the prospect of clicking on each one to get the source, dumping it into a text file and so on.. </p>
[ { "answer_id": 337619, "author": "TcKs", "author_id": 20382, "author_profile": "https://Stackoverflow.com/users/20382", "pm_score": 3, "selected": false, "text": "select\n O.name, M.definition\nfrom\n sys.objects as O\nleft join\n sys.sql_modules as M\n on O.object_id = M.obj...
2008/12/03
[ "https://Stackoverflow.com/questions/337601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13954/" ]
337,602
<p>I'm trying to search using the windows search one of my web directories for any uses of scriptlets. However, the search seems to be ignoring all files ending in .jsp. I searched for plain words, and that didn't work either. Is there a reason Windows ignores these files when searching?</p>
[ { "answer_id": 337900, "author": "Alex. S.", "author_id": 18300, "author_profile": "https://Stackoverflow.com/users/18300", "pm_score": 2, "selected": false, "text": "findstr /c:bla /s *.jsp" } ]
2008/12/03
[ "https://Stackoverflow.com/questions/337602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23249/" ]
337,620
<p>I'm trying to inverse a matrix with version Boost boost_1_37_0 and MTL mtl4-alpha-1-r6418. I can't seem to locate the matrix inversion code. I've googled for examples and they seem to reference lu.h that seems to be missing in the above release(s). Any hints?</p> <p><a href="https://stackoverflow.com/users/8643/mat...
[ { "answer_id": 337652, "author": "Matt Cruikshank", "author_id": 8643, "author_profile": "https://Stackoverflow.com/users/8643", "pm_score": 3, "selected": true, "text": "lu_factor" }, { "answer_id": 12725876, "author": "Szymon Wygnański", "author_id": 582704, "author...
2008/12/03
[ "https://Stackoverflow.com/questions/337620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3225/" ]
337,631
<p>Say I have a bitmap image, is it possible to iterate through all the individual bytes in the image? If yes, how?</p>
[ { "answer_id": 337651, "author": "Filip Ekberg", "author_id": 39106, "author_profile": "https://Stackoverflow.com/users/39106", "pm_score": 3, "selected": false, "text": "System.Drawing.Bitmap bmp = GetTheBitmap();\nSystem.IO.MemoryStream stream = new System.IO.MemoryStream();\nbmp.Save(...
2008/12/03
[ "https://Stackoverflow.com/questions/337631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39677/" ]
337,649
<p>I'm building a <a href="https://en.wikipedia.org/wiki/Windows_Forms" rel="nofollow noreferrer">Windows Forms</a> form in C# with various elements in a panel that starts out either invisible, disabled, or set to null (labels, combo boxes, grids, etc.). As the user goes through and makes choices, these elements are po...
[ { "answer_id": 337685, "author": "TcKs", "author_id": 20382, "author_profile": "https://Stackoverflow.com/users/20382", "pm_score": 3, "selected": true, "text": "Panel CreatePanelWithDynamicControls() {\n Panel ret = new Panel();\n ret.Dock = DockStyle.Fill;\n // Some logic, whi...
2008/12/03
[ "https://Stackoverflow.com/questions/337649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28939/" ]
337,656
<p>I set up a simple event handler as mentioned <a href="https://stackoverflow.com/questions/49510/how-do-you-set-your-cocoa-application-as-the-default-web-browser">here</a>, but it appears that the selector isn't called. I put the code in my AppDelegate class and wired up the delegate in IB. Tried putting in some NSLo...
[ { "answer_id": 339405, "author": "jxpx777", "author_id": 34386, "author_profile": "https://Stackoverflow.com/users/34386", "pm_score": 0, "selected": false, "text": "- (void)init{\n self = [super init];\n if(self){\n [[NSAppleEventManager sharedAppleEventManager] setEventHan...
2008/12/03
[ "https://Stackoverflow.com/questions/337656", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34386/" ]
337,664
<p>I'm designing an algorithm to do the following: Given array <code>A[1... n]</code>, for every <code>i &lt; j</code>, find all inversion pairs such that <code>A[i] &gt; A[j]</code>. I'm using merge sort and copying array A to array B and then comparing the two arrays, but I'm having a difficult time seeing how I can ...
[ { "answer_id": 337773, "author": "mbillard", "author_id": 810, "author_profile": "https://Stackoverflow.com/users/810", "pm_score": 1, "selected": false, "text": "int counter = 0;\n\nfor(int i = 0; i < n - 1; i++)\n{\n for(int j = i+1; j < n; j++)\n {\n if( A[i] > A[j] )\n ...
2008/12/03
[ "https://Stackoverflow.com/questions/337664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27884/" ]
337,688
<p>Does python have the ability to create dynamic keywords?</p> <p>For example:</p> <pre><code>qset.filter(min_price__usd__range=(min_price, max_price)) </code></pre> <p>I want to be able to change the <strong>usd</strong> part based on a selected currency.</p>
[ { "answer_id": 337714, "author": "jfs", "author_id": 4279, "author_profile": "https://Stackoverflow.com/users/4279", "pm_score": 7, "selected": true, "text": "**kwargs" }, { "answer_id": 337727, "author": "Community", "author_id": -1, "author_profile": "https://Stacko...
2008/12/03
[ "https://Stackoverflow.com/questions/337688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42876/" ]
337,691
<p>I'm attempting to find the best methodology for finding a specific pattern and then replace the ending portion of the pattern. Here is a quick example (in C#):</p> <p>//Find any year value starting with a bracket or underscore</p> <pre><code>string patternToFind = "[[_]2007"; Regex yearFind = new Regex(patternT...
[ { "answer_id": 337709, "author": "annakata", "author_id": 13018, "author_profile": "https://Stackoverflow.com/users/13018", "pm_score": 3, "selected": false, "text": "\\[|_" }, { "answer_id": 337736, "author": "ConcernedOfTunbridgeWells", "author_id": 15401, "author_p...
2008/12/03
[ "https://Stackoverflow.com/questions/337691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
337,694
<p>On a page I want to dynamically list years and all the months in each year so an archive for each month can be viewed. I want to show the current year first but the current year may not be over yet so I only want to show the months that have passed, and the current month. Then I want all years and all months in the ...
[ { "answer_id": 337712, "author": "Filip Ekberg", "author_id": 39106, "author_profile": "https://Stackoverflow.com/users/39106", "pm_score": 0, "selected": false, "text": " -> Get current Year\n\n -> Loop the current year untill the current month is reached\n\n -> Print Month\n" }...
2008/12/03
[ "https://Stackoverflow.com/questions/337694", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2183/" ]
337,702
<p>I wonder how can I write a <strong><em>catch'em all</em></strong> exception handler in the application level which will give the user the option to resume the application flow?</p>
[ { "answer_id": 337761, "author": "Vincent Van Den Berghe", "author_id": 39259, "author_profile": "https://Stackoverflow.com/users/39259", "pm_score": 5, "selected": false, "text": "Application.ThreadException" }, { "answer_id": 337847, "author": "Hallgrim", "author_id": 1...
2008/12/03
[ "https://Stackoverflow.com/questions/337702", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
337,704
<p>How do I parameterize a query containing an <code>IN</code> clause with a variable number of arguments, like this one?</p> <pre><code>SELECT * FROM Tags WHERE Name IN ('ruby','rails','scruffy','rubyonrails') ORDER BY Count DESC </code></pre> <p>In this query, the number of arguments could be anywhere from 1 to 5....
[ { "answer_id": 337752, "author": "David Basarab", "author_id": 2469, "author_profile": "https://Stackoverflow.com/users/2469", "pm_score": 7, "selected": false, "text": "DECLARE @tags\n\nSET @tags = ‘ruby|rails|scruffy|rubyonrails’\n\nselect * from Tags \nwhere Name in (SELECT item from ...
2008/12/03
[ "https://Stackoverflow.com/questions/337704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1/" ]
337,713
<p>I'm developing an ASP.NET 2.0 application that includes Crystal Reports (version 10, included with VS 2005). Originally, the reports were working properly, both when run from my machine using the ASP.NET development web server, and also when deployed to an IIS server.</p> <p>I made some changes to the reports and ...
[ { "answer_id": 337752, "author": "David Basarab", "author_id": 2469, "author_profile": "https://Stackoverflow.com/users/2469", "pm_score": 7, "selected": false, "text": "DECLARE @tags\n\nSET @tags = ‘ruby|rails|scruffy|rubyonrails’\n\nselect * from Tags \nwhere Name in (SELECT item from ...
2008/12/03
[ "https://Stackoverflow.com/questions/337713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17777/" ]
337,729
<p>I was thinking of centralizing this functionality by having a single method that gets passed an AppState argument and it deals with changing the properties of all GUI elements based on this argument. Every time the app changes its state (ready, busy, downloading so partially busy, etc), this function is called with ...
[ { "answer_id": 337820, "author": "Stefan", "author_id": 19307, "author_profile": "https://Stackoverflow.com/users/19307", "pm_score": 0, "selected": false, "text": "Sub UIControlStates_StateChanged(sender as object, e as UIControlStateArgs)\n if e.Oldstate=UIControlStates.Edit and e.Ne...
2008/12/03
[ "https://Stackoverflow.com/questions/337729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30581/" ]
337,732
<p>I am looking to persistently display a game score in an iPhone app using cocos2d. Going off the code that cocos2d shows the FPS the app is running at:</p> <pre><code>-(void) showFPS { frames++; accumDt += dt; if ( accumDt &gt; 0.1) { frameRate = frames/accumDt; frames = 0; acc...
[ { "answer_id": 339276, "author": "user21293", "author_id": 21293, "author_profile": "https://Stackoverflow.com/users/21293", "pm_score": 3, "selected": false, "text": "scoreLabel = [Label labelWithString: [NSString stringWithFormat:@\"%d\", score] dimensions: CGSizeMake(180, 20) alignmen...
2008/12/03
[ "https://Stackoverflow.com/questions/337732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21293/" ]
337,734
<p>Is it possible to merge elements using XSLT.</p> <p>If I have the following XML</p> <pre><code>&lt;data&gt; &lt;item column="left" value="1" /&gt; &lt;item column="left" value="2" /&gt; &lt;item column="right" value="3" /&gt; &lt;item column="left" value="4" /&gt; &lt;item column="right" value="5" /&gt; &lt;item c...
[ { "answer_id": 337800, "author": "dacracot", "author_id": 13930, "author_profile": "https://Stackoverflow.com/users/13930", "pm_score": -1, "selected": false, "text": "<xsl:element name=\"item\">\n <xsl:attribute name=\"left\"><xsl:value-of select=\"$theLeft\"/></xsl:attribute>\n <...
2008/12/03
[ "https://Stackoverflow.com/questions/337734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/274/" ]
337,737
<p>I'm using PUT and DELETE more and more w/ my ajax work and wanted to see if it would be a "bad idea" to add these verbs to the .aspx application extension in IIS.</p>
[ { "answer_id": 337800, "author": "dacracot", "author_id": 13930, "author_profile": "https://Stackoverflow.com/users/13930", "pm_score": -1, "selected": false, "text": "<xsl:element name=\"item\">\n <xsl:attribute name=\"left\"><xsl:value-of select=\"$theLeft\"/></xsl:attribute>\n <...
2008/12/03
[ "https://Stackoverflow.com/questions/337737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2701/" ]
337,739
<p>In rails I want to log some information in a different log file and not the standard development.log or production.log. I want to do this logging from a model class.</p>
[ { "answer_id": 337971, "author": "Thiago Arrais", "author_id": 17801, "author_profile": "https://Stackoverflow.com/users/17801", "pm_score": 9, "selected": true, "text": "logger" }, { "answer_id": 809957, "author": "Tony", "author_id": 45849, "author_profile": "https:...
2008/12/03
[ "https://Stackoverflow.com/questions/337739", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29653/" ]
337,760
<p>I am trying to create an array starting with today and going back the last 30 days with PHP and I am having trouble. I can estimate but I don’t know a good way of doing it and taking into account the number of days in the previous month etc. Does anyone have a good solution? I can’t get close but I need to make su...
[ { "answer_id": 337794, "author": "ThoKra", "author_id": 38254, "author_profile": "https://Stackoverflow.com/users/38254", "pm_score": 5, "selected": false, "text": "<?php \n$d = array();\nfor($i = 0; $i < 30; $i++) \n $d[] = date(\"d\", strtotime('-'. $i .' days'));\n?>\n" }, {...
2008/12/03
[ "https://Stackoverflow.com/questions/337760", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
337,766
<p>Due to the way my serverside script outputs I receive multiple JSON objects. <code>{jsonhere}{jsonhere1}{jsonhere2}{jsonhere3} etc..</code> They aren't seperated by anything. If I would do a split based <code>}{</code> I would lose those brackets. So is there an outerloop I can put over the regular <code>$.each</cod...
[ { "answer_id": 337882, "author": "Matthew Crumley", "author_id": 2214, "author_profile": "https://Stackoverflow.com/users/2214", "pm_score": 0, "selected": false, "text": "{\"foo\": \"}{\", \"bar\": 42}\n" }, { "answer_id": 337998, "author": "EndangeredMassa", "author_id"...
2008/12/03
[ "https://Stackoverflow.com/questions/337766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
337,769
<p>I use the following statement prepared and bound in ODBC:</p> <pre><code>SELECT (CASE profile WHEN ? THEN 1 ELSE 2 END) AS profile_order FROM engine_properties; </code></pre> <p>Executed in an ODBC 3.0 connection to an Oracle 10g database in AL32UTF8 charset, even after binding to a wchar_t string using <code>SQL...
[ { "answer_id": 337882, "author": "Matthew Crumley", "author_id": 2214, "author_profile": "https://Stackoverflow.com/users/2214", "pm_score": 0, "selected": false, "text": "{\"foo\": \"}{\", \"bar\": 42}\n" }, { "answer_id": 337998, "author": "EndangeredMassa", "author_id"...
2008/12/03
[ "https://Stackoverflow.com/questions/337769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31423/" ]
337,781
<p>In ASP.NET, the tilde (~) is treated as a token in URLs and treats paths prefixed with that as relative to the application root. This is well-known functionality.</p> <p>In MOSS, there are other tokens, such as ~sitecollection/mypath... which behaves in a similar way, but treats the path as relative to the site col...
[ { "answer_id": 436582, "author": "dahlbyk", "author_id": 54249, "author_profile": "https://Stackoverflow.com/users/54249", "pm_score": 4, "selected": true, "text": "<link runat=\"server\" rel=\"stylesheet\" type=\"text/css\"\n href=\"<% $SPUrl:~SiteCollection/Style Library/MyStyles/...
2008/12/03
[ "https://Stackoverflow.com/questions/337781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/67/" ]
337,784
<p>I have created a mutli-column combobox in VB.net 2008 using windows forms 2.0. I am having trouble accessing data once selected to use in the remainder of the form. There does not seem to be a selected event to use in conjunction with the winform 2.0 combobox.</p> <p>Does anyone have any experience using winforms 2...
[ { "answer_id": 436582, "author": "dahlbyk", "author_id": 54249, "author_profile": "https://Stackoverflow.com/users/54249", "pm_score": 4, "selected": true, "text": "<link runat=\"server\" rel=\"stylesheet\" type=\"text/css\"\n href=\"<% $SPUrl:~SiteCollection/Style Library/MyStyles/...
2008/12/03
[ "https://Stackoverflow.com/questions/337784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5578/" ]
337,789
<p>I have at my SQL Server 2000 Database a column with type <strong>Image</strong>. How can I map it into NHibernate?</p>
[ { "answer_id": 22835673, "author": "Abhijit_Srikumar", "author_id": 3446197, "author_profile": "https://Stackoverflow.com/users/3446197", "pm_score": 1, "selected": false, "text": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<hibernate-mapping xmlns=\"urn:nhibernate-ma...
2008/12/03
[ "https://Stackoverflow.com/questions/337789", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21668/" ]
337,793
<p>The log file from a JVM crash contains all sorts of useful information for debugging, such as shared libraries loaded and the complete environment. Can I force the JVM to generate one of these programmatically; either by executing code that crashes it or some other way? Or alternatively access the same information a...
[ { "answer_id": 67457102, "author": "gmode", "author_id": 3349358, "author_profile": "https://Stackoverflow.com/users/3349358", "pm_score": 1, "selected": false, "text": "kill -4 <PID>\n" } ]
2008/12/03
[ "https://Stackoverflow.com/questions/337793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19276/" ]
337,797
<p>When we use datatable.newrow command, a new empty row added to bottom of rows. However I want newrow to added to top of datatable. How can I make it?</p>
[ { "answer_id": 337818, "author": "Nick DeVore", "author_id": 1380, "author_profile": "https://Stackoverflow.com/users/1380", "pm_score": 7, "selected": true, "text": "myDataTable.Rows.InsertAt(myDataRow, 0);\n" }, { "answer_id": 3309475, "author": "Ksamy", "author_id": 39...
2008/12/03
[ "https://Stackoverflow.com/questions/337797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/439507/" ]
337,803
<p>I have a ComponentResourceKey defined in my resource dictionary like this:</p> <pre><code>&lt;Style x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type local:Resources}, ResourceId=BaseControlStyle}" TargetType="{x:Type FrameworkElement}"&gt; &lt;Setter Property="Margin" Value="4,4,0,0" /&gt; &lt;/Style&g...
[ { "answer_id": 337838, "author": "Micah", "author_id": 17744, "author_profile": "https://Stackoverflow.com/users/17744", "pm_score": 3, "selected": true, "text": "myTextBox.Style = \n Application.Current.TryFindResource(Resources.BaseControlStyleKey)\n as Style;\n" }, {...
2008/12/03
[ "https://Stackoverflow.com/questions/337803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17744/" ]
337,853
<p>We have a lot of unit tests but they aren't run every night. I have setup some batch files that compile all the code from the SVN repository and I would like to run NUnit. This is not a big problem because I can call it from the batch file after the compilation BUT the output is stored in the network drive and I nee...
[ { "answer_id": 337983, "author": "Martin Brown", "author_id": 20553, "author_profile": "https://Stackoverflow.com/users/20553", "pm_score": 0, "selected": false, "text": "type NUnitLogFile.txt>>tmp.txt\n" } ]
2008/12/03
[ "https://Stackoverflow.com/questions/337853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13913/" ]