Searching We.Love.Privacy.Club

Twts matching #8:
Sort by: Newest, Oldest, Most Relevant

Move mastered
Finally it’s done, after a super exhausting day, I’m finally lying in bed, the move is done! All the furniture I need and also a total of 18 moving boxes with my stuff are now here. My girlfriend and her family helped me with it. With a total of 8 people, everything went quickly and before 3pm we were ready so that my girlfriend could help me unpack boxes. ⌘ Read more

⤋ Read More

从 CPU 角度理解 Go 中的结构体内存对齐
大家好,我是 Go 学堂的渔夫子。今天跟大家聊聊结构体字段内存对齐相关的知识点。

原文链接: https://mp.weixin.qq.com/s/H3399AYE1MjaDRSllhaPrw

大家在写 Go 时有没有注意过,一个 struct 所占的空间不见得等于各个字段加起来的空间之和,甚至有时候把字段的顺序调整一下,struct 的所占空间又有不同的结果。

本文就从 cpu 读取内存的角度来谈谈内存对齐的原理。

01 结构体字段对齐示例

我们先从一个示例开始。T1 结构体,共有 3 个字段,类型分别为 int8,int64,int32。所以变量 t1 所属的类型占用的空间应该是 1+8+4=13 字节。但运行程序后,实际上是 24 字节。和我们计算的 13 字节不一样啊。如果我们把该结构体的字段调整成 T2 那样,结果是 16 字节。但和 13 字节还是不一样。这是为什么呢?

”`
type T1 struct {

f1 int8  // 1 byte
f2 int64 // ... ⌘ [Read more](https://gocn.vip/topics/20967)```

⤋ Read More

How to convert USB webcams to HDMI
There are a handful of interesting USB webcams out there, which naturally work great with a computer. But what if you want to combine video from a USB webcam with your HDMI cameras in a video switcher like the ATEM Mini? ⌘ Read more

⤋ Read More

潘娟:Keep open,Stay tuned 开源为我打开的全新世界 | TiDB Hackathon 2021 评委访谈
距离 2022.1.8-9 比赛日,已不到两周时间,想必各位参赛选手已经摩拳擦掌,开始准备自己的项目了。\
在等待最终比赛日的这段时间,TiDB 社区采访了本届 Hackathon 中的一位女性评委,她在数据库领域中耕耘多年,从 DBA 到创业者,具有着传奇色彩的人生经历。\
我们通过访谈记录了她对开源的理解与感悟,同时探讨 Hackathon 活动的� … ⌘ Read more

⤋ Read More

GinAdmin 后台管理模板

GinAdmin

这个项目是以 Gin 框架为基础搭建的后台管理平台,虽然很多人都认为 go 是用来开发高性能服务端项目的,但是也难免有要做 web 管理端的需求,总不能再使用别的语言来开发吧。所以整合出了 GinAdmin 项目,请大家多提意见指正!欢迎 star ⭐⭐

Image

Image

依赖
  • golang > 1.8
  • Gin
  • BootStrap
  • LayUi
  • WebUpload
  • [Light Year Admin Using Ifra … ⌘ Read more

⤋ Read More