### cor: a sample correlation game

2 days ago

If you know what sample correlation is, you might enjoy Cor: A Sample Correlation Game, which is available here

Comment

### truecrypt on the BeagleBone Black (Debian)

211 days ago

As I’m using Revision B, I ended up downloading source to a mount point on the sdcard (/mnt/sdcard) as it’s too easy to fill up the 2GB root device otherwise.

export SDCARD=/mnt/sdcard
cd ${SDCARD} wget http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.8.12.tar.gz tar xvfz wxWidgets-2.8.12.tar.gz export WX_HOME=${SDCARD}/wxWidgets-2.8.12/


mkdir ${SDCARD}/pkcs cd${SDCARD}
wget 'ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs*.h'
export PKCS11_INC=${SDCARD}/pkcs  ## Build truecrypt cd${SDCARD}/truecrypt-7.1a-source
make NOGUI=1 WX_ROOT=${WX_HOME} wxbuild make NOGUI=1 WXSTATIC=1  ## Copy the binary to the system sudo cp Main/truecrypt /usr/bin chown bin.bin /usr/bin/truecrypt chmod 0755 /usr/bin/truecrypt  Comment ### MediaWiki and the Case of the Sporadic LaTeX Failure 520 days ago I recently upgraded to MediaWiki 1.21 for my personal wiki, and I was annoyed to see that LaTeX support was removed, though it and MathJax are available as extensions. Once I installed it, I was vexed by sporadic failures in typesetting — texvc would succeed in producing an image about 20% of the time. Eventually, I found out why — the memory limits on the wfShellExec call were set pretty low, and so most of the time it would fail to malloc the memory it needed. Increasing the global default for shell calls in LocalSettings.php fixed this: $wgMaxShellMemory = 402400;

If you’re having the same problem, give it a try.

Comment

### Parsing sentences and words from sentences in java

529 days ago

I think this is worth highlighting, because I’ve seen so many cases where programmers “parse” text using java tools like StringTokenizer or split() with a set of punctuation characters:

java already has a built-in, locale-aware method for getting sentences from text, and words from sentences:

java.text.BreakIterator

Anything you write yourself to parse text will likely miss corner-cases and be un-prepared for other languages.

Since BreakIterator does the job, isn’t difficult to use and has been around jdk 1.2, why not use it?

odd punctuation like this, for example, when reading words.

Comment

### My hashCode() is zero

780 days ago

If you’re curious, here is a larger list of strings that have a hashCode() of 0 in java. (compressed with 7zip)

Comment