根据启动Bash Shell的方式不同,对Shell有两种分类方式
根据Shell的启动方式不同,可以将Shell分为
人人的登录改版后,采用RSA加密后传输密码,该项目用于解决这种情况下人人的模拟登录
使用前先 pip install requests
| from mmap import mmap | |
| def tail(fn, count=10): | |
| with open(fn,'r+') as f: | |
| data = mmap(f.fileno(), 0) | |
| pos = len(data) | |
| for _ in range(count): | |
| pos = data.rfind('\n', 0, pos) | |
| if pos == -1: | |
| pos = 0 | |
| break | 
| "自动缩进 | |
| set autoindent | |
| "类似C语言风格的缩进 | |
| set cindent | |
| "智能缩进:每一行都和前一行有相同的缩进量, | |
| "同时这种缩进形式能正确的识别出花括号,当遇到右花括号(}), | |
| "则取消缩进形式。此外还增加了识别C语言关键字的功能。 | |
| "如果一行是以#开头的(比如宏),那么这种格式将会被特殊对待而不采用缩进格式 | |
| set smartindent | |
| "For Python Programmers | 
| def factorize(n): | |
| '''Adapted from http://www.math.utah.edu/~carlson/notes/python.pdf''' | |
| if n < 2: | |
| return '本函数仅适用于不小于2的正整数' | |
| d = 2 | |
| factors = [] | |
| while not n % d: | |
| factors.append(d) | |
| n /= d | |
| d = 3 | 
| Windows Registry Editor Version 5.00 | |
| [HKEY_CLASSES_ROOT\folder\shell\cmd] | |
| @="CMD快速通道" | |
| [HKEY_CLASSES_ROOT\folder\shell\cmd\command] | |
| @="cmd.exe /k cd %1" | 
| { | |
| "cmd": ["php", "-f", "$file"], | |
| "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
| "selector": "source.php" | |
| } | 
| sudo -i | |
| apt-get install php5-xdebug | |
| vim /etc/php5/conf.d/xdebug.ini | |
| xdebug.remote_enable=On | |
| xdebug.remote_host="localhost" | |
| xdebug.remote_port=9000 | |
| xdebug.remote_handler="dbgp" | |
| :wq | |
| apachectl restart | |
| exit | 
| 18位身份证标准在国家质量技术监督局于1999年7月1日实施的GB11643-1999《公民身份号码》中做了明确规定。 | |
| GB11643-1999《公民身份号码》为GB11643-1989《社会保障号码》的修订版,其中指出将原标准名称“社会保障号码”更名为“公民身份号码”,另外GB11643-1999《公民身份号码》从实施之日起代替GB11643-1989。 | |
| 公民身份号码是特征组合码,由十七位数字本体码和一位校验码组成。排列顺序从左至右依次为:六位数字地址码,八位数字出生日期码,三位数字顺序码和一位校验码。其含义如下: | |
| 1. 地址码:表示编码对象常住户口所在县(市、旗、区)的行政区划代码,按GB/T2260的规定执行。 | |
| 2. 出生日期码:表示编码对象出生的年、月、日,按GB/T7408的规定执行,年、月、日分别用4位、2位、2位数字表示,之间不用分隔符。 | |
| 3. 顺序码:表示在同一地址码所标识的区域范围内,对同年、同月、同日出生的人编定的顺序号,顺序码的奇数分配给男性,偶数分配给女性。 | 
| 如果脚本从管道获取输入,同时需要有输入交互,可以采取以下三种措施: | |
| http://mail.python.org/pipermail/python-list/2000-March/020133.html | |
| * Put the data in a file and pass the name of the file to your | |
| script, then open that file: | |
| lines = open(sys.argv[1]).readlines() | |
| This is probably the nicest solution, and the least prone to making | |
| wierd things happen if your script gets run differently. |