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
#include <algorithm> | |
#include <climits> | |
#include <cstdlib> | |
#include <cstring> | |
#include <vector> | |
using namespace std; | |
struct Comp1 { | |
const char* str; | |
Comp1(const char* str): str(str) {} |
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
[global_config] | |
title_transmit_bg_color = '#0300C8' | |
[keybindings] | |
go_up = <Alt>K | |
go_down = <Alt>J | |
go_left = <Alt>H | |
go_right = <Alt>L | |
split_horiz = <Alt>O | |
split_vert = <Alt>E |
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
port = 1234 | |
port = ARGV[0].to_i if ARGV[0] | |
puts "Test #1" | |
hoge_txt = IO.read('hoge.txt') | |
server_pid = spawn("./server #{port}") | |
begin | |
result = `./client localhost #{port} hoge.txt` | |
result.gsub("\r\n", "\n") | |
if result.index(hoge_txt) |
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 | |
# coding: utf-8 | |
# Requirements: | |
# ruby1.9.1 libruby1.9.1 ruby1.9.1-dev | |
require "optparse" | |
require "open3" | |
include Open3 |
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
extern "C" { | |
#include <libavcodec/avcodec.h> | |
#include <libavformat/avformat.h> | |
#include <libswscale/swscale.h> | |
} | |
int get_first_video_stream_index(AVFormatContext* format_context) | |
{ | |
for (int i = 0; i < format_context->nb_streams; ++i) { | |
if (format_context->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) |
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
#Iter: Money Score | |
# 1: 3.50 3.00 | |
# 2: 3.50 3.00 | |
# 3: 4.50 3.00 | |
# 4: 4.50 3.00 | |
# 5: 5.16 3.22 | |
# 6: 5.55 3.77 | |
# 7: 5.75 4.53 | |
# 8: 6.34 6.00 | |
# 9: 6.34 7.48 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<gexf xmlns="http://www.gexf.net/1.2draft" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd" | |
version="1.2"> | |
<graph defaultedgetype="directed"> | |
<attributes class="node"> | |
<attribute id="0" title="kind" type="string"> | |
<options>source|sink|others</options> |
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
$ g++ -Wall -Wextra -std=c++0x -o mergesort mergesort.cpp |
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 ( | |
"fmt" | |
) | |
type Fetcher interface { | |
// Fetch returns the body of URL and | |
// a slice of URLs found on that page. | |
Fetch(url string) (body string, urls []string, err error) |
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
# First of all, we need enlarge the limit of file descripters. | |
# The following link will help: | |
# http://docs.basho.com/riak/latest/ops/tuning/open-files-limit/ | |
# Install erlang | |
$ sudo apt-get install erlang | |
# Download riak | |
$ mkdir -p ~/build | |
$ cd ~/build |
OlderNewer