Go exercises: Maps

Exercise: Maps package main import ( “golang.org/x/tour/wc” “strings” ) func WordCount(s string) map[string]int { stringAr := strings.Fields(s) result := make(map[string]int) for i:=range stringAr { v :=result[stringAr[i]] result[stringAr[i]] = v+1 } return result } func main() { wc.Test(WordCount) }

Go exercises: Slices

GoLang tutorial has a task – Create slices for picture package main import ( “golang.org/x/tour/pic” ) func Pic(dx, dy int) [][]uint8 { result := make([][]uint8,dy) for i:=range result { innerS := make([]uint8, dx) for j := range innerS { switch { case i*j % 15 == 0: innerS[j] = 240 case i/j % 3 ==… Continue reading Go exercises: Slices

Google Vision Image recognition for Android

Recently Google announced new API for image recognition. It is one the most exiting solutions from Google and prices are quite affordable. So, I decided to switch from CamFind API to Google’s, because the last one is much more efficient and faster. Camfind worked quite well, but it took time for upload of image and… Continue reading Google Vision Image recognition for Android