2012年4月6日
摘要: Designing command-line interfacesuse it as a checklist. 阅读全文
posted @ 2012-04-06 20:48 lbsx 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Design PrinciplesThe Principles of OODSOLID:Single Responsibility PrincipleOpen – Closed PrincipleLiscov Substitution PrincipleInterface Segregation PrincipleDependency Inversion Principle 阅读全文
posted @ 2012-04-06 19:59 lbsx 阅读(131) 评论(0) 推荐(0) 编辑
  2012年3月31日
摘要: ~/.fonts.conf<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd"><fontconfig> <match target="pattern"> <test qual="any" name="family"> <string>sans-serif</string> </test> <edit name="fa 阅读全文
posted @ 2012-03-31 16:49 lbsx 阅读(624) 评论(0) 推荐(0) 编辑
  2012年3月26日
摘要: what port is used by which program$ lsof -iTCP:80list files opened by specific process$ lsof -p 351Linux / UNIX: List Open Files for Process 阅读全文
posted @ 2012-03-26 19:36 lbsx 阅读(192) 评论(0) 推荐(0) 编辑
  2012年3月5日
摘要: 1. You need to double-escape ("\\") regexp metacharacters in strings in elisp code, but you single-escape them when entering regexps at the minibuffer.Double Backslash in Lisp Code:In a lisp regex function that takes a regex string (e.g. search-forward-regexp), you will need to use double 阅读全文
posted @ 2012-03-05 14:03 lbsx 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Emacs: Filtered Buffer Switching(defvar my-always-show-regexps '("\\*\\(scratch\\|info\\|grep\\|compilation\\)\\*") "*Buffer regexps to always show when buffer switching.")(defvar my-never-show-regexps '("^\\s-" "^\\*" "TAGS$") "*Buffer 阅读全文
posted @ 2012-03-05 13:59 lbsx 阅读(228) 评论(0) 推荐(0) 编辑
  2012年3月2日
摘要: .bashrc:if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w$(__git_ps1 " (%s)")\[\033[00m\]\$ 'else PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(__git_ps1 " (%s)")\$ 'fiexport G 阅读全文
posted @ 2012-03-02 18:01 lbsx 阅读(451) 评论(0) 推荐(0) 编辑
  2012年2月27日
摘要: http://www.gnu.org/software/grub/manual/html_node/Block-list-syntax.html11.3 How to specify block listsA block list is used for specifying a file that doesn't appear in the filesystem, like a chainloader. The syntax is[offset]+length[,[offset]+length].... Here is an example: 0+100,200+1,300+300T 阅读全文
posted @ 2012-02-27 11:27 lbsx 阅读(588) 评论(0) 推荐(0) 编辑
  2012年2月24日
摘要: from apue7.6. Memory Layout of a C ProgramA typical memory representation of C program consists of following sections.1. Text segment2. Initialized data segment 2.1 initialized read-only area 2.2 initialized read-write area3. Uninitialized data segment4. Heap5.StackReadMemory Layout of C Programsf.. 阅读全文
posted @ 2012-02-24 14:46 lbsx 阅读(383) 评论(0) 推荐(0) 编辑
  2011年12月25日
摘要: IEEE Standard 754 Floating Point NumbersComparing floating point numbersa tool:IEEE-754 AnalysisFloat Values (b = bias)SignExponent (e)Fraction (f)Value000..0000..00+0000..0000..01:11..11Positive Denormalized Real 0.f × 2(-b+1)000..01:11..10XX..XXPositive Normalized Real 1.f × 2(e-b)011..1 阅读全文
posted @ 2011-12-25 19:58 lbsx 阅读(219) 评论(0) 推荐(0) 编辑