- 浏览: 2065670 次
- 性别:
- 来自: NYC
文章分类
- 全部博客 (628)
- Linux (53)
- RubyOnRails (294)
- HTML (8)
- 手册指南 (5)
- Mysql (14)
- PHP (3)
- Rails 汇总 (13)
- 读书 (22)
- plugin 插件介绍与应用 (12)
- Flex (2)
- Ruby技巧 (7)
- Gem包介绍 (1)
- javascript Jquery ext prototype (21)
- IT生活 (6)
- 小工具 (4)
- PHP 部署 drupal (1)
- javascript Jquery sort plugin 插件 (2)
- iphone siri ios (1)
- Ruby On Rails (106)
- 编程概念 (1)
- Unit Test (4)
- Ruby 1.9 (24)
- rake (1)
- Postgresql (6)
- ruby (5)
- respond_to? (1)
- method_missing (1)
- git (8)
- Rspec (1)
- ios (1)
- jquery (1)
- Sinatra (1)
最新评论
-
dadadada2x:
user模型里加上 protected def email ...
流行的权限管理 gem devise的定制 -
Sev7en_jun:
shrekting 写道var pattern = /^(0| ...
强悍的ip格式 正则表达式验证 -
jiasanshou:
好文章!!!
RPM包rpmbuild SPEC文件深度说明 -
寻得乐中乐:
link_to其实就是个a标签,使用css控制,添加一个参数: ...
Rails在link_to中加参数 -
aiafei0001:
完全看不懂,不知所然.能表达清楚一点?
"$ is not defined" 的问题怎么办
1.What is the notation used for denoting class variables in Ruby?
2.How is class methods defined in Ruby?
3. Whats the difference between symbol and string?
4.What it's print in screen?
5.What is the use of load and require in Ruby?
6.How do Dynamic define a Methods and call a methods dynamically
7.Use method_missing() implement dynamic attribute
8.How do hook method work, please give example of hook method
9.What is the result after execution.
10. Point out the wrong code of Watir
11.Assumption you do the follow code refactor, what is your comment
12.There is an error in the following code, please correct
13.Explain how Spec::Mocks work,and give an example
14. In ruby world, who hold object instance variable
A. Kernel B. Class C. Object D. Module
15.Write down "my_method" Method lookup chain
2.How is class methods defined in Ruby?
3. Whats the difference between symbol and string?
4.What it's print in screen?
def multiplier(n) lambda {|data| data.collect{|x| x*n } } end doubler = multiplier(2) # Get a lambda that knows how to double puts doubler.call([1,2,3])
5.What is the use of load and require in Ruby?
6.How do Dynamic define a Methods and call a methods dynamically
7.Use method_missing() implement dynamic attribute
class AccessorUtil def initialize #1 you could write your code here end def method_missing(name,*args) #2 you could write your code here end end class StepUtil<AccessorUtil end test = StepUtil.new test.send "a1=",9333 aaa= test.send "a1" puts aaa
8.How do hook method work, please give example of hook method
9.What is the result after execution.
"ruby123"[/\d+/] "ruby123"[/([a-z]+)(\d+)/,1] "ruby123"[/([a-z]+)(\d+)/,2]
10. Point out the wrong code of Watir
require 'watir' class WebPageUtil def initialize(ie) @dAttr=Hash.new @ie=ie @arr = ["text_field","checkbox","select_list","area","radio"] @filter = ["exampleid"] end def fill_form @dAttr.each do |name,value| if(!@filter.include?(name)) @arr.each do |watir_method| begin el=@ie.send watir_method,:name,name if el.exist? case watir_method when "text_field" el.set value.to_s when "checkbox" if value.to_s ="" el.clear else el.set end when "select_list" el.getAllContents el.set value.to_s when "area" el.append value.to_s when "radio" if value.to_s =="" el.clear else el.set end end end rescue end end end end end def method_missing(name,*args) key = name.to_s if name.to_s.include?("=") key = name.to_s.chop @dAttr[key]=args else if @dAttr.has_key?(name.to_s) return @dAttr[key].to_s else return nil end end end end ie = Watir::Browser.new ie.goto "http://www.google.com" dm= WebPageUtil.new(ie) dm.q="goole" dm.fill_form
11.Assumption you do the follow code refactor, what is your comment
require 'win32ole' require 'lib/util/step_util' require 'watir' require 'lib/util/web_page_util' class ExcelUtil def getAbsolutePath filename fso = WIN32OLE.new('Scripting.FileSystemObject') return fso.GetAbsolutePathName(filename) end def read_step (filename,sheet) filename = getAbsolutePath(filename) puts filename xl = WIN32OLE.new('Excel.Application') book = xl.Workbooks.Open(filename) record = [] begin sheet = book.Sheets(sheet) head = StepUtil.new index = 0 sheet.UsedRange.Rows(1).Cells.each do |cells| index+=1 head.send "column#{index}=",cells.value end sheet.UsedRange.Rows.each do |row| if(row.Cells(1).value!="xpath") step = StepUtil.new index_1 = 0 row.Cells.each do |cell| index_1+=1 attr = head.send "column#{index_1}" step.send "#{attr}=",cell.value end record<<step end end ensure book.Close xl.Quit end return record end def read_example (filename,sheet,ie) filename = getAbsolutePath(filename) puts filename xl = WIN32OLE.new('Excel.Application') book = xl.Workbooks.Open(filename) record = [] begin sheet = book.Sheets(sheet) head = WebPageUtil.new(ie) index = 0 sheet.UsedRange.Rows(1).Cells.each do |cells| index+=1 head.send "column#{index}=",cells.value end sheet.UsedRange.Rows.each do |row| if(row.Cells(1).value!="exampleid") example = WebPageUtil.new(ie) index_1 = 0 row.Cells.each do |cell| index_1+=1 attr = head.send "column#{index_1}" example.send "#{attr}=",cell.value end record<<example end end ensure book.Close xl.Quit end return record end end example = ExcelUtil.new ie = Watir::Browser.new ie.goto "http://www.google.com" arr_ex = example.read_example("dos/example_group.xls","product_template",ie) arr_ex.each do |example| example.fill_form puts example puts "_________________________" End
12.There is an error in the following code, please correct
require 'rubygems' require 'active_record' ActiveRecord::Base.establish_connection( :adapter => "oci", :username => "admin", :password => "123456", :host => "t31a.consys.prognet.com:1839/CTD09.real.com") class Account < ActiveRecord::Base set_table_name "ADMIN_TOOL_ACCOUNT" set_primary_key "id" end temp = Account.find_by_user_name("Admin") puts temp.id puts temp.USER_NAME
13.Explain how Spec::Mocks work,and give an example
14. In ruby world, who hold object instance variable
A. Kernel B. Class C. Object D. Module
15.Write down "my_method" Method lookup chain
class A end class B<A def my_method puts "do something here" end end obj = B.new obj.send("my_method")
发表评论
-
Destroying a Postgres DB on Heroku
2013-04-24 10:58 915heroku pg:reset DATABASE -
VIM ctags setup ack
2012-04-17 22:13 3246reference ctags --extra=+f --e ... -
alias_method_chain方法在3.1以后的替代使用方式
2012-02-04 02:14 3274alias_method_chain() 是rails里的一个 ... -
一些快速解决的问题
2012-01-19 12:35 1463问题如下: 引用Could not open library ... -
API service 安全问题
2011-12-04 08:47 1369这是一个长期关注的课题 rest api Service的 ... -
Module方法调用好不好
2011-11-20 01:58 1332以前说,用module给class加singleton方法,和 ... -
一个ajax和rails交互的例子
2011-11-19 01:53 1894首先,这里用了一个,query信息解析的包,如下 https: ... -
Rails 返回hash给javascript
2011-11-19 01:43 2262这是一个特别的,不太正统的需求, 因为,大部分时候,ajax的 ... -
关于Rubymine
2011-11-18 23:21 2250开个帖子收集有关使用上的问题 前一段时间,看到半价就买了。想 ... -
ruby中和javascript中,动态方法的创建
2011-11-18 21:01 1224class Klass def hello(*args) ... -
textmate快捷键 汇总
2011-11-16 07:20 8126TextMate 列编辑模式 按住 Alt 键,用鼠标选择要 ... -
Ruby面试系列六,面试继续面试
2011-11-15 05:55 2010刚才受到打击了,充分报漏了自己基础不扎实,不肯向虎炮等兄弟学习 ... -
说说sharding
2011-11-13 00:53 1467这个东西一面试就有人 ... -
rails面试碎碎念
2011-11-12 23:51 1932面试继续面试 又有问ru ... -
最通常的git push reject 和non-fast forward是因为
2011-11-12 23:29 17191git push To git@github.com:use ... -
Rails 自身的many to many关系 self has_many
2011-11-12 01:43 2713简单点的 #注意外键在person上people: id ... -
Rails 3下的 in place editor edit in place
2011-11-12 01:20 939第一个版本 http://code.google.com/p ... -
Heroku 的诡异问题集合
2011-11-11 07:22 1688开个Post记录,在用heroku过程中的一些诡异问题和要注意 ... -
SCSS 和 SASS 和 HAML 和CoffeeScript
2011-11-07 07:52 12942Asset Pipeline 提供了内建 ... -
Invalid gemspec because of the date format in specification
2011-11-07 02:14 2100又是这个date format的错误。 上次出错忘了,记录下 ...
相关推荐
这篇文档是一份互联网公司的校招笔试题目,涵盖了多个技术领域。以下是这些题目涉及的知识点详解: ...以上就是这份笔试题中涉及的IT知识点,包括分布式系统、大数据、广告投放、机器学习、全栈开发、运维等多个方面。
java中级工程师笔试题精彩访谈 技术面试问题列表的精选列表。 如果你想贡献,请阅读 或 。 看看我或者打个招呼。 目录 编程语言/框架/平台 安卓 . AngularJS 主干JS C++ C C♯ 。网 Clojure 咖啡脚本 CSS 姜戈 ...
高级java工程师笔试题目录 编程语言/框架/平台 安卓 AngularJS 角 主干JS C++ C C# 。网 Clojure CSS Cucumber 姜戈 码头工人 EmberJS 二郎 高朗 图Ql HTML 离子 IOS Java JavaScript jQuery 前端构建工具 ...
高级java工程师笔试题精彩访谈 技术面试问题列表的精选列表。 如果你想贡献,请阅读 或 。 查看我的或 . 目录 编程语言/框架/平台 安卓 . AngularJS 主干JS C++ C C♯ 。网 Clojure CSS 姜戈 EmberJS 二郎 高朗 HTML...
高级java工程师笔试题面试准备 面试准备链接 目录 编程语言/框架/平台 安卓 . AngularJS 角 主干JS C++ C C# 。网 Clojure CSS Cucumber 姜戈 码头工人 EmberJS 二郎 高朗 图Ql HTML 离子 IOS Java JavaScript ...
高级java工程师笔试题精彩访谈 技术面试问题列表的精选列表。 如果你想贡献,请阅读 或 。 单击此按钮有助于为 Awesome 项目提供资金 目录 编程语言/框架/平台 安卓 . AngularJS 角 主干JS C++ C C# 。网 Clojure ...
高级java工程师笔试题精彩访谈 技术面试问题列表的精选列表。 如果你想贡献,请阅读 或 。 查看我的或 . 目录 编程语言/框架/平台 安卓 . AngularJS 角 主干JS C++ C C# 。网 Clojure CSS Cucumber 姜戈 码头工人 ...
高级java工程师笔试题技术面试技巧 技术面试问题列表的精选列表。 如果你想贡献,请阅读。 简历模板 为软件工程师准备的简历(Curriculum Vitae)模板。 . 是 CV(简历)的 LaTeX 模板。 目录 编程语言/框架/平台 C ...
高级java工程师笔试题精彩访谈 技术面试问题列表的精选列表。 如果你想贡献,请阅读 或 。 查看我的或 . 目录 编程语言/框架/平台 安卓 . AngularJS 主干JS C++ C C♯ 。网 Clojure CSS 姜戈 EmberJS 二郎 高朗 HTML...
初级java笔试题CC Rails 门户活动创作、部署和报告系统 设置 先决条件 使用 git、ruby 或 jruby,以及 rubgems、wget Gems:capistrano、capistrano-ext、ruby-debug(奇怪的是,haml也是,部署时……) 待办事项:...
java初级开发者面试笔试题Ruby工作 在招聘 Ruby on Rails 程序员时,一开始要知道面试中要问的正确问题对我来说是一个真正的挑战。 在 30 分钟或更短的时间内,如果不查看候选人之前编写的代码,很难全面了解候选人...
高级java工程师笔试题 精彩访谈 技术面试问题列表的精选列表。 如果你想贡献,请阅读 或 。 目录 编程语言/框架/平台 安卓 . AngularJS 角 主干JS C++ C C# 。网 Clojure CSS Cucumber 姜戈 码头工人 EmberJS 二郎 ...
高级java工程师笔试题精彩访谈 技术面试问题列表的精选列表。 如果你想贡献,请阅读 或 。 查看我的或 . 目录 编程语言/框架/平台 安卓 . AngularJS 主干JS C++ C C♯ 。网 Clojure CSS 姜戈 EmberJS 二郎 高朗 HTML...
高级java工程师笔试题精彩访谈 技术面试问题列表的精选列表。 如果你想贡献,请阅读 或 。 查看我的或 . 目录 编程语言/框架/平台 安卓 . AngularJS 主干JS C++ C C♯ 。网 Clojure CSS 姜戈 EmberJS 二郎 高朗 HTML...
java面试题笔试题精彩访谈 技术面试问题列表的精选列表。 如果你想贡献,请阅读 或 。 查看我的或 . 目录 编程语言/框架/平台 安卓 . AngularJS 角 主干JS C++ C C♯ 。网 Clojure CSS Cucumber 姜戈 EmberJS 二郎 ...
高级java工程师笔试题精彩访谈 技术面试问题列表的精选列表。 如果你想贡献,请阅读 或 。 查看我的或 . 目录 编程语言/框架/平台 安卓 . AngularJS 主干JS C++ C C♯ 。网 Clojure CSS 姜戈 EmberJS 二郎 高朗 HTML...
高级java工程师笔试题精彩访谈 技术面试问题列表的精选列表。 如果你想贡献,请阅读 或 。 单击此按钮有助于为 Awesome 项目提供资金 自豪地支持真棒项目 目录 编程语言/框架/平台 安卓 . AngularJS 角 主干JS C++ C...
高级java工程师笔试题精彩访谈 技术面试问题列表的精选列表。 如果你想贡献,请阅读 或 。 查看我的或 . 目录 编程语言/框架/平台 安卓 . AngularJS 角 主干JS C++ C C♯ 。网 Clojure CSS Cucumber 姜戈 EmberJS ...
每日优鲜java笔试题Ruby书签 这是一个精选的基本 Ruby 和 Ruby on Rails 资源集合。 该项目旨在维护对初学者和高级 Web 开发人员同样有用的结构良好的参考。 ★ 代表编辑选择。 该列表不打算包括任何与 Ruby 编程...