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 problem asks for the multiplication. Actually I was thi...
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 problem asks for the multiplication. Actually I was thi...
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 to demonstrate that we can use recursive function...
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 positive int32 number, you will get an overflow erro...
In this blog, I will introduce how we can make vim work with a CMake Project. Background Hands on Notes Results Reference Background I was playing with cpp snippets today. I need to ...
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, but the inference procedure finished quickly. B...
Most languages will have builtin data structures such as array(list) or dict(hashtable). Is it interesting that whether bash has similar choices? Dict/Hashtable Create and access ...
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 application and package it using pyinstaller. Final...
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 multiple times. By default, a Jinja template can...
Linux 中有很多易用的命令行工具。split 就是其中之一。介绍实际中使用的几个比较常用的分割文件的方法。 按照固定行切分 自动切分行 切分文件的方式 Reference Macos 中的 split 命令和 linux 行为不太一致。 按照固定行切分 split -a 4 -l 1234 -d file.txt prefix_ -a 使用后缀的长度...
ctype 中定义了一些比较实用的函数,例如 toupper, tolower, isalpha 等等。在 C++ 中如何实用这些函数呢?使用 cctype,然后就可以在 std 的命名空间中使用这些函数。 背景 问题 解决方案 刨根问题 toupper 定义冲突 Argument Dependent Loop or Koenig look...