码迷,mamicode.com
首页 >  
搜索关键字:unique    ( 4837个结果
@Column
@Column(name = 可选,列名(默认值为属性名)。unique = 可选,是否在该列上设置唯一约束(默认false)。nullable = 可选,是否设置该列的值可以为空(默认true)。insertable = 可选,该列是否作为生成的insert语句中的一列(默认true)。updat...
分类:其他好文   时间:2014-07-06 22:52:07    阅读次数:261
POJ 1679 The Unique MST
判断最小生成树是否唯一。 先扫一遍边,找出相等的边并标记 vis; 然后生成最小生成树,总权值为 ans,并记录下哪些边在第一次生成中使用了。use; 最后扫描所有边,有相等的,并且使用的边。把它标记为删除 del;然后生成最小生成树。 如果跟第一颗树权值一样,表明生成树不是唯一的。 #include #include #include #includ...
分类:其他好文   时间:2014-07-06 10:28:48    阅读次数:135
LeetCode——Longest Palindromic Substring
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring. 给定一个字符串S,找出其中的最长回文...
分类:其他好文   时间:2014-07-06 00:15:15    阅读次数:240
MySQL数据库使某个不是主键的字段唯一
在使用MySQL数据的过程中有时候我们需要某个不是主键的字段不重复,这个时候就要用到SQL的UNIQUE约束了。 下面摘抄自w3school里的一段介绍: UNIQUE 约束唯一标识数据库表中的每条记录。 UNIQUE 和 PRIMARY KEY 约束均为列或列集合提供了唯一性的保证。 PRIMARY KEY 拥有自动定义的 UNIQUE 约束。 请注意,每个表可以有多个 UNI...
分类:数据库   时间:2014-07-03 17:49:10    阅读次数:247
[转]主键冲突的话就更新否则插入 (ON DUPLICATE KEY UPDATE )
mysql "ON DUPLICATE KEY UPDATE" 语法如果在INSERT语句末尾指定了ON DUPLICATE KEY UPDATE,并且插入行后会导致在一个UNIQUE索引或PRIMARY KEY中出现重复值,则在出现重复值的行执行UPDATE;如果不会导致唯一值列重复的问题,则插入...
分类:其他好文   时间:2014-07-03 09:34:37    阅读次数:233
Leetcode Unique Binary Search Trees
Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. 1.....
分类:其他好文   时间:2014-07-02 22:13:23    阅读次数:191
How to create a logical standby database based on a physical standby database
// 以下是主库: 下列语句可以用来检查SQL应用能否唯一识别表列,并找出不被支持的表:查询哪个表不支持logical standby传输 SQL> select owner, table_name from dba_logstdby_not_unique where (owner, table_name) not in (select distinct owner, table_name...
分类:数据库   时间:2014-07-02 16:40:01    阅读次数:368
js一些题目
1、对象里面的key不区分出stringvar a={};a[1]="a";a["1"]=2;console.log(a); 2、扩展Array原型,编写一个去除数组重复项的方法// 算法一,两层循环,性能差Array.prototype.unique = function(){ var l...
分类:Web程序   时间:2014-07-01 20:55:37    阅读次数:270
一些题目
//扩展Array原型,编写一个去除数组重复项的方法// 算法一,两层循环,性能差Array.prototype.unique = function(){ var len = this.length, i; // 两两比较(数组长度大于1) while ( --len > 0 ) ...
分类:其他好文   时间:2014-07-01 20:46:35    阅读次数:229
Longest Palindromic Substring
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:其他好文   时间:2014-06-30 22:43:45    阅读次数:294
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!