我们在使用python的flask框架时,可能会经常用到生命周期函数如:before_request, before_first_request,或者信号等,刚开始学的时候就想只要写一个函数,然后加上一个装饰器居然就可以实现这种开挂般的效果,那时感觉这框架代码写得真棒, 再过些时间自己学会阅读框架源 ...
分类:
编程语言 时间:
2020-06-30 14:41:29
阅读次数:
70
import pymysql 1.登录mysql conn = pymysql.connect(host= '127.0.0.1',user='root',password='123',database='homework') 2.获取游标 cur = conn.cursor() # cur = c ...
分类:
数据库 时间:
2020-06-30 14:27:33
阅读次数:
71
A few weeks ago we introduced the first demonstration of “P4 Runtime”. We invite all members of the networking community to join with us, so that toge ...
分类:
其他好文 时间:
2020-06-30 13:01:44
阅读次数:
51
mysql> show databases; + + | Database | + + | information_schema | | mysql | | newauth4a | | performance_schema | | pre4a | | sys | + + 6 rows in set ...
分类:
数据库 时间:
2020-06-30 12:46:33
阅读次数:
56
1.通过配置文件确认zabbix关联的数据库信息 #find / -name zabbix_server.conf 查看管理数据库,密码,IP 2.登录数据库修改 #mysql -uzabbix -pzabbix >select user(); 查看当前用户 >show databases; >us ...
分类:
其他好文 时间:
2020-06-30 12:36:12
阅读次数:
43
pymysql安装 pip install pymysql 基本使用 1.创建数据库链接 connect = pymysql.connect( host='localhost', port=3306, user='root', password='123456', database='autotes ...
分类:
数据库 时间:
2020-06-30 11:15:41
阅读次数:
89
Jump Game II (H) 题目 Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array r ...
分类:
其他好文 时间:
2020-06-30 09:14:16
阅读次数:
59
高效能人士的七个习惯: 习惯一:积极主动 Be Proactive 习惯二:以始为终 Begin with the end in mind 习惯三:要事第一 Put first things first 习惯四:双赢思维 Think win/win 习惯五:知彼解己 Seek first to un ...
分类:
其他好文 时间:
2020-06-29 22:49:01
阅读次数:
119
SQL Server数据库 备份A库,然后删除A库,再还原A库,此时数据库一直显示“正在还原”的解决方法: A库一直显示“正在还原”。 在这种状态下,由于未提交的事务没有回滚,导致数据库不可以访问。 解决:新建查询,执行restore database A with recovery语句后正常 -- ...
分类:
数据库 时间:
2020-06-29 18:33:20
阅读次数:
63
use master go 使用默认数据库 if exists(select * from sys.databases where name='A') drop database A go 检查是否存在数据库A,如果存在则删除 create database A go use A go 创建数据库A ...
分类:
数据库 时间:
2020-06-29 18:32:20
阅读次数:
98