72件ヒット
[1-72件を表示]
(0.274秒)
種類
- インスタンスメソッド (48)
- ライブラリ (12)
- 文書 (12)
ライブラリ
- matrix (48)
クラス
- Matrix (48)
キーワード
- each (24)
-
net
/ pop (12) -
ruby 1
. 6 feature (12)
検索結果
先頭5件
-
Matrix
# each _ with _ index(which = :all) -> Enumerator (18114.0) -
行列の各要素をその位置とともに引数としてブロックを呼び出します。
...ブロックを省略した場合、 Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col|
puts "#{e} at #{row}, #{col}"
end
# => 1 at 0, 0
# => 2 at 0, 1
# => 3 at 1, 0
# => 4 at 1, 1
//}
@param which どの要素... -
Matrix
# each _ with _ index(which = :all) {|e , row , col| . . . } -> self (18114.0) -
行列の各要素をその位置とともに引数としてブロックを呼び出します。
...ブロックを省略した場合、 Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col|
puts "#{e} at #{row}, #{col}"
end
# => 1 at 0, 0
# => 2 at 0, 1
# => 3 at 1, 0
# => 4 at 1, 1
//}
@param which どの要素... -
ruby 1
. 6 feature (72.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...シグナルを送らないと終了しない不具合が修正さ
れました。((<ruby-bugs-ja:PR#223>))
trap(:TERM, "EXIT")
END{
puts "exit"
}
Thread.start { Thread.stop }
sleep
: 2002-04-17: Regexp#inspect
((<ruby-bugs-ja:PR#222>))
p %r{\/}
=> ruby 1......-03-10 メソッドの戻り値
以下のメソッドの戻り値が正しくなりました。((<ruby-bugs-ja:PR#205>))
* ((<Enumerable/each_with_index>)) が self を返すようになった(以前は nil)
* ((<Process/Process.setpgrp>)) が返す値が不定だった。
* ((<String/ljus......def _ptr() Ptr.new(self) end
end
def foo(int)
int[] += 1
end
x = 1._ptr
foo(x)
puts x[]
=> -:11: [BUG] Segmentation fault
ruby 1.6.5 (2001-09-19) [i586-linux]
=> -:11:in `[]=': wrong # of arguments... -
net
/ pop (42.0) -
このライブラリは、POP3 (Post Office Protocol version 3) を 用いてPOPサーバからメールを受信する機能を提供するライブラリです。
...始
if pop.mails.empty?
$stderr.puts 'no mail.'
else
pop.mails.each_with_index do |m, idx| # 各メッセージにアクセスする
File.open("inbox/#{idx + 1}", 'w') {|f|
f.write m.pop
}
m.delete
end
$stderr.puts "#{pop.mails.size} mails popped."
en......word') {|pop|
if pop.mails.empty?
$stderr.puts 'no mail.'
else
pop.mails.each_with_index do |m, idx|
File.open("inbox/#{idx + 1}", 'w') {|f|
f.write m.pop
}
m.delete
end
$stderr.puts "#{pop.mails.size} mails popped."
end
}
Net:......net/pop'
Net::POP3.start('pop.example.com', 110,
'YourAccount', 'YourPassword') {|pop|
if pop.mails.empty?
$stderr.puts 'no mail.'
else
i = 0
pop.delete_all do |m|
File.open("inbox/#{i}", 'w') {|f|
f.write m.pop
}
i +... -
Matrix
# each(which = :all) -> Enumerator (12.0) -
行列の各要素を引数としてブロックを呼び出します。
...uby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each { |e| puts e }
# => prints the numbers 1 to 4
Matrix[ [1,2], [3,4] ].each(:strict_lower).to_a # => [3]
//}
@param which どの要素に対してブロックを呼び出すのかを Symbol で指定します
@see Matrix#each_with_index, Matrix#map... -
Matrix
# each(which = :all) {|e| . . . } -> self (12.0) -
行列の各要素を引数としてブロックを呼び出します。
...uby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each { |e| puts e }
# => prints the numbers 1 to 4
Matrix[ [1,2], [3,4] ].each(:strict_lower).to_a # => [3]
//}
@param which どの要素に対してブロックを呼び出すのかを Symbol で指定します
@see Matrix#each_with_index, Matrix#map...