mpartel

Age: 28

1d
awarded Supporter
Jan
16
comment Unique index when one of two columns is null
You can check that both aren't null in a Rails validation. Such a validation is not prone to races like uniqueness validations are. I've opened an issue about the CHECK constraints.
Jan
15
revised Unique index when one of two columns is null
Added note about partial indices
Jan
15
revised Unique index when one of two columns is null
Improved title
Jan
15
answered Unique index when one of two columns is null
Nov
20
awarded Popular Question
Nov
15
comment autotools output test-suite.log contents on test failure
With a simple ||, the exit code will be successful if cat succeeds. If you want to keep a non-successful exit code, you could do something like: /bin/sh -c 'if make check; then true; else cat path/to/test-suite.log; exit 1; fi'
Nov
14
comment KVM on Ubuntu: Port forwarding to a guest VM
What caused those REJECT rules to be there?
Oct
31
awarded Nice Question
Sep
26
awarded Yearling
Sep
26
awarded Yearling
May
22
awarded Teacher
Feb
18
answered Forcing user in both directions using bindfs
Jan
27
awarded Notable Question
Dec
2
comment How to set the focus to the first input element in an HTML form independent from the id?
This slightly simpler version should suffice: $(':input[type!=hidden]:first').focus()
Nov
28
awarded Good Answer
Oct
12
awarded Supporter
Aug
24
comment How can I return a 503 status in apache without invoking external scripts
Redirect 503 / seems to work.
Aug
7
comment Waitpid equivalent with timeout?
Isn't all CPU scheduling strictly speaking arbitrary on most (non-realtime) OSes? That is, you can have an arbitrarily long scheduling delay immediately after starting your worker no matter which timeout mechanism you use. That said, this solution is indeed likely to be somewhat less accurate than many others.
Jul
9
comment PhpStorm autocompletion in traits
I think tightly coupled traits are entirely reasonable in scenarios like this. In a (mostly) dynamic language, we must (mostly) rely on documentation to guide the users of our abstractions anyway. Superclasses have the problem of being hard to compose arbitrarily due to single inheritance. Custom assertion classes are fine when you want to do assertions, but that's just one special case.
1 2 3 4 5