No tricks. 1 class Solution { 2 public: 3 int titleToNumber(string s) { 4 int result = 0, len = s.size(); 5 for (int i = 0; i < le...
分类:
其他好文 时间:
2015-03-19 10:05:24
阅读次数:
256
Only trick is the 'Z'. Because when the number % 26 == 0, means there is a 'Z'. But when you n/=26, there is an extra 1 added to the n. EX:27 % 26 = 1...
分类:
其他好文 时间:
2015-03-19 09:59:13
阅读次数:
110
1.单向多对一(多个A映射到一个B) 把A中的Integer B_id改成 B b,然后在A的映射文件中添加: <many-to-one name="b" class="B的类全名" column="foreign key所在的字段名称" not-null="true"/> 注意:not-null属性...
分类:
Web程序 时间:
2015-03-19 01:07:03
阅读次数:
140
一、索引1、添加索引ALTERTABLE`table_name`ADDPRIMARYKEY(`column`);ALTERTABLE`table_name`ADDUNIQUE(`column`);ALTERTABLE`table_name`ADDINDEXindex_name(`column`);ALTERTABLE`table_name`ADDFULLTEXT(`column`);ALTERTABLE`table_name`ADDINDEXindex_name(`column1`,`col..
分类:
数据库 时间:
2015-03-18 18:32:03
阅读次数:
130
unique约束是指唯一约束,用于要求列种不允许出现重复值。可以为单独的列添加一个unique约束,也可以为多个列添加一个unique约束(属于表级约束)。如果为多个列添加一个unique约束,只需要保证这多个列的值不会全部相同即可。
在创建表时,为列添加unique约束,形式如下:
column_name data_type [constraint constraint_name]...
分类:
数据库 时间:
2015-03-18 14:05:10
阅读次数:
292
C#获取oracle数据库某表的列名和数据类型的sql语句为:select column_name,data_type ,data_length,data_precision,data_scale from user_tab_columns [where table_name=表名]关于此sql语句...
分类:
数据库 时间:
2015-03-18 13:38:40
阅读次数:
207
1.HBase(NoSQL)的数据模型1.1 表(table),是存储管理数据的。1.2 行键(row key),类似于MySQL中的主键。 行键是HBase表天然自带的。1.3 列族(column family),列的集合。 HBase中列族是需要在定义表时指定的,列是在插入记录时动态...
分类:
其他好文 时间:
2015-03-17 20:08:30
阅读次数:
149
Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A...
分类:
其他好文 时间:
2015-03-17 19:55:31
阅读次数:
123
一、HBase基本概念1、Row key 行主键,在对HBase进行查询时候只能依靠Row key,HBase不支持条件查询等类似于一些主流数据库的查询方式,读取记录只能依赖行主键以及进行全局扫面,可以将行主键想象成主流数据库查询过程中用到的主键(例如,id)。2、Column Family 列.....
分类:
其他好文 时间:
2015-03-17 19:45:43
阅读次数:
122
基表: hr.tt scott.tt
视图1: 基于 hr.tt union all scott.tt ---》 scott.ttt
视图2: 基于 视图1-》scott.ttt 创建 system.tt
问题再现:
SQL> create table hr.tt (a number);
Table created.
SQL> create table lixora...
分类:
其他好文 时间:
2015-03-17 18:02:51
阅读次数:
192