2934件ヒット
[1-100件を表示]
(0.229秒)
種類
ライブラリ
- English (44)
- ビルトイン (1739)
- abbrev (22)
- benchmark (44)
-
cgi
/ util (44) - date (55)
-
drb
/ acl (11) - e2mmap (12)
- erb (33)
- fileutils (11)
- forwardable (11)
-
irb
/ magic-file (11) - logger (19)
- openssl (88)
- optparse (22)
- psych (11)
- rake (22)
-
rexml
/ document (44) -
rexml
/ streamlistener (11) -
rubygems
/ commands / which _ command (22) - scanf (12)
- stringio (11)
- syslog (77)
- thwait (24)
- time (22)
- tsort (42)
- uri (50)
-
webrick
/ accesslog (66) -
webrick
/ log (11) - zlib (77)
クラス
- ACL (11)
- Array (300)
- BasicObject (11)
-
Benchmark
:: Tms (22) - Bignum (6)
- CGI (44)
- Date (22)
- DateTime (33)
-
Encoding
:: Converter (44) - Enumerator (23)
-
Enumerator
:: Lazy (107) - File (33)
-
File
:: Stat (11) - Fixnum (6)
- Float (21)
-
Gem
:: Commands :: WhichCommand (22) - Hash (40)
- IO (11)
- Integer (55)
- Logger (19)
- Module (22)
- Numeric (44)
- Object (44)
-
OpenSSL
:: BN (88) - OptionParser (22)
-
Psych
:: Handler (11) -
REXML
:: DocType (11) -
REXML
:: Entity (22) -
Rake
:: FileList (11) - Range (30)
- Regexp (11)
- String (45)
- StringIO (11)
- Struct (17)
- ThreadsWait (24)
- Time (126)
-
WEBrick
:: Log (11) -
Zlib
:: GzipReader (66) -
Zlib
:: GzipWriter (11)
モジュール
- Abbrev (11)
- Benchmark (22)
-
ERB
:: Util (22) - Enumerable (513)
- Exception2MessageMapper (12)
- FileTest (11)
- FileUtils (11)
- Forwardable (11)
- Kernel (275)
- Process (11)
-
REXML
:: StreamListener (11) - Syslog (77)
- TSort (42)
- URI (50)
-
WEBrick
:: AccessLog (55)
オブジェクト
-
IRB
:: MagicFile (11)
キーワード
-
$ & (11) -
$ & # 39; (11) -
$ 1 (11) -
$ 10 (11) -
$ 11 (11) -
$ 2 (11) -
$ 3 (11) -
$ 4 (11) -
$ 5 (11) -
$ 6 (11) -
$ 7 (11) -
$ 8 (11) -
$ 9 (11) -
$ OFS (11) -
$ OUTPUT _ FIELD _ SEPARATOR (11) -
$ PID (11) -
$ PROCESS _ ID (11) -
$ ` (11) -
$ ~ (11) - ** (11)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - =~ (11)
- AccessLog (11)
- CLF (11)
-
CLF
_ TIME _ FORMAT (11) -
COMBINED
_ LOG _ FORMAT (11) -
COMMON
_ LOG _ FORMAT (11) -
ENCODING
_ SPEC _ RE (11) - ERB (11)
- EXT (11)
- ExternalEntity (11)
- FORMAT (22)
- Fail (6)
- Marshal フォーマット (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (3) - Numeric (11)
-
REFERER
_ LOG _ FORMAT (11) - Raise (6)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (11)
- Rubyの起動 (11)
- Ruby用語集 (11)
- String (11)
-
_ strptime (11) - abbrev (22)
- all? (6)
-
all
_ waits (18) - any? (21)
- benchmark (11)
- binwrite (11)
- chmod (11)
- chunk (22)
-
class
_ eval (11) - collect (11)
- count (66)
-
datetime
_ format (11) - decode (7)
-
decode
_ www _ form _ component (11) -
delete
_ if (11) - detect (22)
- divmod (22)
-
each
_ byte (22) -
each
_ strongly _ connected _ component _ from (21) - encode (7)
-
encode
_ www _ form _ component (11) - entitydecl (11)
-
enum
_ for (22) - environment (11)
- escape (18)
- filter (18)
- filter! (24)
- find (22)
-
find
_ all (22) -
find
_ index (33) -
find
_ paths (11) - fnmatch (11)
- fnmatch? (11)
- format (22)
-
generate
_ prime (11) -
group
_ by (22) - grpowned? (11)
- include (11)
- info (11)
- inspect (5)
-
instance
_ delegate (11) - irb (11)
- iso8601 (11)
-
keep
_ if (22) - lineno (11)
- load (11)
- logger (11)
- map (11)
- matches? (11)
- max (76)
-
max
_ by (44) -
method
_ missing (11) - min (76)
-
min
_ by (44) - minmax (32)
-
minmax
_ by (22) -
mod
_ add (11) -
mod
_ exp (11) -
mod
_ inverse (11) -
mod
_ mul (11) -
mod
_ sqr (11) -
mod
_ sub (11) -
module
_ eval (11) - modulo (28)
- new (43)
- none? (18)
- nonzero? (11)
- notice (11)
- nsec (11)
- one? (18)
- open (22)
- open! (11)
- pack (19)
- pack テンプレート文字列 (11)
- partition (22)
- pathmap (11)
- pos (11)
- pow (22)
-
prev
_ float (10) -
primitive
_ convert (44) - printf (44)
- produce (5)
- reject (33)
- reject! (22)
- reopen (11)
-
rexml
/ parsers / pullparser (11) -
rexml
/ parsers / sax2parser (11) -
rexml
/ parsers / streamparser (11) - rfc3339 (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) - scanf (12)
- select (33)
- select! (39)
- setproctitle (11)
-
slice
_ after (20) -
slice
_ before (33) -
slice
_ when (10) - sort (22)
-
sort
_ by! (11) - sprintf (11)
- sprintf フォーマット (11)
-
start
_ document (11) - step (18)
- strftime (22)
- strptime (22)
- subsec (11)
- tell (11)
- test (22)
-
time
_ format (11) -
to
_ enum (22) -
to
_ h (17) -
to
_ i (11) -
to
_ s (11) - tsort (11)
-
tsort
_ each (21) -
tv
_ nsec (11) -
tv
_ sec (11) -
tv
_ usec (11) - u (11)
- unescape (18)
- unescapeElement (11)
-
unescape
_ element (11) - ungetc (11)
- uniq (22)
- unnormalized (11)
- unpack (11)
-
url
_ encode (11) - usec (11)
- warning (11)
-
world
_ readable? (22) - write (11)
- xmlschema (11)
- yaml (11)
- クラス/メソッドの定義 (11)
- リテラル (11)
- 正規表現 (11)
- 演算子式 (11)
検索結果
先頭5件
-
String
# %(args) -> String (24664.0) -
printf と同じ規則に従って args をフォーマットします。
...rintf と同じ規則に従って args をフォーマットします。
args が配列であれば Kernel.#sprintf(self, *args) と同じです。
それ以外の場合は Kernel.#sprintf(self, args) と同じです。
@param args フォーマットする値、もしくはその配列
@return......//emlist[例][ruby]{
p "i = %d" % 10 # => "i = 10"
p "i = %x" % 10 # => "i = a"
p "i = %o" % 10 # => "i = 12"
p "i = %#d" % 10 # => "i = 10"
p "i = %#x" % 10 # => "i = 0xa"
p "i = %#o" % 10 # => "i = 012"
p "%d" % 10 # => "10"
p "%d,%o" % [10, 10] # =>......しています。
%[nth$][フラグ][幅][.精度]指示子
%[<name>][フラグ][幅][.精度]指示子
`%' 自身を出力するには `%%' とします。
以下それぞれの要素に関して説明します。
=== フラグ
フラグには #, +, ' '(スペース), -, 0 の5種類があ... -
Numeric
# %(other) -> Numeric (24464.0) -
self を other で割った余り r を返します。
...self を other で割った余り r を返します。
ここで、商 q と余り r は、
* self == other * q + r
と
* other > 0 のとき 0 <= r < other
* other < 0 のとき other < r <= 0
* q は整数
をみたす数です。
余り r は、other と同じ符号になります......、Numeric#div (あるいは 「/」)で求められます。
modulo はメソッド % の呼び出しとして定義されています。
@param other 自身を割る数を指定します。
//emlist[例][ruby]{
p 13.modulo(4) #=> 1
p (11.5).modulo(3.5) #=> 1.0
p 13.modulo(-4) #=> -3......p (-13).modulo(4) #=> 3
p (-13).modulo(-4) #=> -1
p (-11).modulo(3.5) #=> 3.0
//}
@see Numeric#divmod, Numeric#remainder... -
Integer
# %(other) -> Numeric (24460.0) -
算術演算子。剰余を計算します。
...算術演算子。剰余を計算します。
//emlist[][ruby]{
13 % 4 # => 1
13 % -4 # => -3
-13 % 4 # => 3
-13 % -4 # => -1
//}
@param other 二項演算の右側の引数(対象)
@return 計算結果... -
Range
# %(s) -> Enumerator (24400.0) -
範囲内の要素を s おきに繰り返します。
...。
@param s 各ステップの大きさを数値で指定します。負の数を指定することもできます。
@return ブロックを指定した時は self を返します。
@return ブロックを指定しなかった時かつ数値の Range の時は Enumerator::ArithmeticSequence を......返します。
@return ブロックを指定しなかったその他の Range の時は Enumerator を返します。(例: String の Range)
//emlist[例][ruby]{
("a" .. "f").step(2) {|v| p v}
# => "a"
# "c"
# "e"
//}... -
Range
# %(s) -> Enumerator :: ArithmeticSequence (24400.0) -
範囲内の要素を s おきに繰り返します。
...。
@param s 各ステップの大きさを数値で指定します。負の数を指定することもできます。
@return ブロックを指定した時は self を返します。
@return ブロックを指定しなかった時かつ数値の Range の時は Enumerator::ArithmeticSequence を......返します。
@return ブロックを指定しなかったその他の Range の時は Enumerator を返します。(例: String の Range)
//emlist[例][ruby]{
("a" .. "f").step(2) {|v| p v}
# => "a"
# "c"
# "e"
//}... -
Bignum
# %(other) -> Fixnum | Bignum | Float (21500.0) -
算術演算子。剰余を計算します。
...算術演算子。剰余を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果... -
Fixnum
# %(other) -> Fixnum | Bignum | Float (21500.0) -
算術演算子。剰余を計算します。
...算術演算子。剰余を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果... -
OpenSSL
:: BN # %(other) -> OpenSSL :: BN (21400.0) -
自身を other で割り算した余りを返します。
...自身を other で割り算した余りを返します。
@param other 除数
@raise OpenSSL::BNError 計算時エラー... -
Benchmark
. # benchmark(caption = "" , label _ width = nil , fmtstr = nil , *labels) {|rep| . . . } -> [Benchmark :: Tms] (18590.0) -
Benchmark::Report オブジェクトを生成し、それを引数として与えられたブロックを実行します。
...Benchmark::Report オブジェクトを生成し、それを引数として与えられたブロックを実行します。
基本的には以下のように使います。
ブロックが Benchmark::Tms オブジェクトの配列を返した場合は、
それらの数値も追加の行に表示......す。
@param caption レポートの一行目に表示する文字列を指定します。
@param label_width ラベルの幅を指定します。
@param fmtstr フォーマット文字列を指定します。
この引数を省略すると Benchmark::FORMAT が使用......。
@param labels ブロックが Benchmark::Tms オブジェクトの配列を返す場合に指定します。
=== フォーマット文字列
フォーマット文字列として以下が使用できます。
: %u
user CPU time で置き換えられます。Benchmark::Tms#utime
: %y
syste... -
TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) -> Enumerator (15412.0) -
node から到達可能な強連結成分についてのイテレータです。
...
node から到達可能な強連結成分についてのイテレータです。
返す値は規定されていません。
each_strongly_connected_component_from は
tsort_each_node を呼びません。
@param node ノードを指定します。
//emlist[例 到達可能なノードを表示......_node each_key
def tsort_each_child(node, &block)
fetch(node).each(&block)
end
end
non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
non_sort.each_strongly_connected_component{|nodes|
p nodes
nodes.each {|node|
non_sort.each_strongly_connected_component_from(node){|ns|
printf("%s......-> %s\n", node, ns.join(","))
}
}
}
#出力
#=> [4]
#=> 4 -> 4
#=> [2, 3]
#=> 2 -> 4
#=> 2 -> 2,3
#=> 3 -> 4
#=> 3 -> 3,2
#=> [1]
#=> 1 -> 4
#=> 1 -> 2,3
#=> 1 -> 1
//}
@see TSort.each_strongly_connected_component_from... -
TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) {|nodes| . . . } -> () (15412.0) -
node から到達可能な強連結成分についてのイテレータです。
...
node から到達可能な強連結成分についてのイテレータです。
返す値は規定されていません。
each_strongly_connected_component_from は
tsort_each_node を呼びません。
@param node ノードを指定します。
//emlist[例 到達可能なノードを表示......_node each_key
def tsort_each_child(node, &block)
fetch(node).each(&block)
end
end
non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
non_sort.each_strongly_connected_component{|nodes|
p nodes
nodes.each {|node|
non_sort.each_strongly_connected_component_from(node){|ns|
printf("%s......-> %s\n", node, ns.join(","))
}
}
}
#出力
#=> [4]
#=> 4 -> 4
#=> [2, 3]
#=> 2 -> 4
#=> 2 -> 2,3
#=> 3 -> 4
#=> 3 -> 3,2
#=> [1]
#=> 1 -> 4
#=> 1 -> 2,3
#=> 1 -> 1
//}
@see TSort.each_strongly_connected_component_from... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol (15318.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_by......Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8......nvert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_sequence
ec.insert_output(ec.primitive_errinfo[3].dump[1..-2])
redo
when :undefined_conversion
c = ec.primitive_errinfo[3].dup.force_encoding(ec.primitive_errinfo[1])
ec.insert_output('\x{%X:%...