View polyline.go
This file contains 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
func EncodePolyline(coordinates []*Point) string { | |
if len(coordinates) == 0 { | |
return "" | |
} | |
factor := math.Pow(10, 5) | |
output := encode(coordinates[0].Lat, factor) + encode(coordinates[0].Lng, factor) | |
for i := 1; i < len(coordinates); i++ { | |
a := coordinates[i] |
View refresh-ever.go
This file contains 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" | |
"io/ioutil" | |
"net/http" | |
"os" | |
"strings" | |
"github.com/skratchdot/open-golang/open" | |
) |
View sleepsort.bash
This file contains 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
#!/bin/bash | |
function f() { | |
sleep "$1" | |
echo "$1" | |
} | |
while [ -n "$1" ] | |
do | |
f "$1" & | |
shift | |
done |
View ReadME
This file contains 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
This Validator focuses on validating | |
1.Name Field | |
2.Phone Number Field | |