A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p ...
分类:
其他好文 时间:
2018-09-13 00:04:00
阅读次数:
220
js数组中去除重复对象及去除空对象的方法 (function(){//去除数组中重复对象 var unique = {}; arr.forEach(function(a){ unique[ JSON.stringify(a) ] = 1 }); arr= Object.keys(unique).ma ...
分类:
其他好文 时间:
2018-09-12 18:07:39
阅读次数:
189
题目大意 https://leetcode.com/problems/unique-paths/description/ 62. Unique Paths A robot is located at the top-left corner of a m x n grid (marked 'Start ...
分类:
其他好文 时间:
2018-09-12 16:56:04
阅读次数:
157
mysql的性能优化无法一蹴而就,必须一步一步慢慢来,从各个方面进行优化,最终性能就会有大的提升。 Mysql数据库的优化技术 对mysql优化是一个综合性的技术,主要包括 表的设计合理化(符合3NF) 添加适当索引(index) [四种: 普通索引、主键索引、唯一索引unique、全文索引] 分表 ...
分类:
数据库 时间:
2018-09-11 14:17:11
阅读次数:
209
主要内容 not null 与 default unique primary auto_increment foreign key 约束条件作用:用于保证数据的完整性和一致性 主要分为 unique 在mysql中称为单列唯一 联合唯一:只要两列记录,有一列不同,既符合联合唯一的约束 auto_in ...
分类:
数据库 时间:
2018-09-11 13:58:17
阅读次数:
176
std::unique适用于将排过序的数据结构重复的部分全部放在结尾 但用的时候发现会将原先容器中的内容改掉,看了源码发现这个函数会将不重复的数据结构直接覆盖到前一个重复的位置上,下面看源码 该函数std::unique位于头文件<algorithm>声明1如下: 声明2如下: 该函数的作用为: 删 ...
分类:
其他好文 时间:
2018-09-10 20:09:19
阅读次数:
288
题目 Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1 ... n. Example: Input: 3 Output: [ [1,null,3,2 ...
分类:
其他好文 时间:
2018-09-10 18:33:19
阅读次数:
262
一.app/models中写类(设计表结构) 1.普通类 class A(models.Model): id=modles.AutoField(primary_key=True) name=models.CharField(max_length=32,unique=True) 2.设置外键 clas ...
分类:
编程语言 时间:
2018-09-10 18:30:40
阅读次数:
242
原文:SQLServer之UNIQUE约束UNIQUE约束添加规则 1、唯一约束确保表中的一列数据没有相同的值。 2、与主键约束类似,唯一约束也强制唯一性,但唯一约束用于非主键的一列或者多列的组合,且一个表可以定义多个唯一约束。 使用SSMS数据库管理工具添加UNIQUE约束 1、连接数据库,选择数... ...
分类:
数据库 时间:
2018-09-10 17:00:52
阅读次数:
220