Sample codes in the bachelor thesis.