摘要: 环境需要: django >= 1.8.x python 2.7 或者python >= 3.4 安装django-cluster-redis包: pip install django-redis # 注意 django-redis版本需要 >= 4.7.0 pip install django-c 阅读全文
posted @ 2019-03-24 10:58 September· 阅读(2565) 评论(0) 推荐(0) 编辑
摘要: class Solution: def lengthOfLastWord(self, s): """ :type s: str :rtype: int """ l = [] for i in s[::-1].lstrip(): if i != ' ': ... 阅读全文
posted @ 2018-10-17 12:03 September· 阅读(473) 评论(0) 推荐(0) 编辑
摘要: class Solution: def addBinary(self, a, b): """ :type a: str :type b: str :rtype: str """ a, b = int(a, 2), int(b, 2) return bin(a + b)[2:] i = Solutio 阅读全文
posted @ 2018-10-17 12:02 September· 阅读(488) 评论(0) 推荐(0) 编辑
摘要: [1, 0][1, 3, 0][2, 0, 0][1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 阅读全文
posted @ 2018-10-15 19:14 September· 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 1.自定义simple_tag: 1).在app目录名下创建templatetags目录,并新建__init__.py文件。 2).在templatetags目录下创建任意名字的py文件,例如remainder.py。 3).在引用自定义simple_tag的模板中写入 {% load remain 阅读全文
posted @ 2018-09-19 17:21 September· 阅读(139) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2018-09-08 16:31 September· 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 虽然没影响使用,但是看着有点不爽。 执行 就可以了。 阅读全文
posted @ 2018-08-28 00:08 September· 阅读(3643) 评论(0) 推荐(1) 编辑
摘要: 今天在安装MySQL的过程中竟然没有让我输入密码,登录的时候也不需要密码就能进入,这让我很困惑。 进了数据库就设置密码,用了各种方式都不行。 虽然我这数据库没啥东西但也不能没有密码就裸奔啊,有点丢人是吧。 Google了一下,找到了解决的办法。 看到了root的plugin是auth_socket 阅读全文
posted @ 2018-08-27 22:38 September· 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 环境deepin Linux 15.7 Python3.6.5 今天重新装了deepin系统,需要重新安装scrapy,直接pip了一下,没成。 报错:fatal error: Python.h: 没有那个文件或目录。 解决办法:sudo aptitude install python-dev 再p 阅读全文
posted @ 2018-08-27 19:51 September· 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 使用模态对话框的时候报错了,$(...).modal is not a function 有点蒙,modal是boostrap的函数,而我已经导入了 然后在pycharm的terminal中看到了这一幕: 不知道怎么搞的没有GET我的bootstrap.js文件,而是找了另一个文件。终于找到问题所在 阅读全文
posted @ 2018-08-18 23:39 September· 阅读(617) 评论(0) 推荐(0) 编辑