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 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13,395 | 2 | null | 13,345 | 0 | null | > You may want to look at Comet
a.k.a. [server push](http://ejohn.org/blog/streaming-http-server-push/). This does not let the server "update" the client page directly, but all the new data is sent to the page through a single connection.
Of course, a Firefox [extension](http://developer.mozilla.org/en/docs/Extension... | null | CC BY-SA 2.5 | null | 2008-08-16T22:28:23.307 | 2008-08-16T22:28:23.307 | null | null | 1,026 | null |
13,404 | 2 | null | 13,348 | 12 | null | To keep it simple. You can be sure that your client is only seeing their data. The client with fewer records doesn't have to pay the penalty of having to compete with hundreds of thousands of records that may be in the database but not theirs. I don't care how well everything is indexed and optimized there will be qu... | null | CC BY-SA 2.5 | null | 2008-08-16T22:52:52.010 | 2008-08-16T22:52:52.010 | null | null | 791 | null |
13,400 | 2 | null | 13,347 | 11 | null | Apple's [Human Interface Guidelines](http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/index.html) for the Mac have covered window management on multiple displays since 1987, when the Mac II was introduced with six slots that could all contain a graphics card. The guidelines offer a ... | null | CC BY-SA 2.5 | null | 2008-08-16T22:37:11.447 | 2008-08-17T01:32:29.457 | 2008-08-17T01:32:29.457 | 714 | 714 | null |
13,402 | 2 | null | 13,348 | 0 | null | There are a couple of meanings of "database"
- - - -
It's likely Joel means one of the lower layers. In this case, it's just a matter of software configuration management... you don't have to patch 1000 software servers to fix a security bug, for example.
I think it's a good idea, so that a software bug doesn't le... | null | CC BY-SA 2.5 | null | 2008-08-16T22:46:34.550 | 2008-08-16T22:46:34.550 | null | null | 116 | null |
13,406 | 2 | null | 13,396 | 2 | null | In C# you can apply selective processing on anything that lives inside an IEnumerable like this:
```
intArray.Where(i => i > 3).ConvertAll();
DoStuff(intArray.Where(i => i 3));
```
Etc..
| null | CC BY-SA 2.5 | null | 2008-08-16T23:06:52.013 | 2008-08-16T23:06:52.013 | null | null | 960 | null |
13,403 | 2 | null | 13,396 | 0 | null | in Ruby:
```
intArray.select { |x| x > 3 }.each do |x|
# do other processing
end
```
or if "other processing" is a short one-liner:
```
intArray.select { |x| x > 3 }.each { |x| something_that_uses x }
```
lastly, if you want to return a new array containing the results of the processing of those elements greate... | null | CC BY-SA 2.5 | null | 2008-08-16T22:47:53.953 | 2008-08-16T22:47:53.953 | null | null | 1,190 | null |
13,405 | 2 | null | 13,396 | 1 | null | In Python, you have [filter and map](http://docs.python.org/tut/node7.html#SECTION007130000000000000000), which can so what you want:
```
map(lambda x: foo(x + 1) filter(lambda x: x > 3, intArray))
```
There's also [list comprehensions](http://docs.python.org/tut/node7.html#SECTION007140000000000000000) which can do... | null | CC BY-SA 2.5 | null | 2008-08-16T22:56:30.863 | 2008-08-16T22:56:30.863 | null | null | 429 | null |
13,411 | 2 | null | 13,348 | 10 | null | As for the pain of upgrading 1000 database servers at once, some fairly simple automation should take care of that. As long as each database maintains an identical schema, then it won't really be an issue. We also use the database per client approach, and it works well for us.
Here is an article on this exact topic (y... | null | CC BY-SA 2.5 | null | 2008-08-16T23:18:55.623 | 2008-08-16T23:18:55.623 | null | null | 541 | null |
13,412 | 2 | null | 13,409 | 19 | null | I just want to mention Google's policy on the subject.
20% of the day should be used for private projects and research.
I think it is time for managers to face the fact that most good developers are a bit lazy. If they weren't, we wouldn't have concepts like code reuse.
If this laziness can be focused into a creativ... | null | CC BY-SA 2.5 | null | 2008-08-16T23:30:13.837 | 2008-08-16T23:30:13.837 | null | null | 960 | null |
13,413 | 2 | null | 13,348 | 3 | null | In regulated industries such as health care it may be a requirement of one database per customer, possibly even a separate database server.
The simple answer to updating multiple databases when you upgrade is to do the upgrade as a transaction, and take a snapshot before upgrading if necessary. If you are running your... | null | CC BY-SA 2.5 | null | 2008-08-16T23:31:29.637 | 2008-08-16T23:31:29.637 | null | null | 636 | null |
13,416 | 2 | null | 1,898 | 13 | null | If you're expecting fairly complex scenarios for CSV parsing, . There are a lot of excellent tools out there, like [FileHelpers](http://www.filehelpers.com/), or even ones from [CodeProject](http://www.codeproject.com/KB/database/CsvReader.aspx).
The point is this is a fairly common problem and you could bet that of ... | null | CC BY-SA 2.5 | null | 2008-08-16T23:44:37.427 | 2008-08-16T23:44:37.427 | null | null | 372 | null |
13,408 | 2 | null | 13,348 | 16 | null | Here's one approach that I've seen before:
- - -
This allows for using a single database at first, and then easily segmenting later on once you've got a large number of clients, or more commonly when you have a couple of customers that overuse the system.
I've found that restoring specific customer data is really t... | null | CC BY-SA 2.5 | null | 2008-08-16T23:14:32.260 | 2008-08-16T23:14:32.260 | null | null | 291 | null |
13,419 | 2 | null | 13,409 | 1 | null | I've never worked anywhere that had a formalized policy, but practically every manager I've ever had has allowed me to spend some time on things that weren't directly related to the current project or fighting a fire.
I think the key is to talk about the things you'd like to try. Most managers want their teams to do ... | null | CC BY-SA 2.5 | null | 2008-08-16T23:52:26.117 | 2008-08-27T20:14:01.300 | 2008-08-27T20:14:01.300 | 1,175 | 1,175 | null |
13,423 | 2 | null | 11,341 | 0 | null | ScArcher2>>
I have looked into different routes for creating PDFs on the fly including FOP and a few Java libraries. I think what I am really asking is if anyone has already done this in the WebObjects framework. My hope is that someone familiar with WebObjects might have done this already and have some insight that w... | null | CC BY-SA 2.5 | null | 2008-08-17T00:07:04.887 | 2008-08-17T00:07:04.887 | null | null | 1,104 | null |
13,409 | 1 | 13,412 | null | 21 | 2,796 | The CodePlex team has a [Slack](https://rads.stackoverflow.com/amzn/click/com/0767907698) time policy, and it's worked out very well for them.
- [xUnit.net](http://www.codeplex.com/xunit)- [SvnBridge](http://www.codeplex.com/SvnBridge)- [ObjectBuilder 2.0](http://www.codeplex.com/ObjectBuilder)
For others, it was a g... | Do you have "Slack" time? | CC BY-SA 2.5 | 0 | 2008-08-16T23:17:23.317 | 2008-09-17T16:01:24.990 | 2008-08-16T23:29:25.820 | 1,554 | 1,554 | [
"time-management"
] |
13,420 | 2 | null | 1,898 | 10 | null | I agree with @[NotMyself](https://stackoverflow.com/users/303/notmyself). [FileHelpers](http://filehelpers.sourceforge.net/) is well tested and handles all kinds of edge cases that you'll eventually have to deal with if you do it yourself. Take a look at what FileHelpers does and only write your own if you're absolutel... | null | CC BY-SA 2.5 | null | 2008-08-16T23:53:11.327 | 2008-08-16T23:53:11.327 | 2017-05-23T12:32:33.300 | -1 | 5 | null |
13,424 | 2 | null | 13,409 | 5 | null | I've also never worked anywhere where there was a formal policy but I have always found was to squeeze in a little R&D/tool-building time on the side. Often times I will get productivity gains out of that which will allow me even more 'slack' time.
| null | CC BY-SA 2.5 | null | 2008-08-17T00:10:33.287 | 2008-08-17T00:10:33.287 | null | null | 1,104 | null |
13,418 | 2 | null | 2,034 | 90 | null | Also note that a result code in the second column refers to the properties of the file. For example:
```
U filename.1
U filename.2
UU filename.3
```
filename.1: the file was updated
filename.2: a property or properties on the file (such as svn:keywords) was updated
filename.3: both the file and its properties... | null | CC BY-SA 2.5 | null | 2008-08-16T23:49:25.000 | 2008-08-16T23:49:25.000 | null | null | 763 | null |
13,430 | 1 | 13,759 | null | 8 | 3,713 | I'm new to development (an admin by trade) and I'm setting up my development environment and I would like to set up a CruiseControl.Net server on Server 2008. A quick Google did not turn up any instructions for getting it running on IIS 7.0, so I was wondering if anyone had experience getting this set up.
| Does CruiseControl.NET run on IIS 7.0? | CC BY-SA 2.5 | null | 2008-08-17T00:37:17.680 | 2012-06-19T11:50:27.687 | null | null | 1,233 | [
"iis-7",
"cruisecontrol.net"
] |
13,432 | 2 | null | 13,106 | 1 | null | I think you would be perfectly fine with targeting just 2.0 and above, someone who would use your library would most likely be doing new development and using at least ASP.NET 2.0. I think it would be a very small group of people doing new development in 1.1.
| null | CC BY-SA 2.5 | null | 2008-08-17T00:40:29.500 | 2008-08-17T00:40:29.500 | null | null | 537 | null |
13,427 | 2 | null | 13,154 | 1 | null | Apache and SVN are fairly easy to get running together but there are a number of steps. It is definitely easier today than 2 years ago when I first tried. Make sure you have matching versions of the modules and spend some time playing with Apache locally before deploying to your server. There are versions of Apache wit... | null | CC BY-SA 2.5 | null | 2008-08-17T00:29:52.563 | 2008-08-17T00:29:52.563 | null | null | 636 | null |
13,425 | 2 | null | 13,154 | 7 | null | Small correction to Jedi: it's VisualSVN Server from [http://www.visualsvn.com/server/](http://www.visualsvn.com/server/)
| null | CC BY-SA 2.5 | null | 2008-08-17T00:13:38.727 | 2008-08-17T00:13:38.727 | null | null | 748 | null |
13,433 | 2 | null | 13,106 | 2 | null | Remember that .NET 1.1 is going out of general support in October of this year (and that includes ASP.NET 1.1).
| null | CC BY-SA 2.5 | null | 2008-08-17T00:42:05.890 | 2008-08-17T00:42:05.890 | null | null | 1,554 | null |
13,434 | 1 | 13,438 | null | 12 | 2,988 | How can I get programmatic access to the call stack?
| Programatic access to call stack in .net | CC BY-SA 2.5 | 0 | 2008-08-17T00:44:01.393 | 2013-04-28T03:23:05.830 | null | null | 100 | [
".net",
"reflection",
"callstack"
] |
13,431 | 2 | null | 11,341 | 2 | null | The canonical response when asked about PDFs from WebObjects has generally been [ReportMill](http://www.reportmill.com/). It's a PDF document generating framework that works a lot like WebObjects, and includes its own graphical PDF builder tool similar to WebObjects Builder and Interface Builder. You can bind eleme... | null | CC BY-SA 2.5 | null | 2008-08-17T00:40:16.287 | 2008-08-17T00:40:16.287 | null | null | 714 | null |
13,422 | 2 | null | 9,033 | 116 | null | This one is not "hidden" so much as it is misnamed.
A lot of attention is paid to the algorithms "map", "reduce", and "filter". What most people don't realize is that .NET 3.5 added all three of these algorithms, but it gave them very SQL-ish names, based on the fact that they're part of LINQ.
> "map" => Select Trans... | null | CC BY-SA 2.5 | null | 2008-08-16T23:55:28.373 | 2008-08-16T23:55:28.373 | null | null | 1,554 | null |
13,438 | 2 | null | 13,434 | 22 | null | Try [System.Diagnostics.StackTrace](http://msdn.microsoft.com/en-us/library/system.diagnostics.stacktrace.aspx).
| null | CC BY-SA 2.5 | null | 2008-08-17T00:49:09.247 | 2008-08-17T00:49:09.247 | null | null | 615 | null |
13,447 | 2 | null | 11,919 | 0 | null | Apache is a major pain to get running in Vista. And II7 (and 6) are suppose to run PHP fine. So why bother with Apache?
| null | CC BY-SA 2.5 | null | 2008-08-17T01:13:30.930 | 2008-08-17T01:13:30.930 | null | null | 534 | null |
13,442 | 2 | null | 13,430 | 3 | null | I have never tried on Server 2008, but I have installed CruiseControl.NET on Vista which includes IIS 7.0. I don't remember there being any problems. You do have an admin background which should help if something does pop up.
Just use the [CruiseControl.NET wiki](http://confluence.public.thoughtworks.org/display/CCN... | null | CC BY-SA 2.5 | null | 2008-08-17T01:01:49.970 | 2008-08-17T01:09:27.710 | 2008-08-17T01:09:27.710 | 1,117 | 1,117 | null |
13,444 | 2 | null | 13,409 | 8 | null | I am currently a full time freelancer working for a single client. If I want to get a full 40 hours of pay, then every minute I spend coding needs to be accounted for on the approved project plan. Or at least it has to go towards some sort of realistic maintenance task. I guess you could say this is one of the disadvan... | null | CC BY-SA 2.5 | null | 2008-08-17T01:06:20.553 | 2008-08-17T04:02:59.700 | 2008-08-17T04:02:59.700 | 1,436 | 1,436 | null |
13,441 | 2 | null | 9,033 | 153 | null | Returning anonymous types from a method and accessing members without reflection.
```
// Useful? probably not.
private void foo()
{
var user = AnonCast(GetUserTuple(), new { Name = default(string), Badges = default(int) });
Console.WriteLine("Name: {0} Badges: {1}", user.Name, user.Badges);
}
object GetUserTu... | null | CC BY-SA 2.5 | null | 2008-08-17T01:01:28.397 | 2011-04-06T13:39:36.350 | 2011-04-06T13:39:36.350 | 163,832 | 748 | null |
13,439 | 2 | null | 13,434 | 5 | null | You can use the `StackTrace` and `StrackFrame` classes in `System.Diagnostics`.
| null | CC BY-SA 3.0 | null | 2008-08-17T00:50:07.873 | 2013-04-28T03:06:26.627 | 2013-04-28T03:06:26.627 | 1,012,641 | 537 | null |
13,455 | 2 | null | 2,658 | 0 | null | I would definitely choose SVN over CVS, if only because people who learned source control using CVS, tend to use "`svn delete`" then "`svn add`" instead of "`svn move`". Which makes it harder to find all of the previous revisions of a specific file. And you can always upgrade to using git-svn. I personally think it is ... | null | CC BY-SA 2.5 | null | 2008-08-17T01:25:05.977 | 2008-08-17T01:25:05.977 | null | null | 1,337 | null |
13,454 | 1 | null | null | 13 | 8,578 | I wrote a piece of code to convert PHP's striplashes into valid Python [backslash] escapes:
```
cleaned = stringwithslashes
cleaned = cleaned.replace('\\n', '\n')
cleaned = cleaned.replace('\\r', '\n')
cleaned = cleaned.replace('\\', '')
```
How can I condense it?
| Python version of PHP's stripslashes | CC BY-SA 3.0 | 0 | 2008-08-17T01:23:50.067 | 2015-05-30T19:17:17.387 | 2015-05-30T19:17:17.387 | 205,212 | null | [
"python",
"string",
"escaping"
] |
13,460 | 1 | 13,465 | null | 7 | 1,216 | I've tried using source control for a couple projects but still don't really understand it. For these projects, we've used TortoiseSVN and have only had one line of revisions. (No trunk, branch, or any of that.) If there is a recommended way to set up source control systems, what are they? What are the reasons and ... | The theory (and terminology) behind Source Control | CC BY-SA 2.5 | 0 | 2008-08-17T01:38:24.797 | 2012-08-11T15:42:57.723 | 2008-08-17T02:05:55.690 | 55 | 1,256 | [
"version-control"
] |
13,462 | 2 | null | 13,347 | 7 | null | . If you remember window positions for multiple monitors. Please detect if the second monitor is connected. I have a laptop that is sometimes docked. It is very annoying when I try to open a window and it opens off screen.
| null | CC BY-SA 2.5 | null | 2008-08-17T01:39:01.003 | 2008-08-17T01:39:01.003 | null | null | 805 | null |
13,456 | 2 | null | 13,454 | 0 | null | You can obviously concatenate everything together:
```
cleaned = stringwithslashes.replace("\\n","\n").replace("\\r","\n").replace("\\","")
```
Is that what you were after? Or were you hoping for something more terse?
| null | CC BY-SA 2.5 | null | 2008-08-17T01:26:52.043 | 2008-08-17T01:26:52.043 | null | null | 1,554 | null |
13,446 | 2 | null | 6,173 | 4 | null | With [Html Agility Pack](https://html-agility-pack.net/), you can use:
```
HtmlDocument doc = new HtmlDocument();
doc.Load("file.htm");
foreach(HtmlNode link in doc.DocumentElement.SelectNodes("//a@href")
{
Response.Write(link["href"].Value);
}
doc.Save("file.htm");
```
| null | CC BY-SA 4.0 | null | 2008-08-17T01:08:30.410 | 2019-04-10T16:22:20.287 | 2019-04-10T16:22:20.287 | 5,055,443 | 5 | null |
13,465 | 2 | null | 13,460 | 6 | null | I recommend checking out the following from Eric Sink:
[http://www.ericsink.com/scm/source_control.html](http://www.ericsink.com/scm/source_control.html)
Having some sort of revision control system in place is probably the most important tool a programmer has for reviewing code changes and understanding who did what ... | null | CC BY-SA 2.5 | null | 2008-08-17T01:44:24.237 | 2008-08-17T01:44:24.237 | null | null | 1,553 | null |
13,466 | 2 | null | 13,460 | 1 | null | Even if you don't branch, you may find it useful to use tags to mark releases.
Imagine that you rolled out a new version of your software yesterday and have started making major changes for the next version. A user calls you to report a serious bug in yesterday's release. You can't just fix it and copy over the change... | null | CC BY-SA 2.5 | null | 2008-08-17T01:47:18.473 | 2008-08-17T01:47:18.473 | null | null | 763 | null |
13,435 | 2 | null | 13,396 | 7 | null | The increment in the original `foreach` loop will not affect the contents of the array, the only way to do this remains a `for` loop:
```
for(int i = 0; i < intArray.Length; ++i)
{
if(intArray[i] > 3) ++intArray[i];
}
```
Linq is not intended to modify existing collections or sequences. It creates new sequences ... | null | CC BY-SA 2.5 | null | 2008-08-17T00:44:57.650 | 2008-08-17T00:44:57.650 | null | null | 891 | null |
13,463 | 2 | null | 13,460 | 8 | null | Think of source control as a giant "Undo" button for your source code. Every time you check in, you're adding a point to which you can roll back. Even if you don't use branching/merging, this feature alone can be very valuable.
Additionally, by having one 'authoritative' version of the source control, it becomes much ... | null | CC BY-SA 2.5 | null | 2008-08-17T01:39:54.310 | 2008-08-17T01:43:07.203 | 2008-08-17T01:43:07.203 | 1,554 | 1,554 | null |
13,471 | 1 | null | null | 5 | 3,494 | I'm looking for a pre-written component (w/source) for a Delphi project that I'm working on, to generate mind-maps / concept-maps similar to these:
[http://en.wikipedia.org/wiki/Image:MindMeister_screenshot_OS_X.jpg](http://en.wikipedia.org/wiki/Image:MindMeister_screenshot_OS_X.jpg)
[http://en.wikipedia.org/wiki/Imag... | Are there any "mind mapping" components for Delphi? (native VCL preferably) | CC BY-SA 2.5 | 0 | 2008-08-17T02:02:46.633 | 2009-05-24T20:15:32.573 | null | null | null | [
"delphi",
"components",
"vcl",
"mindmapping"
] |
13,475 | 2 | null | 13,470 | 1 | null | I don't think it has any purpose. But because RegEx is almost impossible to understand/decompose, people rarely point out errors. That is probably why no one else pointed it out.
| null | CC BY-SA 3.0 | null | 2008-08-17T02:18:06.773 | 2013-05-01T02:12:30.217 | 2013-05-01T02:12:30.217 | 237,838 | 1,585 | null |
13,467 | 2 | null | 13,460 | 3 | null | Here are two articles that are very helpful for understanding the basics. Beyond being informative, Sink's company sells a great source control product called Vault that is free for single users (I am not affiliated in any way with that company).
[http://www.ericsink.com/scm/source_control.html](http://www.ericsink.c... | null | CC BY-SA 3.0 | null | 2008-08-17T01:47:59.377 | 2012-08-11T15:42:57.723 | 2012-08-11T15:42:57.723 | 1,477,076 | null | null |
13,474 | 2 | null | 3,859 | 0 | null | Just start using source control, no matter what type you use. What you use doesn't matter; it's the use of it that is important
| null | CC BY-SA 2.5 | null | 2008-08-17T02:17:44.077 | 2008-10-07T12:13:27.393 | 2008-10-07T12:13:27.393 | 2,766,176 | 1,542 | null |
13,468 | 2 | null | 13,460 | 1 | null | The common standard for setting up Subversion is to have three folders under the root of your repository: trunk, branches and tags. The trunk folder holds your current "main" line of development. For many shops and situations, this is all they ever use... just a single working repository of code.
The tags folder take... | null | CC BY-SA 2.5 | null | 2008-08-17T01:51:00.743 | 2008-08-17T01:51:00.743 | null | null | 1,436 | null |
13,473 | 1 | 13,481 | null | 6 | 16,506 | I would like to sort an array in ascending order using `C/C++`. The outcome is an array containing element indexes. Each index is corespondent to the element location in the sorted array.
```
Input: 1, 3, 4, 9, 6
Output: 1, 2, 3, 5, 4
```
I am using shell sort procedure. The duplicate value indexes are arbitrarily ... | How does one rank an array (sort) by value? *With a twist* | CC BY-SA 3.0 | 0 | 2008-08-17T02:13:55.533 | 2018-09-23T06:29:31.897 | 2020-06-20T09:12:55.060 | -1 | 522 | [
"c++",
"c",
"arrays",
"sorting"
] |
13,477 | 2 | null | 13,473 | 0 | null | Well, there's a trival n^2 solution.
In python:
```
newArray = sorted(oldArray)
blankArray = [0] * len(oldArray)
for i in xrange(len(newArray)):
dex = oldArray.index(newArray[i])
blankArray[dex] = i
```
Depending on how large your list is, this may work. If your list is very long, you'll need to do some strang... | null | CC BY-SA 2.5 | null | 2008-08-17T02:21:28.563 | 2008-08-17T02:21:28.563 | null | null | 429 | null |
13,480 | 2 | null | 4,219 | 8 | null | My recommendation, Team System isn't worth the money. I have used both and after using Team System, I tried to find a similar replacement. Basically what you are paying for is the integration and you could argue the customization support, but I have been able to create a Team System replacement with a little bit of t... | null | CC BY-SA 2.5 | null | 2008-08-17T02:30:47.060 | 2008-08-17T02:30:47.060 | 2017-05-23T12:16:59.630 | -1 | 1,117 | null |
13,470 | 1 | 13,484 | null | 4 | 922 | I was reading [this question](https://stackoverflow.com/questions/6173/regular-expression-for-parsing-links-from-a-webpage) about how to parse URLs out of web pages and had a question about the [accepted answer](https://stackoverflow.com/questions/6173/regular-expression-for-parsing-links-from-a-webpage#6183) which off... | Purpose of {1} in this regular expression to match url protocols | CC BY-SA 3.0 | null | 2008-08-17T02:01:56.230 | 2016-09-20T20:13:39.190 | 2017-05-23T12:10:47.763 | -1 | 430 | [
"regex"
] |
13,482 | 2 | null | 13,473 | 2 | null | create a new array with increasing values from 0 to n-1 (where n is the length of the array you want to sort). Then sort the new array based on the values in the old array indexed by the values in the new array.
For example, if you use bubble sort (easy to explain), then instead of comparing the values in the new arr... | null | CC BY-SA 2.5 | null | 2008-08-17T02:46:22.833 | 2008-08-17T02:46:22.833 | null | null | 1,585 | null |
13,481 | 2 | null | 13,473 | 7 | null | Since you're using C++, I would do it something like this. The `SortIntPointers` function can be any sort algorithm, the important part is that it sorts the array of pointers based on the `int` that they are pointing to. Once that is done, you can go through the array of pointers and assign their sorted index which wil... | null | CC BY-SA 2.5 | null | 2008-08-17T02:33:32.687 | 2008-08-17T02:33:32.687 | null | null | 891 | null |
13,484 | 2 | null | 13,470 | 1 | null | @Jeff Atwood, your interpretation is a little off - the {1} means match exactly once, but has no effect on the "capturing" - the capturing occurs because of the parens - the braces only specify the number of times the pattern must match the source - once, as you say.
I agree with @Marius, even if his answer is a littl... | null | CC BY-SA 2.5 | null | 2008-08-17T02:56:56.337 | 2008-08-26T10:57:52.440 | 2008-08-26T10:57:52.440 | 1,199 | 1,199 | null |
13,483 | 2 | null | 13,470 | 3 | null | @[Rob](https://stackoverflow.com/questions/13470/question-about-specific-regular-expression#13479): I disagree. To enforce what you are asking for I think you would need to use negative-look-behind, which is possible but is certainly not related to use {1}. Neither version of the regexp address that particular issue.... | null | CC BY-SA 2.5 | null | 2008-08-17T02:46:42.740 | 2008-08-17T02:46:42.740 | 2017-05-23T10:27:49.720 | -1 | 430 | null |
13,488 | 2 | null | 6,173 | 8 | null | from the RegexBuddy library:
## URL: Find in full text
The final character class makes sure that if an URL is part of some text, punctuation such as a comma or full stop after the URL is not interpreted as part of the URL.
> `\b(https?|ftp|file)://[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|]`
| null | CC BY-SA 2.5 | null | 2008-08-17T03:00:34.317 | 2008-08-17T03:00:34.317 | 2020-06-20T09:12:55.060 | -1 | 1 | null |
13,486 | 2 | null | 13,470 | 2 | null | I don't think the {1} has any valid function in that regex.
> ){1}**
You should read this as: "capture the stuff in the parens exactly one time". But we don't really care about capturing this for use later, eg $1 in the replacement. So it's pointless.
| null | CC BY-SA 2.5 | null | 2008-08-17T02:58:18.083 | 2008-08-17T02:58:18.083 | null | null | 1 | null |
13,490 | 2 | null | 6,009 | 2 | null | For a long time, I have done exactly what bcwood has done. I keep copies of web.dev.config, web.test.config, web.prod.config, etc. under source control, and then my build/deploy system renames them automatically as it deploys to various environments. You get a certain amount of redundancy between the files (especially ... | null | CC BY-SA 2.5 | null | 2008-08-17T03:10:24.983 | 2008-08-17T03:10:24.983 | null | null | 1,436 | null |
13,487 | 2 | null | 13,345 | 2 | null | It should be possible. I have developed a xulrunner application that connects to a TCP server using sockets. Extension development would likely have the same capabilities. I used a library from mozdev - [JSLib](http://jslib.mozdev.org/). Specifically check out the [networking code](http://jslib.mozdev.org/libraries... | null | CC BY-SA 2.5 | null | 2008-08-17T02:58:47.783 | 2008-08-17T03:03:44.700 | 2008-08-17T03:03:44.700 | 525 | 525 | null |
13,497 | 2 | null | 13,343 | 4 | null | @Bernard Dy: I have spent probably 30% of my career in corporate settings (am not at the moment). Usually its after some failed (or not failed, but fizzled) start up idea, or some kind of burnout/change. Its ok for a little bit, it is nice to meet people from totally different backgrounds (who would have thought that l... | null | CC BY-SA 2.5 | null | 2008-08-17T03:23:34.350 | 2008-08-17T03:27:08.133 | 2008-08-17T03:27:08.133 | 699 | 699 | null |
13,505 | 2 | null | 13,498 | 2 | null | At least for PCs, the fact that you dismiss an item does get sync'd, and fairly quickly for me. I'm not sure why phones don't seem to do it, though. Maybe the ActiveSync protocol doesn't offer that option.
| null | CC BY-SA 2.5 | null | 2008-08-17T04:05:15.403 | 2008-08-17T04:05:15.403 | null | null | 1,554 | null |
13,485 | 1 | 13,495 | null | 23 | 10,014 | My current development project has two aspects to it. First, there is a public website where external users can submit and update information for various purposes. This information is then saved to a local SQL Server at the colo facility.
The second aspect is an internal application which employees use to manage those... | How do you keep two related, but separate, systems in sync with each other? | CC BY-SA 2.5 | 0 | 2008-08-17T02:57:46.633 | 2008-09-17T01:53:31.283 | null | null | 1,436 | [
"sql-server",
"database",
"synchronization",
"distributed"
] |
13,508 | 2 | null | 13,485 | 0 | null | I'd say just have a job that copies the data in the pub database input table into a private database pending table. Then once you update the data on the private side have it replicated to the public side. If you don't have any of the replicated data on the public side updated it should be a fairly easy transactional re... | null | CC BY-SA 2.5 | null | 2008-08-17T04:07:34.323 | 2008-08-17T04:07:34.323 | null | null | 1,545 | null |
13,498 | 1 | 13,505 | null | 8 | 3,743 |
Please forgive me, Joel, for stealing your question. Joel asked this question on a podcast a while back but I don't think it ever got resolved. I'm in the same situation, so I'm also looking for the answer.
I have multiple devices that all sync with MS-Outlook. PCs, Laptops, Smartphones, PDAs, etc. all have the... | simultaneous Outlook reminders on multiple devices | CC BY-SA 2.5 | 0 | 2008-08-17T03:25:36.607 | 2013-02-26T14:23:22.140 | 2008-08-21T00:47:59.763 | 27,687 | 27,687 | [
"windows",
"outlook",
"synchronization",
"reminders"
] |
13,509 | 2 | null | 6,009 | 0 | null | We just keep the production config file checked in. It's the developer's responsibility to change the file when they pull it out of source safe for staging or development. This has burnt us in the past so I wouldn't suggest it.
| null | CC BY-SA 2.5 | null | 2008-08-17T04:10:42.820 | 2008-08-17T04:10:42.820 | null | null | 1,545 | null |
13,507 | 2 | null | 13,498 | 2 | null | I don't have an answer, but I feel your (and Joel's) pain every time my cell phone and my computer both buzz me within minutes of each other.
| null | CC BY-SA 2.5 | null | 2008-08-17T04:05:57.820 | 2008-08-17T04:05:57.820 | null | null | 1,436 | null |
13,510 | 2 | null | 13,409 | 1 | null | We have slack time and we try to schedule them between releases. Once a release is out, we ask our developers to spend 60% of the day fixing bugs and then the other 40% for slack time. We have policies on what you can use the slack time for though. Then when a release creeps up again, we ask all the developers to sp... | null | CC BY-SA 2.5 | null | 2008-08-17T04:12:09.570 | 2008-08-17T04:12:09.570 | null | null | 1,117 | null |
13,495 | 2 | null | 13,485 | 24 | null | This is a pretty common integration scenario, I believe. Personally, I think an asynchronous messaging solution using a queue is ideal.
You should be able to achieve near real time synchronization without the overhead or complexity of something like replication.
Synchronous web services are not ideal because your c... | null | CC BY-SA 2.5 | null | 2008-08-17T03:22:49.017 | 2008-08-17T03:27:25.170 | 2017-05-23T12:00:17.880 | -1 | 541 | null |
13,511 | 2 | null | 5,194 | 0 | null | The syntax you are using for will get transformed by the compiler into the same IL as the extension methods. The "SQL-like" syntax is supposed to be a more natural way to represent a LINQ expression (although I personally prefer the extension methods). As has already been pointed out, the first example will return an ... | null | CC BY-SA 2.5 | null | 2008-08-17T04:35:51.053 | 2008-08-17T04:35:51.053 | null | null | 1,559 | null |
13,514 | 2 | null | 8,042 | 2 | null | There is nothing wrong with extending interfaces, in fact that is how LINQ works to add the extension methods to the collection classes.
That being said, you really should only do this in the case where you need to provide the same functionality across all classes that implement that interface and that functionality i... | null | CC BY-SA 2.5 | null | 2008-08-17T04:40:58.843 | 2008-08-17T04:40:58.843 | null | null | 1,559 | null |
13,512 | 2 | null | 3,196 | 4 | null | ```
select name from table group by name having count(name) > 1
```
| null | CC BY-SA 2.5 | null | 2008-08-17T04:36:53.657 | 2008-08-17T04:36:53.657 | null | null | 1,545 | null |
13,521 | 2 | null | 13,518 | 7 | null | Mozilla Weave is capable of running on personal servers. It uses WebDAV to communicate with HTTP servers and can be configured to connect to private servers. I've tried setting it up on my own servers but with no success (Mainly because I'm not very good at working with Apache to configure WebDAV)
I'm hoping Mozilla W... | null | CC BY-SA 2.5 | null | 2008-08-17T05:17:05.697 | 2008-08-17T05:17:05.697 | null | null | 392 | null |
13,515 | 2 | null | 12,936 | 2 | null | I use APC on my production servers and it works pretty well out of the box. Compile it and add it to PHP and there isn't much tweaking left to do for it. I check it every once in a while just to review stats but since I use MVC a lot all of the main files (routers, controllers, etc) rarely change on a day-to-day basis ... | null | CC BY-SA 2.5 | null | 2008-08-17T04:41:36.127 | 2008-11-03T18:10:30.037 | null | null | 204 | null |
13,517 | 2 | null | 7,244 | 1 | null | Using your original code, inside the method you can also use reflection to test that T is an enum:
```
public static class EnumExtension
{
public static bool IsSet<T>( this T input, T matchTo )
{
if (!typeof(T).IsEnum)
{
throw new ArgumentException("Must be an enum", "input");
... | null | CC BY-SA 2.5 | null | 2008-08-17T04:51:38.663 | 2008-08-28T15:19:36.617 | 2008-08-28T15:19:36.630 | 905 | 1,559 | null |
13,516 | 2 | null | 2,785 | 1 | null | Take a look at this article as well: [http://www.codeproject.com/KB/cs/idisposable.aspx](http://www.codeproject.com/KB/cs/idisposable.aspx)
For the most part, setting an object to null has no effect. The only time you should be sure to do so is if you are working with a "large object", which is one larger than 84K in ... | null | CC BY-SA 2.5 | null | 2008-08-17T04:46:54.057 | 2008-11-01T03:47:17.160 | 2008-11-01T03:47:17.160 | 1,559 | 1,559 | null |
13,518 | 1 | 13,521 | null | 2 | 1,717 | Everyone remembers google browser sync right? I thought it was great. Unfortunately Google decided not to upgrade the service to Firefox 3.0. Mozilla is developing a replacement for google browser sync which will be a part of the Weave project. I have tried using Weave and found it to be very very slow or totally inope... | Browser Sync across many machines | CC BY-SA 3.0 | null | 2008-08-17T04:58:38.510 | 2017-12-16T08:28:54.743 | 2017-12-16T08:28:54.743 | 1,033,581 | 1,455 | [
"firefox",
"browser",
"synchronization"
] |
13,429 | 2 | null | 13,343 | 6 | null | > Well, I generally come in at least
fifteen minutes late, ah, I use the
side door - that way Lumbergh can't
see me, heh heh - and, uh, after that
I just sorta space out for about an
hour. ...Yeah, I just stare at my desk; but
it looks like I'm working. I do that
for probably another hour after lunch,
t... | null | CC BY-SA 2.5 | null | 2008-08-17T00:34:27.497 | 2008-08-17T00:34:27.497 | null | null | 990 | null |
13,530 | 2 | null | 13,524 | 6 | null | I found the solution. I had to set the GridView's DataKeyNames property to the unique key that my data was returning (in this case a classically named ID field). I'm guessing that this property "unset" itself when the Grid refreshed.
| null | CC BY-SA 2.5 | null | 2008-08-17T06:22:37.280 | 2008-08-17T06:22:37.280 | null | null | 1,463 | null |
13,534 | 2 | null | 13,518 | 1 | null | [Browser Sync](http://code.google.com/p/browsersync/) is up on Google Code now. Doesn't look like anything has been done with it yet though, as far as making it hosted on personal servers/computers.
| null | CC BY-SA 2.5 | null | 2008-08-17T06:36:59.390 | 2008-08-17T06:36:59.390 | null | null | 693 | null |
13,524 | 1 | null | null | 3 | 5,086 | I'm using a `GridView` in C#.NET 3.5 and have just converted the underlying `DataSource` from `Adapter` model to an object which gets its data from LINQ to SQL - i.e. a Business object that `returns` a `List<>` for the `GetData()` function etc.
All was well in Denmark and the `Update`, and conditional `Select` stateme... | GridView delete not working | CC BY-SA 3.0 | null | 2008-08-17T05:57:59.653 | 2014-02-20T08:13:17.730 | 2014-02-20T08:13:17.730 | 3,240,038 | 1,463 | [
"c#",
"asp.net",
"gridview"
] |
13,537 | 1 | 13,552 | null | 104 | 19,417 | I've heard of the idea of bootstrapping a language, that is, writing a compiler/interpreter for the language in itself. I was wondering how this could be accomplished and looked around a bit, and saw someone say that it could only be done by either
- -
To me, neither of these seem to actually be a language in the ... | Bootstrapping still requires outside support | CC BY-SA 3.0 | 0 | 2008-08-17T06:46:11.210 | 2023-01-25T07:29:43.750 | 2023-01-25T07:29:43.750 | 116 | 1,266 | [
"compiler-construction",
"language-agnostic",
"bootstrapping"
] |
13,536 | 2 | null | 2,811 | 0 | null | Using SQL Server 2005 (or presumably 2008) I find for XML PATH to allow for much easier to maintain SQL than for XML Explicit (particularly once the SQL is longer).
In this case:
```
SELECT AccountNumber as "clientID"
FROM Location.LocationMDAccount
WHERE locationid = 'long-guid-here'
FOR XML PATH (''), Root ('root')... | null | CC BY-SA 2.5 | null | 2008-08-17T06:45:16.703 | 2008-08-17T06:48:59.847 | 2008-08-17T06:48:59.847 | 1,592 | 1,592 | null |
13,538 | 2 | null | 13,518 | 0 | null | I've been using the Firefox Scrapbook extension, sync'd via FolderShare. It takes a little setup, but the nice thing is that Scrapbook grabs a local copy of each page so it works offline or if the site goes away.
| null | CC BY-SA 2.5 | null | 2008-08-17T06:46:26.093 | 2008-08-17T06:46:26.093 | null | null | 5 | null |
13,529 | 2 | null | 11,857 | 1 | null | For a lightweight & completely free option, you can use Springloops integrated with Basecamp (+ an SVN client).
- [http://www.springloops.com/](http://www.springloops.com/)- [http://basecamphq.com/](http://basecamphq.com/)
Note: SpringLoops integration with Basecamp is not available in their free setup.
| null | CC BY-SA 2.5 | null | 2008-08-17T06:18:38.910 | 2008-08-18T01:05:56.077 | 2008-08-18T01:05:56.077 | 493 | 1,592 | null |
13,541 | 2 | null | 13,353 | 1 | null | The reason for this odd tab behavior is all about speed in the input process. It was really good to get some input, I hadn't thought about disabling a textbox but that could actually work. But using the Enter key to accept the input hadn't even crossed my mind. That will work so much better. The user can enter the numb... | null | CC BY-SA 2.5 | null | 2008-08-17T06:50:14.633 | 2008-08-17T06:50:14.633 | null | null | 143 | null |
13,522 | 2 | null | 13,021 | 12 | null | Here was an interesting article by Peter Michaux on [Javascript Namespacing](http://peter.michaux.ca/article/7944). He discusses 3 different types of Javascript namespacing:
1. Prefix Namespacing
2. Single Object Namespacing
3. Nested Object Namespacing
I won't plagiarize what he said here but I think his article... | null | CC BY-SA 2.5 | null | 2008-08-17T05:31:35.683 | 2008-08-17T05:31:35.683 | null | null | 792 | null |
13,542 | 2 | null | 13,471 | 3 | null | As a former Delphi developer, I sympathize. It used to be that you could find a free component with source for just about anything. You probably know about the [Delphi Super Page](http://delphi.icm.edu.pl/) (my old go-to source for everything Delphi). I looked; no mind-mapping components, there. (Of course, the sit... | null | CC BY-SA 2.5 | null | 2008-08-17T06:52:46.097 | 2008-08-17T06:52:46.097 | null | null | 958 | null |
13,545 | 1 | 16,139 | null | 0 | 1,949 | I recently (a few days ago) installed .NET 3.5 SP1 and subsequently an aspnet_client folder with a bunch of Crystal Reports support code has been injected into my .net web apps.
Anybody else experienced this?
Am I correct in saying that this is a side effect of SP1?
What is this?
| .NET 3.5 SP1 and aspnet_client Crystal Reports | CC BY-SA 2.5 | null | 2008-08-17T07:00:25.677 | 2009-03-16T11:44:16.010 | 2008-08-28T09:16:48.907 | 2,084 | 1,463 | [
".net",
"asp.net",
".net-3.5",
"crystal-reports"
] |
13,547 | 2 | null | 13,537 | 4 | null | Every example of bootstrapping a language I can think of ([C](http://en.wikipedia.org/wiki/C_%28programming_language%29), [PyPy](http://en.wikipedia.org/wiki/PyPy)) was done after there was a working compiler. You have to start somewhere, and reimplementing a language in itself requires writing a compiler in another la... | null | CC BY-SA 3.0 | null | 2008-08-17T07:01:08.340 | 2012-11-08T23:43:02.400 | 2012-11-08T23:43:02.400 | 63,550 | 1,249 | null |
13,546 | 2 | null | 13,537 | 23 | null | The explanation you've read is correct. There's a discussion of this in [Compilers: Principles, Techniques, and Tools](http://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools) (the Dragon Book):
- - -
| null | CC BY-SA 3.0 | null | 2008-08-17T07:00:39.310 | 2012-11-08T23:44:23.070 | 2012-11-08T23:44:23.070 | 63,550 | 116 | null |
13,453 | 2 | null | 8,566 | 0 | null | You should only ever access one view's contents from another if you're creating more complex controls/modules/components. Otherwise, you should do this through the standard Model-View-Controller architecture: You should connect the enabled state of the controls you care about to some model-level predicate that suppli... | null | CC BY-SA 2.5 | null | 2008-08-17T01:23:36.650 | 2008-08-17T01:23:36.650 | null | null | 714 | null |
13,544 | 2 | null | 13,537 | 8 | null | The way I've heard of is to write an extremely limited compiler in another language, then use that to compile a more complicated version, written in the new language. This second version can then be used to compile itself, and the next version. Each time it is compiled the last version is used.
This is the definition ... | null | CC BY-SA 2.5 | null | 2008-08-17T07:00:23.787 | 2008-08-17T07:00:23.787 | null | null | 100 | null |
13,540 | 1 | 13,554 | null | 111 | 54,007 | I've written a stored proc that will do an update if a record exists, otherwise it will do an insert. It looks something like this:
```
update myTable set Col1=@col1, Col2=@col2 where ID=@ID
if @@rowcount = 0
insert into myTable (Col1, Col2) values (@col1, @col2)
```
My logic behind writing it in this way is that th... | Insert Update stored proc on SQL Server | CC BY-SA 2.5 | 0 | 2008-08-17T06:48:50.487 | 2018-01-25T10:15:53.020 | 2009-10-07T04:43:16.727 | 5,745 | 1,463 | [
"sql",
"sql-server",
"stored-procedures",
"upsert"
] |
13,555 | 2 | null | 13,540 | 8 | null | MERGE is one of the new features in SQL Server 2008, by the way.
| null | CC BY-SA 2.5 | null | 2008-08-17T07:24:48.200 | 2008-08-17T07:24:48.200 | null | null | 5 | null |
13,548 | 2 | null | 13,537 | 3 | null | It's the computer science version of the chicken-and-egg paradox. I can't think of a way not to write the initial compiler in assembler or some other language. If it could have been done, I should Lisp could have done it.
Actually, I think Lisp almost qualifies. Check out [its Wikipedia entry](http://en.wikipedia.org/... | null | CC BY-SA 3.0 | null | 2008-08-17T07:06:30.577 | 2012-11-08T23:35:35.420 | 2012-11-08T23:35:35.420 | 63,550 | 958 | null |
13,549 | 2 | null | 13,537 | 7 | null | A super interesting [discussion of this](http://cm.bell-labs.com/who/ken/trust.html) is in Unix co-creator [Ken Thompson](http://en.wikipedia.org/wiki/Ken_Thompson)'s [Turing Award](http://en.wikipedia.org/wiki/Turing_Award) lecture.
He starts off with:
> What I am about to describe is one of many "chicken and egg" p... | null | CC BY-SA 3.0 | null | 2008-08-17T07:07:05.037 | 2012-11-08T23:37:54.187 | 2012-11-08T23:37:54.187 | 63,550 | 116 | null |
13,552 | 2 | null | 13,537 | 114 | null | > Is there a way to actually write a compiler in its own language?
You to have some existing language to write your new compiler in. If you were writing a new, say, C++ compiler, you would just write it in C++ and compile it with an existing compiler first. On the other hand, if you were creating a compiler for a n... | null | CC BY-SA 3.0 | null | 2008-08-17T07:20:55.103 | 2017-04-09T00:51:33.003 | 2017-04-09T00:51:33.003 | 7,659,995 | 872 | null |
13,556 | 2 | null | 13,343 | 2 | null | I do outsourcing and basically I code all day, I have two projects and I don't have much time to make anything else which it means that I can't take more work cause I could not finish anything, that is a good policy, you should take just as you can.
Remember also that that you should have spare time and very importan... | null | CC BY-SA 2.5 | null | 2008-08-17T07:34:31.550 | 2008-08-17T07:34:31.550 | null | null | 1,130,097 | null |
13,568 | 2 | null | 6,371 | 14 | null | Have a look at how Ruby on Rails does this.
First there are so called migration files, that basically transform database schema and data from version N to version N+1 (or in case of downgrading from version N+1 to N). Database has table which tells current version.
Test databases are always wiped clean before unit-t... | null | CC BY-SA 2.5 | null | 2008-08-17T09:38:38.570 | 2008-08-17T09:38:38.570 | null | null | 1,431 | null |
13,554 | 2 | null | 13,540 | 63 | null | Your assumption is right, this is the optimal way to do it and it's called [upsert/merge](http://en.wikipedia.org/wiki/Upsert).
[Importance of UPSERT - from sqlservercentral.com](http://www.sqlservercentral.com/articles/T-SQL/61773/):
> For every update in the case mentioned above we are removing one
additional re... | null | CC BY-SA 2.5 | null | 2008-08-17T07:22:43.960 | 2009-01-31T22:27:36.820 | 2017-05-23T12:34:33.157 | -1 | 990 | null |