Posts
All the articles I've posted.
ZMQ DEMO 请求应答模式
Published: at 04:22 PM请求应答模式 介绍 这是最基本的一个模式,很常用,一个请求一个应答,发送和接收必须配对。 示例说明 客户端发送一个字符串,然后接收服务端的应答; 服务端收到字符串后将其转换为大写返回给客户端; 代...
业界消息总线技术分析-ZeroMQ
Published: at 02:54 PMZeroMQ的设计理念 引用官方的说法: “ZMQ (以下 ZeroMQ 简称 ZMQ)是一个简单好用的传输层,像框架一样的一个 socket library,他使得 Socket编程更加简单、简洁和性能更高。是一个消息处理队列库,可在多个线程、内核和主...
ntscreenshot截图工具开源了
Published: at 03:26 PMntscreenshot介绍 Windows截图工具,基本功能都实现了,还有一些细节上的优化。支持截图、贴图,基本的绘制,马赛克,字体颜色设置等等,日常使用的也比较多,运行稳定。开发陆陆续续也花了不少时间,源码地址(https//gite...
Python批量替换博客中七牛云图片地址
Published: at 02:47 PM博客里面的很多图片以前用的是七牛云,但是七牛云免费的不支持https导致目前博客里面的部分图片显示不出来,于是我把七牛云里面的所有图片都下载下来上传到博客所在的服务器上去,直接访问自己的服务器来展示,这样需要替...
接入腾讯AI智能闲聊API接口
Published: at 08:02 AM蛮有意思的一个接口就是你问什么它会给你一些回应,如: 问:你好啊 答:果然我的魅力无敌,终于把你吸引来了,哈哈哈 问:你是谁 答:我叫小豪豪,一定要记住,好不好嘛 文档地址https//ai.qq.com/doc/nlpchat.sht...
Go 实现简单端口扫描
Published: at 05:14 PM通过端口扫描我们可以知道服务器上哪些端口是处于监听状态。 借助Go net模块的DialTimeout方法可以很容易的判断端口是否打开,同时对于批量端口的扫描使用Go Routines实现非常简单。 主结构 type PortScanner...
Go 使用gomail发送邮件,包括附件
Published: at 10:01 AM这里使用的是gopkg.in/gomail.v2包,smtp协议。演示了发送日志目录。 准备 发送邮件首先要进行一些配置项,如下结构: type MailConf struct { User string Pass string Host string Port int ...
Go 使用zip压缩文件目录
Published: at 09:37 AM使用archive/zip包可以压缩目录为zip文件,流程如下: 1. 创建压缩后的目标文件(zip文件); 2. 使用zip writer向zip文件写入内容; 3. 遍历要压缩的目录,如果是文件就用zip writer写入; 4. 如果是目录,在父目录的基础...
截图软件窗口自动识别实现
Published: at 02:32 PM使用截图软件开始截图的时候,实际上是将当前桌面抓取成一张背景图(加点暗色的透明度),将背景图作为一个无边框的z-order顶级全屏窗口覆盖在桌面上,后续操作就在这个窗口上进行,类似一个当前桌面的快照。 这里要讲的...
推送消息版本号的设计与使用问题
Published: at 06:18 PM客户端服务端网络交互的时候最常用的就两种通信方法:请求应答和推送,在这两种场景同时存在的情况下客户端怎样保证与服务端的数据实时保持一致。 客户端可以分页请求服务端数据,同时为了保证数据实时更新还需要接收...