Rails 的 transaction 事务处理最近太做一个数据排名统计,统计过程中需要删除旧的缓存统计数据,最开始写的时候就直接CachePostTotal.connection.execute("truncate table cache_post_totals")先把这个表给重置了,然后再循环往...
分类:
其他好文 时间:
2014-07-22 22:52:34
阅读次数:
238
创建表: hive> CREATE TABLE pokes (foo INT, bar STRING); Creates a table called pokes with two columns, the first being an integer and the other a string....
分类:
其他好文 时间:
2014-07-22 22:50:54
阅读次数:
262
来自讨论贴 http://www.itpub.net/thread-1877111-1-1.html准备数据表2014-07-20 01:38:10>create table tb_1 as select * from dba_objects where rownumcreate table tb_...
分类:
数据库 时间:
2014-07-22 22:50:33
阅读次数:
281
■ XCODE设置:(1)把编译器中的“警告”,设置成错误级别。方法:build settings 搜索error->“treat warings as errors”,更改为true.(2)xcode 快捷键:ESC: 打开代码提示自动完成窗口TABLE:补全自动提示快照:command+ctrl...
分类:
其他好文 时间:
2014-07-20 10:20:24
阅读次数:
337
In this article, I gathered up all the dumps, who found. If you see something new table will be updated.If you want to replenish the base - write in c...
分类:
移动开发 时间:
2014-07-19 23:12:35
阅读次数:
867
设计模式中的里氏代换原则Table of Contents1 里氏代换原则 2 模式中的里氏代换原则 2.1 策略模代 2.2 合成模式 2.3 代理模式 3 如何继承 3.1 不要从具体类继承 3.2 避免错误继承 1 里氏代换原则从开-闭原则中可以看出来面向对象的重要原则是创建抽象化,并从抽象化...
分类:
其他好文 时间:
2014-07-19 22:36:45
阅读次数:
219
Codeforces Round #256 (Div. 2) D. Multiplication Table(二分查找)...
分类:
其他好文 时间:
2014-07-19 18:38:19
阅读次数:
195
废话不多说直接上代码,因为文中有中间业务处理,用到的朋友需要去整改,原理: 拼写table插入数据,输出数据流即可! /// /// 商品导出Excel /// /// public ActionResult ProjectT...
分类:
Web程序 时间:
2014-07-19 15:32:56
阅读次数:
254
INSERT INTO table (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE c=c+1;INSERT 中 ON DUPLICATE KEY UPDATE的使用如果指定了ON DUPLICATE KEY UPDATE,并且插入行后会导致在一个UN....
分类:
数据库 时间:
2014-07-19 14:13:42
阅读次数:
261
今天有一开发兄弟找我,说出现一奇怪现象,在存储过程中赋date类型的值,时、分、秒都丢失了,下面来做个试验:
SQL> drop table test purge;
SQL> create table test
(
fill_date date
);
SQL> insert into test values(sysdate);
SQL> commit;
...
分类:
数据库 时间:
2014-07-19 08:23:15
阅读次数:
269