Archive for June, 2006

  • Have you ever wondered how [load average](http://nosheep.net/story/defining-unix-load-average/) on Unix is defined? (0)
  • * – a web-based “Flashy” Visio-like drawing program. A bit basic now, but I’m sure it’s getting there. Wonder when they will be bought by … ;-)
    * – Spreadsheets from Google. Again, a bit basic, but quite impressive. (1)

Multi-line matches with regular expressions (pcregrep)

Monday, June 26th, 2006

Proofreading my thesis I had the following problem: Find all occurrences of “alert processing system” (should be “alert-processing system”), which can span over multiple lines.

I found out (thanks Diego!) a number of ways of doing this.

1. Writing my own perl program and defining `INPUT_RECORD_SEPARATOR` (`$/`)

2. Using `agrep`, in which I can use -d ‘delim’ as the separator. The advantage of agrep is that is can also find mispelled words (with a certain editing distance).

3. Using `pcregrep`!

I chose the last solution as it is the simplest one:

pcregrep -Mi ‘alert\s+processing\s+system’

IT WORKS!

  • Two cool blogs about life hacking, productivity, cook gadgets and the like – a must have for a geek like me: , (0)
  • A [cool article](http://www.xbox-linux.org/wiki/17_Mistakes_Microsoft_Made_in_the_Xbox_Security_System) on mistakes made in Xbox. Talks a lot about building (in)secure hardware/software systems (may be useful when looking at the TPM stuff). (0)

Captions in Latex tables

Wednesday, June 7th, 2006

Writing my thesis, I had to create a table with table captions located below the table. Without much thinking I looked at the [Latex bible](http://www.amazon.com/gp/product/0201362996) and read about three ways of doing it.

The solution I chose was to use a package `threeparttable’, which did exactly what I wanted.
Here’s my code:

\usepackage{threeparttable}

\begin{table}[htb]
\centering
\begin{threeparttable}
\caption{Caption.}
\begin{tabulary}{\linewidth}{|L|C|}
\hline a\tnote{a} & b\tnote{b} \\
\hline
\end{tabulary}
\begin{tablenotes}[para]
\scriptsize
\item[a] Footnote a.
\item[b] Footnote b.
\end{tablenotes}
\label{table:ml_requirements}
\end{threeparttable}
\end{table}