Knowledge Dump

Programming

This page contains articles about programming, some code snippets and small applications. The focus lies on the languages C++, R, and Python.


C++

Notes

C++ Basics 2 Custom Data Types, Memory Allocation, Exceptions and exception handlers, Return Value Optimization.
Classes class/struct, public/protected/private, Constructors and Destructors, Inheritance, Operator Overloads, Templates and union.
Strings String literals, Character arrays vs. string class, C and C++ string headers.
Functions Syntax, Call by value vs. call by reference, Overloading, Templates and inline functions.
C++ Basics General info, Fundamental Data Types, Operators, (Control) Statements, Arrays, Pointers and Namespaces.

Qt Applications

HTML Checker Application for detecting faulty HTML tags.
Text Converter Small convenience app that converts words in a text, according to a specified pattern.

C++17 Code snippets

fermat_test Function that runs a Fermat primality test.
modular_exp Power function with modulo, using exponentiation by squaring to reduce integer overflows.
measuring_error Implements a rudimentary class for numeric values with measuring error.
inheritance_zoo Illustration of inheritance for classes in C++, with a virtual zoo.
filter_string Searches a .txt file for a term and writes all lines containing it to a new one.
add_line_numbers Simple function that adds line numbering to .txt files.

R

R analyses

Volatility Analysis Testing methods for volatility analysis, using data of the german stock index DAX from 2010-2016.
faithful An analysis of the faithful geyser data set from the R library datasets.
hills Basic analysis of the hills data set from the R library MASS, applying linear regression models.

Python

Python snippets

image_classification Training a simple convolutional neural network on the CIFAR-10 dataset for an image classification problem.
maximum_segments Setting up and solving the problem of picking a combination of non-overlapping segments, which cover the largest possible area.
random_shape_generation Script for creating a batch of images with a randomly placed shape.