摘要:
session和cookie的关系 知识准备 1. 通过给定字符串,如何实例化一个对象出来? 或者 rest_framework/setting.py from django.utils.module_loading import import_string 2. 面向对象里的 __setitem_ 阅读全文
摘要:
Tornado简介 Tornado有自己的socket(异步非阻塞,原生支持WebSocket),Django没有。 Tornado的模板语言更接近Python风格,比Django要好理解。 Demo示例 Tornado路由系统以及通过别名反向生成url 种子管理系统 路由系统 多种方式实现登录验证 阅读全文
摘要:
crontab shell 阅读全文
摘要:
定时push+告警 阅读全文
摘要:
Web框架的本质是什么? 对于所有的Web应用,本质上其实就是一个socket服务端,用户的浏览器其实就是一个socket客户端。 参考:http://www.cnblogs.com/wupeiqi/articles/5237672.html wsgi是什么? Web Server Gateway 阅读全文
摘要:
写在前面 之前在windows上写代码逻辑、搞前端等花了很长时间,跑通之后一直没往centos上部署, 昨天尝试部署下,结果发现静态文件找不到 =='' 由于写了2个组件: - arya model的增删改查,模拟django admin - rbac 基于角色的访问控制 并且每个组件下都有自己的静 阅读全文
摘要:
bw_agent.py bandwidth_watch.py 从接口获取数据,在终端上实时显示,在原位置刷新 阅读全文
摘要:
https://stackoverflow.com/questions/1052589/how-can-i-parse-the-output-of-proc-net-dev-into-keyvalue-pairs-per-interface-u https://www.ibm.com/develop 阅读全文
摘要:
查看swap被占用的情况 使用: 查看指定进程的swap占用情况 使用: 阅读全文
摘要:
2017-12-18 @后厂 int(M): M indicates the maximum display width for integer types. 原来,在 int(M) 中,M 的值跟 int(M) 所占多少存储空间并无任何关系。 int(3)、int(4)、int(8) 在磁盘上都是 阅读全文