TIL – Today I learned

20190404:
How to reset the state of the filesystem of the git-repo to “just like after checkout”: $ git clean -xfd

20190401:
QtCreator: Alt+Enter on a member opens the context-menu for refactoring (“Create Setter/Getter functions”). Better this than RMB + clicks for each member.

20190401:
Parsing XML files with Qt/C++: QXmlQuery was not my way to go – QDomDocument/QDomNodeList and QDomElement were my friends. Example: read node P and put as double into a QVariant.
QDomElement const elemP = node.firstChildElement("P");
QVariant vP = elemP.text().toDouble();

20190214:
C++ has (now) a quite nice way to determine the supported number of threads: std::thread::hardware_concurrency();
See: https://en.cppreference.com/w/cpp/thread/thread/hardware_concurrency

20190207:
Experienced first time in QtCreator “FTH: (15020): *** Fault tolerant heap shim applied to current process. This is usually due to previous crashes. ***”
Better explanation than I could provide here: https://forum.qt.io/topic/94341/fault-tolerant-heap-shim-error

20190129:
There is a map where you can check where which SSID (wifi identifier) was found: https://wigle.net/

20180920:
Visual Studio 2013 (at least) has an integrated ico-file-editor which is quite convenient for painting application-symbols. Integrating it to some qmake-project (Cullendula) was simple.

20180918:
* C plus equal: the feminist version of C++. Not sure if this is nice, obscure or a joke? I had some good laughs while reading the manual and the examples. https://github.com/TheFeministSoftwareFoundation/C-plus-Equality

20180917:
* github.io – and how to create my own (https://marcelpetrick.github.io/)
* The void operator()() for C++. Nice for iteration of containers.
* boost::accumulators for easier data-collection: nice for min, max, mean, etc.

20180913: Use a lambda-expression for delayed triggering of a function-call.

20180904: the online-installers for Qt5.11 and Visual Studio 2017 Community Editon will download 18 GiByte during installation :’)

20180903: how to configure and use cmake for an originally qmake-based project. And even the linking works now. More later 🙂

20180826: std-lib has some pretty nice random-number-generators (Mersenne-twister), which can be seeded properly with system-time:

20180824: Lambda-expressions in Qt-slots are quite nice for “one liner”-functions. Saves much space.