In linux, normally, it is impossible to "bind()" to the same TCP port twice. If you try to bind to the same port from second proces unix processes you'll see:
socket.error: [Errno 98] Address already in use
#!/bin/bash | |
SOURCEINSTANCE=${SOURCEINSTANCE:-''} | |
SOURCEUSER=${SOURCEUSER:-'admin'} | |
SOURCEPORT=${SOURCEPORT:-'5439'} | |
SOURCEDB=${SOURCEDB:-'db'} | |
SOURCESCHEMA=${SOURCESCHEMA:-'public'} | |
SCHEMA=${SCHEMA:-'public'} | |
echo "CREATE TABLE ${SCHEMA}.${TABLE} (" | |
psql -h ${SOURCEINSTANCE} -U ${SOURCEUSER} -p ${SOURCEPORT} ${SOURCEDB} -t -c "select (\"column\" || ' ' || type || ' ENCODE ' || encoding || ',' ) from pg_table_def where schemaname='$SCHEMA' and tablename = '$TABLE'" | sed 's/ENCODE none/ENCODE RAW/' | sed '$d' | sed '$ s/,$//' | |
echo ")" |
Why Should I Care (For Developers)
"Dockerが面白いのはシンプルな環境に隔離性と再現性をもたらしてくれることだ.ランタイムの環境を一度作れば、パッケージにして別のマシンでも再利用することできる.さらに,すべてはホスト内の隔離された環境で行われる(VMのように).最も素晴らしい点は,シンプルかつ高速であることだ."
unapply
の戻り値型が、Option
ではなく「 isEmpty: Boolean
と get: A
をもっていればどんな型でもよい」と、制限が緩くなったscala.util.contrll.TailCalls.TailRec
に flatMap
が追加された scala/scala#2865#!/bin/bash | |
# | |
# consul Manage the consul agent | |
# | |
# chkconfig: 2345 95 95 | |
# description: Consul is a tool for service discovery and configuration | |
# processname: consul | |
# config: /etc/consul.conf | |
# pidfile: /var/run/consul.pid |
#include <stdio.h> | |
#include <string.h> | |
#include <netdb.h> | |
#include <arpa/inet.h> | |
#include <errno.h> | |
int main(int argc, char **argv) | |
{ | |
struct addrinfo hints, *ai, *ai_p; | |
const char *name; |