摘要: 在GNU C中包含在括号中的复合语句可以作为一个表达式。这就允许你在表达式中使用循环,switch和局部变量。以前复合语句是包含在大括号中语句序列。在这种构造中,圆括号包围在大括号中。如下面的例子:({ int y = foo(); int z; if ( y > 0 ) z = y; else... 阅读全文
posted @ 2014-07-11 19:40 linghuchong0605 阅读(495) 评论(2) 推荐(0)
摘要: 大家好,本人被下面这个问题困扰了一段时间,最近似乎找到了答案。这里和大家分享一下,可能对有相同困惑的同学有点帮助,同时也请各位帮忙看看错漏的地方。1================问题:在使用pthread库创建两个线程时clone()被调用了两次,可以用strace 看到:intmain(){..... 阅读全文
posted @ 2014-06-29 16:42 linghuchong0605 阅读(525) 评论(0) 推荐(0)
摘要: 1. Neo4j简介 Neo4j是一个用Java实现的、高性能的、NoSQL图形数据库。Neo4j 使用图(graph)相关的概念来描述数据模型,通过图中的节点和节点的关系来建模。Neo4j完全兼容ACID的事务性。Neo4j以“节点空间”来表 达领域数据,相对于传统的关系型数据库的表、行和列来说,... 阅读全文
posted @ 2014-05-18 21:28 linghuchong0605 阅读(621) 评论(0) 推荐(0)
摘要: 今天在用户组中新加了一个普通用户,开始这个用户没有sudo权限,于是通过sudo visudo修改了sudo的配置文件,赋予了普通用户的root权限。后来想着能不能将/etc/sudoers文件的访问权限改为777,然后直接在 编辑这个文件。于是想也没想就这么干了。结果改完之后发现自己给自己挖了一个... 阅读全文
posted @ 2014-05-17 15:58 linghuchong0605 阅读(421) 评论(0) 推荐(0)
摘要: #include enum node_type{ t_int,t_double};struct node{ enum node_type type; union{ int t_int; double t_double; };};int main(void){ struct node t; t.t... 阅读全文
posted @ 2014-04-15 10:34 linghuchong0605 阅读(797) 评论(0) 推荐(0)
摘要: vmware默认是硬盘启动,要进bios里面设置成开机的启动顺序,要将光盘设置成第一启动项。但vm的开机画面比笔记本的还要快很多,基本都在1s内的,想进入 bios里面也有难度。。 对于网上说的开vm系统然后点击窗口狂按f2,试了多次都没能够进入bios的了。 不过,还是有解决办法的。 首先关... 阅读全文
posted @ 2014-04-14 09:30 linghuchong0605 阅读(4139) 评论(0) 推荐(0)
摘要: Linux dentry cache学习每个dentry对象都属于下列几种状态之一:(1)未使用(unused)状态:该dentry对象的引用计数d_count的值为0,但其d_inode指针仍然指向相关的的索引节点。该目录项仍然包含有效的信息,只是当前没有人引用他。这种dentry对象在回收内存时... 阅读全文
posted @ 2014-04-13 16:17 linghuchong0605 阅读(788) 评论(0) 推荐(0)
摘要: *29.2* The preview windowWhen you edit code that contains a function call, you need to use the correctarguments. To know what values to pass you can look at how the function isdefined. The tags mechanism works very well for this. Preferably thedefinition is displayed in another window. For this the 阅读全文
posted @ 2014-04-11 23:20 linghuchong0605 阅读(601) 评论(0) 推荐(0)
摘要: server端代码:#include #include #include void nuser(struct svc_req * rqstp, SVCXPRT * transp){ unsigned nusers; unsigned input; switch (rqstp->rq_proc) { case NULLPROC: if (!svc_sendreply(transp, xdr_void, 0)) { fprintf(stderr, "can't reply to RPC call\n"); exit(1); } return; case RUSER 阅读全文
posted @ 2014-04-09 17:30 linghuchong0605 阅读(391) 评论(0) 推荐(0)
摘要: #include struct test1{ char a1; int a2; double a3;};struct test2{ char a1; struct test1 t;};int main(void){ printf("%d\n",sizeof(struct test1)); printf("%d\n",sizeof(struct test2)); return 0;}用gcc编译 为16 20用VC编译 为16 24 阅读全文
posted @ 2014-03-28 08:50 linghuchong0605 阅读(140) 评论(0) 推荐(0)