How to get an environment variable in Go?
In Go lang, how to get an environment variable?
To get an environment variable (e.g. “VAR”) in GO:
import "os"
import "fmt"
fmt.Println("VAR:", os.Getenv("VAR"))
In Go lang, how to get an environment variable?
To get an environment variable (e.g. “VAR”) in GO:
import "os"
import "fmt"
fmt.Println("VAR:", os.Getenv("VAR"))
How to disable directory listing using .htaccess? The webserver (Apache) should allow downloading files in a directory and child directories of it but forbid listing of the directory and child directories. In the directory that you want to disable directory listing, create the .htaccess file that contains: Options -Indexes You can also done by Options…
The common rsync commands seems not handle spaces well. For example, rsync -avxP file “user@server:/data/my dir” It reports: rsync: link_stat “/home/zma/file” failed: No such file or directory (2) How to make rsync handle spaces well? You can use the –protect-args option of rsync. $ rsync –protect-args -avxP file “user@server:/data/my dir” What does –protect-args do: -s,…
As is known, keys may be overlap in SST files of level 0 in LevelDB. I am wondering why it needs to be overlap? An sstable is read-only after being written to the disk from a memtable. Accumulated K/Vs in the log up to a certain size are organized as a memtable and written to…
Question: how to find the disk where the Linux’s root(/) is on in Bash? The root may be on a LVM volume or on a raw disk. 2 cases: One example: # df -hT | grep /$ /dev/sda4 ext4 48G 32G 14G 71% / For another example: # df -hT | grep /$ /dev/mapper/fedora-root ext4…
Currently, I wanna take Shark’s (Spark SQL) DDL and DML as an reference to design/implement SQLE’s DDL and DML. However, I cannot find its DDL and DML. I can only find several SQLs in Shark paper[1]. [1] shark paper – http://tab.d-thinker.org/showthread.php?tid=2585 Shark’s language is Hive QL. HQL’s DDL and DML can be found at Hive…
I have downloaded the iso file of Windows 10 installation disk from https://www.microsoft.com/en-us/software-download/windows10ISO . But I do not have a DVD R/W drive. Whether and how to install Windows from a USB drive? You can use the Windows USB/DVD Download Tool to make a USB from the Windows ISO. Download and install the Windows USB/DVD…