select current_timestamp; //select current_date; //selectcurrent_time; //select to_timestamp(some_char_column, 'yyyymmdd') from some_table; //CHAR...
分类:
数据库 时间:
2014-08-06 01:41:40
阅读次数:
227
不相交集合 故名思意就是一种含有多个不相交集合的数据结构。典型的应用是确定无向图中连通子图的个数。其基本操作包括:Make-Set(x):建立一个新的集合,集合的成员是x;Union(x,y): 将包含x和y的集合合并为一个集合;Find-Set(x): 返回指向包含x的集合的指针;下面是一个例子,...
分类:
其他好文 时间:
2014-08-04 06:13:46
阅读次数:
218
一、PostgreSQL中可以直接对时间进行加减运算: 查询系统当前时间: select?now(); 或者 select?current_timestamp; SELECT now()::timestamp + ‘1 year‘;? --当前时间加1年 SELECT now()::timestamp + ‘1 mon...
分类:
数据库 时间:
2014-08-02 13:02:23
阅读次数:
275
如果我们有一个表Student,包含下面字段与数据:drop table student;create table student(id int primary key,name nvarchar2(50) not null,score number not null);insert into st...
分类:
其他好文 时间:
2014-08-01 22:57:42
阅读次数:
318
什么是ApplicationContext?
它是Spring的核心,Context我们通常解释为上下文环境,但是理解成容器会更好些。
ApplicationContext则是应用的容器。
Spring把Bean(object)放在容器中,需要用就通过get方法取出来。
ApplicationEvent
是个抽象类,里面只有一个构造函数和一个长整型的timestamp。
Ap...
分类:
移动开发 时间:
2014-08-01 19:45:32
阅读次数:
485
◆把现在时间转成timeStampDateTime gtm = new DateTime(1970, 1, 1);//宣告一个GTM时间出来DateTime utc = DateTime.UtcNow.AddHours(8);//宣告一个目前的时间int timeStamp = Convert.To...
分类:
其他好文 时间:
2014-08-01 18:49:32
阅读次数:
289
在3.16-rc4内核源码中,内核给每个进程分配的内核栈大小为8KB。这个内核栈被称为异常栈,在进程的内核空间运行时或者执行异常处理程序时,使用的都是异常栈,看下异常栈的代码(include/linux/sched.h):1 union thread_union {2 struct thre...
分类:
系统相关 时间:
2014-07-30 23:31:05
阅读次数:
411
场景,两个不同服务器上的数据库,进行数据库同步 但是执行之后,提示报错 错误代码: 1293 Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or...
分类:
其他好文 时间:
2014-07-30 12:05:23
阅读次数:
280
UNIX时间戳转换为日期用函数: FROM_UNIXTIME()select FROM_UNIXTIME(1156219870);日期转换为UNIX时间戳用函数: UNIX_TIMESTAMP()Select UNIX_TIMESTAMP(’2006-11-04 12:23:00′);例:mysql...
分类:
数据库 时间:
2014-07-30 09:52:43
阅读次数:
213
1.unix时间戳转时间函数
语法: from_unixtime(bigint unixtime[, string format])
返回值: string
说明: 转化UNIX时间戳(从1970-01-01 00:00:00 UTC到指定时间的秒数)到当前时区的时间格式
举例:
hive> select from_unixtime(1323308943,‘yyyyMMdd’) from...
分类:
其他好文 时间:
2014-07-29 17:56:42
阅读次数:
434