Author(s): Austin Clements, Rick Hudson
Last updated: 2016-10-18
Discussion at https://golang.org/issue/17503.
If you are facing an error like that on new MacOS version. | |
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun | |
It means that you need to install XCode command line, open a Terminal and run this command: | |
$ xcode-select --install | |
Note: | |
If you want to download and install Command Line tools manually, it can be downloaded from: https://developer.apple.com/download/more/ |
#!/bin/bash | |
#Autor: Emiliano Carlos de Moraes Firmino | |
#Comentario: igual a usar "sar -A 1", mas sem a interface de rede | |
# que não abre no kSar | |
#Script Variables | |
output_file="sar_data.txt" #arquivo de saída | |
interval=1 #taxa de amostragem em segundos | |
#Inicia rodada de testes |
Author(s): Austin Clements, Rick Hudson
Last updated: 2016-10-18
Discussion at https://golang.org/issue/17503.
This is what the [official documentation][1] says about the terminate/2
callback for a gen_server:
This function is called by a gen_server when it is about to terminate. It should be the opposite of Module:init/1 and do any necessary cleaning up. When it returns, the gen_server terminates with Reason. The return value is ignored.
Reason is a term denoting the stop reason and State is the internal state of the gen_server.
Reason depends on why the gen_server is terminating. If it is because another callback function has returned a stop tuple {stop,..}, Reason will have the value specified in that tuple. If it is due to a failure, Reason is the error reason.
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
ABSOLUTELY NO WARRANTY. | |
If you are still reading let's carry on with the code. | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
class List extends Object { | |
List() { super(); } | |
List append(List l) { | |
return this; // dummy | |
} | |
} | |
class Nil extends List { | |
Nil() { super (); } | |
package main | |
import "fmt" | |
type Node struct { | |
prev *Node | |
next *Node | |
key interface{} | |
} |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)