摘要: 深入理解JS this 阮一峰博客链接http://www.ruanyifeng.com/blog/2010/04/using_this_keyword_in_javascript.html this是Javascript语言的一个关键字。 它代表函数运行时,自动生成的一个内部对象,只能在函数内部使 阅读全文
posted @ 2017-11-16 19:18 dragonbird 阅读(833) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-11-15 19:53 dragonbird 阅读(15) 评论(1) 推荐(0) 编辑
摘要: 流程: 爬取的数据处理为列表,包含字典。里面包含中文, 经过json.dumps,保存到json文件中, 发现里面的中文显示未\ue768这样子 查阅资料发现,json.dumps 有一个参数。ensure_ascii =true, 它会将不是ascii字符的转义为json 字符串。 如果是fals 阅读全文
posted @ 2017-11-10 09:52 dragonbird 阅读(1878) 评论(0) 推荐(0) 编辑
摘要: 链接: https://gist.github.com/yhben/5202572 阅读全文
posted @ 2017-10-24 21:36 dragonbird 阅读(107) 评论(0) 推荐(0) 编辑
摘要: python singleton design pattern decorate baseclass metaclass import module super() 一、A decorator 当用MyClass() 去创建一个对象时这个对象将会是单例的。MyClass 本身已经是一个函数。不是一个 阅读全文
posted @ 2017-10-23 16:39 dragonbird 阅读(180) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-10-21 12:21 dragonbird 阅读(3) 评论(0) 推荐(0) 编辑
摘要: Function function namespace mechanism When you call a function, itgets a private namespace where its local variables are created. When the function re 阅读全文
posted @ 2017-10-21 11:54 dragonbird 阅读(171) 评论(0) 推荐(0) 编辑
摘要: docker 是什么? 官方链接https://docs.docker.com/engine/docker-overview/ 利用docker ,能为我们做什么? 理解image, container, 安装docker 使用docker 的几条常用命令 docker 是一种容器管理工具 把业务代 阅读全文
posted @ 2017-10-21 11:42 dragonbird 阅读(125) 评论(0) 推荐(0) 编辑
摘要: python 3字符编码 官方链接:http://legacy.python.org/dev/peps/pep-0263/ 在Python2中默认是ascii编码,Python3是utf-8编码 在python 的源代码文件中经常会看到: 阅读全文
posted @ 2017-10-18 15:03 dragonbird 阅读(280) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-09-20 17:48 dragonbird 阅读(6) 评论(0) 推荐(0) 编辑