atomita
所属: 琉球インタラクティブ
package.json
| function ifExpression (condition) { | |
| if ('function' == typeof condition ? condition() : condition) { | |
| return { | |
| then: (callback) => { | |
| const end = 'function' == typeof callback ? callback() : callback | |
| const res = { | |
| else: (callback) => ({ | |
| end | |
| }), | |
| elseif: (condition) => ({ |
atomita
所属: 琉球インタラクティブ
package.json
まずは整形と階乗を計算する関数factorialに分離
const factorial = (
a => {
return (
b => a(c => b(b)(c))
)(USBにimgを書き込んで、EFIで起動しようとしたが起動しなかった
start paramsがinitrd=boot\initramfs-x86_64.imgだったのを https://forum.manjaro.org/t/solved-refind-live-usb-wont-boot-w-manjaro-xfce-17-1-pre2-nor-17-06/34993/15 を参考にmisobasedir=manjaro misolabel=MJRO180 initrd=boot\initramfs-x86_64.imgにしたら起動できた
misolabelはパーティションのlabelの値
| [].map.call(document.getElementsByTagName("table"),table => { | |
| try { | |
| let task = table.children[0].children[0].children[0].textContent | |
| if ("task" == task) { | |
| return [].map.call(table.children[1].children, record => { | |
| let spend = record.children[2] | |
| let text = spend.childNodes[0] | |
| let times = text.nodeValue | |
| if (times && /\d+:\d+(:\d+)?(\s*\+\s*\d+:\d+(:\d+)?)*/.test(times)) { |
| const prevPage = document.referrer | |
| if (origin(createAnchor(prevPage)) === origin(window.location)) { | |
| window.history.pushState(location.href, '', '/') | |
| } else { | |
| window.history.back() | |
| } | |
| function createAnchor(url) { | |
| const anchor = document.createElement('a') | |
| anchor.href = url |
| function pages(current, max, length) { | |
| return new Array(length * 2 - 1).fill(0) // 0埋めの配列(empty埋めの配列だとmapが実行されない) | |
| .map((_, n)=> current + (Math.cos(Math.PI * n) * (n + 0.5) - 0.5) / -2) // current+0,current+1,current+-1,current+2...な配列にする | |
| .filter((n)=> 0 < n && n <= max ) | |
| .slice(0, length) | |
| .sort((a, b)=> a < b ? -1 : 1 ); | |
| } | |
| // `Array.prototype.fill`が利用できない場合は | |
| // `new Array(length * 2 - 1).fill(0)`を |