This slide is simple Objective Caml Tutorial, used in Axsh at 6/5.
Alternate URL: https://speakerdeck.com/s1061123/ocamllec01-100605110859-phpapp01
La práctica de laboratorio tuvo como objetivo comprobar el paso de energía a través de un electrolito utilizando cloruro de sodio. Se armó un circuito eléctrico con una cuba hidráulica, una varilla de vidrio, cables y un foco. Luego se realizó la práctica y se respondió un cuestionario sobre conceptos como ánodo, cátodo, cationes y aniones. Se concluyó que al pasar la energía hay más fluencia de energía a través del electrolito.
Este documento apresenta a Declaração Universal dos Direitos Humanos adotada pelas Nações Unidas em 1948, que reconhece a dignidade e os direitos iguais de todos os seres humanos e estabelece 30 artigos cobrindo direitos civis, políticos, econômicos, sociais e culturais, como o direito à vida, liberdade, igualdade, propriedade privada e educação.
This slide is simple Objective Caml Tutorial, used in Axsh at 6/5.
Alternate URL: https://speakerdeck.com/s1061123/ocamllec01-100605110859-phpapp01
La práctica de laboratorio tuvo como objetivo comprobar el paso de energía a través de un electrolito utilizando cloruro de sodio. Se armó un circuito eléctrico con una cuba hidráulica, una varilla de vidrio, cables y un foco. Luego se realizó la práctica y se respondió un cuestionario sobre conceptos como ánodo, cátodo, cationes y aniones. Se concluyó que al pasar la energía hay más fluencia de energía a través del electrolito.
Este documento apresenta a Declaração Universal dos Direitos Humanos adotada pelas Nações Unidas em 1948, que reconhece a dignidade e os direitos iguais de todos os seres humanos e estabelece 30 artigos cobrindo direitos civis, políticos, econômicos, sociais e culturais, como o direito à vida, liberdade, igualdade, propriedade privada e educação.
O documento descreve o sistema UMARF (Unified Meteorological Archive and Retrieval Facility) da EUMETSAT, que fornece um mecanismo unificado para recuperação de dados do EUMETCast pela internet. O UMARF requer cadastro de usuário e oferece busca, download e preenchimento de falhas de dados meteorológicos.
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
We asked LinkedIn members worldwide about their levels of interest in the latest wave of technology: whether they’re using wearables, and whether they intend to buy self-driving cars and VR headsets as they become available. We asked them too about their attitudes to technology and to the growing role of Artificial Intelligence (AI) in the devices that they use. The answers were fascinating – and in many cases, surprising.
This SlideShare explores the full results of this study, including detailed market-by-market breakdowns of intention levels for each technology – and how attitudes change with age, location and seniority level. If you’re marketing a tech brand – or planning to use VR and wearables to reach a professional audience – then these are insights you won’t want to miss.
Artificial intelligence (AI) is everywhere, promising self-driving cars, medical breakthroughs, and new ways of working. But how do you separate hype from reality? How can your company apply AI to solve real business problems?
Here’s what AI learnings your business should keep in mind for 2017.
This document summarizes and compares Ruby HTTP client libraries. It discusses the sync and async APIs of 16 libraries including Net::HTTP, HTTPClient, and Faraday. It covers their compatibility, supported features like keep-alive connections, and performance based on benchmarks. The document recommends libraries based on priorities like speed, HTML handling, API clients, and SSL support. It encourages readers to check the detailed feature matrix and report any errors found.
14. class RBTree
attr_reader :key, :value
attr_accessor :color, :left, :right getのみ、およびget/setの
def initialize(key, value) 簡易定義
@key, @value = key, value
@left = @right = EMPTY
# new node is added as RED
@color = :RED
end
def make_as_root
@color = :BLACK
end
def empty?
false
end
def red?
@color == :RED
end
def black?
@color == :BLACK
end
15. class RBTree
attr_reader :key, :value
attr_accessor :color, :left, :right
def initialize(key, value)
@key, @value = key, value
@left = @right = EMPTY
# new node is added as RED
@color = :RED
end
def make_as_root
@color = :BLACK
end
def empty?
false
end メソッド名末尾に?が使える
def red?
@color == :RED
end
def black?
@color == :BLACK
end
16. # returns new tree
def insert(key, value)
case key <=> @key 挿入は再帰で実装
when -1
@left = @left.insert(key,value)
when 0
@value = value
when 1
@[email protected](key,value)
end
# Rebalance of LL red-black trees
insert_rotate_left.
insert_rotate_right.
insert_color_flip
end
# returns value
def retrieve(key)
ptr = self
while !ptr.empty?
case key <=> ptr.key
when -1
ptr = ptr.left
when 0
return ptr.value
when 1
ptr = ptr.right
end
end
nil
end
17. # returns new tree
def insert(key, value)
case key <=> @key
when -1
@left = @left.insert(key,value)
when 0
@value = value
when 1
@[email protected](key,value)
end
# Rebalance of LL red-black trees
insert_rotate_left.
insert_rotate_right.
insert_color_flip
end
# returns value
def retrieve(key)
ptr = self 参照はループで実装
while !ptr.empty?
case key <=> ptr.key
when -1
ptr = ptr.left
when 0
return ptr.value
when 1
ptr = ptr.right
end
end
nil
end
18. class EmptyTree < RBTree
def initialize
@value = nil
@color = :BLACK
end
def empty?
true
end
# returns new_root
def insert(key, value)
RBTree.new(key, value)
末端への挿入により木が
end 大きくなる
def height
0
end
end
private_constant :EmptyTree
EMPTY = EmptyTree.new.freeze
19. # Do roate_left after insert if needed
def insert_rotate_left
if @left.black? and @right.red?
rotate_left
else
self
end
end
# Do rotate_right after insert if needed
def insert_rotate_right
if @left.red? and @left.left.red?
rotate_right
else
self
end リズムよく、山の形の
end 定義が連なる
# Do color_flip after insert if needed
def insert_color_flip
if @left.red? and @right.red?
color_flip
else
self
end
end
def swap_color(other)
@color, other.color = other.color, @color
end
20. # Right single rotation
#
# b d 手続き的な木の回転...
# / /
# a D -> B E
# / /
# c E a c
#
def rotate_left
root = @right
@right = root.left
root.left = self
root.swap_color(root.left)
root
end
# Left single rotation
#
# d b
# / /
# B e -> A D
# / /
# A c c e
#
def rotate_right
root = @left
@left = root.right
root.right = self
root.swap_color(root.right)
root
end
21. # Right single rotation
#
# b d
# / /
# a D -> B E
# / /
# c E a c
#
def rotate_left
root = @right
@right = root.left
root.left = self
root.swap_color(root.left)
root
end
# Left single rotation
#
# d b 逆方向もベタ書き...
# / /
# B e -> A D
# / /
# A c c e
#
def rotate_right
root = @left
@left = root.right
root.right = self
root.swap_color(root.right)
root
end
22. class RBTreeMap
class << self
alias newInstance new
end
def initialize
@root = RBTree::EMPTY
end
def get(key)
@root.retrieve(key)
end 赤黒木(RBTree)を使った
def put(key, value) 連想配列(RBTreeMap)
@root = @root.insert(key, value)
@root.make_as_root
value
end
def height
@root.height
end
end
※CRuby完全互換
https://github.com/nahi/javaone2012-benchmark