Best Time to Buy and Sell Stock
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction (ie,...
分类:
其他好文 时间:
2014-09-08 09:39:06
阅读次数:
312
Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (ie...
分类:
其他好文 时间:
2014-09-07 13:24:55
阅读次数:
229
All 6 sides of a cube are to becoated with paint. Each side is is coated uniformly with one color. When a selectionof n different colors of paint is available, how many different cubes can youmake?
...
分类:
其他好文 时间:
2014-09-06 20:03:53
阅读次数:
254
在测试中需要在两台虚拟机之间传递文件,首先想到的是scp命令,结果提示:-bash:scp:commandnotfound想当然用yuminstallscp命令安装,结果提示:Nopackagescpavailable.后来发现scp这东西应该属于openssh-clients这个包,运行:yuminstallopenssh-clients再运行scp就可以了,再..
分类:
其他好文 时间:
2014-09-06 18:51:04
阅读次数:
476
一般不要修改SQLServer事务的默认级别。不推荐强行加锁 1 执行 EXEC SP_LOCK 报告有关锁的信息 1 如何锁一个表的某一行 SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED SELECT * FROM table ROWLOCK .....
分类:
数据库 时间:
2014-09-05 19:55:51
阅读次数:
229
日常维护中,经常会碰到线程被阻塞,导致数据库响应非常慢,下面就看看如何获取是哪个线程导致了阻塞的。
1. 环境说明
RHEL 6.4 x86_64 + MySQL 5.6.19
事务隔离级别:RR
2. 测试过程
3. 查看锁阻塞线程信息
这里用几中方法进行分析:
3.1 使用show processlist查看
MySQL [(none)]>...
分类:
数据库 时间:
2014-09-05 16:15:20
阅读次数:
480
在CentOS6上的eclipse安装了svbclipse插件后,svn不能使用,并且第一次使用的时候还出现下面错误窗口提示FailedtoloadJavaHLLibrary.Thesearetheerrorsthatwereencountered:nolibsvnjavahl-1injava.li...
分类:
编程语言 时间:
2014-09-05 12:52:21
阅读次数:
186
脏数据检查:
什么是脏数据?脏数据并不是废弃和无用的数据,而是状态前后发生变化的数据。我们看下面的代码:
Transaction tx=session.beginTransaction();
User user=(User)session.load(User.class,”1”);//从数据库中加载符合条件的数据
user.setName(“zx”);//改变了...
分类:
系统相关 时间:
2014-09-04 19:09:20
阅读次数:
285
dubbo的监控中心monitor的配置使用...
分类:
其他好文 时间:
2014-09-04 17:03:09
阅读次数:
430
UNDO三大作用1.一致性读(consistent read)2.事务回滚(Rollback Transaction)3.实例恢复(Instance Recovery)一致性读当会话发出一条SQL查询,将当前时间的SCN号记录下来,当进程扫描到表T的数据块,再与该块头部的ITL槽(事务槽)的SCN号...
分类:
其他好文 时间:
2014-09-04 16:43:09
阅读次数:
293