最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

自己常用的方法記錄

2023-03-15 21:49 作者:神跡_夢幻之空  | 我要投稿

def count_dataevents(from, to, a, b, name)

num = 0

?(from..to).each do |id|

?data_test = load_data(sprintf("Data/Information%03d.rbdata", id))

?c = {}

? for i in data_test.events.keys

? ?c[i] = Data_Event.new(id, data_test.events[i])

? ?num += 1 if c[i].name[a,b] == name

? end

?end

print "#{name.to_s} * #{num.to_s}"

end

————————————————————————————

def test_find

?$test1 = []

?$test2?= []

? for i in 0...$test1.size

? ? for j in i...$test1.size

? ? ? if $test2[i] > $test2[j]

? ? ? ? temp = $test2[i]

? ? ? ? temp2 = $test1[i]

? ? ? ? $test2[i] = $test2[j]

? ? ? ?$test1[i] = $test1[j]

? ? ? ? $test2[j] = temp

? ? ? ? $test1[j] = temp2

? ? ? end

? ? end

? end

end

————————————————————————————

def? range_judge

?xx = (event.x - $data_player.x).abs

?yy = (event.y - $data_player.y).abs

?if (xx == 1 and yy < 1) or (xx < 1 and yy == 1)

?end

end

————————————————————————————

def round(x,y)

? ? x = (x*(10**y)).to_i

? ? x = x/1.0

? ? x = x/(10**y)

? ? return x

end

—————————————

def ceiling(x)

? ? if x == x.to_i

? ? ? return x.to_i

? ? else

? ? ? return x.to_i+1

? ? end?

end


自己常用的方法記錄的評論 (共 條)

分享到微博請遵守國家法律
合阳县| 海宁市| 合川市| 乐亭县| 航空| 盘山县| 宁安市| 张家口市| 怀来县| 民丰县| 精河县| 马尔康县| 祁东县| 辉南县| 财经| 井研县| 德州市| 平山县| 奉节县| 黄山市| 新宾| 临湘市| 黎川县| 称多县| 获嘉县| 阿坝| 紫金县| 英超| 文登市| 昭苏县| 郎溪县| 镇远县| 辽阳市| 夏邑县| 镇安县| 东海县| 屯门区| 江源县| 沁源县| 高邮市| 新野县|