Golang – Find all links in a webpage

At dotmaui.com we use Go (Golang), the programming language of Google, more and more often. The dashboard is in fact based on Revel, a high-productivity web framework for the Go language,  and other automation scripts we…

Golang – How to generate a random integer

Small script to generate a random integer, between 1 and 100, in Golang, the Google programming language. package main import ( “fmt” “math/rand” “time” ) func random(min, max int) int { rand.Seed(time.Now().UTC().UnixNano()) return rand.Intn(max-min) +…

What’s new at dotmaui.com

Here’s what we did for you, free and without advertising, in the early days of November: JS Beautify 1.2, CSS Beautify 1.2, HTML Beautify 1.2 and XML Beautify 1.3 released. Some minor bugs fixed Increased…

VB.net – Select Case

How to create a Switch (Select Case) in VB.Net: Select Case value Case 1 Console.WriteLine(“One”) Case 2 Console.WriteLine(“Two”) Case 3, 4 Console.WriteLine(“Three or four”) Case 5 To 10 Console.WriteLine(“From five to Ten”) Case Else Console.WriteLine(“Everything…

Golang – Get Cookies in Revel

package controllers import ( “github.com/revel/revel” “fmt” ) type App struct { *revel.Controller } func MyController(c App ) *Utente { cookies := c.Request.Cookies() for _, cookie := range cookies { if cookie.Name == “mycookie” { cookieValue…