摘要: Urllib库 python内置的http请求库 1、urllib.request 请求模块 2、urllib.error 异常处理模块(try,catch) 3、urllib.parse url解析模块 4、urllib.robotparser robots.txr解析模块 urlopen get 阅读全文
posted @ 2017-12-25 19:13 月河 阅读(271) 评论(0) 推荐(0) 编辑
摘要: urllib 库 urllib.request库 re库 以上三个基本上python3内置 剩下的用第三方pip安装 1、pip install requsets 返回响应status 2、pip install selenium(驱动浏览器、自动化测试) 大多数网页存在js渲染,普通request 阅读全文
posted @ 2017-12-25 14:30 月河 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 基于cookie做用户验证时:敏感信息不适合放在cookie中 session依赖cookie session原理 cookie是保存在用户浏览器端的键值对 session是保存在服务器端的键值对 session服务端中存在的数据为: session客户端即客户端的浏览器的cookie中存的数据是当 阅读全文
posted @ 2017-12-12 16:12 月河 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 1、setting中找到github 正确输入邮箱密码,勾上ssh 2、在本机中git bash 得到ssh代码 输入到github 个人setting中 3、在pycharm中setting项git中正确输入 4、点击vcs,import到github后提示出现以下错误时 git config - 阅读全文
posted @ 2017-11-29 19:16 月河 阅读(1080) 评论(0) 推荐(0) 编辑
摘要: 1、索引的目的是加快检索 2、但对于增删改行为则增加了时间,因为需要在同时在原表和索引表中添加纪录 创建索引 阅读全文
posted @ 2017-11-29 17:48 月河 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 创建存储过程 创建一个简单的存储过程 调用存储过程 删除存储过程 下面。创建带参数的存储过程,just like function 调用 得到 带参数in的存储过程 CREATE PROCEDURE newproin( IN pro_id int, OUT min DECIMAL(8,2), OUT 阅读全文
posted @ 2017-11-29 15:26 月河 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 一、安装Django pip install django 完成后即可 二、pycharm 建立django 点击file ——>new project 选择django项目——>more setting填写appname 生成以下项目结构 -views.py中处理视图逻辑,一般为大量函数方法。一般 阅读全文
posted @ 2017-11-28 17:28 月河 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 得到 #b [[0, 2], [1, 4], [0, 2], [3, 5], [1, 4], [3, 5], [6]] #f [['b', 'b'], ['a', 'a'], ['b', 'b'], ['c', 'c'], ['a', 'a'], ['c', 'c'], ['d']] 其中存在重复的 阅读全文
posted @ 2017-11-28 10:58 月河 阅读(3346) 评论(0) 推荐(0) 编辑
摘要: 1、视图 http://www.cnblogs.com/wang666/p/7885934.html 2、存储过程 http://www.cnblogs.com/wang666/p/7920748.html 3、触发器 对某一表中添加、修改或删除数据时,触发触发器内的内容 4、函数 5、事务 6、索 阅读全文
posted @ 2017-11-24 10:48 月河 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 处理mysql使用 pymysql模块 处理postgreSQL使用psycopg2模块 基本差不多 阅读全文
posted @ 2017-11-24 10:20 月河 阅读(111) 评论(0) 推荐(0) 编辑