44件ヒット
[1-44件を表示]
(0.073秒)
キーワード
-
net
/ smtp (11) -
rdoc
/ markdown (11) -
rdoc
/ parser / c (11) - tsort (11)
検索結果
-
tsort (55.0)
-
tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。
...xample
//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=>[3, 4], 3=>[2], 4=>[]}.strongly_connected_componen......][ruby]{
require 'tsort'
class Make
def initialize
@dep = {}
@dep.default = []
end
def rule(outputs, inputs=[], &block)
triple = [outputs, inputs, block]
outputs.each {|f| @dep[f] = [triple]}
@dep[triple] = inputs
end
def build(target)
each_strongly_connected_com......raise TSort::Cyclic.new("cyclic dependencies: #{fs.join ', '}")
end
n = ns.first
if Array === n
outputs, inputs, block = n
inputs_time = inputs.map {|f| File.mtime f}.max
begin
outputs_time = outputs.map {|f| File.mtime f}.min
resc... -
rdoc
/ parser / c (49.0) -
C 言語で記述されたソースコードから組み込みクラス/モジュールのドキュメン トを解析するためのサブライブラリです。
...解析します。
例: Array#flatten の場合。rb_ary_flatten のコメントが解析されます。
/*
* Returns a new array that is a one-dimensional flattening of this
* array (recursively). That is, for every element that is an array,
* extract its elements into the new array.......があります。
また、Ruby のソースコードとは別にコメントには特別な命令を指定する事がで
きます。
: Document-class: name
記述する内容を name で指定した Ruby のクラスのものに指定します。同じ
.c ファイルに複数のクラス......ない場合に使用します。
: Document-method: name
記述する内容を name で指定した Ruby のメソッドのものに指定します。
RDoc が対応するメソッドを見つけられなかった場合に使用します。
: call-seq:
指定した次の行から次の空... -
rdoc
/ markdown (43.0) -
Markdown 形式で記述されたドキュメントを rdoc 上で解析するための サブライブラリです。
...ない機能があります。
Underscores embedded in words are never interpreted as emphasis. (While the
[markdown dingus][dingus] emphasizes in-word underscores, neither the
Markdown syntax nor MarkdownTest mention this behavior.)
また URL を記述すると HTML を出力する際に自動......に含める事はできま
せん。この拡張はデフォルトでは無効になっています。
例:
<style type="text/css">
h1 { font-size: 3em }
</style>
==== 定義リスト
RDoc::Markdown#definition_lists を設定する事で定義リストを出力す
る事ができます。......ださい。この拡張はデフォルトで
有効になっています。
* PHP Markdown Extra syntax: https://michelf.ca/projects/php-markdown/extra/#def-list
例:
cat
: A small furry mammal that seems to sleep a lot
ant
: A little insect that is known to enjoy picnics
出力... -
net
/ smtp (25.0) -
メールを送信するためのプロトコル SMTP (Simple Mail Transfer Protocol) を扱うライブラリです。
...る
のでおすすめです。
require 'net/smtp'
Net::SMTP.start( 'smtp.example.com', 25 ) {|smtp|
# use smtp object only in this block
}
smtp-server.example.com は適切な SMTP サーバのアドレスに読みかえてください。
通常は LAN の管理者やプロバイダが......tp.example.com', 25) {|smtp|
smtp.send_message(<<-EndOfMail, 'from@example.com', 'to@example.net')
From: Your Name <from@example.com>
To: Dest Address <to@example.net>
Subject: test mail
Date: Sat, 23 Jun 2001 16:26:43 +0900
Message-Id: <unique.message.id.string@yourhost.example.com>......うと 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.com', '...