qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
212,271
<p>A person uses their cell phone multiple times per day, and the length of their calls vary. I am tracking the length of the calls in a table:</p> <pre><code>Calls [callID, memberID, startTime, duration] </code></pre> <p>I need to a query to return the average call length for users <strong>per day</strong>. Per day ...
[ { "answer_id": 212284, "author": "matt b", "author_id": 4249, "author_profile": "https://Stackoverflow.com/users/4249", "pm_score": 0, "selected": false, "text": "select average(duration) from calls group by date(startTime);\n" }, { "answer_id": 212285, "author": "Tomalak", ...
2008/10/17
[ "https://Stackoverflow.com/questions/212271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
212,321
<p>Anyone know a simple way using Java calendar to subtract X days from a date?</p> <p>I have not been able to find any function which allows me to directly subtract X days from a date in Java. Can someone point me to the right direction?</p>
[ { "answer_id": 212334, "author": "Anson Smith", "author_id": 28685, "author_profile": "https://Stackoverflow.com/users/28685", "pm_score": 9, "selected": true, "text": "Calendar calendar = Calendar.getInstance(); // this would default to now\ncalendar.add(Calendar.DAY_OF_MONTH, -5).\n" ...
2008/10/17
[ "https://Stackoverflow.com/questions/212321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26004/" ]
212,350
<p>The <code>JPA</code> (Java Persistence API) specification has 2 different ways to specify entity composite keys: <code>@IdClass</code> and <code>@EmbeddedId</code>. </p> <p>I'm using both annotations on my mapped entities, but it turns out to be a big mess to people who aren't very familiar with <code>JPA</code>. <...
[ { "answer_id": 212371, "author": "Jorge Ferreira", "author_id": 6508, "author_profile": "https://Stackoverflow.com/users/6508", "pm_score": 8, "selected": true, "text": "@EmbeddedId @IdClass @EmbeddedId @Embeddable class EmployeeId { name, dataOfBirth }\n@Entity class Employee {\n @Embe...
2008/10/17
[ "https://Stackoverflow.com/questions/212350", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28921/" ]
212,358
<p>Is there a library function that performs binary search on a list/tuple and return the position of the item if found and 'False' (-1, None, etc.) if not?</p> <p>I found the functions bisect_left/right in the <a href="http://docs.python.org/library/bisect.html" rel="noreferrer">bisect module</a>, but they still retu...
[ { "answer_id": 212413, "author": "Moe", "author_id": 3051, "author_profile": "https://Stackoverflow.com/users/3051", "pm_score": 6, "selected": false, "text": "def binary_search(a, x, lo=0, hi=None):\n if hi is None:\n hi = len(a)\n while lo < hi:\n mid = (lo+hi)//2\n...
2008/10/17
[ "https://Stackoverflow.com/questions/212358", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15682/" ]
212,378
<p>I have an embedded webserver that has a total of 2 Megs of space on it. Normally you gzip files for the clients benefit, but this would save us space on the server. I read that you can just gzip the js file and save it on the server. I tested that on IIS and I didn't have any luck at all. What exactly do I need ...
[ { "answer_id": 212684, "author": "Pat", "author_id": 238, "author_profile": "https://Stackoverflow.com/users/238", "pm_score": 4, "selected": true, "text": "Content-Encoding: gzip\n Accept-Encoding: gzip\n" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212378", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12448/" ]
212,381
<p>I am trying to create a multi dimensional array using this syntax:</p> <pre><code>$x[1] = 'parent'; $x[1][] = 'child'; </code></pre> <p>I get the error: <code>[] operator not supported for strings</code> because it is evaluating the <code>$x[1]</code> as a string as opposed to returning the array so I can append ...
[ { "answer_id": 212396, "author": "Marius", "author_id": 1585, "author_profile": "https://Stackoverflow.com/users/1585", "pm_score": 3, "selected": false, "text": "$x = array();\n$x[1] = array();\n$x[1][] = 'child';\n" }, { "answer_id": 212399, "author": "Oli", "author_id"...
2008/10/17
[ "https://Stackoverflow.com/questions/212381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
212,401
<p>From Wikipedia, the free encyclopedia: <strong>Closure (computer science)</strong></p> <blockquote> <p>In computer science, a closure is a function that is evaluated in an environment containing one or more bound variables. When called, the function can access these variables. The explicit use of closur...
[ { "answer_id": 212431, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": true, "text": "function SetClassOnHover(className){\n $(\"td\").hover(\n function () {\n $(this).addClass(className);\n },\n fu...
2008/10/17
[ "https://Stackoverflow.com/questions/212401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
212,407
<p>Is the singleton class in Ruby a class in and of itself? Is it the reason why all objects belong to "class?" The concept is <strong>fuzzy</strong>, but I believe it has something to do with why I can define a class method at all (<code>class foo; def foo.bar ...</code>).</p> <p>What is the singleton class in Ruby?<...
[ { "answer_id": 213177, "author": "Pistos", "author_id": 28558, "author_profile": "https://Stackoverflow.com/users/28558", "pm_score": 8, "selected": true, "text": "irb(main):001:0> class Foo; def method1; puts 1; end; end\n=> nil\nirb(main):002:0> foo = Foo.new\n=> #<Foo:0xb79fa724>\nirb...
2008/10/17
[ "https://Stackoverflow.com/questions/212407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28914/" ]
212,425
<p>How can I go about making my routes recognise an optional prefix parameter as follows:</p> <pre><code>/*lang/controller/id </code></pre> <p>In that the lang part is optional, and has a default value if it's not specified in the URL:</p> <pre><code>/en/posts/1 =&gt; lang = en /fr/posts/1 =&gt; lang = fr /posts...
[ { "answer_id": 212895, "author": "Mike Woodhouse", "author_id": 1060, "author_profile": "https://Stackoverflow.com/users/1060", "pm_score": 1, "selected": false, "text": "map.connect ':language/posts/:id', :controller => 'posts', :action => 'show'\nmap.connect 'posts/:id', :controller =>...
2008/10/17
[ "https://Stackoverflow.com/questions/212425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12037/" ]
212,429
<p>Scenario:</p> <p>I'm currently writing a layer to abstract 3 similar webservices into one useable class. Each webservice exposes a set of objects that share commonality. I have created a set of intermediary objects which exploit the commonality. However in my layer I need to convert between the web service objects ...
[ { "answer_id": 212443, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 3, "selected": false, "text": "Property[] props = Array.ConvertAll(source, prop => (Property)prop);\n Property[] props = Array.ConvertAll<object,Pr...
2008/10/17
[ "https://Stackoverflow.com/questions/212429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4950/" ]
212,434
<p>As the title states, is there a way to prevent extra elements from showing up in VBA dynamic arrays when they are non-zero based? </p> <p>For example, when using code similar to the following:</p> <pre><code>While Cells(ndx, 1).Value &lt;&gt; vbNullString ReDim Preserve data(1 To (UBound(data) + 1)) ndx = ...
[ { "answer_id": 212497, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 1, "selected": false, "text": "Option Base UBound() + 1 ReDim Preserve For Each ... In ... ' creation ' \nDim anyValue as Variant\nDim c as New Collectio...
2008/10/17
[ "https://Stackoverflow.com/questions/212434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1185/" ]
212,442
<p>I want to do something very simple in C++ but i can't find how. I want to create a function like a for loop where i will ideally enter a variable for the times the iteration should happen and some functions inside brackets my function will execute. I hope i was clear enough. Thanks...</p> <p>Example</p> <pre><code...
[ { "answer_id": 212460, "author": "FOR", "author_id": 27826, "author_profile": "https://Stackoverflow.com/users/27826", "pm_score": 0, "selected": false, "text": "void DoSomethingRepeatedly(int numTimesTo Loop)\n{\n for(int i=0; i<numTimesToLoop; i++)\n { \n //do whatever; \n ...
2008/10/17
[ "https://Stackoverflow.com/questions/212442", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28954/" ]
212,446
<p>I need to return only the facet counts from solr. So I basically want to search over all documents and return the facet counts, but I don't want to return any search results. Is this possible?</p> <p>Thanks</p>
[ { "answer_id": 2740207, "author": "nialloc", "author_id": 187419, "author_profile": "https://Stackoverflow.com/users/187419", "pm_score": 7, "selected": true, "text": "facet=true rows=0 numFound" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/93743/" ]
212,466
<p>What does the &quot;bus error&quot; message mean, and how does it differ from a <a href="https://en.wikipedia.org/wiki/Segmentation_fault" rel="noreferrer">segmentation fault</a>?</p>
[ { "answer_id": 212519, "author": "unwind", "author_id": 28169, "author_profile": "https://Stackoverflow.com/users/28169", "pm_score": 3, "selected": false, "text": "unsigned char data[6];\n(unsigned int *) (data + 2) = 0xdeadf00d;\n 0xdeadf00d" }, { "answer_id": 11203800, "au...
2008/10/17
[ "https://Stackoverflow.com/questions/212466", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7598/" ]
212,481
<p>I have a header file like this:</p> <pre><code>#ifndef __GEN_NOTE_MARKERS_TO_DEVELOPERS_HPP__ #define __GEN_NOTE_MARKERS_TO_DEVELOPERS_HPP__ #ifdef _DEBUG // macros for turning a number into a string #define STRING2(x) #x #define STRING(x) STRING2(x) #ifdef TRIAGE_MESG_AS_WARNING #defin...
[ { "answer_id": 888396, "author": "ChrisBD", "author_id": 102238, "author_profile": "https://Stackoverflow.com/users/102238", "pm_score": 2, "selected": false, "text": "//Get the \"Error List Window\"\n\nErrorListProvider errorProvider = new ErrorListProvider(this);\nTask newError = new T...
2008/10/17
[ "https://Stackoverflow.com/questions/212481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28950/" ]
212,492
<p>I've worked with a couple of Visual C++ compilers (VC97, VC2005, VC2008) and I haven't really found a clearcut way of adding external libraries to my builds. I come from a Java background, and in Java libraries are everything! </p> <p>I understand from compiling open-source projects on my Linux box that all the s...
[ { "answer_id": 213204, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 4, "selected": false, "text": "include lib bin" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18149/" ]
212,494
<p>I use an XML file in App_Data in conjunction with a Repeater on the main page of an intranet application allow me to display messages to users when they logon about application status, maintenance, etc. To test the functionality, it would be nice to have the file in the App_Data folder under development, but if I d...
[ { "answer_id": 248958, "author": "Andrew Theken", "author_id": 32238, "author_profile": "https://Stackoverflow.com/users/32238", "pm_score": 1, "selected": false, "text": "Stream xml;\n#if DEBUG\nxml = File.Open(\"debug.xml\");\n#else\nxml = File.Open(\"release.xml\");\n#endif\n" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212494", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12950/" ]
212,510
<p>Currently I'm writing it in clear text <em>oops!</em>, it's an in house program so it's not that bad but I'd like to do it right. How should I go about encrypting this when writing to the registry and how do I decrypt it?</p> <pre><code>OurKey.SetValue("Password", textBoxPassword.Text); </code></pre>
[ { "answer_id": 212526, "author": "Oli", "author_id": 12870, "author_profile": "https://Stackoverflow.com/users/12870", "pm_score": 7, "selected": false, "text": "byte[] data = System.Text.Encoding.ASCII.GetBytes(inputString);\ndata = new System.Security.Cryptography.SHA256Managed().Compu...
2008/10/17
[ "https://Stackoverflow.com/questions/212510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
212,528
<p>This Question is almost the same as the previously asked <a href="https://stackoverflow.com/questions/122208/get-the-ip-address-of-local-computer">How can I get the IP Address of a local computer?</a> -Question. However I need to find the IP address(es) of a <strong>Linux Machine</strong>.</p> <p>So: How do I - prog...
[ { "answer_id": 212688, "author": "Steve Baker", "author_id": 13566, "author_profile": "https://Stackoverflow.com/users/13566", "pm_score": 5, "selected": false, "text": "ioctl(<socketfd>, SIOCGIFCONF, (struct ifconf)&buffer); /usr/include/linux/if.h ifconf ifreq /usr/include/linux/sockio...
2008/10/17
[ "https://Stackoverflow.com/questions/212528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/999/" ]
212,534
<p>I use a custom-built asp.net control that renders to a DIV and has "height='0'" hard-coded into the element (I know.. stupid). But I need to reset it - get rid of the height assignment somehow. Is this doable with CSS?</p> <p>I can set the height to 100px for example, and it works. But that's not what I want - I...
[ { "answer_id": 212635, "author": "Oli", "author_id": 12870, "author_profile": "https://Stackoverflow.com/users/12870", "pm_score": 7, "selected": true, "text": "height:auto !important" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22303/" ]
212,539
<p>Is there a Java equivalent to .NET's App.Config?</p> <p>If not is there a standard way to keep you application settings, so that they can be changed after an app has been distributed?</p>
[ { "answer_id": 212605, "author": "Powerlord", "author_id": 15880, "author_profile": "https://Stackoverflow.com/users/15880", "pm_score": 5, "selected": true, "text": "userNodeForPackage(ClassName.class) systemNodeForPackage(ClassName.class)" }, { "answer_id": 19040876, "autho...
2008/10/17
[ "https://Stackoverflow.com/questions/212539", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20400/" ]
212,550
<p>The problem is in the title - IE is misbehaving and is saying that there is a script running slowly - FF and Chrome don't have this problem.</p> <p>How can I find the problem . .there's a lot of JS on that page. Checking by hand is not a good ideea</p> <p><strong>EDIT :</strong> It's a page from a project i'm work...
[ { "answer_id": 9475927, "author": "dude_id", "author_id": 1236988, "author_profile": "https://Stackoverflow.com/users/1236988", "pm_score": 1, "selected": false, "text": "Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(win_onload);\n win_onload()" }, { "answer_id": 2...
2008/10/17
[ "https://Stackoverflow.com/questions/212550", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5246/" ]
212,562
<p>Is there a good way to have a <code>Map&lt;String, ?&gt;</code> get and put ignoring case?</p>
[ { "answer_id": 212629, "author": "Guido", "author_id": 12388, "author_profile": "https://Stackoverflow.com/users/12388", "pm_score": 5, "selected": false, "text": "public class CaseInsensitiveMap extends HashMap<String, String> {\n ...\n put(String key, String value) {\n supe...
2008/10/17
[ "https://Stackoverflow.com/questions/212562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6013/" ]
212,569
<p>I'm using Spring's support for JDBC. I'd like to use <a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/jdbc/core/JdbcTemplate.html" rel="noreferrer">JdbcTemplate</a> (or SimpleJdbcTemplate) to execute a query and obtain the result as an instance of ResultSet.</p> <p>The only way t...
[ { "answer_id": 212632, "author": "Miguel Ping", "author_id": 22992, "author_profile": "https://Stackoverflow.com/users/22992", "pm_score": 3, "selected": true, "text": " Connection c = ...\n c.prepareCall(\"select ...\").getResultSet();\n" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2648/" ]
212,577
<p>At the moment, I'm creating an XML file in Java and displaying it in a JSP page by transforming it with XSL/XSLT. Now I need to take that XML file and display the same information in a PDF. Is there a way I can do this by using some kind of XSL file?</p> <p>I've seen the <a href="http://www.lowagie.com/iText/" rel=...
[ { "answer_id": 9477362, "author": "Shriram Kalpathy Mohan", "author_id": 898726, "author_profile": "https://Stackoverflow.com/users/898726", "pm_score": 0, "selected": false, "text": "'Section 9.4.2 Parsing XML' 'iText in Action : Edition 2' '15.2.3 Adding structure' 'iText in Action : E...
2008/10/17
[ "https://Stackoverflow.com/questions/212577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21709/" ]
212,587
<p>I’m having an issue where a drop down list in IE 6/7 is behaving as such:</p> <p><img src="https://i488.photobucket.com/albums/rr249/djfloetic/ie7.jpg" alt="alt text"></p> <p>You can see that the drop down <code>width</code> is not wide enough to display the whole text without expanding the overall drop down list....
[ { "answer_id": 212637, "author": "azamsharp", "author_id": 3797, "author_profile": "https://Stackoverflow.com/users/3797", "pm_score": -1, "selected": false, "text": "private void BindData()\n {\n List<Foo> list = new List<Foo>();\n list.Add(new Foo(\"Hello\"...
2008/10/17
[ "https://Stackoverflow.com/questions/212587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5853/" ]
212,596
<p>I'm currently doing some GUI testing on a ASP.net 2.0 application. The RDBMS is SQL Server 2005. The host is Win Server 2003 / IIS 6.0.</p> <p>I do not have the source code of the application because it was programmed by an external company who's not releasing the code.</p> <p>I've noticed that the application pe...
[ { "answer_id": 12428235, "author": "user1617425", "author_id": 1617425, "author_profile": "https://Stackoverflow.com/users/1617425", "pm_score": 6, "selected": false, "text": "SELECT S.spid, login_time, last_batch, status, hostname, program_name, cmd,\n(\n select text from sys.dm_ex...
2008/10/17
[ "https://Stackoverflow.com/questions/212596", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2046272/" ]
212,603
<p>I'm trying to write some SQL that will delete files of type '.7z' that are older than 7 days.</p> <p>Here's what I've got that's not working:</p> <pre><code>DECLARE @DateString CHAR(8) SET @DateString = CONVERT(CHAR(8), DATEADD(d, -7, GETDATE()), 1) EXECUTE master.dbo.xp_delete_file 0, N'e:\Databa...
[ { "answer_id": 212757, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 0, "selected": false, "text": "xp_delete_file" }, { "answer_id": 212834, "author": "Jorge Ferreira", "author_id": 6508, "author_profi...
2008/10/17
[ "https://Stackoverflow.com/questions/212603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6624/" ]
212,604
<p>I have a function that is effectively a replacement for print, and I want to call it without parentheses, just like calling print.</p> <pre><code># Replace print $foo, $bar, "\n"; # with myprint $foo, $bar, "\n"; </code></pre> <p>In Perl, you can create subroutines with parameter templates and it allows exactly t...
[ { "answer_id": 5452710, "author": "Marcelo", "author_id": 679386, "author_profile": "https://Stackoverflow.com/users/679386", "pm_score": 2, "selected": false, "text": "echoh \"hello\";\n 'hello<br>\\n'.\n <?php\nconst PHP_BR_EOL = \"<br>\\n\";\necho \"Hello\" . PHP_BR_EOL;\n?>\n Hello<b...
2008/10/17
[ "https://Stackoverflow.com/questions/212604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8454/" ]
212,614
<p>Should a method that implements an interface method be annotated with <code>@Override</code>?</p> <p>The <a href="http://java.sun.com/javase/6/docs/api/java/lang/Override.html" rel="noreferrer">javadoc of the <code>Override</code> annotation</a> says: </p> <blockquote> <p>Indicates that a method declaration is i...
[ { "answer_id": 212624, "author": "jjnguy", "author_id": 2598, "author_profile": "https://Stackoverflow.com/users/2598", "pm_score": 9, "selected": true, "text": "class C {\n @Override\n public boolean equals(SomeClass obj){\n // code ...\n }\n}\n public boolean equals(Obj...
2008/10/17
[ "https://Stackoverflow.com/questions/212614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3565/" ]
212,645
<p>I have found an interesting issue in windows which allows me to cause the Windows clock (but not the hardware clocks) to run fast - as much as 8 seconds every minute. I am doing some background research to work out how Windows calculates and updates it's internal time (not how it syncs with an NTP servers). Any info...
[ { "answer_id": 214347, "author": "bk1e", "author_id": 8090, "author_profile": "https://Stackoverflow.com/users/8090", "pm_score": 2, "selected": false, "text": "_ftime() _ftime() %ProgramFiles%\\Microsoft Visual Studio <version>\\VC\\crt\\src\\ftime.c ftime64.c" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18664/" ]
212,657
<p>Within a stored procedure, another stored procedure is being called within a cursor. For every call, the SQL Management Studio results window is showing a result. The cursor loops over 100 times and at that point the results window gives up with an error. Is there a way I can stop the stored procedure within the cur...
[ { "answer_id": 212670, "author": "Adam", "author_id": 13320, "author_profile": "https://Stackoverflow.com/users/13320", "pm_score": 0, "selected": false, "text": "SET ROWCOUNT OFF\n/* the internal SP */\nSET ROWCOUNT ON\n" }, { "answer_id": 212833, "author": "Steven A. Lowe",...
2008/10/17
[ "https://Stackoverflow.com/questions/212657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6651/" ]
212,689
<p>I have implemented a pretty simple picture viewer that will allow the user to browse through a collection of images. They are loaded from the Internet, and displayed on the device through a <code>UIImageView</code> object. Something like this:</p> <pre><code>UIImage *image = [[UIImage alloc] initWithData:imageData]...
[ { "answer_id": 223423, "author": "Jamey McElveen", "author_id": 30099, "author_profile": "https://Stackoverflow.com/users/30099", "pm_score": 1, "selected": false, "text": "RootViewController.m UIViewAnimationTransitionFlipFromLeft UIViewAnimationTransitionFlipFromRight UIViewAnimationTr...
2008/10/17
[ "https://Stackoverflow.com/questions/212689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
212,697
<p>Every class that wants to use java.util.logging generally needs to declare a logger like this:</p> <pre><code>public class MyClass { private static Logger _log = Logger.getLogger(MyClass.class.getName()); } </code></pre> <p>How do you avoid this MyClass.class.getName() boilerplate code?</p>
[ { "answer_id": 212750, "author": "Ogre Psalm33", "author_id": 13140, "author_profile": "https://Stackoverflow.com/users/13140", "pm_score": 0, "selected": false, "text": "public class MyClass {\n private static Logger _log = Logger.getLogger(MyClass.class);\n}\n public class MyBase {\...
2008/10/17
[ "https://Stackoverflow.com/questions/212697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28604/" ]
212,705
<p>I have a <code>&lt;div&gt;</code> that I want to be on a line by itself. According to <a href="http://www.w3schools.com/Css/pr_class_clear.asp" rel="nofollow noreferrer">W3Schools</a>, this rule:</p> <pre><code>div.foo { clear: both; } </code></pre> <p>...should mean this:</p> <blockquote> <p>"No floating ele...
[ { "answer_id": 212721, "author": "warren", "author_id": 4418, "author_profile": "https://Stackoverflow.com/users/4418", "pm_score": 1, "selected": false, "text": "float: left;\nclear: right;\n" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4376/" ]
212,706
<p>What is the best way to reset a PIC18 using C code with the HiTech Pic18 C compiler?</p> <p>Edit:</p> <p>I am currenlty using</p> <pre><code>void reset() { #asm reset #endasm } </code></pre> <p>but there must be a better way</p>
[ { "answer_id": 59441046, "author": "Dan1138", "author_id": 10085080, "author_profile": "https://Stackoverflow.com/users/10085080", "pm_score": 1, "selected": false, "text": "/*\n * File: main.c\n * Author: dan1138\n * Target: PIC18F45K20\n * Compiler: XC8 v2.05\n *\n * ...
2008/10/17
[ "https://Stackoverflow.com/questions/212706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17560/" ]
212,713
<p>Using subversion 1.5 I have branch B which was branched off of branch A. After doing work in both branches I go to merge changes from A into B (using <code>svn merge http://path/to/A</code> in the working directory of B) and get <code>svn: Target path does not exist</code>. What does this mean?</p>
[ { "answer_id": 15531404, "author": "dankuck", "author_id": 146786, "author_profile": "https://Stackoverflow.com/users/146786", "pm_score": 1, "selected": false, "text": " /---------\\\ntrunk -------+---+ +---\\\n \\-----------BOOM!\n /---...
2008/10/17
[ "https://Stackoverflow.com/questions/212713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14481/" ]
212,715
<p>I'm trying to use the giveio.sys driver which requires a "file" to be opened before you can access protected memory. I'm looking at a C example from WinAVR/AVRdude that uses the syntax:</p> <pre class="lang-c prettyprint-override"><code> #define DRIVERNAME "\\\\.\\giveio" HANDLE h = CreateFile(DRIVERNAME, ...
[ { "answer_id": 214066, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "\\\\.\\DRIVERNAME\n" }, { "answer_id": 5870770, "author": "Grim", "author_id": 561323, "author_profile": "...
2008/10/17
[ "https://Stackoverflow.com/questions/212715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28984/" ]
212,718
<p>The NUnit documentation doesn't tell me when to use a method with a <code>TestFixtureSetup</code> and when to do the setup in the constructor.</p> <pre><code>public class MyTest { private MyClass myClass; public MyTest() { myClass = new MyClass(); } [TestFixtureSetUp] public void I...
[ { "answer_id": 212769, "author": "Sam Wessel", "author_id": 4734, "author_profile": "https://Stackoverflow.com/users/4734", "pm_score": 6, "selected": false, "text": "[SetUp] [TearDown] [TestFixtureSetUp] [TestFixtureTearDown] [TestFixtureSetUp]" }, { "answer_id": 213172, "au...
2008/10/17
[ "https://Stackoverflow.com/questions/212718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13376/" ]
212,734
<p>How do you automatically start a service after running an install from a Visual Studio Setup Project?</p> <p>I just figured this one out and thought I would share the answer for the general good. Answer to follow. I am open to other and better ways of doing this.</p>
[ { "answer_id": 212736, "author": "Jason Z", "author_id": 2470, "author_profile": "https://Stackoverflow.com/users/2470", "pm_score": 7, "selected": true, "text": "using System.ServiceProcess; \n\nclass ServInstaller : ServiceInstaller\n{\n protected override void OnCommitted(System.C...
2008/10/17
[ "https://Stackoverflow.com/questions/212734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2470/" ]
212,745
<p>I'm on OS X 10.5.5 (though it does not matter much I guess)</p> <p>I have a set of text files with fancy characters like double backquotes, ellipsises ("...") in one character etc. </p> <p>I need to convert these files to good old plain 7-bit ASCII, preferably without losing character meaning (that is, convert tho...
[ { "answer_id": 212955, "author": "Josh Lee", "author_id": 19750, "author_profile": "https://Stackoverflow.com/users/19750", "pm_score": 3, "selected": true, "text": "#!/usr/bin/env python\nimport elinks\nimport sys\nfor line in sys.stdin:\n line = line.decode('utf-8')\n sys.stdout....
2008/10/17
[ "https://Stackoverflow.com/questions/212745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6236/" ]
212,748
<p>I wrote a savefile method to save an object to xml. But I am not sure how to test the method in NUnit. Do I need create a sample file manually and compare the string between the files? Are there any better ways to test the method?</p> <p>Thanks for your answer.</p>
[ { "answer_id": 212781, "author": "Robert P", "author_id": 18097, "author_profile": "https://Stackoverflow.com/users/18097", "pm_score": 1, "selected": false, "text": "XmlDocument XmlDocument <FileList> <Cups> <Rifles>" }, { "answer_id": 212789, "author": "Krzysztof Kozmic", ...
2008/10/17
[ "https://Stackoverflow.com/questions/212748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28989/" ]
212,762
<p>I need generate <a href="https://stackoverflow.com/questions/27921/what-is-the-best-way-to-create-a-thumbnail-using-aspnet">thumbnails</a> for a bunch of jpegs (200,000+) but I want to make sure all of my thumbs have a equal height and width. However, I don't want to change the proportions of the image so I need to ...
[ { "answer_id": 216042, "author": "Ates Goral", "author_id": 23501, "author_profile": "https://Stackoverflow.com/users/23501", "pm_score": 2, "selected": false, "text": "imageWidth imageHeight thumbWidth thumbHeight imageRatio = imageWidth / imageHeight;\nthumbRatio = thumbWidth / thumbHe...
2008/10/17
[ "https://Stackoverflow.com/questions/212762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4796/" ]
212,763
<p>My Win form app doesn't seem to like FormsAuthentication, I'm totally new to hashing so any help to convert this would be very welcome. Thanks.</p> <pre><code>//Write hash protected TextBox tbPassword; protected Literal liHashedPassword; { string strHashedPassword = FormsAuthentication.HashPasswordForStoringInCo...
[ { "answer_id": 212822, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 5, "selected": false, "text": "using System.Security.Cryptography;\n\npublic static string EncodePasswordToBase64(string password)\n{ byte[] bytes =...
2008/10/17
[ "https://Stackoverflow.com/questions/212763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
212,797
<p>It seems</p> <pre><code>import Queue Queue.Queue().get(timeout=10) </code></pre> <p>is keyboard interruptible (ctrl-c) whereas</p> <pre><code>import Queue Queue.Queue().get() </code></pre> <p>is not. I could always create a loop;</p> <pre><code>import Queue q = Queue() while True: try: q.get(time...
[ { "answer_id": 212975, "author": "Eli Courtwright", "author_id": 1694, "author_profile": "https://Stackoverflow.com/users/1694", "pm_score": 4, "selected": true, "text": "Queue Condition threading Queue Queue def interruptable_get(self):\n while True:\n try:\n return...
2008/10/17
[ "https://Stackoverflow.com/questions/212797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2010/" ]
212,805
<pre><code>Object o = new Long[0] System.out.println( o.getClass().isArray() ) System.out.println( o.getClass().getName() ) Class ofArray = ??? </code></pre> <p>Running the first 3 lines emits;</p> <pre><code>true [Ljava.lang.Long; </code></pre> <p>How do I get ??? to be type long? I could parse the string and do ...
[ { "answer_id": 212816, "author": "ddimitrov", "author_id": 18187, "author_profile": "https://Stackoverflow.com/users/18187", "pm_score": 5, "selected": false, "text": "public Class<?> getComponentType()\n Class" }, { "answer_id": 212817, "author": "sakana", "author_id": 2...
2008/10/17
[ "https://Stackoverflow.com/questions/212805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6580/" ]
212,808
<p>I'm trying to find an efficient C++ interval tree implementation (mostly likely based on red black trees) without a viral or restrictive license. Any pointers to a clean lightweight standalone implementation? For the use case I have in mind, the set of intervals is known at the outset (there would be say a million) ...
[ { "answer_id": 213308, "author": "Max Lybbert", "author_id": 10593, "author_profile": "https://Stackoverflow.com/users/10593", "pm_score": 2, "selected": false, "text": "std::map std::multimap std::set std::multiset std::map upper_bound() lower_bound()" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
212,821
<p>In this class for example, I want to force a limit of characters the first/last name can allow.</p> <pre><code>public class Person { public string FirstName { get; set; } public string LastName { get; set; } } </code></pre> <p>Is there a way to force the string limit restriction for the first or last nam...
[ { "answer_id": 212917, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 2, "selected": false, "text": "[ValidationSchema(\"person.xsd\")]\npublic class Person { /* ... */ }\n\n<!-- person.xsd -->\n\n<?xml version=\"1.0\"?>\...
2008/10/17
[ "https://Stackoverflow.com/questions/212821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/820/" ]
212,827
<p>I've been using Pydev/Eclipse to develop Google App Engine (GAE) applications but I've been unable to get the response/request objects from WebOb to have auto-completion. I used a <a href="http://code.google.com/appengine/articles/eclipse.html" rel="nofollow noreferrer">widely recommended tutorial</a> to get everyth...
[ { "answer_id": 2321588, "author": "Goyuix", "author_id": 243, "author_profile": "https://Stackoverflow.com/users/243", "pm_score": 0, "selected": false, "text": "os.pathsep.join(EXTRA_PATHS)\n" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212827", "https://Stackoverflow.com", "https://Stackoverflow.com/users/312043/" ]
212,839
<p>The test form generated by ASMX is pretty handy for testing operations. However, there is no apparent way to include SOAP headers.</p> <p>How can you test your headers without programming a client to use the service?</p>
[ { "answer_id": 276501, "author": "Austin", "author_id": 32854, "author_profile": "https://Stackoverflow.com/users/32854", "pm_score": 1, "selected": false, "text": "// Set SOAP Message\nstring msg = \"<?xml version='1.0' encoding='UTF-8'?><soap:Envelope>\";\n...\n...\n\n// Make http requ...
2008/10/17
[ "https://Stackoverflow.com/questions/212839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/337/" ]
212,842
<p>In short, how can I search, view, and modify in-memory values in linux, preferably as easily/simply as possible.</p> <p><a href="http://www.raymond.cc/blog/archives/2007/02/27/how-to-cheat-and-hack-flash-based-games/" rel="nofollow noreferrer">Like this</a>.</p>
[ { "answer_id": 72671768, "author": "Devon", "author_id": 7944912, "author_profile": "https://Stackoverflow.com/users/7944912", "pm_score": 0, "selected": false, "text": "ceserver localhost" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212842", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
212,847
<p>I am mentoring the programming group of a high school robotics team. I would like to set up a source control repository to avoid the mess of manually copying directories for sharing/backups and merging these by hand. The build location will not usually have network access, so this has led me to distributed version...
[ { "answer_id": 213345, "author": "quark", "author_id": 29057, "author_profile": "https://Stackoverflow.com/users/29057", "pm_score": 2, "selected": false, "text": "cd C:\\Project hg pull F:\\Project cd C:\\Project hg pull C:\\Project1 hg merge added 1 changesets with 1 changes to 1 files...
2008/10/17
[ "https://Stackoverflow.com/questions/212847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5233/" ]
212,851
<p>I've got a <code>DataGridViewCobmoboxColumn</code> that has to be on the far right side of the screen. The items in the cell are wider that the cell width, so the dropdown list is also wider than the cell, so the user can see what top select. When the list drops down, the right side of the dropdown is not visible, a...
[ { "answer_id": 42065719, "author": "Taras Kozubski", "author_id": 1259074, "author_profile": "https://Stackoverflow.com/users/1259074", "pm_score": 0, "selected": false, "text": "ToolStripDropDownDirection.AboveLeft" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
212,858
<p>I'm working on a web app project (in java; not that it matters) and we have a form with drop down lists and input fields. </p> <p>Obviously drop down lists are provided because we expect a specific value from a set of values. </p> <p>So my question is this: does it make sense to ensure the submitted value is in t...
[ { "answer_id": 42065719, "author": "Taras Kozubski", "author_id": 1259074, "author_profile": "https://Stackoverflow.com/users/1259074", "pm_score": 0, "selected": false, "text": "ToolStripDropDownDirection.AboveLeft" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17337/" ]
212,863
<p>My current project uses NUnit for unit tests and to drive UATs written with Selenium. Developers normally run tests using ReSharper's test runner in VS.Net 2003 and our build box kicks them off via NAnt.</p> <p>We would like to run the UAT tests in parallel so that we can take advantage of Selenium Grid/RCs so tha...
[ { "answer_id": 32245312, "author": "Peter", "author_id": 707458, "author_profile": "https://Stackoverflow.com/users/707458", "pm_score": 1, "selected": false, "text": "[Parallelizable(ParallelScope.Self)]" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212863", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29009/" ]
212,900
<p>I've used lex and yacc (more usually bison) in the past for various projects, usually translators (such as a subset of EDIF streamed into an EDA app). Additionally, I've had to support code based on lex/yacc grammars dating back decades. So I know my way around the tools, though I'm no expert.</p> <p>I've seen posi...
[ { "answer_id": 212930, "author": "Daniel Spiewak", "author_id": 9815, "author_profile": "https://Stackoverflow.com/users/9815", "pm_score": 8, "selected": true, "text": "expr ::= expr '+' expr\n | expr '-' expr\n | '(' expr ')'\n | NUM ;\n expr ::= expr '.' ID '(' actua...
2008/10/17
[ "https://Stackoverflow.com/questions/212900", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3778/" ]
212,902
<p>I'm trying to find about ALL the possible options that I can set in <code>web.config</code>. Surprisingly, I can't find this at all. I expected it to be somewhere inside <a href="http://msdn.microsoft.com" rel="noreferrer">MSDN</a>.</p> <p>I know I can technically add "anything" to <code>web.config</code>, what I'm...
[ { "answer_id": 212933, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 6, "selected": true, "text": "<system.web> <system.web.extensions> <appSettings> <configSections> <connectionStrings>" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3314/" ]
212,906
<p>My customer is replacing MS Office with OpenOffice in some workstations. My program export a file to Excel using the .xml extension (using open format) and opens it using the current associated program (using ShellExecute)</p> <p>The problem is that OpenOffice does not register the .xml extension associated with it...
[ { "answer_id": 212921, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 5, "selected": true, "text": "\"HKEY_CLASSES_ROOT\\.xml\" \"xmlfile\" \"HKEY_CLASSES_ROOT\\xmlfile\" HKEY_CLASSES_ROOT\\xmlfile\\shell\\open\\command\n \...
2008/10/17
[ "https://Stackoverflow.com/questions/212906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2385/" ]
212,919
<p>I need to change the permissions of a directory to be owned by the Everyone user with all access rights on this directory. I'm a bit new to the Win32 API, so I'm somewhat lost in the SetSecurity* functions.</p>
[ { "answer_id": 213716, "author": "Jason", "author_id": 26302, "author_profile": "https://Stackoverflow.com/users/26302", "pm_score": 2, "selected": false, "text": "SetSecurityInfo(hDir, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, NULL, NULL);\n" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26302/" ]
212,939
<p>MySQL 5.0.45</p> <p>What is the syntax to alter a table to allow a column to be null, alternately what's wrong with this:</p> <pre><code>ALTER mytable MODIFY mycolumn varchar(255) null; </code></pre> <p>I interpreted the manual as just run the above and it would recreate the column, this time allowing null. The ...
[ { "answer_id": 212947, "author": "Daniel Spiewak", "author_id": 9815, "author_profile": "https://Stackoverflow.com/users/9815", "pm_score": 11, "selected": true, "text": "ALTER TABLE mytable MODIFY mycolumn VARCHAR(255);\n UNIQUE NOT NULL" }, { "answer_id": 212966, "author": ...
2008/10/17
[ "https://Stackoverflow.com/questions/212939", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13285/" ]
212,941
<p>I have a django application that I'd like to add some rest interfaces to. I've seen <a href="http://code.google.com/p/django-rest-interface/" rel="noreferrer">http://code.google.com/p/django-rest-interface/</a> but it seems to be pretty simplistic. For instance it doesn't seem to have a way of enforcing security. ...
[ { "answer_id": 214383, "author": "Anders Eurenius", "author_id": 1421, "author_profile": "https://Stackoverflow.com/users/1421", "pm_score": 2, "selected": false, "text": "authentication Collection login_required permission_required" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212941", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2351/" ]
212,965
<p>What I want to do is the following:</p> <ol> <li>read in multiple line input from <code>stdin</code> into variable <code>A</code></li> <li>make various operations on <code>A</code></li> <li>pipe <code>A</code> without losing delimiter symbols (<code>\n</code>,<code>\r</code>,<code>\t</code>,etc) to another command<...
[ { "answer_id": 212987, "author": "Tanktalus", "author_id": 23512, "author_profile": "https://Stackoverflow.com/users/23512", "pm_score": 7, "selected": true, "text": "myvar=`cat`\n\necho \"$myvar\"\n $myvar" }, { "answer_id": 213007, "author": "Community", "author_id": -1...
2008/10/17
[ "https://Stackoverflow.com/questions/212965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
212,968
<p>I have a scenario in a system which I've tried to simplify as best as I can. We have a table of (lets call them) artefacts, artefacts can be accessed by any number of security roles and security roles can access any number of artefacts. As such, we have 3 tables in the database - one describing artefacts, one descri...
[ { "answer_id": 214138, "author": "kͩeͣmͮpͥ ͩ", "author_id": 26479, "author_profile": "https://Stackoverflow.com/users/26479", "pm_score": 0, "selected": false, "text": "Artifact ArtefactAccess" }, { "answer_id": 407171, "author": "Community", "author_id": -1, "author_...
2008/10/17
[ "https://Stackoverflow.com/questions/212968", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20524/" ]
212,988
<p>I have created an item swapper control consisting in two listboxes and some buttons that allow me to swap items between the two lists. The swapping is done using javascript. I also move items up and down in the list. Basically when I move the items to the list box on the right I store the datakeys of the elements (...
[ { "answer_id": 213535, "author": "kjv", "author_id": 1360, "author_profile": "https://Stackoverflow.com/users/1360", "pm_score": 1, "selected": true, "text": "public class CustomListBox : ListBox\n{\n protected override bool LoadPostData(string postDataKey, System.Collections.Speciali...
2008/10/17
[ "https://Stackoverflow.com/questions/212988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1360/" ]
212,989
<p>I have G729 encoded audio files. I need to programmatically convert them to WAV PCM (16bit 8kHz mono) in the flow of a tool that is doing other thing too. I have an executable that will do that for me. But spawning that external process every time I convert is too heavy on resources. Especially if I need many of the...
[ { "answer_id": 12105360, "author": "AndroidLearner", "author_id": 1479075, "author_profile": "https://Stackoverflow.com/users/1479075", "pm_score": 0, "selected": false, "text": "EXE browse dialogue box All Files(*.*) browse file dialogue" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1363/" ]
212,994
<p>How can I get tab completion to work for selecting CVS modules under Linux (preferably using bash) ?</p> <p>For example, "cvs co " + tab would list the modules I can checkout. I've heard it's easy to do using zsh, but still I didn't manage to get it working either. </p> <p>Also, how can I list all available module...
[ { "answer_id": 213025, "author": "Isak Savo", "author_id": 8521, "author_profile": "https://Stackoverflow.com/users/8521", "pm_score": 2, "selected": false, "text": "cvs -d \"$the_cvsroot\" checkout -c" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2907/" ]
212,999
<p>After using Hudson for continuous integration with a prior project, I want to set up a continuous integration server for the iPhone projects I'm working on now. After doing some research it looks like there aren't any CI engines designed specifically for Xcode, but one guy has had success <a href="http://www.pragmat...
[ { "answer_id": 1182726, "author": "Silentcode", "author_id": 145054, "author_profile": "https://Stackoverflow.com/users/145054", "pm_score": 6, "selected": true, "text": "xcodebuild -target \"myAppAppStore\" -configuration \"DistributionAppStore\" -sdk iphoneos2.1\n" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/212999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17188/" ]
213,002
<p>I have some data grouped in a table by a certain criteria, and for each group it is computed an average —well, the real case is a bit more tricky— of the values from each of the detail rows that belong to that group. This average is shown in each group footer rows. Let's see this simple example:</p> <p><img src="ht...
[ { "answer_id": 305766, "author": "user33675", "author_id": 33675, "author_profile": "https://Stackoverflow.com/users/33675", "pm_score": 3, "selected": true, "text": "Public Sub New()\n\n m_valueTable = New DataTable(tableName:=\"DoubleValueList\")\n\n 'Type reference to System.Dou...
2008/10/17
[ "https://Stackoverflow.com/questions/213002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1679/" ]
213,015
<p>I have over a TB of home movies with horrible file names. Finding what you want is impossible. I would like to rename all files to the time they were originally recorded (not the file time they were placed on my computer). Some applications (like Ulead Video Studio) can access this information, which I believe is e...
[ { "answer_id": 6050589, "author": "PhilT", "author_id": 759912, "author_profile": "https://Stackoverflow.com/users/759912", "pm_score": 3, "selected": false, "text": "mplayer -vo null -ao null -frames 0 -identify myfile.MOV 2>/dev/null|grep creation_time:\n for m in MVI*.MOV; do\n t=$...
2008/10/17
[ "https://Stackoverflow.com/questions/213015", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29027/" ]
213,027
<p>The following code was produced by a consultant working for my group. I'm not a C++ developer (worked in many languages, though) but would like some independent opinions on the following code. This is in Visual Studio C++ 6.0. I've got a gut reaction (not a good one, obviously), but I'd like some "gut reactions" ...
[ { "answer_id": 213041, "author": "gbjbaanb", "author_id": 13744, "author_profile": "https://Stackoverflow.com/users/13744", "pm_score": 4, "selected": false, "text": "CString strColHeader;\nstrColHeader.Replace(\",\", \"\\\\,\") \n while (occurenceInd != 0)" }, { "answer_id": 213...
2008/10/17
[ "https://Stackoverflow.com/questions/213027", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
213,042
<p>I tried "x = y ** e", but that didn't work.</p>
[ { "answer_id": 213043, "author": "Evan Teran", "author_id": 13430, "author_profile": "https://Stackoverflow.com/users/13430", "pm_score": 8, "selected": true, "text": "pow float double man pow #include <math.h>\n\n double pow(double x, double y);\n float powf(float x, float y);\n ...
2008/10/17
[ "https://Stackoverflow.com/questions/213042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7598/" ]
213,045
<p>I have a class library with some extension methods written in C# and an old website written in VB.</p> <p>I want to call my extension methods from the VB code but they don't appear in intelisense and I get compile errors when I visit the site.</p> <p>I have got all the required <em>Import</em>s because other class...
[ { "answer_id": 213066, "author": "ICR", "author_id": 214, "author_profile": "https://Stackoverflow.com/users/214", "pm_score": 2, "selected": false, "text": "public static string MyExtMethod(this string s)\n MyExtMethod(\"myArgument\")\n" }, { "answer_id": 213070, "author": "...
2008/10/17
[ "https://Stackoverflow.com/questions/213045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1741868/" ]
213,078
<p>Alright so I'm essentialyl trying to code something that will combine two files together in VB and output a single file that when run, runs both of them. I've grabbed this source from several places online and am just trying to get it to work. We have the main program that combines them with a GUI</p> <pre><code>...
[ { "answer_id": 235586, "author": "Svante Svenson", "author_id": 19707, "author_profile": "https://Stackoverflow.com/users/19707", "pm_score": 0, "selected": false, "text": "Const FileSplit = \"@<>#<>#<>@\"\n\nPrivate Sub cmdAdd_Click()\n With Dlg\n .Filter = \"All Files(*.*) | ...
2008/10/17
[ "https://Stackoverflow.com/questions/213078", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
213,085
<p>I'm working on a forums system. I'm trying to allow users to see the posts they've made. In order for this link to work, I'd need to jump to the <strong>page</strong> on the particular topic they posted in that contained their post, so the bookmarks could work, etc. Since this is a new feature on an old forum, I'd ...
[ { "answer_id": 213186, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 3, "selected": true, "text": "SELECT count(post_id) FROM posts\n WHERE thread_id = '{$thread_id}' AND date_posted <= '{$date_posted}'\n // dig around forum c...
2008/10/17
[ "https://Stackoverflow.com/questions/213085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19521/" ]
213,118
<p>In MFC I'm trying to set a null handler timer (ie. no windows). But I'm unable to process the WM_TIMER event in the CWinApp MESSAGE_MAP. Is this possible? If so, how?</p>
[ { "answer_id": 213776, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 5, "selected": true, "text": "SetTimer() CWinApp UINT_PTR uTimerId = SetTimer(NULL, 0, 2000, NULL);\nTRACE(_T(\"Timer created - ID=%x\\n\"), uTimerId);\n CWinA...
2008/10/17
[ "https://Stackoverflow.com/questions/213118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
213,121
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/2023977/c-difference-of-keywords-typename-and-class-in-templates">C++ difference of keywords ‘typename’ and ‘class’ in templates</a> </p> </blockquote> <p>When defining a function template or class template in ...
[ { "answer_id": 213135, "author": "itsmatt", "author_id": 7862, "author_profile": "https://Stackoverflow.com/users/7862", "pm_score": 10, "selected": true, "text": "class typename class" }, { "answer_id": 213149, "author": "Michael Burr", "author_id": 12711, "author_pr...
2008/10/17
[ "https://Stackoverflow.com/questions/213121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1175/" ]
213,128
<p>We're running into issues with how we specify font sizes. If we specify the font sizes using pt, they don't always look the same across browsers/platforms. If we specify font sizes using px, IE6 users can't resize the text.</p>
[ { "answer_id": 213407, "author": "Nathan Long", "author_id": 4376, "author_profile": "https://Stackoverflow.com/users/4376", "pm_score": 3, "selected": true, "text": "<style type=\"text/css\">`\nbody {\n font-size:100%;\n line-height:1.125em;\n}\n\n.bodytext p {\n font-size:0.87...
2008/10/17
[ "https://Stackoverflow.com/questions/213128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1538/" ]
213,148
<p>Can anyone tell the function to sort the columns of a gridview in c# asp.net.</p> <p>The databound to gridview is from datacontext created using linq. I wanted to click the header of the column to sort the data.</p> <p>Thanks!</p>
[ { "answer_id": 213306, "author": "craigmoliver", "author_id": 12252, "author_profile": "https://Stackoverflow.com/users/12252", "pm_score": 0, "selected": false, "text": " AllowSorting=\"true\"\n <asp:GridView />" }, { "answer_id": 213541, "author": "Daniel Schaffer", "a...
2008/10/17
[ "https://Stackoverflow.com/questions/213148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
213,151
<p>EDIT: It seems to be something with having the two queues in the same schema.</p> <p>I’m trying to experiment with queue propagation but I’m not seeing records in the destination queue. But that could easily be because I don’t have all the pieces in place.</p> <p>Does anyone have a test case they could post? I’ll ...
[ { "answer_id": 215092, "author": "TheSoftwareJedi", "author_id": 18941, "author_profile": "https://Stackoverflow.com/users/18941", "pm_score": 1, "selected": false, "text": "DBMS_AQADM.ENABLE_PROPAGATION_SCHEDULE(queue_name => 'Test_Q'); \n" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/213151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
213,153
<p>The general problem:</p> <p>We have urls coming to our IIS web servers formatted like: </p> <blockquote> <p><strong><a href="http://www.server.com/page.aspx" rel="nofollow noreferrer">http://www.server.com/page.aspx</a></strong></p> </blockquote> <p>We are also seeing that urls like this are coming in: </p> <b...
[ { "answer_id": 215092, "author": "TheSoftwareJedi", "author_id": 18941, "author_profile": "https://Stackoverflow.com/users/18941", "pm_score": 1, "selected": false, "text": "DBMS_AQADM.ENABLE_PROPAGATION_SCHEDULE(queue_name => 'Test_Q'); \n" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/213153", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5619/" ]
213,167
<p>I'm looking at the code for a phase accumulator, and I must be a simpleton because I don't get it. The code is simple enough:</p> <pre> Every Clock Tick do: accum = accum + NCO_param; return accum; </pre> <p>accum is a 32-bit register. Obviously, at some point it will roll-over.</p> <p>My question real...
[ { "answer_id": 27747391, "author": "LifeInTheTrees", "author_id": 2040877, "author_profile": "https://Stackoverflow.com/users/2040877", "pm_score": 0, "selected": false, "text": " var accadd = 1.0/( sampleRate / p2freq( note ) ) ;\n acc+= accadd;\n acc = acc%1.0;// not sure to d...
2008/10/17
[ "https://Stackoverflow.com/questions/213167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10703/" ]
213,173
<p>I have a single image with 9 different states and the appropriate background-position rules set up as classes to show the different states. I can't use the :hover pseudo-selector because the background image being changed is not the same element that is being hovered over. I have defined the classes this way:</p> <...
[ { "answer_id": 213213, "author": "Kornel", "author_id": 27009, "author_profile": "https://Stackoverflow.com/users/27009", "pm_score": 0, "selected": false, "text": "className setAttribute()" }, { "answer_id": 215156, "author": "Borgar", "author_id": 27388, "author_pro...
2008/10/17
[ "https://Stackoverflow.com/questions/213173", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9414/" ]
213,181
<p>Umm, I guess my questions in the title:</p> <p>How do I turn on Option Strict / Infer in a VB.NET aspx page without a code behind file?</p> <pre><code>&lt;%@ Page Language="VB" %&gt; &lt;script runat="server"&gt; Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) End Sub &lt;/scr...
[ { "answer_id": 213190, "author": "IAmCodeMonkey", "author_id": 27613, "author_profile": "https://Stackoverflow.com/users/27613", "pm_score": 5, "selected": true, "text": "<%@ Page Language=\"VB\" Strict=\"true\" %>\n" }, { "answer_id": 213198, "author": "Mitchel Sellers", ...
2008/10/17
[ "https://Stackoverflow.com/questions/213181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26/" ]
213,192
<p>In my ideal world, what I'm looking for would exist as something along the lines of this:</p> <pre><code>public string UserDefinedField { get { return _userDefinedField; } internal set { _userDefinedField = value; } set { _userDefinedField = value; ChangedFields.Add(Fields.UserDefinedField); } }...
[ { "answer_id": 213207, "author": "Isak Savo", "author_id": 8521, "author_profile": "https://Stackoverflow.com/users/8521", "pm_score": 3, "selected": true, "text": "public string UserDefinedField\n{\n get { return _userDefinedField; }\n set { SetField(value); ChangedFields.Add(Fiel...
2008/10/17
[ "https://Stackoverflow.com/questions/213192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13412/" ]
213,195
<p>When I try to login to this site using my yahoo openid, it takes me to the yahoo site, I click "continue" meaning that i <em>want</em> to send my authentication details to stackoverflow.com and stackoverflow.com gives me the following error underneath the login text field:</p> <p>Unable to log in with your OpenID p...
[ { "answer_id": 213207, "author": "Isak Savo", "author_id": 8521, "author_profile": "https://Stackoverflow.com/users/8521", "pm_score": 3, "selected": true, "text": "public string UserDefinedField\n{\n get { return _userDefinedField; }\n set { SetField(value); ChangedFields.Add(Fiel...
2008/10/17
[ "https://Stackoverflow.com/questions/213195", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29049/" ]
213,214
<p>I'm in a 10 person team working on a large legacy code base with a less than ideal product owner. Our backlog is in pretty bad shape and large epics have frequently been breaking our sprints. The team also struggles with its definition of done - some members write unit test religiously, others don't, sometimes depen...
[ { "answer_id": 213289, "author": "MojoFilter", "author_id": 93, "author_profile": "https://Stackoverflow.com/users/93", "pm_score": 3, "selected": true, "text": " # # #\n # # # #\n # # # # #\n # # # # # #\n# # # # # # #\n# # # # # # # #\n# # # # # # # #\n" }, { "ans...
2008/10/17
[ "https://Stackoverflow.com/questions/213214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13041/" ]
213,237
<p>In Django, given excerpts from an application <em>animals</em> likeso:</p> <p>A <em>animals/models.py</em> with: </p> <pre><code>from django.db import models from django.contrib.contenttypes.models import ContentType class Animal(models.Model): content_type = models.ForeignKey(ContentType,editable=False,null=Tr...
[ { "answer_id": 213393, "author": "Javier", "author_id": 11649, "author_profile": "https://Stackoverflow.com/users/11649", "pm_score": 0, "selected": false, "text": "'create_update.update_object' dict 'model':Dog 'model':Cat" }, { "answer_id": 215488, "author": "Brian M. Hunt"...
2008/10/17
[ "https://Stackoverflow.com/questions/213237", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19212/" ]
213,238
<p>Just playing around with the now released Silverlight 2.0. I'm trying to put a simple Calendar in a control. However the project doesn't seem to know what I'm talking about:-</p> <pre><code>&lt;UserControl x:Class="MyFirstSL2.Test" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http...
[ { "answer_id": 213592, "author": "Tim Heuer", "author_id": 705, "author_profile": "https://Stackoverflow.com/users/705", "pm_score": 5, "selected": true, "text": "xmlns:basics=\"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls\"\n <basics:Calendar />\n" } ]
2008/10/17
[ "https://Stackoverflow.com/questions/213238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17516/" ]
213,249
<p>I am wondering - What's the most effective way of parsing something like:</p> <pre><code>{{HEADER}} Hello my name is {{NAME}} {{#CONTENT}} This is the content ... {{#PERSONS}} &lt;p&gt;My name is {{NAME}}.&lt;/p&gt; {{/PERSONS}} {{/CONTENT}} {{FOOTER}} </code></pre> <p>Of course this is ...
[ { "answer_id": 213344, "author": "Troy Howard", "author_id": 19258, "author_profile": "https://Stackoverflow.com/users/19258", "pm_score": 2, "selected": true, "text": "This is the content ...\n\nMy name is Heino.\n\nMy name is Sebastian.\n" }, { "answer_id": 213589, "author"...
2008/10/17
[ "https://Stackoverflow.com/questions/213249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20538/" ]
213,251
<p>I've been reading that Adobe has made crossdomain.xml stricter in flash 9-10 and I'm wondering of someone can paste me a copy of one that they know works. Having some trouble finding a recent sample on Adobe's site.</p>
[ { "answer_id": 213272, "author": "Mitch Haile", "author_id": 28807, "author_profile": "https://Stackoverflow.com/users/28807", "pm_score": 8, "selected": true, "text": "<?xml version=\"1.0\" ?>\n<cross-domain-policy>\n<allow-access-from domain=\"*\" />\n</cross-domain-policy>\n" }, {...
2008/10/17
[ "https://Stackoverflow.com/questions/213251", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18309/" ]
213,256
<p>I am trying to debug a strange issue with users that have <a href="https://secure.logmein.com/home.asp" rel="nofollow noreferrer">LogMeIn</a> installed. After a few days, some of my dialogs that my app opens can end up offscreen. If I could reliable detect that, I could programmatically move the dialogs back where t...
[ { "answer_id": 5454407, "author": "CAD bloke", "author_id": 492, "author_profile": "https://Stackoverflow.com/users/492", "pm_score": 1, "selected": false, "text": "if (!Screen.FromControl(this).Bounds.Contains(this.Location))\n {\n this.DesktopLocation = new Po...
2008/10/17
[ "https://Stackoverflow.com/questions/213256", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21784/" ]
213,266
<p>How do I go about positioning a JDialog at the center of the screen?</p>
[ { "answer_id": 213291, "author": "johnstok", "author_id": 27929, "author_profile": "https://Stackoverflow.com/users/27929", "pm_score": 8, "selected": true, "text": "final JDialog d = new JDialog();\nd.setSize(200,200);\nd.setLocationRelativeTo(null);\nd.setVisible(true);\n final JDialog...
2008/10/17
[ "https://Stackoverflow.com/questions/213266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2443/" ]
213,267
<p>I'm trying to pass one method to another in elisp, and then have that method execute it. Here is an example:</p> <pre><code>(defun t1 () "t1") (defun t2 () "t1") (defun call-t (t) ; how do I execute "t"? (t)) ; How do I pass in method reference? (call-t 't1) </code></pre>
[ { "answer_id": 213511, "author": "Timo Geusch", "author_id": 29068, "author_profile": "https://Stackoverflow.com/users/29068", "pm_score": 6, "selected": true, "text": "t (defun test-func-1 () \"test-func-1\"\n (interactive \"*\")\n (insert-string \"testing callers\"))\n\n(defun fun...
2008/10/17
[ "https://Stackoverflow.com/questions/213267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9435/" ]
213,271
<p>window.scrollMaxY can be set via that property in IE and older versions of Firefox, but when trying in FF3 it says "Cannot set this property as it only has a getter".</p> <p>What is my alternative?</p> <p>EDIT:</p> <p>The reason why I'm asking is that I'm fixing some very horrible JS written by someone else, it h...
[ { "answer_id": 213511, "author": "Timo Geusch", "author_id": 29068, "author_profile": "https://Stackoverflow.com/users/29068", "pm_score": 6, "selected": true, "text": "t (defun test-func-1 () \"test-func-1\"\n (interactive \"*\")\n (insert-string \"testing callers\"))\n\n(defun fun...
2008/10/17
[ "https://Stackoverflow.com/questions/213271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
213,295
<p>I'm storing an ArrayList of Ids in a processing script that I want to spit out as a comma delimited list for output to the debug log. Is there a way I can get this easily without looping through things?</p> <p>EDIT: Thanks to Joel for pointing out the List(Of T) that is available in .net 2.0 and above. That makes t...
[ { "answer_id": 213305, "author": "Dillie-O", "author_id": 71, "author_profile": "https://Stackoverflow.com/users/71", "pm_score": 8, "selected": true, "text": "String.Join(\",\", CType(TargetArrayList.ToArray(Type.GetType(\"System.String\")), String()))\n string.Join(\",\", (string[])Tar...
2008/10/17
[ "https://Stackoverflow.com/questions/213295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/71/" ]
213,299
<p>I've implemented a .NET Web control that uses the callback structure implemented in ASP.Net 2.0. It's an autodropdown control, and it works correctly in IE 6.0/7.0 and Google Chrome. Here's the relevant callback function:</p> <pre><code>function ReceiveServerData(args, context) { document.getElementById(context)....
[ { "answer_id": 220090, "author": "Atanas Korchev", "author_id": 10141, "author_profile": "https://Stackoverflow.com/users/10141", "pm_score": 0, "selected": false, "text": "function WebForm_CallbackComplete()\n{\n for(var i=0; i< __pendingCallbacks.length;i++)\n {\n var _f3=...
2008/10/17
[ "https://Stackoverflow.com/questions/213299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11947/" ]
213,303
<p>There are many tools out there for writing and managing requirements, but are there any good ones for reviewing them? </p> <p>I'm not talking about <strong><em>managing</em></strong> reviews, but automation tools that look for common requirement blunders (such as using negative requirements, or ones that are worde...
[ { "answer_id": 213452, "author": "kenny", "author_id": 3225, "author_profile": "https://Stackoverflow.com/users/3225", "pm_score": 3, "selected": true, "text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ReqCheck>\n <Categories name=\"Reconsider wording\">\n <Keyword>may</Keyword>\...
2008/10/17
[ "https://Stackoverflow.com/questions/213303", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2382102/" ]
213,309
<p>Is it possible to create, for instance, a box model hack while using in-line CSS?</p> <p>For example:</p> <p><code>&lt;div id="blah" style="padding: 5px; margin: 5px; width: 30px; /*IE5-6 Equivalent here*/"&gt;</code></p> <p>Thanks! </p>
[ { "answer_id": 213342, "author": "eyelidlessness", "author_id": 17964, "author_profile": "https://Stackoverflow.com/users/17964", "pm_score": 0, "selected": false, "text": "<div id=\"blah\" style=\"padding: 5px; margin: 5px; width: 30px; <!--[if lte IE 6]> ... <![endif]-->\">\n" }, {...
2008/10/17
[ "https://Stackoverflow.com/questions/213309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
213,312
<p>Can Ruby really be used as a functional language? What are some good tutorials to teach this facet of the language? Note: I really want to use and stick with Ruby as my primary language so I am not interested at this point in being converted to YAFL (yet another functional language). I am really interested in h...
[ { "answer_id": 213336, "author": "Daniel Spiewak", "author_id": 9815, "author_profile": "https://Stackoverflow.com/users/9815", "pm_score": 4, "selected": false, "text": "Object#freeze Array Hash String gsub! map zip" }, { "answer_id": 214330, "author": "madlep", "author_...
2008/10/17
[ "https://Stackoverflow.com/questions/213312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20714/" ]
213,333
<p>I have a generic class in C# with 2 constructors:</p> <pre><code>public Houses(params T[] InitialiseElements) {} public Houses(int Num, T DefaultValue) {} </code></pre> <p>Constructing an object using int as the generic type and passing in two ints as arguments causes the 'incorrect' constructor to be called (from...
[ { "answer_id": 213354, "author": "Jon B", "author_id": 27414, "author_profile": "https://Stackoverflow.com/users/27414", "pm_score": 2, "selected": false, "text": "public Houses(IEnumerable<T> InitialiseElements){}\n" }, { "answer_id": 213403, "author": "Jon Skeet", "auth...
2008/10/17
[ "https://Stackoverflow.com/questions/213333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29059/" ]