原创 Vim常用技巧總結2

我的主力博客:半畝方塘 1、 在光標所在行查找字符在普通模式下用 f{char} 命令,光標會移動到該字符所在的位置,向下重複查找在普通模式下用 ;,向上回退查找用 , 2、 在光標所在行查找與替換在普通模式下用 :s/target

原创 Vim常用技巧總結1

我的主力博客:半畝方塘 1、 重複上次的操作在普通模式下用 . 命令 2、 取消上次的操作在普通模式下用 u 命令 3、 整行刪除在普通模式下用 dd 命令,此命令在刪除行後 不進入插入模式 4、 整行刪除在普通模式下用 S 命

原创 Why is celsius = 5 * (fahr - 32) / 9 ?

我的主力博客:半畝方塘 There is a program to print Fahrenheit-Celsius table as below. #include <stdio.h> /* print Fahrenheit-C

原创 C++ 類知識部分小結

參見我的思維導圖: 我的思維導圖 pdf 版本:http://vdisk.weibo.com/s/awe79734YmL3I

原创 處理字符串的字符數組和字符指針

我的主力博客:半畝方塘 我們知道,字符數組和字符指針都可以用來處理字符串,例如下面的兩條語句都是正確的: char *p = "abc"; char a[4] = "abc";第二行代碼大家都知道是正確的,下面我主要來解釋一下第一行代

原创 Swift 筆記(十)

我的主力博客:半畝方塘 Dictionaries 1、A dictionary is an unordered collection of pairs, where each pair is comprised of a keyan

原创 Swift 筆記(七)

我的主力博客:半畝方塘 Optionals 1、Optionals are Swift's solution to the problem of representing both a value and the abse

原创 Swift 筆記(八)

我的主力博客:半畝方塘 Arrays 1、You can declare an array either explicitly or taking advantage of Swift's type inference.

原创 Vim 開發環境配置

詳情見我的主力博客:其葉湑湑

原创 Why do we use n = 16 * n + hexdigit

我的主力博客:半畝方塘 There is a program to convert a string of hexadecimal digits into its equivalent integer value as below.

原创 二叉樹的層序遍歷

我的主力博客:半畝方塘 層序遍歷二叉樹需要用到隊列的先進先出的特性,這裏的二叉樹採用二叉鏈接表示法,隊列是採用順序存儲結構的循環隊列,按照前序遍歷建立二叉樹,利用隊列層序遍歷二叉樹的主要過程如下: 將二叉樹的根結點的指針入隊列 若隊

原创 Swift 筆記(六)

我的主力博客:半畝方塘 Closures 1、Closures are functions without names. Here's a declaration for a varible that can hold a c

原创 Mac 下安裝 MySQL 以及 Oracle SQL Developer 連接本地 MySQL

我的主力博客:半畝方塘 見我的主力博客:Mac下安裝MySQL以及Oracle SQL Developer連接本地MySQL

原创 Swift筆記(一)

我的主力博客:半畝方塘 1、In Swift, you can optionally use underscores to make larger numbers more human-readable. The quantity an

原创 Swift 筆記(九)

我的主力博客:半畝方塘 Randomizing an array The function below returns a random number between 0 and the given argument: impo