In case you're interested in the source code, I put in on github. The PDF can be downloaded from here (http://renenyffenegger.ch/blog/files/a4-ruler.pdf).
Friday, December 19, 2014
Creating an a4 with rulers to test the output accuracy of a printer
Tuesday, December 16, 2014
The missing \b regular expression special character in Oracle.
\b
, at least not in Oracle 11i.
Consider the following table:
Now, I want to find all records that contain the exact word Foo
.
That is, I want, for example A Foo without a Baz
(the fourth record), but I don't want
A FooA BarAndABaz
(the second record) because FooA
is not the exact word Foo
If Oracle supported \b
I could use
To improve matters, I could try
A bit better, but far from perfect. For example, the fifth record (Foo Bar, Baz
) is not returned, because
the \s
doesn't match start of line. So, I improve the where condition:
Yet again, this is far from perfect. I need also record records where Foo
is followed or lead by a non word character (such as ?
or -
):
Monday, December 15, 2014
Little things that make live easier #6: Using clip.exe in cmd.exe to copy somehting into the clipboard
clip.exe
, that can be used to quickly copy something into the clipboard from cmd.exe
.
For example, if I wanted to copy the current working directory into the clipboard, I'd go
Similarly, if I needed to copy all files within the current directory, I'd do
Also, I can copy the content of a file into the clipboard like so:
Friday, December 12, 2014
Paginating SQL queries with Oracle 12c
TOP N select queries with Oracle 12c
Here's a table to demonstrate it:
Now, a select statement with fetch first row only
:
Thursday, December 11, 2014
Little things that make live easier #5: Navigation the Windows Registry with Powershell
Monday, December 8, 2014
Little things that make live easier #4: writing colored text in cmd.exe
c:\temp\colors.ps1
):
When executed with something like
It prints