Integrating Sparkle 2 for Auto-Updates in macOS Apps
Adding auto-update functionality to a macOS application distributed outside the Mac App Store is essential. Sparkle has long been the gold standard for this. In this post, we’ll...

Deep Dive into DNS: Architecture, Hijacks, and Timeouts
A practical deep dive into DNS resolution, local resolver behavior, DDNS hijacks, DNS amplification, and cloud DNS timeout troubleshooting.

Trading Basics: Stocks, Options, and Technical Analysis
Welcome to our beginner-friendly guide to understanding the stock market! If you’re looking to start your trading journey, it’s essential to understand the basics of analyzing a...

Some ML Basic Concepts: Attention, Parallelism, and Architecture
In this post, we’ll dive into some fundamental and advanced concepts in modern Machine Learning, particularly focusing on Large Language Models (LLMs). We’ll explore the core me...

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.

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 to demonstrate that we can us...

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 positive int32 number, you will ...

CMake and Google benchmark
In this blog, I will introduce how we can make vim work with a CMake Project.

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, but the inference procedure fin...

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 application and package it using py...

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 multiple times.

Linux split
Linux 中有很多易用的命令行工具。split 就是其中之一。介绍实际中使用的几个比较常用的分割文件的方法。

std::transform not working with std::toupper
ctype 中定义了一些比较实用的函数,例如 toupper, tolower, isalpha 等等。在 C++ 中如何实用这些函数呢?使用 cctype,然后就可以在 std 的命名空间中使用这些函数。

python pickle
torch.save 和 torch.load 默认使用的 pickle 模块进行序列化和反序列化。在调用 torch.load 时偶尔会遇到缺失类的问题。这篇文章仔细分析了 pickle 的源码,并且对于 缺失类也提供了一些解决方案。

Python Jinja2
Jinja2 is a fast, expressive, extensible templating engine. This blog records the problems or requirements I met during my development.

How tornado starts?
项目中的服务使用 tornado 来搭建,但是对于 tornado 如何启动还没有仔细研究过。 在某次问题排查时,仔细研究了 tornado 是如何启动的。

Kubernetes python package
在项目中使用比较多的 kubernetes。主要使用相应的 python kubernetes 库包来进行各种部署的管理。 国内很多讲解 kubernetes 原理,但是对于这个库各种使用看起来比较少。

iptables in linux
An email sent from bwg told me that my service had been banned due to a DDoS attack.

logger.debug causes performance issues
A logger is preferred in a formal project, because we can set different levels for different loggers, redirect log messages to files (even to remote servers), specify a unified ...
