| 更新: | 2024-05-20 |
|---|---|
| 作者: | @voluntas |
| バージョン: | 2024.1 |
| URL: | https://voluntas.github.io/ |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Runtime.InteropServices; | |
| using System.Net; | |
| using System.IO; | |
| using System.Threading; | |
| namespace KCB2 |
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
| a あ ア ア 0 | |
| i い イ イ 0 | |
| u う ウ ウ 0 | |
| e え エ エ 0 | |
| o お オ オ 0 | |
| ka か カ カ 0 | |
| ki き キ キ 0 | |
| ku く ク ク 0 | |
| ke け ケ ケ 0 | |
| ko こ コ コ 0 |
OCamlを自習する。 浅井健一著『プログラミングの基礎』とそのWebサイト http://pllab.is.ocha.ac.jp/~asai/book-mov/ を使う。
UTF-8で漢字の入出力に対応させるのがわりと面倒。
UbuntuなどDebian系のGNU/Linuxにはapt-getで簡単にインストールできる:
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
| // This example uses ES2015 features. Use Babel to compile down to JS, or see the example at http://codepen.io/sardell/pen/VjGYRz | |
| // example array provided | |
| var example = [[1,2,[3]],4]; | |
| function flatten_array(nested) { | |
| // concatenate using the spread operator | |
| const flat = [].concat(...nested) | |
| // repeat flatten_array function until nested array is flat | |
| return flat.some(Array.isArray) ? flatten_array(flat) : flat; |
スポンサーの募集は締め切りました。以後は GitHub Sponsors に移行する予定です。
どのような募集をしていたか知りたい場合は履歴を確認してください。
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
| function! s:fold(list, f, init) abort | |
| let ref = {'result': a:init} | |
| return map(copy(a:list), {_,v -> extend(ref, {'result': a:f(ref.result, v)})})[-1].result | |
| endfunction | |
| function! s:fold2(list, f, init) abort | |
| let l = a:list + [a:init] | |
| let end = len(a:list) | |
| return map(l, {i,v -> i is# end ? l[i-1] : a:f(l[i-1], v)})[-1] | |
| endfunction |
Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.
To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:
\u001b[{format};{color}m