ruby杂记
ruby基本类中的方法:puts Object.private_instance_methods
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAq0AAAHCCAIAAABKdGfuAAAgAElEQVR4nO3dwZmjuqIu0JNO4zQ2abTCUBRX3/cmd3TO6JJE46ROCG8gwAIDtinbVW6tNdi7C2MhA1X6kYT513//+98TAFClf8kBAFAtOQAA6iUHAPA3aJo2ptg2zXdX5MO8PAc0TRu7FJ5xYJoQnlLOt9jZD0/5XPbzVzRNSP1z9t6lzPp249s4Xlwfr6ZpY9fFtimWPP88+XZtjE//RA/ngNT357kutvtvaUJKYXHAwqKcfvdo5fX311kVUn9dfrn1A2XOKtbGru+3dsJ4Wo7b3dgPW3VocundvfH2uvxHHd7PH608H764A8sCa9uNb+N4fZDpYD1x924dr3wldL3p6/OkCemh86dpQuovCWO//Zq1LymUS/If8/yH/cA++Up7MW10tbV6OAcsElbThHSroVpdZ1FOG7v9Bu9AsstvGN4+HMdmcd08Lb+/2Osqrdbt+qjcsx/2S7hdn6Of5Z76/JXyTk4hf+qnffbaduPbOF6f6Om797rA/He9WGHzPBleGdqCWf/B5ubGv8RbFZjar9xU53anvA5ctptjHb7+wRcfeau9yA3dVgnHc8BDhzYP2qyWs/rjznbvr2dcO2yPbnfHIn5evZpiXIaMm/vhi67Lf1RtfxDHz/tYu/L00/W5b3+b99fzZx6vT/FdH/MNOWCtM2D9PJlaxFO+DizSw5Y2dn3XdYuLurV2JDf9xRuHPvwxlxTXn3ds954P/pV3Tcu/kAPWEs1WJFmEteua5cIOfJI719+6Vi77DB6ynyWH2SpXnQ0398MXXZf/cAl1/EGczK8b7v3UbezuGMk6vhtvlv8e1/2fi87M99fzZx6vH+IHHq+iYi/MAWszA9bPk8Wa+ad/fv3e328h9SnM37jWfu03CmVE+EK788wcMJ0Px3LA5uD6Zg64msW2OGXLcZSp2PLH4ZOM4/FDx8t88GlnLCrHgOut3zwYxZrX21rWZxJibJtmJQes74eVclY/S7FDLntv/rnmox7zQvJsiX4871+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i0A1136qy73C/RD38DsvoA2dn2/uF9g676Ah7YLAJw+6/sEAYDnem0OWFzEu8sfAH4U/QEAUC85AADqJQcAQL3kAACo17/+HwBQq3/9FwColRwAAPX6/zTnWpbTj+YeAAAAAElFTkSuQmCC" alt="" />
范围:
a=1..20
puts a.min
puts a.max
puts a.reject{ |i| i< 15}
puts a.select{ |i| i< 15}
a.each do |i|
print i.to_s+", "
end
HASH
hash={
"name" => "xiaoming",
"age" => 18,
}
person=Hash.new
puts "Num is :"+person.size.to_s
person['name'] = "xiaoming"
puts "Num is :"+person.size.to_s print hash.keys()
puts
puts hash.include?('name')
hash.delete('name')
puts hash.has_key?('name')
print hash.values hash={
"name" => "xiaoming",
"age" => 18,
}
puts" each, each_key, each_value, eack_pair"
hash.each do |key, value|
puts "key: "+key.to_s+" value: "+value.to_s
end
ruby杂记的更多相关文章
- 安装cocoapods遇到两大坑-Ruby版本升级和Podfile的配置
今天安装cocoapods #移除原有ruby源 $ gem sources --remove https://rubygems.org/ #使用可用的淘宝网 $ gem sources -a htt ...
- Unable to download data from http://ruby.taobao.org/ & don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
安装cocoapods,记录两个问题! 1.镜像已经替换成了 http://ruby.taobao.org/, 还是不能不能安装cocoapods, 报错:Unable to download dat ...
- [Erlang 0118] Erlang 杂记 V
我在知乎回答问题不多,这个问题: "对你职业生涯帮助最大的习惯是什么?它是如何帮助你的?",我还是主动回答了一下. 做笔记 一开始笔记软件做的不好的时候就发邮件给自己, ...
- 安装了ruby后怎么安装sass
在命令行中输入 ruby -v 查看版本号 先移除默认的https://rubygems.org源,命令为gem sources --remove https://rubygems.org/,按回车 ...
- ruby 基础知识(一)
突然今天发现一大神的博客:http://www.cnblogs.com/jackluo/archive/2013/01/22/2871655.html 相信初学者会受益颇多 ruby 参考文档 ...
- ruby 基础知识(二)
ruby 中的动态方法 http://singleant.iteye.com/blog/1680382 Rails 大量使用了符号(symbol).符号看上去很像变量名,不过以冒号作为前缀.符号的例 ...
- Ruby安装Scss
Ruby安装Scss 引言 已经许久不写HTML了,今天有点以前的东西要改.但是刚装的Windows10,已经没有以前的Web开发环境了.只好重新安装. 结果Webstorm装好后配置Scss出现错误 ...
- fzf by ruby
fzf by ruby */--> fzf by ruby 1 github地址 https://github.com/junegunn/fzf 2 简介 软件通过匿名管道和grep扩展了bas ...
- The Safe Navigation Operator (&.) in Ruby
The most interesting addition to Ruby 2.3.0 is the Safe Navigation Operator(&.). A similar opera ...
随机推荐
- RTL2832U+R820电视棒跟踪飞机轨迹教程(ADS-B)
Ubuntu 14.04.3 amd64 apt-get install git apt--dev 安装rtl-sdr git clone git://git.osmocom.org/rtl-sdr. ...
- php大力力 [007节]php静态表量
2015-08-23 php大力力007. php静态表量 这里看一下高老师的视频讲解: 转帖: php中static静态类与static 静态变量用法区别 php中的静态变量的基本用法 转载 时间: ...
- Ubuntu 重新设置网络
sudo service network-manager stop sudo rm /var/lib/NetworkManager/NetworkManager.state sudo service ...
- HTTP header头信息
HTTP(HyperTextTransferProtocol)即超文本传输协议,目前网页传输的的通用协议.HTTP协议采用了请求/响应模型,浏览器或其他客户端发出请求,服务器给与响应.就整个网络资源传 ...
- iPhone各控件的默认高度
1.状态栏 状态栏一般高度为20像素,在打手机或者显示消息时会放大到40像素高,注意,两倍高度的状态栏在好像只能在纵向的模式下使用.如下图 用户可以隐藏状态栏,也可以将状态栏设置为灰色,黑色或者半透明 ...
- git pull --rebase 做了什么? 以及 Cannot rebase: You have unstaged changes 解决办法
最近刚学 git rebase,觉得很牛逼的样子, 结果今天就被打脸了. git pull --rebase 报错: Cannot rebase: You have unstaged changes ...
- hdu 3172
http://acm.hdu.edu.cn/showproblem.php?pid=3172 题意:输出每对朋友的关系网大小 并查集的时候维护一个数组记录根节点的大小即可,水题,这题坑在T组数据这个也 ...
- PHP 的snmp各个版本的Wrapper封装类
原文来自:http://blog.chinaunix.net/uid-7654720-id-3211234.html class SNMP_Wrapper { protected $_host; pr ...
- LeetCode Rotate Image (模拟)
题意: 将一个n*n的矩阵顺时针旋转90度. 思路: 都是差不多的思路,交换3次也行,反转再交换也是行的. class Solution { public: void rotate(vector< ...
- URL结尾反斜杠对SEO的影响(转)
开始纠结网站URL加不加反斜杠对SEO的影响,还有些人把这个反斜杠说的神乎其神,我擦,本人手贱百度了一下,果然“博大精深”,敬请参考! 从百度站长平台的外链分析里,我们可以看到,一些目录结构的URL, ...