上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页

2014年3月18日

摘要: Open emacs24;Change CWD to parent folder of project home: M-x cd ~/docs/tmp;Build a leiningen project: M-! lein new calc-cov (see Run Shell Command in Emacs for other method to run shell command in em... 阅读全文
posted @ 2014-03-18 08:12 leechau 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 下面的代码基于NFA算法实现了在多段字符串中匹配正则表达式,对比NFA算法可以看到它将pc由局部变量提升为类成员,以保存中间匹配状态,另外在匹配成功后将pc恢复到null状态。实际使用中,此类还应该增加一个"reset"方法,将pc值置为null,以便用户可以显式要求重新开始匹配。public class MultiSegmentNFA { private final Digraph G; /... 阅读全文
posted @ 2014-03-18 08:12 leechau 阅读(231) 评论(0) 推荐(0) 编辑
摘要: You frequently visit host 10.0.7.141 for example. It's a waste to type "ssh gcp@10.0.7.141" every time you connect it. So you can create a file ~/.ssh/config, and add follow lines to it:Host 141Hostna... 阅读全文
posted @ 2014-03-18 08:12 leechau 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 以下脚本连接上我的Gmail帐号,将收件箱中2013年1月份的新语丝邮件的附件保存在当前目录的xys文件夹中。import imaplibimport emailimport osdir_name = 'archive'if not os.path.exists(dir_name): os.mkdir(dir_name)save_path = os.path.join(os.getcwd()... 阅读全文
posted @ 2014-03-18 08:12 leechau 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 获取源码包"Algorithm in Nutshell"的源码包ADK-1.0.zip在这本书主页上"Download Example Code"页面的Releases目录中。构建源码构建ADK需要JDK6或者7,且源代码的文件编码为UTF-8,在Windows下编译失败,在47上写了一个脚本:#!/bin/sh JAVA_HOME=/opt/jdk1.6.0_35 PATH=$JAVA_HO... 阅读全文
posted @ 2014-03-18 08:12 leechau 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 由于制表符的不定长特性,在纯文本显示时经常出现不能对齐的问题,因此一般需要转换为空格,Ultraedit有这个功能,但实际上Notepad2也有这个能力:选中要转换的文字后【Edit->Convert->Untabify Selection】。 阅读全文
posted @ 2014-03-18 08:12 leechau 阅读(496) 评论(0) 推荐(0) 编辑
摘要: Create the following puppet manifest and start VM with vagrant, you get a base production environment.$ pwd/home/chad/docs/vagrant-prj/gcpserver$ cat Vagrantfile|grep -v '^\s*#'VAGRANTFILE_API_VERSION... 阅读全文
posted @ 2014-03-18 08:11 leechau 阅读(275) 评论(0) 推荐(0) 编辑
摘要: Create a public repo on github, you can add README or License files on the master branch, suppose the url is:https://github.com/leetschau/don4.gitGet the private repo:$ git clone https://leechau@bitbu... 阅读全文
posted @ 2014-03-18 08:11 leechau 阅读(110) 评论(0) 推荐(0) 编辑
摘要: set nocompatible execute pathogen#infect() call pathogen#helptags() call pathogen#incubate() imap jk vmap jk " jj is not suitable in visual mode set nobackupset noswapfile colo ron syntax on set in... 阅读全文
posted @ 2014-03-18 08:11 leechau 阅读(155) 评论(0) 推荐(0) 编辑
摘要: For example, we need install "unzip" command on a Ubuntu machine without Internet.On a online computer, google: unzip site:packages.debian.org, download unzip_6.0-8_i386.deb;scp unzip_6.0-8_i386 user@... 阅读全文
posted @ 2014-03-18 08:11 leechau 阅读(148) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页

导航