» sudo systemctl daemon-reload
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
==============================================
Edit*
- Open /etc/wsl.confwith any editor:
» sudo systemctl daemon-reload
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
==============================================
Edit*
/etc/wsl.conf with any editor:| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| ) | |
| func dumpMap(space string, m map[string]interface{}) { | |
| for k, v := range m { | |
| if mv, ok := v.(map[string]interface{}); ok { | 
| 1. Получаем хэш-код коммита, к которому хотим вернуться. | |
| 2. Заходим в папку репозитория и пишем в консоль: | |
| $ git reset --hard a3775a5485af0af20375cedf46112db5f813322a | |
| $ git push --force | 
Exhaustive list of SPDX (Software Package Data Exchange) licenses: https://spdx.org/licenses/
| // | |
| // Tiny calculator | |
| // | |
| // cal := modules.NewCal() | |
| // fmt.Println(cal.MustCal("1x1+4/2x(1+2)")) | |
| // result, err := cal.Cal("1x1+4/2x(1+2)") | |
| // fmt.Println(cal.GetPostfixExpr("1x1+4/2x(1+2)")) | |
| // | |
| package modules | 
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| // Put this in a separate .h file (called "getopt.h"). | |
| // The prototype for the header file is: | |
| /* | |
| #ifndef GETOPT_H | |
| #define GETOPT_H | |
| int getopt(int nargc, char * const nargv[], const char *ostr) ; | |
| #endif | |
| */ | 
| // You can test this online at: https://play.golang.org/p/hhayRT1VWgj | |
| package main | |
| import ( | |
| "crypto/sha1" | |
| "encoding/hex" | |
| "fmt" | |
| "io" | |
| "strings" | |
| ) |