qa/admin/check-vmdoes a system check
- dependencies
sudo apt-get -y install \
autoconf \
flex \identical mmap programs in C and go
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "os" | |
| "path/filepath" | |
| ) | |
| func replace(s string) string { |
| package main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "flag" | |
| "io/ioutil" | |
| "os" | |
| "regexp" | |
| "strings" |
| package main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "flag" | |
| "fmt" | |
| "io/ioutil" | |
| "os" | |
| "path/filepath" |
| *.jpg | |
| *.jpeg | |
| *.png | |
| *.gif |
ubuntu 14.04, g++ 4.8
81.700000, 187.500000
ubuntu 14.04, clang++-3.8
76.400000, 186.800000
< C++17
run shared_mutex.cc -lboost_system -lboost_thread -lpthread -std=c++14
C++17
CXX=g++-6 run shared_mutex.cc -lpthread -std=c++17
| #include <arpa/inet.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <sys/socket.h> | |
| #include <unistd.h> | |
| int main() { | |
| const char* server_name = "localhost"; | |
| const int server_port = 8877; |
| #include <arpa/inet.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <sys/socket.h> | |
| #include <unistd.h> | |
| int main() { | |
| const char* server_name = "localhost"; | |
| const int server_port = 8877; |