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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
40,208 | 2 | null | 40,054 | 4 | null | By default, the entities will use all fields for checking concurrency when making edits. That's what's throwing the InvalidOperationException.
This can be setting the Update Check property for all fields to Never. This must be done on all fields to attach the entity as modified. If this is done, an additional call ... | null | CC BY-SA 2.5 | null | 2008-09-02T18:26:10.403 | 2008-09-02T18:26:10.403 | null | null | 4,299 | null |
40,207 | 2 | null | 40,161 | 6 | null | Keith's approach seems nice. I put together a more naive approach using lists. This has error checking so hopefully should pick up most problems:-
```
public List<int> parsePageNumbers(string input) {
if (string.IsNullOrEmpty(input))
throw new InvalidOperationException("Input string is empty.");
var pageNos =... | null | CC BY-SA 2.5 | null | 2008-09-02T18:26:09.373 | 2008-09-02T18:26:09.373 | null | null | 3,394 | null |
40,209 | 2 | null | 26,145 | 4 | null | I had to add `contextualLaunch` under `org.eclipse.debug.ui.launchShortcuts`.
The old way seems like it's deprecated a long ago.
For other people who are working on the same subject,
you might want to extend `org.eclipse.ui.commands` and bindings, too.
I cannot choose this answer but this is the answer that I (the q... | null | CC BY-SA 3.0 | null | 2008-09-02T18:27:40.167 | 2015-07-14T02:24:14.697 | 2015-07-14T02:24:14.697 | 3,555,000 | 2,710 | null |
40,212 | 2 | null | 30,295 | 4 | null | I've learned from experience that having only one app per Tomcat instance has a very significant advantage: when a Tomcat instance dies, .
| null | CC BY-SA 2.5 | null | 2008-09-02T18:29:42.533 | 2008-09-02T18:29:42.533 | null | null | 4,287 | null |
40,191 | 2 | null | 40,169 | 2 | null | A view is a query that you run often with preset parameters. If you know you will be looking at the same data all the time you can create a view for ease of use and for data binding.
That being said, when you select from a view the view defining query is run along with the query you are running.
For example, if vwC... | null | CC BY-SA 3.0 | null | 2008-09-02T18:17:41.390 | 2013-09-25T14:11:26.307 | 2013-09-25T14:11:26.307 | 1,634,069 | 4,140 | null |
40,211 | 1 | 1,769,763 | null | 162 | 91,339 | I have a flag enum below.
```
[Flags]
public enum FlagTest
{
None = 0x0,
Flag1 = 0x1,
Flag2 = 0x2,
Flag3 = 0x4
}
```
I cannot make the if statement evaluate to true.
```
FlagTest testItem = FlagTest.Flag1 | FlagTest.Flag2;
if (testItem == FlagTest.Flag1)
{
// Do something,
// however This i... | How to Compare Flags in C#? | CC BY-SA 2.5 | 0 | 2008-09-02T18:28:16.733 | 2016-02-16T09:36:29.887 | 2008-09-02T18:39:36.877 | 905 | 2,469 | [
"c#",
".net",
"enums",
"attributes",
"flags"
] |
40,214 | 2 | null | 40,119 | 1 | null | NetBeans has a built-in profiler.
| null | CC BY-SA 2.5 | null | 2008-09-02T18:30:34.760 | 2008-09-02T18:30:34.760 | null | null | 2,710 | null |
40,210 | 2 | null | 39,194 | 0 | null | Technically, you don't need a Mac. Applications in OS X just require a [specific folder structure](http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/Concepts/BundleAnatomy.html#//apple_ref/doc/uid/20001119) and an [XML file](http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntim... | null | CC BY-SA 2.5 | null | 2008-09-02T18:27:47.310 | 2008-09-02T18:27:47.310 | null | null | 3,547 | null |
40,192 | 2 | null | 40,132 | 1 | null | You could go with Rob's solution; that's the prettiest for development. Your "carrier object" could contain the entire IDictionary and have typed properties to help intellisense. The properties could update the IDictionary. When you're done, you can pass the carrier object back and fetch the IDictionary directly from i... | null | CC BY-SA 2.5 | null | 2008-09-02T18:19:07.940 | 2010-08-27T19:24:07.550 | 2010-08-27T19:24:07.550 | 1,206 | 1,206 | null |
40,213 | 2 | null | 40,211 | 5 | null | For bit operations, you need to use bitwise operators.
This should do the trick:
```
if ((testItem & FlagTest.Flag1) == FlagTest.Flag1)
{
// Do something,
// however This is never true.
}
```
Fixed my if check - I slipped back into my C/C++ ways (thanks to Ryan Farley for pointing it out)
| null | CC BY-SA 2.5 | null | 2008-09-02T18:30:25.463 | 2008-09-02T18:52:47.907 | 2008-09-02T18:52:47.907 | 2,284 | 2,284 | null |
40,218 | 2 | null | 40,211 | 7 | null | ```
if((testItem & FlagTest.Flag1) == FlagTest.Flag1)
{
...
}
```
| null | CC BY-SA 2.5 | null | 2008-09-02T18:32:18.673 | 2008-09-02T18:32:18.673 | null | null | 3,390 | null |
40,225 | 2 | null | 3,075 | 0 | null | There's a specific problem with mixing doPostback, UpdatePanel and SharePoint -- and the symptom is exactly what you're seeing: a full-page postback instead of an asynchronous postback. See this KB article for a workaround: [http://support.microsoft.com/kb/941955](http://support.microsoft.com/kb/941955)
| null | CC BY-SA 2.5 | null | 2008-09-02T18:34:28.260 | 2008-09-02T18:34:28.260 | null | null | 4,301 | null |
40,234 | 2 | null | 38,336 | 4 | null | [List of Web Safe Fonts](http://www.fonttester.com/help/list_of_web_safe_fonts.html).
| null | CC BY-SA 2.5 | null | 2008-09-02T18:36:41.610 | 2008-09-02T18:36:41.610 | null | null | 39 | null |
40,215 | 2 | null | 40,119 | 15 | null | A tool is a big help.
However, there are times when you can't use a tool: the heap dump is so huge it crashes the tool, you are trying to troubleshoot a machine in some production environment to which you only have shell access, etc.
In that case, it helps to know your way around the hprof dump file.
Look for SITES ... | null | CC BY-SA 2.5 | null | 2008-09-02T18:30:42.530 | 2008-09-02T18:30:42.530 | null | null | 3,474 | null |
40,235 | 2 | null | 40,090 | 4 | null | Regarding the [excerpt from the c# faq](http://blogs.msdn.com/csharpfaq/archive/2004/03/07/85556.aspx):
Most of the problems listed there were solved for VB.Net (specifically the intellisense and xml comments issues), meaning they're really red herrings--
Another reason has to do with forcing a user of a class t... | null | CC BY-SA 3.0 | null | 2008-09-02T18:37:04.213 | 2013-09-20T19:13:50.880 | 2013-09-20T19:13:50.880 | 3,043 | 3,043 | null |
40,221 | 2 | null | 40,211 | 4 | null | Try this:
```
if ((testItem & FlagTest.Flag1) == FlagTest.Flag1)
{
// do something
}
```
Basically, your code is asking if having both flags set is the same as having one flag set, which is obviously false. The code above will leave only the Flag1 bit set if it is set at all, then compares this result to Flag1.
| null | CC BY-SA 2.5 | null | 2008-09-02T18:33:12.680 | 2008-09-02T18:33:12.680 | null | null | 2,547 | null |
40,239 | 2 | null | 40,211 | 21 | null | I set up an extension method to do it: [related question](https://stackoverflow.com/questions/7244/anyone-know-a-good-workaround-for-the-lack-of-an-enum-generic-constraint).
Basically:
```
public static bool IsSet( this Enum input, Enum matchTo )
{
return ( Convert.ToUInt32( input ) & Convert.ToUInt32( matchTo ) ... | null | CC BY-SA 2.5 | null | 2008-09-02T18:38:17.987 | 2008-09-02T18:38:17.987 | 2017-05-23T12:34:32.820 | -1 | 905 | null |
40,246 | 2 | null | 40,032 | 0 | null | Windows Mobile and CE used to suck, really, really badly. These days however it's definitely passable and worth checking out, especially if you code C#.
Just remember that it is the baby brother of the full framework and has nowhere near enough toys and throws a lot of NotImplementedExceptions. :)
| null | CC BY-SA 2.5 | null | 2008-09-02T18:40:44.563 | 2008-09-02T18:40:44.563 | null | null | 1,143 | null |
40,249 | 2 | null | 40,230 | 0 | null | Guids will certainly be slower (and use more memory) than standard integer keys, but whether or not that is an issue will depend on the type of load your system will see. Depending on your backend DB there may be issues with indexing guid fields.
Using guids simplifies a whole class of problems, but you pay for it pa... | null | CC BY-SA 2.5 | null | 2008-09-02T18:41:09.197 | 2008-09-02T18:41:09.197 | null | null | 3,631 | null |
40,253 | 2 | null | 40,230 | 2 | null | This is a perfectly good use of GUIDs. The only draw backs would be a slight complexity in working with GUIDs over INTs and the slight size difference (16 bytes vs 4 bytes).
I don't think either of those are a big deal.
| null | CC BY-SA 2.5 | null | 2008-09-02T18:41:55.297 | 2008-09-02T18:41:55.297 | null | null | 29 | null |
40,244 | 1 | null | null | 23 | 21,426 | Assume that I have programs `P0`, `P1`, ...`P(n-1)` for some `n > 0`. How can I easily redirect the output of program `Pi` to program `P(i+1 mod n)` for all `i` (`0 <= i < n`)?
For example, let's say I have a program `square`, which repeatedly reads a number and than prints the square of that number, and a program `ca... | How to make a pipe loop in bash | CC BY-SA 2.5 | 0 | 2008-09-02T18:40:24.317 | 2015-03-14T20:30:14.617 | 2008-09-04T07:38:38.180 | 4,285 | 4,285 | [
"bash"
] |
40,256 | 2 | null | 40,133 | 1 | null | If the pages are static, why would you change them on the fly instead of preprocessing all pages on a site, adding the piece of requiered javascript to each one of them? This is simple and probably more efficent (you probably have more pageviews than pages to change)
This could be done a lots of way. I would suggest a... | null | CC BY-SA 2.5 | null | 2008-09-02T18:43:02.703 | 2008-09-02T18:43:02.703 | null | null | 2,295 | null |
40,257 | 2 | null | 40,151 | 2 | null | Try upgrading to jQuery 1.2.6, you should be on the latest release of jQuery if you are having problems first ensure you are on the latest and greatest.
| null | CC BY-SA 2.5 | null | 2008-09-02T18:43:07.273 | 2008-09-02T18:43:07.273 | null | null | 648 | null |
40,259 | 1 | null | null | 7 | 6,658 | Is there any UI library that can be to build both a text user interface (ncurses) and graphical user interface (GTK? QT?) from the same source?
I know that debconf can be used with various frontends, I would like to build something similar but programmable.
| GUI/TUI linux library | CC BY-SA 2.5 | 0 | 2008-09-02T18:43:15.323 | 2012-02-17T16:52:28.393 | 2009-01-19T17:38:13.290 | 3,508 | 4,118 | [
"linux",
"user-interface",
"tui"
] |
40,242 | 1 | 40,262 | null | 5 | 1,443 | I joined a new company about a month ago. The company is rather small in size and has pretty strong "start-up" feel to it. I'm working as a Java developer on a team of 3 others. The company primarily sells a service to for businesses/business-type people to use in communicating with each other.
One of the main things ... | What is the best way to migrate an existing messy webapp to elegant MVC? | CC BY-SA 2.5 | 0 | 2008-09-02T18:39:00.840 | 2009-01-06T17:48:54.713 | 2008-09-02T18:40:04.223 | 1,414 | 4,249 | [
"java",
"model-view-controller",
"jsp",
"architecture"
] |
40,262 | 2 | null | 40,242 | 12 | null | Your best bet is probably to refactor it slowly as you go along. Few us of have the resources that would be required to completely start from scratch with something that has so many business rules buried in it. Management really hates it when you spend months on developing an app that has more bugs than the one you r... | null | CC BY-SA 2.5 | null | 2008-09-02T18:43:56.647 | 2009-01-06T17:48:54.713 | 2009-01-06T17:48:54.713 | 1,219 | 1,219 | null |
40,268 | 2 | null | 40,211 | 5 | null | Regarding the edit. You can't make it true. I suggest you wrap what you want into another class (or extension method) to get closer to the syntax you need.
i.e.
```
public class FlagTestCompare
{
public static bool Compare(this FlagTest myFlag, FlagTest condition)
{
return ((myFlag & condition) == ... | null | CC BY-SA 2.5 | null | 2008-09-02T18:44:47.520 | 2008-09-02T18:53:37.343 | 2008-09-02T18:53:37.343 | 905 | 2,422 | null |
40,269 | 1 | 661,129 | null | 6 | 18,128 | Is there an easy way to find the storage card's path on a Windows Mobile device
when there is a storage card and a bluetooth ftp connection?
| Finding the storage card path on WM6 | CC BY-SA 2.5 | 0 | 2008-09-02T18:44:59.267 | 2014-09-26T12:23:00.587 | null | null | 4,298 | [
"windows-mobile"
] |
40,217 | 2 | null | 40,211 | 185 | null | ```
if ((testItem & FlagTest.Flag1) == FlagTest.Flag1)
{
// Do something
}
```
`(testItem & FlagTest.Flag1)` is a bitwise AND operation.
`FlagTest.Flag1` is equivalent to `001` with OP's enum. Now let's say `testItem` has Flag1 and Flag2 (so it's bitwise `101`):
```
001
&101
----
001 == FlagTest.Flag1
```
... | null | CC BY-SA 3.0 | null | 2008-09-02T18:31:53.137 | 2016-02-16T09:36:29.887 | 2016-02-16T09:36:29.887 | 3,410,196 | 4,299 | null |
40,273 | 1 | 40,961 | null | 91 | 87,958 | A client of mine has asked me to integrate a 3rd party API into their Rails app. The only problem is that the API uses SOAP. Ruby has basically dropped SOAP in favor of REST. They provide a Java adapter that apparently works with the Java-Ruby bridge, but we'd like to keep it all in Ruby, if possible. I looked into... | What's the best way to use SOAP with Ruby? | CC BY-SA 2.5 | 0 | 2008-09-02T18:46:09.060 | 2018-04-09T21:41:55.810 | null | null | 2,884 | [
"ruby-on-rails",
"ruby",
"soap"
] |
40,272 | 2 | null | 37,830 | 16 | null | Check out this blog post on [kirupa](http://www.kirupa.com/blend_wpf/custom_wpf_windows.htm).

| null | CC BY-SA 3.0 | null | 2008-09-02T18:46:00.170 | 2012-04-02T07:46:31.807 | 2012-04-02T07:46:31.807 | 1,219,121 | 1,133 | null |
40,276 | 2 | null | 40,264 | -4 | null | Unless it's more than 1 argument, I always use arrays or objects as constructor parameters and rely on error checking to make sure the required parameters are there.
| null | CC BY-SA 2.5 | null | 2008-09-02T18:47:40.757 | 2008-09-02T18:47:40.757 | null | null | 4,133 | null |
40,274 | 2 | null | 40,242 | 2 | null | In my experience, the "elegance" of an app typically has more to do with the database design than anything. If you have a database design, including a well-defined stored procedure interface, good application code tends to follow no matter what platform you use. If you have database design, no matter what platform ... | null | CC BY-SA 2.5 | null | 2008-09-02T18:46:10.793 | 2008-09-02T18:46:10.793 | null | null | 3,043 | null |
40,278 | 2 | null | 40,264 | 5 | null | If you have unpalatably many arguments, then just package them together into structs / POD classes, preferably declared as inner classes of the class you are constructing. That way you can still require the fields while making the code that calls the constructor reasonably readable.
| null | CC BY-SA 2.5 | null | 2008-09-02T18:48:09.040 | 2008-09-02T18:48:09.040 | null | null | 3,776 | null |
40,279 | 2 | null | 40,230 | 0 | null | Using GUIDs saved us a lot of work when we had to merge two databases into one.
| null | CC BY-SA 2.5 | null | 2008-09-02T18:48:23.907 | 2008-09-02T18:48:23.907 | null | null | 1,287 | null |
40,264 | 1 | 40,324 | null | 162 | 94,674 | Let's say you have a class called Customer, which contains the following fields:
- - - -
Let's also say that according to your business logic, all Customer objects must have these four properties defined.
Now, we can do this pretty easily by forcing the constructor to specify each of these properties. But it's pre... | How many constructor arguments is too many? | CC BY-SA 2.5 | 0 | 2008-09-02T18:44:31.933 | 2020-04-23T12:26:53.060 | 2010-08-07T14:49:00.943 | 38,360 | 1,574 | [
"parameters",
"refactoring",
"constructor",
"coding-style"
] |
40,280 | 2 | null | 40,242 | 2 | null | This is harder to do in applications that are only in maintenance mode because it is hard to convince management that rewriting something that is already 'working' is worth doing. I would start by applying the principles of MVC to any new code that you are able to work on (ie. move business logic to something akin to a... | null | CC BY-SA 2.5 | null | 2008-09-02T18:48:31.490 | 2008-09-02T18:48:31.490 | null | null | 3,274 | null |
40,281 | 2 | null | 36,056 | 2 | null | You might want to take a look at OpenVXI, I believe that a number of companies that sell very expensive IVR platforms (such as Avaya) have based their voice browser on it.
[http://en.wikipedia.org/wiki/OpenVXI](http://en.wikipedia.org/wiki/OpenVXI)
| null | CC BY-SA 2.5 | null | 2008-09-02T18:48:58.617 | 2009-08-04T02:26:25.200 | 2009-08-04T02:26:25.200 | 45,935 | 4,249 | null |
40,277 | 2 | null | 23,091 | 3 | null | Two approaches have worked well for me.
One is the "working prototype" which you sort of described in your question. In my experience, the company contracted a user interface expert to create fully functional HTML mocks. The data on the page was static, but it allowed for developers and management to see and play wi... | null | CC BY-SA 2.5 | null | 2008-09-02T18:48:07.043 | 2008-09-02T18:48:07.043 | null | null | 2,890 | null |
40,284 | 2 | null | 40,264 | 1 | null | Just use default arguments. In a language that supports default method arguments (PHP, for example), you could do this in the method signature:
`public function doSomethingWith($this = val1, $this = val2, $this = val3)`
There are other ways to create default values, such as in languages that support method overloadin... | null | CC BY-SA 2.5 | null | 2008-09-02T18:49:29.957 | 2008-09-02T18:49:29.957 | null | null | 1,344 | null |
40,193 | 1 | null | null | 52 | 34,015 | I've got to get a directory listing that contains about 2 million files, but when I do an `ls` command on it nothing comes back. I've waited 3 hours. I've tried `ls | tee directory.txt`, but that seems to hang forever.
I assume the server is doing a lot of inode sorting. Is there any way to speed up the `ls` command ... | Quick ls command | CC BY-SA 3.0 | 0 | 2008-09-02T18:19:29.280 | 2022-02-24T10:42:07.113 | 2014-10-28T17:46:32.987 | 128,421 | 1,536,194 | [
"bash",
"unix",
"command",
"ls"
] |
40,287 | 2 | null | 40,264 | 2 | null | Style counts for a lot, and it seems to me that if there is a constructor with 20+ arguments, then the design should be altered. Provide reasonable defaults.
| null | CC BY-SA 2.5 | null | 2008-09-02T18:50:45.523 | 2009-08-13T15:59:47.837 | 2009-08-13T15:59:47.837 | 4,069 | 4,069 | null |
40,282 | 2 | null | 34,519 | 75 | null | Mutex: exclusive-member access to a resource
Semaphore: n-member access to a resource
That is, a mutex can be used to syncronize access to a counter, file, database, etc.
A sempahore can do the same thing but supports a fixed number of simultaneous callers. For example, I can wrap my database calls in a semaphore(3)... | null | CC BY-SA 2.5 | null | 2008-09-02T18:49:13.857 | 2008-09-02T18:49:13.857 | null | null | 29 | null |
40,238 | 2 | null | 34,519 | 244 | null | The article [Mutexes and Semaphores Demystified](https://barrgroup.com/embedded-systems/how-to/rtos-mutex-semaphore) by Michael Barr is a great short introduction into what makes mutexes and semaphores different, and when they should and should not be used. I've excerpted several key paragraphs here.
The key point is t... | null | CC BY-SA 4.0 | null | 2008-09-02T18:37:57.147 | 2020-01-23T00:13:30.427 | 2020-06-20T09:12:55.060 | -1 | 2,915 | null |
40,288 | 2 | null | 40,264 | 5 | null | I think it all depends on the situation. For something like your example, a customer class, I wouldn't risk the chance of having that data being undefined when needed. On the flip side, passing a struct would clear up the argument list, but you would still have a lot of things to define in the struct.
| null | CC BY-SA 2.5 | null | 2008-09-02T18:50:50.873 | 2008-09-02T18:50:50.873 | null | null | 2,066 | null |
40,285 | 2 | null | 40,119 | 132 | null | I use following approach to finding memory leaks in Java. I've used jProfiler with great success, but I believe that any specialized tool with graphing capabilities (diffs are easier to analyze in graphical form) will work.
1. Start the application and wait until it get to "stable" state, when all the initialization ... | null | CC BY-SA 2.5 | null | 2008-09-02T18:49:35.590 | 2008-09-02T18:49:35.590 | null | null | 2,586 | null |
40,289 | 2 | null | 40,264 | 2 | null | I would think the easiest way would be to find an acceptable default for each value. In this case, each field looks like it would be required to construct, so possibly overload the function call so that if something is not defined in the call, to set it to a default.
Then, make getter and setter functions for each pro... | null | CC BY-SA 2.5 | null | 2008-09-02T18:51:22.247 | 2008-09-02T18:51:22.247 | null | null | 50 | null |
40,290 | 2 | null | 40,230 | 0 | null | If your database is small enough to download to a laptop and work with it offline, you probably don't need to worry too much about the performance differences between ints and Guids. But do not underestimate how useful ints are when developing and troubleshooting a system! You will probably need to come up with some ... | null | CC BY-SA 2.5 | null | 2008-09-02T18:51:23.167 | 2008-09-02T18:51:23.167 | null | null | 1,219 | null |
40,292 | 2 | null | 40,264 | 4 | null | Steve Mcconnell writes in Code Complete that people have trouble keeping more 7 things in their head at a time, so that'd be the number I try to stay under.
| null | CC BY-SA 2.5 | null | 2008-09-02T18:52:00.480 | 2008-09-02T18:52:00.480 | null | null | 1,433 | null |
40,293 | 2 | null | 36,608 | 17 | null | Outside of SQL:
```
Record.find(:all).group_by(&:date).count
```
ActiveSupport's [Enumerable#group_by](http://api.rubyonrails.com/classes/Enumerable.html#M001795) is indispensable.
| null | CC BY-SA 2.5 | null | 2008-09-02T18:52:17.063 | 2008-09-02T18:52:17.063 | null | null | 4,039 | null |
40,291 | 2 | null | 38,501 | 5 | null | So what are we going to pick as the basic building block for this. Windows has two building blocks that look promising :- I/O Completion Ports (IOCPs) and Asynchronous Procedure Calls (APCs). Both of these give us FIFO queuing without having to perform explicit locking, and with a certain amount of built-in OS suppor... | null | CC BY-SA 3.0 | null | 2008-09-02T18:51:57.673 | 2017-11-07T16:31:06.303 | 2017-11-07T16:31:06.303 | 6,761,181 | 2,131 | null |
40,298 | 2 | null | 40,264 | 1 | null | I agree on the 7 item limit Boojiboy mentions. Beyond that, it may be worth looking at anonymous (or specialized) types, IDictionary, or indirection via primary key to another data source.
| null | CC BY-SA 2.5 | null | 2008-09-02T18:54:49.290 | 2008-09-02T18:54:49.290 | null | null | 3,347 | null |
40,297 | 2 | null | 40,230 | 1 | null | > Will access to these tables through
the GUID key be slow?
There are other problems with GUIDs, you see GUIDs are not sequential, so inserts will be scattered all over the place, this causes page splits and index fragmentation
In SQL Server 2005 MS introduced NEWSEQUENTIALID() to fix this, the only problem for you... | null | CC BY-SA 2.5 | null | 2008-09-02T18:54:46.963 | 2008-09-02T18:54:46.963 | null | null | 740 | null |
40,295 | 1 | null | null | 8 | 4,331 | I regularly access Windows domains that have been set up to use a domain under the `.local` top level name. This conflicts with Bonjour/Zeroconf which reserves `.local` for it's own use. A number of platforms support Bonjour out of the box (including Mac OS, iPhone, and Ubuntu) and there's numerous name resolution issu... | Redirecting ".local" subdomain to unicast DNS | CC BY-SA 3.0 | 0 | 2008-09-02T18:54:31.990 | 2017-09-13T07:13:04.070 | 2017-09-13T06:13:51.667 | 6,761,181 | 3,736 | [
"dns",
"bonjour",
"zeroconf",
"mdns"
] |
40,302 | 1 | 40,321 | null | 4 | 2,868 | Let's say I'm building a data access layer for an application. Typically I have a class definition for a each kind of object that is stored in the database. Of course, the actual data access retrieves data in the form of a datareader, typed or untyped dataset, or similar, usually with the data needed to create one ob... | Create object from database row | CC BY-SA 2.5 | null | 2008-09-02T18:56:36.837 | 2014-07-11T12:09:11.007 | 2008-09-02T19:02:52.873 | 3,043 | 3,043 | [
".net"
] |
40,299 | 2 | null | 40,264 | 10 | null | I think the "pure OOP" answer is that if operations on the class are invalid when certain members aren't initialized, then these members must be set by the constructor. There's always the case where default values can be used, but I'll assume we're not considering that case. This is a good approach when the API is fi... | null | CC BY-SA 2.5 | null | 2008-09-02T18:55:05.467 | 2008-09-02T18:55:05.467 | null | null | 2,547 | null |
40,305 | 2 | null | 34,524 | 13 | null | Mutexes are useful in situations where you need to enforce exclusive access to a resource accross multiple processes, where a regular lock won't help since it only works accross threads.
| null | CC BY-SA 2.5 | null | 2008-09-02T18:57:47.723 | 2008-09-02T18:57:47.723 | null | null | 1,361 | null |
40,275 | 2 | null | 40,230 | 0 | null | The backend will be SQL Server 2005
Frontend / Application Logic will be .Net
Besides GUIDs, can you think of other ways to resolve the "merge" that happens when the offline computer syncs the new data back into the central database?
I mean, if the keys are INTs, i'll have to renumber everything when importing basical... | null | CC BY-SA 2.5 | null | 2008-09-02T18:47:31.990 | 2008-09-02T18:47:31.990 | null | null | 3,314 | null |
40,286 | 2 | null | 40,242 | 2 | null | I would agree with the slow refactoring approach; for example, take that copy-and-pasted code and extract it into whatever the appropriate Java paradigm is (a class, perhaps? or better yet, use an existing library?). When your code is really clean and terse, yet still lacking in overall architectural strategy, you'll ... | null | CC BY-SA 2.5 | null | 2008-09-02T18:50:28.427 | 2008-09-02T18:50:28.427 | null | null | 3,191 | null |
40,303 | 2 | null | 40,230 | 8 | null | Using Guids as primary keys is acceptable and is considered a fairly standard practice for the same reasons that you are considering them. They can be overused which can make things a bit tedious to debug and manage, so try to keep them out of code tables and other reference data if at all possible.
The thing that yo... | null | CC BY-SA 2.5 | null | 2008-09-02T18:56:50.063 | 2008-09-02T20:03:36.987 | 2008-09-02T20:03:36.987 | 3,893 | 3,893 | null |
40,306 | 2 | null | 7,174 | 1 | null | I'm not sure you need to get the pdb file into the GAC. (At least, the fix I'm about to describe works just fine for debugging SharePoint web parts in VS2005, which have a similar problem.)
There's a checkbox marked "Enable Just My Code (Managed Only)" in Tools-->Options-->Debugging; if you uncheck it, then Visual Stu... | null | CC BY-SA 2.5 | null | 2008-09-02T18:58:49.170 | 2008-09-02T18:58:49.170 | null | null | 4,301 | null |
40,308 | 2 | null | 40,032 | 0 | null | Blackberry publishes its SDK on its web site. Its apps run J2ME, so with some Java experience it shouldn't be too difficult to get started. They also give you an emulator. Disclaimer: I have no experience in writing Blackberry apps, but I looked into it once.
I would not recommend a PalmOS based handset. I have wr... | null | CC BY-SA 2.5 | null | 2008-09-02T19:00:50.663 | 2008-09-02T19:00:50.663 | null | null | 3,347 | null |
40,309 | 2 | null | 40,302 | 7 | null | If you aren't content with DataRow or SqlDataReader, you should look at an ORM system like Linq to Sql or nHibernate, instead of re-inventing the wheel yourself.
(By the way, this is called the "ActiveRecord" pattern)
| null | CC BY-SA 2.5 | null | 2008-09-02T19:01:09.697 | 2008-09-02T19:01:09.697 | null | null | 1,219 | null |
40,320 | 2 | null | 40,317 | 254 | null | You might try a lazy unmount:
```
umount -l
```
| null | CC BY-SA 3.0 | null | 2008-09-02T19:05:51.323 | 2012-04-17T14:51:28.743 | 2012-04-17T14:51:28.743 | 142,162 | 3,075 | null |
40,311 | 1 | 40,327 | null | 5 | 5,091 | I added a custom install action to my installer to add one of my installation directories to the System PATH environment variable. After I run the installer, the PATH variable reflects the changes (when I access it through the Control Panel::System applet), but when I start a new command shell, the PATH variable does n... | Installer changes PATH variable, changes don't show up in Command Shell | CC BY-SA 2.5 | null | 2008-09-02T19:01:34.950 | 2008-11-19T18:57:59.320 | 2008-10-04T16:55:52.130 | 14,444 | 3,114 | [
"windows-installer",
"environment",
"path",
"custom-action"
] |
40,317 | 1 | 40,320 | null | 163 | 391,150 | I have an NFS-mounted directory on a Linux machine that has hung. I've tried to force an unmount, but it doesn't seem to work:
```
$ umount -f /mnt/data
$ umount2: Device or resource busy
$ umount: /mnt/data: device is busy
```
If I type "`mount`", it appears that the directory is no longer mounted, but it hangs if ... | Force unmount of NFS-mounted directory | CC BY-SA 2.5 | 0 | 2008-09-02T19:04:44.290 | 2016-08-03T02:18:53.810 | 2012-01-27T02:53:26.467 | 149,841 | 742 | [
"linux",
"mount",
"nfs",
"umount",
"nfsclient"
] |
40,321 | 2 | null | 40,302 | 3 | null | I highly encourage you to use an ORM tool. Even simple projects can make use of ORM quickly and quietly... in particular, look at [Castle](http://www.castleproject.org/)'s [ActiveRecord](http://www.castleproject.org/activerecord/) tool (which sits on top of NHibernate to simplify model declaration).
| null | CC BY-SA 3.0 | null | 2008-09-02T19:06:00.073 | 2014-07-11T12:09:11.007 | 2014-07-11T12:09:11.007 | 1,663,868 | 3,619 | null |
40,322 | 1 | 41,132 | null | 14 | 24,252 | I am a member of all the roles (Browser, Content Manager, My Reports, Publisher, Report Builder). If I login with a Local Administrator account, I can see and use it fine. Any ideas?
| I can't see "Report Builder" button in the Report Manager on SQL Server 2005 | CC BY-SA 2.5 | null | 2008-09-02T19:06:09.980 | 2013-08-07T10:53:45.997 | 2008-09-03T15:38:13.933 | 1,287 | 1,287 | [
"sql-server",
"reporting-services",
"reportbuilder"
] |
40,318 | 2 | null | 40,273 | 4 | null | Try
- [SOAP4R](http://dev.ctor.org/soap4r)- [Getting Started with SOAP4R](http://markthomas.org/2007/09/12/getting-started-with-soap4r/)
And I just heard about this on the Rails Envy Podcast (ep 31):
- [WS-Deathstar SOAP walkthrough](http://hideoustriumph.wordpress.com/2008/05/05/ws-deathstar-for-the-rest-of-us/)
| null | CC BY-SA 2.5 | null | 2008-09-02T19:05:10.560 | 2008-09-02T23:28:09.630 | 2008-09-02T23:28:09.630 | 3,920 | 3,920 | null |
40,323 | 2 | null | 40,311 | 2 | null | How are you starting the command shell? With the TaskManager?
I suspect you might be starting it from Explorer - if I remember correctly, this could meen that you are inheriting the parent processes (Windows Explorer in this case) PATH variable. Since that was set before your installer ran, you see the old value.
Not... | null | CC BY-SA 2.5 | null | 2008-09-02T19:07:53.220 | 2008-09-02T19:07:53.220 | null | null | 2,260 | null |
40,330 | 2 | null | 39,843 | 2 | null | I'm not sure on this one, but looking at your error, I would try to define the base class with just c# (.cs) code - do not create one with XAML, just a standard .cs file that extends the WPF Page class.
| null | CC BY-SA 2.5 | null | 2008-09-02T19:12:02.460 | 2008-09-02T19:12:02.460 | null | null | 2,260 | null |
40,327 | 2 | null | 40,311 | 6 | null | I think this depends on how you are starting the new Command shell. For example, when you change the PATH environment variable under System properties, the change isn't reflected until you open a new Command prompt. I think when you launch a new "cmd" process (from the Run dialog for example), you get a fresh copy of a... | null | CC BY-SA 2.5 | null | 2008-09-02T19:09:28.397 | 2008-09-02T19:09:28.397 | null | null | 4,249 | null |
40,328 | 2 | null | 40,311 | 2 | null | [http://support.microsoft.com/kb/310519](http://support.microsoft.com/kb/310519) says that for system environment variables (which PATH is one of) requires a restart, although I have a feeling that logging off and on may be enough.
| null | CC BY-SA 2.5 | null | 2008-09-02T19:10:03.403 | 2008-09-02T19:10:03.403 | null | null | 4,125 | null |
40,331 | 2 | null | 40,317 | 20 | null | Try running
```
lsof | grep /mnt/data
```
That should list any process that is accessing /mnt/data that would prevent it from being unmounted.
| null | CC BY-SA 2.5 | null | 2008-09-02T19:12:05.677 | 2008-09-02T19:12:05.677 | null | null | 75 | null |
40,332 | 2 | null | 40,311 | 0 | null | How are you adding the environment variable?
Without using any external tools, you can [add it to the registry](http://www.windowsnetworking.com/kbase/WindowsTips/WindowsNT/AdminTips/Miscellaneous/SetEnvManipulateNTEnvironmentalVariables.html). Then, your test of opening a new command window will reflect your change.... | null | CC BY-SA 2.5 | null | 2008-09-02T19:12:43.583 | 2008-09-02T19:12:43.583 | null | null | 3,347 | null |
40,336 | 2 | null | 36,906 | 3 | null | To answer your question as stated would require digging into the instruction timings of the particular CPU that this code will be running on which therefore require me to make a bunch of assumptions around the state of the caches in the system and the assembly code emitted by the compiler. It would be an interesting an... | null | CC BY-SA 2.5 | null | 2008-09-02T19:15:42.827 | 2008-09-02T19:15:42.827 | null | null | 3,692 | null |
40,339 | 2 | null | 40,244 | 5 | null | This is a very interesting question. I (vaguely) remember an assignment very similar in college 17 years ago. We had to create an array of pipes, where our code would get filehandles for the input/output of each pipe. Then the code would fork and close the unused filehandles.
I'm thinking you could do something simil... | null | CC BY-SA 2.5 | null | 2008-09-02T19:16:44.993 | 2008-09-02T19:16:44.993 | null | null | 1,536,194 | null |
40,324 | 2 | null | 40,264 | 140 | null | Two design approaches to consider
The [essence](http://www.hillside.net/plop/plop98/final_submissions/P10.pdf) pattern
The [fluent interface](https://martinfowler.com/bliki/FluentInterface.html) pattern
These are both similar in intent, in that we slowly build up an intermediate object, and then create our target ob... | null | CC BY-SA 4.0 | null | 2008-09-02T19:08:20.910 | 2020-04-23T12:26:53.060 | 2020-04-23T12:26:53.060 | 3,295 | 3,295 | null |
40,340 | 2 | null | 37,614 | 2 | null | I have used [SVNBridge](http://www.codeplex.com/SvnBridge) with TortoiseSVN, which workes like a charm.
What I was looking for here is a way for anonymous access that is directly integrated with VS. Guess that's not possible at the moment.
Also just found out [you can connect directly](http://stevenharman.net/blog/ar... | null | CC BY-SA 2.5 | null | 2008-09-02T19:16:52.933 | 2008-09-13T08:06:51.997 | 2008-09-13T08:06:52.013 | 1,583 | 1,583 | null |
40,342 | 2 | null | 23,288 | 9 | null | Microsoft hired one fo the kids from A List Apart to whip some out. The .Net projects are free of charge for download.
[http://msdn.microsoft.com/en-us/asp.net/aa336613.aspx](http://msdn.microsoft.com/en-us/asp.net/aa336613.aspx)
| null | CC BY-SA 3.0 | null | 2008-09-02T19:16:58.673 | 2012-02-18T00:29:17.907 | 2012-02-18T00:29:17.907 | 52,249 | 2,640 | null |
40,347 | 2 | null | 40,335 | 6 | null | Unless C: is not the drive that windows booted from.Parse the %SystemRoot% variable, it contains the location of the windows folder (i.e. c:\windows).
| null | CC BY-SA 2.5 | null | 2008-09-02T19:18:39.763 | 2008-09-02T19:18:39.763 | null | null | 115 | null |
40,301 | 2 | null | 40,193 | 1 | null | What partition type are you using?
Having millions of small files in one directory it might be a good idea to use JFS or ReiserFS which have better performance with many small sized files.
| null | CC BY-SA 3.0 | null | 2008-09-02T18:56:24.870 | 2014-10-28T17:49:50.343 | 2014-10-28T17:49:50.343 | 128,421 | 4,275 | null |
40,300 | 2 | null | 40,264 | 5 | null | I think your question is more about the design of your classes than about the number of arguments in the constructor. If I needed 20 pieces of data (arguments) to successfully initialize an object, I would probably consider breaking up the class.
| null | CC BY-SA 2.5 | null | 2008-09-02T18:55:35.653 | 2008-09-02T18:55:35.653 | null | null | 1,287 | null |
40,335 | 1 | null | null | 12 | 132,535 | I'm need to find a method to programmatically determine which disk drive Windows is using to boot. In other words, I need a way from Windows to determine which drive the BIOS is using to boot the whole system.
Does Windows expose an interface to discover this? With how big the Windows API is, I'm hoping there is some... | How to tell which disk Windows Used to Boot | CC BY-SA 2.5 | 0 | 2008-09-02T19:14:23.267 | 2021-06-15T07:16:37.473 | 2008-09-02T20:31:00.353 | 2,171 | 2,171 | [
"windows",
"mbr"
] |
40,348 | 2 | null | 40,346 | 1 | null | VSJ, I find it a great mag :) [http://www.vsj.co.uk/](http://www.vsj.co.uk/)
### Edit
This is NOT off-topic! It directly relates to programming!
| null | CC BY-SA 2.5 | null | 2008-09-02T19:19:23.567 | 2008-09-02T19:19:23.567 | 2020-06-20T09:12:55.060 | -1 | 832 | null |
40,344 | 1 | 47,361 | null | 5 | 1,236 | We have a SQL server database. To manipulate the data non-programmatically, I can use SQL Server Management Studio by right-clicking a table and selecting "Open Table". However this is slow for very large tables and sorting and filtering is cumbersome.
Typically what we have done until now is to create an Access datab... | What's the best way to work with SQL Server data non-programmatically? | CC BY-SA 2.5 | null | 2008-09-02T19:17:27.097 | 2009-03-10T04:19:44.183 | 2008-10-24T17:21:08.940 | 3,043 | 3,012 | [
"sql-server",
"ms-access",
"ssms"
] |
40,354 | 2 | null | 38,561 | -2 | null | I think to answer this question definitively would require knowing the compiler name and version that you are using and the platform (CPU type, OS etc.) that it is compiling for.
| null | CC BY-SA 2.5 | null | 2008-09-02T19:20:35.123 | 2008-09-02T19:20:35.123 | null | null | 3,692 | null |
40,346 | 1 | 40,370 | null | 47 | 29,409 | So, we have [coding books](https://stackoverflow.com/questions/1711/what-is-the-single-most-influential-book-every-programmer-should-read), [coding RSS feeds](https://stackoverflow.com/questions/5119/what-are-the-best-rss-feeds-for-programmersdevelopers), and [music to code by](https://stackoverflow.com/questions/3947/... | Coding magazines | CC BY-SA 2.5 | 0 | 2008-09-02T19:18:01.277 | 2012-04-30T08:04:50.950 | 2017-05-23T12:19:34.457 | -1 | 2,470 | [
"resources"
] |
40,358 | 2 | null | 40,344 | 1 | null | I don't know how well it will do with really large tables, but Visual Studio is much quicker than SQL Management Studio for basic table operations. Open up your database in Server Explorer, right-click on a table, and select either "Open" to just display the data or "New Query" to filter, sort, etc.
| null | CC BY-SA 2.5 | null | 2008-09-02T19:22:46.820 | 2008-09-02T19:22:46.820 | null | null | 3,776 | null |
40,355 | 2 | null | 40,335 | 2 | null | There is no boot.ini on a machine with just Vista installed.
How do you want to identify the drive/partition: by the windows drive letter it is mapped to (eg. c:\, d:) or by how its hardware signature (which bus, etc).
For the simple case check out [GetSystemDirectory](http://msdn.microsoft.com/en-us/library/ms724373... | null | CC BY-SA 2.5 | null | 2008-09-02T19:20:49.977 | 2008-09-02T19:20:49.977 | null | null | 3,631 | null |
40,350 | 2 | null | 39,739 | 12 | null | First, this is MUCH easier if both the server and your workstation are on the same domain (the server needs access to connect to your machine). In your C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86 (or x64, or ia64) directory are the files you need to copy to your server. There are differ... | null | CC BY-SA 2.5 | null | 2008-09-02T19:19:54.313 | 2008-09-02T19:19:54.313 | null | null | 3,656 | null |
40,362 | 2 | null | 40,335 | 1 | null | Try HKEY_LOCAL_MACHINE\SYSTEM\Setup\SystemPartition
| null | CC BY-SA 2.5 | null | 2008-09-02T19:25:41.430 | 2008-09-02T19:25:41.430 | null | null | 1,278 | null |
40,352 | 1 | 40,366 | null | 18 | 3,808 | And why would I use one over the other in my code?
| Whats the difference between RuntimeTypeHandle and Type? | CC BY-SA 2.5 | 0 | 2008-09-02T19:20:08.060 | 2017-04-25T10:24:56.983 | 2008-09-02T19:28:53.590 | 266 | 1,946 | [
"c#",
".net",
"reflection"
] |
40,353 | 2 | null | 5,087 | 1 | null | @Levi Figueira
For one thing, Grails is far more flexible than Rails. Rails is difficult to use with a legacy DB because ActiveRecord has too many design constraints that many legacy DBs didn't follow. Grails, oth, can use standard Hibernate mappings, which can accommodate a much broader range of DB designs.
| null | CC BY-SA 2.5 | null | 2008-09-02T19:20:22.050 | 2008-09-02T19:20:22.050 | null | null | 4,203 | null |
40,365 | 2 | null | 40,346 | 4 | null | [Dr. Dobbs Journal](http://ddj.com) is a pretty good broad-based programmer's journal. Covers all manner of material.
| null | CC BY-SA 2.5 | null | 2008-09-02T19:27:17.293 | 2008-09-02T19:27:17.293 | null | null | 4,223 | null |
40,363 | 2 | null | 40,344 | 0 | null | Editing raw data is a dangerous no-no. Better to identify the situations where you find yourself doing that and put together an application interface to act as an intermediary that can prevent you from doing stupid things like breaking a foreign key.
| null | CC BY-SA 2.5 | null | 2008-09-02T19:26:09.713 | 2008-09-02T19:26:09.713 | null | null | 3,043 | null |
40,230 | 1 | 40,303 | null | 5 | 1,464 | We are working on designing an application that is typically OLTP (think: purchasing system). However, this one in particular has the need that some users will be offline, so they need to be able to download the DB to their machine, work on it, and then sync back once they're on the LAN.
I would like to note that I kn... | GUIDs as Primary Keys - Offline OLTP | CC BY-SA 2.5 | 0 | 2008-09-02T18:35:36.230 | 2009-08-19T16:52:40.460 | 2008-09-02T18:39:42.523 | 1,414 | 3,314 | [
"sql-server",
"synchronization",
"guid",
"offline",
"oltp"
] |
40,361 | 1 | 41,152 | null | 10 | 6,526 | I have an application which extracts data from an XML file using XPath. If a node in that XML source file is missing I want to return the value "N/A" (much like the Oracle NVL function). The trick is that the application doesn't support XSLT; I'd like to do this using XPath and XPath alone.
Is that possible?
| Can I create a value for a missing tag in XPath? | CC BY-SA 2.5 | 0 | 2008-09-02T19:25:38.793 | 2008-12-27T16:17:17.520 | null | null | 1,019 | [
"xml",
"xslt",
"xpath"
] |
40,369 | 2 | null | 40,344 | 0 | null | I don't know what the performance would be like for large datasets, but open office has a database program (Base), which is an Access clone and may just be what you are looking for.
| null | CC BY-SA 2.5 | null | 2008-09-02T19:29:25.337 | 2008-09-02T19:29:25.337 | null | null | 1,583 | null |
40,368 | 1 | null | null | 40 | 90,896 | Is there a maximum number of inodes in a single directory?
I have a directory of over 2 million files and can't get the `ls` command to work against that directory. So now I'm wondering if I've exceeded a limit on inodes in Linux. Is there a limit before a 2^64 numerical limit?
| Maximum number of inodes in a directory? | CC BY-SA 3.0 | 0 | 2008-09-02T19:29:16.773 | 2017-05-14T19:50:24.170 | 2015-12-01T10:36:02.540 | 469,110 | 1,536,194 | [
"linux",
"bash",
"unix",
"command",
"ls"
] |