cset for partitioning user and system processes
taskset only allows you to set something called the CPU affinity, meaning you can tell the system to run a certain process on some cores only. However, in or...
taskset only allows you to set something called the CPU affinity, meaning you can tell the system to run a certain process on some cores only. However, in or...
Dug a little deeper into outputting time durations. It turns out that time_point has a default accuracy that is system-implementation-dependent or something....
Use the <chrono> library. std::chrono::high_resolution_clock seems to do the trick. It should be giving me nanosecond resolution, but gives me only mic...
The random-pausing technique.
man rename. It can be used to rename multiple files. Regex and everything.
In order to check errors in python formatting, use pep8 (installed with pip). In order to correct these errors automatically, use autopep8.
In order to format paragraphs in text files or in comments in code, use the par program. It seems to be exactly what I need in many cases.
astyle automatically formats C and C++ code. It has a whole bunch of options that can be customized to get different kinds of output. Personally, I find asty...
man taskset. Lets you set which processor to run a process on.
When using cudaMemcpyToSymbol, you can directly use the name of the variable you are transferring data to. In fact, this is the only way it seems to work. va...
In order to undo a commit, a reset, a merge, or anything involving refs, just take a look at git reflog and reset to the appropriate HEAD@{n}.
In order to undo a git commit --amend, take a look at the git reflog. HEAD@{1} will contain the commit just before the amend (assuming that the amend was mad...
If you want to debug a C or C++ program that has a python frontend, then run python using gdb. Then, inside gdb, use the set args command to set the python s...
Friendship is not inherited. class A { friend class B; }; class B { }; class C : public B { }; => C cannot access private and protected members of A!
Take a look at this link for adding icons to the top menu or the launcher in ubuntu.