How load average is calculated?
Friday, June 30th, 2006Have you ever wondered how load average on Unix is defined?
Have you ever wondered how load average on Unix is defined?
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.
Writing my own perl program and defining INPUT_RECORD_SEPARATOR ($/)
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).
Using pcregrep!
I chose the last solution as it is the simplest one:
pcregrep -Mi 'alert\s+processing\s+system' <file>
IT WORKS!
Two cool blogs about life hacking, productivity, cook gadgets and the like – a must have for a geek like me: http://www.43folders.com, http://www.lifehacker.com
A cool article on mistakes made in Xbox. Talks a lot about building (in)secure hardware/software systems (may be useful when looking at the TPM stuff).
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 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}