This file contains hidden or 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
# encoding: cp932 | |
=begin | |
txtファイルを読んで行頭に全角空白が無ければ全角空白を入れて新しいtxtファイル('ファイル名'_fixed.txt)を作るプログラム | |
=end | |
print "ファイル名 >" | |
file_name = gets.chomp | |
# ファイル名に拡張子無しでも動くように拡張子を削る | |
file_name.sub!(/.txt/, "") |
This file contains hidden or 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
# encoding: cp932 | |
=begin | |
部誌の作者・作品一覧チェックシートの生成を行うプログラム | |
./部誌/作者/作品 という構造を想定 | |
部誌名を入力すると | |
作者1 | |
・作品1 | |
・作品2 | |
作者2 | |
・作品3 |
This file contains hidden or 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
require 'dxruby' | |
font = Font.new(32) | |
limit_time = 3 * 60 # 分*60 | |
start_time = Time.now | |
Window.loop do | |
now_time = Time.now | |
diff_time = now_time - start_time |
This file contains hidden or 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
limit = ARGV[0].to_i | |
limit.times do |i| | |
message = "" | |
count = i + 1 | |
if count % 3 == 0 | |
message += "fizz" | |
end |