<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[zengchen73的专栏]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/zengchen73</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; zengchen73]]></copyright><item><title><![CDATA[Hermes Agent：一个真正会“自我成长”的 AI 助手]]></title><link>https://blog.csdn.net/zengchen73/article/details/160224154</link><guid>https://blog.csdn.net/zengchen73/article/details/160224154</guid><author>zengchen73</author><pubDate>Thu, 16 Apr 2026 18:06:27 +0800</pubDate><description><![CDATA[一个越用越懂你的AI Agent]]></description><category></category></item><item><title><![CDATA[以太坊如何部署智能合约]]></title><link>https://blog.csdn.net/zengchen73/article/details/81232468</link><guid>https://blog.csdn.net/zengchen73/article/details/81232468</guid><author>zengchen73</author><pubDate>Fri, 27 Jul 2018 10:15:42 +0800</pubDate><description><![CDATA[以太坊社区开发并开源了非常好用的在线 Solidity 集成开发环境Remix，可以方便的在 Remix 中编写、部署、测试智能合约，Remix 提供了强大的自动完成，语法高亮，实时编译检查错误等。打开remix，界面如下：



在代码区输入一下合约代码：


pragma solidity ^0.4.21;

contract Phone {
    string public model;
...]]></description><category></category></item><item><title><![CDATA[go学习笔记 － 接口]]></title><link>https://blog.csdn.net/zengchen73/article/details/81195836</link><guid>https://blog.csdn.net/zengchen73/article/details/81195836</guid><author>zengchen73</author><pubDate>Wed, 25 Jul 2018 09:23:18 +0800</pubDate><description><![CDATA[接口是golang最重要的特性之一，在Go中，接口interface其实和其他语言的接口意思没什么区别。interface理解其为一种类型的规范或者约定。一种类型是不是“实现”了一个接口呢？就看这种类型是不是实现了接口中定义的所有方法。接⼝是一个或多个方法签名的集合，任何非接口类型只要拥有与之对应的全部方法实现 (包括相同的名称、参数列表以及返回值。)，就表示它&quot;实现&quot; 了该接口，无需显式在该类型...]]></description><category></category></item><item><title><![CDATA[go爬虫设计(并发版)]]></title><link>https://blog.csdn.net/zengchen73/article/details/81137850</link><guid>https://blog.csdn.net/zengchen73/article/details/81137850</guid><author>zengchen73</author><pubDate>Fri, 20 Jul 2018 20:16:23 +0800</pubDate><description><![CDATA[ 

在单机版的基础上，将耗时最长，等待时间做多的进行并发 ，也就是Fetch模块

Fetch的输出就是Parse的输入，也就是可以把Fetch和Parse合成一个模块 －－ worker模块





func ( ConcurrentEngine) Run(seeds ...Request){
	var requests  []Request

	for _, r := range seed...]]></description><category></category></item><item><title><![CDATA[go网络编程基础]]></title><link>https://blog.csdn.net/zengchen73/article/details/81124464</link><guid>https://blog.csdn.net/zengchen73/article/details/81124464</guid><author>zengchen73</author><pubDate>Thu, 19 Jul 2018 23:28:23 +0800</pubDate><description><![CDATA[socket

socket原理

Socket 原理

Socket 连接,至少需要一对套接字，分为 clientSocket，serverSocket 连接分为3个步骤:

(1) 服务器监听:服务器并不定位具体客户端的套接字，而是时刻处于监听状态；
	(2) 客户端请求:客户端的套接字要描述它要连接的服务器的套接字，提供地址和端口号，然后向服务器套接字提出连接请求；
	(3) 连接确认:当服...]]></description><category></category></item><item><title><![CDATA[go爬虫设计(单机版)]]></title><link>https://blog.csdn.net/zengchen73/article/details/81109581</link><guid>https://blog.csdn.net/zengchen73/article/details/81109581</guid><author>zengchen73</author><pubDate>Thu, 19 Jul 2018 10:29:10 +0800</pubDate><description><![CDATA[爬虫总体架构：



 

 

爬虫实现方案：

 



 

 

单机版

 

单机版架构



主要模块有：

处理引擎（Engine）
	解析器（Parser）
	下载器（Fetcher）
流程：

请求处理模型＝请求URL ＋ URL对应的Parse

0: 先向引擎发起一个种子请求处理模型（URL＋Parse）
	1: 引擎将请求放入任务队列中
	2: 引擎从任务队列中取出请求处...]]></description><category></category></item><item><title><![CDATA[Go中使用Channel等待所有协程结束]]></title><link>https://blog.csdn.net/zengchen73/article/details/81088831</link><guid>https://blog.csdn.net/zengchen73/article/details/81088831</guid><author>zengchen73</author><pubDate>Tue, 17 Jul 2018 21:29:30 +0800</pubDate><description><![CDATA[让main方法等待所有协程执行完毕再退出。可能一般思路是设置一个共有变量，然后通过修改这个变量的状态。这是通过共享变量来通信的方式，而go要做的是，通过通信来共享内存。


1. 按顺序执行

每次通信进行成对通信，当main向协程发送一个写channel时，同时也等待协程返回一个读channel。    

这两个channel一定是成对的，所以构造一个结构体            



ty...]]></description><category></category></item><item><title><![CDATA[Go语言最主要的特性]]></title><link>https://blog.csdn.net/zengchen73/article/details/81048097</link><guid>https://blog.csdn.net/zengchen73/article/details/81048097</guid><author>zengchen73</author><pubDate>Sat, 14 Jul 2018 22:11:14 +0800</pubDate><description><![CDATA[自动垃圾回收更丰富的内置类型函数多返回值错误处理匿名函数和闭包类型和接口并发编程反射语言交互性更丰富的内置类型数组，字符串，字典（Map），数组切片（Slice）因为是语言内置特性,开发者根本不用费事去添加依赖的包,既可以少一些输入工作量,也 可以让代码看起来尽量简洁。函数多返回值目前的主流语言中除Python外基本都不支持函数的多返回值功能 Go语言革命性地在静态开发语言阵营中率先提供了多返回值...]]></description><category></category></item><item><title><![CDATA[go的错误处理机制]]></title><link>https://blog.csdn.net/zengchen73/article/details/81023902</link><guid>https://blog.csdn.net/zengchen73/article/details/81023902</guid><author>zengchen73</author><pubDate>Thu, 12 Jul 2018 23:16:20 +0800</pubDate><description><![CDATA[defergo语言是实用defer做资源处理的defer是在函数结束，return之前时被调用	先进后出，可见是栈的结构	参数在defer语句时计算	何时使用deferopen/closelock/unlockprintHeader/printFooterfunc calc(index string, a, b int) int {
	ret := a + b
	fmt.Printf(&quot;%s %d...]]></description><category></category></item><item><title><![CDATA[如何通过Remix发布以太坊智能合约]]></title><link>https://blog.csdn.net/zengchen73/article/details/80996501</link><guid>https://blog.csdn.net/zengchen73/article/details/80996501</guid><author>zengchen73</author><pubDate>Wed, 11 Jul 2018 10:35:29 +0800</pubDate><description><![CDATA[以太坊社区开发并开源了非常好用的在线 Solidity 集成开发环境Remix，可以方便的在 Remix 中编写、部署、测试智能合约，Remix 提供了强大的自动完成，语法高亮，实时编译检查错误等。打开remix，界面如下：在代码区输入一下合约代码：pragma solidity ^0.4.21;

contract Phone {
    string public model;
    int...]]></description><category></category></item><item><title><![CDATA[go反射机制]]></title><link>https://blog.csdn.net/zengchen73/article/details/80955831</link><guid>https://blog.csdn.net/zengchen73/article/details/80955831</guid><author>zengchen73</author><pubDate>Sat, 07 Jul 2018 23:24:35 +0800</pubDate><description><![CDATA[1. 反射定律反射可以将“接口类型变量”转换为“反射类型对象”。反射可以将“反射类型对象”转换为“接口类型变量”。如果要修改“反射类型对象”，其值必须是“可写的”。a. “接口类型变量”=&amp;gt;“反射类型对象”所谓的反射类型，就是reflect.Type和reflect.Value	var a int = 30

	v := reflect.ValueOf(a)  //返回Value类型对象，值...]]></description><category></category></item><item><title><![CDATA[go的可变参数]]></title><link>https://blog.csdn.net/zengchen73/article/details/80934496</link><guid>https://blog.csdn.net/zengchen73/article/details/80934496</guid><author>zengchen73</author><pubDate>Thu, 05 Jul 2018 23:19:33 +0800</pubDate><description><![CDATA[go语言的方法没用花哨的方法重载之类的，没有默认参数，没有可选参数，只有一个可变参数	func TestArgs(f int, arg ...interface{}){
	fmt.Println(f, arg)
}

func main(){
	nums := []int{1,2,3,4}
	nums2 := []interface{}{5,6,7,8}


	TestArgs(nums)    ...]]></description><category></category></item><item><title><![CDATA[go语言的类型定义方式]]></title><link>https://blog.csdn.net/zengchen73/article/details/80905884</link><guid>https://blog.csdn.net/zengchen73/article/details/80905884</guid><author>zengchen73</author><pubDate>Tue, 03 Jul 2018 23:29:02 +0800</pubDate><description><![CDATA[a. 使用var	var c1 chan int 
	fmt.Println(c1)        // &amp;lt;nil&amp;gt;

	var c2 map[string]int
	fmt.Println(c2)        // map[]   
	c2[“a”] = 1            // error :panic: assignment to entry in nil map

	v...]]></description><category></category></item><item><title><![CDATA[MAC环境变量]]></title><link>https://blog.csdn.net/zengchen73/article/details/80168138</link><guid>https://blog.csdn.net/zengchen73/article/details/80168138</guid><author>zengchen73</author><pubDate>Wed, 02 May 2018 16:25:18 +0800</pubDate><description><![CDATA[Mac系统的环境变量，加载顺序为： 
/etc/profile      
/etc/paths    
~/.bash_profile      
~/.bash_login 
~/.profile   
~/.bashrc
规则：
a ,b是系统级别的，系统启动就会加载，其余是用户接别的。
c,d,e按照从前往后的顺序读取，如果c文件存在，则后面的几个文件就会被忽略不读了，以此类推。
~/.ba]]></description><category></category></item><item><title><![CDATA[Python之IO编程]]></title><link>https://blog.csdn.net/zengchen73/article/details/77057081</link><guid>https://blog.csdn.net/zengchen73/article/details/77057081</guid><author>zengchen73</author><pubDate>Thu, 10 Aug 2017 16:20:27 +0800</pubDate><description><![CDATA[1.IO编程1.1 同步IO和异步IOIO编程中，Stream（流）是一个很重要的概念，可以把流想象成一个水管，数据就是水管里的水，但是只能单向流动。Input Stream就是数据从外面（磁盘、网络）流进内存，Output Stream就是数据从内存流到外面去。对于浏览网页来说，浏览器和新浪服务器之间至少需要建立两根水管，才可以既能发数据，又能收数据。由于CPU和内存的速度远远高于外设的速度，所以]]></description><category></category></item><item><title><![CDATA[python 面向对象编程]]></title><link>https://blog.csdn.net/zengchen73/article/details/76532808</link><guid>https://blog.csdn.net/zengchen73/article/details/76532808</guid><author>zengchen73</author><pubDate>Tue, 01 Aug 2017 15:33:51 +0800</pubDate><description><![CDATA[类与对象class Student(object):
    passstu = Student
s = Student()print (stu)
print (Student)
print (s)结果是：<class '__main__.Student'>
<class '__main__.Student'>
<__main__.Student object at 0x000002E28CE33E]]></description><category></category></item><item><title><![CDATA[递归与迭代]]></title><link>https://blog.csdn.net/zengchen73/article/details/76400758</link><guid>https://blog.csdn.net/zengchen73/article/details/76400758</guid><author>zengchen73</author><pubDate>Sun, 30 Jul 2017 18:06:59 +0800</pubDate><description><![CDATA[1. 递归1.11.2 递归形式1.2.1 无返回值
样式1
def st(n):
    if n <= 0:
        return
    #print (n)
    st(n-1)
    print (n)
print (st(5))#----------
1
2
3
4
5
None－ 样式2def st(n):
    if n <= 0:
        return]]></description><category></category></item><item><title><![CDATA[Python 日志]]></title><link>https://blog.csdn.net/zengchen73/article/details/76262358</link><guid>https://blog.csdn.net/zengchen73/article/details/76262358</guid><author>zengchen73</author><pubDate>Fri, 28 Jul 2017 15:28:21 +0800</pubDate><description><![CDATA[1. logging levels官网： https://docs.python.org/3/tutorial/stdlib2.html#logging把print()替换为logging是第3种方式，和assert比，logging不会抛出错误，而且可以输出到文件：
  Level
  Numeric value
  何时使用  CRITICAL
  50
  严重错误，表明软件已不能继续运行了。]]></description><category></category></item><item><title><![CDATA[Python之错误，调试和测试]]></title><link>https://blog.csdn.net/zengchen73/article/details/76121821</link><guid>https://blog.csdn.net/zengchen73/article/details/76121821</guid><author>zengchen73</author><pubDate>Wed, 26 Jul 2017 10:20:48 +0800</pubDate><description><![CDATA[1.  错误处理1.1 try …except…1.1.1 try …except…try:
    print ("try...")
    r = 10 / 0
  print ("result:",r)
except ZeroDivisionError as e:
    print ("except:",e)
finally:
    print ("finally...")
print (]]></description><category></category></item><item><title><![CDATA[Python之模块]]></title><link>https://blog.csdn.net/zengchen73/article/details/76070562</link><guid>https://blog.csdn.net/zengchen73/article/details/76070562</guid><author>zengchen73</author><pubDate>Tue, 25 Jul 2017 14:55:03 +0800</pubDate><description><![CDATA[1. 模块1.1 模块（Module）在Python中，一个.py文件就称之为一个模块（Module）。最大的好处是大大提高了代码的可维护性。 
其次，编写代码不必从零开始。 
使用模块还可以避免函数名和变量名冲突。1.2 包（Package）你也许还想到，如果不同的人编写的模块名相同怎么办？为了避免模块名冲突，Python又引入了按目录来组织模块的方法，称为包（Package）。请注意，每一个包目]]></description><category></category></item></channel></rss>