javascript Math参考
Math Object Methods
FF: Firefox, N: Netscape, IE: Internet Explorer
Method Description FF N IE
abs(x) Returns the absolute value of a number 1 2 3
acos(x) Returns the arccosine of a number 1 2 3
asin(x) Returns the arcsine of a number 1 2 3
atan(x) Ret ...
1. 拷贝redcloth.rb到ror的lib目录内。
2. 拷贝jstoolbar相关的javascript 、stylesheet、images到对应的public目录里面。另外把压缩包里的help目录完整地拷贝到public目录下,其是redcloth语法的使用帮助.
3. 在application的helper方法中添加如下两个方法:
require 'redcloth' #在application_helper 文件头引入redcloth
用于页中生成相应textarea框的jstoolbar方法。
def wikitoolbar_f ...
# ==== Relying on named routes
#
# If you instead of a hash pass a record (like an Active Record or Active Resource) as the options parameter,
# you'll trigger the named route for that record. The lookup will happen on the name of the class. So passing
# a Worksho ...
difference = Time.now - time
seconds = difference % 60
difference = (difference - seconds) / 60
minutes = difference % 60
difference = (difference - minutes) / 60
hours = difference % 24
difference = (difference - hours) / 24
days = differe ...







评论排行榜