一、创建和查看数据库1.创建数据库CREATEDATABASE[IFNOTEXISTS]#可选内容db_name[create_specification]#如下定义:[DEFAULT]CHARACTERSETcharset_name#字符集|[DEFAULT]COLLATEcollation_name#校对规则(1)创建一个名称为mydb1的数据库createdatabasemydb1;(2)创
分类:
数据库 时间:
2018-12-08 23:48:19
阅读次数:
436
1、介绍 SQLAlchemy是一个基于Python实现的ORM框架。该框架建立在 DB API之上,使用关系对象映射进行数据库操作,简言之便是:将类和对象转换成SQL,然后使用数据API执行SQL并获取执行结果。 安装: 组成部分: Engine:框架的引擎 Connetion Pooling:数 ...
分类:
数据库 时间:
2018-12-07 20:53:45
阅读次数:
132
Auth模块 本文目录 1 Auth模块是什么 2 auth模块常用方法 3 扩展默认的auth_user表 回到目录 1 Auth模块是什么 Auth模块是Django自带的用户认证模块: 我们在开发一个网站的时候,无可避免的需要设计实现网站的用户系统。此时我们需要实现包括用户注册、用户登录、用户 ...
分类:
其他好文 时间:
2018-12-07 11:58:55
阅读次数:
200
一 . 介绍 约束条件与数据类型的宽度一样,都是可选参数 作用:用于保证数据的完整性和一致性 主要分为: PRIMARY KEY (PK) 标识该字段为该表的主键,可以唯一的标识记录 FOREIGN KEY (FK) 标识该字段为该表的外键 NOT NULL 标识该字段不能为空 UNIQUE KEY ...
分类:
数据库 时间:
2018-12-06 20:51:34
阅读次数:
224
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numb ...
分类:
其他好文 时间:
2018-12-06 20:24:43
阅读次数:
179
// 根据id去重 List<Person> unique = appleList.stream().collect( collectingAndThen( toCollection(() -> new TreeSet<>(comparingLong(Apple::getId))), ArrayLi ...
分类:
编程语言 时间:
2018-12-05 21:53:23
阅读次数:
732
背景: 今天下班路上看到一个大货车,于是想到了装配,然后脑海里跳出了一个注解@Autowired(自动装配),于是又想到最近工作项目用的都是@Resource注解来进行装配。于是本着学什么东西都要一钻到底才能从菜鸟变大神的精神!!我就认真研究了一下,在此总结一波。以下内容先分别解释一下两个注解,再进 ...
分类:
其他好文 时间:
2018-12-05 21:50:17
阅读次数:
181
参考 http://www.iocoder.cn/categories/RocketMQ/ ; https://www.jianshu.com/nb/16219849 首先上启动方法,分别启动namesrv/broker/procedure/consumer ...
分类:
其他好文 时间:
2018-12-05 20:58:30
阅读次数:
188
Given a string, find the first non repeating character in it and return it’s index. If it doesn’t exist, return 1. Examples: Note: You may assume the ...
分类:
其他好文 时间:
2018-12-03 23:01:53
阅读次数:
165
#-*-coding:utf-8-*-import datetime;import random;nowTime=datetime.datetime.now().strftime("%Y%m%d%H%M%S");#生成当前时间randomNum=random.randint(0,9);#生成的随机整 ...
分类:
其他好文 时间:
2018-12-03 16:33:21
阅读次数:
834