This snippet shows how to run a callable given as first argument on each following argument.
Recently I came along Brendan D. Gregg’s Homepage who is doing really awesome stuff to find performance bottlenecks. As it does not make sense to repeat everything here from perf_events, probes to flamegraphs. I really recommend to take a look at his work. Some Notes to myself: For stack traces […]
If you have ever asked yourself how to avoid warnings in your c++ projects that are caused by 3rd-party projects like boost “system includes” are the answer. All you need to to is replace the -I flag with -isystem. Of course the CMake offers the same functionality you can use […]
Here is an algorithm that calculates the powerset of a set of elements given in a vector input of length n. A vector bit that will be used to select subsets is created and it’s elements are initialized with 1. Then for each subset size up to n/2 (outer loop) […]