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
10,501
2
null
10,499
22
null
For linux: ``` $ strace sqlplus -L scott/tiger@orcl 2>&1| grep -i 'open.*tnsnames.ora' ``` shows something like this: ``` open("/opt/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora",O_RDONLY)=7 ``` Changing to ``` $ strace sqlplus -L scott/tiger@orcl 2>&1| grep -i 'tnsnames.ora' ``` will show all the fi...
null
CC BY-SA 2.5
null
2008-08-13T23:52:15.570
2008-08-28T06:36:59.600
2008-08-28T06:36:59.600
116
116
null
10,504
2
null
7,252
0
null
Based on your comment, "Showing that the design becomes simpler" I'm assuming you guys practice TDD. Doing a code review after the fact is not going to work. The whole thing about TDD is that it's a design and not a testing philosophy. If he didn't write the tests as part of the design, you aren't going to get a lot...
null
CC BY-SA 2.5
null
2008-08-13T23:55:44.737
2009-11-22T21:42:18.547
2009-11-22T21:42:18.547
573
1,208
null
10,513
2
null
10,486
28
null
All unit tests should run in under a second (that is all unit tests combined should run in 1 second). Now I'm sure this has practical limits, but I've had a project with a 1000 tests that run this fast on a laptop. You'll really want this speed so your developers don't dread refactoring some core part of the model (i...
null
CC BY-SA 4.0
null
2008-08-14T00:08:30.467
2018-05-15T01:45:25.110
2018-05-15T01:45:25.110
-1
1,208
null
10,505
2
null
10,475
1
null
About the recommendation to use the DasKeyboard, I just started using one today! But be aware that it makes a lot of noise. I was mortified how much noise it was making in my super quiet office filled with other people, who are engineers but mostly not developers. I asked the person across from me if it was too nois...
null
CC BY-SA 2.5
null
2008-08-13T23:55:56.127
2008-08-13T23:55:56.127
null
null
785
null
10,515
1
10,519
null
9
1,946
Having been a PHP developer on LAMP servers for quite a while, is there anything that I will need to take into consideration while preparing an application for on windows.
What do I need to run PHP applications on IIS?
CC BY-SA 3.0
0
2008-08-14T00:12:18.980
2016-04-29T17:36:59.407
2013-04-04T15:31:14.423
1,612,146
115
[ "php", "windows", "iis", "portability", "lamp" ]
10,508
2
null
10,475
0
null
I've been using [TypeFaster](http://www.typefastertypingtutor.com/). It's not pretty, but one nice feature is that it can load lessons in different keyboard layouts, like Colemak ([layout files here](http://colemak.com/Learn)) or Dvorak.
null
CC BY-SA 2.5
null
2008-08-13T23:57:29.150
2008-08-13T23:57:29.150
null
null
5
null
10,506
1
10,549
null
3
1,817
I am having a strange DB2 issue when I run DBUnit tests. My DBUnit tests are highly customized, but I don't think it is the issue. When I run the tests, I get a failure: > SQLCODE: -1084, SQLSTATE: 57019 [which translates to](https://www1.columbia.edu/sec/acis/db2/db2m0/sql1000.htm) > SQL1084C Shared memory segm...
Weird DB2 issue with DBUnit
CC BY-SA 3.0
null
2008-08-13T23:57:01.567
2018-08-01T16:00:49.107
2016-07-22T20:12:29.757
1,227,152
122
[ "java", "db2", "dbunit", "db2-luw" ]
10,516
2
null
10,158
2
null
I'm still not sure whether you just wanted to detect if the Xpath contains a namespace, or whether you want to remove the references to the namespace. So here's some sample code (in C#) that does both. ``` class Program { static void Main(string[] args) { string withNamespace = @"//foo/ns2:bar/baz[1]/n...
null
CC BY-SA 3.0
null
2008-08-14T00:13:24.030
2016-02-07T18:31:30.513
2016-02-07T18:31:30.513
2,921,691
611
null
10,518
2
null
7,622
0
null
[gcc](/questions/tagged/gcc) will typically use logical shifts on unsigned variables and for left-shifts on signed variables. The arithmetic right shift is the truly important one because it will sign extend the variable. [gcc](/questions/tagged/gcc) will will use this when applicable, as other compilers are likely to...
null
CC BY-SA 3.0
null
2008-08-14T00:15:02.687
2017-06-26T13:44:50.857
2017-06-26T13:44:50.857
3,436,922
1,256
null
10,519
2
null
10,515
9
null
Make sure you get the FastCGI extension for IIS 6.0 or IIS 7.0. It is the single most important thing you can have when running PHP under IIS. Also this article should get you setup: [http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/](http://learn.iis.net/page.aspx/247/using-fastcgi...
null
CC BY-SA 2.5
null
2008-08-14T00:17:03.463
2008-08-14T00:17:03.463
2020-06-20T09:12:55.060
-1
17
null
10,526
2
null
9,570
1
null
Use the AppWizard to create a bare-bones MFC app in your style (SDI / MDI / dialog ) and then [put on your depends](http://www.dependencywalker.com/).
null
CC BY-SA 2.5
null
2008-08-14T00:32:25.693
2008-08-14T00:32:25.693
null
null
1,042
null
10,534
2
null
6,904
1
null
Installing VS 2008 SP 1 fixed it for me.
null
CC BY-SA 2.5
null
2008-08-14T00:43:49.693
2008-08-14T00:43:49.693
null
null
631
null
10,521
2
null
10,324
2
null
@Eric > Why is a code solution that works getting voted down? Sure, it's ugly and might not be the fastest way to do it, but it's more instructive that saying "strtol" or "sscanf". If you try it yourself you will learn something about how things happen under the hood. I don't really think your solution should have be...
null
CC BY-SA 2.5
null
2008-08-14T00:21:45.417
2008-08-14T00:21:45.417
2017-05-23T12:25:09.837
-1
872
null
10,532
1
10,542
null
8
838
I've been using PHP & MySQL for ages and am about to start using PostgreSQL instead. What's the preferred method? Is it via the PDO objects or is there something better?
What's the preferred way to connect to a postgresql database from PHP?
CC BY-SA 3.0
null
2008-08-14T00:36:20.287
2013-04-04T15:31:42.973
2013-04-04T15:31:42.973
1,612,146
305
[ "php", "postgresql" ]
10,525
2
null
7,252
5
null
As a junior programmer, I'm still trying to get into the habit of writing tests. Obviously it's not easy to pick up new habits, but thinking about what would make this work for me, I have to +1 the comments about code reviews and coaching/pair programming. It may also be worth emphasising the long-term purpose of test...
null
CC BY-SA 2.5
null
2008-08-14T00:28:04.143
2008-08-16T00:42:19.260
2017-05-23T11:54:15.770
-1
1,157
null
10,524
1
718,366
null
29
15,156
The Entity Framework does not support the `Expression.Invoke` operator. You receive the following exception when trying to use it: > "The LINQ expression node type 'Invoke' is not supported in LINQ to Entities. Has anyone got a workaround for this missing functionality? I would like to use the PredicateBuilder detai...
Expression.Invoke in Entity Framework?
CC BY-SA 2.5
0
2008-08-14T00:24:43.320
2011-01-12T05:55:41.417
2011-01-12T05:55:41.417
24,874
708
[ ".net", "linq", "entity-framework", "linq-to-entities" ]
10,531
1
null
null
5
1,446
I'm working on some code to paste into the currently active [OpenOffice](http://en.wikipedia.org/wiki/OpenOffice.org) document directly from C#. I can't include any of the OpenOffice libraries, because we don't want to package them, so we're using reflection to get access to the [OpenOffice API](http://en.wikipedia.or...
Using C# with OpenOffice through reflection
CC BY-SA 2.5
null
2008-08-14T00:36:01.600
2010-03-15T13:12:36.737
2010-03-15T13:10:15.493
63,550
859
[ "c#", "reflection" ]
10,527
2
null
7,209
4
null
Sprites on the DS can be alpha blended using the [blend control registers](http://www.coranac.com/tonc/text/gfx.htm#sec-blend). TONC gives the necessary information for getting blending working on the main screen because the register locations are the same. Alpha blending on the subscreen uses the same process with d...
null
CC BY-SA 2.5
null
2008-08-14T00:32:58.377
2008-09-20T23:53:10.983
2008-09-20T23:53:10.983
1,256
1,256
null
10,536
2
null
9,650
1
null
@Nathan: I've upmodded the Common Lisp links, because you asked about Lisp (especially with reference to Emacs Lisp). However, Common Lisp is very different from Scheme. A program written for one is unlikely to run on the other. As you mentioned, SICP is for learning Scheme, not Lisp (or at least, not Common Lisp and ...
null
CC BY-SA 2.5
null
2008-08-14T00:45:14.373
2008-08-14T00:45:14.373
null
null
13
null
10,537
2
null
10,533
0
null
Here's basically what I did to solve this: ``` ($x_str, $y_str, $remainder) = split(/ and /, $str, 3); if ($x_str !~ /x=(.*)/) { # error } $x = $1; if ($y_str !~ /y=(.*)/) { # error } $y = $1; ``` I've omitted some additional validation and error handling. This technique works, but it's not as concise o...
null
CC BY-SA 2.5
null
2008-08-14T00:46:38.473
2008-08-14T00:46:38.473
null
null
872
null
10,545
2
null
10,515
0
null
One of the major sticking points I've had with IIS is the lack of Apache's mod_rewrite. There are other work-arounds and work-alikes depending on what you're doing, but just keep in mind that you'll need to change things up a bit to work with IIS if you're using mod rewrite extensively.
null
CC BY-SA 2.5
null
2008-08-14T00:56:51.837
2008-08-14T00:56:51.837
null
null
72
null
10,542
2
null
10,532
5
null
PDO objects are the new hotness. I'd recommend that as long as you can ensure that your target platform will always be running PHP 5.2+. There are many other database abstraction layers that support PostgreSQL that are compatible with older versions of PHP; I'd recommend [ADODB](http://adodb.sourceforge.net/). You s...
null
CC BY-SA 2.5
null
2008-08-14T00:54:51.030
2008-08-14T00:54:51.030
null
null
72
null
10,540
2
null
9,650
0
null
Another good dialect of lisp is [cmucl](http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Fwww.cons.org%2Fcmucl%2F&ei=04CjSMesMIKWsAPkreiEDw&usg=AFQjCNEaD4T5bkSLBKWylon98jBsL7-IGA&sig2=W3p2EItQZ4NdWN8YCzPbRg). They used to love to brag about being the "fastest" lisp.
null
CC BY-SA 2.5
null
2008-08-14T00:49:17.780
2008-08-14T00:49:17.780
null
null
859
null
10,539
2
null
10,059
0
null
Without the icon, the only method I could imagine for users to access the system menu is via right-click of the titlebar. If that's what you had in mind, you could handle WM_RBUTTONDOWN on your main frame and then calculate if the right-click was on the titlebar. ``` int clickX = GET_X_LPARAM(lParam); int clickY = ...
null
CC BY-SA 3.0
null
2008-08-14T00:49:13.007
2016-02-07T18:32:46.197
2016-02-07T18:32:46.197
2,921,691
1,042
null
10,544
2
null
10,532
1
null
I, personally, use PDO for all my database work when I have the choice. Prepared statements make my life easy, and it is seamless between database systems - handy if you have to work with one you're not used to. If you want to roll your own abstraction, or go with the procedural model, here's the Postgre functions: ...
null
CC BY-SA 2.5
null
2008-08-14T00:55:59.217
2008-08-14T00:55:59.217
null
null
655
null
10,538
2
null
10,477
3
null
distance between P_0 and P_3 (in cubic form), yes, but I think you knew that, is straight forward. Distance on a curve is just arc length: [fig 1 http://www.codecogs.com/eq.latex?%5Cint_%7Bt_0%7D%5E%7Bt_1%7D%20%7B%20|P'(t)|%20dt](http://www.codecogs.com/eq.latex?%5Cint_%7Bt_0%7D%5E%7Bt_1%7D%20%7B%20|P'(t)|%20dt) whe...
null
CC BY-SA 2.5
null
2008-08-14T00:47:05.103
2008-08-14T00:50:47.123
2008-08-14T00:50:47.123
157
157
null
10,551
2
null
10,303
1
null
My company uses Foxpro to store quite a bit of data... In my experience, data corruption is very obvious, with the table failing to open in the first place. Do you have a copy of foxpro to open the table with?
null
CC BY-SA 2.5
null
2008-08-14T01:10:07.053
2008-08-14T01:10:07.053
null
null
null
null
10,547
2
null
10,515
3
null
We just rolled out PHP 5.2.6 + FastCGI on our shared hosting platform without any problems. As long as you follow the steps outlined in [the article Nick linked](https://stackoverflow.com/questions/10515/php-on-iis#10519) to then you should be just fine. My only additional piece of advice would be to forget about usin...
null
CC BY-SA 3.0
null
2008-08-14T01:02:52.340
2016-04-29T17:36:59.407
2017-05-23T12:25:10.080
-1
419
null
10,533
1
10,573
null
2
4,294
Here's a problem I ran into recently. I have attributes strings of the form ``` "x=1 and y=abc and z=c4g and ..." ``` Some attributes have numeric values, some have alpha values, some have mixed, some have dates, etc. Every string is to have "`x=someval and y=anotherval`" at the beginning, but some don't. I have...
Parsing attributes with regex in Perl
CC BY-SA 2.5
null
2008-08-14T00:40:26.753
2009-07-15T04:37:57.077
null
null
872
[ "regex", "perl" ]
10,549
2
null
10,506
2
null
Well, I think I fixed it by doing the following: ``` db2stop force db2start ``` At least, things seem to be working now.....
null
CC BY-SA 2.5
null
2008-08-14T01:05:31.087
2008-08-14T01:05:31.087
null
null
122
null
10,555
2
null
10,059
2
null
You can use `WM_NCRBUTTONDOWN` to detect if the user has right-clicked on your caption and then bring up the system menu.
null
CC BY-SA 3.0
null
2008-08-14T01:28:13.567
2016-02-07T18:32:26.873
2016-02-07T18:32:26.873
2,921,691
1,043
null
10,550
2
null
10,475
1
null
I have a really weird habitual way of typing where I use several fingers on my left hand but only one or two on the right. This has served me for years and apparently gives me 80+ words per minute, but it does seem an incredibly weird way to type. This is touch typing but not using the "standard" finger arrangement. Wh...
null
CC BY-SA 2.5
null
2008-08-14T01:09:36.337
2008-08-14T01:09:36.337
null
null
null
null
10,552
2
null
10,324
2
null
@Eric > I was actually hoping to see a C wizard post something really cool, sort of like what I did but less verbose, while still doing it "manually". Well, I'm no C guru, but here's what I came up with: ``` unsigned int parseHex(const char * str) { unsigned int val = 0; char c; while(c = *str++) { ...
null
CC BY-SA 2.5
null
2008-08-14T01:16:16.573
2008-09-26T19:20:55.603
2008-09-26T19:20:55.603
872
872
null
10,556
2
null
10,531
1
null
Is it just me or are your parameters the wrong way around? Also, do you have the right number of parameters? I could be missing something though, so sorry if you've already checked this stuff: The documentation says: ``` dispatcher.executeDispatch(document, ".uno:Paste", "", 0, Array()) ``` Which would indicate to ...
null
CC BY-SA 2.5
null
2008-08-14T01:29:10.960
2010-03-15T13:12:36.737
2010-03-15T13:12:36.737
63,550
493
null
10,561
2
null
9,750
0
null
Since the question asked for a non-C way, here's a Scheme implementation, cheerfully plagiarised from [SLIB](http://people.csail.mit.edu/jaffer/SLIB): ``` (define (bit-reverse k n) (do ((m (if (negative? n) (lognot n) n) (arithmetic-shift m -1)) (k (+ -1 k) (+ -1 k)) (rvs 0 (logior (arithmetic-shift rv...
null
CC BY-SA 2.5
null
2008-08-14T01:35:32.260
2008-08-14T01:35:32.260
null
null
13
null
10,557
2
null
3,510
5
null
I don't have the power to edit [@Michael Stum's answer](https://stackoverflow.com/a/3511/50776), but it's not quite correct. He reduces ``` (i + 4) - (a + b) ``` to ``` (i + 4 - a + b) ``` They are not equivalent. The best reduction I can get for the whole expression is ``` ((i + 4) - (a + b)) * MAGIC_NUMBER -...
null
CC BY-SA 3.0
null
2008-08-14T01:29:42.253
2012-05-21T18:01:38.773
2017-05-23T12:32:35.137
-1
1,190
null
10,558
2
null
3,088
0
null
This thread is very useful to me as a beginner (>100 lines of code) programmer. Based on what I have been through, once I finished with the "Hello World" and move to variables and "if/else" statement, I got zapped with too much syntax; not knowing what to do with them. So with an interesting simple project, I might g...
null
CC BY-SA 2.5
null
2008-08-14T01:30:02.410
2008-08-14T05:34:02.137
2017-05-23T10:31:31.273
-1
1,261
null
10,573
2
null
10,533
1
null
I'm not the best at regular expressions, but this seems pretty close to what you're looking for: ``` /x=(.+) and y=([^ ]+)( and (.*))?/ ``` Except you use $1, $2, and $4. In use: ``` my @strs = ("x=1 and y=abc and z=c4g and w=v4l", "x=yes and y=no", "z=nox and w=noy"); foreach (@strs) { ...
null
CC BY-SA 2.5
null
2008-08-14T01:56:53.480
2008-08-14T01:56:53.480
null
null
219
null
10,576
2
null
9,882
0
null
@John: I think that the question relates to an algorithm that actually recognises patterns in log files and automatically "guesses" appropriate format strings and data for it. The `*scanf` family can't do that on its own, it can only be of help once the patterns have been recognised in the first place.
null
CC BY-SA 2.5
null
2008-08-14T02:01:34.000
2008-08-14T02:01:34.000
null
null
13
null
10,580
1
10,587
null
101
115,010
What is the difference between early and late binding?
What is the difference between Early and Late Binding?
CC BY-SA 3.0
0
2008-08-14T02:10:53.873
2021-04-25T12:50:48.127
2014-11-17T19:14:33.577
2,756,409
1,190
[ "binding", "dynamic-binding", "static-binding" ]
10,563
2
null
9,750
2
null
And here's a version directly cut and pasted from [OpenJDK](http://openjdk.java.net/), which is interesting because it involves no loop. On the other hand, unlike the Scheme version I posted, this version only works for 32-bit and 64-bit numbers. :-) 32-bit version: ``` public static int reverse(int i) { // HD, F...
null
CC BY-SA 2.5
null
2008-08-14T01:43:01.493
2008-08-14T01:43:01.493
null
null
13
null
10,574
2
null
10,564
1
null
I've had difficulty getting Git to cooperate with [WordPad](http://en.wikipedia.org/wiki/WordPad), [Komodo Edit](https://en.wikipedia.org/wiki/Komodo_Edit) and pretty much every other editor I give it. Most open for editing, but Git clearly doesn't wait for the save/close to happen. As a crutch, I've just been doing ...
null
CC BY-SA 4.0
null
2008-08-14T01:57:55.007
2019-11-13T07:51:38.500
2019-11-13T07:51:38.500
63,550
1,124
null
10,587
2
null
10,580
68
null
The short answer is that early (or static) binding refers to compile time binding and late (or dynamic) binding refers to runtime binding (for example when you use reflection).
null
CC BY-SA 2.5
null
2008-08-14T02:24:04.047
2008-08-14T03:39:22.103
2008-08-14T03:39:22.103
202
202
null
10,584
2
null
10,580
3
null
In interpreted languages, the difference is a little more subtle. Ruby: ``` # early binding: def create_a_foo(*args) Foo.new(*args) end my_foo = create_a_foo # late binding: def create_something(klass, *args) klass.new(*args) end my_foo = create_something(Foo) ``` Because Ruby is (generally) not compiled, ther...
null
CC BY-SA 2.5
null
2008-08-14T02:21:56.207
2008-08-14T02:21:56.207
null
null
1,190
null
10,595
1
11,958
null
0
644
I've grokked the code for all the aforementioned apps and I still can't find a straightforward way to create a static directory structure from a single command.
How do I write those cool command line code generators (rails, sproutcore, webgen)
CC BY-SA 3.0
0
2008-08-14T02:39:38.917
2013-07-04T12:15:30.470
2013-07-04T12:15:30.470
1,584,286
1,263
[ "ruby" ]
10,593
2
null
4,689
6
null
I think the anti-aliasing blur on Consolas is caused by monitors which do not have ClearType enabled. Consolas was designed for ClearType. [Jeff A: indeed, you can see screenshots of this in [a post I wrote on this topic](http://www.codinghorror.com/blog/archives/000356.html).]
null
CC BY-SA 2.5
null
2008-08-14T02:36:18.517
2008-08-14T02:45:16.843
2008-08-14T02:45:16.860
1
372
null
10,582
2
null
10,580
19
null
In compiled languages, the difference is stark. Java: ``` //early binding: public create_a_foo(*args) { return new Foo(args) } my_foo = create_a_foo(); //late binding: public create_something(Class klass, *args) { klass.new_instance(args) } my_foo = create_something(Foo); ``` In the first example, the compiler ...
null
CC BY-SA 3.0
null
2008-08-14T02:16:42.283
2018-03-08T04:39:07.127
2018-03-08T04:39:07.127
1,402,846
1,190
null
10,586
1
10,713
null
6
4,488
I'm currently trying to read in an XML file, make some minor changes (alter the value of some attributes), and write it back out again. I have intended to use a StAX parser (`javax.xml.stream.XMLStreamReader`) to read in each event, see if it was one I wanted to change, and then pass it straight on to the StAX writer ...
Small modification to an XML document using StAX
CC BY-SA 3.0
0
2008-08-14T02:22:37.920
2017-03-24T21:04:21.857
2012-04-25T16:36:06.310
1,332,690
797
[ "java", "xml", "stax" ]
10,599
1
11,467
null
2
669
I need to validate a date/time field on a webpage but want it to do it without reloading the page and would like 'instant' feedback for the users. What's the best/easiest solution. BTW: easiest scores 65% of total points Edit: What if best was 65% of total points?
Web page field validation
CC BY-SA 2.5
null
2008-08-14T02:50:26.210
2009-01-06T13:29:28.403
2008-08-18T15:11:53.547
730
730
[ "html" ]
10,603
2
null
10,599
2
null
Check out this [javascript date validation](http://www.expertsrt.com/scripts/Rod/validate_date.php) function. It uses javascript, regular expressions and the 'onblur' event of a text input.
null
CC BY-SA 2.5
null
2008-08-14T02:56:56.913
2008-08-14T03:00:26.940
2008-08-14T03:00:26.940
242
242
null
10,589
2
null
9,882
1
null
You're not going to find a tool that can simply take arbitrary input, guess what data you want from it, and produce the output you want. That sounds like strong AI to me. Producing something like this, even just to recognize numbers, gets really hairy. For example is "123.456" one number or two? How about this "123...
null
CC BY-SA 2.5
null
2008-08-14T02:25:16.637
2008-08-14T02:25:16.637
null
null
872
null
10,609
2
null
10,599
0
null
A simple javascript method that reads what's in the input field on submit and validates it. If it's not valid, return false so that the form is not submitted to the server. ``` ... onSubmit="return validateForm();" ... ``` Make sure you validate on the server side too, it's easy to bypass javascript validation.
null
CC BY-SA 2.5
null
2008-08-14T03:03:22.033
2008-08-14T03:03:22.033
null
null
810
null
10,605
2
null
10,604
2
null
[SQL Profiler](http://msdn.microsoft.com/en-us/library/ms181091.aspx) is the tool I use to monitor traffic flowing to my SQL Server. It allows you to gather detailed data about your SQL Server. SQL Profiler has been distributed with SQL Server since at least SQL Server 2000 (but probably before that also). Highly reco...
null
CC BY-SA 2.5
null
2008-08-14T03:00:29.997
2008-08-14T03:00:29.997
null
null
708
null
10,610
1
10,646
null
7
2,038
Does anyone use have a good regex library that they like to use? Most of the regexes that you find online either contain bugs or are so focused on the edge cases that it turns into a competition to validate whatever spec 100%. Of course you can write your own, but when you are billing by the hour its handy to have a li...
Pre-built regular expression patterns or Regex Libraries?
CC BY-SA 2.5
0
2008-08-14T03:04:16.977
2015-12-31T09:37:53.927
2008-09-10T18:13:56.743
-1
805
[ "regex" ]
10,604
1
10,617
null
5
744
In [Maybe Normalizing Isn't Normal](http://www.codinghorror.com/blog/archives/001152.html) Jeff Atwood says, "You're automatically measuring all the queries that flow through your software, right?" I'm not but I'd like to. Some features of the application in question: - - [MS Enterprise Library Data Access Applica...
Automatically measure all SQL queries
CC BY-SA 2.5
null
2008-08-14T02:57:18.507
2009-02-17T11:56:44.397
2008-08-18T16:13:36.183
116
150
[ "sql-server", "optimization" ]
10,613
2
null
10,595
0
null
So what you want is to able to issue a command that will generate an entire directory tree? ``` cp -r <template> <destination> ``` Or am I misunderstanding? If you want to generate a consistent directory structure, your best bet is to simply copy it from a template. Fast, easy, done.
null
CC BY-SA 2.5
null
2008-08-14T03:08:02.073
2008-08-14T03:08:02.073
null
null
872
null
10,619
2
null
10,610
4
null
Boost, for c++
null
CC BY-SA 2.5
null
2008-08-14T03:15:59.980
2008-08-14T03:15:59.980
null
null
522
null
10,614
2
null
10,610
2
null
Besides being pretty much the best Regex tool on the market (seriously), RegexBuddy is about the only tool I know of that lets you switch amongst different Regex rendering engines. [http://www.regexbuddy.com/](http://www.regexbuddy.com/) See info here: [http://en.wikipedia.org/wiki/RegexBuddy](http://en.wikipedia.or...
null
CC BY-SA 2.5
null
2008-08-14T03:10:22.660
2008-08-14T03:10:22.660
null
null
1
null
10,621
2
null
10,599
3
null
If you would like to use JavaScript then it has built in date validation functions. However, if you do not want to go the JavaScript route, you could change the UI to dropdown controls which would limit the users ability to enter invalid data. You would still need to check server side to ensure nobody submits Feb 30th....
null
CC BY-SA 2.5
null
2008-08-14T03:16:44.863
2008-08-14T03:16:44.863
null
null
805
null
10,616
1
10,623
null
149
330,878
I'm an [ASP.NET](http://en.wikipedia.org/wiki/ASP.NET) developer who has used `Microsoft SQL Server` for all my database needs (both at work and for personal projects). I am considering trying out the [LAMP](http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29) stack for some of my personal projects. What are so...
Differences between MySQL and SQL Server
CC BY-SA 3.0
0
2008-08-14T03:13:26.633
2018-03-23T06:47:26.037
2018-03-23T06:47:26.037
3,876,565
285
[ "mysql", "sql-server", "tsql" ]
10,617
2
null
10,604
6
null
In addition to Brad's mention of SQL Profiler, if you want to do this in code, then . You insert the timing code there, and voila, you know how long every query in your system takes. A single point of entry to the database is a fairly standard feature of any ORM or database layer -- or at least it has been in any proj...
null
CC BY-SA 2.5
null
2008-08-14T03:13:56.770
2008-08-14T03:13:56.770
null
null
1
null
10,624
2
null
10,599
0
null
If you're using ASP.NET, it has validator controls that you can point to textboxes which you can then use to validate proper date/time formats.
null
CC BY-SA 2.5
null
2008-08-14T03:18:31.363
2008-08-14T03:18:31.363
null
null
372
null
10,628
2
null
10,616
6
null
I think one of the major things to watch out for is that versions prior to MySQL 5.0 did not have views, triggers, and stored procedures. More of this is explained in the [MySQL 5.0 Download page](http://dev.mysql.com/downloads/mysql/5.0.html#downloads).
null
CC BY-SA 3.0
null
2008-08-14T03:20:06.040
2015-10-10T08:28:30.010
2015-10-10T08:28:30.010
63,550
372
null
10,633
2
null
10,475
3
null
I've been touchtyping since I was 10 years old (on a real typewriter at that!) but one thing that helped my sister learn touchtyping is hanging out in IRC channels. You want to be able to "talk" as fast as you can speak and that trained her in typing a lot faster. I know it's a lame answer and not really a software so...
null
CC BY-SA 2.5
null
2008-08-14T03:28:03.467
2008-08-14T03:28:03.467
null
null
372
null
10,623
2
null
10,616
143
null
One thing you have to watch out for is the fairly severe differences in the way SQL Server and MySQL implement the SQL syntax. Here's a nice [Comparison of Different SQL Implementations](http://troels.arvin.dk/db/rdbms/). For example, take a look at the top-n section. In MySQL: ``` SELECT age FROM person ORDER BY ag...
null
CC BY-SA 3.0
null
2008-08-14T03:17:18.153
2015-10-10T08:23:29.740
2015-10-10T08:23:29.740
63,550
1
null
10,625
2
null
10,564
16
null
Notepad++ works just fine, although I choose to stick with Notepad, -m, or even sometimes the built-in "edit." The problem you are encountering using Notepad++ is related to how Git is launching the editor executable. My solution to this is to set environment variable `EDITOR` to a batch file, rather than the actual ...
null
CC BY-SA 4.0
null
2008-08-14T03:18:32.830
2019-11-13T07:54:18.117
2019-11-13T07:54:18.117
63,550
363
null
10,635
1
10,638
null
114
223,483
I wrote a simple batch file as a PowerShell script, and I am getting errors when they run. It's in a scripts directory in my path. This is the error I get: > Cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about-signing". I looked in the help, but it's less than...
Why are my PowerShell scripts not running?
CC BY-SA 4.0
0
2008-08-14T03:39:17.610
2021-04-27T03:00:12.373
2019-09-06T16:15:30.897
2,756,409
1,220
[ "powershell" ]
10,634
1
10,737
null
28
6,083
I currently use nant, ccnet (cruise control), svn, mbunit. I use msbuild to do my sln build just because it was simpler to shell out. Are there any merits to switching my whole build script to MSBuild? I need to be able to run tests, watir style tests, xcopy deploy. Is this easier?
Should I switch from nant to msbuild?
CC BY-SA 2.5
0
2008-08-14T03:36:54.790
2012-07-30T17:21:25.567
2008-08-23T15:11:26.223
2,134
1,220
[ "msbuild", "build-process", "build-automation", "nant" ]
10,638
2
null
10,635
111
null
It could be PowerShell's default security level, which (IIRC) will only run signed scripts. Try typing this: ``` set-executionpolicy remotesigned ``` That will tell PowerShell to allow local (that is, on a local drive) unsigned scripts to run. Then try executing your script again.
null
CC BY-SA 4.0
null
2008-08-14T03:41:33.003
2019-09-06T16:15:55.880
2019-09-06T16:15:55.880
2,756,409
615
null
10,639
2
null
10,634
9
null
I feel that MSBuild and Nant are fairly comparable. If you are using one of these, I generally wouldn't switch between them unless there was a compelling feature that was missing in the product you had selected. I personally use MSBuild for any new project, but your mileage may vary. Hope that helps! @ChanChan - @...
null
CC BY-SA 2.5
null
2008-08-14T03:43:04.777
2008-12-15T18:39:59.443
2008-12-15T18:39:59.443
708
708
null
10,641
2
null
10,634
1
null
@Brad Leach > I generally wouldn't switch between them unless there was a compelling feature that was missing what are the compelling reasons to use msbuild? are there cons? So far I'm getting a pretty good, "no don't bother" from your answer.
null
CC BY-SA 2.5
null
2008-08-14T03:49:42.190
2008-08-14T03:49:42.190
null
null
1,220
null
10,640
2
null
10,635
5
null
Also it's worth knowing that you may need to include `.\` in front of the script name. For example: ``` .\scriptname.ps1 ```
null
CC BY-SA 3.0
null
2008-08-14T03:47:47.857
2017-06-08T10:20:10.533
2017-06-08T10:20:10.533
1,205,871
49
null
10,631
2
null
10,610
1
null
Lately, I do all my text parsing in Perl. If I needed regex's in another language, I'd go with [PCRE](http://www.pcre.org/). > The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5. PCRE has its own native API, as well as a se...
null
CC BY-SA 2.5
null
2008-08-14T03:25:26.263
2008-08-14T05:10:50.373
2008-08-14T05:10:50.373
872
872
null
10,645
2
null
10,634
0
null
I use MSBuild Nant, because the current version of Nant can't as yet compile .NET 3.5 applications (same was true when .NET 2.0 first came out).
null
CC BY-SA 2.5
null
2008-08-14T03:53:09.687
2008-08-14T03:53:09.687
null
null
372
null
10,644
1
10,655
null
83
41,275
I need a C# profiler. Although I'm not averse to paying for one, something which is free or at least with a trial version would be ideal since it takes time to raise a purchase order. Any recommendations?
Any decent C# profilers out there?
CC BY-SA 3.0
0
2008-08-14T03:52:55.553
2017-07-02T23:08:00.597
2017-07-02T23:08:00.597
472,495
147
[ "c#", ".net", "profiling", "profiler" ]
10,646
2
null
10,610
4
null
You can search for regular expression in [regexlib](http://regexlib.com/).
null
CC BY-SA 2.5
null
2008-08-14T03:53:27.237
2008-08-14T03:53:27.237
null
null
718
null
10,649
2
null
10,644
1
null
Currently don't use them, a buddy of mine raves about Ants profiler. I know its a for-pay product not sure how expensive. If you happen to staff an MVP you might be able to leverage that to get a license for free.
null
CC BY-SA 2.5
null
2008-08-14T03:55:21.617
2008-08-14T03:55:21.617
null
null
1,220
null
10,648
2
null
10,604
0
null
The [Dropthings](http://www.codeplex.com/dropthings) project on CodePlex has a class for timing blocks of code. The class is named TimedLog. It implements IDisposable. You wrap the block of code you wish to time in a using statement.
null
CC BY-SA 2.5
null
2008-08-14T03:54:38.873
2008-08-14T03:54:38.873
null
null
null
null
10,612
2
null
10,475
14
null
I trained my typing on [GNU Typist](http://www.gnu.org/software/gtypist/). It comes with exercises for various languages and keyboard layouts, if you're so inclined. One of the most typing programs I used is dvorak7min. It has a mode where for each typo you make, the cursor goes back by 1. So if you don't watch your...
null
CC BY-SA 2.5
null
2008-08-14T03:06:20.547
2008-08-14T03:06:20.547
null
null
13
null
10,651
2
null
10,644
40
null
I used [Ants profiler](http://www.red-gate.com/products/dotnet-development/ants-performance-profiler/) on a large c# project a year and a half ago. It really performed very nicely for what it cost, and even outperformed a few of the more expensive competitors. It calculates cost on with almost a line by line resolutio...
null
CC BY-SA 3.0
null
2008-08-14T03:59:30.673
2014-04-07T20:56:28.393
2014-04-07T20:56:28.393
231,597
805
null
10,652
2
null
10,644
29
null
[dotTrace](http://www.jetbrains.com/profiler/) from JetBrains is widely used. Patrick Smacchia's awesome [NDepend](http://www.ndepend.com/#) is excellent for providing static analysis.
null
CC BY-SA 2.5
null
2008-08-14T04:00:15.993
2008-08-14T04:00:15.993
null
null
49
null
10,656
2
null
10,644
7
null
We use [Ants profiler](http://www.red-gate.com/products/ants_performance_profiler/index.htm) where I work. It gives very detailed information in a simple manner.
null
CC BY-SA 2.5
null
2008-08-14T04:04:26.887
2010-06-28T13:15:32.920
2010-06-28T13:15:32.920
810
810
null
10,657
2
null
10,634
0
null
The only reason I can see for using msbuild is if you would like to use a automated build server like cruise control. If you are not going to switch, then I would leave it alone.
null
CC BY-SA 2.5
null
2008-08-14T04:06:00.847
2008-08-14T04:06:00.847
null
null
805
null
10,650
2
null
10,644
4
null
I have used AQtime and it has never let me down. I am sure there is a trial version.
null
CC BY-SA 2.5
null
2008-08-14T03:57:36.963
2008-08-14T03:57:36.963
null
null
263
null
10,655
2
null
10,644
35
null
You can try the following: - [nprof](http://nprof.sourceforge.net/Site/Description.html)- [ProfileSharp](http://sourceforge.net/projects/profilesharp/)- [.Net Memory Profiler](http://memprofiler.com/) --- Edit: Nprof has been replaced with [SlimTune](https://code.google.com/p/slimtune/) and works with .Net 4.0 a...
null
CC BY-SA 3.0
null
2008-08-14T04:01:56.410
2015-02-06T17:09:21.860
2015-02-06T17:09:21.860
825,588
718
null
10,658
1
null
null
76
65,863
I'm looking for a good method of generating an iCalendar file (*.ics) in c# (asp.net). I've found a couple resources, but one thing that has been lacking is their support for fields - fields that have carriage returns and line feeds. For example, if the field isn't encoded properly, only the first line will display...
Creating iCal Files in c#
CC BY-SA 2.5
0
2008-08-14T04:07:36.150
2018-01-09T23:12:28.137
2011-11-18T05:14:35.897
3,043
519
[ "c#", "asp.net", "icalendar" ]
10,660
2
null
10,586
4
null
After a bit of mucking around, the answer seems to be to use the Event reader/writer versions rather than the Stream versions. (i.e. javax.xml.stream.XMLEventReader and javax.xml.stream.XMLEventWriter) See also [http://www.devx.com/tips/Tip/37795](http://www.devx.com/tips/Tip/37795), which is what finally got me movi...
null
CC BY-SA 2.5
null
2008-08-14T04:13:24.717
2008-08-14T04:13:24.717
null
null
797
null
10,662
2
null
10,475
1
null
For the sake of completeness, my wife used [KP Typing Tutor](http://www.fonlow.com/kptypingtutor/), worked great. +1 on chatting more
null
CC BY-SA 2.5
null
2008-08-14T04:19:18.247
2008-08-14T04:19:18.247
null
null
1,220
null
10,663
2
null
4,689
1
null
I love consolas, especially with italics for comments. The little italic curlicues are so cute :P
null
CC BY-SA 2.5
null
2008-08-14T04:22:59.033
2008-08-14T04:22:59.033
null
null
369
null
10,661
1
11,290
null
6
327
We deployed a live, fresh, swanky site using preview 3 including rigorous stress testing. Page Output caching was our saviour and afforded us the ability to meet our performance contractual requirements. My question is, is there a difference between action `OutputCacheFilter` and page output caching? Is the action ...
Does the OutputCacheFilter in the Microsoft MVC Preview 4 actually save on action invocations?
CC BY-SA 3.0
null
2008-08-14T04:16:18.610
2017-03-09T18:36:07.093
2017-03-09T18:36:07.093
5,270,744
209
[ "c#", "asp.net", "asp.net-mvc", "outputcache" ]
10,659
2
null
10,658
73
null
I use [DDay.Ical](http://sourceforge.net/projects/dday-ical/), its good stuff. Has the ability to open up an ical file and get its data in a nice object model. It says beta, but it works great for us. # Edit Nov 2016 This library has been deprecated, but was picked up and re-released as iCal.NET by another dev. ...
null
CC BY-SA 3.0
null
2008-08-14T04:09:48.813
2016-11-01T20:28:02.957
2016-11-01T20:28:02.957
97,964
1,220
null
10,664
2
null
10,644
2
null
> Patrick Smacchia's awesome NDepend is excellent for providing static analysis. I would thoroughly recommend NDepend for static analysis, but just be warned that you'll probably need to put aside a day or two to actually analyse the truckload of information that it provides as well as work out what all the stats ...
null
CC BY-SA 2.5
null
2008-08-14T04:26:03.193
2008-08-14T04:26:03.193
null
null
493
null
10,675
2
null
10,532
0
null
I would also suggest creating an inherited PDO class or a wrapper class if you decide not to use PDO. This would provide you with a lot more flexibility in the future. ie. Calculating query execution time.
null
CC BY-SA 2.5
null
2008-08-14T04:46:37.817
2008-08-14T04:46:37.817
null
null
889
null
10,678
2
null
10,098
1
null
TypeMock is insanely powerful. When I to unit test a web forms app that wasn't designed for testability TypeMock saved my life. But when I take the time to pick an architectural pattern (MVC) or design one that allows for Mockability (you know, public virtualize state changing methods) I use Moq. It is so simple to u...
null
CC BY-SA 2.5
null
2008-08-14T04:47:21.590
2008-08-14T04:47:21.590
null
null
209
null
10,668
1
null
null
25
19,694
I've been trying to understand how to read the memory of other processes on Mac OS X, but I'm not having much luck. I've seen many examples online using `ptrace` with `PEEKDATA` and such, however it doesn't have that option on BSD [man ptrace](http://developer.apple.com/documentation/Darwin/Reference/ManPages/man2/ptra...
Reading Other Process' Memory in OS X?
CC BY-SA 3.0
0
2008-08-14T04:31:32.903
2022-05-18T13:02:03.883
2016-11-24T23:37:41.430
4,332,828
1,114
[ "c", "macos", "memory", "ptrace" ]
10,685
2
null
10,604
0
null
If you use rails it automatically logs all the SQL queries, and the time they took to execute, in your development log file. I find this very useful because if you do see one that's taking a while, it's one step to just copy and paste it straight off the screen/logfile, and put 'explain' in front of it in mysql. You ...
null
CC BY-SA 2.5
null
2008-08-14T05:00:51.767
2008-08-14T05:00:51.767
null
null
234
null
10,680
1
10,686
null
23
12,396
Is there any difference between ``` int on_exit(void (*function)(int , void *), void *arg); ``` and ``` int atexit(void (*function)(void)); ``` other than the fact that the function used by on_exit gets the exit status? That is, if I don't care about the exit status, is there any reason to use one or the other? ...
Is there a difference between the on_exit() and atexit() functions?
CC BY-SA 3.0
0
2008-08-14T04:53:45.620
2011-09-27T13:33:11.823
2011-09-27T13:33:11.823
25,507
1,084
[ "c", "linux" ]
10,684
2
null
10,680
20
null
You should use `atexit()` if possible. `on_exit()` is nonstandard and less common. For example, it's not available on OS X. Kernel.org - [on_exit()](http://www.kernel.org/doc/man-pages/online/pages/man3/on_exit.3.html): > This function comes from SunOS 4, but is also present in libc4, libc5 and glibc. It no long...
null
CC BY-SA 2.5
null
2008-08-14T04:59:55.607
2008-08-14T04:59:55.607
null
null
872
null
10,670
1
10,714
null
9
2,469
We have a remoting singleton server running in a separate windows service (let's call her RemotingService). The clients of the RemotingService are ASP.NET instances (many many). Currently, the clients remoting call RemotingService and blocks while the RemotingService call is serviced. However, the remoting service is ...
Asynchronous Remoting calls
CC BY-SA 2.5
null
2008-08-14T04:35:16.810
2012-08-11T15:44:43.557
null
null
209
[ "c#", ".net-3.5", ".net-2.0", "remoting", "rpc" ]
10,687
2
null
10,610
-1
null
e-texteditor hilights what you're searching for as you type it. This is incredibly useful, as you can paste your 'sample text' into a file, and just type your regex into the search field, and see what it's matching right in front of you. None of these 'visual regex builder' things are substitutes for actually LEARNING...
null
CC BY-SA 2.5
null
2008-08-14T05:03:34.303
2008-08-14T05:03:34.303
null
null
234
null