Id int64 4 8.51M | PostTypeId int64 1 7 | AcceptedAnswerId int64 7 75.5M ⌀ | ParentId int64 4 41.8M ⌀ | Score int64 -208 27.7k | ViewCount int64 11 12.4M ⌀ | Body stringlengths 0 45k | Title stringlengths 2 150 ⌀ | ContentLicense stringclasses 3
values | FavoriteCount int64 0 225 ⌀ | CreationDate stringdate 2008-07-31 21:42:52 2011-12-14 18:48:47 | LastActivityDate stringdate 2008-08-01 12:19:17 2023-03-05 04:40:26 | LastEditDate stringdate 2008-08-01 13:54:25 2023-03-05 03:12:45 ⌀ | LastEditorUserId int64 -1 21.3M ⌀ | OwnerUserId int64 -1 21.1M ⌀ | Tags listlengths 1 6 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
28,981 | 2 | null | 28,896 | 9 | null | The Decimal data type although precise might not be the optimum choice depending on what you want to do. Generally Direct3D and GPUs use 32-bit floats, and vectors of 3 (total 96 bits) to represent a position in x,y,z.
This will usually give more than enough precision unless you need to mix both huge scale (planets) ... | null | CC BY-SA 2.5 | null | 2008-08-26T19:57:59.147 | 2008-08-26T19:57:59.147 | null | null | 1,324,220 | null |
28,975 | 1 | null | null | 59 | 12,736 | I've followed the [CouchDB](http://incubator.apache.org/couchdb/index.html) project with interest over the last couple of years, and see it is now an Apache Incubator project. Prior to that, the CouchDB web site was full of type disclaimers, so I'd done no more than keep an eye on it. I'd be interested to know your ex... | Anyone using CouchDB? | CC BY-SA 2.5 | 0 | 2008-08-26T19:55:29.510 | 2013-04-09T22:33:46.250 | 2008-08-26T20:01:41.337 | 832 | 2,745 | [
"database",
"couchdb"
] |
28,993 | 2 | null | 27,242 | 2 | null | I started learning by looking at jQuery extensions to see how other developers work with the jQuery language. It not only helped me to learn jQuery syntax but also taught me how to develop my own extensions.
| null | CC BY-SA 2.5 | null | 2008-08-26T20:05:20.127 | 2008-08-26T20:05:20.127 | null | null | 2,903 | null |
28,973 | 2 | null | 28,858 | 19 | null | Some basic functionals:
```
public static class Functionals
{
// One-argument Y-Combinator.
public static Func<T, TResult> Y<T, TResult>(Func<Func<T, TResult>, Func<T, TResult>> F)
{
return t => F(Y(F))(t);
}
// Two-argument Y-Combinator.
public static Func<T1, T2, TResult> Y<T1, T2, T... | null | CC BY-SA 2.5 | null | 2008-08-26T19:54:42.850 | 2008-09-18T15:36:15.463 | 2017-05-23T11:54:25.417 | -1 | 2,729 | null |
28,998 | 2 | null | 28,878 | 1 | null | I'm not entirely sure how your code works, but it seems like you have a small error in your code.
On the line you posted in your question you have `$link->parent_node()`, but in the answer with the entire code snippet you have `$link**s**->parent_node()`.
I don't think the `s` should be there.
| null | CC BY-SA 3.0 | null | 2008-08-26T20:07:43.350 | 2016-06-30T03:13:21.417 | 2016-06-30T03:13:21.417 | 4,311,889 | 1,585 | null |
28,982 | 1 | null | null | 176 | 76,684 | Related to my [CouchDB](https://stackoverflow.com/questions/28975/anyone-using-couchdb) question.
Can anyone explain MapReduce in terms a numbnuts could understand?
| Simple explanation of MapReduce? | CC BY-SA 3.0 | 0 | 2008-08-26T19:58:57.927 | 2022-11-08T21:37:40.433 | 2017-05-23T11:55:03.767 | -1 | 2,745 | [
"frameworks",
"mapreduce",
"glossary"
] |
29,004 | 1 | 29,032 | null | 14 | 49,026 | Sometimes I need to quickly extract some arbitrary data from XML files to put into a CSV format. What's your best practices for doing this in the Unix terminal? I would love some code examples, so for instance how can I get the following problem solved?
Example XML input:
```
<root>
<myel name="Foo" />
<myel na... | Parsing XML using unix terminal | CC BY-SA 4.0 | 0 | 2008-08-26T20:09:40.303 | 2022-12-07T12:23:24.367 | 2021-01-19T08:19:39.093 | 5,123,537 | 261 | [
"xml",
"unix",
"parsing",
"shell",
"csv"
] |
29,011 | 1 | 30,719 | null | 8 | 12,837 | I have
```
class Foo < ActiveRecord::Base
named_scope :a, lambda { |a| :conditions => { :a => a } }
named_scope :b, lambda { |b| :conditions => { :b => b } }
end
```
I'd like
```
class Foo < ActiveRecord::Base
named_scope :ab, lambda { |a,b| :conditions => { :a => a, :b => b } }
end
```
but I'd prefer to do... | Is there a way to combine named scopes into a new named scope? | CC BY-SA 2.5 | 0 | 2008-08-26T20:13:46.020 | 2018-08-16T21:00:49.980 | 2018-08-16T21:00:49.980 | 2,262,149 | 1,190 | [
"ruby-on-rails",
"rails-activerecord",
"named-scope"
] |
29,021 | 2 | null | 28,894 | 5 | null | Examine the [Debug.Write](http://msdn.microsoft.com/en-us/library/54ffa64k.aspx) method. It is marked with the
```
[Conditional("DEBUG")]
```
attribute.
The MSDN help for [ConditionalAttribute](http://msdn.microsoft.com/en-us/library/system.diagnostics.conditionalattribute.aspx) states:
> Indicates to compilers ... | null | CC BY-SA 2.5 | null | 2008-08-26T21:37:42.183 | 2008-08-26T21:37:42.183 | null | null | 1,324,220 | null |
29,030 | 1 | 30,691 | null | 1 | 3,763 | I have a custom SharePoint application page deployed to the _layouts folder. It's a custom "new form" for a custom content type. During my interactions with this page, I will need to add an item to my list. When the page first loads, I can use SPContext.Current.List to see the current list I'm working with. But aft... | SharePoint SPContext.List in a custom application page | CC BY-SA 2.5 | null | 2008-08-26T21:47:22.817 | 2016-06-17T09:50:55.513 | null | null | 404 | [
"sharepoint",
"spcontext",
"applicationpage"
] |
29,032 | 2 | null | 29,004 | 7 | null | If you just want the name attributes of any element, here is a quick but incomplete solution.
(Your example text is in the file )
> grep "name" example | cut -d"\"" -f2,2
| xargs -I{} echo "{},"
| null | CC BY-SA 2.5 | null | 2008-08-26T21:47:42.753 | 2008-08-26T21:47:42.753 | null | null | null | null |
29,029 | 2 | null | 28,982 | 20 | null | Let's take the example from the [Google paper](https://static.googleusercontent.com/media/research.google.com/en//archive/mapreduce-osdi04.pdf). The goal of MapReduce is to be able to use efficiently a load of processing units working in parallels for some kind of algorithms. The exemple is the following: you want to e... | null | CC BY-SA 3.0 | null | 2008-08-26T21:47:21.037 | 2017-07-29T19:01:35.673 | 2017-07-29T19:01:35.673 | 2,314,737 | 3,069 | null |
29,033 | 2 | null | 26,458 | 3 | null | I have switched between several IDEs and the one that I believe has the best GUI builder in terms of use and performance would have to be NetBeans.
| null | CC BY-SA 3.0 | null | 2008-08-26T21:48:09.473 | 2018-02-10T00:49:26.450 | 2018-02-10T00:49:26.450 | 63,550 | 3,111 | null |
29,039 | 2 | null | 27,095 | 0 | null | > True. I didn't account for duplicate encodings. There are actually 252-1 NaNs for doubles and 223-1 NaNs for singles, though. :p
Doh, forgot to subtract the infinities.
| null | CC BY-SA 2.5 | null | 2008-08-26T21:54:56.667 | 2008-08-26T21:54:56.667 | null | null | 2,131 | null |
29,041 | 2 | null | 27,499 | 1 | null | SQL Server 2005 and up offer MVCC as an option; it isn't the default, however. MS calls it snapshot isolation, if memory serves.
| null | CC BY-SA 2.5 | null | 2008-08-26T21:56:36.367 | 2008-08-26T21:56:36.367 | null | null | 2,131 | null |
29,023 | 2 | null | 29,004 | 9 | null | Use a command-line XSLT processor such as [xsltproc](http://xmlsoft.org/XSLT/xsltproc2.html), [saxon](http://saxon.sourceforge.net/) or [xalan](http://xalan.apache.org/) to parse the XML and generate CSV. Here's [an example](http://www.stylusstudio.com/xmldev/200404/post60210.html), which for your case is the styleshee... | null | CC BY-SA 2.5 | null | 2008-08-26T21:40:02.943 | 2008-08-26T21:46:53.517 | 2008-08-26T21:46:53.517 | 2,670 | 2,670 | null |
28,988 | 2 | null | 28,932 | 8 | null | I use [ShrinkSafe from the Dojo project](http://shrinksafe.dojotoolkit.org/) - it is exceptional because it actually uses a JavaScript interpreter ([Rhino](http://www.mozilla.org/rhino/)) to deal with finding symbols in the code and understanding their scope, etc. which helps to ensure that the code will work when it c... | null | CC BY-SA 2.5 | null | 2008-08-26T20:03:40.007 | 2010-08-24T16:35:22.970 | 2010-08-24T16:35:22.970 | 1,790 | 1,790 | null |
29,040 | 1 | 425,518 | null | 1 | 1,166 | I have one table "orders" with a foreing key "ProductID".
I want to show the orders in a grid with the , without for better performance, but I if use it retrieves Product fields, which seams like a .
Is there a way to retrieve the Product name in the first query?
Can I set some attribute in the DBML?
In this [ta... | Linq To SQL: Can I eager load only one field in a joined table? | CC BY-SA 2.5 | null | 2008-08-26T21:55:09.333 | 2009-01-10T14:52:42.500 | 2009-01-10T14:52:42.500 | 17,516 | 2,385 | [
".net",
"sql",
"performance",
"linq-to-sql"
] |
28,991 | 2 | null | 28,982 | 35 | null |
1. Take a bunch of data
2. Perform some kind of transformation that converts every datum to another kind of datum
3. Combine those new data into yet simpler data
Step 2 is Map. Step 3 is Reduce.
For example,
1. Get time between two impulses on a pair of pressure meters on the road
2. Map those times into speeds ... | null | CC BY-SA 2.5 | null | 2008-08-26T20:04:46.477 | 2010-06-01T17:45:29.013 | 2010-06-01T17:45:29.013 | 338 | 338 | null |
29,047 | 2 | null | 29,044 | 6 | null | You may want to look into SQLite ([http://sqlite.org/](http://sqlite.org/)). All depends on your usage though. Concurrency for example is not its greatest virtue. But for example Firefox uses it to store settings etc..
| null | CC BY-SA 2.5 | null | 2008-08-26T21:59:46.280 | 2008-08-26T21:59:46.280 | null | null | 2,859 | null |
29,042 | 2 | null | 20,272 | 1 | null | As [lassevk](https://stackoverflow.com/questions/20272/why-doesnt-shell-work-in-vbscript-in-vs6#20304) pointed out, VBScript is not Visual Basic.
I believe the only built in object in VBScript is the WScript object.
```
WScript.Echo "Hello, World!"
```
From the docs
> The WScript object is the root object of the W... | null | CC BY-SA 2.5 | null | 2008-08-26T21:57:10.593 | 2008-08-26T21:57:10.593 | 2017-05-23T12:19:33.570 | -1 | 245 | null |
28,958 | 2 | null | 27,598 | 0 | null | I have successfully connected to ActiveMQ and ServiceMix using the JConsole. Does WAS 6.1 use Java Management Extension (JMX) technology? JMX is required for JConsole.
If your path is set correctly it should work fine. On windows you go to System Properties -> Advanced Tab -> Environment Variables. Have your JAVA_HOME... | null | CC BY-SA 2.5 | null | 2008-08-26T19:49:42.630 | 2008-08-26T19:49:42.630 | null | null | 1,992 | null |
29,058 | 2 | null | 29,044 | 2 | null | What about Microsoft's Visual Studio Express?
[http://www.microsoft.com/express/default.aspx](http://www.microsoft.com/express/default.aspx)
SQL Server Express is also at that link...
| null | CC BY-SA 2.5 | null | 2008-08-26T22:02:26.680 | 2008-08-26T22:02:26.680 | null | null | 3,125 | null |
29,057 | 2 | null | 29,044 | 69 | null | Are you aware that the [Access 2007 runtime](http://www.microsoft.com/downloads/details.aspx?familyid=d9ae78d9-9dc6-4b38-9fa6-2c745a175aed&displaylang=en) can be downloaded for free?
Links for newer versions:
- [2010 Runtime](http://www.microsoft.com/en-us/download/details.aspx?id=10910)- [2013 Runtime](http://www.micr... | null | CC BY-SA 3.0 | null | 2008-08-26T22:02:20.643 | 2016-06-07T13:22:34.523 | 2020-06-20T09:12:55.060 | -1 | 2,548 | null |
29,038 | 2 | null | 28,949 | 43 | null | The short answer: Java garbage collection is a very finely tuned tool. System.gc() is a sledge-hammer.
Java's heap is divided into different generations, each of which is collected using a different strategy. If you attach a profiler to a healthy app, you'll see that it very rarely has to run the most expensive kinds ... | null | CC BY-SA 2.5 | null | 2008-08-26T21:54:39.990 | 2008-08-26T22:04:06.130 | 2008-08-26T22:04:06.130 | 3,052 | 3,052 | null |
28,992 | 2 | null | 14,530 | 194 | null | Some advantages of LINQ over sprocs:
1. Type safety: I think we all understand this.
2. Abstraction: This is especially true with LINQ-to-Entities. This abstraction also allows the framework to add additional improvements that you can easily take advantage of. PLINQ is an example of adding multi-threading support to ... | null | CC BY-SA 2.5 | null | 2008-08-26T20:04:51.347 | 2008-08-26T20:04:51.347 | null | null | 2,069 | null |
29,062 | 2 | null | 29,053 | 3 | null | "3" for those cases, I usually put in my scripts
```
if(!arrayList[arrayList.length -1]) arrayList.pop();
```
You could make a utility function out of that.
| null | CC BY-SA 2.5 | null | 2008-08-26T22:05:51.867 | 2008-08-26T22:05:51.867 | null | null | 3,069 | null |
29,061 | 1 | 29,083 | null | 19 | 38,904 | When I try to use an command in a shell script, the command just sits there. Do you have an example of how to use in a shell script?
| How do you use ssh in a shell script? | CC BY-SA 2.5 | 0 | 2008-08-26T22:05:37.310 | 2015-09-22T11:20:46.847 | 2008-08-27T16:55:34.257 | 1,438 | 1,438 | [
"bash",
"shell",
"ssh",
"ksh",
"rsh"
] |
29,049 | 2 | null | 27,499 | 1 | null | MVCC can also be implemented manually, by adding a version number column to your tables, and always doing inserts instead of updates.
The cost of this is a much larger database, and slower selects since each one needs a subquery to find the latest record.
It's an excellent solution for systems that require 100% audit... | null | CC BY-SA 2.5 | null | 2008-08-26T22:00:06.793 | 2008-08-26T22:00:06.793 | null | null | 1,219 | null |
29,053 | 1 | 29,073 | null | 27 | 7,707 | Code:
```
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Unusual Array Lengths!</title>
<script type="text/javascript">
var arrayList = new Array();
arrayList = [1, 2, 3, 4, 5, ];
alert(arrayList.length);
</script>
</head>
<body>
</body>
</html>
```
Notice the extra c... | Javascript Browser Quirks - array.Length | CC BY-SA 2.5 | 0 | 2008-08-26T22:00:38.773 | 2012-08-15T08:32:22.450 | 2017-05-23T10:29:36.727 | -1 | 384 | [
"javascript"
] |
29,060 | 2 | null | 28,975 | 18 | null | I got to know one of the people (Jan) working on it a while ago (like 6 months) and have been playing with it ever since. I found the community around CouchDB to be both very knowledgable and helpful so that whenever I ran into an issue it was resolved in a matter of minutes or hours at least.
We just kicked off a pro... | null | CC BY-SA 2.5 | null | 2008-08-26T22:04:25.240 | 2009-10-25T19:22:37.477 | 2009-10-25T19:22:37.477 | 2,859 | 2,859 | null |
29,066 | 2 | null | 29,053 | 7 | null | I was intrigued so I looked it up in the definition of [ECMAScript 262 ed. 3](http://www.ecma-international.org/publications/standards/Ecma-262.htm) which is the basis of JavaScript 1.8. The relevant definition is found in section 11.1.4 and unfortunately is not very clear. The section explicitly states that elisions (... | null | CC BY-SA 2.5 | null | 2008-08-26T22:10:31.963 | 2008-08-26T22:10:31.963 | null | null | 1,968 | null |
29,078 | 2 | null | 29,061 | 0 | null | You can use [expect](https://en.wikipedia.org/wiki/Expect) command to populate the username/password info.
| null | CC BY-SA 3.0 | null | 2008-08-26T22:18:30.557 | 2015-09-22T11:19:28.313 | 2015-09-22T11:19:28.313 | 4,095,830 | 2,697 | null |
29,073 | 2 | null | 29,053 | 9 | null | It seems to me that the Firefox behavior is correct. What is the value of the 6th value in IE (sorry I don't have it handy to test). Since there is no actual value provided, I imagine it's filling it with something like 'null' which certainly doesn't seem to be what you intended to have happen when you created the ar... | null | CC BY-SA 2.5 | null | 2008-08-26T22:13:41.083 | 2008-08-26T22:13:41.083 | null | null | 2,168 | null |
29,079 | 2 | null | 27,758 | 3 | null | You could build your own [Attribute](https://msdn.microsoft.com/en-us/library/system.attribute(v=vs.110).aspx) derived class, say `NonCallableAttribute` to qualify methods, and then add to your build/CI code analysis task the check to monitor if any code is using those methods.
In my opinion, you really cannot force d... | null | CC BY-SA 3.0 | null | 2008-08-26T22:18:32.867 | 2015-10-08T08:06:58.633 | 2015-10-08T08:06:58.633 | 67,579 | 2,954 | null |
29,046 | 2 | null | 29,044 | 64 | null | One thing to keep in mind here is the MS Access product is much more than just the raw database engine. It provides a full application development platform, including form and menu designer, client application language and environment (VBA), and report designer. When you take all those things together, MS Access really... | null | CC BY-SA 4.0 | null | 2008-08-26T21:59:10.120 | 2020-02-19T16:49:31.443 | 2020-02-19T16:49:31.443 | 3,043 | 3,043 | null |
29,081 | 2 | null | 9,033 | 25 | null | The pre-processor directive. It is Useful for
testing and debugging (though I usually prefer to go the
unit testing route).
```
string customerName = null;
#if DEBUG
customerName = "Bob"
#endif
```
It will only execute code block if Visual Studio is set to
compile in 'Debug' mode. Otherwise the code block will be... | null | CC BY-SA 2.5 | null | 2008-08-26T22:19:01.507 | 2009-09-27T19:39:45.520 | 2009-09-27T19:39:45.520 | 63,550 | 3,132 | null |
29,083 | 2 | null | 29,061 | 38 | null | Depends on what you want to do, and how you use it. If you just want to execute a command remotely and safely on another machine, just use
```
ssh user@host command
```
for example
```
ssh user@host ls
```
In order to do this safely you need to either ask the user for the password during runtime, or set up keys o... | null | CC BY-SA 2.5 | null | 2008-08-26T22:19:48.573 | 2008-08-26T22:19:48.573 | null | null | 2,973 | null |
29,082 | 2 | null | 29,053 | 0 | null | [@John](https://stackoverflow.com/questions/29053/javascript-browser-quirks-arraylength#29073): The value of arrayList[5] comes out to be 'undefined'.
Yes, there should never be a dangling comma in declarations. Actually, I was just going through someone else's long long javascript code which somehow was not working c... | null | CC BY-SA 2.5 | null | 2008-08-26T22:19:11.007 | 2008-08-26T22:19:11.007 | 2017-05-23T11:55:10.850 | -1 | 384 | null |
29,068 | 2 | null | 27,758 | 27 | null | you could use:
`[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]`
so that it doesn't show up in IntelliSense. If the consumer still wants to use it they can, but it won't be as discoverable.
[Keith's point](https://stackoverflow.com/a/27825/3195477) about over-engineering still... | null | CC BY-SA 4.0 | null | 2008-08-26T22:10:52.493 | 2022-03-24T12:27:05.513 | 2022-03-24T12:27:05.513 | 3,195,477 | 214 | null |
29,080 | 2 | null | 29,067 | 1 | null | Eh, figured out one way to do it:
```
ExecTaskControl foo = (ExecTaskControl)LoadControl("tasks\\ExecTaskControl.ascx");
```
It seems silly to have a file depedancy like that, but maybe thats how UserControls must be done.
| null | CC BY-SA 2.5 | null | 2008-08-26T22:18:34.177 | 2008-08-26T22:18:34.177 | null | null | 1,965 | null |
29,088 | 1 | 29,108 | null | 6 | 1,919 | What is the difference between a [Group](http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.group.aspx) and a [Match](http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.match.aspx) in .NET's RegEx?
| What is the difference between a group and match in .NET's RegEx? | CC BY-SA 3.0 | null | 2008-08-26T22:23:25.757 | 2012-04-26T00:35:56.853 | 2012-04-26T00:35:56.853 | 1,332,690 | 1,463 | [
".net",
"regex"
] |
29,084 | 2 | null | 28,965 | 12 | null | From the [Open Web Application Security Project](http://www.owasp.org/):
1. The OWASP Top Ten vulnerabilities (pdf)
2. For a more painfully exhaustive list: Category:Vulnerability
The top ten are:
1. Cross-site scripting (XSS)
2. Injection flaws (SQL injection, script injection)
3. Malicious file execution
4. In... | null | CC BY-SA 2.5 | null | 2008-08-26T22:20:09.163 | 2008-08-26T22:20:09.163 | null | null | 3,052 | null |
29,067 | 1 | null | null | 0 | 1,952 | I have a repeater that is bound to some data.
I bind to the event, and I am attempting to create a :
In a nutshell:
```
void rptrTaskList_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
CCTask task = (CCTask)e.Item.DataItem;
if (task is ExecTask)
{
ExecTaskControl foo = new ExecTaskCon... | Creating a UserControl Programmatically within a repeater? | CC BY-SA 4.0 | null | 2008-08-26T22:10:38.470 | 2019-12-07T15:42:15.100 | 2019-12-07T15:42:15.100 | 1,033,581 | 1,965 | [
"asp.net",
"user-controls",
"webforms"
] |
29,087 | 2 | null | 28,723 | 0 | null | Use NameValueDeserializer from [http://www.codeplex.com/MVCContrib](http://www.codeplex.com/MVCContrib) instead of UpdateFrom.
| null | CC BY-SA 2.5 | null | 2008-08-26T22:21:41.140 | 2008-08-26T22:21:41.140 | null | null | 2,785 | null |
29,089 | 2 | null | 29,061 | 2 | null | You need to put your SSH public key into the `~/.ssh/authorized_keys` file on the remote host. Then you'll be able to SSH to that host password-less.
Alternatively you can use `ssh-agent`. I would recommend against storing the password in the script.
| null | CC BY-SA 3.0 | null | 2008-08-26T22:23:45.940 | 2015-09-22T11:20:46.847 | 2015-09-22T11:20:46.847 | 4,095,830 | 1,693 | null |
29,090 | 2 | null | 27,758 | 9 | null | ```
throw new ISaidDoNotUseException();
```
| null | CC BY-SA 2.5 | null | 2008-08-26T22:23:47.190 | 2008-08-26T22:23:47.190 | null | null | 1,965 | null |
29,086 | 2 | null | 28,982 | 66 | null | MapReduce is a method to process vast sums of data in parallel without requiring the developer to write any code other than the mapper and reduce functions.
The function takes data in and churns out a result, which is held in a barrier. This function can run in parallel with a large number of the same task. The datas... | null | CC BY-SA 4.0 | null | 2008-08-26T22:21:28.910 | 2022-11-08T21:37:40.433 | 2022-11-08T21:37:40.433 | 1,063,716 | 1,116 | null |
29,097 | 2 | null | 29,061 | -3 | null | The easiest way is using a certificate for the user that runs the script.
A more complex one implies adding to stdin the password when the shell command asks for it. Expect, perl libraries, show to the user the prompt asking the password (if is interactive, at least), there are a lot of choices.
| null | CC BY-SA 2.5 | null | 2008-08-26T22:26:43.157 | 2008-08-26T22:26:43.157 | null | null | 3,133 | null |
29,095 | 2 | null | 28,150 | 1 | null | I think the only fool proof way would be to extend the Visual Studio (through VSIP) and subscribe to the correct event (maybe in the EnvDTE.BuildEvents) class, and check your code for usage of the constructor, and cancel the build if you detect it.
| null | CC BY-SA 2.5 | null | 2008-08-26T22:26:13.643 | 2008-08-26T22:26:13.643 | null | null | 380 | null |
29,100 | 1 | 109,932 | null | 5 | 281 | I came across a printed [article by Bertrand Meyer](http://www.eiffel.com/general/column/2008/02.html) where he states that tests can be generated from specifications. My development team does nothing like this, but it sounds like a good technique to consider. How are you generating tests from specifications? How would... | How are you generating tests from specifications? | CC BY-SA 3.0 | null | 2008-08-26T22:28:22.530 | 2012-04-26T01:17:47.293 | 2012-04-26T01:17:47.293 | 1,332,690 | null | [
"testing",
"automated-tests",
"specifications",
"faults"
] |
29,102 | 2 | null | 28,965 | 1 | null | Easy to oversee and easy to fix: the sanitizing of data received from the client side. Checking for things such as ';' can help in preventing malicious code being injected into your application.
| null | CC BY-SA 2.5 | null | 2008-08-26T22:29:20.297 | 2008-08-26T22:29:20.297 | null | null | 3,111 | null |
29,099 | 1 | 29,274 | null | 37 | 24,940 | Since debate without meaningful terms is [meaningless](https://stackoverflow.com/questions/24270/whats-the-point-of-oop), I figured I would point at the elephant in the room and ask: What exactly makes a language "object-oriented"? I'm not looking for a textbook answer here, but one based on your experiences with OO la... | What makes a language Object-Oriented? | CC BY-SA 2.5 | 0 | 2008-08-26T22:28:19.237 | 2021-01-10T15:23:42.663 | 2017-05-23T11:53:59.690 | -1 | 3,121 | [
"language-agnostic",
"oop",
"programming-languages",
"glossary"
] |
29,092 | 2 | null | 27,972 | 68 | null | Yes, HTTP-Only cookies would be fine for this functionality. They will still be provided with the XmlHttpRequest's request to the server.
In the case of Stack Overflow, the cookies are automatically provided as part of the XmlHttpRequest request. I don't know the implementation details of the Stack Overflow authenti... | null | CC BY-SA 2.5 | null | 2008-08-26T22:24:56.563 | 2010-03-21T22:32:37.687 | 2010-03-21T22:32:37.687 | 1 | 60 | null |
29,096 | 2 | null | 20,272 | -1 | null | VB6 uses & to concatenate strings rather than +, and you'll want to make sure the file name is encased in quotes in case of spaces. Try it like this:
```
Shell "p4 open """ & ActiveDocument.FullName & """"
```
| null | CC BY-SA 2.5 | null | 2008-08-26T22:26:29.367 | 2008-08-26T22:26:29.367 | null | null | 3,043 | null |
29,104 | 1 | 29,118 | null | 29 | 22,850 | How do you go about the requirements gathering phase? Does anyone have a good set of guidelines or tips to follow? What are some good questions to ask the stakeholders?
I am currently working on a new project and there are a lot of unknowns. I am in the process of coming up with a list of questions to ask the stakeho... | Requirements Gathering | CC BY-SA 2.5 | 0 | 2008-08-26T22:31:13.007 | 2017-03-10T17:28:12.230 | 2017-03-10T17:28:12.230 | 4,099,593 | 1,375 | [
"requirements-management"
] |
29,113 | 2 | null | 29,104 | 3 | null | You can never ask too many or "stupid" questions. The more questions you ask, the more answers you receive.
| null | CC BY-SA 2.5 | null | 2008-08-26T22:34:47.583 | 2008-08-26T22:34:47.583 | null | null | 3,132 | null |
29,044 | 1 | 29,046 | null | 105 | 152,873 | Consider the need to develop a lightweight desktop DB application on the Microsoft platforms.
It could be done fairly easily with MS Access but I'd like to be able to distribute it to others and I don't want to pay for a runtime license.
Requirements:
- -
Considerations and Candidates:
- [Base from the OpenOffi... | Good Free Alternative To MS Access | CC BY-SA 3.0 | 0 | 2008-08-26T21:57:21.340 | 2020-02-19T16:49:31.443 | 2017-05-23T10:29:36.727 | -1 | 2,820 | [
"database",
"ms-access",
"desktop"
] |
29,108 | 2 | null | 29,088 | 8 | null | A [Match](http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.match.aspx) is an object that indicates a particular regular expression matched (a portion of) the target text. A [Group](http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.group.aspx) indicates a portion of a match, if... | null | CC BY-SA 2.5 | null | 2008-08-26T22:33:04.000 | 2008-08-26T22:33:04.000 | null | null | 1,199 | null |
29,106 | 2 | null | 29,099 | 0 | null | Supports classes, methods, attributes, encapsulation, data hiding, inheritance, polymorphism, abstraction...?
| null | CC BY-SA 2.5 | null | 2008-08-26T22:32:15.670 | 2008-08-26T22:32:15.670 | null | null | null | null |
29,115 | 2 | null | 28,932 | 1 | null | [Here](http://brilaps.com/index.php?content=byuic) is a YUI compressor script ([Byuic](http://brilaps.com/index.php?content=byuic)) that finds all the js and css down a path and compresses /(optionally) obfuscates them. Nice to integrate into a build process.
| null | CC BY-SA 2.5 | null | 2008-08-26T22:35:02.513 | 2008-08-26T22:35:02.513 | null | null | 2,621 | null |
29,118 | 2 | null | 29,104 | 20 | null | You're almost certainly missing something. A lot of things, probably. Don't worry, it's ok. Even if you remembered everything and covered all the bases stakeholders aren't going to be able to give you very good, clear requirements without any point of reference. The best way to do this sort of thing is to get what ... | null | CC BY-SA 2.5 | null | 2008-08-26T22:36:16.053 | 2008-08-26T22:36:16.053 | null | null | 2,600 | null |
29,116 | 2 | null | 29,104 | 20 | null | See obligatory comic below...
In general, I try and get a feel for the business model my customer/client is trying to emulate with the application they want built. Are we building a glorified forms processor? Are we retrieving data from multiple sources in a single application to save time? Are we performing some kind... | null | CC BY-SA 3.0 | null | 2008-08-26T22:36:10.250 | 2012-03-30T00:27:34.847 | 2012-03-30T00:27:34.847 | 1,219,121 | 71 | null |
29,119 | 2 | null | 29,040 | 5 | null | What you are asking for is a level of optimisation the linq-to-sql does not provide. I think your best bet is to create a query that returns exactly the data you want, possibly as an anonymous type:
```
from order in DB.GetTable<Orders>()
join product in DB.GetTable<Products>()
on order.ProductID = product.ID
select n... | null | CC BY-SA 2.5 | null | 2008-08-26T22:36:21.467 | 2008-08-26T22:36:21.467 | null | null | 2,785 | null |
29,128 | 2 | null | 29,099 | 3 | null | Smalltalk is usually considered the archetypal OO language, although Simula is often cited as the first OO language.
Current OO languages can be loosely categorized by which language they borrow the most concepts from:
- -
| null | CC BY-SA 2.5 | null | 2008-08-26T22:43:03.773 | 2008-10-30T14:06:02.907 | 2008-10-30T14:06:02.907 | 1,175 | 1,175 | null |
29,131 | 2 | null | 28,896 | 3 | null | I would use a Vector datatype. Just like in Physics, when you want to model an objects movement, you use vectors. Use a [Vector2](http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.vector2.aspx) or [Vector3 class out of the XNA](http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.vector3.aspx... | null | CC BY-SA 2.5 | null | 2008-08-26T22:47:17.290 | 2008-08-26T22:47:17.290 | null | null | 1,117 | null |
29,121 | 2 | null | 29,099 | 9 | null | According to Booch, the following elements:
Major:
- - - -
Minor:
- - -
| null | CC BY-SA 2.5 | null | 2008-08-26T22:37:07.640 | 2008-08-26T22:37:07.640 | null | null | 380 | null |
29,114 | 2 | null | 29,061 | 22 | null | First, you need to make sure you've set up password-less (public key login). There are at least two flavors of ssh with slightly different configuration file formats. Check the manpage on your system, consult you local sysadmin or head over to [How do I setup Public-Key Authentication?](https://stackoverflow.com/que... | null | CC BY-SA 2.5 | null | 2008-08-26T22:34:57.350 | 2008-08-26T23:00:09.240 | 2017-05-23T12:25:57.563 | -1 | 1,438 | null |
29,141 | 1 | 29,232 | null | 11 | 19,712 | The problem: Loading an excel spreadsheet template. Using the Save command with a different filename and then quitting the interop object. This ends up saving the original template file. Not the result that is liked.
```
public void saveAndExit(string filename)
{
excelApplication.Save(filename);
exce... | Using Interop with C#, Excel Save changing original. How to negate this? | CC BY-SA 2.5 | 0 | 2008-08-26T22:55:37.473 | 2011-02-02T15:42:32.170 | 2008-08-27T16:25:51.627 | 3,135 | 3,135 | [
"c#",
"excel"
] |
29,138 | 2 | null | 28,949 | 4 | null | Don't bother with finalizers.
Switch to incremental garbage collection.
If you want to help the garbage collector, null off references to objects you no longer need. Less path to follow= more explicitly garbage.
Don't forget that (non-static) inner class instances keep references to their parent class instance. So... | null | CC BY-SA 2.5 | null | 2008-08-26T22:53:51.737 | 2008-08-26T22:53:51.737 | null | null | 2,789 | null |
29,143 | 2 | null | 29,088 | 2 | null | A Match is a part of a string that matches the regular expression, and there could therefore be multiple matches within a string.
Inside a Match you can define groups, either anonymous or named, to make it easier to split up a match. A simple example is to create a regex to search for URLs, and then use groups inside ... | null | CC BY-SA 2.5 | null | 2008-08-26T22:58:42.847 | 2008-08-26T23:08:06.507 | 2008-08-26T23:08:06.507 | 2,973 | 2,973 | null |
29,145 | 1 | null | null | 4 | 518 | I know that there are a few (automatic) ways to create a data access layer to manipulate an existing database (LINQ to SQL, Hibernate, etc...). But I'm getting kind of tired (and I believe that there should be a better way of doing things) of stuff like:
1. Creating/altering tables in Visio
2. Using Visio's "Update D... | Generating database tables from object definitions | CC BY-SA 2.5 | null | 2008-08-26T22:58:58.867 | 2010-11-25T23:58:28.990 | 2010-05-27T11:32:48.900 | 2,841 | 2,841 | [
"database",
"orm",
"code-generation"
] |
29,136 | 2 | null | 29,044 | 0 | null | for sqlite, check out the firefox extension. It offers a serviceable GUI.
| null | CC BY-SA 2.5 | null | 2008-08-26T22:51:03.443 | 2008-08-26T23:02:58.437 | 2008-08-26T23:02:58.437 | 479 | 479 | null |
29,146 | 2 | null | 29,107 | 1 | null | A couple of solutions I can think of:
1. The SubSonic Project has a pretty nice implementation of BindlingList<T> which is open source. Although this might require using the entire SubSonic binary to use their implementation.
2. I enjoy using the classes from the Power Collections project. It is fairly simple to inhe... | null | CC BY-SA 2.5 | null | 2008-08-26T22:59:22.610 | 2008-08-26T22:59:22.610 | null | null | 507 | null |
29,142 | 1 | 29,172 | null | 353 | 360,995 | This is a follow-on question to the [How do you use ssh in a shell script?](https://stackoverflow.com/questions/29061/how-do-you-use-ssh-in-a-shell-script) question. If I want to execute a command on the remote machine that runs in the background on that machine, how do I get the ssh command to return? When I try to ... | Getting ssh to execute a command in the background on target machine | CC BY-SA 4.0 | 0 | 2008-08-26T22:55:58.970 | 2023-01-20T05:33:36.770 | 2020-08-26T21:57:33.247 | 2,430,549 | 171 | [
"bash",
"ssh",
"csh"
] |
29,147 | 2 | null | 29,145 | 1 | null | You may be looking for an [Object Database](http://en.wikipedia.org/wiki/Object_database).
| null | CC BY-SA 2.5 | null | 2008-08-26T23:03:07.487 | 2008-08-26T23:03:07.487 | null | null | 1,293 | null |
29,157 | 1 | 13,484,101 | null | 30 | 13,465 | I am using StretchImage because the box is resizable with splitters. It looks like the default is some kind of smooth bilinear filtering, causing my image to be blurry and have moire patterns.
| How do I make a PictureBox use Nearest Neighbor resampling? | CC BY-SA 2.5 | 0 | 2008-08-26T23:07:30.703 | 2018-06-07T18:37:36.770 | 2008-12-02T15:50:18.653 | 15,371 | 2,543 | [
"c#",
".net",
"winforms",
"gdi+",
"picturebox"
] |
29,160 | 2 | null | 29,100 | 4 | null | This might be a reference to [RSpec](http://rspec.info/), which is a really clever way of developing tests as a series of requirements. I'm still getting used to it, but it's been very handy in both defining what I need to do and then ensuring I do it.
| null | CC BY-SA 2.5 | null | 2008-08-26T23:12:14.140 | 2008-08-26T23:12:14.140 | null | null | 722 | null |
29,134 | 2 | null | 29,053 | 2 | null | First off, [Konrad](https://stackoverflow.com/questions/29053/javascript-browser-quirks-arraylength#29066) is right to quote the spec, as that is what defines the language and answers your first question.
To answer your other questions:
>
Oh, too many to list here! Try [the QuirksMode website](http://www.quirksmode... | null | CC BY-SA 2.5 | null | 2008-08-26T22:50:21.837 | 2008-08-26T22:50:21.837 | 2017-05-23T10:29:36.727 | -1 | 1,790 | null |
29,163 | 2 | null | 28,965 | 6 | null | I second the OWASP info as being a valuable resource. The following may be of interest as well, notably the attack patterns:
- [CERT Top 10 Secure Coding Practices](https://www.securecoding.cert.org/confluence/display/seccode/Top+10+Secure+Coding+Practices)- [Common Attack Pattern Enumeration and Classification](http:... | null | CC BY-SA 2.5 | null | 2008-08-26T23:12:47.120 | 2008-08-27T00:23:28.197 | 2008-08-27T00:23:28.197 | 1,750 | 1,750 | null |
29,151 | 2 | null | 29,145 | 1 | null | I believe this is the problem that the [Microsofy Entity Framework](http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx) is trying to address. Whilst not specifically designed to "Compile (the database changes are done auto-magically)" it does address the issue of handling changes to the domain model without a... | null | CC BY-SA 2.5 | null | 2008-08-26T23:05:27.307 | 2008-08-26T23:05:27.307 | null | null | 493 | null |
29,168 | 1 | 2,047,574 | null | 67 | 15,348 | My master branch layout is like this:
<-- top level
<-- desktop client source files
<-- Rails app
What I'd like to do is only pull down the /server directory in my `deploy.rb`, but I can't seem to find any way to do that. The /client directory is huge, so setting up a hook to copy /server to / won't work very we... | Deploying a Git subdirectory in Capistrano | CC BY-SA 3.0 | 0 | 2008-08-26T23:15:41.697 | 2020-02-07T17:30:14.500 | 2012-04-25T23:51:16.010 | 1,332,690 | 574 | [
"ruby-on-rails",
"git",
"deployment",
"capistrano"
] |
29,124 | 2 | null | 28,256 | 71 | null |
### The hard way
You want a [recursive descent parser](http://en.wikipedia.org/wiki/Recursive_descent_parser).
To get precedence you need to think recursively, for example, using your sample string,
```
1+11*5
```
to do this manually, you would have to read the `1`, then see the plus and start a whole new recu... | null | CC BY-SA 3.0 | null | 2008-08-26T22:39:39.693 | 2016-02-14T12:49:11.783 | 2016-02-14T12:49:11.783 | 1,929,678 | 2,543 | null |
29,170 | 2 | null | 29,155 | 331 | null | An declaration adds a layer of abstraction and protection on the instance. This protection prevents clients of the delegate from resetting the delegate and its invocation list and only allows adding or removing targets from the invocation list.
| null | CC BY-SA 2.5 | null | 2008-08-26T23:16:18.640 | 2008-08-26T23:16:18.640 | null | null | 2,635 | null |
29,144 | 1 | 31,042 | null | 1 | 1,510 | I've always used Subversion or CVS for version control, which use a 'merge' methodology. One of my friends raves about Perforce and how great it is with its change lists and check-out methodology.
While I'm sure a lot of it comes down to experience & personal preference, I was wondering if any research had been done ... | What is the more efficient version control methodology: checkout or merge? | CC BY-SA 2.5 | null | 2008-08-26T22:58:43.720 | 2008-09-26T11:57:09.443 | 2008-09-25T15:49:03.273 | 3,474 | 2,975 | [
"svn",
"version-control",
"perforce"
] |
29,167 | 2 | null | 28,196 | 1 | null | So I tried both options on my WordPress db. I looked for the category "Tech" in my posts with the tags "Perl" AND "Programming".
[Eric's](https://stackoverflow.com/users/2610/eric) worked once I added a missing comma in the initial select statement. It returned 3 records. The problem is that the section that is loo... | null | CC BY-SA 2.5 | null | 2008-08-26T23:14:28.893 | 2008-08-26T23:14:28.893 | 2017-05-23T12:24:14.737 | -1 | 2,863 | null |
29,155 | 1 | 29,170 | null | 374 | 150,161 | What are the differences between delegates and an events? Don't both hold references to functions that can be executed?
| What are the differences between delegates and events? | CC BY-SA 3.0 | 0 | 2008-08-26T23:06:31.860 | 2021-04-06T06:09:57.810 | 2011-09-30T15:09:46.403 | 854,965 | 2,993 | [
"c#",
"events",
"delegates",
"glossary"
] |
29,173 | 2 | null | 29,053 | 1 | null | > Which one of these is correct?
Opera also returns 5. That means IE is outnumbered and majority rules as far as what you should expect.
| null | CC BY-SA 2.5 | null | 2008-08-26T23:18:52.347 | 2008-08-26T23:18:52.347 | null | null | 1,697 | null |
29,169 | 2 | null | 24,931 | 3 | null | Actually, you definitely can, and it's beautiful, ugly, and crazy at the same time!
You can replace sys.stdout and sys.stderr with StringIO objects that collect the output.
Here's an example, save it as evil.py:
```
import sys
import StringIO
s = StringIO.StringIO()
sys.stdout = s
print "hey, this isn't going to ... | null | CC BY-SA 2.5 | null | 2008-08-26T23:16:16.610 | 2009-04-29T18:24:23.533 | 2009-04-29T18:24:23.533 | 136 | 2,900 | null |
29,178 | 2 | null | 29,144 | 6 | null | Merge is more efficient. For the simple reason that changes to the same file simultaneously tends to be common, and merge allows you to recover from that. In contrast, single checkout prevents that little bit of extra work but it does so at the cost of huge inefficiencies in scheduling. Typically it takes a short amoun... | null | CC BY-SA 2.5 | null | 2008-08-26T23:23:54.580 | 2008-08-26T23:23:54.580 | null | null | 332 | null |
29,175 | 1 | 29,204 | null | 1 | 3,055 | Okay, so I'm running a small test webserver on my private network. I've got a machine running Windows 2000 Pro, and I'm trying to run an ASP.NET app through IIS.
I wrote it so that the webpage would use the registry to store certain settings (connection strings, potentially volatile locations of other web services, p... | (IIS/Win2000Pro) Granting Registry read rights to IIS user? | CC BY-SA 2.5 | null | 2008-08-26T23:21:31.280 | 2009-07-28T14:29:30.210 | null | null | 3,068 | [
"security",
"iis",
"registry",
"windows-server-2000"
] |
29,180 | 2 | null | 29,175 | 0 | null | You can set permissions at the folder level for which you want to grant user permissions read/write access.
In your case, right click on the "Software" folder and select "Permissions".
You'll probably know the rest from there.
EDIT: If you still run into issues, you may want to modify your web.config file and use i... | null | CC BY-SA 2.5 | null | 2008-08-26T23:26:02.500 | 2008-08-26T23:26:02.500 | null | null | 71 | null |
29,183 | 2 | null | 29,145 | 1 | null | As Jason suggested, object db might be a good choice. Take a look at [db4objects](http://www.db4o.com).
| null | CC BY-SA 2.5 | null | 2008-08-26T23:27:41.217 | 2008-08-26T23:27:41.217 | null | null | 1,196 | null |
29,179 | 2 | null | 29,104 | 3 | null | According to Steve Yegge that's the [wrong question to ask](http://steve-yegge.blogspot.com/2008/08/business-requirements-are-bullshit.html). If you're gathering requirement it's already too late, your project is doomed.
| null | CC BY-SA 2.5 | null | 2008-08-26T23:25:38.897 | 2008-08-26T23:25:38.897 | null | null | 2,541 | null |
29,184 | 2 | null | 29,175 | 0 | null | RegEdt32.exe will allow you to set permissions to registry keys.
Simply right click on a Key (Folder) and click Permissions, then you can edit the permissions as you would an file system folder.
| null | CC BY-SA 2.5 | null | 2008-08-26T23:28:09.547 | 2008-08-26T23:28:09.547 | null | null | 383 | null |
29,177 | 1 | 30,187 | null | 20 | 18,429 | Is there an easy way to ensure that after a drag-and-drop fails to complete, the MouseUp event isn't eaten up and ignored by the framework?
I have found a blog post describing [one mechanism](http://sarangdatye.blogspot.com/2004/10/drag-drop-and-mouseup-mystery-solved.html), but it involves a good deal of manual bookk... | DoDragDrop and MouseUp | CC BY-SA 2.5 | 0 | 2008-08-26T23:23:05.033 | 2016-02-19T01:43:24.573 | null | null | 2,729 | [
".net",
"winforms",
"events",
"drag-and-drop"
] |
29,195 | 2 | null | 29,175 | 0 | null | I did so, assuming that a Security setting would be available. I didn't see any "Security" option when I right-clicked on the Key. =( I triple-checked just to make sure... and I just tried it on my XP machine, and it does indeed have the "Permissions" section... but the Windows 2000 machine doesn't. (how's that for ... | null | CC BY-SA 2.5 | null | 2008-08-26T23:34:08.050 | 2008-08-26T23:34:08.050 | null | null | 3,068 | null |
29,200 | 2 | null | 15,709 | 2 | null | There is [another YAML library for .NET](http://yamldotnet.wiki.sourceforge.net/) which is under development. Right now it supports reading YAML streams. It has been tested on Windows and Mono. Write support is currently being implemented.
| null | CC BY-SA 2.5 | null | 2008-08-26T23:37:37.730 | 2008-08-26T23:37:37.730 | null | null | 2,680 | null |
29,199 | 2 | null | 28,654 | 0 | null | Just did this the other day with TCPTrace on the local machine. I mapped the remote host in the hosts file to 127.0.0.1. Ran the local web server on 8080, TcpTrace on 80 pointing to 127.0.0.1:8080. Probably your issue is trying to run both at port 80 which won't work.
| null | CC BY-SA 2.5 | null | 2008-08-26T23:35:57.313 | 2008-08-26T23:35:57.313 | null | null | 645 | null |
29,202 | 2 | null | 28,877 | 1 | null | In addition to the index overhead, running each query as a transaction is a bad idea for the same reason. If you run chunks of inserts (say 100) within 1 explicit transaction, you should also see a performance increase.
| null | CC BY-SA 2.5 | null | 2008-08-26T23:38:03.283 | 2008-08-26T23:38:03.283 | null | null | 2,567 | null |