もっと単純に、CSV をRuby でデータとして読み込んで、JSON はテキストとして読み込んでgsub するとかでもいいかもわからない
- Ruby 2.3
- Rails gem
| h = Hash.new do |hash,key| | |
| hash[key] = key.upcase | |
| end | |
| p h[:foo] # => :FOO | |
| # ------------------- | |
| upcase = lambda { |hash, key| hash[key] = key.upcase } | |
| h = Hash.new(&upcase) |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="script.js"></script>
</head>
<body>require 'date'
def safe_datetime_parse(string)
DateTime.parse(string)
rescue ArgumentError
nil
end
a = "2015-03-10T22:55:00+00:00"| require 'fileutils' | |
| class TermColor | |
| class << self | |
| # 色を解除 | |
| def reset | |
| c 0 | |
| end | |
| # カラーシーケンスを出力する |
上にRSpec のテストを簡易的に追記したもの:
require 'rspec'
class MyApp
# Write a method that takes in a number and returns a string, placing
# a single dash before and after each odd digit. There is one| infinity_list = (0..Float::INFINITY).lazy | |
| even_filter = lambda { |x| x.modulo(2).zero? } | |
| p infinity_list.select(&even_filter).take(4).to_a | |
| # => [0, 2, 4, 6] |
| Option Explicit | |
| ' アクティブシートの結合されたセルの結合を解除して,すべてのセルの値を結合元のセルの値で埋めます。 | |
| Public Sub Unmerge() | |
| Dim OuterCell As Variant | |
| Dim InnerCell As Variant | |
| Dim Value As Variant | |
| Dim Updating As Boolean ' 現在のスクリーン更新状態 | |
| Updating = Application.ScreenUpdating |