Ruby のメモリ使用量問題を調査し upstream で解決していただいた話
VSCode + WSL makes Windows awesome for web development
サンプルコードでわかる!Ruby 3.3の主な新機能と変更点 #Ruby - Qiita
it = "a"
p it
Ruby-3.3リリース-新機能解説 記事一覧 | gihyo.jp
Railsチュートリアルを1からやってみる
なんか動画を見る
require 'time'
def print_wareki(warekistr)
wareki = Date.parse(sprintf('20%d/%d/%d', warekistr[0..1], warekistr[2..3], warekistr[4..5]))
warekiyear = warekistr[0..1].to_i
if (warekiyear < 30) then #この判断の仕方もまずい
gengou = '令和'
else
gengou = '平成'
end
p sprintf("%s%d年%d月%d日", gengou, warekiyear,wareki.month,wareki.day)
end
#和暦が外部システムからわたってくる
print_wareki('060228') #これは問題ない
print_wareki('060229') #これはエラーになる
#rubyの場合はinvalid date (Date::Error)
#令和6年2月29日は存在するが、
#西暦2006年2月29日は存在しない。
warekiとか便利そう
関連
次回 Hamamatsu.rb #158 4/10(水) 19:30 - 21:00 オンライン
5/15(水)-17(金) RubyKaigi 2024
浜松Androidの会 3/17(日)
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing