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是数组中 ...
随机推荐
- Android开发之JavaMail发送邮件(用户反馈)
给APP增加了一个用户反馈的小功能,由于懒的搭服务器,所以就用邮件的形式进行通信,有如下两种方式: 1.使用调用手机上的其他程序完成邮件发送 2.使用javamail进行邮件发送 这里果断使用java ...
- Android TabWidget底部显示
TabHost控件默认使用LinearLayout包裹TabWidget和FrameLayout,布局文件如下: <TabHost xmlns:android="http://sche ...
- Repeart控件使用
对于刚刚接触到repearter控件,了解不深,现做个记录方便以后的查看 <asp:Repeater ID="rpt_OrderList" runat="serve ...
- C++ void*的使用
void*类型可以存储任何类型的指针,使用的时候强制转化成对应类型的指针便可. #include <iostream> #include <vector> using name ...
- 遇到bug怎么办
最近第一个完整的项目的第一期快完成了.期间,我怀疑过无数次人生,给难兄难弟辣椒相互吐槽过.被我师父点播后觉得人和人差距怎么可以这么大数次. 终于!基本功能实现了. 今天不总结具体问题了,说一下调试过程 ...
- x64内联汇编注意点
#include <windows.h> #include <stdio.h> extern "C" int MyPrintf(ULONGLONG,ULON ...
- Oracle中Merge into用法总结
MERGE语句是Oracle9i新增的语法,用来合并UPDATE和INSERT语句.通过MERGE语句,根据一张表或子查询的连接条件对另外一张表进行查询,连接条件匹配上的进行UPDATE,无法匹配的执 ...
- 三星四核RP4412开发板的root问题
问:荣品四核RP4412开发板的板子是root权限吗? 或者怎么root? 答:su . android 我们提供的是root用户 问:root以后的授权管理器没法运行. 我需要root,我要在and ...
- 【转】2014年25款最好的jQuery插件
2014年25款最好的jQuery插件 来源:Specs' Blog-就爱PHP 时间:2014-12-30 10:24:10 阅读数:2267 分享到: 0 http://www.php10 ...
- 导航效果css
<!doctype html> <html> <head> <meta charset="utf-8" /> <style&g ...