Ruby-1
- Ruby API 文档 http://www.ruby-doc.org/core-2.0.0/
- Programming Ruby http://ishare.iask.sina.com.cn/f/22783772.html
- 替换字符串某一部分的方法
puts "hello".sub(/l/, '*')
puts "hello".gsub(/l/, '*') puts "hello".sub(/lll/, '*')
puts "hello".gsub(/lll/, '*') #return itself if no gsub
puts "hello".sub!(/lll/, '*')
puts "hello".gsub!(/lll/, '*') #return nil if no gsub
sleep 10 - 正则表达式 http://www.ruby-doc.org/core-2.0.0/Regexp.html
- Regexps are created using the
/.../and%r{...}literals, and by theRegexp::newconstructor.
- Regexps are created using the
- 区间 http://www.ruby-doc.org/core-2.0.0/Range.html
- Ranges may be constructed using the s
..e and s...e literals, or with ::new.
- Ranges may be constructed using the s
- 打印字符串
puts "hello"
Ruby-1的更多相关文章
- 安装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 ...
- 安装了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 ...
- Ruby on Rails 创建https应用
1. 创建证书请求文件条件:私钥+证书签名请求+opensslyum install -y opensslmkdir /root/ssl/ && cd /root/ssl/openss ...
- Ruby数组
Ruby数组是有序的,任何对象的整数索引的集合.每个数组中的元素相关联,并提取到的一个索引.下标与C或Java相似,从0开始.负数索引假设数组末尾,也就是说-1表示最后一个元素的数组索引,-2是数组中 ...
随机推荐
- 转载:ViewHolder为什么声明为static
转自:http://www.cnblogs.com/bluestorm/p/5867061.html ListView优化中ViewHolder要不要定义为static静态内部类? 给学生讲课的时 ...
- 在windows不能正常使用boost og
现象: 1. 在两个不同的dll中使用static的boost.log.在一个dll中的设置在另一个dll中没有起作用 原因:core::get()返回的是一个单例.在不同的dll中是不同的对象 解决 ...
- c# 获取 本周、本月、本季度、本年 的开始时间或结束时间
#region 获取 本周.本月.本季度.本年 的开始时间或结束时间 /// <summary> /// 获取结束时间 /// </summary> /// <param ...
- WCF初探文章列表
WCF初探-1:认识WCF WCF初探-6:WCF服务配置 WCF初探-2:手动实现WCF程序 WCF初探-7:WCF服务配置工具使用 WCF初探-3:WCF消息交换模式之单向模式 WCF初探-8:W ...
- iOS网络推送消息
在iOS项目的appdelegate.m文件中: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOpti ...
- 1627. Join
http://acm.timus.ru/problem.aspx?space=1&num=1627 给一个无向图,问可以有多少生成树 参照 周冬<生成树的计数及其应用> 代 ...
- fonts.useso.com 访问变慢
fonts.useso.com 替换为 fonts.lug.ustc.edu.cn ajax.useso.com 替换为 ajax.lug.ustc.edu.cn the ...
- SharePoint 2010 + 左侧导航(Left Nav Bar)二级菜单的修改
SharePoint 2010 + 修改左侧导航类似顶部导航菜单的样式 查找aspmenu的控件,ID为“V4QuickLaunchMenu”,修改分别将属性“StaticDisplayLevels” ...
- Bootstrap <基础二十五>警告(Alerts)
警告(Alerts)以及 Bootstrap 所提供的用于警告的 class.警告(Alerts)向用户提供了一种定义消息样式的方式.它们为典型的用户操作提供了上下文信息反馈. 您可以为警告框添加一个 ...
- Raspberry Pi Resources-Using the UART
参考:RPi Serial Connection 本文来自:http://www.raspberry-projects.com/pi/programming-in-c/uart-serial-port ...