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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21,002 | 2 | null | 1,711 | 7 | null | The Mythical Man-Month by Fred Brooks
[http://en.wikipedia.org/wiki/The_Mythical_Man-Month](http://en.wikipedia.org/wiki/The_Mythical_Man-Month)
| null | CC BY-SA 2.5 | null | 2008-08-21T20:02:07.680 | 2008-08-21T20:02:07.680 | null | null | 2,346 | null |
20,998 | 1 | 21,074 | null | 9 | 18,857 | When I try to create a SQL Server Login by saying
```
CREATE LOGIN [ourdomain\SQLAccessGroup] FROM WINDOWS;
```
I get this error
> The server principal 'ourdomain\SQLAccessGroup' already exists.
However, when I try this code
```
DROP LOGIN [ourdomain\SQLAccessGroup]
```
I get this error
> Cannot drop the login... | Cannot Add a Sql Server Login | CC BY-SA 3.0 | null | 2008-08-21T20:00:59.430 | 2019-09-05T12:51:23.220 | 2014-08-20T14:58:38.207 | 834,176 | 76 | [
"sql-server",
"sql-server-2005",
"administration"
] |
21,003 | 2 | null | 10,533 | 3 | null | Assuming you also want to do something with the other name=value pairs this is how I would do it ( using Perl version 5.10 ):
```
use 5.10.0;
use strict;
use warnings;
my %hash;
while(
$string =~ m{
(?: ^ | \G ) # start of string or previous match
\s*
(?<key> \w+ ) # word characters
... | null | CC BY-SA 2.5 | null | 2008-08-21T20:02:11.173 | 2009-07-15T04:37:57.077 | 2009-07-15T04:37:57.077 | 1,337 | 1,337 | null |
21,005 | 2 | null | 20,952 | 0 | null | Looking at the members of the class, I'd say the answer is probably no*. I'm not sure why you'd want to do this anyway, rather than create your own XML configuration file.
*That's no, excluding messy reflection hacks
| null | CC BY-SA 2.5 | null | 2008-08-21T20:02:26.370 | 2008-08-21T20:02:26.370 | null | null | 1,975,282 | null |
21,006 | 2 | null | 1,711 | 6 | null | [Mastering Regular Expressions](https://rads.stackoverflow.com/amzn/click/com/0596528124)
| null | CC BY-SA 2.5 | null | 2008-08-21T20:02:28.897 | 2008-08-21T20:02:28.897 | null | null | 1,862 | null |
21,016 | 2 | null | 20,993 | 1 | null | I think that it depends on what platform you are using. If you are using ASP.net, then I would definitely take a look at the [FormsAuthentication](http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.aspx) class and all of the built-in (and extendable) functionality there that you can use for... | null | CC BY-SA 2.5 | null | 2008-08-21T20:03:42.933 | 2008-08-21T20:03:42.933 | null | null | 51 | null |
21,017 | 2 | null | 20,993 | 2 | null | Storing the ID is the best practice in most cases. One important reason for this is scalability. If you store the user object (or any entities from the database, instead of just their IDs), you are going to run into problems expanding the number of servers serving your site. For more information, google for "shared ... | null | CC BY-SA 2.5 | null | 2008-08-21T20:03:55.867 | 2008-08-21T20:03:55.867 | null | null | 2,168 | null |
21,018 | 2 | null | 20,993 | 0 | null | I store the user in the session, usually. The can't-change-until login problem can be solved by replacing the object in the session with a new copy after you've made changes.
| null | CC BY-SA 2.5 | null | 2008-08-21T20:03:57.223 | 2008-08-21T20:03:57.223 | null | null | 1,975,282 | null |
20,995 | 2 | null | 20,910 | 22 | null | I think Silverlight is most advantageous for companies that have .NET developers but noone with designer experience.
Skill sets will be easier to find as far as finding C# or VB developers vs finding ActionScript guru's. However there is the trade off:
Design experience is an investment not only in Designers with ar... | null | CC BY-SA 2.5 | null | 2008-08-21T20:00:19.307 | 2008-08-22T17:16:12.737 | 2017-05-23T12:19:34.457 | -1 | 580 | null |
21,004 | 2 | null | 15,376 | 3 | null | Obviously if you are serious about UML in the long run you need to use a software UML tool like the ones suggested in the other answers, but I've found that a whiteboard is one of the best tools for UML diagramming, especially during the design phase, or when you are exploring different alternatives. Nothing beats a w... | null | CC BY-SA 2.5 | null | 2008-08-21T20:02:16.197 | 2008-08-21T20:02:16.197 | null | null | 2,168 | null |
21,022 | 2 | null | 20,993 | 0 | null | Our user object is fairly lightweight so we opted to store it in a session variable. Not sure if that's most efficient but so far it's working very nicely.
| null | CC BY-SA 2.5 | null | 2008-08-21T20:04:24.757 | 2008-08-21T20:04:24.757 | null | null | null | null |
20,882 | 1 | 20,894 | null | 27 | 63,551 | Some things look strange to me:
- - - -
Could someone give a quick overview of how to interpret these results?
| How do I interpret 'netstat -a' output | CC BY-SA 2.5 | 0 | 2008-08-21T19:26:48.967 | 2016-04-13T21:21:01.440 | 2013-04-01T12:41:20.993 | 21,960 | 1,946 | [
"networking",
"netstat"
] |
21,025 | 2 | null | 20,529 | 15 | null | In terms of actual features, rather than shortcuts, I strongly recommend taking a look at [Mylyn](http://www.eclipse.org/mylyn/).
It essentially skins Eclipse with a task focussed view. It tracks the files you touch when working on a task, and focusses many aspects of the UI onto the resources that it decides are rel... | null | CC BY-SA 2.5 | null | 2008-08-21T20:04:56.237 | 2008-08-21T21:13:49.567 | 2008-08-21T21:13:49.567 | 1,853 | 1,853 | null |
21,027 | 1 | 67,597,320 | null | 324 | 85,509 | Is it possible to change how + and + + work in Visual Studio? I have disabled the popup navigator window, because I only want to switch between items in the tab control. My problem is the inconsistency of what switching to the next and previous document do.
Every other program that uses a tab control for open doc... | Changing Ctrl + Tab behavior for moving between documents in Visual Studio | CC BY-SA 3.0 | 0 | 2008-08-21T20:07:59.973 | 2021-05-19T05:16:36.037 | 2014-01-22T17:46:01.700 | 63,550 | 2,277 | [
"visual-studio"
] |
21,029 | 2 | null | 1,711 | 5 | null | [Refactoring](https://rads.stackoverflow.com/amzn/click/com/0201485672)
| null | CC BY-SA 2.5 | null | 2008-08-21T20:08:21.580 | 2008-08-21T20:08:21.580 | null | null | 305 | null |
21,024 | 2 | null | 17,877 | 0 | null | The second piece of the puzzle is detecting an unencrypted connection string, encrypting it, and writing it back out to the config file. Writing to config files located in your exe dir is generally a very bad idea, but can be very useful during development. The pros and cons are very well described [here](http://ryan... | null | CC BY-SA 2.5 | null | 2008-08-21T20:04:50.840 | 2008-08-21T20:04:50.840 | null | null | 785 | null |
20,990 | 2 | null | 20,797 | 1 | null | I'm not sure what you mean by:
> I would like to split the byte array at a certain point(index) without having to just create a new byte array and copy each byte at a time, increasing the in memory foot print of the operation.
In most languages, certainly C#, once an array has been allocated, there is no way to chang... | null | CC BY-SA 2.5 | null | 2008-08-21T19:59:12.397 | 2008-08-21T19:59:12.397 | null | null | 1,471 | null |
20,797 | 1 | 20,949 | null | 38 | 73,703 | I have a byte array in memory, read from a file. I would like to split the byte array at a certain point (index) without having to just create a new byte array and copy each byte at a time, increasing the in memory foot print of the operation. What I would like is something like this:
```
byte[] largeBytes = [1,2,3,4... | How to split a byte array | CC BY-SA 3.0 | 0 | 2008-08-21T19:01:28.043 | 2021-02-27T21:43:57.720 | 2017-04-25T17:36:10.433 | 1,709,587 | 1,048 | [
"c#",
"arrays",
"split"
] |
21,031 | 2 | null | 20,993 | 12 | null | I recommend storing the id rather than the object. The downside is that you have to hit the database every time you want to get that user's information. However, unless every millisecond counts in your page, the performance shouldn't be an issue. Here are two advantages:
1. If the user's information changes someho... | null | CC BY-SA 2.5 | null | 2008-08-21T20:09:47.333 | 2008-08-21T20:09:47.333 | null | null | 1,694 | null |
21,000 | 2 | null | 20,993 | 3 | null | Just remember that if you store all the user's attributes (this extends to permissions) in the session, then any changes to the user won't take effect until they login again.
Personally, I store the name and id for quick reference, and fetch the rest when I need to.
| null | CC BY-SA 2.5 | null | 2008-08-21T20:01:36.107 | 2008-08-21T20:01:36.107 | null | null | 1,951 | null |
21,032 | 2 | null | 1,711 | 2 | null | [Working Effectively with Legacy Code](https://rads.stackoverflow.com/amzn/click/com/0131177052) is a really amazing book that goes into great detail about how to properly unit test your code and what the true benefit of it is. It really opened my eyes.
| null | CC BY-SA 2.5 | null | 2008-08-21T20:10:00.297 | 2008-08-21T20:10:00.297 | null | null | 1,954 | null |
21,033 | 2 | null | 1,711 | 0 | null | [Refactoring](https://rads.stackoverflow.com/amzn/click/com/0201485672)
[Patterns of Enterprise Application Architecture](https://rads.stackoverflow.com/amzn/click/com/0321127420)
| null | CC BY-SA 2.5 | null | 2008-08-21T20:10:10.797 | 2008-08-21T20:10:10.797 | null | null | 1,116 | null |
21,019 | 2 | null | 20,420 | 5 | null | Xcode has refactoring for C and Objective-C built in. Just select what you'd like to refactor, choose "Refactor..." from either the menu bar or the contextual menu, and you'll get a window including the available refactorings and a preview area.
Xcode doesn't currently have a public plug-in API; if there are specific... | null | CC BY-SA 2.5 | null | 2008-08-21T20:04:09.407 | 2008-08-21T20:04:09.407 | null | null | 714 | null |
21,030 | 2 | null | 19,387 | 2 | null | With your Java background, don't get sidetracked by the now deprecated Cocoa-Java bridge. Early in OS X history, Apple provided a (laboriously hand-maintained) Java interface for the Cocoa libraries. Because of the semantic differences between Java and Objective-C, many of the most powerful features of Cocoa, including... | null | CC BY-SA 2.5 | null | 2008-08-21T20:08:48.740 | 2008-08-21T20:08:48.740 | null | null | 2,140 | null |
21,037 | 2 | null | 20,876 | 0 | null | Depending on how you want the output to look, a subreport could do, or you could group on ID, property1, property2 and show the items from your other table as detail items (assuming you want to show more than just count).
Something like
```
select t1.ID, t1.property1, t1.property2, t2.somecol, t2.someothercol
from t... | null | CC BY-SA 2.5 | null | 2008-08-21T20:11:36.720 | 2008-08-21T20:11:36.720 | null | null | 794 | null |
21,057 | 2 | null | 21,052 | 7 | null | What you're looking for is the [@Import page directive](http://msdn.microsoft.com/en-us/library/eb44kack(v=VS.80).aspx).
| null | CC BY-SA 3.0 | null | 2008-08-21T20:22:03.123 | 2013-04-16T14:02:02.690 | 2013-04-16T14:02:02.690 | 35 | 35 | null |
21,056 | 2 | null | 21,052 | 64 | null | I believe you can add something like:
```
<%@ Import Namespace="RootNamespace.SubNamespace1" %>
```
At the top of the page.
| null | CC BY-SA 2.5 | null | 2008-08-21T20:21:58.803 | 2008-08-21T20:21:58.803 | null | null | 26 | null |
21,060 | 1 | 21,466 | null | 1 | 133 | I'm tired of being in the middle of typing something, having a pop-up with a question appear, and hitting enter before reading it... (it also happens with some windows that are not pop-ups)
Do you know if there's some setting I could touch for this not to happen?
| Is there any way to configure windows to not change the focus? | CC BY-SA 3.0 | null | 2008-08-21T20:22:50.283 | 2012-05-02T10:53:37.683 | 2012-05-02T10:53:37.683 | 352,841 | 1,782 | [
"windows",
"configuration"
] |
21,074 | 2 | null | 20,998 | 7 | null | We are still struggling to understand the of this issue, but it seems that [ourdomain\SQLAccessGroup] was aliased by a consultant to a different user name (this is part of an MS CRM installation). We finally were able to use some logic and some good old SID comparisons to determine who was playing the imposter game.
... | null | CC BY-SA 2.5 | null | 2008-08-21T20:27:04.047 | 2008-08-21T20:34:48.257 | 2008-08-21T20:34:48.273 | 76 | 76 | null |
21,078 | 1 | 21,093 | null | 339 | 249,618 | What's the most efficient way to concatenate strings?
| Most efficient way to concatenate strings? | CC BY-SA 3.0 | 0 | 2008-08-21T20:27:15.497 | 2022-11-19T17:56:04.870 | 2022-08-15T00:01:24.193 | 11,178,549 | 2,358 | [
"c#",
".net",
"string",
"performance",
"optimization"
] |
21,052 | 1 | 21,056 | null | 27 | 17,597 | When I'm working with DataBound controls in ASP.NET 2.0 such as a Repeater, I know the fastest way to retrieve a property of a bound object (instead of using Reflection with the Eval() function) is to cast the DataItem object to the type it is and then use that object natively, like the following:
```
<%#((MyType)Cont... | "using" namespace equivalent in ASP.NET markup | CC BY-SA 3.0 | 0 | 2008-08-21T20:20:22.393 | 2013-04-16T14:02:02.690 | 2012-08-11T15:56:53.483 | 1,477,076 | 392 | [
"asp.net"
] |
21,084 | 2 | null | 21,078 | 2 | null | The most efficient is to use StringBuilder, like so:
```
StringBuilder sb = new StringBuilder();
sb.Append("string1");
sb.Append("string2");
...etc...
String strResult = sb.ToString();
```
@jonezy: String.Concat is fine if you have a couple of small things. But if you're concatenating megabytes of data, your program... | null | CC BY-SA 2.5 | null | 2008-08-21T20:28:13.013 | 2008-08-21T20:28:13.013 | null | null | 1,975,282 | null |
21,091 | 1 | 96,690 | null | 7 | 1,389 | Programming languages had several (r)evolutionary steps in their history. Some people argue that model-driven approaches will be The Next Big Thing. There are tools like openArchitectureWare, AndroMDA, Sculptor/Fornax Platform etc. that promise incredible productivity boosts. However, I made the experience that it is e... | Do you use MDA/MDD/MDSD, any kind of model-driven approach? Will it be the future? | CC BY-SA 2.5 | 0 | 2008-08-21T20:29:48.143 | 2012-05-21T16:35:12.163 | 2008-08-21T22:10:27.823 | 1,793 | 1,793 | [
"paradigms",
"model-driven"
] |
21,092 | 2 | null | 21,027 | -4 | null | I don't use Visual Studio (), but [AutoHotkey](http://en.wikipedia.org/wiki/AutoHotkey) can remap any hotkey globally or in a particular application:
```
#IfWinActive Microsoft Excel (application specific remapping)
; Printing area in Excel (@ Ctrl+Alt+A)
^!a::
Send !ade
return
#IfWinActive
$f4::
; Closes the acti... | null | CC BY-SA 3.0 | null | 2008-08-21T20:30:35.973 | 2014-01-22T17:49:15.653 | 2014-01-22T17:49:15.653 | 63,550 | 394 | null |
21,093 | 2 | null | 21,078 | 169 | null | The `StringBuilder.Append()` method is much better than using the `+` operator. But I've found that, when executing 1000 concatenations or less, `String.Join()` is even more efficient than `StringBuilder`.
```
StringBuilder sb = new StringBuilder();
sb.Append(someString);
```
The only problem with `String.Join` is ... | null | CC BY-SA 4.0 | null | 2008-08-21T20:30:36.677 | 2019-11-22T09:07:49.437 | 2019-11-22T09:07:49.437 | 1,429,432 | 1,874 | null |
21,096 | 2 | null | 2,525 | 2 | null | I've been obfuscating code in the same application since .Net 1, and it's been a major headache from a maintenance perspective. As you've mentioned, the serialization problem can be avoided, but it's really easy to make a mistake and obfuscate something you didn't want obfuscated. It's easy to break the build, or to ch... | null | CC BY-SA 2.5 | null | 2008-08-21T20:31:40.433 | 2008-08-21T20:31:40.433 | null | null | 1,365 | null |
21,102 | 2 | null | 20,852 | 0 | null | On Windows you can use the command line tool [Handle](http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx) or the GUI version [Process Explorer](http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) to see which files a given process has open.
If you're looking for a get this information in your own... | null | CC BY-SA 2.5 | null | 2008-08-21T20:32:31.303 | 2008-08-21T20:32:31.303 | null | null | null | null |
21,101 | 2 | null | 20,850 | 1 | null | This is not directly an answer, but
> The thing is that to remove the disk you have to eject the volume and in this case do it for both volumes
I have a similar situation.
OSX remembers where you put your icons on the desktop - I've moved the icons for both of my removable drives to above where the trash can lives.... | null | CC BY-SA 2.5 | null | 2008-08-21T20:32:05.783 | 2008-08-21T20:32:05.783 | null | null | 234 | null |
21,108 | 2 | null | 20,959 | 0 | null | For all DLLs including unmanaged, you could pinvoke EnumProcessModules to get the module handles and then use GetModuleFileName for each handle to get the name.
See [http://pinvoke.net/default.aspx/psapi.EnumProcessModules](http://pinvoke.net/default.aspx/psapi.EnumProcessModules) and [http://msdn.microsoft.com/en-us/... | null | CC BY-SA 2.5 | null | 2008-08-21T20:33:38.417 | 2008-08-21T20:33:38.417 | null | null | 748 | null |
21,106 | 2 | null | 20,420 | 40 | null | You sound as if you're looking for three major things: code templates, refactoring tools, and auto-completion.
The good news is that Xcode 3 and later come with superb auto-completion and template support. By default, you have to explicitly request completion by hitting the escape key. (This actually works in all `N... | null | CC BY-SA 3.0 | null | 2008-08-21T20:33:18.150 | 2011-08-31T23:26:34.720 | 2011-08-31T23:26:34.720 | 111,783 | 2,354 | null |
21,035 | 2 | null | 20,910 | 52 | null | I think you should look at Silverlight as a long-term play, just as Microsoft seems to be doing. There's an obvious balance on when to use Silverlight vs. Flash when you're concerned about reach and install base, but here are some reasons Silverlight is a good direction to move in:
1. Second mover advantage - Just as... | null | CC BY-SA 2.5 | null | 2008-08-21T20:11:17.267 | 2008-08-21T20:16:40.780 | 2008-08-21T20:16:40.797 | 5 | 5 | null |
21,113 | 2 | null | 21,078 | 68 | null | From [Chinh Do - StringBuilder is not always faster](http://www.chinhdo.com/20070224/stringbuilder-is-not-always-faster/):
- When concatenating dynamic string values or less, use traditional string concatenation.- When concatenating dynamic string values, use `StringBuilder`.- When building a big string from sever... | null | CC BY-SA 4.0 | null | 2008-08-21T20:34:36.103 | 2019-11-22T09:04:50.063 | 2019-11-22T09:04:50.063 | 1,429,432 | 312 | null |
21,053 | 2 | null | 20,958 | 11 | null | I pretty much always use a power of 2 unless there is a good reason not to, such as a customer facing interface where some other number has special meaning to the customer.
If you stick to powers of 2 it keeps you within a limited set of common sizes, which itself is a good thing, and it makes it easier to guess the... | null | CC BY-SA 3.0 | null | 2008-08-21T20:20:23.953 | 2015-08-06T12:44:07.843 | 2015-08-06T12:44:07.843 | 759,866 | 785 | null |
21,036 | 2 | null | 20,958 | 17 | null | I would say to err on the high side. Since you'll probably be using varchar, any extra space you allow won't actually use up any extra space unless somebody needs it. I would say for names (first or last), go at least 50 chars, and for email address, make it at least 128. There are some really long email addresses o... | null | CC BY-SA 2.5 | null | 2008-08-21T20:11:22.570 | 2008-08-21T23:20:21.400 | 2008-08-21T23:20:21.400 | 437 | 1,862 | null |
21,076 | 2 | null | 21,060 | 0 | null | Not that I know of. This has been a plague of Windows versions for quite some time.
| null | CC BY-SA 2.5 | null | 2008-08-21T20:27:05.343 | 2008-08-21T20:27:05.343 | null | null | 106 | null |
21,114 | 2 | null | 21,078 | 0 | null | It would depend on the code.
StringBuilder is more efficient generally, but if you're only concatenating a few strings and doing it all in one line, code optimizations will likely take care of it for you. It's important to think about how the code looks too: for larger sets StringBuilder will make it easier to read, f... | null | CC BY-SA 2.5 | null | 2008-08-21T20:34:49.240 | 2008-08-21T20:34:49.240 | null | null | 1,365 | null |
21,097 | 2 | null | 21,078 | 1 | null | For just two strings, you definitely do not want to use StringBuilder. There is some threshold above which the StringBuilder overhead is less than the overhead of allocating multiple strings.
So, for more that 2-3 strings, use [DannySmurf's code](https://stackoverflow.com/questions/21078/whats-the-best-string-concate... | null | CC BY-SA 2.5 | null | 2008-08-21T20:31:41.477 | 2008-08-21T20:31:41.477 | 2017-05-23T10:31:19.257 | -1 | 1,490 | null |
21,118 | 2 | null | 21,078 | 12 | null | If you're operating in a loop, `StringBuilder` is probably the way to go; it saves you the overhead of creating new strings regularly. In code that'll only run once, though, `String.Concat` is probably fine.
However, Rico Mariani (.NET optimization guru) [made up a quiz](http://blogs.msdn.com/ricom/archive/2004/03/12/... | null | CC BY-SA 4.0 | null | 2008-08-21T20:35:39.673 | 2019-11-22T09:05:36.237 | 2019-11-22T09:05:36.237 | 1,429,432 | 517 | null |
21,139 | 2 | null | 21,133 | 10 | null | I like to use phpDebug for profiling.
[http://phpdebug.sourceforge.net/www/index.html](http://phpdebug.sourceforge.net/www/index.html)
It outputs all time / memory usage for any SQL used as well as all the included files. Obviously, it works best on code that's abstracted.
For function and class profiling I'll just ... | null | CC BY-SA 3.0 | null | 2008-08-21T20:45:03.363 | 2012-10-04T19:15:16.663 | 2012-10-04T19:15:16.663 | 41,874 | 538 | null |
21,054 | 2 | null | 10,071 | 1 | null | @ John Sibly
[You can get away with not calling EndInvoke when dealing with WinForms without any negative consequences.](http://www.interact-sw.co.uk/iangblog/2005/05/16/endinvokerequired)
> The only documented exception to the rule that I'm aware of is in Windows Forms, where you are officially allowed to call Contr... | null | CC BY-SA 2.5 | null | 2008-08-21T20:21:42.187 | 2008-08-21T20:21:42.187 | null | null | 1,143 | null |
21,146 | 2 | null | 2,482 | 1 | null | I think Boost.Threads is a great C++ concurrency library to learn, especially if you just want to get started in writing multithreaded applications. The code is very succinct and easy to understand, plus the next C++ standard will likely include a threading library based on Boost.Threads (tutorial: [http://www.ddj.co... | null | CC BY-SA 2.5 | null | 2008-08-21T20:46:58.087 | 2008-08-21T20:46:58.087 | null | null | 2,222 | null |
21,131 | 2 | null | 21,078 | 288 | null | [Rico Mariani](https://blogs.msdn.microsoft.com/ricom/), the .NET Performance guru, had [an article](https://blogs.msdn.microsoft.com/ricom/2003/12/15/more-stringbuilder-advice/) on this very subject. It's not as simple as one might suspect. The basic advice is this:
> If your pattern looks like:`x = f1(...) + f2(..... | null | CC BY-SA 3.0 | null | 2008-08-21T20:39:27.323 | 2016-08-26T04:37:11.510 | 2016-08-26T04:37:11.510 | 133,794 | 1,954 | null |
21,145 | 2 | null | 21,133 | 279 | null | You want [xdebug](http://www.xdebug.org/) I think. Install it on the server, turn it on, pump the output through [kcachegrind](http://kcachegrind.sourceforge.net/html/Home.html) (for linux) or [wincachegrind](http://sourceforge.net/projects/wincachegrind/) (for windows) and it'll show you a few pretty charts that detai... | null | CC BY-SA 3.0 | null | 2008-08-21T20:46:41.690 | 2013-08-28T09:20:36.420 | 2013-08-28T09:20:36.420 | 67,332 | 1,951 | null |
21,143 | 2 | null | 21,137 | 0 | null | Do install [Testdriven.net](http://testdriven.net) to integrate NUnit with Visual Studio. MbUnit and later versions of NUnit also contain project templates for unit tests.
You can use those project templates to create a test project and then reference to your ASP.NET MVC project and be able to test its code.
| null | CC BY-SA 2.5 | null | 2008-08-21T20:46:00.320 | 2008-08-21T20:46:00.320 | null | null | 372 | null |
21,133 | 1 | 21,189 | null | 319 | 209,687 | What's the easiest way to profile a PHP script?
I'd love tacking something on that shows me a dump of all function calls and how long they took but I'm also OK with putting something around specific functions.
I tried experimenting with the [microtime](http://php.net/microtime) function:
```
$then = microtime();
myF... | Simplest way to profile a PHP script | CC BY-SA 3.0 | 0 | 2008-08-21T20:40:38.117 | 2023-02-19T17:12:36.450 | 2012-08-13T00:00:26.203 | null | 305 | [
"php",
"profiling"
] |
21,115 | 2 | null | 20,998 | 2 | null | is this when you are restoring from a backup or something? I've found that the following works for me in situations when I'm having problems with user accounts in sql
```
EXEC sp_change_users_login ‘Auto_Fix’, ‘user_in_here’
```
| null | CC BY-SA 2.5 | null | 2008-08-21T20:34:49.597 | 2008-08-21T20:34:49.597 | null | null | 2,272 | null |
21,149 | 2 | null | 12,692 | 0 | null | Keep a look out for ASP.NET MVC
The IronRuby guys have got some internal builds of MVC to work with IronRuby, and IronPython 2 and IronRuby have a lot of code in common with the DLR.
I'm not sure if they'll support IronPython/IronRuby when MVC is released, but it's definitely worth keeping your eye on anyway - The ol... | null | CC BY-SA 2.5 | null | 2008-08-21T20:48:29.923 | 2008-08-21T20:48:29.923 | null | null | 234 | null |
21,155 | 2 | null | 21,060 | 0 | null | Actually Windows XP tries to avoid that. Of course some programs found a way to [circumvented](https://stackoverflow.com/questions/18505/sending-a-mouse-click-to-a-button-in-the-taskbar-using-c) that. Microsoft Powertoy TweakUI has a way to turn the option on again in case it was turned off. You could also edit the reg... | null | CC BY-SA 2.5 | null | 2008-08-21T20:52:56.933 | 2008-08-21T20:52:56.933 | 2017-05-23T12:01:24.217 | -1 | 1,242 | null |
21,137 | 1 | 23,481 | null | 31 | 8,090 | - - -
How do I make Visual Studio show me nUnit as a testing framework when creating a new MVC project? At this point I still only have the Microsoft Testing Framework as a choice.
I installed nUnit 2.5, but still with no success. From what I've found Googling, it would seem I need to templates for the test pr... | Adding NUnit to the options for ASP.NET MVC test framework | CC BY-SA 3.0 | 0 | 2008-08-21T20:43:29.220 | 2013-10-01T09:08:47.983 | 2013-10-01T09:08:47.983 | 27,756 | 1,875 | [
"asp.net",
"asp.net-mvc",
"visual-studio",
"unit-testing",
"nunit"
] |
21,153 | 2 | null | 19,347 | 2 | null | I had the exact same issue. The only book I was able to find was ["Pro Visual C++ 2005 for C# Developers" by Dean C. Wills](https://rads.stackoverflow.com/amzn/click/com/1590596080). It's a good read with excellent examples, and I think the angle from which the book comes is probably what you're looking for.
| null | CC BY-SA 2.5 | null | 2008-08-21T20:52:36.373 | 2008-08-21T20:52:36.373 | null | null | 324 | null |
21,148 | 2 | null | 19,409 | -1 | null | You could rewrite it so that you use registers that aren't suppose to change, for example `%ebp`. Just make sure you push them onto the stack at the beginning, and pop them off at the end of your routine.
```
# count.s: print the numbers from 0 to 100.
.text
string: .asciz "%d\n"
.globl _main
_main:
push... | null | CC BY-SA 2.5 | null | 2008-08-21T20:48:29.033 | 2008-11-12T01:16:45.200 | 2008-11-12T01:16:45.200 | 1,337 | 1,337 | null |
21,184 | 1 | 21,389 | null | 15 | 8,355 | I've got a System.Generic.Collections.List(Of MyCustomClass) type object.
Given integer varaibles pagesize and pagenumber, how can I query only any single page of MyCustomClass objects?
| How do I use Linq for paging a generic collection? | CC BY-SA 2.5 | 0 | 2008-08-21T21:03:39.920 | 2009-01-15T18:32:34.380 | 2008-08-21T21:19:04.030 | 1,154 | 83 | [
".net",
"linq",
".net-3.5",
"paging"
] |
21,161 | 2 | null | 1,711 | 0 | null | [Code Craft](https://rads.stackoverflow.com/amzn/click/com/1593271190)
| null | CC BY-SA 2.5 | null | 2008-08-21T20:54:54.400 | 2008-08-21T20:54:54.400 | null | null | 672 | null |
21,210 | 2 | null | 2,349 | 1 | null | I have found that I also need to set `accessibility.tabfocus` to 7 in Firefox's `about:config`.
| null | CC BY-SA 2.5 | null | 2008-08-21T21:13:31.953 | 2008-08-21T21:13:31.953 | null | null | 1,190 | null |
21,211 | 1 | 21,214 | null | -1 | 664 | This is a bit of a long shot, but if anyone can figure it out, you guys can...
In Windows XP, is there any meta-data that comes with a cut and paste action, from which I can ascertain the application that provided the clipboard contents?
Bonus question... if there is such information, is there any way I can access it... | Get application name from Windows XP cut and paste? | CC BY-SA 3.0 | null | 2008-08-21T21:13:37.353 | 2015-08-20T22:21:58.047 | 2013-12-02T13:04:44.217 | 2,432,317 | 2,197 | [
"java",
"windows-xp",
"clipboard"
] |
21,203 | 2 | null | 1,711 | 0 | null | I have a couple of (rather old) blog posts on this subject
- [http://www.spindriftpages.net/blog/dave/2005/11/17/c-books/](http://www.spindriftpages.net/blog/dave/2005/11/17/c-books/)- [http://www.spindriftpages.net/blog/dave/2005/06/06/good-oo-books/](http://www.spindriftpages.net/blog/dave/2005/06/06/good-oo-books/)... | null | CC BY-SA 2.5 | null | 2008-08-21T21:10:00.310 | 2008-08-21T21:10:00.310 | null | null | 1,769 | null |
21,189 | 2 | null | 21,133 | 107 | null | The [PECL APD](http://www.php.net/apd) extension is used as follows:
```
<?php
apd_set_pprof_trace();
//rest of the script
?>
```
After, parse the generated file using `pprofp`.
Example output:
```
Trace for /home/dan/testapd.php
Total Elapsed Time = 0.00
Total System Time = 0.00
Total User Time = 0.00
Real... | null | CC BY-SA 4.0 | null | 2008-08-21T21:04:17.157 | 2018-10-16T21:59:58.583 | 2018-10-16T21:59:58.583 | 3,995,261 | 1,508 | null |
21,212 | 2 | null | 20,684 | 2 | null | Thanks. Actually both of these answers seem to work. Unfortunately, they seem to look at the Linq attributes generated when the code-generation was done. Although that would seem to be the right thing to do, in my situation we sell software products and occasionally the customer will expand some columns lengths to acco... | null | CC BY-SA 2.5 | null | 2008-08-21T21:14:04.153 | 2008-08-21T21:14:04.153 | null | null | 689 | null |
21,214 | 2 | null | 21,211 | 1 | null | That depends on the clipboard format. If it is plain-text, then no. Unless you want to install global hooks on the clipboard.
Which you cannot do from Java.
| null | CC BY-SA 2.5 | null | 2008-08-21T21:15:58.657 | 2008-08-21T21:15:58.657 | null | null | 414 | null |
21,220 | 2 | null | 18,172 | -1 | null | SMS if it's available works.
| null | CC BY-SA 2.5 | null | 2008-08-21T21:23:10.323 | 2008-08-21T21:23:10.323 | null | null | 26 | null |
21,207 | 1 | 24,499 | null | 32 | 6,771 | I'm currently trying out db4o (the java version) and I pretty much like what I see. But I cannot help wondering how it does perform in a real live (web-)environment. Does anyone have any experiences (good or bad) to share about running db4o?
| db4o experiences? | CC BY-SA 2.5 | 0 | 2008-08-21T21:12:01.600 | 2015-07-22T16:00:10.290 | 2008-08-21T21:30:40.713 | 1,562 | 1,562 | [
"java",
"db4o"
] |
21,217 | 2 | null | 1,711 | 6 | null | In no particular order except how they're arranged on my bookshelf:
- - - - - -
| null | CC BY-SA 2.5 | null | 2008-08-21T21:19:08.820 | 2008-08-21T21:19:08.820 | null | null | 2,144 | null |
21,225 | 2 | null | 1,711 | 1 | null | Implementation Patterns by Kent Beck.
[alt text http://ecx.images-amazon.com/images/I/51JHn-6oNwL._SL500_AA240_.jpg](http://ecx.images-amazon.com/images/I/51JHn-6oNwL._SL500_AA240_.jpg)
You can learn how to communicate people with programming.
| null | CC BY-SA 2.5 | null | 2008-08-21T21:26:41.783 | 2008-08-21T21:26:41.783 | null | null | 1,556 | null |
21,221 | 2 | null | 4,942 | 8 | null | The best sell of Python I've ever seen was by a manager in our group who had a young daughter. He used a quote attributed to Einstein:
> If you can't explain something to a six-year-old, you really don't understand it yourself.
The next few slides of his presentation demonstrated how he was able to teach his young d... | null | CC BY-SA 2.5 | null | 2008-08-21T21:24:10.807 | 2008-08-21T21:24:10.807 | null | null | 2,363 | null |
21,227 | 2 | null | 1,711 | 0 | null | [SQL for smarties](https://rads.stackoverflow.com/amzn/click/com/1558605762)
| null | CC BY-SA 2.5 | null | 2008-08-21T21:26:53.810 | 2008-08-21T21:26:53.810 | null | null | 414 | null |
21,218 | 2 | null | 20,529 | 3 | null | I'd like to add two additional shortcuts:
- + Switch between open editors (++ to scroll through the list in the opposite direction)- + start program in debug mode- start program in normal mode
| null | CC BY-SA 3.0 | null | 2008-08-21T21:19:17.090 | 2012-09-10T13:13:35.630 | 2012-09-10T13:13:35.630 | 1,341,006 | 2,367 | null |
21,229 | 1 | 21,414 | null | 1 | 1,292 | I'm developing a site in Visual Web Dev Express, and when I run/debug, I'd like to be able to set my application's document root so that I can use safer paths, like "/css/style.css' instead of "css/style.css". How would I accomplish this?
| Visual Web Developer (Express): Setting Document Root for Dev Environment | CC BY-SA 2.5 | null | 2008-08-21T21:28:20.123 | 2015-08-14T19:48:50.243 | 2015-08-14T19:48:50.243 | 1,344 | 1,344 | [
"c#",
"asp.net",
"visual-web-developer",
"server-configuration"
] |
21,240 | 2 | null | 20,034 | -1 | null | I don't work in the games industry, but it sounds to me like this will do the same thing for video games as the Quake and Half-Life engines did. That is they will promote getting young developers interested in the industry and promote development of indie games.
From what I can tell, video game companies do not reuse... | null | CC BY-SA 2.5 | null | 2008-08-21T21:36:00.153 | 2008-08-21T21:36:00.153 | null | null | 1,063 | null |
21,247 | 2 | null | 15,995 | 2 | null | After grepping my code, it seems the only thing I've used reduce for is calculating the factorial:
```
reduce(operator.mul, xrange(1, x+1) or (1,))
```
| null | CC BY-SA 2.5 | null | 2008-08-21T21:40:46.117 | 2008-08-21T21:40:46.117 | null | null | 616 | null |
21,265 | 1 | 21,277 | null | 9 | 5,659 | What is the best method for comparing IEEE floats and doubles for equality? I have heard of several methods, but I wanted to see what the community thought.
| Comparing IEEE floats and doubles for equality | CC BY-SA 2.5 | 0 | 2008-08-21T21:47:24.230 | 2012-07-03T15:00:38.897 | null | null | 2,328 | [
"variables",
"floating-point",
"inequality"
] |
21,262 | 1 | 21,270 | null | 3 | 6,593 | I'm learning about table design in SQL and I'm wonder how to create a mapping table in order to establish a many-to-many relationship between two other tables?
I think the mapping table needs two primary keys - but I can't see how to create that as it appears there can only be 1 primary key column?
I'm using the Data... | How do I create a mapping table in SQL Server Management Studio? | CC BY-SA 2.5 | null | 2008-08-21T21:46:07.413 | 2017-06-19T12:35:36.473 | 2017-06-19T12:35:36.473 | 6,756,265 | 1,692 | [
"sql-server",
"sql-server-2005",
"entity-relationship"
] |
21,243 | 1 | 21,434 | null | 0 | 281 | I'm looking for a presentation, PDF, blog post, or whitepaper discussing the technical details of how to filter down and display massive amounts of information for individual users in an intelligent (possibly machine learning) kind of way. I've had coworkers hear presentations on the Facebook news feed but I can't find... | Anyone have a link to a technical discussion of anything akin to the Facebook news feed system? | CC BY-SA 2.5 | null | 2008-08-21T21:38:43.190 | 2012-05-16T12:32:57.553 | 2011-12-09T19:29:55.797 | 3,043 | 484 | [
"facebook"
] |
21,263 | 2 | null | 20,034 | 2 | null | > From what I can tell, video game companies do not reuse most of their code, because if they do it implies that their new game is just a rehash of an old one.
Um... if you're referring to the long tail of video game companies, maybe. Within a company that has had a series of successful games, there is usually some mo... | null | CC BY-SA 3.0 | null | 2008-08-21T21:46:10.237 | 2012-07-03T14:54:36.370 | 2012-07-03T14:54:36.370 | 142,162 | 1,799 | null |
21,241 | 2 | null | 20,426 | 1 | null | I am not sure I understand correctly your question, but this could work [My take on trees in SQL](http://www.depesz.com/index.php/2008/04/11/my-take-on-trees-in-sql/).
Linked post described method of storing tree in database -- PostgreSQL in that case -- but the method is clear enough, so it can be adopted easily for ... | null | CC BY-SA 2.5 | null | 2008-08-21T21:36:29.450 | 2008-08-21T21:36:29.450 | null | null | 1,483 | null |
21,232 | 1 | null | null | 2 | 1,196 | I've got a System.Generic.Collections.List(Of MyCustomClass) type object.
Given integer varaibles pagesize and pagenumber, how can I collect only any single page of `MyCustomClass` objects?
This is what I've got. How can I improve it?
```
'my given collection and paging parameters
Dim AllOfMyCustomClassObjects As S... | Page a Generic Collection Without Linq | CC BY-SA 3.0 | null | 2008-08-21T21:30:21.947 | 2012-05-02T17:47:13.117 | 2012-05-02T17:47:13.117 | 1,011,616 | 83 | [
"vb.net",
"collections",
"paging"
] |
21,270 | 2 | null | 21,262 | 6 | null | The easiest way is to simply select both fields by selecting the first field, and then while holding down the key selecting the second field. Then clicking the key icon to set them both as the primary key.
| null | CC BY-SA 3.0 | null | 2008-08-21T21:49:38.840 | 2015-08-20T22:21:29.253 | 2015-08-20T22:21:29.253 | 7,226 | 1,908 | null |
21,274 | 1 | 21,285 | null | 14 | 1,736 | I am looking for a text editor to be used in a web page. Where users can format the text and get a WYSIWYG experience. Doesn't need to be too fancy. But has to be easy to use and integrate into the page. Has to generate HTML as output. Support AJAX (one I checked works only with standard form submit) and has to be smal... | What is the easiest-to-use web "rich text editor" | CC BY-SA 2.5 | 0 | 2008-08-21T21:52:17.820 | 2008-10-10T01:21:45.787 | 2008-09-11T02:13:56.683 | -1 | 1,363 | [
"html",
"editor"
] |
21,280 | 1 | 21,292 | null | 20 | 1,862 | I seem to be missing something about LINQ. To me, it looks like it's taking some of the elements of SQL that I like the least and moving them into the C# language and using them for other things.
I mean, I could see the benefit of using SQL-like statements on things other than databases. But if I wanted to write SQL... | Am I missing something about LINQ? | CC BY-SA 2.5 | 0 | 2008-08-21T21:54:56.317 | 2010-06-07T04:46:50.773 | 2008-08-21T21:59:02.797 | 521 | 2,147 | [
"c#",
"sql",
"linq"
] |
21,267 | 2 | null | 21,232 | 1 | null | You use GetRange on your IEnuramble implementing collection:
```
List<int> lolInts = new List<int>();
for (int i = 0; i <= 100; i++)
{
lolInts.Add(i);
}
List<int> page1 = lolInts.GetRange(0, 49);
List<int> page2 = lilInts.GetRange(50, 100);
```
I trust you can figure out how to use GetRange to grab an individu... | null | CC BY-SA 2.5 | null | 2008-08-21T21:47:42.747 | 2008-08-21T21:55:20.573 | 2008-08-21T21:55:20.573 | 1,965 | 1,965 | null |
21,283 | 2 | null | 21,274 | 4 | null | Try [FCKeditor](http://www.fckeditor.net/). It supports integration with most popular platforms, and it's fairly lightweight.
| null | CC BY-SA 2.5 | null | 2008-08-21T21:55:16.613 | 2008-08-21T21:55:16.613 | null | null | 1,014 | null |
21,158 | 2 | null | 20,047 | 44 | null | According to MSDN:
[http://msdn.microsoft.com/en-us/library/ms191242.aspx](http://msdn.microsoft.com/en-us/library/ms191242.aspx)
> When either the
READ COMMITTED SNAPSHOT or
ALLOW SNAPSHOT ISOLATION database
options are ON, logical copies
(versions) are maintained for all data
modifications performed in th... | null | CC BY-SA 2.5 | null | 2008-08-21T20:53:51.283 | 2008-08-22T00:52:22.037 | 2008-08-22T00:52:22.037 | 1 | 2 | null |
21,269 | 2 | null | 20,852 | 1 | null | The short answer is no. There are plenty of platform specific solutions which all probably have similar interfaces, but they aren't inherently cross platform since file systems tend to be platform specific.
---
> How do I do it well on each platform?
Again, it will depend on the platform :) For Windows, if you wa... | null | CC BY-SA 3.0 | null | 2008-08-21T21:47:59.453 | 2012-07-03T14:52:15.697 | 2012-07-03T14:52:15.697 | 142,162 | 1,799 | null |
21,286 | 2 | null | 21,274 | 9 | null | [TinyMCE](http://tinymce.moxiecode.com/) is the simplest I've found to use. I've never used it in an AJAX-enabled application, but there are instructions on how to do so on [the project's wiki](http://wiki.moxiecode.com/index.php/TinyMCE:Turn_tinyMCE_into_an_Ajax_editor).
| null | CC BY-SA 2.5 | null | 2008-08-21T21:56:08.997 | 2008-08-21T21:56:08.997 | null | null | 512 | null |
21,285 | 2 | null | 21,274 | 11 | null | Well it depends what platform you are on if you are looking for server-side functionality as well, but the defacto badass WYSIWYg in my opinion is [FCKeditor](http://www.fckeditor.net/). I have worked with this personally in numerous environments (both professional and hobby level) and have always been impressed.
It's... | null | CC BY-SA 2.5 | null | 2008-08-21T21:55:59.607 | 2008-08-21T21:55:59.607 | null | null | 2,213 | null |
21,293 | 2 | null | 9,231 | 0 | null | I've used [bqbackup.com](http://bqbackup.com) for 1-2 years no problem. You can do a sync using rsync nightly. Wanted to add that their prices are dirt cheap, and I now have close to 1TB with them.
| null | CC BY-SA 2.5 | null | 2008-08-21T21:59:06.620 | 2008-09-09T13:34:58.030 | 2008-09-09T13:34:58.030 | 2,343 | 2,343 | null |
21,292 | 2 | null | 21,280 | 40 | null | LINQ is not about SQL. LINQ is about being apply functional programming paradigmns on objects.
LINQ to SQL is an ORM built ontop of the LINQ foundation, but LINQ is much more. I don't use LINQ to SQL, yet I use LINQ all the time.
Take the task of finding the intersection of two lists:
Before LINQ, this tasks require... | null | CC BY-SA 2.5 | null | 2008-08-21T21:59:00.457 | 2008-08-21T21:59:00.457 | null | null | 1,965 | null |
21,291 | 2 | null | 21,265 | 0 | null | > Oh dear lord please don't interpret the float bits as ints unless you're running on a P6 or earlier.
Even if it causes it to copy from vector registers to integer registers via memory, and even if it stalls the pipeline, it's the best way to do it that I've come across, insofar as it provides the most robust compari... | null | CC BY-SA 2.5 | null | 2008-08-21T21:59:00.253 | 2008-08-21T21:59:00.253 | null | null | 2,131 | null |
21,296 | 2 | null | 21,288 | 18 | null | Ninject is great. It seems really fast, but I haven't done any comparisons. I know Nate, the author, did some comparisons between Ninject and other DI frameworks and is looking for more ways to improve the speed of Ninject.
I've heard lots of people I respect say good things about StructureMap and CastleWindsor. Those... | null | CC BY-SA 2.5 | null | 2008-08-21T22:00:12.747 | 2008-08-21T22:00:12.747 | null | null | 1,538 | null |
21,279 | 2 | null | 21,265 | 0 | null | Oh dear lord please don't interpret the float bits as ints unless you're running on a P6 or earlier.
| null | CC BY-SA 3.0 | null | 2008-08-21T21:54:28.050 | 2012-07-03T14:46:43.280 | 2012-07-03T14:46:43.280 | 142,162 | 1,799 | null |
21,288 | 1 | 21,348 | null | 401 | 171,305 | Which C#/.NET Dependency Injection frameworks are worth looking into?
And what can you say about their complexity and speed.
| Which .NET Dependency Injection frameworks are worth looking into? | CC BY-SA 2.5 | 0 | 2008-08-21T21:56:23.210 | 2021-12-06T07:49:11.283 | 2010-07-28T15:02:24.387 | 76,337 | 2,011 | [
"c#",
".net",
"dependency-injection",
"inversion-of-control"
] |