<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[coolskyying的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/coolskyying</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; coolskyying]]></copyright><item><title><![CDATA[设计模式之状态设计模式]]></title><link>https://blog.youkuaiyun.com/coolskyying/article/details/79085149</link><guid>https://blog.youkuaiyun.com/coolskyying/article/details/79085149</guid><author>coolskyying</author><pubDate>Wed, 17 Jan 2018 14:46:19 +0800</pubDate><description><![CDATA[什么是状态设计模式 
状态设计模式的作用是允许对象在状态改变时，改变其行为。如游戏中经常用到状态设计模式，因为游戏中的对象往往会非常频繁的改变状态
何时使用状态设计模式 
一个对象依赖于它的状态时，它肯定会频繁的改变，这种情况下，有状态设计模式既有绝对的优势


下面的示例代码是利用状态设计模式实现电灯的开灯和关灯。



class Context {

    private $offStat]]></description><category></category></item><item><title><![CDATA[php trait 详解+示例]]></title><link>https://blog.youkuaiyun.com/coolskyying/article/details/79077845</link><guid>https://blog.youkuaiyun.com/coolskyying/article/details/79077845</guid><author>coolskyying</author><pubDate>Tue, 16 Jan 2018 21:04:00 +0800</pubDate><description><![CDATA[traits 产生背景 
       PHP 中的traits，是php5.4版本加入的新特性，大家都知道，php类的继承是单继承（接口可以多继承），哈哈，java也是单继承 ，也就是说，一个php类不能同时继承多个类

什么是traits 
    traits 的官方解释：Trait 是从 PHP 5.4 加入的一种细粒度代码复用的语法 ，是为类似 PHP 的单继承语言而准备的一种代码复用机]]></description><category></category></item><item><title><![CDATA[self static this parent 关键词的基本用法]]></title><link>https://blog.youkuaiyun.com/coolskyying/article/details/79076495</link><guid>https://blog.youkuaiyun.com/coolskyying/article/details/79076495</guid><author>coolskyying</author><pubDate>Tue, 16 Jan 2018 16:36:01 +0800</pubDate><description><![CDATA[在使用面向对象的时候，总会被几个词迷惑，self 自己，this 这个  ，static 静态的，parent 父亲，到底这些是什么鬼，大家跟着我的实例走，就能洞悉其中的微妙了

self 被用作当前类的一个引用 


class a {

    public static function hello() {
        self::showHello();
    }

    publ]]></description><category></category></item><item><title><![CDATA[海明校验码详解]]></title><link>https://blog.youkuaiyun.com/coolskyying/article/details/78963550</link><guid>https://blog.youkuaiyun.com/coolskyying/article/details/78963550</guid><author>coolskyying</author><pubDate>Wed, 03 Jan 2018 17:25:04 +0800</pubDate><description><![CDATA[什么是海明码（提出者Richard Hamming ） 
     海明码是一种多重（复式）奇偶检错系统，用于检错和纠错。 
 如何确定校验码 
 其实计算海明校验码的值只需三步：
对于原始数据信息位m，计算得出需要的k位校验码如何确定最小的校验位数kk 
假设原有信息为mm位，则和校验位加起来长度有m+km+k.校验位数k可以确定 2k2^k 个状态,这些状态中必有一个其所有奇偶测试都是真的，于是]]></description><category></category></item><item><title><![CDATA[upstart重新唤起php进程]]></title><link>https://blog.youkuaiyun.com/coolskyying/article/details/78954085</link><guid>https://blog.youkuaiyun.com/coolskyying/article/details/78954085</guid><author>coolskyying</author><pubDate>Tue, 02 Jan 2018 17:46:07 +0800</pubDate><description><![CDATA[最近项目中有个php脚本进程自己偶尔挂掉了，每次都需要手动重启，用upstart可以轻松解决此问题说到upstart之前，我先来说下linux的启动过程，分为5个阶段 内核的引导–》运行init–》系统初始化–》建立终端–》用户登录 
 
而init程序的类型有 
SysV: init, CentOS 5之前, 配置文件： /etc/inittab
Systemd： systemd, CentOS]]></description><category></category></item></channel></rss>