一:内核基础层数据结构
1:双向链表list
a):链表的定义struct list_head{
struct list_head *next,*pre;
}b):container对象和list_entry#define container_of(ptr,type,member){ const typeof(((type *)0->member) *_mptr = (...
分类:
系统相关 时间:
2015-04-16 12:28:29
阅读次数:
238
#include#includeusing namespace std;#define MOD 1000000007typedef long long ll;ll F[16][16][16][16][16][6];ll f(int a,int b,int c,int d,int e,int pre)...
分类:
其他好文 时间:
2015-04-14 23:00:14
阅读次数:
212
死锁的条件以及如何处理死锁问题
解答:互斥条件(Mutual exclusion):
1、资源不能被共享,只能由一个进程使用。2、请求与保持条件(Hold and wait):已经得到资源的进程可以再次申请新的资源。3、非剥夺条件(No pre-emption):已经分配的资源不能从相应的进程中被强制地剥夺。4、循环等待条件(Circular wait):系统中若干进程组成环路,该环路...
分类:
其他好文 时间:
2015-04-14 19:41:46
阅读次数:
151
查看Node 基本配置$ npm config ls -l$npm help install将展开install的help文档初始化目录 npm init 根据提示完成 将生成package.json全局安装和本地安装globally —- This drops modules in {pre...
分类:
Web程序 时间:
2015-04-14 16:31:57
阅读次数:
208
1、prefix.pch文件的使用[1]、需要自己创建点击new file-->选择IOS中的Other选项卡,选择PCH File[2]、创建完后需要设置一下才能成功Prefix Header:路径填写格式是:$(SRCROOT)/项目名称/prefix文件名.pch把Precompile Pre...
分类:
其他好文 时间:
2015-04-13 16:06:56
阅读次数:
94
大白书模板,图用前向星存储int pre[MAXN], iscut[MAXN], bccno[MAXN], dfs_clock, bcc_cnt;vector bcc[MAXN];int edge,head[MAXN];struct edgenode{ int to,next;} G[MAXM...
分类:
其他好文 时间:
2015-04-10 21:42:14
阅读次数:
131
先说说钩子是干什么的吧,,简单的说,svn钩子就是在提交svn时前后所要触发的事件,于是我们可以用钩子做一些提交时的限制,及提交后的操作。最常用的一般有两个,pre-commit,post-commit。下面分别简单说下概念。一、钩子概述1)start-commit — 开始提交的通知描述sta.....
分类:
其他好文 时间:
2015-04-09 21:22:35
阅读次数:
185
图的邻接表存储struct Edge{ int v; ll w; Edge *next;};Edge e[maxn*10];void add_edge(int u,int v,ll w) ///插入邻接表的首部而非尾部,避免遍历{ Edge *pre=&e[u]; Ed...
分类:
其他好文 时间:
2015-04-09 19:05:23
阅读次数:
91
容易出错的点1 不是原位排序,惊讶!!2 要重新定位pre!!public class Solution { public ListNode insertionSortList(ListNode head) { // 想清楚怎么插入就很简单啦 if(head==nu...
分类:
其他好文 时间:
2015-04-09 13:37:49
阅读次数:
109