qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
91,699
<p>Python's convention is that variables are created by first assignment, and trying to read their value before one has been assigned raises an exception. PHP by contrast implicitly creates a variable when it is read, with a null value. This means it is easy to do this in PHP:</p> <pre><code>function mymodule_importan...
[ { "answer_id": 91776, "author": "e-satis", "author_id": 9951, "author_profile": "https://Stackoverflow.com/users/9951", "pm_score": 0, "selected": false, "text": "error_reporting = E_ALL\n error_reporting(E_ALL);\n" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/91699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8925/" ]
91,715
<p>I've not used C++ very much in the past, and have recently been doing a lot of C#, and I'm really struggling to get back into the basics of C++ again. This is particularly tricky as work mandates that none of the most handy C++ constructs can be used, so all strings must be char *'s, and there is no provision for ST...
[ { "answer_id": 91749, "author": "Maximilian", "author_id": 1733, "author_profile": "https://Stackoverflow.com/users/1733", "pm_score": 1, "selected": false, "text": "static int lastIndex = 0;\nstatic char **registeredNames = new char*[numberOfNames];\n\nvoid RegisterName(const * char con...
2008/09/18
[ "https://Stackoverflow.com/questions/91715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15667/" ]
91,731
<p>How do you update a summary field's value from post function in JIRA?</p>
[ { "answer_id": 92157, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "public class SomePostFunction implements FunctionProvider {\n\n public void execute(Map transientVars, Map args, PropertySet...
2008/09/18
[ "https://Stackoverflow.com/questions/91731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
91,734
<p>I'm a little blockheaded right now…</p> <p>I have a date string in european format <strong>dd.mm.yyyy</strong> and need to transform it to <strong>mm.dd.yyyy</strong> with classic ASP. Any quick ideas?</p>
[ { "answer_id": 91780, "author": "Anheledir", "author_id": 5703, "author_profile": "https://Stackoverflow.com/users/5703", "pm_score": 2, "selected": false, "text": "payment_date = MID(payment_date,4,3) & LEFT(payment_date,3) & MID(payment_date,7)\n" }, { "answer_id": 91787, "...
2008/09/18
[ "https://Stackoverflow.com/questions/91734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5703/" ]
91,745
<p>I am building a table using the DataGridView where a user can select items from a dropdown in each cell. To simplify the problem, lets say i have 1 column. I am using the DataGridViewComboBoxColumn in the designer. I am trying to support having each row in that column have a different list of items to choose fro...
[ { "answer_id": 163247, "author": "WaterBoy", "author_id": 3270, "author_profile": "https://Stackoverflow.com/users/3270", "pm_score": 5, "selected": true, "text": "private void setCellComboBoxItems(DataGridView dataGrid, int rowIndex, int colIndex, object[] itemsToAdd)\n{\n DataGridVi...
2008/09/18
[ "https://Stackoverflow.com/questions/91745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
91,747
<p>How can I set the background color of a specific item in a <em>System.Windows.Forms.ListBox</em>?</p> <p>I would like to be able to set multiple ones if possible.</p>
[ { "answer_id": 91758, "author": "Grad van Horck", "author_id": 12569, "author_profile": "https://Stackoverflow.com/users/12569", "pm_score": 7, "selected": true, "text": "DrawMode OwnerDrawFixed private void listBox_DrawItem(object sender, DrawItemEventArgs e)\n{\n e.DrawBackground();...
2008/09/18
[ "https://Stackoverflow.com/questions/91747", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11137/" ]
91,766
<p>I have a DataGrid where each column has a SortExpression. I would like the sort expression to be the equivalent of "ORDER BY LEN(myField)".</p> <p>I have tried </p> <pre><code>SortExpression="LEN(myField)" </code></pre> <p>but this throws an exception as it is not valid syntax. Any ideas?</p>
[ { "answer_id": 91806, "author": "Ilya Kochetov", "author_id": 15329, "author_profile": "https://Stackoverflow.com/users/15329", "pm_score": 2, "selected": false, "text": "SELECT\n ColumnA as FieldA\n , ColumnB as FieldB\n , LEN(ColumnA) as FieldL\nFROM TableName\nORDER BY L\n SortExpress...
2008/09/18
[ "https://Stackoverflow.com/questions/91766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15393/" ]
91,778
<p>To create a new event handler on a control you can do this</p> <pre><code>c.Click += new EventHandler(mainFormButton_Click); </code></pre> <p>or this</p> <pre><code>c.Click += mainFormButton_Click; </code></pre> <p>and to remove an event handler you can do this</p> <pre><code>c.Click -= mainFormButton_Click; </...
[ { "answer_id": 91803, "author": "Jorge Ferreira", "author_id": 6508, "author_profile": "https://Stackoverflow.com/users/6508", "pm_score": 6, "selected": false, "text": "List<EventHandler> delegates = new List<EventHandler>();\n\nprivate event EventHandler MyRealEvent;\n\npublic event Ev...
2008/09/18
[ "https://Stackoverflow.com/questions/91778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7297/" ]
91,784
<p>I have a table with say 3 columns. There's no primary key so there can be duplicate rows. I need to just keep one and delete the others. Any idea how to do this is Sql Server?</p>
[ { "answer_id": 91794, "author": "Manrico Corazzi", "author_id": 4690, "author_profile": "https://Stackoverflow.com/users/4690", "pm_score": 6, "selected": true, "text": "INSERT INTO TABLE_2 \nSELECT DISTINCT * FROM TABLE_1\nGO\nDELETE FROM TABLE_1\nGO\nINSERT INTO TABLE_1\nSELECT * FROM ...
2008/09/18
[ "https://Stackoverflow.com/questions/91784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1688440/" ]
91,791
<p>When doing shell scripting, typically data will be in files of single line records like csv. It's really simple to handle this data with <code>grep</code> and <code>sed</code>. But I have to deal with XML often, so I'd really like a way to script access to that XML data via the command line. What are the best tools?...
[ { "answer_id": 91801, "author": "Joseph Holsten", "author_id": 16981, "author_profile": "https://Stackoverflow.com/users/16981", "pm_score": 5, "selected": false, "text": "sggrep sgsort xmlnorm" }, { "answer_id": 609667, "author": "bortzmeyer", "author_id": 15625, "au...
2008/09/18
[ "https://Stackoverflow.com/questions/91791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16981/" ]
91,800
<p>I'm using a FullTextSqlQuery in SharePoint 2007 (MOSS) and need to order the results by two columns:</p> <pre><code>SELECT WorkId FROM SCOPE() ORDER BY Author ASC, Rank DESC </code></pre> <p>However it seems that only the first column from ORDER BY is taken into account when returning results. In this case the res...
[ { "answer_id": 93524, "author": "Adam Hawkes", "author_id": 6703, "author_profile": "https://Stackoverflow.com/users/6703", "pm_score": 0, "selected": false, "text": "SELECT WorkId FROM SCOPE() ORDER BY AUTHOR + (10 - Rank) ASC\n" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/91800", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15682/" ]
91,810
<p>Working with python interactively, it's sometimes necessary to display a result which is some arbitrarily complex data structure (like lists with embedded lists, etc.) The default way to display them is just one massive linear dump which just wraps over and over and you have to parse carefully to read it.</p> <p>Is...
[ { "answer_id": 91818, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 6, "selected": true, "text": "from pprint import pprint\na = [0, 1, ['a', 'b', 'c'], 2, 3, 4]\npprint(a)\n" }, { "answer_id": 92260, "author"...
2008/09/18
[ "https://Stackoverflow.com/questions/91810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4086/" ]
91,817
<p>I discovered that you can start your variable name with a '@' character in C#. In my C# project I was using a web service (I added a web reference to my project) that was written in Java. One of the interface objects defined in the WSDL had a member variable with the name "params". Obviously this is a reserved word...
[ { "answer_id": 91829, "author": "Mark Embling", "author_id": 6844, "author_profile": "https://Stackoverflow.com/users/6844", "pm_score": 3, "selected": false, "text": "event _event @event" }, { "answer_id": 91888, "author": "Tomer Gabel", "author_id": 11558, "author_p...
2008/09/18
[ "https://Stackoverflow.com/questions/91817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13287/" ]
91,821
<p>I have a model class:</p> <pre><code>class Person(db.Model): first_name = db.StringProperty(required=True) last_name = db.StringProperty(required=True) </code></pre> <p>I have an instance of this class in <code>p</code>, and string <code>s</code> contains the value <code>'first_name'</code>. I would like to do...
[ { "answer_id": 91859, "author": "Jim", "author_id": 8427, "author_profile": "https://Stackoverflow.com/users/8427", "pm_score": 1, "selected": false, "text": "getattr(p, s)\nsetattr(p, s, new_value)\n" }, { "answer_id": 91911, "author": "Jim", "author_id": 8427, "auth...
2008/09/18
[ "https://Stackoverflow.com/questions/91821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3154/" ]
91,826
<p>Is there a version of FitNesse that works on Delphi 2006/2007/2009?</p> <p>If so where can I find It?</p> <p>Are there any other programs like FitNesse that work on Delphi 2006?</p>
[ { "answer_id": 91859, "author": "Jim", "author_id": 8427, "author_profile": "https://Stackoverflow.com/users/8427", "pm_score": 1, "selected": false, "text": "getattr(p, s)\nsetattr(p, s, new_value)\n" }, { "answer_id": 91911, "author": "Jim", "author_id": 8427, "auth...
2008/09/18
[ "https://Stackoverflow.com/questions/91826", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17560/" ]
91,831
<p>Say I have the following web.config:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;configuration&gt; &lt;system.web&gt; &lt;authentication mode="Windows"&gt;&lt;/authentication&gt; &lt;/system.web&gt; &lt;/configuration&gt; </code></pre> <p>Using ASP.NET C#, how can I detect the M...
[ { "answer_id": 91836, "author": "redsquare", "author_id": 6440, "author_profile": "https://Stackoverflow.com/users/6440", "pm_score": 3, "selected": true, "text": "Context.User.Identity.AuthenticationType" }, { "answer_id": 91842, "author": "Paul van Brenk", "author_id": ...
2008/09/18
[ "https://Stackoverflow.com/questions/91831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383/" ]
91,840
<p>Could anyone explain me finally what is the best strategy to implement transparent and fluent support of multi-tenant functionality in NHibernate powered domain model?</p> <p>Im looking for the way, how to keep the domain logic as isolated as possible from the multi-tenant stuff like filtering by TenantID etc</p>
[ { "answer_id": 249727, "author": "Yuriy Ostapenko", "author_id": 32702, "author_profile": "https://Stackoverflow.com/users/32702", "pm_score": 1, "selected": false, "text": " public class ContextualConnectionProvider : DriverConnectionProvider\n {\n\n protected override stri...
2008/09/18
[ "https://Stackoverflow.com/questions/91840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9198/" ]
91,857
<p>Can I safely rename the cygdrive folder? Also, I would like to add other folders at root and map them to folders on windows in the same way as /cygdrive/c maps to my C drive. Is that possible?</p>
[ { "answer_id": 91865, "author": "Thomas Owens", "author_id": 572, "author_profile": "https://Stackoverflow.com/users/572", "pm_score": 1, "selected": false, "text": "mount" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/91857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45603/" ]
91,899
<p>I'm using grep to generate a list of files I need to move:</p> <pre><code>grep -L -r 'Subject: \[SPAM\]' . </code></pre> <p>How can I pass this list to the mv command and move the files somewhere else?</p>
[ { "answer_id": 91954, "author": "e-satis", "author_id": 9951, "author_profile": "https://Stackoverflow.com/users/9951", "pm_score": 1, "selected": false, "text": "IFS=$'\\n'; # set the field separator to line break\nfor $mail in $(grep -L -r 'Subject: \\[SPAM\\]' .); do mv \"$mail\" your...
2008/09/18
[ "https://Stackoverflow.com/questions/91899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17582/" ]
91,905
<p>I want to add a mailto link on our web page. I want to add a urgent priority to this mail.</p>
[ { "answer_id": 91921, "author": "Robit", "author_id": 17026, "author_profile": "https://Stackoverflow.com/users/17026", "pm_score": 4, "selected": true, "text": "<a href=\"mailto:webmaster@website.com?subject=Urgent\">Send a email</a> \n" }, { "answer_id": 91974, "author": "G...
2008/09/18
[ "https://Stackoverflow.com/questions/91905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17584/" ]
91,932
<p>How does it work, what is it used for and when should one use it?</p>
[ { "answer_id": 92108, "author": "e-satis", "author_id": 9951, "author_profile": "https://Stackoverflow.com/users/9951", "pm_score": 7, "selected": true, "text": "Car() run() mycar = new Car()\nmycar.run()\n run() run() Class Car()\n{\n this.motor = new Motor(this) \n\n // passing \...
2008/09/18
[ "https://Stackoverflow.com/questions/91932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2695/" ]
91,933
<p>I've been working on a project where I need to iterate through a collection of data and remove entries where the "primary key" is duplicated. I have tried using a</p> <pre><code>List&lt;int&gt; </code></pre> <p>and </p> <pre><code>Dictionary&lt;int, bool&gt; </code></pre> <p>With the dictionary I found slightly ...
[ { "answer_id": 91979, "author": "Jorge Córdoba", "author_id": 2695, "author_profile": "https://Stackoverflow.com/users/2695", "pm_score": 0, "selected": false, "text": "foreach (int key in keys)\n{\n if (!MyDataDict.ContainsKey(key))\n {\n if (!MyDuplicatesDict.ContainsKey(key))\n ...
2008/09/18
[ "https://Stackoverflow.com/questions/91933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4660/" ]
91,957
<p>How do I use groovy to search+replace in XML?</p> <p>I need something as short/easy as possible, since I'll be giving this code to the testers for their SoapUI scripting.</p> <p>More specifically, how do I turn:</p> <pre><code>&lt;root&gt;&lt;data&gt;&lt;/data&gt;&lt;/root&gt; </code></pre> <p>into:</p> <pre><c...
[ { "answer_id": 92419, "author": "s3v1", "author_id": 17554, "author_profile": "https://Stackoverflow.com/users/17554", "pm_score": 1, "selected": false, "text": "import org.custommonkey.xmlunit.Diff\nimport org.custommonkey.xmlunit.XMLUnit\n\ndef input = '''<root><data></data></root>'''\...
2008/09/18
[ "https://Stackoverflow.com/questions/91957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17554/" ]
91,981
<p>Is there a way to mock object construction using JMock in Java? </p> <p>For example, if I have a method as such:</p> <pre class="lang-java prettyprint-override"><code>public Object createObject(String objectType) { if(objectType.equals("Integer") { return new Integer(); } else if (objectType.equal...
[ { "answer_id": 92718, "author": "Grundlefleck", "author_id": 4120, "author_profile": "https://Stackoverflow.com/users/4120", "pm_score": 1, "selected": false, "text": "public Wrapper wrapObject(Object toWrap) {\n if(toWrap instanceof ClassA) {\n return new Wrapper((ClassA) toWr...
2008/09/18
[ "https://Stackoverflow.com/questions/91981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4120/" ]
91,984
<p>When I use <kbd>CTRL</kbd>+<kbd>H</kbd> I end up on the Java Search tab. I would very much like a shortcut to go directly to File Search instead. Is that possible?</p> <p>See image here for what I'm talking about: <a href="https://i.stack.imgur.com/S3Qlf.png" rel="noreferrer"><img src="https://i.stack.imgur.com/S3Q...
[ { "answer_id": 49437058, "author": "Gabriel Staples", "author_id": 4561887, "author_profile": "https://Stackoverflow.com/users/4561887", "pm_score": 0, "selected": false, "text": "rea *.txt *32*f1*c *3*1*c*h *" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/91984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/86/" ]
91,986
<p>I've got the following SQL:</p> <pre><code>select * from transaction_log where stoptime like '%2008%' </code></pre> <p>How do I write this in LINQ to SQL syntax?</p>
[ { "answer_id": 92009, "author": "Nick Craver", "author_id": 13249, "author_profile": "https://Stackoverflow.com/users/13249", "pm_score": 6, "selected": true, "text": "var query = from l in transaction_log\n where SqlMethods.Like(l.stoptime, \"%2008%\")\n select l;\...
2008/09/18
[ "https://Stackoverflow.com/questions/91986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1683/" ]
91,994
<p>This is probably a silly question, but curiosity has gotten the better of me. I've been seeing code lately that seems to "reverse" the order of expressions for relational operators e.g.:</p> <pre><code>if (0 == someVariable) </code></pre> <p>As opposed to what I normally see/write:</p> <pre><code>if (someVariable...
[ { "answer_id": 92003, "author": "user7116", "author_id": 7116, "author_profile": "https://Stackoverflow.com/users/7116", "pm_score": 1, "selected": false, "text": "if (succeeded = TRUE)\n{\n // I could be in trouble here if 'succeeded' was FALSE\n}\n if (TRUE = succeeded)\n{\n // T...
2008/09/18
[ "https://Stackoverflow.com/questions/91994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9324/" ]
92,001
<p>AKA - What's this obsession with pointers?</p> <p>Having only really used modern, object oriented languages like ActionScript, Java and C#, I don't really understand the importance of pointers and what you use them for. What am I missing out on here?</p>
[ { "answer_id": 92054, "author": "Adam Wright", "author_id": 1200, "author_profile": "https://Stackoverflow.com/users/1200", "pm_score": 7, "selected": true, "text": "char* foo (foo + 5)" }, { "answer_id": 92208, "author": "slim", "author_id": 7512, "author_profile": "...
2008/09/18
[ "https://Stackoverflow.com/questions/92001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11911/" ]
92,004
<p>I'm trying to make a data bound column invisible after data binding, because it won't exist before data binding. However, the DataGrid.Columns collection indicates a count of 0, making it seem as if the automatically generated columns don't belong to the collection.</p> <p>How can I make a column that is automatic...
[ { "answer_id": 92028, "author": "Nick Craver", "author_id": 13249, "author_profile": "https://Stackoverflow.com/users/13249", "pm_score": 0, "selected": false, "text": "protected void GridView_RowCreated(object sender, GridViewRowEventArgs e)\n{\n e.Row.Cells[1].Visible = false;\n}\n" ...
2008/09/18
[ "https://Stackoverflow.com/questions/92004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8741/" ]
92,006
<p>I have an algorithm that generates strings based on a list of input words. How do I separate only the strings that sounds like English words? ie. discard <strong>RDLO</strong> while keeping <strong>LORD</strong>.</p> <p><strong>EDIT:</strong> To clarify, they do not need to be actual words in the dictionary. They j...
[ { "answer_id": 92083, "author": "Russ", "author_id": 6496, "author_profile": "https://Stackoverflow.com/users/6496", "pm_score": 2, "selected": false, "text": "def soundex(name, len=4):\n digits = '01230120022455012623010202'\n sndx = ''\n fc = ''\n\n for c in name.upper():\n...
2008/09/18
[ "https://Stackoverflow.com/questions/92006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/976/" ]
92,008
<p>How do I programmatically set the record pointer in a C# DataGridView? </p> <p>I've tried "DataGridView.Rows[DesiredRowIndex].Selected=true;", and that does not work. All it does is highlight that row within the grid; it doesn not move the record pointer to that row.</p>
[ { "answer_id": 92105, "author": "Wolfwyrd", "author_id": 15570, "author_profile": "https://Stackoverflow.com/users/15570", "pm_score": 3, "selected": true, "text": "dataGridView1.CurrentCell = this.dataGridView1[YourColumn,YourRow];\n" }, { "answer_id": 12528343, "author": "A...
2008/09/18
[ "https://Stackoverflow.com/questions/92008", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7148/" ]
92,027
<p>For a registration form I have something simple like:</p> <pre><code> &lt;tr:panelLabelAndMessage label="Zip/City" showRequired="true"&gt; &lt;tr:inputText id="zip" value="#{data['registration'].zipCode}" contentStyle="widt...
[ { "answer_id": 107817, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "panelLabelAndMessage inputText" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/92027", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11705/" ]
92,035
<p>I have a datagridview with a DataGridViewComboboxColumn column with 3 values:</p> <p>"Small", "Medium", "Large"</p> <p>I get back the users default which in this case is "Medium"</p> <p>I want to show a dropdown cell in the datagridview but default the value to "Medium". i would do this in a regular combobox by...
[ { "answer_id": 92186, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "[DataGridViewComboboxColumnName].DataPropertyName = \"PropertyNameToBindTo\";\n" }, { "answer_id": 712960, "author"...
2008/09/18
[ "https://Stackoverflow.com/questions/92035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
92,043
<p>I've tried the tools listed <a href="http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL" rel="noreferrer">here</a>, some with more success than others, but none gave me valid postgres syntax I could use (tinyint errors etc.)</p>
[ { "answer_id": 106760, "author": "vog", "author_id": 19163, "author_profile": "https://Stackoverflow.com/users/19163", "pm_score": 5, "selected": true, "text": "mysqldump" }, { "answer_id": 15670452, "author": "Linus Oleander", "author_id": 560073, "author_profile": "...
2008/09/18
[ "https://Stackoverflow.com/questions/92043", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4196/" ]
92,076
<p>I'm writing some xlst file which I want to use under linux and Windows. In this file I use node-set function which declared in different namespaces for MSXML and xsltproc ("urn:schemas-microsoft-com:xslt" and "<a href="http://exslt.org/common" rel="nofollow noreferrer">http://exslt.org/common</a>" respectively). Is...
[ { "answer_id": 92511, "author": "James Sulak", "author_id": 207, "author_profile": "https://Stackoverflow.com/users/207", "pm_score": 3, "selected": false, "text": "<xsl:choose>\n <xsl:when test=\"function-available('exslt:node-set')\">\n <xsl:apply-templates select=\"exslt:node-set(...
2008/09/18
[ "https://Stackoverflow.com/questions/92076", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17569/" ]
92,079
<p>Why does C++ Builder 6 always compile all files? </p> <p>I make some changes on one file but BCB 6 compiles all files when I start the app. Any idea? I use Windows XP SP2.</p>
[ { "answer_id": 1080949, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "#include \"all.h\"\n#pragma hdrstop\n #include <string>\n #include \"all.h\"\n #pragma hdrstop\n\n #include \"Unit1.h...
2008/09/18
[ "https://Stackoverflow.com/questions/92079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17465/" ]
92,082
<p>How can I add a column with a default value to an existing table in <a href="http://en.wikipedia.org/wiki/Microsoft_SQL_Server#Genesis" rel="noreferrer">SQL Server 2000</a> / <a href="http://en.wikipedia.org/wiki/Microsoft_SQL_Server#SQL_Server_2005" rel="noreferrer">SQL Server 2005</a>?</p>
[ { "answer_id": 92092, "author": "Benjamin Autin", "author_id": 1440933, "author_profile": "https://Stackoverflow.com/users/1440933", "pm_score": 6, "selected": false, "text": "ALTER TABLE ADD ColumnName {Column_Type} Constraint\n" }, { "answer_id": 92101, "author": "dbugger",...
2008/09/18
[ "https://Stackoverflow.com/questions/92082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7241/" ]
92,093
<p>I am working on a SQL query that reads from a SQLServer database to produce an extract file. One of the requirements to remove the leading zeroes from a particular field, which is a simple <code>VARCHAR(10)</code> field. So, for example, if the field contains '00001A', the SELECT statement needs to return the data ...
[ { "answer_id": 92363, "author": "Ian Horwill", "author_id": 5816, "author_profile": "https://Stackoverflow.com/users/5816", "pm_score": 8, "selected": true, "text": "select substring(ColumnName, patindex('%[^0]%',ColumnName), 10)\n" }, { "answer_id": 4504913, "author": "Kathr...
2008/09/18
[ "https://Stackoverflow.com/questions/92093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7585/" ]
92,100
<p>Is it possible to set code behind a resource dictionary in WPF. For example in a usercontrol for a button you declare it in XAML. The event handling code for the button click is done in the code file behind the control. If I was to create a data template with a button how can I write the event handler code for it's ...
[ { "answer_id": 98422, "author": "ageektrapped", "author_id": 631, "author_profile": "https://Stackoverflow.com/users/631", "pm_score": 9, "selected": true, "text": "<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n xmlns:x=\"http...
2008/09/18
[ "https://Stackoverflow.com/questions/92100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6204/" ]
92,114
<p>There is a limitation on Windows Server 2003 that prevents you from copying extremely large files, in proportion to the amount of RAM you have. The limitation is in the CopyFile and CopyFileEx functions, which are used by xcopy, Explorer, Robocopy, and the .NET FileInfo class.</p> <p>Here is the error that you get...
[ { "answer_id": 92165, "author": "jabial", "author_id": 16995, "author_profile": "https://Stackoverflow.com/users/16995", "pm_score": 5, "selected": true, "text": "f1 = open(filename1);\nf2 = open(filename2, \"w\");\nwhile( !f1.eof() ) {\n buffer = f1.read(buffersize);\n err = f2.write(...
2008/09/18
[ "https://Stackoverflow.com/questions/92114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1219/" ]
92,239
<p>If you have several <code>div</code>s on a page, you can use CSS to size, float them and move them round a little... but I can't see a way to get past the fact that the first <code>div</code> will show near the top of the page and the last <code>div</code> will be near the bottom! I cannot completely override the or...
[ { "answer_id": 92357, "author": "Jonathan Arkell", "author_id": 11052, "author_profile": "https://Stackoverflow.com/users/11052", "pm_score": 4, "selected": true, "text": "h1 {\n position: absolute;\n top: 0;\n left: 0;\n}\n\n#content {\n margin-top: 100px;\n margin-right: 250px;\n}...
2008/09/18
[ "https://Stackoverflow.com/questions/92239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11461/" ]
92,258
<p>With my multiproject pom I get an error while running release:prepare. There is nothing fancy about the project setup and every release-step before runs fine. The error I get is:</p> <pre> [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------...
[ { "answer_id": 751060, "author": "Dominic Mitchell", "author_id": 71343, "author_profile": "https://Stackoverflow.com/users/71343", "pm_score": 4, "selected": true, "text": "<build>\n <pluginManagement>\n <plugins>\n <plugin>\n <artifactId>maven-release-plugin</artifactId...
2008/09/18
[ "https://Stackoverflow.com/questions/92258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16515/" ]
92,287
<p>I am trying to write a C# client to a server that is written in Java. The server expects a 4 byte (DataInputStread readInt() in Java) message header followed by the actual message.</p> <p>I am absolutely new to C#, how can I send this message header over to the Java Server? I tried it several ways (mostly trial and...
[ { "answer_id": 92375, "author": "Craig Day", "author_id": 5193, "author_profile": "https://Stackoverflow.com/users/5193", "pm_score": 0, "selected": false, "text": "out.write((len >>> 24) & 0xFF);\nout.write((len >>> 16) & 0xFF);\nout.write((len >>> 8) & 0xFF);\nout.write((len >>> 0) &...
2008/09/18
[ "https://Stackoverflow.com/questions/92287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
92,328
<p>Within an event, I'd like to put the focus on a specific TextBox within the ListViewItem's template. The XAML looks like this:</p> <pre><code>&lt;ListView x:Name="myList" ItemsSource="{Binding SomeList}"&gt; &lt;ListView.View&gt; &lt;GridView&gt; &lt;GridViewColumn&gt; &lt;Gr...
[ { "answer_id": 92765, "author": "Abe Heidebrecht", "author_id": 9268, "author_profile": "https://Stackoverflow.com/users/9268", "pm_score": 4, "selected": false, "text": "private void myList_SelectionChanged(object sender, SelectionChangedEventArgs e)\n{\n if (myList.SelectedItem != n...
2008/09/18
[ "https://Stackoverflow.com/questions/92328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4918/" ]
92,342
<p>Is there the way to apply "greedy" behavior to and keys in Visual Studio? By "greedy" I mean such behavior when all whitespace between cursor position and next word bound can be deleted using one keystroke.</p>
[ { "answer_id": 92388, "author": "hugoware", "author_id": 17091, "author_profile": "https://Stackoverflow.com/users/17091", "pm_score": 1, "selected": false, "text": " Public Sub RemoveWhiteSpace()\n DTE.ActiveDocument.Selection.WordRight(True)\n DTE.ActiveDocument.Select...
2008/09/18
[ "https://Stackoverflow.com/questions/92342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2313/" ]
92,362
<p><strong>Has anyone found a way to run Selenium RC / Selenium Grid tests, written in C# in parallel?</strong></p> <p>I've currently got a sizable test suite written using Selenium RC's C# driver. Running the entire test suite takes a little over an hour to complete. I normally don't have to run the entire suite so i...
[ { "answer_id": 611452, "author": "Mark", "author_id": 18264, "author_profile": "https://Stackoverflow.com/users/18264", "pm_score": 3, "selected": false, "text": "TestSet TestTeardown [Test] public void Foo(){\n var s = new DefaultSelenium(\"http://grid\", 4444, \"*firefox\",\n ...
2008/09/18
[ "https://Stackoverflow.com/questions/92362", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6112/" ]
92,372
<p>Javascript code can be tough to maintain.<br> I am looking for tools that will help me ensure a reasonable quality level.<br> So far I have found <a href="https://github.com/pivotal/jsunit" rel="noreferrer">JsUNit</a>, a very nice unit test framework for javascript. Tests can be run automatically from ant on any bro...
[ { "answer_id": 4018418, "author": "Gian Marco", "author_id": 66629, "author_profile": "https://Stackoverflow.com/users/66629", "pm_score": 4, "selected": false, "text": "<build>\n <plugins>\n <plugin>\n <groupId>org.apache.maven.plugins</groupId>\n <artifa...
2008/09/18
[ "https://Stackoverflow.com/questions/92372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11897/" ]
92,376
<p>Is there any way that I can programmatically create (and I guess access) hidden folders on a storage device from within c#?</p>
[ { "answer_id": 92397, "author": "Tom Ritter", "author_id": 8435, "author_profile": "https://Stackoverflow.com/users/8435", "pm_score": 8, "selected": true, "text": "using System.IO; \n\nstring path = @\"c:\\folders\\newfolder\"; // or whatever \nif (!Directory.Exists(path)) \n{ \nDirecto...
2008/09/18
[ "https://Stackoverflow.com/questions/92376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1816/" ]
92,396
<p>I've always wondered this - why can't you declare variables after a case label in a switch statement? In C++ you can declare variables pretty much anywhere (and declaring them close to first use is obviously a good thing) but the following still won't work:</p> <pre><code>switch (val) { case VAL: // This w...
[ { "answer_id": 92408, "author": "Mark Ingram", "author_id": 986, "author_profile": "https://Stackoverflow.com/users/986", "pm_score": 5, "selected": false, "text": "switch (val)\n{\n case VAL:\n {\n // This **will** work\n int newVal = 42;\n }\n break;\n\n ca...
2008/09/18
[ "https://Stackoverflow.com/questions/92396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9236/" ]
92,426
<p>There doesn't appear to be any Perl libraries that can open, manipulate, and re-save PDF documents that use the newer PDF version (1.5 and above I believe) that use a cross-reference stream rather than table. Does anyone know of any unix/linux-based utilities to convert a PDF to an older version? Or perhaps there'...
[ { "answer_id": 92453, "author": "Roman Plášil", "author_id": 16590, "author_profile": "https://Stackoverflow.com/users/16590", "pm_score": 1, "selected": false, "text": "gs -dBATCH -dNOPAUSE -sDEVICE=pdfwriter -dCompatibilityLevel=1.2" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/92426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
92,427
<p>Based on a simple test I ran, I don't think it's possible to put an inline &lt;style&gt; tag into an ASP.NET server control. The style did not end up rendering to the output HTML. Even if it was possible, I'm sure it is bad practice to do this.</p> <p>Is it possible to do this? I can see it being useful for quick...
[ { "answer_id": 92444, "author": "Vaibhav", "author_id": 380, "author_profile": "https://Stackoverflow.com/users/380", "pm_score": 1, "selected": false, "text": "ControlName.Attributes[\"style\"] = \"color:red\";\n" }, { "answer_id": 92506, "author": "NakedBrunch", "author...
2008/09/18
[ "https://Stackoverflow.com/questions/92427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2470/" ]
92,434
<p>I'm having a problem with an application hanging and giving me the default "Please tell Microsoft about this problem" popup, instead of the "unhandled exception" dialog in the application.</p> <p>In the application code, the Application.ThreadException and AppDomain.CurrentDomain.UnhandledException are both redirec...
[ { "answer_id": 92495, "author": "Wolfwyrd", "author_id": 15570, "author_profile": "https://Stackoverflow.com/users/15570", "pm_score": 1, "selected": false, "text": "ArgumentOutOfRangeException" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/92434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11410/" ]
92,438
<p>I use to run</p> <pre><code>$s =~ s/[^[:print:]]//g; </code></pre> <p>on Perl to get rid of non printable characters. </p> <p>In Python there's no POSIX regex classes, and I can't write [:print:] having it mean what I want. I know of no way in Python to detect if a character is printable or not. </p> <p>What wou...
[ { "answer_id": 92441, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 2, "selected": false, "text": "def filter_non_printable(str):\n return ''.join([c for c in str if ord(c) > 31 or ord(c) == 9])\n" }, { "ans...
2008/09/18
[ "https://Stackoverflow.com/questions/92438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5190/" ]
92,452
<p>I've been working on this for a few days now, and I've found several solutions but none of them incredibly simple or lightweight. The problem is basically this: We have a cluster of 10 machines, each of which is running the same software on a multithreaded ESB platform. I can deal with concurrency issues between t...
[ { "answer_id": 97897, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 6, "selected": true, "text": "java.util.concurrent.locks.Lock lock = Hazelcast.getLock (\"mymonitor\");\nlock.lock ();\ntry {\n// do your stuff\n}finally {\n ...
2008/09/18
[ "https://Stackoverflow.com/questions/92452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7567/" ]
92,465
<p>I've started a conversion of a project to Moose and the first thing I noticed was that my critic/tidy tests go to hell. Moose, Tidy and Critic don't seem to like each other as much as they used to.</p> <p>Are there docs anywhere on how to make critic/tidy be more appreciative of the Moose dialect? What do most Moos...
[ { "answer_id": 101658, "author": "jplindstrom", "author_id": 10155, "author_profile": "https://Stackoverflow.com/users/10155", "pm_score": 3, "selected": false, "text": "my $apple = Apple->new({\n color => \"red\",\n type => \"delicious\",\n});\n my $apple = Apple->new({\n ...
2008/09/18
[ "https://Stackoverflow.com/questions/92465", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91911/" ]
92,471
<p>I have a Cocoa app that uses a WebView to display an HTML interface. How would I go about calling an Objective-C method from a Javascript function within the HTML interface?</p>
[ { "answer_id": 30467359, "author": "Michael Diedrick", "author_id": 4279586, "author_profile": "https://Stackoverflow.com/users/4279586", "pm_score": 2, "selected": false, "text": "[testWinWebView setFrameLoadDelegate:self];\n - (void)webView:(WebView *)sender didClearWindowObject:(WebSc...
2008/09/18
[ "https://Stackoverflow.com/questions/92471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5168/" ]
92,475
<p>I've implemented a stopwatch that works fine without considering that bank holidays and weekends shouldn't be counted in the total duration. I was looking for some open-source library where I could get the elapsed time, passing a start instant, end instant and a set of bank holidays (weekends aren't counted in). The...
[ { "answer_id": 92733, "author": "bastos.sergio", "author_id": 12772, "author_profile": "https://Stackoverflow.com/users/12772", "pm_score": 1, "selected": false, "text": "private long CalculateTimeSpan(DateTime BeginDate, DateTime EndDate, ArrayList<DateTime> BankHollidays)\n{\n long ...
2008/09/18
[ "https://Stackoverflow.com/questions/92475", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
92,504
<p>I'm trying to create a self signed certificate for use with Apache Tomcat 6. Every certificate I can make always results in the browser connecting with AES-128. The customer would like me to demonstrate that I can create a connection at AES-256.</p> <p>I've tried java's keytool and openssl. I've tried with a var...
[ { "answer_id": 93696, "author": "delfuego", "author_id": 16414, "author_profile": "https://Stackoverflow.com/users/16414", "pm_score": 5, "selected": true, "text": "keytool -genkey -alias tomcat -keyalg RSA\n import java.util.Arrays;\nimport javax.net.ssl.SSLSocketFactory;\n\npublic clas...
2008/09/18
[ "https://Stackoverflow.com/questions/92504", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17583/" ]
92,514
<p>Is there any way to create a ODBC DSN with C#?</p> <p>Maybe a P/invoke?</p>
[ { "answer_id": 92645, "author": "Juanma", "author_id": 3730, "author_profile": "https://Stackoverflow.com/users/3730", "pm_score": 2, "selected": false, "text": "HKLM\\Software\\ODBC\\ODBC.INI\\ODBC Data Sources\n" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/92514", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1098074/" ]
92,522
<p>What is the best way to issue a http get in VB.net? I want to get the result of a request like <a href="http://api.hostip.info/?ip=68.180.206.184" rel="noreferrer">http://api.hostip.info/?ip=68.180.206.184</a> </p>
[ { "answer_id": 92544, "author": "hangy", "author_id": 11963, "author_profile": "https://Stackoverflow.com/users/11963", "pm_score": 7, "selected": true, "text": "Dim webClient As New System.Net.WebClient\nDim result As String = webClient.DownloadString(\"http://api.hostip.info/?ip=68.180...
2008/09/18
[ "https://Stackoverflow.com/questions/92522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4221/" ]
92,533
<p>Based on <a href="https://stackoverflow.com/questions/6209/split-a-string-ignoring-quoted-sections#6243">"Split a string by spaces in Python"</a>, which uses <em>shlex.split</em> to split a string with quotes smartly, I would be interested in hearing about other common tasks solved by non-obvious standard library fu...
[ { "answer_id": 95159, "author": "Gregg Lind", "author_id": 15842, "author_profile": "https://Stackoverflow.com/users/15842", "pm_score": 2, "selected": false, "text": "# in R, shorter iterables are automatically cycled\n# and all functions \"apply\" in a \"map\"-like way over lists\n> 0:...
2008/09/18
[ "https://Stackoverflow.com/questions/92533", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15842/" ]
92,537
<p>I have an AST derived from the ANTLR Parser Generator for Java. What I want to do is somehow construct a control flow graph of the source code, where each statement or expression is a unique Node. I understand there must be some recursiveness to this identification, I was wondering what you would suggest as the best...
[ { "answer_id": 93598, "author": "EfForEffort", "author_id": 14113, "author_profile": "https://Stackoverflow.com/users/14113", "pm_score": 5, "selected": true, "text": "for while" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/92537", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5915/" ]
92,540
<p>In a WinForms 2.0 C# application, what is the typical method used for saving and restoring form position and size in an application?</p> <p>Related, is it possible to add new User scoped application settings AT RUNTIME? I totally see how to add settings at design time, that's not a problem. But what if I want to cre...
[ { "answer_id": 93211, "author": "Stormenet", "author_id": 2090, "author_profile": "https://Stackoverflow.com/users/2090", "pm_score": 0, "selected": false, "text": "public class myForm : Form {\nprotected override void OnLoad(){\n //load the settings and apply them\n base.OnLoad();...
2008/09/18
[ "https://Stackoverflow.com/questions/92540", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
92,546
<p>When refactoring away some <code>#defines</code> I came across declarations similar to the following in a C++ header file:</p> <pre><code>static const unsigned int VAL = 42; const unsigned int ANOTHER_VAL = 37; </code></pre> <p>The question is, what difference, if any, will the static make? Note that multiple inc...
[ { "answer_id": 92641, "author": "Justsalt", "author_id": 13693, "author_profile": "https://Stackoverflow.com/users/13693", "pm_score": 8, "selected": true, "text": "static VAL VAL static VAL extern extern static const static extern static" }, { "answer_id": 92693, "author": "...
2008/09/18
[ "https://Stackoverflow.com/questions/92546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9236/" ]
92,561
<p>I am developing an application, and have URLs in the format <code>www.example.com/some_url/some_parameter/some_keyword</code>. I know by design that there is a maximum length that these URLs will have (and still be valid). Should I validate the URL length with every request in order to protect against buffer overflo...
[ { "answer_id": 31567280, "author": "thecoshman", "author_id": 300797, "author_profile": "https://Stackoverflow.com/users/300797", "pm_score": 0, "selected": false, "text": "@Path(\"/person/(.{0..100}\")" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/92561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4527/" ]
92,613
<p>I have some code which is supposed to display a short message. Here's the pertinent code:</p> <pre><code>DATA SEGMENT 'DATA' MSG DB 0AH, 0DH, 'Hello, Adam', '$' CHAR DB 00H DATA ENDS CODE SEGMENT 'CODE' PRINT_MSG: MOV AH, 09H ;Command to print string of characters MOV DX, OFFSET MSG ;Mov addre...
[ { "answer_id": 92708, "author": "Nils Pipenbrinck", "author_id": 15955, "author_profile": "https://Stackoverflow.com/users/15955", "pm_score": 2, "selected": false, "text": " MOV DX, offset MSG\n LDS DX, MSG ; Check that, it's been ages since I've written 16 bit code.\n MOV AX, SEG...
2008/09/18
[ "https://Stackoverflow.com/questions/92613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13790/" ]
92,620
<p>I came back today to an old script I had for logging into Gmail via SSL. The script worked fine last time I ran it (several months ago) but now it dies immediately with:</p> <pre><code>&lt;urlopen error The read operation timed out&gt; </code></pre> <p>If I set the timeout (no matter how long), it dies even more i...
[ { "answer_id": 93404, "author": "defnull", "author_id": 407880, "author_profile": "https://Stackoverflow.com/users/407880", "pm_score": 2, "selected": false, "text": "import socket\nsocket.setdefaulttimeout(30000)\nsock = socket.socket()\nsock.connect(('www.google.com', 443))\nssl = sock...
2008/09/18
[ "https://Stackoverflow.com/questions/92620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4300/" ]
92,679
<p>We are currently testing a Java Swing application for it's performance. I wonder if there is a good tool to automate this?</p>
[ { "answer_id": 1001001, "author": "Dema", "author_id": 407003, "author_profile": "https://Stackoverflow.com/users/407003", "pm_score": 0, "selected": false, "text": " Scenario: Dialog manipulation\n Given the frame \"SwingSet\" is visible\n And the frame \"SwingSet\" is the conta...
2008/09/18
[ "https://Stackoverflow.com/questions/92679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11962/" ]
92,689
<p>I am writing a Composite control, which contains a listview to display a table of items. Normally when using a ListView in Asp.NET I would define the templates in the code-forward.</p> <pre><code>&lt;asp:ListView runat="server" ID="ArticleList"&gt; &lt;LayoutTemplate&gt; &lt;div class="ContentContainer"...
[ { "answer_id": 94536, "author": "sontek", "author_id": 17176, "author_profile": "https://Stackoverflow.com/users/17176", "pm_score": -1, "selected": false, "text": "public delegate void InstantiateTemplateDelegate(Control container);\n\npublic class GenericTemplateImplementation : ITempl...
2008/09/18
[ "https://Stackoverflow.com/questions/92689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1837197/" ]
92,696
<p>I have a couple databases on a shared SQL Server 2005 cluster instance, that I would like performance metrics on. I have some processes that run for a very long time and suspect that code inefficiencies, rather than insufficient hardware are to blame.</p> <p>I would like some way to get these performance metrics so...
[ { "answer_id": 94536, "author": "sontek", "author_id": 17176, "author_profile": "https://Stackoverflow.com/users/17176", "pm_score": -1, "selected": false, "text": "public delegate void InstantiateTemplateDelegate(Control container);\n\npublic class GenericTemplateImplementation : ITempl...
2008/09/18
[ "https://Stackoverflow.com/questions/92696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5885/" ]
92,698
<p>I'm looking for an Access 2007 equivalent to SQL Server's COALESCE function.</p> <p>In SQL Server you could do something like:</p> <p><strong>Person</strong></p> <pre><code>John Steve Richard </code></pre> <p><strong>SQL</strong></p> <pre><code>DECLARE @PersonList nvarchar(1024) SELECT @PersonList = COALESCE(@P...
[ { "answer_id": 92878, "author": "Nick Craver", "author_id": 13249, "author_profile": "https://Stackoverflow.com/users/13249", "pm_score": 0, "selected": false, "text": "Nz(variant, [if null value]) ---Person--- \nJohn\nSteve\nRichard\n\nDECLARE @PersonList nvarchar(1024)\nSELECT @PersonL...
2008/09/18
[ "https://Stackoverflow.com/questions/92698", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3742/" ]
92,699
<p>I have a table called OffDays, where weekends and holiday dates are kept. I have a table called LeadTime where amount of time (in days) for a product to be manufactured is stored. Finally I have a table called Order where a product and the order date is kept.</p> <p>Is it possible to query when a product will be ...
[ { "answer_id": 92736, "author": "RB.", "author_id": 15393, "author_profile": "https://Stackoverflow.com/users/15393", "pm_score": 2, "selected": false, "text": "SELECT c.dt, l.*, o.*, c.*\n FROM [statistics].dbo.[calendar] c, \n [order] o JOIN\n lead l ON l.leadId = o.leadId\n ...
2008/09/18
[ "https://Stackoverflow.com/questions/92699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2581/" ]
92,720
<p>I have a web page that includes a bunch of images. Sometimes the image isn't available, so a broken image is displayed in the client's browser.</p> <p>How do I use jQuery to get the set of images, filter it to broken images then replace the src?</p> <hr/> <p>--I thought it would be easier to do this with jQuery, ...
[ { "answer_id": 92819, "author": "Prestaul", "author_id": 5628, "author_profile": "https://Stackoverflow.com/users/5628", "pm_score": 11, "selected": true, "text": "onError function imgError(image) {\n image.onerror = \"\";\n image.src = \"/images/noimage.gif\";\n return true;\n}...
2008/09/18
[ "https://Stackoverflow.com/questions/92720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17702/" ]
92,728
<p>Was looking for some approaches to incrementally converting an large existing ASP.NET VB.NET project to C# while still being able to deploy it as a single web application (currently deployed on a weekly basis). </p> <p>My thoughts were to just create a new C# ASP.NET project and slowly move pages over, but I've ne...
[ { "answer_id": 92840, "author": "SpoiledTechie.com", "author_id": 7644, "author_profile": "https://Stackoverflow.com/users/7644", "pm_score": 2, "selected": false, "text": "<compilation>\n<codeSubDirectories>\n <add directoryName=\"VB_Code\"/>\n <add directoryName=\"CS_Code\"/>\n</...
2008/09/18
[ "https://Stackoverflow.com/questions/92728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17691/" ]
92,742
<p>Has anyone else experienced (and possibly solved) unintentional pitch changes using MS SAPI TTS voices? </p> <p>I'm using the SpVoice automation interface with SAPI 5.1.</p> <p>Right now, my application (VB6 app) can get into a state where the TTS (Microsoft Anna) starts to sound like a chipmunk (proper rate, but ...
[ { "answer_id": 98837, "author": "Jason Stevenson", "author_id": 13368, "author_profile": "https://Stackoverflow.com/users/13368", "pm_score": 0, "selected": false, "text": "<pitch absmiddle=\"0\">" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/92742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17649/" ]
92,769
<p>I'm trying to put together a blog, and have gone with SubText and I've just installed SyntaxHighlighter but it doesn't seem to work properly. SubText or FCKEditor seems to tamper with the HTMl, inlineing everything in the pre tags and placing line-breaks at the end of each line.</p> <p>Bad times!</p> <p>Anyone kn...
[ { "answer_id": 2069859, "author": "Haacked", "author_id": 598, "author_profile": "https://Stackoverflow.com/users/598", "pm_score": 1, "selected": false, "text": "<BlogEntryEditor defaultProvider=\"FCKeditorBlogEntryEditorProvider\">\n <BlogEntryEditor defaultProvider=\"PlainTextBlogEntr...
2008/09/18
[ "https://Stackoverflow.com/questions/92769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5802/" ]
92,781
<p>I'm looking to have text display vertically, first letter at the bottom, last letter at the top, within a JLabel. Is this possible?</p>
[ { "answer_id": 92805, "author": "jodonnell", "author_id": 4223, "author_profile": "https://Stackoverflow.com/users/4223", "pm_score": 3, "selected": false, "text": "public class JVertLabel extends JComponent{\n private String text;\n\n public JVertLabel(String s){\n text = s;\n }\n...
2008/09/18
[ "https://Stackoverflow.com/questions/92781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16538/" ]
92,792
<p>I have a user control which is loaded in the page dynamically using the following code in Init of the Page.</p> <pre><code>Dim oCtl As Object oCtl = LoadControl("~/Controls/UserControl1.ascx") oCtl.Id = "UserControl11" PlaceHolder1.Controls.Clear() PlaceHolder1.Controls.Add(oCtl) </code></pre> <p>The user control...
[ { "answer_id": 93120, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "Partial Class DynamicLoad\n Inherits System.Web.UI.Page\n\n Protected Sub Page_Init(ByVal sender As Object, ByVal e As Sy...
2008/09/18
[ "https://Stackoverflow.com/questions/92792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
92,802
<p>I have a Bash shell script in which I would like to pause execution until the user presses a key. In DOS, this is easily accomplished with the <code>pause</code> command. Is there a Linux equivalent I can use in my script?</p>
[ { "answer_id": 92813, "author": "Jim", "author_id": 8427, "author_profile": "https://Stackoverflow.com/users/8427", "pm_score": 10, "selected": true, "text": "read user@host:~$ read -n1 -r -p \"Press any key to continue...\" key\n[...]\nuser@host:~$ \n -n1 -r -p key $key -t read -t5 -n1 ...
2008/09/18
[ "https://Stackoverflow.com/questions/92802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4362/" ]
92,809
<p>With the plethora of communication methods available to co-workers, how do you manage to keep distractions at bay for a large enough block of time to accomplish some focused programming?</p> <p>Do you quit or close all communications, have you informed people that an away message really means you are a way, or some...
[ { "answer_id": 92899, "author": "Tony Pitale", "author_id": 1167846, "author_profile": "https://Stackoverflow.com/users/1167846", "pm_score": 1, "selected": false, "text": "open" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/92809", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1167846/" ]
92,820
<pre><code>class A : IFoo { } ... A[] arrayOfA = new A[10]; if(arrayOfA is IFoo[]) { // this is not called } </code></pre> <p>Q1: Why is <code>arrayOfA</code> not an array of <code>IFoos</code>?</p> <p>Q2: Why can't I cast <code>arrayOfA</code> to <code>IFoo[]</code>?</p>
[ { "answer_id": 92856, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": -1, "selected": false, "text": "if (arrayofA[0] is IFoo) {.....}\n arrayOfA ICloneable IList ICollection IEnumerable IFoo" }, { "answer_id": ...
2008/09/18
[ "https://Stackoverflow.com/questions/92820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7529/" ]
92,826
<p>Simply setting the SVN_EDITOR variable to "mate" does not get the job done. It opens TextMate when appropriate, but then when I save the message and exit, I'm prompted to continue, abort or try again. It seems like the buffer isn't returned to the svn command for use.</p>
[ { "answer_id": 4998988, "author": "Fabio", "author_id": 518204, "author_profile": "https://Stackoverflow.com/users/518204", "pm_score": 2, "selected": false, "text": "~/.subversion/config mate -wl1" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/92826", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5586/" ]
92,841
<p>I am using CodeDom to generate dynamic code based on user values. One of those values controls what the name of the class I'm generating is. I know I could sterilize the name based on language rules about valid class names using regular expressions, but I'd like to know if there is a specific method built into the f...
[ { "answer_id": 92958, "author": "Zach", "author_id": 8720, "author_profile": "https://Stackoverflow.com/users/8720", "pm_score": 2, "selected": false, "text": "CodeCompiler.ValidateIdentifiers(class1);\n" }, { "answer_id": 92978, "author": "Jason Diller", "author_id": 218...
2008/09/18
[ "https://Stackoverflow.com/questions/92841", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8720/" ]
92,842
<p>I'm implementing a comment control that uses an ASP.Repeater to display each comment. The comment itself is currently displayed using a table to divide up some images to display the comment in a bubble.</p> <p>I know that tables are supposed to be the epitome of evil for design layout, and really expensive to disp...
[ { "answer_id": 92889, "author": "Doug Moore", "author_id": 13179, "author_profile": "https://Stackoverflow.com/users/13179", "pm_score": 0, "selected": false, "text": "<style>\n .start { background-image: url(\"topofbubble.png\"); height: <heightofimage>; }\n .end { background-image: u...
2008/09/18
[ "https://Stackoverflow.com/questions/92842", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12096/" ]
92,847
<p>How do I make an array shorter in Perl? I read some webpages indicating that I can assign:</p> <pre><code>$#ARRAY = 42; </code></pre> <p>I read that the use of $# is deprecated. I need a solution that will work for an array of arrays, too. This didn't work:</p> <pre><code>$#$ARRAY[$i] = 42; </code></pre>
[ { "answer_id": 92883, "author": "Leon Timmermans", "author_id": 4727, "author_profile": "https://Stackoverflow.com/users/4727", "pm_score": 0, "selected": false, "text": "splice @array, $length;\n#or\nsplice @{$arrays[$i]}, $length;\n" }, { "answer_id": 92935, "author": "Fros...
2008/09/18
[ "https://Stackoverflow.com/questions/92847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4454/" ]
92,848
<p>I have a Win-CGI application I am currently converting to ISAPI.</p> <p>The application uses the TDataset descendants for Extended Systems Advantage Database Server.</p> <p>As there can be only one instance of a TAdsSettings object, this must be in the main thread.</p> <p>TAdsQuery objects are needed in the requ...
[ { "answer_id": 94522, "author": "Francesca", "author_id": 9842, "author_profile": "https://Stackoverflow.com/users/9842", "pm_score": 0, "selected": false, "text": "System.MainThreadID <> Windows.GetCurrentThreadID" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/92848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11820/" ]
92,859
<p>This question was <a href="https://stackoverflow.com/questions/13049">already asked in the context of C#/.Net</a>.</p> <p>Now I'd like to learn the differences between a struct and a class in C++. Please discuss the technical differences as well as reasons for choosing one or the other in OO design.</p> <p>I'll st...
[ { "answer_id": 92914, "author": "crashmstr", "author_id": 1441, "author_profile": "https://Stackoverflow.com/users/1441", "pm_score": 5, "selected": false, "text": "struct" }, { "answer_id": 100899, "author": "Community", "author_id": -1, "author_profile": "https://St...
2008/09/18
[ "https://Stackoverflow.com/questions/92859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2686/" ]
92,860
<p>What is best practises for communicating events from a usercontrol to parent control/page i want to do something similar to this:</p> <pre><code>MyPage.aspx: &lt;asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceholder" runat="server"&gt; &lt;uc1:MyUserControl ID="MyUserControl1" runat="server" ...
[ { "answer_id": 92959, "author": "Doug Moore", "author_id": 13179, "author_profile": "https://Stackoverflow.com/users/13179", "pm_score": 4, "selected": true, "text": "<%@ Control Language=\"c#\" AutoEventWireup=\"false\" \n Codebehind=\"WebUserControl1.ascx.cs\" \n Inherits=\"aspne...
2008/09/18
[ "https://Stackoverflow.com/questions/92860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15555/" ]
92,862
<p>In Ruby, like in many other OO programming languages, operators are overloadable. However, only certain character operators can be overloaded.</p> <p>This list may be incomplete but, here are some of the operators that cannot be overloaded: </p> <pre><code>!, not, &amp;&amp;, and, ||, or </code></pre>
[ { "answer_id": 92931, "author": "Jordi Bunster", "author_id": 4272, "author_profile": "https://Stackoverflow.com/users/4272", "pm_score": 4, "selected": false, "text": "5 + 5 5.+(5) foo[bar] = baz foo.[]=(bar, baz)" }, { "answer_id": 98232, "author": "Ryan Bigg", "author_...
2008/09/18
[ "https://Stackoverflow.com/questions/92862", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1167846/" ]
92,869
<p>I am going to be starting up a new project at work and want to get into unit testing. We will be using Visual Studio 2008, C#, and the ASP.NET MVC stuff. I am looking at using either NUnit or the built-in test projects that Visual Studio 2008 has, but I am open to researching other suggestions. Is one system better ...
[ { "answer_id": 547199, "author": "Tuomas Hietanen", "author_id": 17791, "author_profile": "https://Stackoverflow.com/users/17791", "pm_score": 3, "selected": false, "text": " #if !MSTEST\n using NUnit.Framework;\n #else\n using Microsoft.VisualStudio.TestTools.UnitTesting;\n ...
2008/09/18
[ "https://Stackoverflow.com/questions/92869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13593/" ]
92,894
<p>I've done many web apps where the first thing you do is make a user table with usernames, passwords, names, e-mails and all of the other usual flotsam. My current project presents a situation where non-users records need to function similarly to users, but do not need to the ability to be a first order user. </p> ...
[ { "answer_id": 92965, "author": "ern", "author_id": 5609, "author_profile": "https://Stackoverflow.com/users/5609", "pm_score": 0, "selected": false, "text": "people users people" }, { "answer_id": 93090, "author": "Rick Glos", "author_id": 16008, "author_profile": "h...
2008/09/18
[ "https://Stackoverflow.com/questions/92894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1227/" ]
92,928
<p>In Python for *nix, does <code>time.sleep()</code> block the thread or the process?</p>
[ { "answer_id": 92986, "author": "Zach Burlingame", "author_id": 2233, "author_profile": "https://Stackoverflow.com/users/2233", "pm_score": 6, "selected": false, "text": "sleep()" }, { "answer_id": 93179, "author": "Nick Bastin", "author_id": 1502059, "author_profile"...
2008/09/18
[ "https://Stackoverflow.com/questions/92928", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17732/" ]
92,971
<p>I'm trying to detect the size of the screen I'm starting emacs on, and adjust the size and position the window it is starting in (I guess that's the frame in emacs-speak) accordingly. I'm trying to set up my .emacs so that I always get a "reasonably-big" window with it's top-left corner near the top-left of my scree...
[ { "answer_id": 93005, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "(setq initial-frame-alist\n (append '((width . 263) (height . 112) (top . -5) (left . 5) (font . \"4.System VIO\"))\n ...
2008/09/18
[ "https://Stackoverflow.com/questions/92971", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6402/" ]
92,984
<p>A friend of mine and I were having a discussion regarding currying and partial function application in Javascript, and we came to very different conclusions as to whether either were achievable. I came up with this implementation of <code>Function.prototype.curry</code>, which was the basis of our discussion:</p> <...
[ { "answer_id": 93243, "author": "Michael Johnson", "author_id": 17688, "author_profile": "https://Stackoverflow.com/users/17688", "pm_score": 3, "selected": true, "text": "vindaloo.curry = function(a) {\n return function(b) {\n return a + b;\n };\n};\n function karahi(b) {\n...
2008/09/18
[ "https://Stackoverflow.com/questions/92984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11109/" ]
92,985
<p>We used Drools as part of a solution to act as a sort of filter in a very intense processing application, maybe running up to 100 rules on 500,000 + working memory objects. turns out that it is extremely slow. anybody else have any experience using Drools in a batch type processing application?</p>
[ { "answer_id": 4751644, "author": "Adam B", "author_id": 52465, "author_profile": "https://Stackoverflow.com/users/52465", "pm_score": 1, "selected": false, "text": "OptimizerFactory.setDefaultOptimizer(OptimizerFactory.SAFE_REFLECTIVE);\n" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/92985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13143/" ]
93,039
<p>In what segment (.BSS, .DATA, other) of an executable file are static variables stored so that they don't have name collision? For example:</p> <pre><code> foo.c: bar.c: static int foo = 1; static int foo = 10; void fooTest() { void barTest() { static int bar = 2; ...
[ { "answer_id": 93103, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 4, "selected": false, "text": "DATA" }, { "answer_id": 93188, "author": "ugasoft", "author_id": 10120, "author_profile": "https://St...
2008/09/18
[ "https://Stackoverflow.com/questions/93039", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10703/" ]
93,056
<p>this should be simple...could someone provide me a simple code sample that has an aspx page hosting both a silverlight app (consisting of, say a button) and an iframe (pointing to, say stackoverflow.com). The silverlight app and iframe could be in separate div's, the same div, whatever. </p> <p>Everything I've trie...
[ { "answer_id": 93637, "author": "Ola Karlsson", "author_id": 10696, "author_profile": "https://Stackoverflow.com/users/10696", "pm_score": 2, "selected": false, "text": "<%@ Page Language=\"C#\" AutoEventWireup=\"true\" %>\n\n<%@ Register Assembly=\"System.Web.Silverlight\" Namespace=\"S...
2008/09/18
[ "https://Stackoverflow.com/questions/93056", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6419/" ]
93,058
<p>I can switch between windows with "C-x o", but if I have opened multiple frames, can I move between them without the mouse as well? </p> <p>I just realized that the question probably sounds braindead without this detail: I'm on Mac OS X (Finnish keyboard) and switching between windows of the same application is dif...
[ { "answer_id": 2337484, "author": "Trey Jackson", "author_id": 6148, "author_profile": "https://Stackoverflow.com/users/6148", "pm_score": 3, "selected": false, "text": "framemove.el (require 'framemove)\n(framemove-default-keybindings) ;; default prefix is Meta\n" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/93058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4110/" ]
93,063
<p>I'm wondering if there's an integrated solution to have a database with versioned records supported by rails (ala version_fu ar_versioned) and a differ thanks!</p>
[ { "answer_id": 736806, "author": "Brian Armstrong", "author_id": 76486, "author_profile": "https://Stackoverflow.com/users/76486", "pm_score": 0, "selected": false, "text": "acts_as_audited htmldiff" } ]
2008/09/18
[ "https://Stackoverflow.com/questions/93063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
93,073
<p>How do you implement an <strong>efficient and thread safe reference counting system</strong> on X86 CPUs in the C++ programming language? </p> <p>I always run into the problem that the <strong>critical operations not atomic</strong>, and the available X86 Interlock operations are not sufficient for implementing the...
[ { "answer_id": 93130, "author": "moonshadow", "author_id": 11834, "author_profile": "https://Stackoverflow.com/users/11834", "pm_score": 3, "selected": false, "text": "do\n read the count\n perform mathematical operation\n interlockedcompareexchange( destination, updated count, old...
2008/09/18
[ "https://Stackoverflow.com/questions/93073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15288/" ]