![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Ruby
文章平均质量分 79
zhangren07
重新写博客,每周一篇,坚持~
展开
-
Ruby学习笔记一——语言基础
#一、这里是注释,是单行注释,类似于//puts 3/5#这里是整数形式的结果puts 3/5.0#这里是小数形式的结果=begin 这是多行注释,实际上这也是Ruby内嵌文档格式,类似于Java doc =end不但要有起止,还要缩进才有用。=end #二、连行puts "Hello Ruby!"; puts "This is a "/"Strin原创 2010-02-04 20:02:00 · 696 阅读 · 0 评论 -
Watir学习笔记之一 浏览器的简单使用
Load the Watir libraryrequire 'watir' Open a browser (default: Internet Explorer)browser = Watir::Browser.new Open Browser at the specified URLbrowser = Watir::Browser.start("http://google.com") Go to a specified URLbrowser.goto("http:/转载 2010-07-28 18:42:00 · 1992 阅读 · 2 评论 -
radrails安装
<br />http://www.aptana.com/downloads/start#<br />插件版和完整版都有原创 2010-07-28 14:59:00 · 515 阅读 · 0 评论 -
watir简易教程
# 使用Watir工具,需要在脚本中加上 require 'watir' # 创建一个IE的实例 ie = Watir::IE.new 或者在创建的同时直接转到页面 ie = Watir::IE.start('http://www.text.com/') Watir使用start方法同时创建一个浏览器实例并转到一个页面。 IE浏览速度 ie.speed = :fast ie.speed = :slow # 页面导航 ie.goto('http://www.text.com/') 注: ie.goto还可以运转载 2010-07-28 13:28:00 · 720 阅读 · 0 评论 -
watir安装及中文支持问题
watir( Web Application Testing in Ruby) 是一款基于ruby的自动化测试工具,使用watir写的语句在执行时,IE(如果使用IE的话)将被运行,并在框中输入内容,执行跳转,判断结果等,完全模拟人的操作行为。 假设已经安装好了ruby,则只需要执行:gem update --systemgem install watir两个命令即可。原创 2010-02-23 10:44:00 · 3190 阅读 · 0 评论 -
转载——Ruby字符串处理
转自:http://developer.51cto.com/art/200912/170762.htm Ruby字符串处理函数总结列表分享Ruby字符串处理函数包括返回字符串长度函数;判断字符串中是否包含另一个串函数;字符串插入;字符串分隔,默认分隔符为空格等等。 str.length => integer str.include? other_str =>转载 2010-02-04 20:11:00 · 906 阅读 · 0 评论 -
Ruby学习笔记二——数组
#一、数组引用arr=[3,4,5,6,7,8,9]puts arr[0] #3puts arr.first #3puts arr[arr.length-1] #9puts arr[arr.size-1] #9puts arr.last #9puts arr[-1] #9puts arr[-2] #8print arr[1..3] ,"/n" #456原创 2010-02-04 20:06:00 · 1180 阅读 · 0 评论 -
让RadRails可以提示语法
TextMeta有强大的代码片段功能,这里提供一个templates包下载:http://dl.javaeye.com/topics/download/a31526c3-ee02-4417-b56f-95ec686394121。把templates包解压缩(最好放到RadRails安装目录下),有两个xml文件:ruby-rr-templates.xml和rhtml-rr-templates.xm转载 2010-02-05 11:57:00 · 908 阅读 · 0 评论 -
一个很不错的——Ruby参考手册及附加库等资料站点
http://www.kuqin.com/rubycndocument/index.html原创 2010-02-04 20:15:00 · 540 阅读 · 0 评论 -
Ruby学习笔记四——模块
#一、模块定义及引用,模块就是一段代码,里面有一些方法放一起。#定义模块用module...end 。模块与类非常相似,但是:#A) 模块不可以有实例对象;#B) 模块不可以有子类。include Mathputs sqrt(91); module Me def sqrt(a) puts a*a; return a*a;endPI=3原创 2010-02-04 20:09:00 · 668 阅读 · 0 评论 -
Ruby学习笔记三——类
#一、定义一个类class Person def initialize(name,age=18) @name=name; @age=age; @motherland="china"; end def talk puts "my name is "+@name+" and I am "+@age.to_s if @mothe原创 2010-02-04 20:08:00 · 617 阅读 · 0 评论 -
使用dynatrace+showslow进行前端性能测试
1.背景应用的性能测试与优化目前主要停留在服务器端的反馈,而对于前端性能标准的研究与测试相对比较空白,缺乏统一的标准与工具。众所周知,浏览器html组件的下载及渲染性能直接影响最终的用户体验,目前应用的前端性能有许多优化空间,因此对前端性能进行测试与监控,有利于提升客户体验,原创 2011-10-18 10:33:56 · 12270 阅读 · 2 评论