1211件ヒット
[1-100件を表示]
(0.159秒)
ライブラリ
- ビルトイン (467)
-
cgi
/ core (22) -
cgi
/ html (11) - csv (33)
-
net
/ http (154) -
net
/ pop (22) - openssl (55)
- pathname (11)
- prettyprint (55)
-
rexml
/ document (77) -
rubygems
/ package / tar _ reader / entry (11) - set (22)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - stringio (77)
- tempfile (22)
-
webrick
/ httprequest (11) -
webrick
/ httpresponse (55) -
win32
/ registry (77) - zlib (11)
クラス
- Array (251)
- CGI (22)
- CSV (11)
-
CSV
:: Table (22) -
Gem
:: Package :: TarReader :: Entry (11) - IO (11)
- Integer (11)
- MatchData (66)
-
Net
:: HTTPGenericRequest (22) -
Net
:: POPMail (22) -
OpenSSL
:: Cipher (11) -
OpenSSL
:: Digest (22) -
OpenSSL
:: SSL :: SSLSocket (11) - Pathname (11)
- PrettyPrint (55)
-
REXML
:: Attributes (22) -
REXML
:: Parent (55) - Set (22)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - String (4)
- StringIO (77)
- Symbol (11)
- Tempfile (22)
-
WEBrick
:: HTTPRequest (11) -
WEBrick
:: HTTPResponse (55) -
Win32
:: Registry (77) -
Zlib
:: GzipReader (11)
モジュール
-
CGI
:: HtmlExtension (11) - Enumerable (113)
-
Net
:: HTTPHeader (132) -
OpenSSL
:: Buffering (11)
キーワード
- [] (55)
- []= (77)
-
block
_ length (11) - body= (11)
-
body
_ stream (11) -
body
_ stream= (11) - breakable (22)
- bytesplice (4)
- chunk (11)
-
chunk
_ while (11) -
content
_ length (33) -
content
_ length= (22) -
content
_ range (11) - delete (11)
-
descriptor
_ length (11) -
digest
_ length (11) - empty? (11)
- fetch (33)
- fill (66)
-
get
_ fields (11) - group (11)
- header (11)
-
key
_ len= (11) -
max
_ by (44) -
max
_ key _ length (11) -
max
_ value _ length (11) -
max
_ value _ name _ length (11) - none? (13)
-
num
_ keys (11) -
num
_ values (11) - one? (13)
- out (11)
-
password
_ field (11) - permutation (22)
-
range
_ length (11) - read (44)
-
read
_ nonblock (11) - readpartial (33)
-
repeated
_ combination (22) -
repeated
_ permutation (22) - sample (44)
- size (110)
-
slice
_ before (22) -
slice
_ when (11) - sum (8)
- sysread (44)
- text (22)
-
to
_ s (11) - truncate (40)
- wtime (11)
検索結果
先頭5件
-
Tempfile
# length -> Integer (21114.0) -
テンポラリファイルのサイズを返します。
...テンポラリファイルのサイズを返します。
require "tempfile"
tf = Tempfile.new("foo")
tf.print("bar,ugo")
p tf.size # => 7
tf.close
p tf.size # => 7... -
Net
:: HTTPHeader # length -> Integer (21102.0) -
このメソッドは obsolete です。
このメソッドは obsolete です。
ヘッダフィールドの数を返します。 -
Net
:: POPMail # length -> Integer (21102.0) -
メールのサイズ (単位はバイト) をかえします。
メールのサイズ (単位はバイト) をかえします。 -
REXML
:: Parent # length -> Integer (21102.0) -
保持している子ノードの数を返します。
保持している子ノードの数を返します。 -
CSV
:: Table # length -> Integer (18120.0) -
(ヘッダを除く)行数を返します。
...(ヘッダを除く)行数を返します。
Array#length, Array#size に委譲しています。
//emlist[][ruby]{
require 'csv'
csv = CSV.new("a,b,c\n1,2,3", headers: true)
table = csv.read
p table.size # => 1
//}
@see Array#length, Array#size... -
REXML
:: Attributes # length -> Integer (18114.0) -
属性の個数を返します。
...ます。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
p a.attributes.length # => 3
//}... -
Array
# length -> Integer (18108.0) -
配列の長さを返します。配列が空のときは 0 を返します。
...配列の長さを返します。配列が空のときは 0 を返します。
//emlist[例][ruby]{
p [1, nil, 3, nil].size #=> 4
//}... -
MatchData
# length -> Integer (18108.0) -
部分文字列の数を返します(self.to_a.size と同じです)。
...部分文字列の数を返します(self.to_a.size と同じです)。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.size # => 4
//}... -
Set
# length -> Integer (18108.0) -
集合の要素数を返します。
...集合の要素数を返します。
//emlist[][ruby]{
require 'set'
p Set[10, 20, 30, 10].size # => 3
//}... -
Array
# repeated _ permutation(n) -> Enumerator (12208.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙......a.repeated_permutation(1).to_a #=> [[1], [2]]
a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a.repeated_permutation(0).to_a #=> [[]] # one perm......utation of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=> [[1,1,1],[1,1,2],[1,2,1...