For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
| function retry(isDone, next) { | |
| var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false; | |
| var id = window.setInterval( | |
| function() { | |
| if (isDone()) { | |
| window.clearInterval(id); | |
| next(is_timeout); | |
| } | |
| if (current_trial++ > max_retry) { | |
| window.clearInterval(id); |
| <?php | |
| /** | |
| * Get a value from an object or an array. Allows the ability to fetch a nested value from a | |
| * heterogeneous multidimensional collection using dot notation. | |
| * | |
| * @param array|object $data | |
| * @param string $key | |
| * @param mixed $default | |
| * @return mixed |
| interface Collection { | |
| push(value: number): void; | |
| pop(): number; | |
| peek(): number; | |
| isEmpty(): boolean; | |
| } | |
| class Node { | |
| value: number; | |
| constructor(value: number) { |
this