(一)
当多个进程企图对共享数据进行某种处理,而最后的结果又取决于进程运行的顺序时,就认为它们发生了竞争关系。避免竞争的条件,给出apue上的一个代码吧:
#include "apue.h"
static void charatatime(char *);
int
main(void)
{
pid_t pid;
TELL_WAIT(); /*set things up for TEL...
分类:
系统相关 时间:
2014-05-15 12:20:22
阅读次数:
408
几个单词
Hierarchy
['ha??rɑ?k?]
n. 层级
思考:每个视图有一个父视图,有0个或者多个子视图
Manipulation
[m?,n?pj?'le??(?)n] n.
操纵;操作
Descendant
[d?'send(?)nt]
n. 后裔;子孙
UIWindow
Feature:
1、UIWindow set up...
分类:
其他好文 时间:
2014-05-15 12:13:20
阅读次数:
430
git出现error: bad signature fatal: index file
corruptgit的index被损坏解决方法:需要重新生成index文件,rm -f .git/indexgit reset --mixed HEAD
分类:
其他好文 时间:
2014-05-15 11:41:50
阅读次数:
2932
Two SumGiven an array of integers, find two
numbers such that they add up to a specific target number.The function twoSum
should return indices of the...
分类:
其他好文 时间:
2014-05-15 10:48:59
阅读次数:
322
The modernization of world had led to coming of
many businesses online. Businesses have realized the importance of coming up
online. That is the main ...
分类:
其他好文 时间:
2014-05-15 10:14:55
阅读次数:
364
LeetCode-001 Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2...
分类:
其他好文 时间:
2014-05-15 04:34:50
阅读次数:
293
1. Check the /boot partition size to decide if need clean up
$ df
2. Check the current used Linux kernel
$ uname -r
3. Check all Linux kernel to decide which ones to be removed
$ ls /boot...
分类:
其他好文 时间:
2014-05-15 03:24:16
阅读次数:
235
Linked List Cycle
Total Accepted: 17148 Total
Submissions: 49300My Submissions
Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra sp...
分类:
其他好文 时间:
2014-05-15 00:13:50
阅读次数:
279
[ 问题: ]
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the ta...
分类:
其他好文 时间:
2014-05-15 00:04:39
阅读次数:
377
Linked List CycleGiven a linked list, determine
if it has a cycle in it.Follow up:Can you solve it without using extra
space?做完Linked List Cycle II在做这...
分类:
其他好文 时间:
2014-05-14 23:30:00
阅读次数:
399