qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
253,099
<p>I want to examine the contents of a <code>std::vector</code> in GDB, how do I do it? Let's say it's a <code>std::vector&lt;int&gt;</code> for the sake of simplicity.</p>
[ { "answer_id": 253101, "author": "John Carter", "author_id": 8331, "author_profile": "https://Stackoverflow.com/users/8331", "pm_score": 8, "selected": false, "text": "print *(myVector._M_impl._M_start)@myVector.size()\n print *(myVector._M_impl._M_start)@N\n myVector._M_impl._M_start \n...
2008/10/31
[ "https://Stackoverflow.com/questions/253099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8331/" ]
253,121
<p>In CSS, you can specify the spacing between table cells using the border-spacing property of a table.</p> <p>However, this results in uniform spacing between columns and rows, and I am finding more situations where the designs I am using call for gaps between rows, but not columns, or visa versa.</p> <p>If I have ...
[ { "answer_id": 253126, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 5, "selected": true, "text": "border-spacing border-spacing: 1px 2px;\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/253121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1577190/" ]
253,125
<p>Does anyone know how I can add a class to the link rendered using the Html.RouteLink helper method in ASP.Net MVC, it has the htmlAttributes object as the last parameter which I assumed I would be able to use, but since class is obviously a reserved word, I cannot supply this as one of the properties on the object.<...
[ { "answer_id": 253180, "author": "Hrvoje Hudo", "author_id": 1407, "author_profile": "https://Stackoverflow.com/users/1407", "pm_score": 3, "selected": false, "text": "<%= Html.RouteLink(\"Default\", \"Default\",null, new { Class=\"css_class\"}) %>\n" }, { "answer_id": 253369, ...
2008/10/31
[ "https://Stackoverflow.com/questions/253125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5160/" ]
253,138
<p>Having a bit of trouble with the syntax where we want to call a delegate anonymously within a Control.Invoke.</p> <p>We have tried a number of different approaches, all to no avail.</p> <p>For example:</p> <pre><code>myControl.Invoke(delegate() { MyMethod(this, new MyEventArgs(someParameter)); }); </code></pre> ...
[ { "answer_id": 253148, "author": "François", "author_id": 32379, "author_profile": "https://Stackoverflow.com/users/32379", "pm_score": 4, "selected": false, "text": "myControl.Invoke(new MethodInvoker(delegate() {...}))\n" }, { "answer_id": 253149, "author": "Jelon", "au...
2008/10/31
[ "https://Stackoverflow.com/questions/253138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7140/" ]
253,142
<p>I'd like to post some form variables into a classic ASP page. I don't want to have to alter the classic ASP pages, because of the amount of work that would need to be done, and the amount of pages that consume them.</p> <p>The classic ASP page expects form variables Username and Userpassword to be submitted to them...
[ { "answer_id": 253195, "author": "digiguru", "author_id": 5055, "author_profile": "https://Stackoverflow.com/users/5055", "pm_score": 0, "selected": false, "text": "public class RemotePost{\n private System.Collections.Specialized.NameValueCollection Inputs \n = new System.Col...
2008/10/31
[ "https://Stackoverflow.com/questions/253142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5055/" ]
253,157
<p>Is there a way to resize a <code>std::vector</code> to lower capacity when I no longer need previously reserved space?</p>
[ { "answer_id": 253173, "author": "Sébastien RoccaSerra", "author_id": 2797, "author_profile": "https://Stackoverflow.com/users/2797", "pm_score": 7, "selected": true, "text": "swap vector<Person>(persons).swap(persons);\n persons vector" }, { "answer_id": 9525865, "author": "...
2008/10/31
[ "https://Stackoverflow.com/questions/253157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23766/" ]
253,170
<p>I'm addicted to Vim, it's now my de facto way of editing text files.</p> <p>Being that it's mainly a text editor and not an IDE, has anyone got tricks for me to make it easier when developing Java apps?</p> <p>Some questions I have:</p> <ul> <li>How do I invoke a maven task without leaving vi?</li> <li>Can I get ...
[ { "answer_id": 257276, "author": "ngn", "author_id": 23109, "author_profile": "https://Stackoverflow.com/users/23109", "pm_score": 5, "selected": false, "text": ":!mvn :set makeprg=mvn :make <C-n> <C-p> bsh" }, { "answer_id": 836623, "author": "Community", "author_id": -1...
2008/10/31
[ "https://Stackoverflow.com/questions/253170", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2443/" ]
253,178
<p>I'm developing my first Word 2007 addin, and I've added an OfficeRibbon to my project. In a button-click handler, I'd like a reference to either the current <code>Word.Document</code> or <code>Word.Application</code>.</p> <p>I'm trying to get a reference via the <code>OfficeRibbon.Context</code> property, which the...
[ { "answer_id": 895455, "author": "Joseph Sturtevant", "author_id": 317, "author_profile": "https://Stackoverflow.com/users/317", "pm_score": 3, "selected": true, "text": "internal static public partial class ThisAddIn\n{\n internal static Application Context { get; private set; }\n\n ...
2008/10/31
[ "https://Stackoverflow.com/questions/253178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6722/" ]
253,179
<p>I am starting new project with SqlServer and Linq to Sql. What data type would be better for surrogate keys in tables: <code>identity</code> or <code>uniqueidentifier</code> ?</p> <p>As I understood, <code>identity</code> is automatically generated on insert, while <code>uniqueidentifier</code> should be generated...
[ { "answer_id": 253199, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 0, "selected": false, "text": "uniqueidentifier NEWID()" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/253179", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25732/" ]
253,198
<p>What is the best way to send e-mail using outlook express from the command line? It has to be an automated operation with no user interaction. There will be some .jpg files in attachment. Thanks.</p>
[ { "answer_id": 254845, "author": "PabloG", "author_id": 394, "author_profile": "https://Stackoverflow.com/users/394", "pm_score": 0, "selected": false, "text": "; Send a mail vía outlook \"automation\"\n\n$sRcpt = \"test@test.com\"\n$sSubj = \"Test subject\"\n$sBody = \"This is a test\"\...
2008/10/31
[ "https://Stackoverflow.com/questions/253198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3221/" ]
253,211
<p>I'm working on a C# library which offloads certain work tasks to the GPU using NVIDIA's CUDA. An example of this is adding two arrays together using extension methods:</p> <pre><code>float[] a = new float[]{ ... } float[] b = new float[]{ ... } float[] c = a.Add(b); </code></pre> <p>The work in this code is done o...
[ { "answer_id": 253214, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 1, "selected": false, "text": "Delegate.BeginInvoke Delegate.EndInvoke ManualResetEvent using System.Threading;\nstatic class Program {\n static ...
2008/10/31
[ "https://Stackoverflow.com/questions/253211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4055/" ]
253,212
<p>How are assertions done in c++? Example code is appreciated.</p>
[ { "answer_id": 253219, "author": "Pieter", "author_id": 5822, "author_profile": "https://Stackoverflow.com/users/5822", "pm_score": 3, "selected": false, "text": "void some_function(int age)\n{\n assert(age > 0);\n}\n" }, { "answer_id": 253223, "author": "andygeers", ...
2008/10/31
[ "https://Stackoverflow.com/questions/253212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22076/" ]
253,226
<p>I have an interface - here's a nicely contrived version as an example:</p> <pre><code>public interface Particle { enum Charge { POSITIVE, NEGATIVE } Charge getCharge(); double getMass(); etc... } </code></pre> <p>Is there any difference in how implementations of this would behave if...
[ { "answer_id": 253239, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 5, "selected": false, "text": "static public" }, { "answer_id": 253282, "author": "idrosid", "author_id": 17876, "author_profile": ...
2008/10/31
[ "https://Stackoverflow.com/questions/253226", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1853/" ]
253,242
<p>I have a query where i have a date column (time) which tells about "IN" &amp; "OUT" timing of the people attendance by this single column</p> <p>My queries are :-</p> <p>1) How to get the daily attendance of each employee 2) How to come to know if the employee is present less than 5 hours</p> <p>Please let me kno...
[ { "answer_id": 253249, "author": "splattne", "author_id": 6461, "author_profile": "https://Stackoverflow.com/users/6461", "pm_score": 0, "selected": false, "text": " select \n datediff(minute, TimeFrom, TimeTo) as AttendedTimeInMinutes,\n case when datediff(minute, sTimeFrom,...
2008/10/31
[ "https://Stackoverflow.com/questions/253242", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
253,247
<p>I have an animation that I'm displaying using a UIImageView:</p> <pre><code>imageView.animationImages = myImages; imageView.animationDuration = 3; [imageView startAnimating]; </code></pre> <p>I know I can stop it using stopAnimating, but what I want is to be able to pause it. The reason is that when you call stop,...
[ { "answer_id": 255109, "author": "rustyshelf", "author_id": 6044, "author_profile": "https://Stackoverflow.com/users/6044", "pm_score": 4, "selected": true, "text": "UIView UIImageView subview NSTimer" }, { "answer_id": 624980, "author": "mazniak", "author_id": 42523, ...
2008/10/31
[ "https://Stackoverflow.com/questions/253247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6044/" ]
253,267
<p>I need to output some JavaScript in a WebControl based on some processing and some properties that the consumer can set, doing it on the load of the page will be to early.</p> <p>When is the latest I can call RegisterClientScriptBlock and still have it output on the page?</p>
[ { "answer_id": 398857, "author": "sliderhouserules", "author_id": 31385, "author_profile": "https://Stackoverflow.com/users/31385", "pm_score": 3, "selected": false, "text": "protected internal override void RenderChildren(HtmlTextWriter writer)\n{\n Page page = this.Page;\n if (pa...
2008/10/31
[ "https://Stackoverflow.com/questions/253267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5791/" ]
253,284
<p>I am having dependency troubles. I have two classes: <code>Graphic</code> and <code>Image</code>. Each one has its own .cpp and .h files. I am declaring them as the following: </p> <p><code>Graphic.h</code>: </p> <pre><code> #include "Image.h" class Image; class Graphic { ... }; </code><...
[ { "answer_id": 253295, "author": "Bill the Lizard", "author_id": 1288, "author_profile": "https://Stackoverflow.com/users/1288", "pm_score": 1, "selected": false, "text": "Graphic.h class Graphic {\n ...\n};\n" }, { "answer_id": 253297, "author": "activout.se", "author_i...
2008/10/31
[ "https://Stackoverflow.com/questions/253284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3831/" ]
253,286
<p>I'm trying to design a model for a application allowing 2 people to bet with each other (I know, sounds stupid...). What I'm wondering about is how to connect the bet with users. The structure is like this</p> <pre><code>|-------------| |----------| | Bet | | User | | BetUser1 | |--...
[ { "answer_id": 253335, "author": "tghw", "author_id": 2363, "author_profile": "https://Stackoverflow.com/users/2363", "pm_score": 3, "selected": true, "text": "USER WAGER BET\n User (FK(User)) Description\n Bet (FK(Bet)) Winner (FK (Wag...
2008/10/31
[ "https://Stackoverflow.com/questions/253286", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4172/" ]
253,289
<p>I am new to PHP and trying to get the following code to work:</p> <pre><code>&lt;?php include 'config.php'; include 'opendb.php'; $query = "SELECT name, subject, message FROM contact"; $result = mysql_query($query); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "Name :{$row['name']} &lt;br&gt;"...
[ { "answer_id": 253299, "author": "Mark Biek", "author_id": 305, "author_profile": "https://Stackoverflow.com/users/305", "pm_score": 4, "selected": true, "text": "while($row = mysql_fetch_array($result, MYSQL_ASSOC))\n{\n foreach($row as $field=>$value)\n {\n echo \"$field: {$value}...
2008/10/31
[ "https://Stackoverflow.com/questions/253289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246613/" ]
253,312
<p>Any ideas why this won't validate here:</p> <p><a href="http://validator.w3.org/#validate_by_input" rel="nofollow noreferrer">http://validator.w3.org/#validate_by_input</a></p> <p>It seems the form input tags are wrong but reading through the XHTML spec they should validate fine. Any ideas?</p> <pre><code>&lt;!DO...
[ { "answer_id": 253340, "author": "Rahul", "author_id": 16308, "author_profile": "https://Stackoverflow.com/users/16308", "pm_score": 3, "selected": false, "text": "fieldset" }, { "answer_id": 253348, "author": "FOR", "author_id": 27826, "author_profile": "https://Stac...
2008/10/31
[ "https://Stackoverflow.com/questions/253312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13227/" ]
253,314
<p>Yesterday I was having a heated debate with a coworker on what would be the preferred error reporting method. Mainly we were discussing the usage of exceptions or error codes for reporting errors between application layers or modules.</p> <p><strong>What rules do you use to decide if you throw exceptions or return ...
[ { "answer_id": 253533, "author": "sakana", "author_id": 28921, "author_profile": "https://Stackoverflow.com/users/28921", "pm_score": 2, "selected": false, "text": "public class DataValidationException extends Exception {\n\n\n private DataValidation error;\n\n /**\n * \n *...
2008/10/31
[ "https://Stackoverflow.com/questions/253314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6508/" ]
253,324
<p>I need a smart way to get the data types out of INFORMATION_SCHEMA.COLUMNS in a way that could be used in a CREATE TABLE statement. The problem is the 'extra' fields that need to be understood, such as NUMERIC<code>_</code>PRECISION and NUMERIC<code>_</code>SCALE.</p> <p>Obviously, I can ignore the columns for INT...
[ { "answer_id": 253330, "author": "StingyJack", "author_id": 16391, "author_profile": "https://Stackoverflow.com/users/16391", "pm_score": 1, "selected": false, "text": "I need a smart way to get the data types out of INFORMATION_SCHEMA.COLUMNS in a way that could be used in a CREATE TABL...
2008/10/31
[ "https://Stackoverflow.com/questions/253324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3893/" ]
253,351
<p>I am writing a Java Application for Data Entry using Eclipse and SWT. Naturally it has a great many Text objects. </p> <p>What I would like to happen is that when user enters something into one field focus automatically changes to the next field.</p> <p>Thanks in advance</p>
[ { "answer_id": 254030, "author": "Drazen Urch", "author_id": 33074, "author_profile": "https://Stackoverflow.com/users/33074", "pm_score": 2, "selected": false, "text": "final Text textBox = new Text(shell, SWT.NONE);\ntextBox.addKeyListener(new KeyAdapter() {\n public void keyPressed...
2008/10/31
[ "https://Stackoverflow.com/questions/253351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33074/" ]
253,357
<p>For some reason Eclipse is no longer showing me Java compilation Errors in the Problems View.</p> <p>It is still showing Warnings.</p> <p>This has suddenly happened and I cannot think of anything that I have changed which would affect this.</p> <p>I am using the "Maven Integration for Eclipse" plugin but I have b...
[ { "answer_id": 941904, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "public enum Foo {\nDummy(new Bar [] {new Bar()});\nstatic {\n for (Foo foo: Foo.values());\n}\nprivate Foo(Bar [] params) {...
2008/10/31
[ "https://Stackoverflow.com/questions/253357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8633/" ]
253,360
<p>Whilst trying to get our app working in Firefox (I'm a big proponent of X-Browser support but our lead dev is resisting me saying IE is good enough). So I'm doing a little side project to see how much work it is to convert.</p> <p>I've hit a problem straight away.</p> <p>The main.aspx page binds to a webservice us...
[ { "answer_id": 259631, "author": "savetheclocktower", "author_id": 25720, "author_profile": "https://Stackoverflow.com/users/25720", "pm_score": 1, "selected": false, "text": "useService $(\"#webservice\")[0].useService(url + asmpath +\n \"/WebServiceWrapper.asmx?WSDL\",\"WebServiceWrap...
2008/10/31
[ "https://Stackoverflow.com/questions/253360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4950/" ]
253,375
<p>I once did a cursory search and found no good CVS bindings for Python. I wanted to be able to write helper scripts to do some fine-grained manipulation of the repository and projects in it. I had to resort to using <code>popen</code> and checking <code>stdout</code> and <code>stderr</code> and then parsing those. ...
[ { "answer_id": 254092, "author": "ephemient", "author_id": 20713, "author_profile": "https://Stackoverflow.com/users/20713", "pm_score": 1, "selected": false, "text": "cvs svn" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/253375", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19215/" ]
253,378
<p>I am trying the following code:</p> <pre><code>&lt;?php $link = mysql_connect('localhost', 'root', 'geheim'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; $query = "SELECT * FROM Auctions"; $result = mysql_query($query); while($r...
[ { "answer_id": 253386, "author": "Aron Rotteveel", "author_id": 11568, "author_profile": "https://Stackoverflow.com/users/11568", "pm_score": 2, "selected": false, "text": "$query = \"SELECT * FROM Auctions\"; \n$result = mysql_query($query);\n\nif ($result !== false) {\n while ($row ...
2008/10/31
[ "https://Stackoverflow.com/questions/253378", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246613/" ]
253,380
<p>In <a href="http://en.wikipedia.org/wiki/Vim_%28text_editor%29" rel="noreferrer">Vim</a>, how do I insert characters at the beginning of each line in a selection?</p> <p>For instance, I want to comment out a block of code by prepending <code>//</code> at the beginning of each line assuming my language's comment s...
[ { "answer_id": 253388, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 8, "selected": false, "text": ":%s!^!//!\n :'<,'>s!^!//!\n gv" }, { "answer_id": 253477, "author": "Lucas Oman", "author_id": 6726, "...
2008/10/31
[ "https://Stackoverflow.com/questions/253380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20133/" ]
253,394
<p>I need to add a row to a spreadsheet using VBScript on a PC that does not have Microsoft Office installed.</p> <p>I tried [<code>Set objExcel = CreateObject("Excel.Application")</code>]</p> <p>Since Excel does not exist on the PC I cannot create this object.</p> <p>Is there a way to modify a spreadsheet without E...
[ { "answer_id": 254209, "author": "aphoria", "author_id": 2441, "author_profile": "https://Stackoverflow.com/users/2441", "pm_score": 3, "selected": false, "text": "First Last\nJoe Smith\nMary Jones\nSam Nelson\n Const adOpenStatic = 3\nConst adLockOptimistic = 3\n\nfilename ...
2008/10/31
[ "https://Stackoverflow.com/questions/253394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
253,399
<p>Delphi (and probably a lot of other languages) has class helpers. These provide a way to add extra methods to an existing class. Without making a subclass.</p> <p>So, what are good uses for class helpers?</p>
[ { "answer_id": 253400, "author": "Toon Krijthe", "author_id": 18061, "author_profile": "https://Stackoverflow.com/users/18061", "pm_score": 4, "selected": false, "text": "type\n TStringsHelper = class helper for TStrings\n public\n function IsEmpty: Boolean;\n end;\n\nfunction TStr...
2008/10/31
[ "https://Stackoverflow.com/questions/253399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18061/" ]
253,403
<p>I am developing a java web app using servlet, in order to prevent user from hitting the back button to see previous users' info, I have the following code :</p> <pre><code> protected void processRequest(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException { ...
[ { "answer_id": 253489, "author": "Brian Matthews", "author_id": 1969, "author_profile": "https://Stackoverflow.com/users/1969", "pm_score": 2, "selected": false, "text": "WHERE OWNER=?" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/253403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32834/" ]
253,410
<p>Alright, I know how the <code>fieldset</code>/<code>legend</code> works out in HTML. Say you have a form with some fields:</p> <pre><code>&lt;form&gt; &lt;fieldset&gt; &lt;legend&gt;legend&lt;/legend&gt; &lt;input name="input1" /&gt; &lt;/fieldset&gt; &lt;/form&gt; </code></pre> <p>What sho...
[ { "answer_id": 253413, "author": "Gareth", "author_id": 31582, "author_profile": "https://Stackoverflow.com/users/31582", "pm_score": 4, "selected": true, "text": "FIELDSET LEGEND LEGEND FIELDSET FIELDSET" }, { "answer_id": 253419, "author": "Dan Maharry", "author_id": 27...
2008/10/31
[ "https://Stackoverflow.com/questions/253410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/909/" ]
253,415
<p>I'm having trouble getting the right number of elements in the ArrayList <code>alt</code> in the JSP page below. When I view the JSP it shows the size is 1 (<code>&lt;%=alt.size()%&gt;</code>) when it should be 3; I think I'm adding that method to the array in the generator class, so I don't understand why it's show...
[ { "answer_id": 253432, "author": "Jonny Buchanan", "author_id": 6760, "author_profile": "https://Stackoverflow.com/users/6760", "pm_score": 1, "selected": false, "text": "3 add List" }, { "answer_id": 253433, "author": "toolkit", "author_id": 3295, "author_profile": "...
2008/10/31
[ "https://Stackoverflow.com/questions/253415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28557/" ]
253,426
<p>Working with TCL and I'd like to implement something like the <a href="http://en.wikipedia.org/wiki/Strategy_pattern" rel="nofollow noreferrer">Strategy Pattern</a>. I want to pass in the "strategy" for printing output in a TCL function, so I can easily switch between printing to the screen and printing to a log fi...
[ { "answer_id": 254632, "author": "Jackson", "author_id": 29061, "author_profile": "https://Stackoverflow.com/users/29061", "pm_score": 5, "selected": true, "text": "proc A { x } {\n puts $x\n}\n\nset strat A\n$strat Hello\n" }, { "answer_id": 255441, "author": "ramanman", ...
2008/10/31
[ "https://Stackoverflow.com/questions/253426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1541/" ]
253,431
<p>I have a WPF control, that has a list of "Investors", and in the right column of the list, a "Delete" button.</p> <p>I could either waste some time making an image of an "x" in photoshop. Or, I could just use Wingdings font and set the content to "Õ" (which makes a cool looking delete button).</p> <p>Is this appro...
[ { "answer_id": 253444, "author": "Bob King", "author_id": 6897, "author_profile": "https://Stackoverflow.com/users/6897", "pm_score": 5, "selected": true, "text": " <Style x:Key=\"DeleteButtonStyle\" TargetType=\"{x:Type Button}\">\n <Setter Property=\"HorizontalAlignment\" Val...
2008/10/31
[ "https://Stackoverflow.com/questions/253431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11917/" ]
253,435
<p>I was loading a Bitmap Image from a File. When I tried to save the Image to another file I got the following error "A generic error occurred in GDI+". I believe this is because the file is locked by the image object.</p> <p>Ok so tried calling the Image.Clone function. This still locks the file.</p> <p>hmm. Next ...
[ { "answer_id": 253493, "author": "Sciolist", "author_id": 16045, "author_profile": "https://Stackoverflow.com/users/16045", "pm_score": 2, "selected": false, "text": "var stream = new FileStream(\"original-image\", FileMode.Open);\nvar bufr = new byte[stream.Length];\nstream.Read(bufr, 0...
2008/10/31
[ "https://Stackoverflow.com/questions/253435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6204/" ]
253,437
<p>It appears that Directory.GetFiles() in C# modifies the Last access date of a file. I've googled for hours and can't seem to find a work around for this issue. Is there anyway to keep all the MAC (Modified, Accessed, Created) attributes of a file? I'm using Directory.GetDirectories(), Directory.GetFiles(), and File...
[ { "answer_id": 253461, "author": "dbkk", "author_id": 838, "author_profile": "https://Stackoverflow.com/users/838", "pm_score": 4, "selected": true, "text": "fsutil behavior set disablelastaccess 1\n Process.Start(\"fsutil\", \"behavior set disablelastaccess 1\").WaitForExit();\n" }, ...
2008/10/31
[ "https://Stackoverflow.com/questions/253437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33082/" ]
253,446
<p>How does one add a comment to an MS Access Query, to provide a description of what it does?</p> <p>Once added, how can one retrieve such comments programmatically?</p>
[ { "answer_id": 253784, "author": "Patrick Cuff", "author_id": 7903, "author_profile": "https://Stackoverflow.com/users/7903", "pm_score": 5, "selected": true, "text": "Dim db As Database\nDim qry As QueryDef\n\nSet db = Application.CurrentDb\nSet qry = db.QueryDefs(\"myQuery\")\n\nDebug....
2008/10/31
[ "https://Stackoverflow.com/questions/253446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6613/" ]
253,460
<p>What is their use if when you call the method, it might not exist?</p> <p>Does that mean that you would be able to dynamically create a method on a dynamic object?</p> <p>What are the practical use of this?</p>
[ { "answer_id": 253473, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 5, "selected": true, "text": "IDynamicMetaObject DynamicObject document.RootElement.Person[5].Name[\"Attribute\"]" }, { "answer_id": 463864, ...
2008/10/31
[ "https://Stackoverflow.com/questions/253460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24975/" ]
253,468
<p>For my apps, I store some configuration file in xml along with the assembly(exe), and something other temporary files for proccessing purpose. </p> <p>I found some quirk with <code>".\\"</code> and <code>Application.StartupPath</code>.</p> <p>I've been using </p> <pre><code>String configPath = ".\\config.xml"; <...
[ { "answer_id": 253486, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 3, "selected": false, "text": "Environment.CurrentDirectory Path.GetDirectoryName(typeof(Foo).Assembly.ManifestModule.FullyQualifiedName)" }, { ...
2008/10/31
[ "https://Stackoverflow.com/questions/253468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20007/" ]
253,469
<p>I have a <code>CMFCRibbonStatusBar</code> in my mainframe to which I add a <code>CMFCRibbonButtonsGroup</code> which again has a <code>CMFCRibbonButton</code>. This button has the same ID as a menu entry.</p> <p>Creating the button is done as follows:</p> <pre><code>CMFCRibbonButtonsGroup* pBGroup = new CMFCRibbon...
[ { "answer_id": 505535, "author": "demoncodemonkey", "author_id": 61697, "author_profile": "https://Stackoverflow.com/users/61697", "pm_score": 3, "selected": true, "text": "SetToolTipText SetDescription CMFCRibbonButton* pBtn = new CMFCRibbonButton(12345, _T(\"\"), 1);\npBtn->SetToolTipT...
2008/10/31
[ "https://Stackoverflow.com/questions/253469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27596/" ]
253,475
<pre><code>struct elem { int i; char k; }; elem user; // compile error! struct elem user; // this is correct </code></pre> <p>In the above piece of code we are getting an error for the first declaration. But this error doesn't occur with a C++ compiler. In C++ we don't need to use the keyword struct again and again...
[ { "answer_id": 253501, "author": "Bill the Lizard", "author_id": 1288, "author_profile": "https://Stackoverflow.com/users/1288", "pm_score": 2, "selected": false, "text": "struct elem\n{\n int i;\n char k;\n};\nelem user;\n" }, { "answer_id": 253509, "author": "Ilya", "au...
2008/10/31
[ "https://Stackoverflow.com/questions/253475", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31116/" ]
253,490
<p>I have a problem with the <a href="http://freetextbox.com/" rel="nofollow noreferrer">FreeTextBox</a> rich Text Editor in my ASP.NET site. The problem occurs when I access the site with firefox, and I have a freetextbox instance in a hidden div. The hidden div might also be an AJAX Tab Panel. The actual problem is t...
[ { "answer_id": 258210, "author": "Vegard Larsen", "author_id": 1606, "author_profile": "https://Stackoverflow.com/users/1606", "pm_score": 3, "selected": true, "text": ".hiddentab\n{\n position: absolute;\n left: -99999999999999;\n}\n" }, { "answer_id": 268790, "autho...
2008/10/31
[ "https://Stackoverflow.com/questions/253490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/932/" ]
253,492
<p>I was looking at the Java code for <code>LinkedList</code> and noticed that it made use of a static nested class, <code>Entry</code>.</p> <pre><code>public class LinkedList&lt;E&gt; ... { ... private static class Entry&lt;E&gt; { ... } } </code></pre> <p>What is the reason for using a static nested class, rathe...
[ { "answer_id": 253521, "author": "matt b", "author_id": 4249, "author_profile": "https://Stackoverflow.com/users/4249", "pm_score": 9, "selected": true, "text": "LinkedList.Entry LinkedList Entry Map.Entry" }, { "answer_id": 253575, "author": "Vinze", "author_id": 26859, ...
2008/10/31
[ "https://Stackoverflow.com/questions/253492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10171/" ]
253,517
<p>I want to create a subclass of TabPage that contains some control, and I want to control the layout and properties of those controls through the designer. However, if I open my subclass in the designer, I can't position them like I could on a UserControl. I don't want to have to create a TabPage with an UserContro...
[ { "answer_id": 254210, "author": "Hath", "author_id": 5186, "author_profile": "https://Stackoverflow.com/users/5186", "pm_score": 3, "selected": false, "text": "public class UserTabControl<T> : TabPage\n where T : UserControl, new ()\n{\n private T _userControl;\n public T UserC...
2008/10/31
[ "https://Stackoverflow.com/questions/253517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15371/" ]
253,522
<p>For example if I have an auto-numbered field, I add new records without specifying this field and let DB engine to pick it for me.<br> So, will it pick the number of the deleted record? If yes, when?</p> <p>// SQL Server, MySQL. //</p> <p>Follow-up question: <a href="https://stackoverflow.com/questions/253616/what...
[ { "answer_id": 253540, "author": "ConcernedOfTunbridgeWells", "author_id": 15401, "author_profile": "https://Stackoverflow.com/users/15401", "pm_score": 1, "selected": false, "text": "set identity_insert on" }, { "answer_id": 253580, "author": "Lucas Oman", "author_id": 6...
2008/10/31
[ "https://Stackoverflow.com/questions/253522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28098/" ]
253,544
<p>I have been reading the post here:</p> <p><a href="http://encosia.com/2008/10/04/using-jquery-to-enhance-aspnet-ajax-progress-indication/" rel="nofollow noreferrer">http://encosia.com/2008/10/04/using-jquery-to-enhance-aspnet-ajax-progress-indication/</a></p> <p>But it wants to use the following object:</p> <pre>...
[ { "answer_id": 253540, "author": "ConcernedOfTunbridgeWells", "author_id": 15401, "author_profile": "https://Stackoverflow.com/users/15401", "pm_score": 1, "selected": false, "text": "set identity_insert on" }, { "answer_id": 253580, "author": "Lucas Oman", "author_id": 6...
2008/10/31
[ "https://Stackoverflow.com/questions/253544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24227/" ]
253,545
<p>I have been asked to provide information on available techniques for assessing our current, and any future websites for security problems. the request is in the form of</p> <blockquote> <p>Do you know of any good free one that examines for security holes?</p> </blockquote> <p>I think our data security is probabl...
[ { "answer_id": 253540, "author": "ConcernedOfTunbridgeWells", "author_id": 15401, "author_profile": "https://Stackoverflow.com/users/15401", "pm_score": 1, "selected": false, "text": "set identity_insert on" }, { "answer_id": 253580, "author": "Lucas Oman", "author_id": 6...
2008/10/31
[ "https://Stackoverflow.com/questions/253545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5552/" ]
253,546
<p>I have a line (actually a cube) going from (x1,y1,z1) to (x2,y2,z2). I would like to rotate it so that it is aligned along another line going from (x3,y3,z3) to (x4,y4,z4). Presently I am using <code>Math::Atan2</code> along with <code>Matrix::RotateYawPitchRoll</code>. Any better ways to do this?</p> <p>Edit: I th...
[ { "answer_id": 253674, "author": "timday", "author_id": 24283, "author_profile": "https://Stackoverflow.com/users/24283", "pm_score": 3, "selected": true, "text": "(f0x f1x f2x)\n(f0y f1y f2y)\n(f0z f1z f2z)\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/253546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45603/" ]
253,549
<p>I have the following code which works just fine when the method is "POST", but changing to "GET" doesn't work:</p> <pre><code>HttpWebRequest request = null; request = HttpWebRequest.Create(uri) as HttpWebRequest; request.ContentType = "application/x-www-form-urlencoded; charset=UTF-8"; request.Method = "POST"; // D...
[ { "answer_id": 253619, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 5, "selected": true, "text": "BeginGetRequestStream" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/253549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/986/" ]
253,574
<p>I've written some custom model binders (implementing IModelBinder) in our ASP.NET MVC application. I'm wondering what is a good approach to unittest them (binders)?</p>
[ { "answer_id": 254447, "author": "Korbin", "author_id": 17902, "author_profile": "https://Stackoverflow.com/users/17902", "pm_score": 5, "selected": true, "text": "var formElements = new NameValueCollection() { {\"FirstName\",\"Bubba\"}, {\"MiddleName\", \"\"}, {\"LastName\", \"Gump\"} }...
2008/10/31
[ "https://Stackoverflow.com/questions/253574", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3182/" ]
253,587
<p>I've recently started using code coverage tools (particularily Emma and EclEmma), and I really like the view that it gives me as to the completeness of my unit tests - and the ability to see what areas of the code my unit tests aren't hitting at all. I currently work in an organization that doesn't do a lot of unit ...
[ { "answer_id": 253625, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 3, "selected": false, "text": "if(logger.isDebugEnabled()) {\n logger.debug(\"something\");\n}\n if(log.isDebugEnabled())" }, { "answer_...
2008/10/31
[ "https://Stackoverflow.com/questions/253587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4249/" ]
253,642
<p>Currently using System.Web.UI.WebControls.FileUpload wrapped in our own control.</p> <p>We have licenses for Telerik. I wanted to know if anyone had experience with that or could suggest a better one?</p> <p>Some criteria to be measured by</p> <ul> <li>validation</li> <li>peformance</li> <li>multiple files</li> ...
[ { "answer_id": 8063388, "author": "NicoJuicy", "author_id": 209555, "author_profile": "https://Stackoverflow.com/users/209555", "pm_score": 1, "selected": false, "text": " <HttpPost()> _\n Public Function Upload(uploadedFile As System.Web.HttpPostedFileBase) As ActionResult\n ...
2008/10/31
[ "https://Stackoverflow.com/questions/253642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30913/" ]
253,644
<p>I was using an XSL style sheet to do the sorting but it seems to be very slow. Is there a more efficient way?</p> <p>It is a flat list of nodes, if I convert the nodes to an object and sort in a GenericList would it help?</p> <p><strong>EDIT</strong> I don't need the end result to be XML.</p>
[ { "answer_id": 8063388, "author": "NicoJuicy", "author_id": 209555, "author_profile": "https://Stackoverflow.com/users/209555", "pm_score": 1, "selected": false, "text": " <HttpPost()> _\n Public Function Upload(uploadedFile As System.Web.HttpPostedFileBase) As ActionResult\n ...
2008/10/31
[ "https://Stackoverflow.com/questions/253644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18107/" ]
253,664
<p>We've got products built both with GUI and CHUI. Going forward, we're looking at redesigning a lot of our software and mainly taking the route of going all GUI. My question to the group is, do we need to account for keeping a CHUI around? What are the advantages of CHUI over GUI? Many times in the past people have s...
[ { "answer_id": 2001954, "author": "JeffO", "author_id": 61339, "author_profile": "https://Stackoverflow.com/users/61339", "pm_score": 1, "selected": false, "text": "A) - This Menu\nB) - That Menu\nC) - Some other Menu\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/253664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26853/" ]
253,666
<p>In Microsoft Oslo SDK CTP 2008 (using Intellipad) the following code compiles fine:</p> <pre><code>module M { type T { Text : Text; } } </code></pre> <p>while compiling the below code leads to the error "M0197: 'Text' cannot be used in a Type context"</p> <pre><code>module M { type T { ...
[ { "answer_id": 2001954, "author": "JeffO", "author_id": 61339, "author_profile": "https://Stackoverflow.com/users/61339", "pm_score": 1, "selected": false, "text": "A) - This Menu\nB) - That Menu\nC) - Some other Menu\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/253666", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3588/" ]
253,673
<p>What is the slowest (therefore best) hash algorithm for passwords in ASP Classic?</p> <p>EDIT: For those unaware, when hashing passwords, slower hashes are preferred to faster to help slow rainbow table style attacks. </p> <p>EDIT2: And yes, of course speed isn't the only valid concern for hash selection. My quest...
[ { "answer_id": 253699, "author": "chills42", "author_id": 23855, "author_profile": "https://Stackoverflow.com/users/23855", "pm_score": -1, "selected": false, "text": "function hashPassword(password)\n sleep for 10 seconds\n return password\nend function\n" }, { "answer_id"...
2008/10/31
[ "https://Stackoverflow.com/questions/253673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26180/" ]
253,689
<p>I am making an expand/collapse call rates table for the company I work for. I currently have a table with a button under it to expand it, the button says "Expand". It is functional except I need the button to change to "Collapse" when it is clicked and then of course back to "Expand" when it is clicked again. The wr...
[ { "answer_id": 253710, "author": "Nick", "author_id": 26161, "author_profile": "https://Stackoverflow.com/users/26161", "pm_score": 9, "selected": false, "text": "$('#divID').css(\"background-image\", \"url(/myimage.jpg)\"); \n $('#divID').click(function()\n{\n // do my image switching...
2008/10/31
[ "https://Stackoverflow.com/questions/253689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26823/" ]
253,692
<p>I am trying to start WebLogic within Eclipse</p> <p>When it starts it complains like this.</p> <p>Unable to load performance pack. Using Java I/O instead. Please ensure that wlntio.dll is in: 'C:\bea81\jdk142_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\bea81\jdk142_04\jre\bin;C:\Program Files\Java\jre1.6.0\bin\clie...
[ { "answer_id": 1469248, "author": "Pascal Thivent", "author_id": 70604, "author_profile": "https://Stackoverflow.com/users/70604", "pm_score": 1, "selected": false, "text": "$BEA_HOME/server/bin PATH" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/253692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
253,695
<p>I have a Silverlight 2 application that validates data OnTabSelectionChanged. Immediately I began wishing that UpdateSourceTrigger allowed more than just LostFocus because if you click the tab without tabbing off of a control the LINQ object is not updated before validation. </p> <p>I worked around the issue for Te...
[ { "answer_id": 3077562, "author": "Ben Brodie", "author_id": 371280, "author_profile": "https://Stackoverflow.com/users/371280", "pm_score": 0, "selected": false, "text": "public class DefaultButtonHub\n{\n ButtonAutomationPeer peer = null;\n\n private void Attach(DependencyObject ...
2008/10/31
[ "https://Stackoverflow.com/questions/253695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33102/" ]
253,701
<p>I have a web application that allows a user to search on some criteria, select an object, edit it and then return to the previous search. All the editing takes place on a separate page linked to the datagrid of returned results. I was wondering what is the best way to store the previous search parameters so that w...
[ { "answer_id": 253845, "author": "Jason Kealey", "author_id": 20893, "author_profile": "https://Stackoverflow.com/users/20893", "pm_score": 2, "selected": true, "text": " public static string GenerateSessionKeyFromPage(Page page)\n {\n return \"__\" + page.Request.Path;\n ...
2008/10/31
[ "https://Stackoverflow.com/questions/253701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30383/" ]
253,705
<p>I have a dropdown list that stores name/value pairs. The dropdown appears in each row of a gridview.</p> <p>The values in the dropdown correspond to a third attribute (data type) not persisted in the dropdown list. I'd like to create a client-side "lookup" table so that when a user chooses a dropdown value, the pro...
[ { "answer_id": 253715, "author": "Ady", "author_id": 31395, "author_profile": "https://Stackoverflow.com/users/31395", "pm_score": 0, "selected": false, "text": "var oVals = new Array('1','2','3','4','5');\n\ndocument.getElementById(\"cell1\").innerHTML = oVals[document.getElementById(\"...
2008/10/31
[ "https://Stackoverflow.com/questions/253705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/335036/" ]
253,720
<p>I have a problem with a simple included file.</p> <p>The file being included is in two MFC programs - one of which is a dll, and it also compiles itself into a non-mfc dll.</p> <p>Recently I was using the larger dll which wraps around the <em>source</em> of the smaller dll when I wanted access to some of the featu...
[ { "answer_id": 253750, "author": "Jasper Bekkers", "author_id": 31486, "author_profile": "https://Stackoverflow.com/users/31486", "pm_score": 3, "selected": true, "text": "( )" }, { "answer_id": 253827, "author": "graham.reeds", "author_id": 342, "author_profile": "ht...
2008/10/31
[ "https://Stackoverflow.com/questions/253720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/342/" ]
253,724
<p>I'm looking for a way to supply an argument to a ruby on rails project at runtime. Essentially, our project uses public key cryptography to encrypt some sensitive client data and we want the ability to supply the password to the private key file at runtime.</p>
[ { "answer_id": 254703, "author": "Jsnydr", "author_id": 32503, "author_profile": "https://Stackoverflow.com/users/32503", "pm_score": 2, "selected": true, "text": "module StartupArgs\n @@argHash = {}\n\n def self.setArg(key, value)\n @@argHash[key.to_sym] = value\n end\n\n def self.getA...
2008/10/31
[ "https://Stackoverflow.com/questions/253724", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11042/" ]
253,727
<p>When building static libraries with VS2005 I keep getting linker warnings that VC80.pdb cant be found with my library.lib. Apparently, as a result, the edit and continue feature of the IDE fails to work any project that incorporates library.lib</p> <p>What magic is needed to tell VS2005 to produce a static lib with...
[ { "answer_id": 254257, "author": "Steve Steiner", "author_id": 3892, "author_profile": "https://Stackoverflow.com/users/3892", "pm_score": 4, "selected": true, "text": "SECTION HEADER #7\n.debug$T name\n 0 physical address\n 0 virtual address\n 48 size of raw data\n ...
2008/10/31
[ "https://Stackoverflow.com/questions/253727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27491/" ]
253,731
<p>I have a web page that has a web form for signing up. I want to remove fields. I've tried removing the field code from the .asp file but obviously there are other things that I need to remove along those lines. I have full access to all the code but I need help knowing where things are linked as far as making the fo...
[ { "answer_id": 253762, "author": "John", "author_id": 30006, "author_profile": "https://Stackoverflow.com/users/30006", "pm_score": 2, "selected": false, "text": "<asp:TextBox id=\"text1\" runat=\"server\" />\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/253731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
253,735
<p>I have a report that is used by a windows service and a form application. So, I want to put embed the report in a DLL file that can be used by both.</p> <p>The problem is that if I try to set the ReportEmbeddedResource property of a ReportViewer control in my windows form app, it will search the windows form app f...
[ { "answer_id": 261842, "author": "DrCamel", "author_id": 4168, "author_profile": "https://Stackoverflow.com/users/4168", "pm_score": 4, "selected": false, "text": "rv.LocalReport.ReportEmbeddedResource = \"TheApp.Reports.MyReport.rdlc\";\n" }, { "answer_id": 358276, "author":...
2008/10/31
[ "https://Stackoverflow.com/questions/253735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/681/" ]
253,746
<p>In Microsoft Oslo SDK CTP 2008 (using Intellipad) the following code compiles fine:</p> <pre><code>module T { type A { Id : Integer32 = AutoNumber(); } where identity Id; As : A*; type B { Id : Integer32 = AutoNumber(); // A : A; // } where A in As &amp;&amp; identity Id...
[ { "answer_id": 254473, "author": "cfeduke", "author_id": 5645, "author_profile": "https://Stackoverflow.com/users/5645", "pm_score": 2, "selected": true, "text": "type A {\n Id : Integer32 = AutoNumber();\n} where identity Id;\n\nAs : A*;\n\ntype B {\n Id : Integer32 = AutoNumber()...
2008/10/31
[ "https://Stackoverflow.com/questions/253746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3588/" ]
253,747
<p>I'm using .NET typed datasets on a project, and I often get into situations where I prefetch data from several tables into a dataset and then pass that dataset to several methods for processing. It seems cleaner to let each method decide exactly which data it needs and then load the data itself. However, several of ...
[ { "answer_id": 254473, "author": "cfeduke", "author_id": 5645, "author_profile": "https://Stackoverflow.com/users/5645", "pm_score": 2, "selected": true, "text": "type A {\n Id : Integer32 = AutoNumber();\n} where identity Id;\n\nAs : A*;\n\ntype B {\n Id : Integer32 = AutoNumber()...
2008/10/31
[ "https://Stackoverflow.com/questions/253747", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33096/" ]
253,757
<p>In following code, I want to extend the behaviour of a class by deriving/subclassing it, and make use of an event of the base class:</p> <pre><code>public class A { public event EventHandler SomeEvent; public void someMethod() { if(SomeEvent != null) SomeEvent(this, someArgs); } } public c...
[ { "answer_id": 253776, "author": "Todd White", "author_id": 30833, "author_profile": "https://Stackoverflow.com/users/30833", "pm_score": 6, "selected": true, "text": "public class A\n{\n public event EventHandler SomeEvent;\n\n public void someMethod()\n {\n OnSomeEvent(...
2008/10/31
[ "https://Stackoverflow.com/questions/253757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26070/" ]
253,767
<p>I'm looking for a KDTree implementation in Java.<br> I've done a google search and the results seem pretty haphazard. There are actually lots of results, but they're mostly just little one-off implementations, and I'd rather find something with a little more "production value". Something like apache collections or t...
[ { "answer_id": 27467323, "author": "grepit", "author_id": 717630, "author_profile": "https://Stackoverflow.com/users/717630", "pm_score": 1, "selected": false, "text": "private class KDNode {\n KDNode left;\n KDNode right;\n E val;\n int depth;\n private KDNode(E e, int de...
2008/10/31
[ "https://Stackoverflow.com/questions/253767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22979/" ]
253,807
<p>We all know to keep it simple, right?</p> <p>I've seen complexity being measured as the number of interactions between systems, and I guess that's a very good place to start. Aside from gut feel though, what other (preferably more objective) methods can be used to determine the level of complexity of a particular d...
[ { "answer_id": 253841, "author": "lfalin", "author_id": 28106, "author_profile": "https://Stackoverflow.com/users/28106", "pm_score": 2, "selected": false, "text": "A B\n0 0\n1 0\n0 1\n1 1\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/253807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15310/" ]
253,810
<p>Much searching has lead me to find several descriptions of how to create a bootstrapping msi, but these solutions all assume the msi is local or a standard Windows component. Is there a way to make an msi that downloads an installer (which is also an msi) with normal MSI or Wix code rather than by having the bootst...
[ { "answer_id": 257841, "author": "saschabeaumont", "author_id": 592, "author_profile": "https://Stackoverflow.com/users/592", "pm_score": 0, "selected": false, "text": "InstallExecuteSequence msiexec.exe /i http://some.domain/blah.msi /passive" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/253810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18192/" ]
253,820
<p>I've been crossing things out on my TODO list. I've recently picked up Colemak. Next I wanted to learn Vim or Emacs. I was leaning towards Vim, however one of its benefits are sticking to the home row. With Colemak, the home row has been changed. I realize that I could remap the keys, but assigning the function...
[ { "answer_id": 2190106, "author": "Graham", "author_id": 130988, "author_profile": "https://Stackoverflow.com/users/130988", "pm_score": 3, "selected": false, "text": "noremap h k\nnoremap j h\nnoremap k j\n" }, { "answer_id": 5622090, "author": "c_oreills", "author_id": ...
2008/10/31
[ "https://Stackoverflow.com/questions/253820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17234/" ]
253,834
<p>Has anyone found a good class, or other file that will convert a .doc file into html or something that I can read and turn into html? </p> <p>I have been looking around for a couple hours now and have only found ones that require msword on the server in order to convert the file. I am pretty sure that is not an opt...
[ { "answer_id": 2968182, "author": "CronosNull", "author_id": 356675, "author_profile": "https://Stackoverflow.com/users/356675", "pm_score": 3, "selected": false, "text": "AbiWord --to=html archivo.doc\n" }, { "answer_id": 11334583, "author": "forever99", "author_id": 150...
2008/10/31
[ "https://Stackoverflow.com/questions/253834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1925/" ]
253,843
<p>What is the best way to refresh a <code>DataGridView</code> when you update an underlying data source?</p> <p>I'm updating the datasource frequently and wanted to display the outcome to the user as it happens.</p> <p>I've got something like this (and it works), but setting the <code>DataGridView.DataSource</code> ...
[ { "answer_id": 253863, "author": "Georg", "author_id": 30776, "author_profile": "https://Stackoverflow.com/users/30776", "pm_score": -1, "selected": false, "text": "List itemStates = new List();\n\nfor (int i = 0; i < 10; i++)\n{ \n itemStates.Add(new ItemState { Id = i.ToString() });...
2008/10/31
[ "https://Stackoverflow.com/questions/253843", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21180/" ]
253,849
<p>Using MSSQL2005, can I truncate a table with a foreign key constraint if I first truncate the child table (the table with the primary key of the FK relationship)?</p> <p>I know that I can either</p> <ul> <li>Use a <code>DELETE</code> without a where clause and then <code>RESEED</code> the identity (or)</li> <li>Re...
[ { "answer_id": 253931, "author": "ctrlShiftBryan", "author_id": 6161, "author_profile": "https://Stackoverflow.com/users/6161", "pm_score": 8, "selected": false, "text": "TRUNCATE TABLE DELETE TRUNCATE TABLE" }, { "answer_id": 3039404, "author": "denver_citizen", "author_...
2008/10/31
[ "https://Stackoverflow.com/questions/253849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6161/" ]
253,865
<p>In a WPF app, is there a object I can assign to FileSystemWatcher.SynchronizingObject?</p> <p>I can make my own, but if there is one available, I would like to use it.</p>
[ { "answer_id": 254120, "author": "Bradley Grainger", "author_id": 23633, "author_profile": "https://Stackoverflow.com/users/23633", "pm_score": 4, "selected": true, "text": "ISynchronizeInvoke FileSystemWatcher.SynchronizingObject System.Windows.Form.Control" }, { "answer_id": 10...
2008/10/31
[ "https://Stackoverflow.com/questions/253865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14841/" ]
253,868
<p>I'm looking at all the CSS Drop shadow tutorials, which are great. Unfortunately, I need to put a shadow on three sides of a block element (left, bottom, right). All the tutorials talk about shifting your block element up and to the left. Anyone have insights into putting a shadow on three or even four sides?</p>...
[ { "answer_id": 253915, "author": "Diodeus - James MacFarlane", "author_id": 12579, "author_profile": "https://Stackoverflow.com/users/12579", "pm_score": 1, "selected": false, "text": "<div style='position:relative;'>\n <div style='position:absolute;top:10px;left:10px;width:300px;heig...
2008/10/31
[ "https://Stackoverflow.com/questions/253868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1753/" ]
253,881
<p>Can't figure out why I'm getting 'SQL Statement ignored' and 'ORA-01775: looping chain of synonyms' on line 52 of this stored procedure. Got any ideas?</p> <pre><code>CREATE OR REPLACE PACKAGE PURGE_LOG_BY_EVENT_DAYS AS TYPE dual_cursorType IS REF CURSOR RETURN dual%ROWTYPE; PROCEDURE log_master_by_event_day...
[ { "answer_id": 253909, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "SELECT table_owner, table_name, db_link\n FROM dba_synonyms \n WHERE owner = 'PUBLIC' and db_link is not null\n" }, ...
2008/10/31
[ "https://Stackoverflow.com/questions/253881", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
253,911
<p>I have a case that keeps coming up where I'm using a ListView or similar control with a simple array such as string[].</p> <p>Is there a way to use the DataKeyNames property when you are binding to simple collections?</p>
[ { "answer_id": 253939, "author": "craigmoliver", "author_id": 12252, "author_profile": "https://Stackoverflow.com/users/12252", "pm_score": 0, "selected": false, "text": "public class LettersInfo\n{\n public String Letter { get; set; }\n}\n List<LettersInfo> list = new List<LettersInf...
2008/10/31
[ "https://Stackoverflow.com/questions/253911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10115/" ]
253,913
<p>I have a function I've written that was initially supposed to take a string field and populate an excel spreadsheet with the values. Those values continually came up null. I started tracking it back to the recordset and found that despite the query being valid and running properly through the Access query analyzer...
[ { "answer_id": 254202, "author": "Mr Furious", "author_id": 33124, "author_profile": "https://Stackoverflow.com/users/33124", "pm_score": 1, "selected": false, "text": "Private Sub AltTest()\n\n' Dimension Variables\n'----------------------------------------------------------\nDim rsNew...
2008/10/31
[ "https://Stackoverflow.com/questions/253913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33124/" ]
253,919
<p>I want to have CListCtrl.EditLabel() for any column of the list. How can I implement such a feature?</p>
[ { "answer_id": 254202, "author": "Mr Furious", "author_id": 33124, "author_profile": "https://Stackoverflow.com/users/33124", "pm_score": 1, "selected": false, "text": "Private Sub AltTest()\n\n' Dimension Variables\n'----------------------------------------------------------\nDim rsNew...
2008/10/31
[ "https://Stackoverflow.com/questions/253919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28161/" ]
253,925
<p>I have a Winforms application created in Visual Studio 2005 Pro, it connects to an SQL Server 2005 database using the SqlConnection / SqlCommand / SqlDataAdapter classes to extract data. I have stored procedures in my database to return the data to me.</p> <p>What is the best way to handle queries that take a "long...
[ { "answer_id": 253954, "author": "John", "author_id": 30006, "author_profile": "https://Stackoverflow.com/users/30006", "pm_score": 2, "selected": false, "text": " private void Form_Load(object sender, EventArgs e)\n {\n BackgroundWorker bw = new BackgroundWorker();\n ...
2008/10/31
[ "https://Stackoverflow.com/questions/253925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18854/" ]
253,937
<p>If I wanted to find checked check boxes on an ASP.NET page I could use the following LINQ query.</p> <pre><code>var checkBoxes = this.Controls .OfType&lt;CheckBox&gt;() .TakeWhile&lt;CheckBox&gt;(cb =&gt; cb.Checked); </code></pre> <p>That works fine if the checkboxes are ...
[ { "answer_id": 253962, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 7, "selected": true, "text": "public static IEnumerable<Control> GetAllControls(this Control parent)\n{\n foreach (Control control in parent.Control...
2008/10/31
[ "https://Stackoverflow.com/questions/253937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29294/" ]
253,938
<p>I have some complex stored procedures that may return many thousands of rows, and take a long time to complete.</p> <p>Is there any way to find out how many rows are going to be returned before the query executes and fetches the data?</p> <p>This is with Visual Studio 2005, a Winforms application and SQL Server 20...
[ { "answer_id": 253965, "author": "Keltex", "author_id": 28260, "author_profile": "https://Stackoverflow.com/users/28260", "pm_score": 0, "selected": false, "text": "select firstname, lastname, email, orderdate from \ncustomer inner join productorder on customer.customerid=productorder.p...
2008/10/31
[ "https://Stackoverflow.com/questions/253938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18854/" ]
253,971
<p>I have 2 databases, and <strong>I want to transport an existing table containing a CHAR column from database A to database B.</strong></p> <p>Database A is Oracle 9i, has encoding WE8ISO8859P1, and contains a table "foo" with at least 1 column of type CHAR(1 char). I can not change the table on database A because ...
[ { "answer_id": 254083, "author": "Thomas Jones-Low", "author_id": 23030, "author_profile": "https://Stackoverflow.com/users/23030", "pm_score": 2, "selected": false, "text": "ALTER SESSION NLS_NCHAR WE8ISO8859P1 \ncreate table bar as select * from #link#.foo;\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/253971", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3540161/" ]
253,982
<p>Mac's have TextMate as there preferred application for ruby development, but what would be the preferred application for linux? I need something where it's easy to work with multiple files, project structure and setup commands to run my ruby app or if it is one my merb app.Syntax highlighting is also a must.</p> <p...
[ { "answer_id": 8587899, "author": "Eki Eqbal", "author_id": 1080046, "author_profile": "https://Stackoverflow.com/users/1080046", "pm_score": 1, "selected": false, "text": " ⌘+shift+p → “install” → ENTER → “codeintel” → ENTER → Restart ST2\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/253982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1610/" ]
253,987
<p><code>select max(DELIVERY_TIMESTAMP) from DOCUMENTS;</code> will return the time that the latest document was delivered. How do I return <strong>the other columns</strong> for the latest document? For example I want <code>DOC_NAME</code> for the document that was most recently delivered?</p> <p>I'm not sure how to ...
[ { "answer_id": 253995, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "Select Max(DELIVERY_TIMESTAMP), \n Doc_Name\nFrom TableName\nGroup By Doc_Name\n" }, { "answer_id": 253996, ...
2008/10/31
[ "https://Stackoverflow.com/questions/253987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18995/" ]
253,993
<p>Is there a way in C# to:</p> <ol> <li><p>Get all the properties of a class that have attributes on them (versus having to loop through all properties and then check if attribute exists.</p></li> <li><p>If i want all Public, Internal, and Protected properties but NOT private properties, i can't find a way of doing t...
[ { "answer_id": 254625, "author": "Tim Robinson", "author_id": 32133, "author_profile": "https://Stackoverflow.com/users/32133", "pm_score": 1, "selected": false, "text": "internal protected private" }, { "answer_id": 254641, "author": "Tim Robinson", "author_id": 32133, ...
2008/10/31
[ "https://Stackoverflow.com/questions/253993", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
254,002
<p>I am looking for an expression for the .hgignore file, to ignore all files beneath a specified folder.</p> <p>eg: I would like to ignore all files and folders beneath bin</p> <p>Actually any advice on how the expressions are formed would be great</p>
[ { "answer_id": 254049, "author": "Xian", "author_id": 4642, "author_profile": "https://Stackoverflow.com/users/4642", "pm_score": 2, "selected": false, "text": "syntax: regexp\nbin\\\\*\n" }, { "answer_id": 255094, "author": "Ry4an Brase", "author_id": 8992, "author_p...
2008/10/31
[ "https://Stackoverflow.com/questions/254002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4642/" ]
254,004
<p>I am using the EMMA tool for code coverage yet despite my best efforts, EMMA is refusing to see the original .java files and generate coverage on a line-by-line basis.</p> <p>We are using ANT to build the code and debug is set to true. I know that EMMA is measuring coverage as the .emma files seem to be generating ...
[ { "answer_id": 254041, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "sourcepath report <report>\n <sourcepath>\n <pathelement path=\"${java.src.dir}\" />\n </sourcepath>\n <filese...
2008/10/31
[ "https://Stackoverflow.com/questions/254004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
254,009
<p>This probably has a simple answer, but I must not have had enough coffee to figure it out on my own:</p> <p>If I had a comma delimited string such as:</p> <pre><code>string list = "Fred,Sam,Mike,Sarah"; </code></pre> <p>How would get each element and add quotes around it and stick it back in a string like this:</...
[ { "answer_id": 254012, "author": "FOR", "author_id": 27826, "author_profile": "https://Stackoverflow.com/users/27826", "pm_score": 8, "selected": true, "text": "string s = \"A,B,C\";\nstring replaced = \"'\"+s.Replace(\",\", \"','\")+\"'\";\n string list = \"Fred,Sam,Mike,Sarah\";\nstrin...
2008/10/31
[ "https://Stackoverflow.com/questions/254009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12999/" ]
254,047
<p>Is it possible to send a HTTP response with a permanent redirect from a Stellent (now called Oracle UCM) website? We're using version 7.5.2 with iDoc script.</p> <p>We can use the iDoc function setHttpHeader() to send the Location HTTP header, but how to send the HTTP response code 301, to signal the permanent redi...
[ { "answer_id": 34593757, "author": "Jonathan Hult", "author_id": 423351, "author_profile": "https://Stackoverflow.com/users/423351", "pm_score": 0, "selected": false, "text": "<$setRedirectUrl(\"some url\")$>" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254047", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4167/" ]
254,054
<p>We have a Linux server application that is comprised of a number of open-source tools as well as programs we've written ourselves. Ideally we would like to be able to install this application on any common Linux distribution.</p> <p>In the past, we've written perl scripts to automate installs of this application. U...
[ { "answer_id": 266143, "author": "Josh Kelley", "author_id": 25507, "author_profile": "https://Stackoverflow.com/users/25507", "pm_score": 2, "selected": false, "text": "adduser mkdir install install install /etc/init.d /etc/rc*.d" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254054", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28314/" ]
254,058
<p>Where can I set the display name in the Service Control Manager of a c++ app?</p>
[ { "answer_id": 12137377, "author": "Jama A.", "author_id": 416996, "author_profile": "https://Stackoverflow.com/users/416996", "pm_score": 0, "selected": false, "text": "sc config <ServiceName> DisplayName= <NewName>\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
254,060
<p>I am using the WMD markdown editor in a project for a large number of fields that correspond to a large number of properties in a large number of Entity classes. Some classes may have multiple properties that require the markdown.</p> <p>I am storing the markdown itself since this makes it easier to edit the fields...
[ { "answer_id": 254148, "author": "Chris Cudmore", "author_id": 18907, "author_profile": "https://Stackoverflow.com/users/18907", "pm_score": 1, "selected": false, "text": "public String getDescription(MarkDownUtil converter)\n{\n if (converter == null) return description;\n else re...
2008/10/31
[ "https://Stackoverflow.com/questions/254060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27439/" ]
254,066
<p>On Windows XP, the following command in a script will prevent any power saving options from being enabled on the PC (monitor sleep, HD sleep, etc.). This is useful for kiosk applications.</p> <pre><code>powercfg.exe /setactive presentation </code></pre> <p>What is the equivalent on Vista?</p>
[ { "answer_id": 254131, "author": "jeremyasnyder", "author_id": 33143, "author_profile": "https://Stackoverflow.com/users/33143", "pm_score": 3, "selected": true, "text": "powercfg.exe -list\n powercfg.exe -setactive GUID\n Usage: POWERCFG -X <SETTING> <VALUE>\n\n <SETT...
2008/10/31
[ "https://Stackoverflow.com/questions/254066", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1490/" ]
254,071
<p>I tried to use <code>OPTION (MAXRECURSION 0)</code> in a view to generate a list of dates. This seems to be unsupported. Is there a workaround for this issue?</p> <p>EDIT to Explain what I actually want to do:</p> <p>I have 2 tables.</p> <p>table1: int weekday, bool available</p> <p>table2: datetime date, bool a...
[ { "answer_id": 13417526, "author": "Stefan Steiger", "author_id": 155077, "author_profile": "https://Stackoverflow.com/users/155077", "pm_score": 0, "selected": false, "text": ";WITH CTE_Stack(IsPartOfRecursion, Depth, MyDate) AS\n(\n SELECT \n 0 AS IsPartOfRecursion\n ...
2008/10/31
[ "https://Stackoverflow.com/questions/254071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13376/" ]
254,076
<p>This is the error Dependency Walker gives me on an executable that I am building with VC++ 2005 Express Edition. When trying to run the .exe, I get:</p> <pre><code>This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. </code></pre...
[ { "answer_id": 1093162, "author": "Ian Kemp", "author_id": 70345, "author_profile": "https://Stackoverflow.com/users/70345", "pm_score": 3, "selected": false, "text": "C:\\Program Files\\Microsoft Visual Studio 8\\VC\\redist\\x86\\Microsoft.VC80.CRT\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254076", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2666/" ]