https://www.gravatar.com/avatar/8e10df0bad4c56b3464cd715f8d96c46?s=240&d=mp

安装完Ubuntu后需要做的事

我会安装的工具

开发相关

  • g++,必须的,C++编译器
  • clang,据说是比gcc更好用的编译器,emacs的一些补全工具会用这个做后端
  • emacs,编辑器之神,谁用谁知道,入门门槛稍微高了一点,我现在还是菜鸟hoho
  • git,连接github开源代码
  • vim,自从加入emacs阵营后,这个就用的少了
  • subversion,公司代码还是用svn管理
  • cmake,使用cmake自动生成Makefile,编译工程很方便
  • global,emacs里面用来生成GTAGS,利于阅读代码
  • meld,文件比较工具,支持整个目录的比较,以及版本控制系统,比如svn,git
  • git cola,一个非常好用的git客户端工具
  • LiteIDE,Go语言IDE
  • CLion,JetBrains出品的C++IDE,很少用,最大的缺点耗内存,其他功能都不错
  • curl,命令行抓取工具
  • CodeBlocks,C++IDE,公司目前用的,比较少用,只用来编译发布。下面的操作安装最新的16.01版本。
sudo add-apt-repository ppa:damien-moore/codeblocks-stable
sudo apt-get update
sudo apt-get install codeblocks

日常使用

第17章 特殊的库设施

17.1 tuple类型

tuple是一个类似pair的模板。每一个pair类型有2个不同类型的成员。一个tuple同样有不同类型的成员,但是它可以有任意数量的成员。tuple类型定义在tuple头文件。

Asio.Cookbook 第2章 IO操作

介绍

IO操作是任何分布式应用的网络基础设施的关键操作。它们直接参与数据交换的过程。输入操作用来接收数据,输出操作用来发送数据。

IO缓冲区

网络编程都是关于通过计算机网络进行进程间通信。像其他类型的IO操作一样,网络IO操作涉及使用内存缓冲区。

Asio.Cookbook 第1章 基础

介绍

TCP协议是具有下列特性的传输层协议:

  • 它是可靠的。这意味着TCP协议保证报文以正确的顺序传输,或者通知报文没有传输成功。TCP协议包含错误处理机制。
  • 它假定建立逻辑连接。在一个程序通过TCP协议与另一个程序通信之前,它必须根据标准通过交换服务报文建立一个逻辑连接。
  • 它假定点对点通信模型。也就是在单个连接上只有两个程序可以通信,不支持多播消息。
  • 它是面向数据流的。这意味着一个程序发送给另一个程序的数据会被TCP协议解释为字节流。

UDP协议是一个与TCP协议不同的传输层协议,它具有下列特性:

MySQL Cookbook 第5章 处理字符串

5.0. Introduction

  • A string can be binary or nonbinary. Binary strings are used for raw data such as images, music files, or encrypted values. Nonbinary strings are used for character data such as text and are associated with a character set and collation (sort order).
  • A character set determines which characters are legal in a string. You can choose collations according to whether you need comparisons to be case sensitive or case insensitive, or to use the rules of a particular language.
  • Data types for binary strings are BINARY, VARBINARY, and BLOB. Data types for nonbinary strings are CHAR, VARCHAR, and TEXT, each of which permits CHARACTER SET and COLLATE attributes.
  • You can convert a binary string to a nonbinary string and vice versa, or convert a nonbinary string from one character set or collation to another.
  • You can use a string in its entirety or extract substrings from it. Strings can be combined with other strings.
  • You can apply pattern-matching operations to strings.
  • Full-text searching is available for efficient queries on large collections of text.

5.1. String Properties

One string property is whether it is binary or nonbinary: