原创 What does "Vanilla" mean ?

Generally speaking, we say something is Vanilla when it’s as “pure” as its producer did in computing world. (The te

原创 ubuntu 全局使用Emacs keybindings

在OSX下使用Ctrl-a,e,f,b,p,n習慣了,Windows下可以使用xkeymacs進行比較好的解決。現在換成ubuntu了卻有了很多不便。 ubuntu 下可以安裝gnome-tweak-tool有效地切換到emac

原创 使用Emacs發送郵件

個人感覺發郵件還是需要效率的,用Emacs來發郵件感覺效率槓槓的,比如想要發送一篇論文給好友等諸如此類的情況。 倒騰了一下,這裏以smtp的qq服務器爲例,配置如下 (setq send-mail-function (quo

原创 LeetCode Find All Numbers Disappeared in an Array

Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear onc

原创 LeetCode Total Hamming Distance

The Hamming distance between two integers is the number of positions at which the corresponding bits are different.

原创 OSX下brew cask install 本地安裝pkg,dmg

本來用brew cask 安裝東西很爽了,但是今天遇到要安裝mactex,這個2.5G的大軟件 而brew cask install太慢了!!!搭建國內源感覺不靠譜的樣子,好像問題亂七八糟的,怕以後維護起來麻煩不斷。 所以想起來本地安裝迅

原创 Spacemacs 如何在指定工程下刪除所有以fprintf開頭的行?

在Emacs-china論壇中,有網友問如題所示的問題。 其實這樣的需求在真實項目中卻遇到的不少,比如需要上線運行,需要刪除所有類似的輸出語句。 我使用helm-ag做的,搜索工程下的所有fprintf開頭的行,然後對搜索結果進行C-c

原创 LeetCode Fizz Buzz

Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should

原创 LeetCode Next Greater Element I

You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all

原创 LeetCode Number Complement

Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary r

原创 LeetCode Max Consecutive Ones

Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Ou

原创 ubuntu 16.04 安裝hp 掃描打印一體機

Linux下一般使用sane做爲掃描儀後端,安裝如下: sudo apt-get install sane sane-utils xsane kirchhoff@kirchhoff-dell:~/Downloads$

原创 LeetCode Hamming Distance

The Hamming distance between two integers is the number of positions at which the corresponding bits are different.

原创 LeetCode Find the Difference

Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string

原创 LeetCode Island Perimeter

You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid