Code snippets which I have gathered from tutorials, books and the like.