不能颓了,好好学习,天天向上Orz! emmmmm,总感觉……好神奇啊,自己写了好长的代码还WA了,“真”代码果然够简介, 虽然大佬眼中的水题我也想不到……见得多了说不定会想到2333333 //QAQ神奇啊,把原来的雕塑先看为长度为n的数轴,再把n映射到m+n的数轴上//然后就直接找当前坐标最近的 ...
分类:
其他好文 时间:
2017-09-18 22:32:03
阅读次数:
214
HTML 初识<!--more--> 分类 cs模式 client-server bs模式 Browser-server web服务本质 from socket import * def main(): service=socket(AF_INET,SOCK_STREAM) service.bind ...
分类:
Web程序 时间:
2017-09-18 22:19:11
阅读次数:
244
这道题为简单题 题目: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums ...
分类:
其他好文 时间:
2017-09-18 22:11:56
阅读次数:
201
分别是认证,登入,注销的功能 authenticated():验证是否登录 login():登入,并且创建cookie,session logout():注销,清除session user对象方法 user对象的is_authenticated()方法 创建用户方法 修改密码 示例一:修改密码 @l ...
分类:
其他好文 时间:
2017-09-18 20:35:56
阅读次数:
176
Python Inheritance Syntax example: super().__init__(3) is equivalent to Polygon.__init__(self,3) super(Class,obj) .func--> calling func in base class! ...
分类:
其他好文 时间:
2017-09-18 19:47:56
阅读次数:
184
一、复习: 二、面向对象3: 1.继承: 使用非绑定的类方法(用类名来引用的方法),并在参数列表中,引入待绑定的对象(self),从而达到调用父类的目的。 这样做的缺点是,当一个子类的父类发生变化时(如类B的父类由A变为C时),必须遍历整个类定义,把所有的通过非绑定的方法的类名全部替换过来,例如代码 ...
分类:
编程语言 时间:
2017-09-18 19:46:15
阅读次数:
182
class Tree: def __init__(self,name,sort): self.name = name self.sort = sort self.children = {} def create(self,node_map,edge): l,r,k = edge l_node = n ...
分类:
其他好文 时间:
2017-09-18 19:44:50
阅读次数:
173
Form表单 问题1: 注册页面输入为空,报错:keyError:找不到password def clean(self): print(" ",self.cleaned_data) # if self.cleaned_data["password"]==self.cleaned_data["repe ...
分类:
其他好文 时间:
2017-09-18 19:43:15
阅读次数:
142
http://codevs.cn/problem/1049/ 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题解 查看运行结果 http://codevs.cn/problem/1049/ 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 G ...
分类:
其他好文 时间:
2017-09-18 18:25:55
阅读次数:
288
前沿: 首先是看到了单例模型,想不明白 outer中的参数 为什么能像 global的参数 一样屹立不倒。 #单例模型 def single_model(cls): instance = {} def inner(*args, **kwargs): print if cls not in insta ...
分类:
编程语言 时间:
2017-09-18 17:20:40
阅读次数:
180