- 姓名*: 李 一
- 性别*: 男
- 出生年份: 1984
- 北大入学/入职年份*: 2006
- 北大所属院系*: 信息科学技术学院
- 北大攻读学位/教职: 计算机科学理学硕士学位毕业
- 来日年份*: 2011
- 在日常住地区*: 江东区 有明/涩谷区 惠比寿
- 工作性质/经历: 互联网软件工程师
- 兴趣爱好: 篮球,音乐,漫画,咖啡
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setting the prefix from C-b to C-a | |
# START:prefix | |
set -g prefix C-a | |
# END:prefix | |
# Free the original Ctrl-b prefix keybinding | |
# START:unbind | |
unbind C-b | |
# END:unbind | |
#setting the delay between prefix and command | |
# START:delay |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pank7-magic.zsh-theme modified from af-magic.zsh-theme | |
# | |
# Author: pank7 | |
# Author: Andy Fleming | |
# URL: http://andyfleming.com/ | |
# Repo: https://github.com/andyfleming/oh-my-zsh | |
# Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme | |
# | |
# Created on: June 19, 2012 | |
# Last modified on: June 20, 2012 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setting the prefix from C-b to C-a | |
# START:prefix | |
set -g prefix C-a | |
# END:prefix | |
# Free the original Ctrl-b prefix keybinding | |
# START:unbind | |
unbind C-b | |
# END:unbind | |
#setting the delay between prefix and command | |
# START:delay |
To use the scheme epgm:// or pgm:// you must configure libzmq 3.x (HEAD) using the --with-pgm.
./configure --with-pgm
./make
./make install
Remember to set you LD_LIBRARY_PATH to the location of the libzmq installation parameter For bash:
export LD_LIBRARY_PATH=/usr/local/lib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Hoge where | |
import Text.Printf | |
import Data.List.Split | |
import Test.HUnit | |
string_calc :: String -> Integer | |
string_calc expr = sum $ map read $ filter (\x -> x /= "") $ splitOn "," expr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(cell_phone_billing). | |
-export([calculate_bill/2, calculate_bill/3]). | |
ceiling(X) -> | |
T = erlang:trunc(X), | |
case (X - T) of | |
Neg when Neg < 0 -> T; | |
Pos when Pos > 0 -> T + 1; | |
_ -> T |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% compile with: | |
% erlc -DTEST stringcalculator.erl | |
% run test with: | |
% erl -noshell -run stringcalculator test | |
-module(stringcalculator). | |
-export([add/1]). | |
add(Expr) when is_binary(Expr) -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env pypy | |
import sys | |
from itertools import imap as map | |
from itertools import ifilter as filter | |
import unittest | |
def add(expr): | |
return sum(map(int, filter(lambda x: x != '', expr.split(',')))) |
NewerOlder