![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Go
golang notes
zhenggao2
Focus on 4G/5G RAN planning & optimization, also interested in AI/DL.
展开
-
Export NRRG to excel using Excelize
exportNrrg使用Excelize包将NR resource grid导出为excel原创 2023-04-01 22:34:25 · 161 阅读 · 0 评论 -
Determine CCEs of each PDCCH Candidate
Determine CCEs of each PDCCH Candidate原创 2023-03-27 12:24:19 · 195 阅读 · 0 评论 -
Determine DCI FDRA and CORESET fdResources
HOWTO: determine DCI FDRA and CORESET fdResources原创 2023-03-22 22:33:56 · 199 阅读 · 0 评论 -
NRRG(NR Resource Grid Tool)重构:参数配置部分(2)
NRRG参数重构原创 2023-03-21 14:52:02 · 218 阅读 · 0 评论 -
NRRG(NR Resource Grid Tool)重构:参数配置部分
NRRG参数重构原创 2023-03-21 11:16:58 · 437 阅读 · 0 评论 -
Determine antenna port(s) of PTRS for PUSCH (2)
HOWTO: determine PTRS ports for CB PUSCH transmission原创 2023-03-02 10:21:14 · 112 阅读 · 0 评论 -
Determine antenna port(s) of PTRS for PUSCH (1)
HOWTO: determine association of PTRS ports and DMRS ports (PTRS for nonCB PUSCH)原创 2023-03-01 23:57:49 · 215 阅读 · 0 评论 -
Calculate SC#0 RB#0 of CORESET0
How to calculate iscCoreset0Sc0Rb0 (SC index of SC0-RB0 of CORESET0)?原创 2023-02-21 11:58:47 · 526 阅读 · 0 评论 -
Calculate N_CRB_SSB and k_SSB
HOWTO: calculate N_CRB_SSB and k_SSB given GSCN and ARFCN原创 2023-02-17 15:08:06 · 208 阅读 · 0 评论 -
Multiple RSSI sub-plots using gonum/plot
Show me the code:)const rows, cols = 2, 1 plots := make([][]*plot.Plot, rows) for j := 0; j < rows; j++ { plots[j] = make([]*plot.Plot, cols) for i := 0; i < cols; i++ { pl := plot.New() pl.Add(plotter.NewGrid()) pl.Ti原创 2021-09-05 23:37:46 · 256 阅读 · 0 评论 -
Using UniOffice for Excel export//pls use Excelize instead
Currently I'm working on a KPI report tool, which parses KPI definitions, loads DB PMs, calculates individual KPI and exports the KPI report as .xlsx.In order to use UniOffice(github:https://github.com/unidoc/unioffice) , you need a Free license:(1) r.原创 2021-06-25 08:45:26 · 1009 阅读 · 0 评论 -
golang notes(12)---use cobra+viper to replace qt
In order to focus on problem-solving, I’ve decided to use Cobra+Viper to replace existing thereceipe/qt GUI.Cobra: https://github.com/spf13/cobraViper: https://github.com/spf13/viperFor example:Use cmd ‘ngapp nrrg conf freqband -h’ to get helpD:\d原创 2020-09-26 08:16:39 · 290 阅读 · 0 评论 -
O-RAN notes(13)---Bronze E2 setup and O1-alarm example(2)
(continued)E2 setup(ricplt and odu-high) part 2I will introduce more details on E2Manager implementation.e2term source code: o-ran-sc-bronze-20200810\ric-plt.e2\RIC-E2-TERMINATION, which is implemented in C++e2mgr source code: o-ran-sc-bronze-2020081原创 2020-09-12 22:23:18 · 1414 阅读 · 0 评论 -
golang notes(11)--How to deploy Go+Qt App from Linux to Windows
refer tohttps://github.com/therecipe/qt/wiki/Deploying-Linux-to-Windows-64-bit-SharedFirst, "docker pull" the therecipe/qt:windows_64_shared image:$docker pull therecipe/qt:windows_64_sharedIt will take some time:(09:00 dabs@CNU1343VF8 ngapp) &g.原创 2020-08-02 09:13:18 · 462 阅读 · 0 评论 -
K8s and Docker notes (2.2)---Hands on with Deployment
(1) on both DebianNode and DebianNode2, retag "nigelpoulton/k8sbook:latest" to "nigelpoulton/k8sbook:edge" for ease of Deployment RollingUpdate, withoutdownloading the actual 'nigelpoulton/k8sbook:edge' docker image.$sudo docker images$sudo docker ta..原创 2020-06-15 12:41:10 · 285 阅读 · 0 评论 -
K8s and Docker notes (2.1)---Hands on with Pod
(1) Add a third k8s node DebianNode2:(21:35 dabs@CNU1343VF8 ~) > kubectl get nodesNAME STATUS ROLES AGE VERSIONcnu1343vf8 Ready master 17d v1.18.3debiannode Ready <none> 16d v1.18.3debiannode2 Rea原创 2020-06-15 08:38:23 · 194 阅读 · 0 评论 -
golang notes(10)---add Zap Logger to ngapp
part of utils/zaplog.go:// NewZapLogger initializes then returns a zap.Logger.func NewZapLogger(path string) *zap.Logger { dir := filepath.Dir(path) if exist, _ := exists(dir); !exist { if err := os.MkdirAll(dir, 0775); err != nil { panic(fmt.Sp原创 2020-06-14 12:05:39 · 291 阅读 · 2 评论 -
golang notes(9)--reimplementation of ngapp using go(UI part)
source file: ngapp.gopackage mainimport ( "github.com/therecipe/qt/core" "github.com/therecipe/qt/widgets")// NgApp contains the UI implementation.type NgApp struct { // enable debugging? enableDebug bool // widgets mainWin *widgets.QMainWi原创 2020-06-07 00:08:21 · 273 阅读 · 2 评论 -
golang notes (8)---therecipe/qt binding
6/5 update on therecipe/qt binding:refer to:https://github.com/therecipe/qtexport GO111MODULE=off; go get -v github.com/therecipe/qt/cmd/... && $(go env GOPATH)/bin/qtsetup test && $(go env GOPATH)/bin/qtsetup -test=falseNote: no n.原创 2020-06-06 00:43:39 · 312 阅读 · 0 评论 -
golang notes(7)---PAT (Basic Level) 1007-素数对猜想
Comparison of 'Sieve ofEratosthenes' and 'Sieve of Euler':Sieve of Eratosthenes (埃氏筛选法):func SieveOfEratosthenes(n int) int { p := make([]int, 0) flagNotPrime := make([]bool, n+1) // Sieve of Eratosthenes for i := 2; i <= n; i++ { if !flagNo.原创 2020-06-04 11:20:48 · 191 阅读 · 0 评论 -
golang notes (6)---PAT (Basic Level) 1002-写出这个数
using golang's math/big librarypackage mainimport ( "fmt" "math/big")func digits(n *big.Int) []int64 { d := make([]int64, 0) zero := big.NewInt(0) ten := big.NewInt(10) rem := big.NewInt(0) for n.Cmp(zero) > 0 { n, rem = n.DivMod(n, ten原创 2020-06-03 19:20:55 · 166 阅读 · 0 评论 -
golang notes(5)
After reading <Go in Action> and <Effective Go>, i am going to study the Go standard library next.6/2, notes on builtin and runtime package:slice.go, map.go and chan.go are of special interest within package runtime:Slice append opera原创 2020-06-02 11:04:57 · 250 阅读 · 0 评论 -
Kubernetes(K8s) and Docker notes (1.4)
(continued)(5,5) configure slave node and join the k8s clusterI'm using debian-testing in vmware as the slave node. You only need to install k8s and docker on slave node.Get token from master node if needed:(09:16 dabs@CNU1343VF8 ~) > kubectl原创 2020-05-29 09:45:30 · 918 阅读 · 0 评论 -
Kubernetes(K8s) and Docker notes (1.3)
(5,3) kubeadm init(21:26 dabs@CNU1343VF8 ~) > sudo kubeadm init --pod-network-cidr=10.244.0.0/16W0528 21:26:32.214961 129837 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config原创 2020-05-29 07:28:34 · 1192 阅读 · 0 评论 -
Kubernetes(K8s) and Docker notes (1.2)
(5.1) kubeadm config images pullavoid the "unknown manifest" error: pull images from mirrorgcrio, retag them, and finally untag them.$sudo kubeadm config images list |sed -e 's/^/docker pull /g' -e 's#k8s.gcr.io#mirrorgcrio#g' | sudo sh -x$sudo d.原创 2020-05-29 00:52:22 · 410 阅读 · 0 评论 -
Kubernetes(K8s) and Docker notes (1.1)
5/28, start reading <The Kubernetes Book>.用了几乎一天的时间研究install k8s with kubeadm and configure master node of k8s cluster,踩过不少坑,这里记录下来备查,也希望能帮助到有需要的同学。(1) install prerequisites (i'm using xubuntu 20.04)$sudo apt install apt-transport-https(2) .原创 2020-05-29 00:52:33 · 310 阅读 · 0 评论 -
LeetCode-May-Week4 Daily Challenge: Possible Bipartition
5/27 daily challenge:Possible BipartitionMy own solution, a bit faster than DFS(depth-first search):func possibleBipartition(n int, dislikes [][]int) bool { // key = ppl(1..n), val = group(0 or 1) group := make(map[int]int) ngroup := 0 for l..原创 2020-05-27 21:29:13 · 171 阅读 · 0 评论 -
LeetCode-May-Week4 Daily Challenge: Contiguous Array
5/26 Daily Challenge: Contiguous ArrayVery elegant and interestingidea:func findMaxLength(nums []int) int{ // dict keeps the 1st index of given key(=count), and let index=-1 for count=0 dict := make(map[int]int) dict[0] = -1 count := 0 maxL..原创 2020-05-27 04:02:48 · 161 阅读 · 0 评论 -
golang notes(4)
1, Execise: Web CrawlerSolution #1: use channel to synchronizegoroutines<cache *Cache> is used to avoid URL duplication <ch chan int> is used to wait for end of a goroutinefunc Crawl(url string, depth int, fetcher Fetcher, cache *Cache..原创 2020-05-23 22:31:50 · 215 阅读 · 0 评论 -
golang notes(3)
1, Execise:ErrorsNote:A call tofmt.Sprint(e)inside theErrormethod will send the program into an infinite loop. You can avoid this by convertingefirst:fmt.Sprint(float64(e)). Why?package mainimport ( "fmt")type ErrNegativeSqrt float64f...原创 2020-05-23 14:24:34 · 607 阅读 · 0 评论 -
golang notes(2)
1, IDE (goland)One may need 'jetbrains-agent-latest.zip':链接: https://pan.baidu.com/s/1Ze1TUhByRNX7BkAU8mNpIw 提取码: dx2k2, defer<Defer, Panic, and Recover> is an excellent doc:https://www.cnblogs.com/kaid/p/9698477.html3, Execise: Sl...原创 2020-05-22 22:20:04 · 521 阅读 · 0 评论 -
golang notes (1)
1, how to install Godownload binary release(latest is 1.14.3):https://golang.google.cn/dl/$sudo tar -C /usr/local -xzf go1.14.3.linux-amd64.tar.gz$vim ~/.profileexport PATH=$PATH:/usr/local/go/bin$source ~/.profile$go versiongo version go1.14.原创 2020-05-21 20:55:17 · 476 阅读 · 0 评论