How to measure execution time in Golang
To mesure the time used by an application in Golang or of a code section the functions time.Now()
and time.Since()
can be used.
How to fix mspdb100.dll is missing from your computer
How to fix The program can't start because mspdb100.dll is missing from your computer. Try reinstalling the program to fix this problem.
by adding the VC 10.0 IDE on the Windows system environment variables or by running the vcvars32.bat
for the current session.
How to generate a random int in Golang
In Golang there a are two libraries for generating random integers, one is a pseudo-random number generator (package math/rand
) and the second one is cryptographically secure random number generator (package crypto/rand
)
How to trim whitespace from string in Golang
How to trim (remove) leading and trailing whitespace from string in Golang using the TrimSpace
, Trim
, TrimLeft
, TrimRight
methods from strings
package.
How to fix apt lock-frontend error in Ubuntu
How to fix the E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
error.
How to change DNS settings from command line
The command line tool used to change the DNS settings is netsh
which allows you to configure just about any aspect of your network connections in Windows. In order to use the tool the command line needs to be started as Administrator.