JSF 2.x Conditional error messages

To conditionally show a Twitter Bootstrap styled DIV with a list of error messages, use the rendered property on panelGroup to check whether messageList has messages to be displayed, and if so, render the enclosed content.

layout=”block” displays the output as a DIV, and row is one of the Bootstrap classes for row display.

<div class="span12 alert alert-danger"></div>

Set messages to display from your Backing Bean with:

FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("your message");

Cross-compiling ASM using Eclipse on Windows for ARM on the Raspberry Pi

Wow. Let me start by saying getting the right combination of tools setup to do this took more time than learning and writing my first few lines of ARM assembly.

Each of the links below has install and config instructions, so I’m not going to cover all of these again here, but here’s the combination of tools that worked for me:

An alternative toolchain could be the GNU Tools for ARM Embedded, but I couldn’t get my (simple) assembly to compile without unfathomable errors using this one (I tried this first before I tried the Sorcery toolchain).

Compiling and linking ASM on the Pi

Couple of quick notes as a reminder. I’ll come back with some further notes of using a cross-compiler tool chain with Eclipse C/C++ when I have time:

Compile to object code:

as example.s -o example.o

Link to an executable:

ld -o example example.o

Writing Raspberry Pi disk images to SD cards on the Mac

Just as the dd command can be used to create a disk image of an SD card on the Mac (see here), you can use dd to write a downloaded (or backup) disk image to an SD card too:

sudo dd of=/dev/rdiskx if=/path/to/image bs=1m

where x is the disk number as shown by diskutils list.