#include
#include
#include
#include
#include
using namespace std;
int N,R;
int x[50100];
int main()
{
#ifdef xxz
freopen("in.txt","r",stdin);
#endif // xxz
ios::sync_with_stdio(false);
...
分类:
其他好文 时间:
2015-02-09 18:23:16
阅读次数:
182
#include
#include
#include
using namespace std;
int n,m;
char S[2100],P[2100];
int main()
{
#ifdef xxz
freopen("in.txt","r",stdin);
#endif // xxz
ios::sync_with_stdio(false);
cin.tie(0...
分类:
其他好文 时间:
2015-02-09 18:20:33
阅读次数:
138
原文网址:http://www.cnblogs.com/fusae-blog/p/4256794.htmlAPUE第三章的最后面给出的函数,现在还用不着,所以,先留个名字,待到时候用着了再补上好了。dup和dup2函数:用来复制文件描述符的sync函数,fsync函数和fdatasync函数:大致的...
分类:
其他好文 时间:
2015-02-08 21:52:41
阅读次数:
202
vi/etc/exports#需要在root权限下在该文件中按照如下格式插入:需要共享文件的绝对路径可以接受该文件的服务器IP(rw,no_root_squash,sync)保存文件重启NFS:servicenfsrestart或是/etc/init.d/nfsrestart启动protmap:serviceprotmaprestart登录到接收共享目录的服务器vi/etc/exp..
分类:
系统相关 时间:
2015-02-07 23:06:29
阅读次数:
230
三种Blocking类型,这里跟数据流的Buff关系很大:■■ non-blocking transformations,每一行直接转换输出,没有等待.■■ partial-blocking transformation,直到存储一定数量的好才输出。■■ blocking transformatio...
分类:
其他好文 时间:
2015-02-07 00:24:34
阅读次数:
235
Problem Description
As a unicorn, the ability of using magic is the distinguishing feature among other kind of pony. Being familiar with composition and decomposition is the fundamental course ...
分类:
移动开发 时间:
2015-02-06 21:52:01
阅读次数:
226
1). 检查子目录.git/hook下面是否有 commit-msg 文件,
https://gerrit-review.googlesource.com/tools/hooks/commit-msg
2). 如果是repo sync 下来的代码,只要检查子目录中是否存在 commit-msg 如果不存在,修改工程目录下面 .repo/manifest.xml,添加review项指定即可。
...
分类:
其他好文 时间:
2015-02-06 18:51:26
阅读次数:
377
socket阻塞与非阻塞,同步与异步1. 概念理解 在进行网络编程时,我们常常见到同步(Sync)/异步(Async),阻塞(Block)/非阻塞(Unblock)四种调用方式:同步:所谓同步,就是在发出一个功能调用时,在没有得到结果之前,该调用就不返回。也就是必须一件一件事做,等前一件做完了才能....
分类:
其他好文 时间:
2015-02-06 08:16:12
阅读次数:
340
在github上下了几个开源项目,在导入android studio时出现各种问题,
在网上查询各种资料后一一得以解决,现对个问题点进行简单的总结:
1. gradle project sync failed:
出现此问题的原因是gradle更新失败,在C:\Documents and Settings\user\.gradle\wrapper\dists
目录中可看到需要更新的...
分类:
移动开发 时间:
2015-02-04 12:58:05
阅读次数:
195
http://blog.sina.com.cn/s/blog_6f5b220601013zw3.html非常好的原子操作,不用加锁:__sync_fetch_and_addGCC 提供的原子操作gcc从4.1.2提供了__sync_*系列的built-in函数,用于提供加减和逻辑运算的原子操作。其声...
分类:
编程语言 时间:
2015-02-03 12:44:55
阅读次数:
195