摘要: 本文是函数式Ruby编程的学习笔记。 1.Ruby中的迭代方法(如each, map)需要与Block配合使用,那么如何获得Block呢? 直接使用{}或do ... end 将Proc或Method对象转化为Block. &proc_name/&:method_name/&method(:meth 阅读全文
posted @ 2016-10-04 18:37 fosmj 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1.换源 http://blog.csdn.net/qianghaohao/article/details/52331432 2.手动安装 通过git将插件源码下载下来并放到 .atom/packages 目录下 https://atom-china.org/t/atom/1726/2 阅读全文
posted @ 2016-09-25 22:52 fosmj 阅读(10010) 评论(0) 推荐(1) 编辑
摘要: Ref:理解 Linux 的硬链接与软链接 阅读全文
posted @ 2016-03-09 21:01 fosmj 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1.Python2字符编码 #coding:utf-8 ''' 上面的代码将环境编码设置为utf-8,没有上面的代码,将使用环境默认编码,环境默认编码可由sys.getdefaultencoding()获得 ''' s = '中国' #s是utf-8格式的str,因为上面的代码将环境编码设置为utf 阅读全文
posted @ 2016-02-26 20:45 fosmj 阅读(148) 评论(0) 推荐(1) 编辑
摘要: 1.查看创建表的SQL语句 show create table table_name \G; 2.查看表的字段信息 show full columns from table_name; 获取以下信息Field :字段名Type:字段类型Collation:字符集Null :是否可以为NULLKey: 阅读全文
posted @ 2016-02-23 21:11 fosmj 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 1.DefinitionsIterable Object:Iterables include all sequence types (such as list, str, and tuple, which has __getitem__() method) and some non-sequence... 阅读全文
posted @ 2016-01-22 21:47 fosmj 阅读(293) 评论(0) 推荐(0) 编辑
摘要: setTimeout函数delay时间之后执行一次func.setTimeout函数原型:var timeoutID = window.setTimeout(func, [delay, param1, param2, ...]);var timeoutID = window.setTimeout(c... 阅读全文
posted @ 2015-07-14 00:33 fosmj 阅读(518) 评论(0) 推荐(0) 编辑
摘要: 标准库附带了一些可以用来作为模块和作为命令行实用程序模块。Cilck Me!作为命令行实用程序模块的使用方法:python -m module_name parameters 阅读全文
posted @ 2015-07-11 00:29 fosmj 阅读(189) 评论(0) 推荐(0) 编辑
摘要: from flask import Flaskfrom flask.ext.mail import Mail, Messagefrom threading import Threadapp = Flask(__name__)app.config.update(dict( MAIL_SERVER... 阅读全文
posted @ 2015-07-10 16:42 fosmj 阅读(539) 评论(0) 推荐(0) 编辑
摘要: SQL语句:update table_1 set x = (select x from table_2 where table_1.y = table_2.y);如果括号中临时建立的表中元素的个数小于table_1中元素个数或者只想更新table_1中部分x的值,可以在后面加where子句.Exa... 阅读全文
posted @ 2015-07-10 16:21 fosmj 阅读(2583) 评论(0) 推荐(1) 编辑