This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
struct Seat { | |
int x; | |
int y; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iomanip> | |
#include <random> | |
#include <cassert> | |
#include <cstdlib> | |
#include <sys/time.h> | |
struct Host { | |
Host(int num) | |
: num(num), A(num*num), B(num*num), C(num*num) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defkanji utf-8 | |
defencoding utf-8 | |
encoding utf-8 utf-8 | |
escape ^t^t | |
startup_message off | |
vbell off | |
bind w windowlist -b | |
hardstatus alwayslastline "[%02c] %`%-w%{=b bw}%n %t%{-}%+w" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## Please install lcov first. | |
# wget http://downloads.sourceforge.net/ltp/lcov-1.9.tar.gz | |
# tar xzf lcov-1.9.tar.gz | |
# cd lcov-1.9 | |
# sudo make install | |
## Build and measure the coverage with running tests | |
CXXFLAGS="-fprofile-arcs -ftest-coverage" LDFLAGS="-lgcov" ./waf configure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// g++ -I/path/to/include -L/path/to/lib -lpficommon test.cpp | |
#include <stdint.h> | |
#include <pficommon/text/json.h> | |
#include <pficommon/data/serialization.h> | |
struct Widget { | |
explicit Widget(int64_t value) : value_(value) {} | |
int64_t value_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <sstream> | |
#include <string> | |
#include <ctime> | |
#include <glog/logging.h> | |
#include <msgpack.hpp> | |
#include <pficommon/text/json.h> | |
#include <pficommon/network/socket.h> |