摘要: 58.最后一个单词的长度 52msclass Solution: def lengthOfLastWord(self, s): """ :type s: str :rtype: int """ ... 阅读全文
posted @ 2018-10-18 20:45 fanmleii 阅读(106) 评论(0) 推荐(0)
摘要: 20. 有效括号 48msclass Solution: def isValid(self, s): """ :type s: str :rtype: bool """ if len(s) ... 阅读全文
posted @ 2018-10-18 00:42 fanmleii 阅读(148) 评论(0) 推荐(0)
摘要: 1.两数之和 3780msclass Solution(object): def twoSum(self, nums, target): """ :type nums: List[int] :type target: ... 阅读全文
posted @ 2018-10-16 20:09 fanmleii 阅读(154) 评论(0) 推荐(0)
摘要: 以下是自己的学习记录,算是一个总结。接下来会依次对下面问题做一个解答: 1. Python的dict和set为什么是无序的? 2. 为什么不是所有的python对象都可以用作dict的键和set中的元素要弄懂上面的问题,我们首先要了解Python内部是如何... 阅读全文
posted @ 2018-10-12 10:50 fanmleii 阅读(1307) 评论(0) 推荐(0)
摘要: list.sort方法和内置函数sorted的异同list.sort方法和sorted函数都是对列表进行排序的,但是这两种方法也是有少许不同的,list.sort排序是在原有基础上进行的,不会生成返回一个新的list, 但是sorted函数则不同,他会产生一个新对象并... 阅读全文
posted @ 2018-10-11 12:13 fanmleii 阅读(1462) 评论(0) 推荐(0)
摘要: 1. git init 初始化版本库2. git config --global user.name (your name) 配置 git config --global user.email (your email)3. git add (f... 阅读全文
posted @ 2018-10-09 10:55 fanmleii 阅读(109) 评论(0) 推荐(0)
摘要: 配置MySQL连接setting.py中的数据库配置:DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'oa', 'USE... 阅读全文
posted @ 2018-09-21 16:11 fanmleii 阅读(100) 评论(0) 推荐(0)
摘要: django实现websocket大致上有两种方式,一种channels,一种是dwebsocket。channels依赖于redis,twisted等,相比之下使用dwebsocket要更为方便一些。安装: pip install dwebsocket配置:# se... 阅读全文
posted @ 2018-09-21 14:43 fanmleii 阅读(204) 评论(0) 推荐(0)
摘要: 原题链接:https://www.cnblogs.com/wupeiqi/p/9078770.html部分图片是从其他博客上整理出来的,时间有些久了当初是写在word上的忘记参考出路了,有些答案我也不知道是否回答准确,如有错误还请提出,谢谢基础部分1.简述解释型和编译... 阅读全文
posted @ 2018-09-20 14:57 fanmleii 阅读(362) 评论(0) 推荐(0)
摘要: 一脸懵逼,点击登录,如果错了会有提示,但是登录成功了后台会显示跳转到dashboard上,也能正常获取到cookie,但是就是页面不会变化,单独访问dashboard也是正常的。问题代码如下:# login class Login(View): ''' ... 阅读全文
posted @ 2018-08-30 10:32 fanmleii 阅读(797) 评论(0) 推荐(0)