block = { |x| puts x } # WRONG # SyntaxError: compile error #--- block = lambda { |x| puts x } # RIGHT #…
concept introduction 源代码
汇集 concept introduction 相关的电路原理图、PCB工程文件、单片机/FPGA源代码、数据手册与应用设计方案。
'400'.to_i # => 400 '3.14'.to_f # => 3.14 '1.602e-19'.to_f # => 1.602e-19 …
require 'open-uri' puts open('http://www.oreilly.com/').read(200) # # #--- require 'net/http' response = Net::HTTP.get_response(…
'a string'.class # => String 'a string'.class.name # => "String" 'a s…
$ gem query *** LOCAL GEMS *** sources (0.0.1) This package provides download sources for remote gem installation $ gem query…
people = Hash.new people[:nickname] = 'Matz' people[:language] = 'Japanese' people['last name'.intern] = 'Matsumoto' people[:nickn…
def confirmation_hearings questions = [['What is your name?', :name], ['How old are you?', :age], …
now = Time.now # => Sat Mar 18 16:58:07 EST 2006 now.gmtime # => Sat Mar 18 21:58:07 UTC…
require 'set' # Deals with a collection of unordered values with no duplicates # Include this module to make your class taggable.…
simlib/base/concept