CoolMind


If you cannot measure it, you cannot improve it.

Construct the Rectangle

This problem is a typical use case of double pointer in an array. Like in a sorted array, find two elements who sum to a target number. This proble...

Pointer to pointer

For List related problem, we usually will not use the recursive way to solve it. For binary search tree, we might use it. In this blog, I just want...

Integer overflow

In the world of data types, each type has its own range. Overflow can happen when you do math on them. For example if you add one to the largest po...

CMake and Google benchmark

In this blog, I will introduce how we can make vim work with a CMake Project. Background Hands on Notes Results Reference Background ...

PyTorch slow inference

Our online systems support PyTorch inference. It is very slow recently. Previously there were not so many jobs running, so the CPU usage was low, b...

Arrays and dict in bash

Most languages will have builtin data structures such as array(list) or dict(hashtable). Is it interesting that whether bash has similar choices? ...

Build a menubar macos App using PyQt5 and PyInstaller

PyQt is a python package that can be used to develop GUI applications even complex applications. In this blog, we will develop a menubar note appli...

Partially render in Jinja

A Jinja template can be rendered. Sometimes the data we need can not be collected in just one place. It will be helpful if we can render a template...