module BaseFunc Version="0.0.1" def V return Version end def add(a,b) return a+b end def self.showVersion return Version end #将V方法定义为静态方法 module_funct Read More
posted @ 2020-03-19 15:43
拎着红杯子的黄鸭子
Views(121)
Comments(0)
Diggs(0)
class Game def initialize(id,title,price) @id=id @title=title @price=price end def showGame puts @id+" "+@title+","+@price._to_s end def self.toStr pu Read More
posted @ 2020-03-19 15:00
拎着红杯子的黄鸭子
Views(201)
Comments(0)
Diggs(0)
#字符转数值 FG="50" P3="40" FT="90" puts FG+P3+FT puts FG.to_i+P3.to_i+FT.to_i puts (FG.to_i+P3.to_i+FT.to_i).to_s+"俱乐部" puts FG.to_i puts FG.to_i.to_f put Read More
posted @ 2020-03-19 14:17
拎着红杯子的黄鸭子
Views(190)
Comments(0)
Diggs(0)
#键值对 mvp_rank={ "curry"=>28.1, "harden"=>30.3, "lebron"=>26 } puts mvp_rank puts mvp_rank["harden"] player={ name:"harden", age:28, point:30.3 } puts Read More
posted @ 2020-03-19 14:13
拎着红杯子的黄鸭子
Views(134)
Comments(0)
Diggs(0)
1.函数 def sayHello(name="Levi") puts "hello #{name}." end sayHello 结果如下 2.类 class Player def initialize(name="levi")#构造函数 @name=name end def show() put Read More
posted @ 2020-03-19 13:20
拎着红杯子的黄鸭子
Views(132)
Comments(0)
Diggs(0)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Clear can Read More
posted @ 2020-03-19 10:52
拎着红杯子的黄鸭子
Views(578)
Comments(0)
Diggs(0)
function main() { // Retrieve <canvas> element var canvas = document.getElementById('example'); if (!canvas) { console.log('Failed to retrieve the <ca Read More
posted @ 2020-03-19 10:16
拎着红杯子的黄鸭子
Views(151)
Comments(0)
Diggs(0)