楼主,你这样子贴图实在没法看啊,贴到 pastebin 或者 gist 吧 -_-||
Class 的父类是 Module (001); Module 的父类是 Object (003);Object 的父类是 BasicObject (005);BasicObject 没有父类 (007)。 Module 是一个类 (002);Object 是一个类 (004);BasicObject 是一个类 (006)。
楼主直接用 Integer(@price*100 + 0.5)
也是可以的,只是用 attr_accessor 去读的话以后加这加那的比较 flexible 一点
#1 楼 @chenge 楼主问的不是这个
@zsxywz0928 我的理解,attr_accessor :price
实际上是写了一个名叫 price 的 method,这个 method 功能就是给给@price这个变量读写 (写的方法名是 price=好像),在 Integer(price*100 + 0.5)
里面这个 price 实际上是在 call 这个 method,返回的是@price的值
应该就是这个意思,自己不用,给上面用
Folks sometimes use a splat to specify arguments that are not used by the method (but that are perhaps used by the corresponding method in a superclass. (Note that in this example we call super with no parameters. This is a special case that means “invoke this method in the superclass, passing it all the parameters that were given to the original method.”)
class Child < Parent def do_something(*not_used) # our processing super end end
In this case, you can also leave off the name of the parameter and just write an asterisk:
class Child < Parent def do_something(*) # our processing super end end
http://www.changedetection.com 类似这样的么?
鼠须管直接装上用是很快,然后导入了全套搜狗词库,速度也就慢下来跟其它输入法一样了
感谢楼主,以前只把它当 screen 在用,原来能玩出这么多花样来。
鼓掌!
又不是演唱会,足球赛,直播毫无意义,纯增加成本,把录播的质量搞高一点是正经事,钱要花在刀刃上。我的经验:麦克风一定要保持在讲员的嘴附近,别衣领上那种就很好,千万不能用摄像机机身上的麦克风录制的声音当音源,那个离得太远,放出来全是杂音。另外每段视频最好能把对应的 slide 文件给附上,这样如果视频看不清楚,可以直接打开 slide 文件来对照。只要做到这两点,能听清讲员声音,能看清 slide 了,其它的问题都不大。
原来可以这样选 encoding。是的,加上 page.encoding 之后就正常不报错了
完全按楼主的代码运行后出现两条错误信息
> ruby test_mechanize_encoding.rb > test_mechanize_encoding.txt
encoding error : input conversion failed due to input error, bytes 0x46 0xBB 0xF9 0xD6
encoding error : input conversion failed due to input error, bytes 0x51 0x3A 0xD7 0xF6
但是链接倒是全扒下来了,最后几个是
About Sina
广告服务
联系我们
招聘信息
网站律师
SINA English
会员注册
产品答疑
版权所有
这意思是说,技术越烂的人,学习创业需要的时间越短么?
#3 楼 @small_fish__ (3-2)/2 = 50% 嘛
差了 50% 哩