The Polygene™ SDK comes with several sample applications. This is a very good place to look for code examples and recipes.
The samples are available in the samples/ directory of the Polygene™ SDK.
samples/