会员
周边
新闻
博问
闪存
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
好好爱自己!
牛顿的小脑
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
24
25
26
27
28
29
30
31
32
···
179
下一页
2021年4月19日
【转】go uintptr unsafe Pointer offset() 的使用
摘要: 原文: https://blog.csdn.net/yzf279533105/article/details/97143100 package main import ( "fmt" "unsafe" "log" ) type Person struct { name string age int
阅读全文
posted @ 2021-04-19 13:24 立志做一个好的程序员
阅读(203)
评论(0)
推荐(0)
2021年4月16日
unsafe.Sizeof 和 unsafe.Offsetof 的理解
摘要: Alignof返回的对齐数是结构体中最大元素所占的内存数,不超过8, 参考:https://studygolang.com/articles/21827 unsafe.Sizeof 和 unsafe.Offsetof 的理解 package main import ( "fmt" "unsafe"
阅读全文
posted @ 2021-04-16 15:49 立志做一个好的程序员
阅读(881)
评论(0)
推荐(0)
【转】GO 利用unsafe.Sizeof,Alignof,Offsetof理解内存对齐
摘要: 原文: https://studygolang.com/articles/21827 以下讲解均在64位系统下进行 基础类型大小 typesize/bytes bool 1 intN, uintN, floatN, complexN N/8 int, uint, uintptr 1 *T 1 str
阅读全文
posted @ 2021-04-16 15:29 立志做一个好的程序员
阅读(329)
评论(0)
推荐(0)
go里面两个整数相除,默认是向下取整
摘要: https://www.digitalocean.com/community/tutorials/how-to-do-math-in-go-with-operators#:~:text=If%20we're%20dividing%20integers,than%20or%20equal%20to%2
阅读全文
posted @ 2021-04-16 09:41 立志做一个好的程序员
阅读(2016)
评论(0)
推荐(0)
2021年4月15日
NGINX:查看并发连接数
摘要: 转,原文:https://www.cnblogs.com/lianzhilei/p/6025267.html Nginx查看并发连接 通过界面查看 通过界面查看通过web界面查看时Nginx需要开启status模块,也就是安装Nginx时加上 --with-http_stub_status_modu
阅读全文
posted @ 2021-04-15 10:29 立志做一个好的程序员
阅读(459)
评论(0)
推荐(0)
2021年4月12日
golang slice的声明和初始化
摘要: 为什么会报错呢? 为什么用append()却不会报错?? 用s[i] = i+3 这种方法会报错 package main import ( "log" ) func main() { s := make([]int, 2, 3) for i:= 0; i< 10; i++ { //s = appe
阅读全文
posted @ 2021-04-12 10:02 立志做一个好的程序员
阅读(1566)
评论(0)
推荐(0)
2021年4月8日
golang 中 mmap 的使用
摘要: https://www.jianshu.com/p/964b887da04c package main import ( "fmt" "os" "syscall" ) const maxMapSize = 0x8000000000 const maxMmapStep = 1 << 30 // 1GB
阅读全文
posted @ 2021-04-08 16:46 立志做一个好的程序员
阅读(3829)
评论(0)
推荐(0)
2021年4月7日
【转】atomicity,consistency,isolation,durability
摘要: 数据库事务的ACID特性理解: 转,原文: https://www.jianshu.com/p/fc8a654f2205 事务具有4个特征,分别是原子性、一致性、隔离性和持久性,简称事务的ACID特性; 一、原子性(atomicity) 一个事务要么全部提交成功,要么全部失败回滚,不能只执行其中的一
阅读全文
posted @ 2021-04-07 15:40 立志做一个好的程序员
阅读(242)
评论(0)
推荐(0)
字节序--大端字节序和小端
摘要: https://www.cnblogs.com/liujie-php/p/10716811.html https://www.cnblogs.com/onedime/archive/2012/11/20/2779707.html 学了这么多年C语言、C++、VC、MFC,但却从来没有认真研究过各种数
阅读全文
posted @ 2021-04-07 14:00 立志做一个好的程序员
阅读(555)
评论(0)
推荐(0)
【转】go语言中int和byte转换方式
摘要: 转,原文: https://www.cnblogs.com/liujie-php/p/10716811.html 主机字节序 主机字节序模式有两种,大端数据模式和小端数据模式,在网络编程中应注意这两者的区别,以保证数据处理的正确性;例如网络的数据是以大端数据模式进行交互,而我们的主机大多数以小端模式
阅读全文
posted @ 2021-04-07 13:22 立志做一个好的程序员
阅读(1640)
评论(0)
推荐(0)
上一页
1
···
24
25
26
27
28
29
30
31
32
···
179
下一页
公告
不断学习创作,与自己快乐相处