class UserProfile(auth.AbstractBaseUser, auth.PermissionsMixin): email = models.EmailField( verbose_name='email address', max_length=255, unique=True,... ...
分类:
其他好文 时间:
2019-10-10 10:43:38
阅读次数:
87
Difficulty:easy More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/first-unique-character-in-a-string/ Given a string, find the first ...
分类:
其他好文 时间:
2019-10-10 10:39:39
阅读次数:
78
-- 通过反引号``来防止名字和关键字起冲突 CREATE TABLE IF NOT EXISTS `user2`( `id` INT UNSIGNED AUTO_INCREMENT COMMENT '用户编号', `username` VARCHAR(20) NOT NULL UNIQUE COM... ...
分类:
数据库 时间:
2019-10-09 15:52:52
阅读次数:
132
按网上的方法,在web.xml文件中增加了禁用非Post、get方法后 <security-constraint> <web-resource-collection> <web-resource-name>SSL</web-resource-name> <url-pattern>/*</url-pa ...
分类:
其他好文 时间:
2019-10-09 00:18:49
阅读次数:
185
博主最近打算搭建商城,由于之前对建表只有很浅显的理解,没有太过深入了解,建表过程中遇到一些问题,现记录如下, 如有问题请各位留言指正,感激不尽: 建表时设置如何设置联合主键?如下标红处: 如何设置外键?如上标绿处,含义如下: constraint 外键(形如:FK_从表_主表) foreign ke ...
分类:
数据库 时间:
2019-10-09 00:15:27
阅读次数:
132
蚯蚓 很奇妙的一道题. 显然的暴力: 用堆维护,好了,没了. 复杂度$\Theta((n+m)\times log_2{(n+m)})$,当然这个不紧,因为堆的大小不是每时每刻都是$n+m$的. 看起来是非常优秀的复杂度,但我们看数据范围: $n\le 10^5,m\le 7\times 10^6$ ...
分类:
其他好文 时间:
2019-10-08 21:59:05
阅读次数:
85
多表关系一对一 一、多表关系 外键:建立表与表关联 的字段,通常 一个表的外键 是 另一个表的主键(唯一键也可以) 1. 一对一关系:外键在任何一方都可以,此时外键要设置 唯一键 2. 一对多关系:外键必须放在多的一方,此时外键值不唯一 3. 多对多关系:一定要创建第三张表(关系表),每一个外键值不 ...
分类:
其他好文 时间:
2019-10-07 13:31:51
阅读次数:
81
django数据模型中关于on_delete, db_constraint的参数说明 1.设置为null 2.建表时其他参数的设置 3.set的使用 4.ManyToMany参数(through,db_constraint) 5.db_constraint ),但是不用约束字段了,一半公司都用fal ...
分类:
数据库 时间:
2019-10-07 00:46:27
阅读次数:
144
一. make系列函数 (一)三个make函数 1. std::make_shared:用于创建shared_ptr。GCC编译器中,其内部是通过调用std::allocate_shared来实现的。 2. std::make_unique:C++14中加入标准库。 3. std::allocate ...
分类:
其他好文 时间:
2019-10-05 22:25:39
阅读次数:
129
Given an array of integers arr, write a function that returns true if and only if the number of occurrences of each value in the array is unique. Exam ...
分类:
其他好文 时间:
2019-10-05 10:24:33
阅读次数:
78