GithubHelp home page GithubHelp logo

halfrost / halfrost-field Goto Github PK

View Code? Open in Web Editor NEW
12.8K 475.0 1.9K 102.82 MB

✍🏻 这里是写博客的地方 —— Halfrost-Field 冰霜之地

Home Page: https://halfrost.com

License: Creative Commons Attribution Share Alike 4.0 International

Objective-C 8.54% Ruby 0.10% Shell 0.21% Objective-C++ 0.13% C 3.42% JavaScript 0.57% Go 49.38% Jupyter Notebook 16.34% HTML 1.60% Stylus 1.71% CSS 18.00%
ios source-code objective-c swift javascript analyze article golang go machine-learning

halfrost-field's Issues

求Hash Map一文的绘图工具分享

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步才是對的

Protocol-buffers-encode中Varints编码举例有误

原文:
Varint 的编码,以 300 举例:

  1. 100101100 | 10000000 = 1 1010 1100
  2. 110101100 >> 7 = 1010 1100
  3. 100101100 >> 7 = 10 = 0000 0010
  4. 1010 1100 0000 0010 (最终 Varint 结果)

此处,第二步有误,第一步得出的结果取后8位就是前面一个字节的编码结果,根据源码应该没有这一步。

细节错误

在“Google S2 中 cellid 是如何生成的“一文中:

“上面这一步是把经纬度转换成弧度。由于经纬度是角度,弧度转角度乘以 π / 180° 即可”。

应该是“角度转弧度乘以 π / 180° 即可。“吧。
此外还有问题想请教一下,LatLngFromDegree()输入的经纬度参数的格式是 ”d.ddddd"还是度分秒的格式啊。

请问您博客的框架是怎么写的?

你好,关注您好久了。今天看到您的博客框架,标题清晰,层级合理,我想问下您是自学前端写的博客页面吗?
我之前用过hexoghost,目前在用hexo,不过必须将仓库名 命名为 username.github.io 的形式。
感谢回复~

请教一个关于cell id的问题

你好
在看cell_id 源码的时候看到这样一个代码,不求甚解,盼大佬解答:
image
zhe'g
这个next 就是把最小的精度位置直接+1了
希尔伯特的最小单元不是有4种u型么。。按理说 +1 不一定是cellId的next啊
那为啥这里是这样处理的呢?

Protocol-buffers-encode文章中的一个小BUG

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标量类型对应关系的图片中的注释标记对应的注释缺失

导数公式小bug

Machine Learning部分的梯度偏导数关系部分,第一个导数公式分子多了个右括号).

导数

🙂

神奇的德布鲁因序列的补充

神奇的德布鲁因序列中:

第一次没看明白那个魔术的描述,我觉得应该加一个限定:魔术师实现是知道牌的排列顺序的,切牌后仍然是一个环路,只是魔术师不知道起点现在是哪张牌了。

github徽章

你好,你的徽章好棒啊。我想问下,记录下载次数的徽章咋弄呢?我的下载次数统计是无效的,没找到好的方法。

Remove colon(:) from filename

Can you please remove colon(:) & chinese unicode character from few filenames? Its difficult to clone on windows system.

错别字

HTTPS 温故知新(二) —— TLS 记录层协议 中
Uploading image.png…
当 Server 接收并处理记录时会使用 Client 写参数,反之亦然。例如:Client 使用 client write MAC key、client write encryption key、client write IV 密钥块加密消息,Server 接收到以后,也需要使用 Client 的 client write MAC key、client write encryption key、client write IV 的密钥进行解密。

s2架服务

你好!请问你用S2-geometry写的应用是用哪个版本的,最终需要架服务么?我用C++写的,现在不知道怎样用nodejs架服务,能指点一下么?多谢

【文章勘误】深入研究 Block 用 weakSelf、strongSelf、@weakify、@strongify 解决循环引用

文章链接:深入研究 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)。

深入解析 Go 中 Slice 底层实现 中代码bug

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阶希尔伯特曲线错误

你好!
你博客里4阶希尔伯特曲线(带有红色数字标注)是错误的,那是翻转后的曲线,正确的应该是没有翻转的,你需要沿着左上到右下翻转一次,ij都弄反了。请及时更正,会误导人,谢谢。

how is used afalg function on openssl?

1.看到您写的tls协议分析很透彻,确认是个英文水平和代码逻辑很好的大牛,不知道可否提需求如标题?
2.afalg 和 ktls 为什么会同时出现?

细节错误

《HTTPS 温故知新(一) —— 开篇》里面 (二、部署 HTTPS 有何好处)的第 7 点,ATS 写成 APS 了😂😂😂

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.