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
| void Main() | |
| { | |
| foreach (var file in Directory.EnumerateFiles(@"ここにフォルダを指定")) | |
| { | |
| var content = File.ReadAllText(file, Encoding.GetEncoding("Shift_JIS")); | |
| if(content.Length == 0) | |
| continue; | |
| File.WriteAllText(file, content, Encoding.GetEncoding("UTF-8")); | |
| } | |
| } |
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
| Red [ | |
| Title: "copy-red-file" | |
| Needs: View | |
| ] | |
| unless empty? system/script/args [ | |
| path: to-red-file system/script/args | |
| write-clipboard mold either attempt [read path][path][dirize path] | |
| ] |
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
| Red [] | |
| ; パイプ演算子の実体となる関数 | |
| pipe: function [x 'y] [value: get y value x] | |
| ; 「|>」にpipe関数を演算子としてセット | |
| |>: make op! :pipe | |
| ; 使い方はこんな感じになる。残念ながら呼び出される側の関数には「'」を付けないと呼べない・・・ | |
| [1 2 3] |> 'rejoin | |
| ; returns "123" |
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
| Red[] | |
| ; object!の比較ではフィールドの値が比較される模様。aとbを比較するとtrue。aとcだとfalse | |
| a: make object! [name: "Alice" surname: "Gold"] | |
| b: make object! [name: "Alice" surname: "Gold"] | |
| c: make object! [name: "Bob" surname: "Gold"] | |
| a = b | |
| ; returns true | |
| a = c |