一、概念理解linux中IO的类型分为四类:同步(sync)和异步(async),阻塞(block)和非阻塞(unblock)同步:发出一个功能调用时,在没有得到结果前会一直等待,直到返回结果。异步:当异步过程调用发出后,调用者不能立刻得到结果。在完成后,通过通知机制或回调函数来通知调..
分类:
系统相关 时间:
2015-05-25 06:12:11
阅读次数:
359
为了节约有限的可用带宽。 不从mirror.centos.org下载iso映像 以下镜子应该可用的ISO映像: http://mirrors.aliyun.com/centos/7/isos/x86_64/http://mirrors.sina.cn/centos/7/isos/x86_64/Ind...
分类:
其他好文 时间:
2015-05-25 00:49:13
阅读次数:
359
LinkedList类LinkedList实现了List接口,允许null元素。此外LinkedList提供额外的get,remove,insert方法在LinkedList的首部或尾部。LinkedList不是同步的(不是线程安全)。实现线程安全:Listlist=Collections.sync...
分类:
其他好文 时间:
2015-05-23 12:43:22
阅读次数:
106
#!/usr/bin/python
#!_*_coding:utf-8_*_
importos
#importdatetime
importtime
#获取文件在系统的时间戳
SysTime=int(os.popen("stat-t/home/ftp/sync.log|awk‘{print$12}‘").read())
#读取文件内记录的时间戳
WinTime=int(open(‘/home/ftp/sync.log‘,‘r‘).read())
ifSysTime..
分类:
其他好文 时间:
2015-05-22 19:21:14
阅读次数:
224
由于Solr基于java开发,因此Solr在windows及Linux都能较好部署使用,但由于Solr提供了一些用于测试及管理、维护较为方便的shell脚本,因此在生产部署时候建议安装在Linux上,测试时候可以在windows使用。
下面以Linux下安装配置Solr进行说明,windows与此类似。
wgethttp://apache.mirror.phpchina.co ... e-...
分类:
其他好文 时间:
2015-05-22 19:17:24
阅读次数:
132
件系统操作相关的函数挺多的。首先可以分为两大类。一类是异步+回调的。 一类是同步的。在这里只对异步的进行整理,同步的只需要在函数名称后面加上Sync即可1. 首先是一类最常规的读写函数,函数名称和形式,应该是起源于C语言的。代码如下:fs.open(文件路径,读写标识,[文件mode值,666],回...
分类:
Web程序 时间:
2015-05-22 13:05:21
阅读次数:
131
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
编程语言 时间:
2015-05-22 01:54:09
阅读次数:
189
Although both BitTorrent Sync 2.0 FREE and PRO ensure high file transfer speed and ultimate security, PRO version provides you with a lot more functio...
分类:
其他好文 时间:
2015-05-22 00:21:58
阅读次数:
1029
Sync 2.0 supports boths new 2.0 folders and classic 1.4 folders, so when you upgrade your Sync it will leave existing folders as is.If we compare 2.0 ...
分类:
其他好文 时间:
2015-05-22 00:17:49
阅读次数:
558
master:安装半同步插件
(system@localhost) [(none)]> install plugin rpl_semi_sync_master soname 'semisync_master.so';
Query OK, 0 rows affected (0.83 sec)
(system@localhost) [(none)]> show plugins;
+--...
分类:
其他好文 时间:
2015-05-21 15:35:34
阅读次数:
111