[ create a new paste ] login | about

kurari

Name:
Email:
Site/Blog:
Location: Jp
Default language: Ruby
Favorite languages: Ruby
About:

Saved pastes by kurari:

Ruby, pasted on May 19:
1
2
3
4
5
#!/ruby/bin/ruby -Ks
#QXタグとスタイル、ボックス飛ばし
begin
data = File.read("/ruby/sourse/sn.txt")
sn_r = File.open("/ruby/sourse/sn_r.txt","w")
...
view (21 lines)
Ruby, pasted on Apr 12:
1
2
3
4
5
#!/ruby/bin/ruby -Ks
#正規表現

str = "0110-20-東京都・港区.pdf"
/(^[0-9]{4})-([0-9]{2})-(.*)(.[a-z]{3}$)/s =~ str
...
view (16 lines, 8 lines of output)
Ruby, pasted on Apr 8:
1
2
3
4
5
#!/ruby/bin/ruby
#テキストファイルをコピー&リネーム
require "fileutils"

begin
...
view (10 lines, 2 lines of output)
Ruby, pasted on Apr 3:
1
2
3
4
5
#!/ruby/bin/ruby
#tab区切りテキストファイルを読み取り、tab区切りごとに配列に格納
begin
  data = File.open("/ruby/sourse/namecard.csv")
  i = 1
...
view (21 lines, 4 lines of output)
Ruby, pasted on Apr 3:
1
2
3
4
5
#!/ruby/bin/ruby
#tab区切りテキストファイルを読み取り、tab区切りごとに配列に格納
begin
  data = File.open("/ruby/sourse/namecard.csv")
  i = 1
...
view (20 lines)
Ruby, pasted on Apr 2:
1
2
moji = "2バイト文字は出力できないのかな"
print moji.split(//s).length
view (2 lines, 1 line of output, 1 comment)
Ruby, pasted on Mar 25:
1
2
3
4
5
#配列中の文字数を取得
emoney = ["edy", "suica", "pasmo", "ikoca", "quickpay", "nanaco", "fuga"]
emoney.each{ |cards|
print cards+(" = ")
puts cards.length
...
view (6 lines, 8 lines of output)
Ruby, pasted on Mar 21:
1
2
3
4
#配列ひとつならこの書き方でもいけますね。eachメソッド
xpress = ('<v2.04EA><e0>' + "\r\n")
newbox = ('<\\b>')
hoge = "madamada_arukana"
...
view (13 lines, 2 lines of output)
Ruby, pasted on Mar 21:
1
2
3
4
5
#Xpressタグ宣言→ボックス飛ばし
xpress = ('<v2.04EA><e0>' + "\r\n")
newbox = ('<\\b>')
meme = ["mamama", "mememe","mumumu"]
hoge = ["hogehoge", "gegege","mogemoge"]
...
view (13 lines, 2 lines of output)
Ruby, pasted on Mar 21:
1
2
3
4
#配列に格納されている変数の数を取得

fuga = ["hogehoge", "hugahuga", "hahaha", "hihihi"]
fuga_size = fuga.size#配列に格納されている変数の数を取得
...
view (11 lines, 1 line of output)