42件ヒット
[1-42件を表示]
(0.008秒)
別のキーワード
キーワード
- bigdecimal (12)
-
net
/ smtp (12) -
rubygems
/ security (12) - shell (6)
検索結果
-
net
/ smtp (13.0) -
メールを送信するためのプロトコル SMTP (Simple Mail Transfer Protocol) を扱うライブラリです。
...で
セッションを終了しなければいけません。
File のように GC 時に勝手に close されることもありません。
# using SMTP#finish
require 'net/smtp'
smtp = Net::SMTP.start('smtp.example.com', 25)
smtp.send_message mail_string, 'from@example.com', 'to@example.......を使うと finish を呼んでくれるので便利です。
可能な限りブロック付きの start を使うのがよいでしょう。
# using block form of SMTP.start
require 'net/smtp'
Net::SMTP.start('smtp.example.com', 25) {|smtp|
smtp.send_message mail_string, 'from@example.c... -
rubygems
/ security (13.0) -
このライブラリは暗号署名を RubyGems パッケージに使用するために使用します。
...以下のように "-P HighSecurity" オプションを
付けて Gem をインストールしてみてください。
# install the gem with using the security policy "HighSecurity"
$ sudo gem install Imlib2-Ruby-0.5.0.gem -P HighSecurity
この -P オプションはセキュリティポリ......することが出来ます。さあ、上述の
インストールコマンドをもう一度実行してください。
# install the gem with using the HighSecurity policy
# (今度はなんの問題もありません)
$ sudo gem install Imlib2-Ruby-0.5.0.gem -P HighSecurity
今回は、R... -
bigdecimal (7.0)
-
bigdecimal は浮動小数点数演算ライブラリです。 任意の精度で 10 進表現された浮動小数点数を扱えます。
...{
#!/usr/local/bin/ruby
require "bigdecimal"
#
# Calculates 3.1415.... (the number of times that a circle's diameter
# will fit around the circle) using J. Machin's formula.
#
def big_pi(sig) # sig: Number of significant figures
exp = -sig
pi = BigDecimal("0")
two = BigDecimal("2")... -
shell (7.0)
-
Ruby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。
...f = open("tmpFile", "w")
f.print "TEST\n"
f.close
end
print pwd
end
end
end
==== Example 3: Using Pipe
require 'shell'
sh = Shell.new
sh.cat("/etc/printcap") | sh.tee("tee1") > "tee2"
(sh.cat < "/etc/printcap") | sh.tee("tee11") > "tee...