自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 资源 (1)
  • 收藏
  • 关注

原创 Go中依赖注入工具的实现原理,基于github.com/google/wire的源码分析

go 依赖注入工具的实现。 版本 github.com/google/wire ducumentation: 官方文档 这个工具有两个主要的核心观念一个是 provider sets 一个是 injector, injector 根据 provider中的依赖定义生成 factory 函数,算是一个代码生成工具吧,比较好用。 import ( // ... "github.com/google/wire" ) 库本身:"github.com/google/wire" 这里面的代码没有任何

2021-12-21 14:58:18 651

原创 Go1.18beta,浅谈泛型实现原理

Go 1.18 Release Notes 编译后的代码实际上有两份。一个是给 Float 准备的, 一个是给int准备的,有个疑问是传入的是两个参数,一个是栈上的数据,一个是静态数据,静态数据用于在里面给interface初始化用。 可能是这样的。 为什么要搞个 .dic.func ?? 不麻烦吗? 如果内置的数据一样呢,struct 数据呢? 内置数据一样的情况: type mytype int var a mytype = 1 Printkk(a) 如果underlying的数据结构是一样的,

2021-12-19 17:59:24 602

原创 Go中的反射、interface的使用和原理,基于go-querystring/query的源码分析

版本: github.com/google/go-querystring v1.1.0 使用方法: query.Values(opt) 用来解析一个 struct 结构题: 调用方: func main () { type Options struct { Query string `url:"q"` ShowAll bool `url:"all"` Page int `url:"page"` } opt := Options{ "foo", true, 2 }

2021-12-19 15:45:46 435

原创 文件和操作系统--技术文章分享 02

The Perils of File Typing 文章连接: https://invisibleup.com/articles/34/ 问题来源 Suppose you double-click on a file on your computer. You’re doing this so you can open the file and work with it. But does your operating system know what that means? How does it kn

2021-09-11 21:45:53 86

原创 【图像分割】有关上采样的百度图像分割图示笔记

课程链接:百度图像分割 双线性插值采样: 反卷积上采样: FCN经典结构: CROP操作:

2020-10-25 11:47:37 151 1

原创 【飞桨】paddle 目标检测第一天笔记

【飞桨】paddle 目标检测第一天笔记 paddle 目标检测第一天笔记: 基础知识: #------ leave layer (input or pump) x = fluid.layers.data(name='x', shape=[13], dtype='float32') x = fluid.layers.create_tensor(name='x', shape=[13], dtype='float32') y = fluid.layers.data(name='y', shape=[1], d

2020-09-22 19:00:03 451

kernel.rar

linux0.11

2021-03-01

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除