This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "math" | |
| ) | |
| func distance(lat1 float64, lng1 float64, lat2 float64, lng2 float64, unit ...string) float64 { | |
| const PI float64 = 3.141592653589793 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| VERSION=3.6.1 | |
| sudo apt-get install autoconf automake libtool curl make g++ unzip | |
| curl -OL protobuf-all-$VERSION.tar.gz. | |
| cd protobuf-3.6.1 | |
| ./configure && make && make check | |
| sudo make install | |
| sudo ldconfig # refresh shared library cache. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package components | |
| import "syscall" | |
| func setpriority() { | |
| syscall.Setpriority(syscall.PRIO_PGRP, 0, 9) | |
| } |