44件ヒット
[1-44件を表示]
(0.032秒)
種類
- インスタンスメソッド (22)
- ライブラリ (22)
ライブラリ
-
net
/ http (22)
モジュール
-
Net
:: HTTPHeader (22)
キーワード
-
each
_ name (11) - tsort (11)
-
win32
/ registry (11)
検索結果
先頭4件
-
Net
:: HTTPHeader # each _ key {|name| . . . } -> () (18107.0) -
保持しているヘッダ名をブロックに渡して呼びだします。
...呼びだします。
ヘッダ名は小文字で統一されます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_name { |name| puts name }
# => accept-encoding
# => accept
# => user-agent
//}... -
Net
:: HTTPHeader # each _ name {|name| . . . } -> () (3007.0) -
保持しているヘッダ名をブロックに渡して呼びだします。
...呼びだします。
ヘッダ名は小文字で統一されます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_name { |name| puts name }
# => accept-encoding
# => accept
# => user-agent
//}... -
tsort (18.0)
-
tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。
...関するモジュールを提供します。
=== Example
//emlist[][ruby]{
require 'tsort'
class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(node, &block)
fetch(node).each(&block)
end
end
{1=>[2, 3], 2=>[3], 3=>[], 4=>[]}.tsort
#=> [3, 2, 1, 4]
{1=>[2], 2......each_strongly_connected_component_from(target) {|ns|
if ns.length != 1
fs = ns.delete_if {|n| Array === n}
raise TSort::Cyclic.new("cyclic dependencies: #{fs.join ', '}")
end
n = ns.first
if Array === n
outputs, inputs, block = n
inputs_time =......tsort_each_child(node, &block)
@dep[node].each(&block)
end
include TSort
end
def command(arg)
print arg, "\n"
system arg
end
m = Make.new
m.rule(%w[t1]) { command 'date > t1' }
m.rule(%w[t2]) { command 'date > t2' }
m.rule(%w[t3]) { command 'date > t3' }
m.rule(%w[t4], %w[t1 t3]) { co... -
win32
/ registry (12.0) -
win32/registry は Win32 プラットフォームでレジストリをアクセスするための ライブラリです。Win32 API の呼び出しに Win32API を使います。
...reg.write('foo', Win32::Registry::REG_SZ, 'bar') # 値の書き込み
reg.each_value { |name, type, data| ... } # 値の列挙
reg.each_key { |key, wtime| ... } # サブキーの列挙
reg.delete_value('foo') # 値の削除
reg.delete_key('......WIN32OLE を使って WScript.Shell オブジェクト経由でアクセスする方法もあります。
require 'win32ole'
wsh = WIN32OLE.new('WScript.Shell')
value = wsh.RegRead 'HKLM\Software\Microsoft\Windows\...'
wsh.RegWrite 'HKCU\Software\foo\barfile\shell\open\command\\', '"C:\.....