Monthly Archives: May 2018

LaTex Cheat-Sheet

Symbole und Zeichen

LaTeX/Page Layout
LaTeX-Kompendium: Für Mathematiker
LaTeX-Kompendium: Sonderzeichen
Liste mathematischer Symbole

Abstände / Leerzeichen

Abstände in LaTex (PDF)


LaTeX-Wörterbuch: Silbentrennung

Mehrspaltige Umgebung

LaTeX-Wörterbuch: multicols
Multiple columns



Unterschiedliche Spaltenbreiten

Different column widths using multicol



Anderes Papierformat


Einfügen externer LaTex Dateien ins aktuelle Dokument

When should I use \input vs. \include?


Schriftart (Font) setzen

LaTeX font size

Zeilenabstand innerhalb eines Ansatzes

baselineskip, Legt den Zeilenabstand innerhalb eines Absatzes fest.

\baselineskip <Abstand>



\linewidth          (number of characters per line) 


Zellen einer Tabelle (array,tabular) zusammenführen (merge)

How to merge columns in a table?

Tabellen Abstände zwischen Zeile/Spalte

How do I change column or row separation in LaTeX tables?
Horizontal Line Separating Steps in Aligned Equation



mdframed – Horizontale Linien

How to create Multilevel Colored Boxes using tcolorbox/any other package?

% \draw[option] (x,y) (w,h)
		\tikz\draw[thick,dashed,gray!60] (0,0) --%

			y' &= C \cdot f'(x)
			y' &= f_1'(x) + f_2'(x)

SVG Einbinden in LaTex

SVG -> PDF mit Inkscape

"C:\Program Files\Inkscape\inkscape.exe"
-z -D

Abstand zwischen Formel und Text

Abstand vor und nach den Gleichungen
Wie stelle ich die Abstände vor und nach abgesetzten Gleichungen bzw. Formeln ein?

\abovedisplayskip      % 10pt plus 2pt minus 5pt
\abovedisplayshortskip % 0pt plus 3pt
\belowdisplayskip      % 10pt plus 2pt minus 5pt
\belowdisplayshortskip % 6pt plus 3pt minus 3pt


Bezeichnungen beim Paket german
Original Übersetzung ggf. Alternativen
\preface Vorwort
\ref Literatur
\abstract Zusammenfassung
\bib Literaturverzeichnis
\chapter Kapitel
\appendix Anhang
\contents Inhaltsverzeichnis Inhalt
\listfigure Abbildungsverzeichnis Abbildungen
\listtable Tabellenverzeichnis Tabellen
\index Index oder Sachregister
\figure Abbildung
\table Tabelle Tafel
\part Teil
\encl Anlage(n) Beilage(n)
\cc Verteiler Kopien an
\headto An
\page Seite
\see siehe
\also siehe auch
\proof Beweis (babel)
\glossary Glossar (babel)



Crash course in Qt for C++ developers, Part 1
Qt für C++-Anfänger




$ qmake

Switch between Qt4 and Qt5

How do I change which version of Qt is used for qmake?

$ qtchooser -list-versions

c$ QT_SELECT=qt4 qmake --version
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory

$ QT_SELECT=qt5 qmake --version
QMake version 3.1
Using Qt version 5.9.1 in /usr/lib/x86_64-linux-gnu


Project ERROR: Unknown module(s) in QT: serialport

$ QT_SELECT=qt5 qmake 
Info: creating stash file /home/andreas/src/Candle/src/.qmake.stash
Project ERROR: Unknown module(s) in QT: serialport

$ sudo apt-get install libqt5serialport5-dev

How to use CMake / CMake HowTo


Debug vs Release in CMAKE
How can I add a flag at the end of the linking command line using CMake?
Cmake target_link_libraries not linking my library
cflags ‘-Wl,-export-dynamic’ vs linker flags ‘-export-dynamic’


Create a CMake Linux project in Visual Studio
Download, install, and set up the Linux workload
Create a Linux MSBuild C++ project in Visual Studio


Henry Schreiner

CMake: Best Practices (PDF)
ISciNumPy (Blog), A random collection of Science, Numerics, C++, CMake, and Python related topics.
An Introduction to Modern CMake (eBook)
HSF – More Modern CMake (Workshop) (Talk), A talk first given for PICSciE
LinkedIn: Henry Schreiner

dmerej’s blog

Let’s Build Chuck Norris! – Part 1: CMake and Ninja
Let’s Build Chuck Norris! – Part 2: SQLite and conan
Let’s Build Chuck Norris! – Part 3: A C wrapper
Let’s Build Chuck Norris! – Part 4: Python and ctypes
Let’s Build Chuck Norris! – Part 5: Python and cffi
LinkedIn: Dimitri Merejkowsky

The Ultimate Guide to Modern CMake
LinkedIn: Rico Huijbers

SCHNEIDE BLOG – Softwareschneiderei GmbH

Modern CMake with target_link_libraries

Flameeyes’s Weblog

Why would an executable export symbols?

Meson Build

  • Meson
  • CMake
  • SCons
  • Premake
  • Autotools

A simple comparison


ARM Stack Frame / Backtrace

ARM: link register and frame pointer
ARM Stack Frame Layout
ARM GCC generated functions prolog
ARM Procedure Call Standard (APCS)
Procedure Call Standard for the ARM Architecture (AAPCS)
On the AAPCS, with an application to efficient parameter passing
ARM to C calling convention, registers to save


Der Stack Frame
Deep Wizardry: Stack Unwinding
What is exactly the base pointer and stack pointer? To what do they point?
What is stack unwinding?
Stack Unwinding in C++, The stack_unwinding is a small header only C++ library which supplies primitive(class unwinding_indicator) to determining when object destructor is called due to stack-unwinding or due to normal scope leaving.


libc Backtraces
How to automatically generate a stacktrace when my gcc C++ program crashes
Backtrace on ARM has repeating entries

libunwind / Call chain

  • allows you to easily walk the stack frames
  • access to the callee-saved registers contents
  • support for resuming execution at a certain frame

The libunwind project
KenWerner/Sandbox/libunwind – Linaro Wiki
Stack frame unwinding on ARM (2011)

#include <libunwind.h>

void show_backtrace (void) {
  unw_cursor_t cursor; unw_context_t uc;
  unw_word_t ip, sp;

  unw_init_local(&cursor, &uc);
  while (unw_step(&cursor) > 0) {
    unw_get_reg(&cursor, UNW_REG_IP, &ip);
    unw_get_reg(&cursor, UNW_REG_SP, &sp);
    printf ("ip = %lx, sp = %lx\n", (long) ip, (long) sp);

libbacktrace, A C library that may be linked into a C/C++ program to produce symbolic backtraces (2018)


Before Android 8.0, crashes were handled by the debuggerd and debuggerd64 daemons. In Android O and later, crash_dump32 and crash_dump64 are spawned as needed.
Debugging Native Android Platform Code
android / platform / system / core / libbacktrace
android / platform / system / core / include / backtrace / backtrace.h/a>
android / platform / system / libbacktrace / Backtrace.cpp
android-aosp-sdcard debuggerd backtrace.c, Rewrite libbacktrace using C++
am 98f87d92: Merge “Rewrite libbacktrace using C++.”

Breakpoint 1, main () at /home/andreas/src/DermoInspectMiniServer/src/tcp_server.cpp:79
79          A();
(gdb) info register pc lr sp fp
pc             0x142824 0x142824 <main()+72>
lr             0x76d7b208       1993847304
sp             0x7efff568       0x7efff568
fp             0x7efff5fc       0x7efff5fc

(gdb) s
A () at /home/andreas/src/DermoInspectMiniServer/src/tcp_server.cpp:72
72              B();
(gdb) info register pc lr sp fp
pc             0x1427d0 0x1427d0 <A()+8>
lr             0x142828 1321000
sp             0x7efff560       0x7efff560
fp             0x7efff564       0x7efff564

(gdb) s
B () at /home/andreas/src/DermoInspectMiniServer/src/tcp_server.cpp:67
67              C();
(gdb) info register pc lr sp fp
pc             0x1427bc 0x1427bc <B()+8>
lr             0x1427d4 1320916
sp             0x7efff558       0x7efff558
fp             0x7efff55c       0x7efff55c

(gdb) s
C () at /home/andreas/src/DermoInspectMiniServer/src/tcp_server.cpp:62
62          MyBacktrace();
(gdb) info register pc lr sp fp
pc             0x1427a8 0x1427a8 <C()+8>
lr             0x1427c0 1320896
sp             0x7efff550       0x7efff550
fp             0x7efff554       0x7efff554

(gdb) s
100         frame = (struct frame*) ctx.uc_mcontext.arm_lr;
102         for (int i = 0; frame && frame->fr_savfp; i++) {
(gdb) info register pc lr sp fp
pc             0x170a74 0x170a74 <MyBacktrace()+32>
lr             0x170a6c 1509996
sp             0x7efff238       0x7efff238
fp             0x7efff54c       0x7efff54c


Getting the call stack without a frame pointer