This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>おいしいごはん!</title> | |
<head> | |
<body> | |
<header> | |
<div style="background:skyblue;"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
word = $stdin.gets.chomp | |
n = eval(word) | |
limit = n.ancestors.length - 1 | |
class_array = [] | |
for i in 0..limit | |
class_array << n.ancestors[i] if n.superclass != nil | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*-coding: utf-8-*- | |
require 'active_record' | |
require 'sinatra' | |
require 'sinatra/reloader' | |
ActiveRecord::Base.establish_connection( | |
adapter: "sqlite3", | |
database: "list.db" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array = [] | |
print "配列の数を指定してください:"; n = gets.chomp.to_i | |
print "最大の数を指定してください:"; r = gets.chomp.to_i | |
n.times do | |
array << rand(r) | |
end | |
count = array.length | |
def compare(left,right) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gem::Specification.new do |spec| | |
spec.name = "omokoro-random" | |
spec.version = "0.0.1" | |
spec.authors = ["momozono"] | |
spec.email = ["tanatana1089@gmail.com"] | |
spec.summary = "return random article of omokoro." | |
spec.files = ["omokoro-random.rb"] | |
spec.require_path = "." | |
end |