从这篇开始要总结事务了,我们就从一个简单的事务示例开始吧。下面这个示例首先定义了一个事务,然后把关于一个新订单的数据记录到数据库中。示例代码如下:USE TSQLFundamentals2008;GO-- 事务-- 一个简单的事务BEGIN TRAN;-- 声明一个变量,保存新的OrderIDD.....
分类:
其他好文 时间:
2014-10-17 18:19:34
阅读次数:
229
TCP异步服务端
核心功能和同步服务端的功能类似,如下:
class talk_to_client : public boost::enable_shared_from_this
, boost::noncopyable {
typedef talk_to_client s...
分类:
编程语言 时间:
2014-10-17 11:04:34
阅读次数:
302
LeetCode:SubsetsGiven a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution...
分类:
其他好文 时间:
2014-10-17 10:27:24
阅读次数:
293
使用Druid数据库连接池。 先在配置文件引入tx命名空间,再引入TranstactionManager的bean,还需要打开如下开关: 使用普通的单元测试,在beforeclass中获取applicationcontext。多个@test注解。 在数据库操作bean上加上@Tran...
分类:
数据库 时间:
2014-10-17 00:42:43
阅读次数:
286
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.这题和sort list等题都比较相似,需要先用快慢指针的方法找到链表的中点,然后...
分类:
其他好文 时间:
2014-10-16 22:31:43
阅读次数:
217
原创作品,出自 “深蓝的blog” 博客,欢迎转载,转载时请务必注明出处,否则追究版权法律责任。
深蓝的blog:
常用查询
[root@hp171/dev]#file /sbin/ls --查看文件属性,PA表示以前的cpu,较新的cpu显示为IA
/sbin/ls: PA-RISC1.1 shared executable
[root@hp171/]#bdf...
分类:
其他好文 时间:
2014-10-16 03:35:32
阅读次数:
302
解决hgfs为空的方法:sudoapt-getinstall open-vm-dkmssudomount-tvmhgfs.host://mnt/hgfs解决每次都要挂载的方法:1、确保VMware中为Ubuntu已经成功设置Shared Folders,并且选中Always enabled。2、启动...
1, write down all the permutations of the string of character ;
2, sort these rows according to the first character of each row;
3, the last coloumn is the result string.
BWT reverse:
1, write...
分类:
其他好文 时间:
2014-10-15 23:26:11
阅读次数:
226
一般我们在Linux下执行某些外部程序的时候可能会提示找不到共享库的错误, 比如: tmux: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory ...
分类:
其他好文 时间:
2014-10-15 20:20:01
阅读次数:
227
[leetcode]Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order....
分类:
其他好文 时间:
2014-10-15 12:36:40
阅读次数:
188