MySQL InnoDB事务的隔离级别有四级,默认是“可重复读”(REPEATABLE READ)。
未提交读(READ UNCOMMITTED)。另一个事务修改了数据,但尚未提交,而本事务中的SELECT会读到这些未被提交的数据(脏读)。
提交读(READ COMMITTED)。本事务读取到的是最新的数据(其他事务提交后的)。问题是,在同一个事务里,前后两次相同的SELECT会读到不同的...
分类:
数据库 时间:
2014-06-05 00:12:14
阅读次数:
449
下面开始用D3.js处理第一个简单问题,先看下面的代码:
HelloWorld
Hello World 1
Hello World 2
如果你学习过HTML,应该知道会在屏幕中输出两行文字,如下图:
如果想用...
分类:
Web程序 时间:
2014-06-04 21:50:32
阅读次数:
361
建索引时,我们为了建索引快,会加上并行,加上并行之后,此列索引就会是并行了。访问有并行度的索引时,CBO可能可能会考虑并行执行,这可能会引发一些问题,如在服务器资源紧张的时候用并行会引起更加严重的争用。当使用并行后,需要把并行度改回来。
SQL> drop table test purge;
SQL> create table test as select * from dba_objects...
分类:
数据库 时间:
2014-06-03 05:48:26
阅读次数:
375
select p.id comperitorId,p.compcorp competitorName,
sum(case when c.kindname = 'ATM' then c.num else 0 end) atm,
sum(case when c.kindname = 'CRS' then c.num else 0 end) crs,
sum(case when c.kindname...
分类:
数据库 时间:
2014-06-03 03:12:09
阅读次数:
211
1. mysql忘记密码
vim /etc/my.conf 文件在mysqld下添加skip-grant-tables,表示mysql在登录的时候不检查权限。登录mysql。直接运行mysql> use mysql;
> update user set Password=password('root') where User='root'
> flush privileges;
> qu...
分类:
数据库 时间:
2014-06-03 02:24:16
阅读次数:
283
【题目】
Given a 2D board and a word, find if the word exists in the grid.
The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be use...
分类:
其他好文 时间:
2014-06-03 01:07:58
阅读次数:
329
??
表、select语句、游标:返回结果都能是一个集合。
注意:游标的结果是一个集合。
--查询并打印员工的姓名和薪水
set serveroutput on
/*
光标:
1. 光标的属性: %isopen %rowcount(返回的行数)
%notfound %found
2. 默认情况下,一次性打开300个光标
SQL> show p...
分类:
数据库 时间:
2014-06-03 00:37:10
阅读次数:
431
【题目】
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
Above is a histogram where width of each bar is 1, given height = [2,1,5,6,2,3].
The...
分类:
其他好文 时间:
2014-06-01 10:46:29
阅读次数:
242
【题目】
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0.
...
分类:
其他好文 时间:
2014-06-01 09:16:29
阅读次数:
242
全部删除:按esc后,然后dG全部复制:按esc后,然后ggyG全选高亮显示:按esc后,然后ggvG或者ggVG在win中使用是全选,如果需要在vim中使用自增。使用下面的设置方法:
1, 在vim73文件夹中找到mswin.vim屏蔽操作。修改方法 " CTRL-A is Select...
分类:
其他好文 时间:
2014-05-31 20:17:54
阅读次数:
304