sudo apt-get update
sudo apt-get install -y apache2
sudo vi /etc/apache2/ports.conf
:
// Converts the data created by Fitbit export from the output JSON | |
// to comma-separated values. | |
// go run main.go > weight.csv | |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"os" |
package main | |
import ( | |
"flag" | |
"fmt" | |
"github.com/Masterminds/semver/v3" | |
) | |
var vFlag = flag.String("version", "0.1", "version to check") |
// Given an array of integers that is already sorted in ascending | |
// order find two numbers such that they add up to a specific target number. | |
// | |
// The function twoSum should return indices of the two numbers such that | |
// they add up to the target where index1 must be less than index2. | |
package main | |
import ( | |
"errors" | |
"fmt" |
from decimal import Decimal | |
class Node: | |
def __init__(self, label): | |
self.label = label | |
class Edge: | |
def __init__(self, to_node, length): | |
self.to_node = to_node | |
self.length = length |
// Go 2 Playground: https://go2goplay.golang.org/ | |
// | |
// Or to install the go2go tool: | |
// git clone https://go.googlesource.com/go goroot | |
// cd ./goroot | |
// git checkout dev.go2go | |
// cd ./src | |
// CGO_ENABLED=0 ./all.bash | |
// export PATH=/path/to/your/goroot/bin:$PATH | |
// |
package main | |
import "fmt" | |
type node struct { | |
v int | |
l *node | |
r *node | |
} |
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
// multiples uses a done channel to shut down | |
func multiples(i int) (chan int, chan struct{}) { | |
out := make(chan int) |
package main | |
import "fmt" | |
type Error struct { | |
Message string | |
} | |
func (e *Error) Error() string { | |
return "an error occured" |