「PHP Conference Japan 2025」について、YouTubeのライブ映像とforteeの紹介ページへのリンクをまとめた。
- 自分が見るために、勝手にやっているだけの資料
- 間違いとかあっても、他意はなく、ただただミスしているだけ
| export class ResponseHandler { | |
| private promise: Promise<Response>; | |
| private constructor(promise: Promise<Response>) { | |
| this.promise = promise; | |
| }; | |
| public receive(status: number, handler: (response: Response) => void) { | |
| const next = this.promise.then((response: Response) => { | |
| if (status === response.status) { |
| ; Heap's algorithm | |
| ; ref. https://ja.wikipedia.org/wiki/Heap%E3%81%AE%E3%82%A2%E3%83%AB%E3%82%B4%E3%83%AA%E3%82%BA%E3%83%A0 | |
| (defun %permutations (a) | |
| (let* ((n (length a)) | |
| (c (make-array n)) | |
| (i 0) | |
| (caller nil) | |
| (firstp nil)) | |
| (setf caller | |
| (lambda () |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>TONE</title> | |
| </head> | |
| <body style="margin:0;text-align: center;"> | |
| <canvas id="canvas" width="700" height="700"></canvas> | |
| <script> | |
| /** @type {HTMLCanvasElement} */ | |
| const canvas = document.getElementById('canvas'); |
| // 2024-11-10 | |
| Array.from(document.getElementById('g-items').querySelectorAll('.a-price-whole')) | |
| .map(x => Number(x.innerHTML.replace(',', ''))) | |
| .reduce((s, x) => s + x, 0) | |
| ; | |
| ; Proof | |
| ; | |
| ; => https://github.com/myaosato/claudia | |
| ; | |
| ;; **************************************************************** | |
| ;; meta data type | |
| #| | |
| const := const-val | func const* | |
| term := const | var |
| fact(1, F) :- F is 1. | |
| fact(N, F) :- | |
| N > 1, | |
| M is N - 1, | |
| fact(M, T), | |
| F is N * T. |
| ;;;; heap | |
| (defstruct (binary-heap (:conc-name bh-)) | |
| (predicate #'>=) | |
| (nodes (make-array (list 1024) :adjustable t :fill-pointer 0))) | |
| (defun bh-empty (binary-heap) | |
| (= (length (bh-nodes binary-heap)) 0)) | |
| (defun bh-tail (binary-heap) | |
| (1- (length (bh-nodes binary-heap)))) |
| # 1秒後, 2秒後 3秒後に印字されるものと, | |
| # 2秒後, 3秒後 に印字される | |
| import time | |
| import sys | |
| from multiprocessing import Process, Value, set_start_method | |
| set_start_method('fork') | |
| def f(xs, flg): | |
| cnt = 0 |
| fib(N, F) :- fibo(0, 1, N, F). | |
| fibo(A, _B, 0, F) :- F is A. | |
| fibo(A, B, N, F) :- | |
| N > 0, | |
| NEWA is B, | |
| NEWB is A + B, | |
| NEWN is N - 1, | |
| fibo(NEWA, NEWB, NEWN, F). |