Blog
Thoughts on programming, systems, robotics, and everything in between, sharing what I learn and build.

Install QQ/TIM in Linux with Wine
Note: This post describes a Wine-based workaround from 2017. Tencent now ships an official native Linux client for QQ, rebuilt on the NT architecture and available as deb, rpm, and AppImage packages for both x86-64 and ARM. You should grab the native build from im.qq.com/linuxqq instead; the Wine instructions below are kept only for historical reference. This tutorial introduces how to install QQ/TIM in Linux with Wine, which had been tested on ArchLinux with Wine 2.4.
Single Sign-On with Apereo CAS
This tutorial walks a newcomer through standing up an Apereo CAS server for single sign-on and wiring a Java web application to it as a client. The complete CAS 7.1 server is available as a companion WAR overlay on GitLab. Note: This post has been rewritten for Apereo CAS 7.x. It was originally written for CAS 4.x, which you set up by copying the server source and hand-editing a pile of XML files (deployerConfigContext.xml, ticketGrantingTicketCookieGenerator.xml, …). CAS has changed completely since: the org.jasig.cas packages became org.apereo.cas, and the server is now built as a Spring Boot WAR overlay configured through a single cas.properties file.
Create a Desktop App with Angular 2 and Electron
Last week, I took part in the Google Developer Day held in Beijing. The Angular team introduced their new Angular 2. Angular is a development platform for building mobile and desktop web applications. This tutorial shows how to configure and use Angular 2 web components with the Electron framework for creating native cross-platform applications with web technologies. As recommended by the Angular team, TypeScript will be used throughout this tutorial. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. Any browser. Any host. Any OS. Open-source.
Gradient Boosting Decision Tree
In the previous article, we’ve talked about AdaBoost which combines output of weak learners into a weighted sum that represents the final output of the boosted classifier. If you know little about AdaBoost or additive model, we highly recommend you read the article first. Gradient boosting is a machine learning technique for regression and classification problems, which produces a prediction model in the form of an ensemble of weak prediction models, typically decision trees. It builds the model in a stage-wise fashion like other boosting methods do, and it generalizes them by allowing optimization of an arbitrary differentiable loss function.
AdaBoost
AdaBoost, short for “Adaptive Boosting”, is a machine learning meta-algorithm formulated by Yoav Freund and Robert Schapire who won the Gödel Prize in 2003 for their work. The output of the other learning algorithms (weak learners) is combined into a weighted sum that represents the final output of the boosted classifier. AdaBoost is adaptive in the sense that subsequent weak learners are tweaked in favor of those instances misclassified by previous classifiers. AdaBoost is sensitive to noisy data and outliers and is quite robust to overfitting.
Random Forest
Random forests are an ensemble learning method for classification, regression, and other tasks. They operate by constructing a multitude of decision trees at training time and outputting the class that is the mode of the classes (classification) or the mean prediction (regression) of the individual trees. Each tree is grown on a random subset of the training data and considers only a random subset of the features at each split, so the forest as a whole corrects for a decision tree’s habit of overfitting its training set: when it is time to make a prediction, the trees vote and the majority wins.
Setup Raspbian on Raspberry Pi
This post explains how to install Raspberry Pi OS and set up a Raspberry Pi from scratch. You will need another computer with an SD (or MicroSD) card reader to write the image. Note: This post has been updated for Raspberry Pi OS and Raspberry Pi Imager. Raspbian was renamed Raspberry Pi OS in 2020, and the old “download a .zip, unzip the .img, then flash it with Win32 Disk Imager” routine has been replaced by the official Raspberry Pi Imager, which downloads and writes the image in one step and can pre-configure SSH, Wi-Fi, and your user account before the first boot.
Internet Protocol v6
Internet Protocol version 6 (IPv6) is the current version of the Internet Protocol (IP). The IETF developed it to solve IPv4 address exhaustion, which has since become reality: IANA handed out its last IPv4 blocks in 2011, and the regional registries followed soon after. IPv6 is no longer a future technology but a deployed one, carrying more than 40% of the traffic reaching Google by the mid-2020s. IPv6 uses a 128-bit address, in theory allowing 2128 (about 3.4×1038) addresses, although a number of ranges are reserved or excluded from ordinary use. That is vastly more than the roughly 4.3 billion addresses of 32-bit IPv4. The two protocols are not interoperable on the wire, so hosts generally run both at once (dual stack) during the long transition.