- Thread of execution (or thread) は flow of control のひとつ.
- 特定のトップレベル関数の呼び出しを含む.
- そのスレッドが呼び出す関数をすべて含む.
- どのスレッドも潜在的にはプログラム内のすべてのオブジェクトと関数にアクセスする可能性がある.
- C++プログラムは複数のスレッドを並列に実行できる.
- 処理系はすべての unblocked なスレッドが eventually make progress することを保証すべき.
This file contains hidden or 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 | |
set -xe | |
sudo apt-get update | |
sudo apt-get install -y wget build-essential openjdk-7-jdk cmake maven pkg-config libssl-dev | |
# install protobuf | |
cd | |
wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz |
This file contains hidden or 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
description "Twitter Timeline Logger" | |
author "Yusuke Nojima" | |
start on runlevel[2345] | |
stop on runlevel[016] | |
chdir /opt/timeline-logger | |
exec bin/timeline-logger --config etc/config.yml >> /var/log/timeline.log | |
respawn |
This file contains hidden or 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
package main | |
import "bufio" | |
import "flag" | |
import "fmt" | |
import "log" | |
import "os" | |
import "strings" | |
import "sync" | |
import "github.com/tpjg/goriakpbc" |
This file contains hidden or 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
合否 | 内申点 | 模試偏差値 | |
---|---|---|---|
0 | 3.6 | 60.1 | |
1 | 4.1 | 52.0 | |
0 | 3.7 | 62.5 | |
0 | 4.9 | 60.6 | |
1 | 4.4 | 54.1 | |
0 | 3.6 | 63.6 | |
1 | 4.9 | 68.0 | |
0 | 4.8 | 38.2 | |
1 | 4.1 | 59.5 |
This file contains hidden or 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
wget http://www.lua.org/ftp/lua-5.2.3.tar.gz | |
tar xvpf lua-5.2.3.tar.gz | |
mv lua-5.2.3 ~/opt/lua | |
cd ~/opt/lua | |
make linux | |
mkdir lib | |
mv src/liblua.a lib | |
mkdir include | |
cd include | |
for f in ../src/*.h ../src/*.hpp; do ln -s $f $(basename $f); done |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'colored' | |
require 'optparse' | |
require 'open3' | |
def compile(problem_id) | |
puts "======== Compile ========".bold.green | |
cmd = "g++ -Wall -Wextra -Wno-unused-result -O2 -g -std=c++0x #{problem_id}.cpp" | |
output, status = Open3.capture2e(cmd) | |
output.each_line do |line| |