==== LAN sync ====本文主要内容,如何利用rsync,lsyncd,ssh工具实现对目录的监控以及自动同步主要分这么几块描述先给出如何在局域网内实现以上功能然后给出如何实现有代理的公司主机通过广域网和家里的本子自动同步牵涉的内容有NAT,端口映射,SSH,HTTPS,代理相关内容,TPLINK配置lsyncd的功能:(1)开源软件lsyncd采用inotify原理监听某一目录,如果目录内发生增、删、改、利用rsync协议自动同步到多个服务器(2)inotify,从kernel 2.6.13开始正式并入内核,RHEL5支持(3)可以本地多点目录的监控并实现到远程目录的同步(4) Read More
posted @ 2012-01-06 23:50 linyaoyi Views(1543) Comments(0) Diggs(0)
http://hi.baidu.com/delphiss/blog/item/c15b314f05f9dfc0d0c86a26.html Yii应用的入口脚本最后一句启动了WebApplication Yii::createWebApplication($config)->run(); CApplication: public function run(){ $this->onBegi... Read More
posted @ 2012-01-01 12:58 linyaoyi Views(577) Comments(0) Diggs(0)
macport安装python27出现如下错误$ sudo port install python27---> Computing dependencies for python27---> Building python27Error: Target org.macports.build returned: shell command failed (see log for details)Log for python27 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macpo Read More
posted @ 2012-01-01 12:39 linyaoyi Views(639) Comments(0) Diggs(0)
http://hi.baidu.com/delphiss/blog/item/357663d152c0aa85a1ec9c44.htmlYii应用的入口脚本引用出了Yii类,Yii类的定义:class Yii extends YiiBase{}由yiic创建的应用里Yii类只是YiiBase类的“马甲”,我们也可以根据需求定制自己的Yii类。Yii(即YiiBase)是一个“helper class”,为整个应用提供静态和全局访问入口。Yii类的几个静态成员:$_aliases : 存放系统的别名对应的真实路径$_imports :$_classes :$_includePaths php i Read More
posted @ 2012-01-01 12:27 linyaoyi Views(297) Comments(0) Diggs(0)
Yii是基于组件(component-based)的web框架,CComponent类是所有组件的基类。CComponent类为子类提供了基于属性(property)、事件(event)、行为(behavior)编程接口。1. 组件的属性(property)Ccomponent类并没有提供属性的变量存储,需要由子类来提供两个方法来实现。子类的getPropertyName()方法提供$component->PropertyName的取值操作数据,子类的setPropertyName($val)方法提供$component->PropertyName赋值操作。$width=$comp Read More
posted @ 2012-01-01 12:08 linyaoyi Views(303) Comments(0) Diggs(0)
用macport安装软件的时候,因为xcode4.2没有正确安装gettext,会导致出现如下错误xgettext: A --flag argument doesn't have the <keyword>:<argnum>:[pass-]<flag> syntax: gettext:1:pass-c-format因此考虑自己重新编译gettext-0.18.1.1,点此下载编译gettext可能会遇到如下错误stpncpy.c:34: error: expected declaration specifiers or ‘...’ before nu Read More
posted @ 2012-01-01 12:01 linyaoyi Views(2150) Comments(0) Diggs(0)
http://hi.baidu.com/delphiss/blog/item/f7da86d787adb72506088b4b.html 基于yii1.0.8的代码分析的。用了一个下午整理的,流水账,感兴趣的凑合着先看,国庆期间推出个整理修改版,然后再完成后两个部分(MVC和Yii的整体结构分析)。 1. 启动 网站的唯一入口程序 index.php : $yii=dirname(__F... Read More
posted @ 2012-01-01 10:19 linyaoyi Views(556) Comments(0) Diggs(0)