Code snippets to perform useful functions in different languages