- (void)loadAssets {
// Initialise
_assets = [NSMutableArray new];
_assetLibrary = [[ALAssetsLibrary alloc] init];
// Run in the background as it takes a while to get a...
分类:
其他好文 时间:
2014-06-05 12:06:55
阅读次数:
215
一直没有认真觉察UPDATE操作的锁,最近在MSDN上看到一个问题,询问堆表更新的死锁问题,问题很简单,有类似这样的表及数据:CREATE TABLE dbo.tb( c1 int, c2 char(10), c3 varchar(10));GODECLARE @id int;SET @id = 0;WHILE @id 5BEGIN; SET...
分类:
其他好文 时间:
2014-06-05 10:24:32
阅读次数:
271
很多的开源软件在安装过程中会出现找不到动态库的问题我在ubuntu12.04安装lxc时,没有出现这问题,但在centos6.5的时候出现了这问题fix:#find / -name liblxc.so.1#echo "/usr/local/lib/" >> /etc/ld.so.conf#ldconfig...
分类:
其他好文 时间:
2014-06-05 06:23:02
阅读次数:
243
用于大型程序的工具--异常处理[续2]八、自动资源释放 考虑下面函数:void f()
{
vector v;
string s;
while (cin >> s)
{
v.push_back(s);
}
string *p = new string[v.size()];
//...
delete p;
}
在正...
分类:
编程语言 时间:
2014-06-05 06:07:27
阅读次数:
393
Implementint sqrt(int x).Compute and return the
square root
ofx.classSolution{public:intsqrt(intx){inti=0;intstep=1;while(step>0){while((i+step)>1);}r...
分类:
其他好文 时间:
2014-06-04 19:54:17
阅读次数:
214
VOIDKiAdjustIrpCredits ( VOID )其中 Number =
KeNumberProcessors;Prcb = KiProcessorBlock[Index];多核情况下调整每个CPU的IRP对象配额。在while
(Index Lookaside...
分类:
其他好文 时间:
2014-06-03 11:35:52
阅读次数:
254
逆序数的性质。1. 暴力解 1 #include 2 3 #define MAXNUM 5005 4
5 int a[MAXNUM]; 6 7 int main() { 8 int n; 9 int i, j, sum, min;10 11 while
(scanf(...
分类:
其他好文 时间:
2014-05-31 07:50:50
阅读次数:
170
一 while循环二do while循环三
for循环for循环的执行顺序用如下表达式:for(expression1;expression2;expression3) 循环变量初值; 循环条件;
循环变量增量{ expression4;} 执行的顺序应该是:1)第一次循环,即初始化循环。 ...
分类:
编程语言 时间:
2014-05-31 01:00:04
阅读次数:
364
水题,不过要想0ms过还是有个技巧的:#include #include using
namespace std;int main(){ int score[101]; int t,t1,temp; while(cin>>t) {
//memset(score,...
分类:
其他好文 时间:
2014-05-30 16:53:11
阅读次数:
268
http://ubuntuforums.org/archive/index.php/t-1771058.htmlI
accidentally discovered a fix for this while trying to solve a different
problem.edit~/.conf...
分类:
其他好文 时间:
2014-05-29 15:00:26
阅读次数:
623