2014-12-15 10:53:03 +0900 [error]: unexpected error error_class=NoMethodError error=#<NoMethodError: undefined me
thod `[]=' for nil:NilClass>
2014-12-15 10:53:03 +0900 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-td-monitoring-
0.1.3/lib/fluent/plugin/fms_fluentd_ext.rb:70:in `get_plugin_metric'
2014-12-15 10:53:03 +0900 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-td-monitoring-
0.1.3/lib/fluent/plugin/fms_fluentd_ext.rb:50:in `get_monitor_info'
2014-12-15 10:53:03 +0900 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.55/lib/fluent/p
lugin/in_monitor_agent.rb:287:in `block in plugins_info_all'
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
package main | |
import ( | |
"io" | |
"os" | |
"strings" | |
) | |
type rot13Reader struct { | |
r io.Reader |
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
test |
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
<?php | |
// 教室に二人一組で座ることのできるテーブルが10台あり、生徒が20人いる時、 生徒の座席の位置をランダムに決定するプログラムをPHPで書きなさい。 | |
// 生徒名やテーブル名等の情報は任意に定義してかまいません。 | |
// 出力例. テーブル名をA~Jのアルファベットとし 生徒名を1~20の数字として表しています | |
// A - 6, 19 | |
// B - 1 ,4 | |
// C - 20,8 |
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
<F3>%define rubyver 2.1.4 | |
%define _prefix /opt/ruby21 | |
Name: ruby | |
Version: %{rubyver} | |
Release: 2%{?dist} | |
License: Ruby License/GPL - see COPYING | |
URL: http://www.ruby-lang.org/ | |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |
BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel gcc unzip openssl-devel db4-devel byacc make libyaml libyaml-devel libffi libffi-devel |
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
package main | |
import ( | |
"code.google.com/p/go-tour/tree" | |
"fmt" | |
) | |
func Walk(t *tree.Tree, ch chan int) { | |
WalkIter(t, ch) | |
close(ch) |
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
package main | |
import ( | |
"fmt" | |
) | |
func a(){ | |
i := 0 | |
// 引数iはdeferred functionが評価される際に評価される |
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
package main | |
import ( | |
"fmt" | |
"runtime" | |
"sync" | |
"sync/atomic" | |
) | |
var v int32 |
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
// original: http://mattn.kaoriya.net/software/lang/go/20140625223125.htm | |
package main | |
import ( | |
"fmt" | |
"runtime" | |
"sync" | |
"time" | |
) |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
) | |
func main() { | |
err := ioutil.WriteFile("/tmp/hoge", []byte("testtest"), 0777) | |
if err != nil { |