halfrost / halfrost-field Goto Github PK
View Code? Open in Web Editor NEW✍🏻 这里是写博客的地方 —— Halfrost-Field 冰霜之地
Home Page: https://halfrost.com
License: Creative Commons Attribution Share Alike 4.0 International
✍🏻 这里是写博客的地方 —— Halfrost-Field 冰霜之地
Home Page: https://halfrost.com
License: Creative Commons Attribution Share Alike 4.0 International
RT。
拜服Hash Map一文,深感作者的研究思路清晰和细致,其中的图标也很好的起到了解析的作用,甚是好看,请问可以share这个工具吗?
hi 感謝對 flatbuffer encode 的詳細解說,
雖然沒寫過 go 但還是大致了解了 encode 的原理了
FlatBuffers 之 Encode 內序列化 table 的部分
最后一步需要修正 sword 对象头部的 offset,修改成距离 vtable 的 offset。由于当前 vtable 在低地址,所以 sword 对象在它的右边,offset 为正数,offset = vtable size = 8 字节。对应代码实现见第 10 步。
看起來第9步才是對的
原文:
Varint 的编码,以 300 举例:
此处,第二步有误,第一步得出的结果取后8位就是前面一个字节的编码结果,根据源码应该没有这一步。
在“Google S2 中 cellid 是如何生成的“一文中:
“上面这一步是把经纬度转换成弧度。由于经纬度是角度,弧度转角度乘以 π / 180° 即可”。
应该是“角度转弧度乘以 π / 180° 即可。“吧。
此外还有问题想请教一下,LatLngFromDegree()输入的经纬度参数的格式是 ”d.ddddd"还是度分秒的格式啊。
我看到RFC5246中7.2节说到Alert是被加密的
https://tools.ietf.org/html/rfc5246#section-7.2
Like other messages, alert messages are encrypted and compressed, as specified by the current connection state.
Change Cipher Spec Protocol也是被加密的
The protocol consists of a single message, which is encrypted and compressed under the current (not the pending) connection state.
你好,关注您好久了。今天看到您的博客框架,标题清晰,层级合理,我想问下您是自学前端写的博客页面吗?
我之前用过hexo
和ghost
,目前在用hexo
,不过必须将仓库名 命名为 username.github.io 的形式。
感谢回复~
# print a, 多了个逗号
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
Halfrost-Field/contents/Protocol/Protocol-buffers-encode.md
"由于 300 超过了 7 位(Varint 一个字节只有 7 位能用来表示数字,最高位 msb 用来表示后面是否有更多字节),所以 300 需要用 2 个字节来表示。"
"读到这里可能有读者会问了,Varint 不是为了紧凑 int 的么?那 300 本来可以用一个字节表示,现在变成 2 个字节了,哪里紧凑了,花费的空间反而变多了?!"
1个字节最多表示0-255, 300即便不用varint表示也是不能用1个字节来表示的。改成用200做例子就恰当了。
嘻嘻,学习一下
感觉大部分都是用机器翻译的,太难懂了:(
Halfrost-Field/contents/Protocol/Protocol-buffers-encode.md
3.4标量类型对应关系的图片中的注释标记对应的注释缺失
神奇的德布鲁因序列中:
第一次没看明白那个魔术的描述,我觉得应该加一个限定:魔术师实现是知道牌的排列顺序的,切牌后仍然是一个环路,只是魔术师不知道起点现在是哪张牌了。
你好,你的徽章好棒啊。我想问下,记录下载次数的徽章咋弄呢?我的下载次数统计是无效的,没找到好的方法。
Can you please remove colon(:) & chinese unicode character from few filenames? Its difficult to clone on windows system.
感觉你画的图挻不错的,想问下用什么画图软件画的?
geohash的相关文章写的非常棒,可以转载吗
你好!请问你用S2-geometry写的应用是用哪个版本的,最终需要架服务么?我用C++写的,现在不知道怎样用nodejs架服务,能指点一下么?多谢
十分好奇。。。。😂😂
如题
希望能转载您的文章go初学者成长之路
会注明出处,感激不尽
请问作者有没有考虑过把这里所有的 notebook 和 markdown 都放在一个 fastpages 里,这样阅读起来会方便太多,也方便对每一个 notebook 及时评论。
文章链接:深入研究 Block 用 weakSelf、strongSelf、@weakify、@strongify 解决循环引用
我注意到文章最后的更新说明,没清楚最后想说什么
例3:
#import "ViewController.h"
#import "Student.h"
@interface ViewController ()
@property (copy,nonatomic) NSString *name;
@property (strong, nonatomic) Student *stu;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
Student *student = [[Student alloc]init];
self.name = @"halfrost";
self.stu = student;
student.study = ^{
NSLog(@"my name is = %@",self.name);
};
student.study();
}
这里实际会造成循环引用 vc -> stu -> student -> study -> vc(self)。
https://github.com/halfrost/Halfrost-Field/blob/master/contents/Go/go_slice.md
func main() {
arrayA := [2]int{100, 200}
testArrayPoint(&arrayA) // 1.传数组指针
arrayB := arrayA[:]
testArrayPoint(&arrayB) // 2.传切片
fmt.Printf("arrayA : %p , %v\n", &arrayA, arrayA)
}
func testArrayPoint(x *[]int) {
fmt.Printf("func Array : %p , %v\n", x, *x)
(*x)[1] += 100
}
testArrayPoint方法传入的是切片的指针
testArrayPoint(&arrayA) // 1.传数组指针 这里不能传入数据指针
@halfrost
你好!
你博客里4阶希尔伯特曲线(带有红色数字标注)是错误的,那是翻转后的曲线,正确的应该是没有翻转的,你需要沿着左上到右下翻转一次,ij都弄反了。请及时更正,会误导人,谢谢。
想咨询下你的ghost博客的主题是哪个?
觉得还不错的两个go tutorials,
1.看到您写的tls协议分析很透彻,确认是个英文水平和代码逻辑很好的大牛,不知道可否提需求如标题?
2.afalg 和 ktls 为什么会同时出现?
《HTTPS 温故知新(一) —— 开篇》里面 (二、部署 HTTPS 有何好处)的第 7 点,ATS 写成 APS 了😂😂😂
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.