在使用多线程的时候,往往存在一定的公共数据,为了避免多个线程同时操作同一数据,我们需要为线程加锁。加锁的原理:每一个引用类型的对象都有一个同步索引块,指示当前使用该对象的线程数,每个线程执行到Lock语句块的时候就会判断当前锁定项(这里是this,当前窗体对象)的同步索引块是否等于0(即没有线程.....
分类:
编程语言 时间:
2014-06-28 18:33:22
阅读次数:
192
$(".easyui-treegrid").treegrid({url: '@Url.Action("GetDataDictionaryList", "DataDictionary")',onLoadSuccess: function (row, data) {$.each(data, functi...
分类:
其他好文 时间:
2014-06-28 18:19:10
阅读次数:
147
语法:ROW_NUMBER() OVER(PARTITION BY COLUMN ORDER BY COLUMN)简单的说row_number()从1开始,为每一条分组记录返回一个数字,这里的ROW_NUMBER() OVER (ORDER BY xlh DESC) 是先把xlh列降序,再为降序以后...
分类:
数据库 时间:
2014-06-28 18:08:45
阅读次数:
574
通过终端安装程序sudo apt-get install xxx时出错:E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to lock the admini...
分类:
其他好文 时间:
2014-06-28 16:06:36
阅读次数:
198
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l...
分类:
其他好文 时间:
2014-06-28 15:14:05
阅读次数:
194
Connect("localhost", "root", "", "php100")or die("错误");$db->Execute("set names 'UTF8'");$query=$db->execute("select * from `php100`");while($row=$quer...
分类:
数据库 时间:
2014-06-28 13:59:08
阅读次数:
294
按表中的字段 UpdateTime 按每天进行编号,每天的编号都从1开始编号,并附带表的主键 cid,把数据存入临时表中WITH temp AS (SELECT cid,updatetime, ROW_NUMBER() OVER (PARTITION BY CONVERT(varchar(10),....
分类:
数据库 时间:
2014-06-20 16:37:46
阅读次数:
221
出现这种情况主要是因为上次用SVN提交代码的时候没有提交完成就进行了中断 取消的操作。控制台打印报错信息: Attempted to lock an already-locked dirsvn: Commit failed (details follow):可以右键单击项目,然后选中以下选项 刷新清...
分类:
其他好文 时间:
2014-06-20 16:06:34
阅读次数:
243
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted fr...
分类:
其他好文 时间:
2014-06-20 15:29:46
阅读次数:
233
网上看见了好多例子都基本上是一样的,没有过多的解释,对于一个初学MySQL来说有点难,我把部分转摘过来如下 原文:http://www.cnblogs.com/buro79xxd/archive/2012/08/29/2662489.html要求目标:1.确定需求: 根据部门来分组,显示各员工在部....
分类:
数据库 时间:
2014-06-20 14:59:13
阅读次数:
235