-
python_装饰器之页面登陆验证
import time def auth(func): def wrapper(*args, **kwargs): username = input('username:').strip() password = input('password:').strip() if username == 'admin' and password == '123': func() else: exit() return wrapper @auth def index(): print('index')...
-
Flask学习之旅--数据库
一、写在前面 在Web开发中,数据库操作是很重要的一部分,因为网站的很多重要信息都保存在数据库之中。而Flask在默认情况下是没有数据库、表单验证等功能的,但是可以用Flask-extension为Web应用添加这些功能。 二、Flask SQLite SQLite是一款轻型的数据库 ,是遵守ACI...
-
python装饰器
装饰器:本身就是个函数,用来给其他函数增加附加的功能 def log(): pass def function(): pass log() def funciton2(): pass log() # 函数的调用 装饰器原则: 1.不能修改被装饰的函数的源代码 2.不能修改被装饰的函数的调用方式 3.装饰器对被装饰的函数是完全透明的...
-
python算法与数据结构-常用查找算法一(37)
一、什么是查找 查找(Searching)就是根据给定的某个值,在查找表中确定一个其关键字等于给定值的数据元素(或记录)。 查找表(Search Table):由同一类型的数据元素(或记录)构成的集合 关键字(Key):数据元素中某个数据项的值,又称为键值。 主键(Primary Key...
-
老男孩老师的博客地址
http://www.bootcdn.cn/bootstrap/ bootstrap cdn在线地址 http://www.cnblogs.com/vamei/archive/2012/09/13/2682778.html http://www.xuliangwei.com/http://www.nnzhp.cn http://www.cnblogs.com/lianzhilei/ cmdb http://www.cnblogs.com/caseast/ cmdb http://www...
2019-07-24 09:06:21 socket编程前端学习前端基础linux基础文档文件Linuxmysqlqqphp
-
BBS(仿博客园系统)项目04(文章详情页根评论、子评论的功能实
摘要: 根评论(文章的普通评论) 子评论(一篇文章中评论的评论) 一、根评论(普通的评论) ①文章详情下方点赞的下方评论区页面的搭建(渲染): article_detail.html页面: {# 评论开始#}{# 用户如果登录,才具有评论的权力,否则评论页面不予显示#} {% if request.user....
-
闯越自动签到demo版补充说明
demo代码:https://www.cnblogs.com/canmeng/p/11000548.html 定位出错是由于cookie 我重新登录账号过,cookies的值就变了 当时没注意cookie的值变化,然而定位参数回复仍然回复成功 {"state":1,"meg":"成功","result":{}} 至于获取cookie可以参考https://www.cnblogs....
-
python 之 random 模块、 shutil 模块、shelve模块、 xml模块
6.12 random 模块 print(random.random()) (0,1)----float 大于0且小于1之间的小数 print(random.randint(1,3)) [1,3] 大于等于1且小于等于3之间的 整数 print(random.randrange(1,3)) [1,3) 大于等于1且小于3之间的 整数 print(random.choice ( [1,'23', [4,5] ] ) )...
-
tensorboard运行使用(排坑)记录一
首先运行如下代码(路径根据你自己的要求更改) 1 writer = tf.summary.FileWriter( " G:/tensorflow/graph " , tf.get_default_graph()) 然后在最后加如下代码 1 writer.close() 这样 运行后你的路径下会多出以下文件 接着以我为例: cmd cd到保存的上一目录 输入 1 t...
-
python 之 time模块、datetime模块(打印进度条)
6.9 time 模块 方法 含义 备注 time.time() 时间戳 1561013092.997079 time.strftime('%Y-%m-%d %H:%M:%S %p') 结构化时间struct_time 转 格式化的字符串 2019-06-20 10:21:13 AM time.strptime('2011-05-05 16:37:06', '%Y-%m-%d %X') 格式化的字符串 转 结构化时间st...
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash
