(Should I compose an English edition as well?)
此番学习参考了[燁魔的教学][燁魔]。🙏
她早已像我这么强。🪦 (也是,我还给她介绍了向导和学徒,说明她早已出师(不是四声)。)
无限火球、点燃、火妖、“水妖”(银樽)等哀绿法虽然自闭,但是不管过度再怎么顺滑,它们也依然有不低的门槛和技术天花板。 操作者要在面临烧绳的鸭梨下考虑牌序(比如“奥术脑洞”刷夜能在复制了太多法强后穿进疲劳紫砂),技术含量比♾️🚪、♾️🧊多多了。
| # Marker module for “my library” | |
| module MyError end | |
| # Built-in exception class example | |
| ZeroDivisionError.include MyError | |
| puts begin | |
| 1 / 0 | |
| rescue MyError => e | |
| e | |
| end #=> divided by 0 |
| def int2bytestr(int, bytesize = int.size) | |
| [ | |
| # Format to hex, left-pad with `0` (big-endian) for `bytesize * 2` nibbles | |
| sprintf('%0*X', bytesize * 2, int) | |
| ].pack 'H*' # Pack string of hex chars to string of raw bytes | |
| end | |
| # Demo | |
| print "actual\t" | |
| p int2bytestr(0x4_20_69_de_ad_be_ef_13_37, 10) |
| # frozen_string_literal: true | |
| # Goldberg–Tarjan Push–Relabel Algorithm | |
| # with FIFO active set and BFS pre-labeling | |
| # * https://www.adrian-haarbach.de/idp-graph-algorithms/implementation/maxflow-push-relabel/index_en.html | |
| # * https://en.wikipedia.org/wiki/Push%E2%80%93relabel_maximum_flow_algorithm?oldid=1230043247 | |
| # variable names are in dummies’ terminologies | |
| class PushRelabel | |
| class Node |
These notes references 睿国丨肥头’s Walkthrough. 这些笔记参考睿国丨肥头的攻略。 🙏
| # ### 问:大五码系列和GB系列的字节长度“兼容”吗? | |
| # 大五码系列用一或两个字节编码一个字符,而最新的 GB 18030 用一、二或四个。 | |
| # * 大五和GB的单字节范围都是 `00`–`7F`;大于这个范围的字节才表示多节的编码。 | |
| # * GB 18030 特有的驷节编码通过 `30`–`39` 范围的第二节辨识;这个范围小于大五*和GB*的双节编码的第二节范围。 | |
| # 排除上面后,大五码系列除了错误之外的双字节均对应GB系列的双字节————虽然有些大五范围超出了GB范围。 | |
| puts ARGV.map { it | |
| .encode(Encoding::Big5_HKSCS) # 大五码・香港增补字符集 | |
| .force_encoding(Encoding::GB18030) # 信息技术 中文编码字符集(码位最新最全) | |
| .encode(Encoding.default_external) |
| VAMPIRES = ARGV.each_with_index.filter_map do|input, idx| | |
| number = Integer input | |
| length = input.length | |
| next if length.odd? | |
| fangs = input.chars.permutation(length).filter_map do|digits| | |
| digits2 = digits.pop(length/2) | |
| next if digits.last == '0' and digits2.last == '0' # This isn’t counted | |
| a = Integer digits .join, 10 | |
| b = Integer digits2.join, 10 |
| // Lambda is a type of *value*, and *values* can’t be null. | |
| // But y’know what can? *References* to values. | |
| #include <functional> | |
| #include <stdio.h> | |
| const auto lambda = [] () -> const char* { | |
| return "Hello from lambda!"; | |
| }; |
| puts$*[0].gsub(/(.)\1*/){'_🌷🌼🪻'[it.size]+$1} |