別のキーワード
ライブラリ
- ビルトイン (151)
- csv (132)
-
net
/ http (11) -
net
/ pop (99) -
net
/ smtp (22) - openssl (11)
- optparse (33)
- psych (39)
- rake (11)
-
rake
/ loaders / makefile (11) -
rexml
/ document (44) - stringio (66)
- timeout (19)
-
webrick
/ log (11) - zlib (44)
クラス
- Array (107)
- CSV (121)
- IO (22)
- Integer (11)
-
Net
:: HTTP (11) -
Net
:: POPMail (99) -
Net
:: SMTP (22) - OptionParser (33)
-
REXML
:: Document (22) -
REXML
:: Element (11) -
REXML
:: Formatters :: Default (11) -
Rake
:: Application (11) -
Rake
:: MakefileLoader (11) - String (11)
- StringIO (66)
-
WEBrick
:: BasicLog (11) -
Zlib
:: Deflate (22) -
Zlib
:: GzipWriter (11) -
Zlib
:: Inflate (11)
モジュール
-
OpenSSL
:: Buffering (11) - Psych (39)
- Timeout (19)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - CSV (11)
-
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (5) -
add
_ loader (11) - all (33)
- combination (22)
-
debug
_ output= (11) - filter (33)
- load (11)
-
load
_ stream (22) - mail (33)
- new (33)
- open (66)
- pack (19)
- pack テンプレート文字列 (11)
- parse (22)
- permutation (22)
- pop (33)
- pos= (11)
- read (11)
- readlines (11)
- readpartial (11)
-
repeated
_ combination (22) -
repeated
_ permutation (22) - rss (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 3 feature (11) -
safe
_ load (17) - separator (11)
-
set
_ debug _ output (22) -
set
_ dictionary (22) - string (11)
- summarize (22)
- timeout (19)
-
to
_ r (11) - unpack (11)
- write (44)
検索結果
先頭5件
-
IO
# <<(object) -> self (39130.0) -
object を出力します。object が文字列でない時にはメソッ ド to_s を用いて文字列に変換します。
...字列でない時にはメソッ
ド to_s を用いて文字列に変換します。
以下のような << の連鎖を使うことができます。
STDOUT << 1 << " is a " << Fixnum << "\n"
@param object 出力したいオブジェクトを与えます。
@raise Errno::EXXX 出力に失敗......字列でない時にはメソッ
ド to_s を用いて文字列に変換します。
以下のような << の連鎖を使うことができます。
STDOUT << 1 << " is a " << Integer << "\n"
@param object 出力したいオブジェクトを与えます。
@raise Errno::EXXX 出力に失敗... -
StringIO
# <<(obj) -> self (21100.0) -
obj を pos の位置に書き込みます。 必要なら obj.to_s を呼んで 文字列に変換します。 self を返します。
obj を pos の位置に書き込みます。 必要なら obj.to_s を呼んで
文字列に変換します。 self を返します。
@param obj 自身に書き込みたい、文字列か to_s が定義されたオブジェクトを指定します。 -
IO
# readpartial(maxlen , outbuf = "") -> String (21082.0) -
IO から長さ maxlen を上限として読み込み、文字列として返します。 即座に得られるデータが存在しないときにはブロックしてデータの到着を待ちます。 即座に得られるデータが 1byte でも存在すればブロックしません。
...
IO から長さ maxlen を上限として読み込み、文字列として返します。
即座に得られるデータが存在しないときにはブロックしてデータの到着を待ちます。
即座に得られるデータが 1byte でも存在すればブロックしません。
バ......動作するよう設計されています。
readpartial がブロックするのは次の全ての条件が満たされたときだけです。
* IO オブジェクト内のバッファが空
* ストリームにデータが到着していない
* ストリームが EOF になっていない......EOFError を発生させます。
例えば、パイプに対しては次のように動作します。
r, w = IO.pipe # buffer pipe content
w << "abc" # "" "abc".
r.readpartial(4096) #=> "abc" ""... -
Zlib
:: GzipWriter # <<(str) -> self (18118.0) -
str を出力します。str が文字列でない場合は to_s を用いて 文字列に変換します。
...ェクトを与えます。
require 'zlib'
filename='hoge1.gz'
fw = File.open(filename, "w")
Zlib::GzipWriter.wrap(fw, Zlib::BEST_COMPRESSION){|gz|
gz << "hoge" << "fuga"
}
fr = File.open(filename)
Zlib::GzipReader.wrap(fr){|gz|
puts gz.read
}
#=> hogefuga
@see IO#<<... -
OpenSSL
:: Buffering # <<(s) -> self (18106.0) -
文字列 s を書き込みます。
...文字列 s を書き込みます。
IO#<< と同様です。
@param s 出力する文字列... -
Zlib
:: Deflate # set _ dictionary(string) -> String (6112.0) -
圧縮に用いる辞書を指定します。string を返します。 このメソッドは Zlib::Deflate.new, Zlib::ZStream#reset を呼び出した直後にのみ有効です。詳細は zlib.h を参照して下さい。
...= Zlib::Deflate.new
comp_str = dez.deflate(str)
comp_str << dez.finish
comp_str.size
end
def case2(str, dict)
dez = Zlib::Deflate.new
p dez.set_dictionary(dict)
comp_str = dez.deflate(str)
comp_str << dez.finish
comp_str.size
end
i = 10
dict = 'hoge_fuga... -
Array
# combination(n) -> Enumerator (6106.0) -
サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。
...4]
a.combination(1).to_a #=> [[1],[2],[3],[4]]
a.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
a.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]
a.combination(4).to_a #=> [[1,2,3,4]]
a.combination(0).to_a #=> [[]]: one combination of length 0
a.combination(5).to_a #=......> [] : no combinations of length 5
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3, 4]
result = []
a.combination(2) {|e| result << e} # => [1,2,3,4]
result #=> [[1,2],......[1,3],[1,4],[2,3],[2,4],[3,4]]
//}
@see Array#permutation, Array#repeated_combination... -
Array
# combination(n) {|c| block } -> self (6106.0) -
サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。
...4]
a.combination(1).to_a #=> [[1],[2],[3],[4]]
a.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
a.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]
a.combination(4).to_a #=> [[1,2,3,4]]
a.combination(0).to_a #=> [[]]: one combination of length 0
a.combination(5).to_a #=......> [] : no combinations of length 5
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3, 4]
result = []
a.combination(2) {|e| result << e} # => [1,2,3,4]
result #=> [[1,2],......[1,3],[1,4],[2,3],[2,4],[3,4]]
//}
@see Array#permutation, Array#repeated_combination... -
Array
# permutation(n = self . length) -> Enumerator (6106.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...ation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(1).to_a #=> [[1],[2],[3]]
a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(0).to_a #=> [[]]: one permutation......0
a.permutation(4).to_a #=> [] : no permutations of length 4
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e| result << e} # => [1,......2,3]
result # => [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
//}
@see Array#combination, Array#repeated_permutation... -
Array
# permutation(n = self . length) { |p| block } -> self (6106.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...ation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(1).to_a #=> [[1],[2],[3]]
a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(0).to_a #=> [[]]: one permutation......0
a.permutation(4).to_a #=> [] : no permutations of length 4
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e| result << e} # => [1,......2,3]
result # => [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
//}
@see Array#combination, Array#repeated_permutation...