370件ヒット
[201-300件を表示]
(0.032秒)
別のキーワード
クラス
- Encoding (48)
-
Fiddle
:: Function (12) - Float (22)
- Socket (24)
- TCPSocket (12)
- WIN32OLE (12)
-
WIN32OLE
_ TYPE (12)
キーワード
- InvalidByteSequenceError (12)
-
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 6 . 0 (7) - NKF (12)
- aliases (12)
- call (12)
- codepage (12)
-
collect
_ method (12) - commands (12)
- compatible? (12)
- copy (12)
-
cp
_ lr (7) -
cp
_ r (12) -
create
_ makefile (12) -
default
_ event _ sources (12) -
egrep
_ cpp (24) - gethostbyname (12)
- link (12)
- ln (12)
-
name
_ list (12) - names (12)
-
next
_ float (11) -
prev
_ float (11) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 9 feature (12) - tcp (24)
- un (12)
- 多言語化 (12)
検索結果
先頭5件
-
NKF (64.0)
-
nkf(Network Kanji code conversion Filter, https://osdn.net/projects/nkf/) を Ruby から使うためのモジュールです。
...anji code conversion Filter, https://osdn.net/projects/nkf/) を
Ruby から使うためのモジュールです。
=== 使い方
以下は、漢字コード変換コマンドの例です。
//emlist[例][ruby]{
#!/usr/local/bin/ruby
require 'nkf'
opt = ''
opt = ARGV.shift if ARGV[0][0] == ?-......while line = ARGF.gets
print NKF.nkf(opt, line)
end
//}
以下は、漢字コード判別コマンドの例です。
//emlist[例][ruby]{
#!/usr/local/bin/ruby
require 'nkf'
CODES = {
NKF::JIS => "JIS",
NKF::EUC => "EUC",
NKF::SJIS => "SJIS",
NKF::UTF8 => "UTF8",
NK......ここでの名前の指定には大文字小文字は無視されます。
ISO-2022-JP
EUC-JP
eucJP-ascii
eucJP-ms
CP51932
Shift_JIS
CP932
UTF-8 UTF-8Nと同じ
UTF-8N
UTF-8-BOM
UTF-16 UTF-16BE-BOMと同じ
UTF-16BE
UTF-16BE-BOM
UTF-16LE... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (42.0) -
型が持つソースインターフェイスを取得します。
...ださい。
ここでは最終イベントのStatusTextChangeイベントのメッセージについては既
知としています。
# coding : cp932
require 'win32ole'
type = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'InternetExplorer')
ctl = WIN32OLE.new(type.progid)
source = typ......now}: #{m.name} was called"
p arg
end
end
end
evt = WIN32OLE_EVENT.new(ctl)
evt.handler = WebEvent.new
ctl.navigate2 'http://www.ruby-lang.org/'
loop do
break if evt.handler.completed
WIN32OLE_EVENT.message_loop
end
ctl.Quit
このプログラムを実行するとWindows......e was called
["{265b75c1-4158-11d0-90f6-00c04fd497ea}"]
2010-10-06 22:33:54 +0900: BeforeNavigate2 was called
[#<WIN32OLE:0x9d08f0>, "http://www.ruby-lang.org/", 0, "", nil, "", false]
2010-10-06 22:33:54 +0900: DownloadBegin was called
[]
2010-10-06 22:33:54 +0900: PropertyChange was called... -
FileUtils
. # copy(src , dest , options = {}) -> () (37.0) -
ファイル src を dest にコピーします。
...つ、dest がディレクトリでない場合に発生します。
//emlist[][ruby]{
require 'fileutils'
FileUtils.cp 'eval.c', 'eval.c.org'
FileUtils.cp(['cgi.rb', 'complex.rb', 'date.rb'], '/usr/lib/ruby/1.8')
FileUtils.cp(%w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.8', verbose: true)
//}... -
Encoding
. compatible?(obj1 , obj2) -> Encoding | nil (18.0) -
2つのオブジェクトのエンコーディングに関する互換性をチェックします。 互換性がある場合はそのエンコーディングを、 ない場合は nil を返します。
...合返り値のエンコーディングは
結合した文字列が取るであろう Encoding オブジェクトを返します。
//emlist[例][ruby]{
Encoding.compatible?("\xa1".force_encoding("iso-8859-1"), "b")
#=> #<Encoding:ISO-8859-1>
Encoding.compatible?(
"\xa1".force_encoding("iso-8859......方のオブジェクトが encoding を持つ場合には
互換性を判定することができます。
//emlist[例][ruby]{
Encoding.compatible?(Encoding::UTF_8, Encoding::CP932)
# => nil
Encoding.compatible?(Encoding::UTF_8, Encoding::US_ASCII)
# => #<Encoding:UTF-8>
//}
@param obj1 チェッ... -
FileUtils
. collect _ method(opt) -> Array (18.0) -
与えられたオプションを持つメソッド名の配列を返します。
...与えられたオプションを持つメソッド名の配列を返します。
@param opt オプション名をシンボルで指定します。
//emlist[][ruby]{
require 'fileutils'
FileUtils.collect_method(:preserve) # => ["cp", "cp_r", "copy", "install"]
//}... -
FileUtils
. commands -> Array (18.0) -
何らかのオプションを持つメソッド名の配列を返します。
...何らかのオプションを持つメソッド名の配列を返します。
//emlist[][ruby]{
require 'fileutils'
FileUtils.commands # => ["chmod", "cp", "cp_r", "install", ...]
//}... -
Float
# next _ float -> Float (18.0) -
浮動小数点数で表現可能な self の次の値を返します。
...ext_float、Float::INFINITY.next_float は
Float::INFINITY を返します。Float::NAN.next_float は
Float::NAN を返します。
//emlist[例][ruby]{
p 0.01.next_float # => 0.010000000000000002
p 1.0.next_float # => 1.0000000000000002
p 100.0.next_float # => 100.00000000000001
p 0.01.next_f......1.4210854715202004e-14
f = 0.01; 20.times { printf "%-20a %s\n", f, f.to_s; f = f.next_float }
# => 0x1.47ae147ae147bp-7 0.01
# 0x1.47ae147ae147cp-7 0.010000000000000002
# 0x1.47ae147ae147dp-7 0.010000000000000004
# 0x1.47ae147ae147ep-7 0.010000000000000005
# 0x1.47ae147ae147fp-7 0.010......47ae147ae1489p-7 0.010000000000000024
# 0x1.47ae147ae148ap-7 0.010000000000000026
# 0x1.47ae147ae148bp-7 0.010000000000000028
# 0x1.47ae147ae148cp-7 0.01000000000000003
# 0x1.47ae147ae148dp-7 0.010000000000000031
# 0x1.47ae147ae148ep-7 0.010000000000000033
//}
@see Float#prev_float... -
Encoding
# names -> String (12.0) -
エンコーディングの名前とエイリアス名の配列を返します。
...エンコーディングの名前とエイリアス名の配列を返します。
//emlist[例][ruby]{
Encoding::UTF_8.names #=> ["UTF-8", "CP65001"]
//}... -
Encoding
. aliases -> Hash (12.0) -
エンコーディングの別名に対して元の名前を対応づけるハッシュを返します。
...ンコーディングの別名に対して元の名前を対応づけるハッシュを返します。
//emlist[例][ruby]{
p Encoding.aliases
#=> {"BINARY"=>"ASCII-8BIT", "ASCII"=>"US-ASCII", "ANSI_X3.4-1968"=>"US-ASCII",
# "SJIS"=>"Windows-31J", "eucJP"=>"EUC-JP", "CP932"=>"Windows-31J"}
//}... -
Encoding
. name _ list -> [String] (12.0) -
利用可能なエンコーディングの名前を文字列の配列で返します。
...利用可能なエンコーディングの名前を文字列の配列で返します。
//emlist[例][ruby]{
p Encoding.name_list
#=> ["US-ASCII", "ASCII-8BIT", "UTF-8",
# "ISO-8859-1", "Shift_JIS", "EUC-JP",
# "Windows-31J",
# "BINARY", "CP932", "eucJP", ...]
//}...