上一页 1 2 3 4 5 6 7 ··· 27 下一页
摘要: 说明 看文档发现一个有趣的应用(利用zip函数) 例如[1, 2, 3, 4] [(1, 2), (3, 4)],拆分成长度为2的数据块 Code 原理: zip( iterables) https://docs.python.org/3/library/functions.html zip 阅读全文
posted @ 2019-08-19 00:03 Rocin 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 定义 在2018年看Flutent python时了解到猴子补丁,知道咋回事,但是现在通过代码更深刻认识猴子补丁。 猴子补丁:在运行时修改类或模块,而不改动源码。 例子1 没有用猴子补丁 结果: 线程一直阻塞,没有输出结果到终端。 例子2 用了猴子补丁 结果显示并没有阻塞: 本质 1. reques 阅读全文
posted @ 2019-08-13 16:27 Rocin 阅读(551) 评论(0) 推荐(0) 编辑
摘要: 问题重现 当查看DRF 文档时发现DRF内置的token是存储在数据库里,这和我在网上搜索资料时认识的token based authentication有出入。 原因 其实网上大多数的token是json web token,是和DRF自带的token不同的。JWT只存储在客户端。具体google 阅读全文
posted @ 2019-08-11 23:13 Rocin 阅读(1044) 评论(0) 推荐(0) 编辑
摘要: 问题重现 1. 搭建mysql 2. docker logs 容器id 2019 08 03T10:03:57.601772Z 0 [ERROR] Failed to create a socket for IPv4 '0.0.0.0': errno: 13. 2019 08 03T10:03:57 阅读全文
posted @ 2019-08-03 18:16 Rocin 阅读(1069) 评论(0) 推荐(0) 编辑
摘要: 重现 用htop的Tree view(按F5)之后查看线程 参考 https://segmentfault.com/q/1010000003586656 mousycoder的回答 https://unix.stackexchange.com/a/166403 stantona的回答 http:// 阅读全文
posted @ 2019-07-25 12:24 Rocin 阅读(765) 评论(0) 推荐(0) 编辑
摘要: 参考 https://www.quora.com/What is meant by edge triggering and level triggering http://man7.org/linux/man pages/man7/epoll.7.html https://www.quora.com 阅读全文
posted @ 2019-07-24 22:35 Rocin 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 参考 https://www.cnblogs.com/biyeymyhjob/p/4670502.html https://stackoverflow.com/questions/3761276/when should i use tcp nodelay and when tcp cork http 阅读全文
posted @ 2019-07-21 20:25 Rocin 阅读(674) 评论(0) 推荐(0) 编辑
摘要: 解决办法 https://blog.zhaytam.com/2019/04/19/powerline and zshs agnoster theme in vs code/ Too short don't read pycharm, deepin自带的终端, vscode都要各自调整字体. 阅读全文
posted @ 2019-07-20 20:07 Rocin 阅读(984) 评论(0) 推荐(0) 编辑
摘要: 前提 ES5只有函数作用域和全局作用域,var属于ES5。let属于ES6,新增块级作用域。目的是可以写更安全的代码。 The let statement declares a block scope local variable, optionally initializing it to a v 阅读全文
posted @ 2019-07-19 13:57 Rocin 阅读(758) 评论(0) 推荐(0) 编辑
摘要: 个人总结 阅读全文
posted @ 2019-07-15 00:14 Rocin 阅读(133) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 27 下一页