C++ - Polymorphism

简介

多态 是C++语言的一大特色。一个操作随着所传递或捆绑的对象类型的不同能够做出不同的反应,其行为模式称为多态1。而且,仅仅对于对象的指针和引用的间接访问,才会发生多态。

[Read More]

C++ - 标准库

本文是阅读 Professional C++, third edition 中文版1的读书笔记.

[Read More]

Convex Optimization

A mathematical optimization problem can be expressed as \[\begin{aligned} \min & f_0(x) \\ \text{subject to} & f_i(x) \le b_i, \quad i=1, \ldots, m \end{aligned}\] where

[Read More]

DOT

DOT 1 is a language for drawing graphs. It has three main kinds of objects, graph, node and edge. Each object has a variety of attributes. Given a node or edge, its attribute(s) can be set as below respectively

[Read More]

Emacs - Basic Configuration

As is well-known, Emacs is a powerful editor. Due to its infinite customizability and extensibility, in some sense, it is an operation system (OS) rather than an editor. This page briefly introduces how to customize it.

[Read More]

Emacs - CDLaTeX

Introduction

CDLaTeX1 is a minor mode for fast LaTeX environment and macro insertion2. In this sense, its functionalities are very similar to AUCTeX3. What's more, some of its convenience provided are also covered by AUCTeX.

[Read More]

Emacs - CEDET

Introduction

CEDET1 stands for collection of Emacs development environment tools, which is written to make Emacs become a perfect development environment. With the aid of CEDET, a variety of amazing features can be provided, e.g. code completion, browsing, tag jumping, drawing UML diagram, etc.

[Read More]

Emacs - Company

Introduction

Auto-completion is an important functionality in Emacs. It can greatly speed up our editing and programming. Generally speaking, the auto-completion can be divided into two parts, frontend and backend. As their names indicate, the former presents interface, while the latter provides contents. In a nutshell, the backend generates completion contents and feeds them to the frontend; then the frontend presents completion candidates to us for selection.

Up to now, there are a couple of popular frontends, auto-complete1 and company2. The word "company" stands for "complete anything". In fact, their functionalities are very similar. Both of them work well and their developments are fairly active. Both of them come with a variety of built-in backends. What's more, you can customize your own backends for your special requirements.

It should be noticed that each of the both above provides backend for C/C++ programming, e.g. company-clang is a powerful backend based on clang. It enables company completing based on the semantic analysis provided by clang. With the aid of this backend, the programming experience and efficiency can be remarkably improved.

For myself, I have been using company since I began to use Emacs. Therefore, I just summarize the installation and configuration of company in this post.

[Read More]

Emacs - Flycheck

Introduction

Flycheck1 is a on-the-fly syntax checking extension of Emacs, which supports a variety number of programming languages. It greatly facilitates the programming experience.

[Read More]