<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[lsj3210的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/lsj3210</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; lsj3210]]></copyright><item><title><![CDATA[四、大话设计模式 之 代理模式]]></title><link>https://blog.youkuaiyun.com/lsj3210/article/details/53184747</link><guid>https://blog.youkuaiyun.com/lsj3210/article/details/53184747</guid><author>lsj3210</author><pubDate>Wed, 16 Nov 2016 11:24:04 +0800</pubDate><description><![CDATA[模式特点：为其他对象提供一种代理以控制对这个对象的访问。
程序实例：同模式特点描述。
package main

import (
"fmt"
)

type SchoolGirl struct {
name string
}

func (s *SchoolGirl) setName(name string) {
s.name = name
}

func (s *SchoolGirl) g]]></description><category></category></item><item><title><![CDATA[三、大话设计模式 之 装饰模式]]></title><link>https://blog.youkuaiyun.com/lsj3210/article/details/53184717</link><guid>https://blog.youkuaiyun.com/lsj3210/article/details/53184717</guid><author>lsj3210</author><pubDate>Wed, 16 Nov 2016 11:21:18 +0800</pubDate><description><![CDATA[模式特点：动态地为对象增加额外的职责
程序实例：展示一个人一件一件穿衣服的过程。
package main

import (
"fmt"
)

type Person struct {
Name string
}

func (p *Person) show() {
fmt.Println("装扮的", p.Name)
}

type AbstractPerson interface {
s]]></description><category></category></item><item><title><![CDATA[二、大话设计模式 之 策略模式]]></title><link>https://blog.youkuaiyun.com/lsj3210/article/details/53184635</link><guid>https://blog.youkuaiyun.com/lsj3210/article/details/53184635</guid><author>lsj3210</author><pubDate>Wed, 16 Nov 2016 11:15:34 +0800</pubDate><description><![CDATA[模式特点：定义算法家族并且分别封装，它们之间可以相互替换而不影响客户端。
程序实例：商场收银软件，需要根据不同的销售策略方式进行收费
package main

import (
"fmt"
)

type cashSuper interface {
AcceptCash(float64) float64
}

type cashNormal struct {
}

func (normal ]]></description><category></category></item><item><title><![CDATA[一、大话设计模式 之 简单工厂模式]]></title><link>https://blog.youkuaiyun.com/lsj3210/article/details/53183397</link><guid>https://blog.youkuaiyun.com/lsj3210/article/details/53183397</guid><author>lsj3210</author><pubDate>Wed, 16 Nov 2016 09:43:53 +0800</pubDate><description><![CDATA[模式特点：工厂根据条件产生不同功能的类。
程序实例：四则运算计算器，根据用户的输入产生相应的运算类，用这个运算类处理具体的运算。

package main

import (
"fmt"
)

//BaseOperation接口
type Operation interface {
getResult() float64
SetNumA(float64)
SetNumB(float64)]]></description><category></category></item><item><title><![CDATA[值得学习的C/CPP开源项目]]></title><link>https://blog.youkuaiyun.com/lsj3210/article/details/53044012</link><guid>https://blog.youkuaiyun.com/lsj3210/article/details/53044012</guid><author>lsj3210</author><pubDate>Sat, 05 Nov 2016 10:44:10 +0800</pubDate><description><![CDATA[值得学习的C语言开源项目
-1. Webbench
Webbench是一个在linux下使用的非常简单的网站压测工具。它使用fork()模拟多个客户端同时访问我们设定的URL，测试网站在压力下工作的性能，最多可以模拟3万个并发连接去测试网站的负载能力。Webbench使用C语言编写, 代码实在太简洁，源码加起来不到600行。 
下载链接：http://home.tiscali.cz/~cz2]]></description><category></category></item><item><title><![CDATA[Go语言用container/list实现栈（Stack）]]></title><link>https://blog.youkuaiyun.com/lsj3210/article/details/52942916</link><guid>https://blog.youkuaiyun.com/lsj3210/article/details/52942916</guid><author>lsj3210</author><pubDate>Thu, 27 Oct 2016 10:03:10 +0800</pubDate><description><![CDATA[go语言中的container有heap、list、ring，没有stack。

其中heap是优先级队列，虽然有Push()/Pop()接口，但是使用heap要实现heap.Interface接口，不够简洁。

所以这里用list封装了一个简单的stack，留作他用。

 package stack
 
 import "container/list"
 
 type Stack s]]></description><category></category></item></channel></rss>