FCFabio Cheninfabiochen.hashnode.dev·May 14, 2023 · 2 min readCompile Run and Debug C Program in WSLI use below softwares for C development in Windows 10. VS Code WSL 2 (Ubuntu) Install development tool sudo apt-get update sudo apt install gcc sudo apt-get install build-essential gdb sudo apt-get install make or sudo apt-get install build-essen...00
FCFabio Cheninfabiochen.hashnode.dev·Apr 17, 2023 · 1 min readInstall tree command in windows 10tree - list contents of directories in a tree-like format. https://linux.die.net/man/1/tree Step 1: Install gitbash Git for windows Step 2: Download Binaries of tree command tree Step 3: Put the tree command in folder Extract tree.exe to C:\Program...00
FCFabio Cheninfabiochen.hashnode.dev·Apr 15, 2023 · 2 min readUse Go Module Step By Step GuideIt is frustrating using Go Module for new Goer. This guide will not talk about too much how does Go find the package/modules but will show you step-by-step how to create and test a module in a Windows system. Assumption Go version >= 1.16 Go is set...00
FCFabio Cheninfabiochen.hashnode.dev·Apr 15, 2023 · 1 min readGolang 实例 - channel的使用需求 协程每隔1秒, 连续3次打印 [go routine] working on it. 然后把ping通过channel通知主线程任务完成. 主线程接收到ping后, 打印 [main] All done, 然后程序退出. 这个例子演示了 go channel 的简单使用. 代码 package main import ( "fmt" "time" ) func worker(chanWorker chan string) { fmt.Printf("[go ...00
FCFabio Cheninfabiochen.hashnode.dev·Apr 4, 2023 · 1 min readGolang - iotaRequirement Define a function to return a storage size string in a human reading format (KB, MB etc) type ByteSize float64 const ( _ = iota KB ByteSize = 1 << (10 * iota) MB GB TB PB EB ZB YB ) func (b ...00