Flask 响应之定制全局有效的错误页面,之设置cookie,头信息。
摘要:1. @app.errorhandler(404) def not_found(error): resp = make_response(render_template('error.html'),404) return resp 这种方法更为灵活 2. 设置cookie def func(): r
阅读全文
Python数据结构之栈,队列和堆
摘要:栈:是一直只能访问其一端实现数据存储和检索的线性数据结构,规则是一种后进先出的形式。 队列:队列是一种具有先进先出特征的线性数据结构,元素的增加只能在一端进行,元素的减少只能在另一端进行,元素增加的一端叫做队尾,而元素减少的一端叫做队首,Python中的from collections import
阅读全文
Oracle触发器实例
摘要:# 触发器 create or replace trigger tr_tmp before insert on emp for each row begin select empno_seq.nextval into :new.empno from dual; end insert into emp
阅读全文