- 博客(4)
- 资源 (2)
- 收藏
- 关注
原创 ENV and IRB
1. ENVENV can be inherited by children, but what children do will be transparent to parent.puts "In parent, term = #{ENV['TERM']}" fork doputs "Start of child 1, term = #{ENV['TERM']}"
2015-07-27 23:48:54 262
原创 Ruby Array
Ruby ArrayInitializea = Array.newa = []a = Array.new(n) #create n elements each value is nil.a = Array.new(n, m) #create n elements each value is m.Operatea + b #return a
2015-07-22 14:00:20 298
原创 Ruby String(2)
String In Ruby在Ruby中可以有多种方式表达String,如下,用double quotes 和single quotes.puts "sleep tight"puts 'sleep tight'但是两个的在转义方面有所不同,single quotes只用来定义常量字符串,并且只会多backslash和single quote进行转义,如下:\'\\
2015-07-20 22:17:54 228
原创 Ruby Programming
Ruby 基础Ruby的特点如下:1. Object Oriented 在ruby中,一切皆对象,所以的东西都可以称为对象,继承于Object, 即使是true和false变量。2. MixinsRuby中有module, 类似于class, 但是module没有实例。 Module可以被mixed in 到其他的类中,相对于是对类方法的扩展。一个类可以扩展任意的m
2015-07-20 21:55:28 318
基本的图像处理算法.rar
2010-10-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人