CoolMind


If you cannot measure it, you cannot improve it.

Python contextlib

There are some resources we need to release when we finish our job. It is easy for us to forget those operations. Python has a keyword with which c...

Move subdirectory of a git repository and keep commit message

How to extract a subdirectory of a git repository and keep its commit message? If we directly move everything and add them again, we will lose all ...

Common functions implemented using STL

Introduction Count lines String trim Convert case Split and Join strings Filter Map Reduce Introduction STL provides a lot of u...

SuperTAB and YouCompleteMe compatibility

SuperTAB YouCompleteMe Problems SuperTAB SuperTAB Github YouCompleteMe YouCompleteMe Github Problems StackExchange SuperTAB and ...

Generate random numbers in C++

Some times we need a random number for sort or as the input of our program. Previously we can use rand() to generate. Since c++ 11, we have a new w...

setup.py in Python

When we create a python package, we will distribute it. There are a couple of ways to achieve this purpose: by source code by whl by upload...

operator module in Python

Introduction Common operator Relation Bit operations Elements and attributes Other Examples Introduction Python’s operator module...

std::ofstream in cpp

Introduction A simple example Common interfaces Open & close Write data Position Control output formats ...