It usually consists the following cost:
1. EBS volumes
2. Nat Gateway
3. EBS snapshots
4. Idle Elastic IPs
5. Data transfer
It usually consists the following cost:
1. EBS volumes
2. Nat Gateway
3. EBS snapshots
4. Idle Elastic IPs
5. Data transfer
brew install java11
sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
in file: usr/include/openssl/opensslv.h of openssl source code.
ffmpeg -i videoSharingFinalOutput.MOV -profile:v main -r 25 -vf scale=1280:720 output.mp4
Golang allows short variable declaration in the form of i:=0
, which defines a integer variable i
. Golang also allows multi-variable short declaration, e.g.
i,j := 0,1
In this case, as long as there is one new variable on the left side, for example, i
, the compiler would be happy. However, if j
is not defined in the SAME BLOCK SCOPE, a new j
will be created! Most times this is not what you want. Got to be very careful with that. A full example:
func test(){
j:=1;
if j==1 {
i,j:=2,3
}
fmt.Println(j) // j is still 1!!
}
In golang, when you range through an array of elements as in the following:
// THIS CODE IS WRONG; DO NOT USE THIS
for i,v := range elements {
go do_something(v)
}
In the above example, the value of v may change while do_something
tries to used it. This is a race condition and will definitely cause problem. To fix this, one should use elements[i]
instead;