qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
56,950
<p>We all know T-SQL's string manipulation capabilities sometimes leaves much to be desired...</p> <p>I have a numeric field that needs to be output in T-SQL as a right-aligned text column. Example:</p> <pre><code>Value ---------- 143.55 3532.13 1.75 </code></pre> <p>How would you go about that? A good sol...
[ { "answer_id": 56972, "author": "d91-jal", "author_id": 5085, "author_profile": "https://Stackoverflow.com/users/5085", "pm_score": 5, "selected": true, "text": "SELECT STR(123.45, 6, 1)\n\n------\n 123.5\n\n(1 row(s) affected)\n" }, { "answer_id": 56973, "author": "Espo", ...
2008/09/11
[ "https://Stackoverflow.com/questions/56950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2230/" ]
56,954
<p>The code</p> <pre><code>private SomeClass&lt;Integer&gt; someClass; someClass = EasyMock.createMock(SomeClass.class); </code></pre> <p>gives me a warning "Type safety: The expression of type SomeClass needs unchecked conversion to conform to SomeClass&lt;Integer&gt;".</p>
[ { "answer_id": 56996, "author": "Tom Hawtin - tackline", "author_id": 4725, "author_profile": "https://Stackoverflow.com/users/4725", "pm_score": 2, "selected": false, "text": "private static class SomeClass_Integer extends SomeClass<Integer>();\nprivate SomeClass<Integer> someClass;\n.....
2008/09/11
[ "https://Stackoverflow.com/questions/56954", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4792/" ]
56,968
<p>I'm trying to attach an instance of UIScrollbar component to a dynamic text field inside of an instance of a class that is being made after some XML is loaded. The scroll bar component is getting properly attached, as the size of the slider varies depending on the amount of content in the text field, however, it won...
[ { "answer_id": 74302, "author": "defmeta", "author_id": 10875, "author_profile": "https://Stackoverflow.com/users/10875", "pm_score": 0, "selected": false, "text": "vScrollBar.update(); addChild(vScollbar);" }, { "answer_id": 74342, "author": "defmeta", "author_id": 10875...
2008/09/11
[ "https://Stackoverflow.com/questions/56968", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
56,974
<p>In the following snippet:</p> <pre><code>public class a { public void otherMethod(){} public void doStuff(String str, InnerClass b){} public void method(a){ doStuff("asd", new InnerClass(){ public void innerMethod(){ otherMethod(); ...
[ { "answer_id": 56987, "author": "Bill the Lizard", "author_id": 1288, "author_profile": "https://Stackoverflow.com/users/1288", "pm_score": 9, "selected": true, "text": "OuterClassName.this a.this.otherMethod()" }, { "answer_id": 56992, "author": "jjnguy", "author_id": 25...
2008/09/11
[ "https://Stackoverflow.com/questions/56974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/292/" ]
57,002
<p>What CSS should I use to make a cell's border appear even if the cell is empty?</p> <p>IE 7 specifically.</p>
[ { "answer_id": 57006, "author": "Grant", "author_id": 30, "author_profile": "https://Stackoverflow.com/users/30", "pm_score": 7, "selected": true, "text": "&nbsp; empty-cells:hide" }, { "answer_id": 57023, "author": "Allain Lalonde", "author_id": 2443, "author_profile...
2008/09/11
[ "https://Stackoverflow.com/questions/57002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2443/" ]
57,004
<p>I want to create dynamic content based on this. I know it's somewhere, as web analytics engines can get this data to determine how people got to your site (referrer, search terms used, etc.), but I don't know how to get at it myself.</p>
[ { "answer_id": 57015, "author": "Espo", "author_id": 2257, "author_profile": "https://Stackoverflow.com/users/2257", "pm_score": 4, "selected": true, "text": "Request.Referer" }, { "answer_id": 57050, "author": "Jared", "author_id": 3442, "author_profile": "https://St...
2008/09/11
[ "https://Stackoverflow.com/questions/57004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/572/" ]
57,010
<p>Please, now that I've re-written the question, and before it suffers from further <a href="https://stackoverflow.com/questions/56103/fastest-gun-in-the-west-problem">fast-gun answers</a> or premature closure by <a href="https://stackoverflow.com/users/905/keith">eager editors</a> let me point out that this is not a ...
[ { "answer_id": 57181, "author": "nlucaroni", "author_id": 157, "author_profile": "https://Stackoverflow.com/users/157", "pm_score": 2, "selected": false, "text": "REMOVE LENGTH 2: (no other length has other matches)\n//the lower case letters are the matches\nABCBAbabaBBCbcbcbVbvBCbcbcAB ...
2008/09/11
[ "https://Stackoverflow.com/questions/57010", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4200/" ]
57,020
<p>Was considering the <code>System.Collections.ObjectModel ObservableCollection&lt;T&gt;</code> class. This one is strange because </p> <ul> <li>it has an Add Method which takes <strong>one</strong> item only. No AddRange or equivalent. </li> <li>the Notification event arguments has a NewItems property, which is a <...
[ { "answer_id": 57069, "author": "fryguybob", "author_id": 4592, "author_profile": "https://Stackoverflow.com/users/4592", "pm_score": 4, "selected": false, "text": "INotifyCollectionChanged ObservableCollection<T> AddRange AddRange ObservableCollection<T> public class MyObservableCollect...
2008/09/11
[ "https://Stackoverflow.com/questions/57020", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1695/" ]
57,053
<p>I am writing some software to identify tracking numbers (in the same way that Google identifies FedEx or UPS numbers when you search for them). Most couriers use a system, such as a "weighted average mod system" which can be used to identify if a number is a valid tracking number. Does anyone know if TNT consignment...
[ { "answer_id": 19512345, "author": "user2902405", "author_id": 2902405, "author_profile": "https://Stackoverflow.com/users/2902405", "pm_score": 0, "selected": false, "text": " Dim number As String = TextBox1.Text\n Dim A As Integer\n Dim B As Integer\n Dim C As Integer\n Di...
2008/09/11
[ "https://Stackoverflow.com/questions/57053", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4939/" ]
57,054
<p>I've got a collection that implements an interface that extends both IList&lt;T> and List. </p> <pre><code>public Interface IMySpecialCollection : IList&lt;MyObject&gt;, IList { ... } </code></pre> <p>That means I have two versions of the indexer. </p> <p>I wish the generic implementation to be used, so I implem...
[ { "answer_id": 57093, "author": "Jarrett Meyer", "author_id": 5834, "author_profile": "https://Stackoverflow.com/users/5834", "pm_score": -1, "selected": false, "text": "T IList<T>.this[int index] { get; set; }\n" }, { "answer_id": 57166, "author": "Darryl Braaten", "auth...
2008/09/11
[ "https://Stackoverflow.com/questions/57054", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
57,091
<p>Let's say I have a parent DIV. Inside, there are three child DIVs: header, content and footer. Header is attached to the top of the parent and fills it horizontally. Footer is attached to the bottom of the parent and fills it horizontally too. Content is supposed to fill all the space between header and footer.</p> ...
[ { "answer_id": 57119, "author": "rpetrich", "author_id": 4007, "author_profile": "https://Stackoverflow.com/users/4007", "pm_score": 0, "selected": false, "text": "<div id=\"wrapper\">\n <div id=\"header\">\n header\n </div>\n <div id=\"content\">\n content\n </div>\n <div id=\"footer\...
2008/09/11
[ "https://Stackoverflow.com/questions/57091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5348/" ]
57,094
<p>I have ASP.NET web pages for which I want to build automated tests (using WatiN &amp; MBUnit). How do I start the ASP.Net Development Server from my code? I do not want to use IIS.</p>
[ { "answer_id": 57105, "author": "Dillie-O", "author_id": 71, "author_profile": "https://Stackoverflow.com/users/71", "pm_score": 4, "selected": true, "text": "C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\Webdev.WebServer.exe /port:[PORT NUMBER] /path: [PATH TO ROOT]\n" }, { ...
2008/09/11
[ "https://Stackoverflow.com/questions/57094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
57,104
<p>I'm going to be starting a project soon that requires support for large-ish binary files. I'd like to use Ruby on Rails for the webapp, but I'm concerned with the BLOB support. In my experience with other languages, frameworks, and databases, BLOBs are often overlooked and thus have poor, difficult, and/or buggy fun...
[ { "answer_id": 57201, "author": "John Topley", "author_id": 1450, "author_profile": "https://Stackoverflow.com/users/1450", "pm_score": 3, "selected": false, "text": ":binary class BlobTest < ActiveRecord::Migration\n def self.up\n create_table :files do |t|\n t.column :file_dat...
2008/09/11
[ "https://Stackoverflow.com/questions/57104", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3488/" ]
57,124
<p>I know I can call the GetVersionEx Win32 API function to retrieve Windows version. In most cases returned value reflects the version of my Windows, but sometimes that is not so.</p> <p>If a user runs my application under the compatibility layer, then GetVersionEx won't be reporting the real version but the version ...
[ { "answer_id": 57128, "author": "EBGreen", "author_id": 1358, "author_profile": "https://Stackoverflow.com/users/1358", "pm_score": 5, "selected": false, "text": "\"Select * from Win32_OperatingSystem\"\n \"Select Version from Win32_OperatingSystem\"\n function OperatingSystemDisplayName...
2008/09/11
[ "https://Stackoverflow.com/questions/57124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4997/" ]
57,137
<p>I recently upgraded to Subversion 1.5, and now I cannot commit my code to the repository. I get an error message: "403 Forbidden in response to MKACTIVITY". I know the upgrade worked because my fellow developers are not getting this issue. What's going on?</p>
[ { "answer_id": 29477185, "author": "Eve", "author_id": 713790, "author_profile": "https://Stackoverflow.com/users/713790", "pm_score": 0, "selected": false, "text": "subclipse 1.4 svn 1.4.3" }, { "answer_id": 44561204, "author": "user55926", "author_id": 3000788, "aut...
2008/09/11
[ "https://Stackoverflow.com/questions/57137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5626/" ]
57,140
<p>Say instead of returning void a method you returned a reference to the class even if it didn't make any particular semantic sense. It seems to me like it would give you more options on how the methods are called, allowing you to use it in a fluent-interface-like style and I can't really think of any disadvantages s...
[ { "answer_id": 57176, "author": "John Calsbeek", "author_id": 5696, "author_profile": "https://Stackoverflow.com/users/5696", "pm_score": 2, "selected": false, "text": "self" }, { "answer_id": 57212, "author": "Tim Frey", "author_id": 1471, "author_profile": "https://...
2008/09/11
[ "https://Stackoverflow.com/questions/57140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5056/" ]
57,145
<p>While creating classes in Java I often find myself creating instance-level collections that I know ahead of time will be very small - less than 10 items in the collection. But I don't know the number of items ahead of time so I typically opt for a dynamic collection (ArrayList, Vector, etc).</p> <pre><code>class Fo...
[ { "answer_id": 57185, "author": "John Calsbeek", "author_id": 5696, "author_profile": "https://Stackoverflow.com/users/5696", "pm_score": 4, "selected": true, "text": "ArrayList Object[] ArrayList ArrayList ArrayList" }, { "answer_id": 57341, "author": "Cagatay", "author_...
2008/09/11
[ "https://Stackoverflow.com/questions/57145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2881/" ]
57,152
<p>Let's say I've got Alpha things that may or may not <em>be</em> or be <em>related to</em> Bravo or Charlie things.</p> <p>These are one-to-one relationships: No Alpha will relate to more than one Bravo. And no Bravo will relate to more than one Alpha.</p> <p>I've got a few goals:</p> <ul> <li>a system that's eas...
[ { "answer_id": 57209, "author": "David Schmitt", "author_id": 4918, "author_profile": "https://Stackoverflow.com/users/4918", "pm_score": 3, "selected": false, "text": " Bravos\n --------\nFK PK AlphaId\n BravoOne\n BravoTwo\n BravoThree\n Alpha\n ----...
2008/09/11
[ "https://Stackoverflow.com/questions/57152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/83/" ]
57,168
<p>I have two identical tables and need to copy rows from table to another. What is the best way to do that? (I need to programmatically copy just a few rows, I don't need to use the bulk copy utility).</p>
[ { "answer_id": 57172, "author": "Jarrett Meyer", "author_id": 5834, "author_profile": "https://Stackoverflow.com/users/5834", "pm_score": 3, "selected": false, "text": "SELECT * INTO < new_table > FROM < existing_table > WHERE < clause >\n" }, { "answer_id": 57188, "author": ...
2008/09/11
[ "https://Stackoverflow.com/questions/57168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2536/" ]
57,183
<p>How do I get the history of commits that have been made to the repository for a particular user? </p> <p>I am able to access CVS either through the command line or TortioseCVS, so a solution using either method is sufficient.</p>
[ { "answer_id": 57218, "author": "Bill the Lizard", "author_id": 1288, "author_profile": "https://Stackoverflow.com/users/1288", "pm_score": 4, "selected": true, "text": "cvs history -u username\n" }, { "answer_id": 115301, "author": "Chris Noe", "author_id": 14749, "a...
2008/09/11
[ "https://Stackoverflow.com/questions/57183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3498/" ]
57,202
<p>I would like to put a link to a webpage in an alert dialog box so that I can give a more detailed description of how to fix the error that makes the dialog box get created. </p> <p>How can I make the dialog box show something like this:</p> <pre><code>There was an error. Go to this page to fix it. wwww.TheWebPag...
[ { "answer_id": 57214, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 2, "selected": false, "text": "alert()" }, { "answer_id": 57215, "author": "DrFloyd5", "author_id": 1736623, "author_profile": "https://Stac...
2008/09/11
[ "https://Stackoverflow.com/questions/57202", "https://Stackoverflow.com", "https://Stackoverflow.com/users/730/" ]
57,238
<p>Say I have several JavaScript includes in a page:</p> <pre><code>&lt;script type="text/javascript" src="/js/script0.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="/js/script1.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="/js/script2.js"&gt;&lt;/script&gt; &lt;script type="text/javascr...
[ { "answer_id": 57297, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "var script0Exists = true; // inside script0.js\nvar script1Exists = true; // inside script1.js\n if ( script0Exists ) {\n //...
2008/09/11
[ "https://Stackoverflow.com/questions/57238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5261/" ]
57,243
<p>I am trying to do something I've done a million times and it's not working, can anyone tell me why?</p> <p>I have a table for people who sent in resumes, and it has their email address in it...</p> <p>I want to find out if any of these people have NOT signed up on the web site. The aspnet_Membership table has all ...
[ { "answer_id": 57251, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 2, "selected": false, "text": "SELECT j.email\nFROM jobseeker j\nLEFT JOIN aspnet_Membership m ON m.email = j.email\nWHERE m.email IS NULL\n" }, {...
2008/09/11
[ "https://Stackoverflow.com/questions/57243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5255/" ]
57,249
<p>I'm interested in grabbing the EPG data from DVB-T streams. Does anyone know of any C libraries or an alternative means of getting the data?</p>
[ { "answer_id": 42530646, "author": "mkrufky", "author_id": 5535550, "author_profile": "https://Stackoverflow.com/users/5535550", "pm_score": 0, "selected": false, "text": "dvbtee" } ]
2008/09/11
[ "https://Stackoverflow.com/questions/57249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3796/" ]
57,287
<p>How do I create an rss feed in ASP.Net? Is there anything built in to support it? If not, what third-party tools are available?</p> <p>I'm thinking webforms, not MVC, though I suppose since this isn't a traditional page the difference may be minimal.</p>
[ { "answer_id": 57309, "author": "Alex Duggleby", "author_id": 5790, "author_profile": "https://Stackoverflow.com/users/5790", "pm_score": 2, "selected": false, "text": "public void PageLoad()\n{\n\n// create channel\nRssChannel _soChannel = new RssChannel();\n\n// create item\nRssItem _s...
2008/09/11
[ "https://Stackoverflow.com/questions/57287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3043/" ]
57,291
<p>I have seen <a href="https://stackoverflow.com/questions/4046/can-someone-give-me-a-working-example-of-a-buildxml-for-an-ear-that-deploys-in">this question</a> about deploying to WebSphere using the WAS ant tasks.</p> <p>Is there a simpler way to do this? In the past I have deployed to Tomcat by dropping a war fil...
[ { "answer_id": 57310, "author": "Juha Pohjalainen", "author_id": 5240, "author_profile": "https://Stackoverflow.com/users/5240", "pm_score": 2, "selected": false, "text": "wsadminlib.py.zip" }, { "answer_id": 359520, "author": "Hans-Peter Störr", "author_id": 21499, "...
2008/09/11
[ "https://Stackoverflow.com/questions/57291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1958/" ]
57,314
<p>What could the best strategy for writing validation layer for mid-enterprise level business application built on Spring 2.5</p> <p>I know that Spring provides facility where we can implement Validator interface and write validation logic in validate method. But this will be restricted to only web requests coming th...
[ { "answer_id": 67287, "author": "MetroidFan2002", "author_id": 8026, "author_profile": "https://Stackoverflow.com/users/8026", "pm_score": 0, "selected": false, "text": "boolean supports(Class clazz)\nvoid validate(Object target, Errors errors)\n Object target public interface ErrorRetur...
2008/09/11
[ "https://Stackoverflow.com/questions/57314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/959/" ]
57,350
<p>I want to point a file dialog at a particular folder in the current user's Local Settings folder on Windows. What is the shortcut to get this path?</p>
[ { "answer_id": 57363, "author": "Matthew Maravillas", "author_id": 2186, "author_profile": "https://Stackoverflow.com/users/2186", "pm_score": 6, "selected": true, "text": "String appData = \n Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);\n" }, { "...
2008/09/11
[ "https://Stackoverflow.com/questions/57350", "https://Stackoverflow.com", "https://Stackoverflow.com/users/327/" ]
57,355
<p>I'm having a little trouble figuring out exactly how const applies in a specific case. Here's the code I have:</p> <pre><code>struct Widget { Widget():x(0), y(0), z(0){} int x, y, z; }; struct WidgetHolder //Just a simple struct to hold four Widgets. { WidgetHolder(Widget a, Widget b, Widget c, Widget...
[ { "answer_id": 57370, "author": "Frank Krueger", "author_id": 338, "author_profile": "https://Stackoverflow.com/users/338", "pm_score": 2, "selected": false, "text": "WidgetHolder" }, { "answer_id": 57376, "author": "Greg Hewgill", "author_id": 893, "author_profile": ...
2008/09/11
[ "https://Stackoverflow.com/questions/57355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3175/" ]
57,380
<p>Will the code below work if the clock on the server is ahead of the clock on the client?</p> <pre><code>Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1)) </code></pre> <p>EDIT: the reason I ask is on one of our web apps some users are claiming they are seeing the pages ( account numbers, etc ) from a user tha...
[ { "answer_id": 57413, "author": "Joseph Bui", "author_id": 3275, "author_profile": "https://Stackoverflow.com/users/3275", "pm_score": 0, "selected": false, "text": "<input autocomplete=\"off\">\n" }, { "answer_id": 57715, "author": "Andrew Johnson", "author_id": 5109, ...
2008/09/11
[ "https://Stackoverflow.com/questions/57380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2357/" ]
57,383
<p>I am calling, through reflection, a method which may cause an exception. How can I pass the exception to my caller without the wrapper reflection puts around it?<br> I am rethrowing the InnerException, but this destroys the stack trace.<br> Example code:</p> <pre><code>public void test1() { // Throw an exceptio...
[ { "answer_id": 57387, "author": "GEOCHET", "author_id": 5640, "author_profile": "https://Stackoverflow.com/users/5640", "pm_score": 5, "selected": false, "text": "throw;\n" }, { "answer_id": 57389, "author": "skolima", "author_id": 3205, "author_profile": "https://Sta...
2008/09/11
[ "https://Stackoverflow.com/questions/57383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3205/" ]
57,421
<p>I would like to make an ajax call to a different server (same domain and box, just a different port.) e.g.</p> <p>My page is</p> <pre> http://localhost/index.html </pre> <p>I would like to make a ajax get request to:</p> <pre> http://localhost:7076/?word=foo </pre> <p>I am getting this error:</p> <pre> Access ...
[ { "answer_id": 57435, "author": "Joseph Bui", "author_id": 3275, "author_profile": "https://Stackoverflow.com/users/3275", "pm_score": 3, "selected": true, "text": "http://localhost/proxy?port=7076&url=%2f%3fword%3dfoo\n" }, { "answer_id": 57442, "author": "sblundy", "aut...
2008/09/11
[ "https://Stackoverflow.com/questions/57421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1638/" ]
57,424
<p>I'd like to use the camera in my Macbook in a program. I'm fairly language agnostic - C, Java, Python etc are all fine. Could anyone suggest the best place to look for documents or "Hello world" type code?</p>
[ { "answer_id": 57461, "author": "Chris Hanson", "author_id": 714, "author_profile": "https://Stackoverflow.com/users/714", "pm_score": 4, "selected": true, "text": "IKPictureTaker" }, { "answer_id": 2195738, "author": "meduz", "author_id": 234547, "author_profile": "h...
2008/09/11
[ "https://Stackoverflow.com/questions/57424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5346/" ]
57,439
<p>No, this is not a question about generics.</p> <p>I have a Factory pattern with several classes with internal constructors (I don't want them being instantiated if not through the factory).</p> <p>My problem is that <code>CreateInstance</code> fails with a "No parameterless constructor defined for this object" err...
[ { "answer_id": 57450, "author": "Kilhoffer", "author_id": 5469, "author_profile": "https://Stackoverflow.com/users/5469", "pm_score": 5, "selected": true, "text": "public class GenericFactory<T> where T : MyAbstractType\n{\n public static T GetInstance()\n {\n return Activat...
2008/09/11
[ "https://Stackoverflow.com/questions/57439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1782/" ]
57,449
<p>I'm working on a big .NET 1.1 project, and there exists a wish to upgrade this, majorily to be able to use better tools like Visual Studio 2008, but also because of the new features and smaller amount of bugs in the .NET 2.0 framework.</p> <p>The project consist for the bigger part of VB.NET, but there are also par...
[ { "answer_id": 74534, "author": "CindyH", "author_id": 12897, "author_profile": "https://Stackoverflow.com/users/12897", "pm_score": 1, "selected": false, "text": " Imports System.Web.Mail\n '\n Dim message As New MailMessage' this is a web.mail msg, not a net.mail msg\n Dim ...
2008/09/11
[ "https://Stackoverflow.com/questions/57449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5422/" ]
57,467
<p>Is there an equivalent of svn's blame for Perforce on the command line? <code>p4 annotate</code> doesn't display usernames -- only changeset numbers (without ancestor history!).</p> <p>I currently have to track code back through ancestors and compare against the filelog, and there just has to be an easier way -- ma...
[ { "answer_id": 57517, "author": "Mark", "author_id": 4405, "author_profile": "https://Stackoverflow.com/users/4405", "pm_score": 6, "selected": false, "text": "p4v.exe -cmd \"annotate //<path/to/file>\"\n" }, { "answer_id": 57661, "author": "cdleary", "author_id": 3594, ...
2008/09/11
[ "https://Stackoverflow.com/questions/57467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3594/" ]
57,479
<p>Help! I am using jQuery to make an AJAX call to fill in a drop-down dynamically given the user's previous input (from another drop-down, that is filled server-side). In all other browsers aside from Firefox (IE6/7, Opera, Safari), my append call actually appends the information below my existing option - "Select An ...
[ { "answer_id": 57514, "author": "Darryl Hein", "author_id": 5441, "author_profile": "https://Stackoverflow.com/users/5441", "pm_score": 0, "selected": false, "text": "<select name=\"Products\" id=\"Products\">\n<option value=\"\">Select Product</option>\n</select>\n\n<script type=\"text/...
2008/09/11
[ "https://Stackoverflow.com/questions/57479", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5405/" ]
57,483
<p>What is the difference between a pointer variable and a reference variable?</p>
[ { "answer_id": 57490, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 7, "selected": false, "text": "const const" }, { "answer_id": 57492, "author": "Brian R. Bondy", "author_id": 3153, "author_profile": "htt...
2008/09/11
[ "https://Stackoverflow.com/questions/57483", "https://Stackoverflow.com", "https://Stackoverflow.com/users/123/" ]
57,484
<p>I'm trying to do a basic "OR" on three fields using a hibernate criteria query.</p> <p>Example</p> <pre><code>class Whatever{ string name; string address; string phoneNumber; } </code></pre> <p>I'd like to build a criteria query where my search string could match "name" or "address" or "phoneNumber".</p>
[ { "answer_id": 57526, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 8, "selected": true, "text": "Restrictions.disjuntion() session.createCriteria(Whatever.class)\n .add(Restrictions.disjunction()\n .add(Restrictio...
2008/09/11
[ "https://Stackoverflow.com/questions/57484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1310/" ]
57,488
<p>Does anyone know of a way to declare a date constant that is compatible with international dates?</p> <p>I've tried:</p> <pre><code>' not international compatible public const ADate as Date = #12/31/04# ' breaking change if you have an optional parameter that defaults to this value ' because it isnt constant. pub...
[ { "answer_id": 57511, "author": "Rob Cooper", "author_id": 832, "author_profile": "https://Stackoverflow.com/users/832", "pm_score": 0, "selected": false, "text": "public static DateTime SadDayForAll()\n{\n return new DateTime(2001, 09, 11);\n}\n" }, { "answer_id": 57695, ...
2008/09/11
[ "https://Stackoverflow.com/questions/57488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5966/" ]
57,493
<p>In my WPF application, I have a number of databound TextBoxes. The <code>UpdateSourceTrigger</code> for these bindings is <code>LostFocus</code>. The object is saved using the File menu. The problem I have is that it is possible to enter a new value into a TextBox, select Save from the File menu, and never persist t...
[ { "answer_id": 58451, "author": "rudigrobler", "author_id": 5147, "author_profile": "https://Stackoverflow.com/users/5147", "pm_score": 3, "selected": false, "text": "TextBox focusedTextBox = Keyboard.FocusedElement as TextBox;\nif (focusedTextBox != null)\n{\n focusedTextBox.GetBindi...
2008/09/11
[ "https://Stackoverflow.com/questions/57493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/317/" ]
57,518
<p>Is it possible for <code>SelectNodes()</code> called on an <code>XmlDocument</code> to return null?</p> <p>My predicament is that I am trying to reach 100% unit test code coverage; ReSharper tells me that I need to guard against a null return from the <code>SelectNodes()</code> method, but I can see no way that an ...
[ { "answer_id": 57532, "author": "Jeremy McGee", "author_id": 3546, "author_profile": "https://Stackoverflow.com/users/3546", "pm_score": 3, "selected": true, "text": "using {} finally {} catch {}" } ]
2008/09/11
[ "https://Stackoverflow.com/questions/57518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5975/" ]
57,522
<p>I can create the following and reference it using</p> <pre><code>area[0].states[0] area[0].cities[0] var area = [ { "State" : "Texas", "Cities" : ['Austin','Dallas','San Antonio'] }, { "State" :"Arkansas", "Cities" : ['Little Rock','Texarkana','Hot...
[ { "answer_id": 57531, "author": "Eli Courtwright", "author_id": 1694, "author_profile": "https://Stackoverflow.com/users/1694", "pm_score": 2, "selected": true, "text": "area = {\n \"Texas\": ['Austin','Dallas','San Antonio']\n}\n states = {}\nfor(var j=0; j<area.length; j++)\n sta...
2008/09/11
[ "https://Stackoverflow.com/questions/57522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2755/" ]
57,537
<p>In my Servlet I would like to access the root of the context so that I can do some JavaScript minifying.</p> <p>It would be possible to do the minify as part of the install process but I would like to do it on Servlet startup to reduce the implementation cost.</p> <p>Does anyone know of a method for getting the co...
[ { "answer_id": 57563, "author": "Walter Rumsby", "author_id": 1654, "author_profile": "https://Stackoverflow.com/users/1654", "pm_score": -1, "selected": false, "text": "public class MyServlet extends HttpServlet {\n\n public void init(final ServletConfig config) {\n final Stri...
2008/09/11
[ "https://Stackoverflow.com/questions/57537", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4682/" ]
57,552
<p>Ok, so I got my extender working on a default.aspx page on my website and it looks good. I basically copied and pasted the code for it into a user control control.ascx page. When I do this I completely loose the functionality (just shows the target control label and no dropdown, even upon hover). Is there any rea...
[ { "answer_id": 57572, "author": "Craig", "author_id": 2894, "author_profile": "https://Stackoverflow.com/users/2894", "pm_score": 0, "selected": false, "text": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\" >\n" } ]
2008/09/11
[ "https://Stackoverflow.com/questions/57552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1491425/" ]
57,560
<p>What's the best way in c# to determine is a given QFE/patch has been installed?</p>
[ { "answer_id": 57626, "author": "rpetrich", "author_id": 4007, "author_profile": "https://Stackoverflow.com/users/4007", "pm_score": 1, "selected": false, "text": "System.Diagnostics.FileVersionInfo.GetVersionInfo(path)" }, { "answer_id": 205258, "author": "Bob King", "au...
2008/09/11
[ "https://Stackoverflow.com/questions/57560", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2564/" ]
57,567
<p>Is there an advantage to dynamically attaching/detaching event handlers?</p> <p>Would manually detaching handlers help ensure that there isn't a reference remaining to a disposed object?</p>
[ { "answer_id": 57605, "author": "OwenP", "author_id": 2547, "author_profile": "https://Stackoverflow.com/users/2547", "pm_score": 2, "selected": false, "text": "Handles AddHandler \nPublic Class Form1\n\n Public Sub New()\n ' This call is required by the Windows Form Designer. ...
2008/09/11
[ "https://Stackoverflow.com/questions/57567", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4770/" ]
57,584
<p>I've found some examples using the Win32 api or simulating the ^+ button combination (<kbd>ctrl</kbd>-<kbd>+</kbd>) <a href="http://www.codeproject.com/KB/list/AutoResize.aspx" rel="nofollow noreferrer">using SendKeys</a>, but at least with the SendKeys method the listview grabs the cursor and sets it to an hourglas...
[ { "answer_id": 58102, "author": "Matt Nelson", "author_id": 788, "author_profile": "https://Stackoverflow.com/users/788", "pm_score": 5, "selected": true, "text": "myListView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent)" }, { "answer_id": 54192601, "author": "...
2008/09/11
[ "https://Stackoverflow.com/questions/57584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/327/" ]
57,586
<p>I get this error on an update panel within a popupControlExtender which is within a dragPanelExtender.</p> <p>I see that a lot of other people have this issue and have various fixes none of which have worked for me.</p> <p>I would love to hear a logical explanation for why this is occurring and a foolproof way to ...
[ { "answer_id": 5105155, "author": "Gorgsenegger", "author_id": 412036, "author_profile": "https://Stackoverflow.com/users/412036", "pm_score": 2, "selected": false, "text": "var script = @\"\nif (Sys &&\n Sys.WebForms && Sys.WebForms.PageRequestManager &&\n Sys.WebForms.PageRequest...
2008/09/11
[ "https://Stackoverflow.com/questions/57586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3821/" ]
57,599
<p>What would be the best way to calculate someone's age in years, months, and days in T-SQL (SQL Server 2000)?</p> <p>The <code>datediff</code> function doesn't handle year boundaries well, plus getting the months and days separate will be a bear. I know I can do it on the client side relatively easily, but I'd like...
[ { "answer_id": 57642, "author": "Michael Runyon", "author_id": 5405, "author_profile": "https://Stackoverflow.com/users/5405", "pm_score": 0, "selected": false, "text": "Select DateDiff(d,'1984-07-12','2008-09-11')\n\nSelect DateDiff(m,'1984-07-12','2008-09-11')\n\nSelect DateDiff(yyyy,'...
2008/09/11
[ "https://Stackoverflow.com/questions/57599", "https://Stackoverflow.com", "https://Stackoverflow.com/users/845/" ]
57,600
<p>Should developers avoid using <a href="http://msdn.microsoft.com/en-us/library/923ahwt1.aspx" rel="nofollow noreferrer">continue</a> in C# or its equivalent in other languages to force the next iteration of a loop? Would arguments for or against overlap with arguments about <a href="https://stackoverflow.com/questio...
[ { "answer_id": 57611, "author": "Rob Walker", "author_id": 3631, "author_profile": "https://Stackoverflow.com/users/3631", "pm_score": 7, "selected": true, "text": "for (...)\n{\n if (!cond1)\n {\n if (!cond2)\n {\n ... highly indented lines ...\n }\n }\n}\n...
2008/09/11
[ "https://Stackoverflow.com/questions/57600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2831/" ]
57,609
<p>I'm working on a WinCE 6.0 system with a touchscreen that stores its calibration data (x-y location, offset, etc.) in the system registry (HKLM\HARDWARE\TOUCH). Right now, I'm placing the cal values into registry keys that get put into the OS image at build time. That works fine for the monitor that I get the orig...
[ { "answer_id": 59995, "author": "odbasta", "author_id": 2488, "author_profile": "https://Stackoverflow.com/users/2488", "pm_score": 3, "selected": false, "text": "[HKEY_LOCAL_MACHINE\\init\\BootVars]\n\"SystemHive\"=\"\\\\Hard Disk\\\\system.hv\"\n\"ProfileDir\"=\"\\\\Documents and Setti...
2008/09/11
[ "https://Stackoverflow.com/questions/57609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2488/" ]
57,615
<p>I have a console app in which I want to give the user <em>x</em> seconds to respond to the prompt. If no input is made after a certain period of time, program logic should continue. We assume a timeout means empty response.</p> <p>What is the most straightforward way of approaching this?</p>
[ { "answer_id": 57655, "author": "Gulzar Nazim", "author_id": 4337, "author_profile": "https://Stackoverflow.com/users/4337", "pm_score": 5, "selected": false, "text": "class Sample \n{\n public static void Main() \n {\n ConsoleKeyInfo cki = new ConsoleKeyInfo();\n\n do {\n ...
2008/09/11
[ "https://Stackoverflow.com/questions/57615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/337/" ]
57,622
<p>I have a start of a webapp that I wrote without using the Object Oriented features of PHP.</p> <p>I don't really know if it is worth it to go back and rewrite the parts I have finished. Is object oriented PHP worth rewriting all or part of a decent working app?</p>
[ { "answer_id": 7279484, "author": "diyism", "author_id": 264181, "author_profile": "https://Stackoverflow.com/users/264181", "pm_score": 0, "selected": false, "text": "<?php\n$array1->array_flip(this);\n?>\n ->mode() <?php\n$array1->mode('class1', $success);\n?>\n ->construct() ->validat...
2008/09/11
[ "https://Stackoverflow.com/questions/57622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/673/" ]
57,625
<p>This one will take some explaining. What I've done is create a specific custom message queue in SQL Server 2005. I have a table with messages that contain timestamps for both acknowledgment and completion. The stored procedure that callers execute to obtain the next message in their queue also acknowledges the messa...
[ { "answer_id": 57637, "author": "Blorgbeard", "author_id": 369, "author_profile": "https://Stackoverflow.com/users/369", "pm_score": -1, "selected": false, "text": "begin transaction\n\n--Grab the next message id\ndeclare @MessageId uniqueidentifier\nset @MessageId = (select top(1) Actio...
2008/09/11
[ "https://Stackoverflow.com/questions/57625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5469/" ]
57,652
<p>Scenario:</p> <ol> <li>The user has two monitors.</li> <li>Their browser is open on the secondary monitor.</li> <li>They click a link in the browser which calls window.open() with a specific top and left window offset.</li> <li>The popup window always opens on their primary monitor.</li> </ol> <p>Is there any way ...
[ { "answer_id": 57680, "author": "Jared", "author_id": 1980, "author_profile": "https://Stackoverflow.com/users/1980", "pm_score": -1, "selected": false, "text": "var x = 0;\nvar y = 0;\nvar myWin = window.open(''+self.location,'mywin','left='+x+',top='+y+',width=500,height=500,toolbar=1,...
2008/09/11
[ "https://Stackoverflow.com/questions/57652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1436/" ]
57,665
<p>Is there an easy way to return data to web service clients in JSON using Rails?</p>
[ { "answer_id": 57761, "author": "Orion Edwards", "author_id": 234, "author_profile": "https://Stackoverflow.com/users/234", "pm_score": 2, "selected": false, "text": "#to_json to_json" }, { "answer_id": 245486, "author": "JasonOng", "author_id": 6048, "author_profile"...
2008/09/11
[ "https://Stackoverflow.com/questions/57665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5988/" ]
57,679
<p>I'm trying to determine, based on the result of this call, if it was successful. The <code>successFunction</code> doesn't get called, so I'm assuming it was not. How do I know what went wrong?</p> <pre><code>xmlRequest = $.post("/url/file/", { 'id' : object.id }, successFunction, 'json'); </code></pre> <p>Do I use...
[ { "answer_id": 57997, "author": "defrex", "author_id": 6007, "author_profile": "https://Stackoverflow.com/users/6007", "pm_score": 4, "selected": true, "text": "$.ajax({\n url:\"/url/file/\",\n dataType:\"json\"\n data:{ 'id' : object.id }\n error:function(request){alert(requ...
2008/09/11
[ "https://Stackoverflow.com/questions/57679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5261/" ]
57,689
<p>Is there an easy way to return data to web service clients in JSON using java? I'm fine with servlets, spring, etc.</p>
[ { "answer_id": 57737, "author": "Stu Thompson", "author_id": 2961, "author_profile": "https://Stackoverflow.com/users/2961", "pm_score": 2, "selected": false, "text": "private String getJsonDocumenent(Object myObj) (\n String result = \"oops\";\n try {\n JSONArray jsonArray ...
2008/09/11
[ "https://Stackoverflow.com/questions/57689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5988/" ]
57,701
<p>It's <a href="http://www.codeproject.com/KB/cs/csharpcasts.aspx" rel="noreferrer">shown</a> that 'as' casting is much faster than prefix casting, but what about 'is' reflection? How bad is it? As you can imagine, searching for 'is' on Google isn't terribly effective.</p>
[ { "answer_id": 57713, "author": "swilliams", "author_id": 736, "author_profile": "https://Stackoverflow.com/users/736", "pm_score": 3, "selected": false, "text": "if (obj is Foo) {\n Foo f = (Foo)obj;\n f.doSomething();\n}\n Foo f = obj as Foo;\nif (f != null) {\n f.doSomething();\n}\...
2008/09/11
[ "https://Stackoverflow.com/questions/57701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3279/" ]
57,708
<p>I'm doing some web scraping and sites frequently use HTML entities to represent non ascii characters. Does Python have a utility that takes a string with HTML entities and returns a unicode type?</p> <p>For example:</p> <p>I get back:</p> <pre><code>&amp;#x01ce; </code></pre> <p>which represents an "ǎ" with a to...
[ { "answer_id": 57745, "author": "jfs", "author_id": 4279, "author_profile": "https://Stackoverflow.com/users/4279", "pm_score": 3, "selected": false, "text": "BeautifulSoup import copy, re\nfrom BeautifulSoup import BeautifulSoup\n\nhexentityMassage = copy.copy(BeautifulSoup.MARKUP_MASSA...
2008/09/11
[ "https://Stackoverflow.com/questions/57708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/680/" ]
57,718
<p>Has anyone actually shipped an Entity Framework project that does O/R mapping into conceptual classes that are quite different from the tables in the datastore?</p> <p>I mean collapse junction (M:M) tables into other entities to form <strong>Conceptual</strong> classes that exist in the business domain but are orga...
[ { "answer_id": 58181, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 2, "selected": false, "text": "<edmx:ConceptualModels>\n <Schema xmlns=\"http://schemas.microsoft.com/ado/2006/04/edm\" Namespace=\"Model1\" Alias=\"Se...
2008/09/11
[ "https://Stackoverflow.com/questions/57718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5642/" ]
57,725
<p>Let's say I want a way to display just the the center 50x50px of an image that's 250x250px in HTML. How can I do that. Also, is there a way to do this for css:url() references? <p> I'm aware of <em>clip</em> in CSS, but that seems to only work when used with absolute positioning.</p>
[ { "answer_id": 4639862, "author": "David Thomas", "author_id": 82548, "author_profile": "https://Stackoverflow.com/users/82548", "pm_score": 8, "selected": false, "text": "clip position: absolute; .container {\n position: relative;\n}\n#clip {\n position: absolute;\n clip: rect(0, 100...
2008/09/11
[ "https://Stackoverflow.com/questions/57725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4489/" ]
57,751
<p>I want to find any text in a file that matches a regexp of the form <em>t</em><code>[A-Z]</code><em>u</em> (i.e., a match <em>t</em> followed by a capital letter and another match <em>u</em>, and transform the matched text so that the capital letter is lowercase. For example, for the regexp <code>x[A-Z]y</code></p> ...
[ { "answer_id": 57794, "author": "Marcel Levy", "author_id": 676, "author_profile": "https://Stackoverflow.com/users/676", "pm_score": 5, "selected": true, "text": "replace-regexp \\,(capitalize \\1)" } ]
2008/09/11
[ "https://Stackoverflow.com/questions/57751", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1412/" ]
57,766
<p>I am getting the below error and call stack at the same time everyday after several hours of application use. Can anyone shed some light on what is happening?</p> <pre><code>System.InvalidOperationException: BufferedGraphicsContext cannot be disposed of because a buffer operation is currently in progress. at Syste...
[ { "answer_id": 21282876, "author": "TheQaa", "author_id": 2028568, "author_profile": "https://Stackoverflow.com/users/2028568", "pm_score": 0, "selected": false, "text": "BufferedGraphicsContext _BackbufferContext = BufferedGraphicsManager.Current;\n BufferedGraphicsContext _BackbufferCo...
2008/09/11
[ "https://Stackoverflow.com/questions/57766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4770/" ]
57,776
<p>I have a free standing set of files not affiliated with any C# project at all that reside in a complicated nested directory structure.</p> <p>I want to add them in that format to a different directory in an ASP.NET web application I am working on; while retaining the same structure. So, I copied the folder into the...
[ { "answer_id": 13624351, "author": "Boris_P_", "author_id": 1395598, "author_profile": "https://Stackoverflow.com/users/1395598", "pm_score": 0, "selected": false, "text": "*.cs *.cpp" }, { "answer_id": 30772845, "author": "Bjego", "author_id": 3337035, "author_profil...
2008/09/11
[ "https://Stackoverflow.com/questions/57776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2213/" ]
57,791
<p>I have a page which does quite a bit of work and I don't want the user to be able to navigate away from that page (close browser, hit back button, etc.) without getting a warning. I found that the onbeforeunload event (which I think is IE-specific, which works fine for me as the project uses lots of ActiveX) works g...
[ { "answer_id": 57827, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 4, "selected": true, "text": "javascript: <!-- clicking this link will do nothing. No onbeforeunload handler triggered. \nNothing. \nAnd you could put something...
2008/09/11
[ "https://Stackoverflow.com/questions/57791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2577/" ]
57,803
<p>How do you convert decimal values to their hexadecimal equivalent in JavaScript?</p>
[ { "answer_id": 57805, "author": "Prestaul", "author_id": 5628, "author_profile": "https://Stackoverflow.com/users/5628", "pm_score": 13, "selected": true, "text": "hexString = yourNumber.toString(16);\n yourNumber = parseInt(hexString, 16);\n" }, { "answer_id": 57807, "author...
2008/09/11
[ "https://Stackoverflow.com/questions/57803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5556/" ]
57,804
<p>Now, before you say it: I <strong>did</strong> Google and my <code>hbm.xml</code> file <strong>is</strong> an Embedded Resource. </p> <p>Here is the code I am calling:</p> <pre><code>ISession session = GetCurrentSession(); var returnObject = session.Get&lt;T&gt;(Id); </code></pre> <p>Here is my mapping file for ...
[ { "answer_id": 57860, "author": "Matt Hinze", "author_id": 2676, "author_profile": "https://Stackoverflow.com/users/2676", "pm_score": 2, "selected": false, "text": "name=\"Id\"" }, { "answer_id": 57995, "author": "Andy S", "author_id": 3759, "author_profile": "https:...
2008/09/11
[ "https://Stackoverflow.com/questions/57804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4140/" ]
57,812
<p>I have a div with <code>id="a"</code> that may have any number of classes attached to it, from several groups. Each group has a specific prefix. In the javascript, I don't know which class from the group is on the div. I want to be able to clear all classes with a given prefix and then add a new one. If I want to re...
[ { "answer_id": 57819, "author": "Prestaul", "author_id": 5628, "author_profile": "https://Stackoverflow.com/users/5628", "pm_score": 4, "selected": false, "text": "$(\"#a\").className = $(\"#a\").className.replace(/\\bbg.*?\\b/g, '');\n function removeClassByPrefix(el, prefix) {\n var...
2008/09/11
[ "https://Stackoverflow.com/questions/57812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5464/" ]
57,840
<p>I have a wrapper around a C++ function call which I call from C# code. How do I attach a debugger in Visual Studio to step into the native C++ code?</p> <p>This is the wrapper that I have which calls GetData() defined in a C++ file:</p> <pre><code> [DllImport("Unmanaged.dll", CallingConvention=CallingConvention...
[ { "answer_id": 58954, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": ".sympath\n.sympath+ \n.symfix\n .srcpath\n .extpath \n sxe ld:mscorwks\n .chain\n .loadby sos mscorwks\n .reload\n" } ]
2008/09/11
[ "https://Stackoverflow.com/questions/57840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5734/" ]
57,845
<p>Is it possible to use BackGroundWorker thread in <a href="http://en.wikipedia.org/wiki/ASP.NET" rel="nofollow noreferrer">ASP.NET</a> 2.0 for the following scenario, so that the user at the browser's end does not have to wait for long time?</p> <h2>Scenario</h2> <ol> <li>The browser requests a page, say SendEmails...
[ { "answer_id": 57847, "author": "Darren Kopp", "author_id": 77, "author_profile": "https://Stackoverflow.com/users/77", "pm_score": 3, "selected": false, "text": "ThreadPool.QueueUserWorkItem(delegateThatSendsEmails)\n" }, { "answer_id": 431015, "author": "Community", "au...
2008/09/11
[ "https://Stackoverflow.com/questions/57845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647/" ]
57,849
<p>There doesn't seem to be a way to change the padding (or row height) for all rows in a .NET ListView. Does anybody have an elegant hack-around?</p>
[ { "answer_id": 13072438, "author": "Quinn Johns", "author_id": 1539718, "author_profile": "https://Stackoverflow.com/users/1539718", "pm_score": 4, "selected": false, "text": "using System.Runtime.InteropServices;\n [DllImport(\"user32.dll\")]\npublic static extern int SendMessage(IntPtr...
2008/09/11
[ "https://Stackoverflow.com/questions/57849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
57,854
<p>How can I close a browser window without receiving the <em>Do you want to close this window</em> prompt?</p> <p>The prompt occurs when I use the <code>window.close();</code> function.</p>
[ { "answer_id": 57857, "author": "Derek", "author_id": 5440, "author_profile": "https://Stackoverflow.com/users/5440", "pm_score": -1, "selected": false, "text": "this.focus();\nself.opener=this;\nself.close();\n" }, { "answer_id": 57868, "author": "Harley Holcombe", "auth...
2008/09/11
[ "https://Stackoverflow.com/questions/57854", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5440/" ]
57,855
<p>I'm troubleshooting a problem with creating Vista shortcuts.</p> <p>I want to make sure that our Installer is reading the Programs folder from the right registry key.</p> <p>It's reading it from:</p> <pre><code>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Programs </code></pr...
[ { "answer_id": 58261, "author": "Clay Nichols", "author_id": 4906, "author_profile": "https://Stackoverflow.com/users/4906", "pm_score": 0, "selected": false, "text": "public class Utilities\n{\n\n public enum FolderPaths\n {\n CSIDL_DESKTOP = 0x0000, ...
2008/09/11
[ "https://Stackoverflow.com/questions/57855", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4906/" ]
57,859
<p>The ReSharper reformat code feature is very handy and flexible, particularly with the new code layout templating flexibility JetBrains have added in version 3.0.</p> <p>Is there a standard set of code style settings for ReSharper which match the rules enforced by <a href="http://code.msdn.microsoft.com/sourceanalys...
[ { "answer_id": 271495, "author": "KeesDijk", "author_id": 6434, "author_profile": "https://Stackoverflow.com/users/6434", "pm_score": 2, "selected": false, "text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Patterns xmlns=\"urn:shemas-jetbrains-com:member-reordering-patterns\">\n\n <...
2008/09/11
[ "https://Stackoverflow.com/questions/57859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5975/" ]
57,878
<p>If I create an index on columns (A, B, C), in that order, my understanding is that the database will be able to use it even if I search only on (A), or (A and B), or (A and B and C), but not if I search only on (B), or (C), or (B and C). Is this correct?</p>
[ { "answer_id": 59370, "author": "Ethan Post", "author_id": 4527, "author_profile": "https://Stackoverflow.com/users/4527", "pm_score": 3, "selected": false, "text": "create table mytab nologging as (\nselect mod(rownum, 3) x, rownum y, mod(rownum, 3) z from all_objects, (select 'x' from...
2008/09/11
[ "https://Stackoverflow.com/questions/57878", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5295/" ]
57,910
<p>Grails scaffolding defaults to 10 rows per page. I would like to increase that number without generating the views and changing the 10 in every file. Where do I change the default?</p>
[ { "answer_id": 58239, "author": "codeLes", "author_id": 3030, "author_profile": "https://Stackoverflow.com/users/3030", "pm_score": 1, "selected": false, "text": "class PersonController {\n def scaffold = true\n\n def list = {\n if(!params.max) params.max = 20\n [ personList: Per...
2008/09/11
[ "https://Stackoverflow.com/questions/57910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
57,918
<p>We have a whole bunch of queries that "search" for clients, customers, etc. You can search by first name, email, etc. We're using LIKE statements in the following manner: </p> <pre><code>SELECT * FROM customer WHERE fname LIKE '%someName%' </code></pre> <p>Does full-text indexing help in the scenario? We're usi...
[ { "answer_id": 58176, "author": "Josef", "author_id": 5581, "author_profile": "https://Stackoverflow.com/users/5581", "pm_score": 5, "selected": false, "text": "LIKE LIKE % CONTAINS FREETEXT LIKE" } ]
2008/09/11
[ "https://Stackoverflow.com/questions/57918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/781/" ]
57,919
<p>I'm working on a Windows Forms (.NET 3.5) application that has a built-in exception handler to catch any (heaven forbid) exceptions that may arise. I'd like the exception handler to be able to prompt the user to click a <kbd>Send Error Report</kbd> button, which would then cause the app to send an email to my FogBug...
[ { "answer_id": 58023, "author": "Dr8k", "author_id": 6014, "author_profile": "https://Stackoverflow.com/users/6014", "pm_score": 3, "selected": false, "text": "<system.net>\n <mailSettings>\n <smtp deliveryMethod=\"Network\" from=\"stuff@somewhere.com.au\">\n <network host...
2008/09/11
[ "https://Stackoverflow.com/questions/57919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5473/" ]
57,923
<p>I've been writing C / C++ code for almost twenty years, and I know Perl, Python, PHP, and some Java as well, and I'm teaching myself JavaScript. But I've never done any .NET, VB, or C# stuff. What exactly does <strong>managed</strong> code mean?</p> <p>Wikipedia <a href="http://en.wikipedia.org/wiki/Managed_code" r...
[ { "answer_id": 108137, "author": "Josh Smeaton", "author_id": 10583, "author_profile": "https://Stackoverflow.com/users/10583", "pm_score": 3, "selected": false, "text": "class Bar : public Foo {\n private:\n int fubar;\n public:\n Bar(int i) : fubar(i) {}\n ...
2008/09/11
[ "https://Stackoverflow.com/questions/57923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1821/" ]
57,927
<p>I have an excel spreadsheet in a format similar to the following...</p> <pre><code>| NAME | CLUB | STATUS | SCORE | | Fred | a | Gent | 145 | | Bert | a | Gent | 150 | | Harry | a | Gent | 195 | | Jim | a | Gent | 150 | | Clare | a | Lady | 99 | | Simon | a | Junior | 130...
[ { "answer_id": 60187, "author": "Dick Kusleika", "author_id": 4280, "author_profile": "https://Stackoverflow.com/users/4280", "pm_score": 3, "selected": true, "text": "Public Function TopTen(Club As String, Scores As Range)\n\n Dim i As Long\n Dim vaScores As Variant\n Dim bLady...
2008/09/11
[ "https://Stackoverflow.com/questions/57927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3720/" ]
57,947
<p>I'm really confused by the various configuration options for .Net configuration of dll's, ASP.net websites etc in .Net v2 - especially when considering the impact of a config file at the UI / end-user end of the chain.</p> <p>So, for example, some of the applications I work with use settings which we access with:</...
[ { "answer_id": 57980, "author": "Rob Gray", "author_id": 5691, "author_profile": "https://Stackoverflow.com/users/5691", "pm_score": 2, "selected": false, "text": "string phoneNum = Properties.Settings.Default.EmergencyPhoneNumber;\n" } ]
2008/09/11
[ "https://Stackoverflow.com/questions/57947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6004/" ]
57,958
<p>I like HtmlControls because there is no HTML magic going on... the asp source looks similar to what the client sees. </p> <p>I can't argue with the utility of GridView, Repeater, CheckBoxLists, etc, so I use them when I need that functionality. </p> <p>Also, it looks weird to have code that mixes and matches:</p> ...
[ { "answer_id": 57961, "author": "Darren Kopp", "author_id": 77, "author_profile": "https://Stackoverflow.com/users/77", "pm_score": 1, "selected": false, "text": "<input id='btnCancel' type='button' value='Cancel' />\n" }, { "answer_id": 57986, "author": "Tyler", "author_...
2008/09/11
[ "https://Stackoverflow.com/questions/57958", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4435/" ]
57,987
<p>Does anyone know how to write to an excel file (.xls) via OLEDB in C#? I'm doing the following:</p> <pre><code> OleDbCommand dbCmd = new OleDbCommand("CREATE TABLE [test$] (...)", connection); dbCmd.CommandTimeout = mTimeout; results = dbCmd.ExecuteNonQuery(); </code></pre> <p>But I get an OleDbException ...
[ { "answer_id": 184213, "author": "Zorantula", "author_id": 18108, "author_profile": "https://Stackoverflow.com/users/18108", "pm_score": 4, "selected": true, "text": "ReadOnly=False; Provider=Microsoft.Jet.OLEDB.4.0;Data Source=fifa_ng_db.xls;Mode=ReadWrite;ReadOnly=false;Extended Proper...
2008/09/12
[ "https://Stackoverflow.com/questions/57987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39040/" ]
57,990
<p>After attending a recent Alt.NET group on IoC, I got to thinking about the tools available and how they might work. <code>StructureMap</code> in particular uses both attributes and bootstrapper concepts to map requests for <code>IThing</code> to <code>ConcreteThing</code>. Attributes automatically throw up flags f...
[ { "answer_id": 184830, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "IRepository _repository = ObjectFactory.BuildFactory<IRepository>();\n" } ]
2008/09/12
[ "https://Stackoverflow.com/questions/57990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4541/" ]
57,999
<p>I'm just looking for a simple, concise explanation of the difference between these two. MSDN doesn't go into a hell of a lot of detail here.</p>
[ { "answer_id": 58026, "author": "rpetrich", "author_id": 4007, "author_profile": "https://Stackoverflow.com/users/4007", "pm_score": 7, "selected": true, "text": "__declspec(dllexport) __declspec(dllimport)" }, { "answer_id": 58031, "author": "Shog9", "author_id": 811, ...
2008/09/12
[ "https://Stackoverflow.com/questions/57999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3146/" ]
58,000
<p>We have a recurring problem at my company with build breaks in our Flex projects. The problem primarily occurs because the build that the developers do on their local machines is fundamentally different from the build that occurs on the build machine. The devs are building the projects using <code>FlexBuilder/eclips...
[ { "answer_id": 58026, "author": "rpetrich", "author_id": 4007, "author_profile": "https://Stackoverflow.com/users/4007", "pm_score": 7, "selected": true, "text": "__declspec(dllexport) __declspec(dllimport)" }, { "answer_id": 58031, "author": "Shog9", "author_id": 811, ...
2008/09/12
[ "https://Stackoverflow.com/questions/58000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1946325/" ]
58,024
<p>I'm trying to provide a link to my company's website from a Windows Form. I want to be well behaved and launch using the user's preferred browser.</p> <p>What is the best way to open a URL in the user's default browser from a Windows Forms application?</p>
[ { "answer_id": 58032, "author": "Aaron Wagner", "author_id": 3909, "author_profile": "https://Stackoverflow.com/users/3909", "pm_score": 5, "selected": false, "text": "using System.Diagnostics;\n\nProcess.Start(\"http://www.google.com/\");\n" }, { "answer_id": 58033, "author"...
2008/09/12
[ "https://Stackoverflow.com/questions/58024", "https://Stackoverflow.com", "https://Stackoverflow.com/users/148/" ]
58,054
<p>I have a list of bean objects passed into my JSP page, and one of them is a comment field. This field may contain newlines, and I want to replace them with semicolons using JSTL, so that the field can be displayed in a text input. I have found one solution, but it's not very elegant. I'll post below as a possibility...
[ { "answer_id": 58060, "author": "parkerfath", "author_id": 6027, "author_profile": "https://Stackoverflow.com/users/6027", "pm_score": 7, "selected": true, "text": "<%@ taglib prefix=\"fn\" uri=\"http://java.sun.com/jsp/jstl/functions\" %>\n<% pageContext.setAttribute(\"newLineChar\", \"...
2008/09/12
[ "https://Stackoverflow.com/questions/58054", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6027/" ]
58,058
<p>I'm trying to write a small class library for a C++ course.</p> <p>I was wondering if it was possible to define a set of classes in my shared object and then using them directly in my main program that demos the library. Are there any tricks involved? I remember reading this long ago (before I started really progra...
[ { "answer_id": 58061, "author": "Kristopher Johnson", "author_id": 1175, "author_profile": "https://Stackoverflow.com/users/1175", "pm_score": 5, "selected": true, "text": "-fPIC -shared" }, { "answer_id": 58171, "author": "Flame", "author_id": 5387, "author_profile":...
2008/09/12
[ "https://Stackoverflow.com/questions/58058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5387/" ]
58,119
<p>I can't tell from the Python documentation whether the re.compile(x) function may throw an exception (assuming you pass in a string). I imagine there is something that could be considered an invalid regular expression. The larger question is, where do I go to find if a given Python library call may throw exception(s...
[ { "answer_id": 58129, "author": "Blair Conrad", "author_id": 1199, "author_profile": "https://Stackoverflow.com/users/1199", "pm_score": 5, "selected": true, "text": "re.compile >>> import re\n>>> re.compile('he(lo')\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <mo...
2008/09/12
[ "https://Stackoverflow.com/questions/58119", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1892/" ]
58,123
<p>This is actually a two part question. First,does the HttpContext.Current correspond to the current System.UI.Page object?</p> <p>And the second question, which is probably related to the first, is why can't I use the following to see if the current page implements an interface:</p> <pre><code>private IWebBase Find...
[ { "answer_id": 58128, "author": "Kilhoffer", "author_id": 5469, "author_profile": "https://Stackoverflow.com/users/5469", "pm_score": 5, "selected": false, "text": "HttpContext.Handler HttpContext.Current" }, { "answer_id": 58131, "author": "Ash", "author_id": 5023, "...
2008/09/12
[ "https://Stackoverflow.com/questions/58123", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1685/" ]
58,141
<p>I knew of some performance reasons back in the SQL 7 days, but do the same issues still exist in SQL Server 2005? If I have a resultset in a stored procedure that I want to act upon individually, are cursors still a bad choice? If so, why?</p>
[ { "answer_id": 6052778, "author": "Gayan", "author_id": 760195, "author_profile": "https://Stackoverflow.com/users/760195", "pm_score": 2, "selected": false, "text": "DECLARE @commandname NVARCHAR(1000) = '';\n\nSELECT @commandname += 'truncate table ' + tablename + '; ';\nFROM tableName...
2008/09/12
[ "https://Stackoverflow.com/questions/58141", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5469/" ]
58,146
<p>I am trying to come up with the best way to render some hierarchical data in to a nested unordered list using ASP.NET MVC. Does anyone have any tips on how to do this?</p>
[ { "answer_id": 282066, "author": "Paco", "author_id": 13376, "author_profile": "https://Stackoverflow.com/users/13376", "pm_score": 1, "selected": false, "text": "/// This is the model class\npublic class MyTreeNode<T>\n{\n public ICollection<MyTreeNode> ChildNodes {get;}\n public ...
2008/09/12
[ "https://Stackoverflow.com/questions/58146", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5360/" ]
58,184
<p>Is there something special about Safari for Windows and AJAX?<br> In other words: Are there some common pitfalls I should keep in mind?</p>
[ { "answer_id": 58287, "author": "John Millikin", "author_id": 3560, "author_profile": "https://Stackoverflow.com/users/3560", "pm_score": 2, "selected": false, "text": "return false event.preventDefault() event.stopPropagation() event return" } ]
2008/09/12
[ "https://Stackoverflow.com/questions/58184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6024/" ]
58,190
<p>My current view is no, prefer Transact SQL stored procedures because they are a lighter weight and (possibly) higher performing option, while CLR procedures allow developers to get up to all sorts of mischief.</p> <p>However recently I have needed to debug some very poorly written TSQL stored procs. As usual I fou...
[ { "answer_id": 24812630, "author": "Solomon Rutzky", "author_id": 577765, "author_profile": "https://Stackoverflow.com/users/577765", "pm_score": 0, "selected": false, "text": "OPENQUERY OPENROWSET OPENQUERY OPENROWSET PRINT RAISERROR" } ]
2008/09/12
[ "https://Stackoverflow.com/questions/58190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5023/" ]
58,207
<p>To create a playlist for all of the music in a folder, I am using the following command in bash:</p> <pre><code>ls &gt; list.txt </code></pre> <p>I would like to use the result of the <code>pwd</code> command for the name of the playlist.</p> <p>Something like:</p> <pre><code>ls &gt; ${pwd}.txt </code></pre> <p...
[ { "answer_id": 58212, "author": "John Calsbeek", "author_id": 5696, "author_profile": "https://Stackoverflow.com/users/5696", "pm_score": 8, "selected": true, "text": "\"$(command substitution)\" ls > \"$(pwd).txt\"\n ls > \"`pwd`.txt\"\n pwd .txt basename ls > \"$(basename \"$(pwd)\").t...
2008/09/12
[ "https://Stackoverflow.com/questions/58207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/840/" ]
58,230
<p>Is there another way to render graphics in C# beyond <a href="https://en.wikipedia.org/wiki/Graphics_Device_Interface#Windows_XP" rel="nofollow noreferrer">GDI+</a> and <a href="http://en.wikipedia.org/wiki/Microsoft_XNA" rel="nofollow noreferrer">XNA</a>? </p> <p>(For the development of a tile map editor.)</p>
[ { "answer_id": 58242, "author": "Ash", "author_id": 5023, "author_profile": "https://Stackoverflow.com/users/5023", "pm_score": 2, "selected": false, "text": "Lock Unlock" } ]
2008/09/12
[ "https://Stackoverflow.com/questions/58230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/568/" ]
58,245
<p>I've got a menu that contains, among other things, some most-recently-used file paths. The paths to these files can be long, so the text sometimes gets clipped like "C:\Progra...\foo.txt"</p> <p>I'd like to pop a tooltip with the full path when the user hovers over the item, but this doesn't seem possible with the...
[ { "answer_id": 58253, "author": "aku", "author_id": 1196, "author_profile": "https://Stackoverflow.com/users/1196", "pm_score": 1, "selected": false, "text": "Tooltip" }, { "answer_id": 58258, "author": "andynil", "author_id": 446, "author_profile": "https://Stackover...
2008/09/12
[ "https://Stackoverflow.com/questions/58245", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2773/" ]