Git notes (2): Checking out a branch

Continuing from other notes here.

To checkout a branch:

Clone a repo:

git clone user@server:reponame.git

Fetch all branches:

git fetch remote_name

List all available branches:

git branch -v -a

Checkout required branch:

git checkout -b branch_name remote_name/branch_name

Fetch all changes on branch:

git fetch

 

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