上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 23 下一页
摘要: pgrep mongodps -p 1337 -o comm=复制文件或文件夹:cp file foldercp -rf folder foldervim全选:ggVG"+yddd删除当前行set sub="C:\Program Files\Sublime Text 3\sublime_text.e... 阅读全文
posted @ 2015-12-14 00:55 LisPythoniC 阅读(145) 评论(0) 推荐(0) 编辑
摘要: sudo apt-get install python-psycopg2sudo apt-get install postgresqlsudo su - postgres createuser --superuser examdatabaseuserpsql\password examdatabas... 阅读全文
posted @ 2015-07-13 17:28 LisPythoniC 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Sub 宏1()'' 宏1 宏'' With Selection.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, For... 阅读全文
posted @ 2015-06-10 09:12 LisPythoniC 阅读(1081) 评论(0) 推荐(0) 编辑
摘要: 仅包含__get__的,是non-data descriptor, 如果实例__dict__包含同名变量, 则实例优先; 如果还包含__set__, 则是data descriptor, 优先于实例__dict__同名变量.class c: passclass a: def __init... 阅读全文
posted @ 2015-05-25 00:17 LisPythoniC 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 今天来__next__和send, 改天来throw和closeclass A: def __setattr__(self, key, val): print('set %s to %s'%(key, val)) self.__dict__[key] = valde... 阅读全文
posted @ 2015-05-24 00:55 LisPythoniC 阅读(203) 评论(0) 推荐(0) 编辑
摘要: class A: def __init__(self, name): self.name = name def __get__(self, ins, cls): print('call get') if ins is None: ... 阅读全文
posted @ 2015-05-19 08:40 LisPythoniC 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Sub Sample() Dim sfzs As New Collection Dim ws, wbs, dbs As Worksheet Dim r As Long Set ws = ThisWorkbook.Sheets("Sheet 1") Set wbs... 阅读全文
posted @ 2015-03-28 15:52 LisPythoniC 阅读(824) 评论(0) 推荐(0) 编辑
摘要: 默认的Racket是要对函数参数进行求值的, 例如(f 1 (+ 1 2))里面,(+ 1 2)要先求值为3,变为(f 1 3)再进行下一步操作.因此, Racket若按照SICP使用define关键字来定义延时计算的关键函数delay和cons-stream是不可行的, 需要用宏来定义,绕过求值.... 阅读全文
posted @ 2014-08-22 22:37 LisPythoniC 阅读(1130) 评论(0) 推荐(0) 编辑
摘要: (define (range n) (define (recur n) (if (= n -1) '() (cons n (recur (- n 1))))) (recur (- n 1)))(define (flatten a)... 阅读全文
posted @ 2014-08-12 14:09 LisPythoniC 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 看sicp看到8皇后谜题, 突然兴致来了,尝试独立解决(scheme代码的好处在于,即使你瞟了眼答案, 也不会有任何收获, 除了知道那儿有一坨神秘的括号和英文字符外但Python代码就不同了),成功了,而且还是N皇后算法(把N个皇后放到N*N正方形方格中有多少种方法, N为自然数).最简单的情况是,... 阅读全文
posted @ 2014-08-11 15:46 LisPythoniC 阅读(471) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 23 下一页