One of my recent projects was intended to use Laravel-based service for importing data to Woocommerce shop. I decided to simplify development and testing part by combining Laravel and WordPress containers in one Docker project. During my work, I met a couple of obstacles, which will be covered in this post as well. Install Laravel… Continue reading Laravel + WordPress + MySQL + Docker
Gluten free product web search engine
Just a month ago I released a huge project for “Is it kosher?” – web search app. And now it came time for Gluten free project. Here we go – web search engine for Gluten free products. Database contains more that 1 million products from different sources of information. It is possible to buy right… Continue reading Gluten free product web search engine
Go Exercises: Fibonacci
Exercise: Fibonacci closure package main import “fmt” var prev, curr int // fibonacci is a function that returns // a function that returns an int. func fibonacci() func() int { inc := 1 return func() int { prev = curr curr = inc inc = prev+curr return prev } } func main() { f :=… Continue reading Go Exercises: Fibonacci
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