Sample run on Ubuntu 22.04 LTS [i7-4900MQ CPU @ 2.80GHz/32GB] Chromium 105.0.5195.102
Solid (solid.html)
Created 205760 nodes.
278 ms; sum: 9.11303444731602e+305| import { defer, from } from "rxjs"; | |
| import { retry, tap } from "rxjs/operators"; | |
| const values = ["_", 0, 1, 0, 2, 0, 3, 0, 0, 0, 4]; | |
| defer(() => { | |
| values.shift(); | |
| return from(values); | |
| }) | |
| .pipe( |
| // Run this code on tldraw.com | |
| // By @steveruizok | |
| // Based on an awesome image by @cacheflowe: https://twitter.com/cacheflowe/status/1408902719130288130 | |
| new NumberControl({ | |
| label: 'radius', | |
| value: 200, | |
| min: 50, | |
| max: 500, | |
| }) |
| <!doctype html> | |
| <html lang=en> | |
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/ethers.umd.min.js" defer></script> | |
| <script src="https://cdn.jsdelivr.net/npm/@metamask/[email protected]/dist/detect-provider.min.js" defer></script> | |
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js" defer></script> | |
| <script> | |
| window.abi = { | |
| 'IERC20': [ | |
| { |
Sample run on Ubuntu 22.04 LTS [i7-4900MQ CPU @ 2.80GHz/32GB] Chromium 105.0.5195.102
solid.html)Created 205760 nodes.
278 ms; sum: 9.11303444731602e+305preactive.html)| <content-section | |
| [csTitle]="title" | |
| [collapsible]="collapsible" | |
| [state]="state" | |
| [locked]="locked" | |
| [noButtons]="noButtons" | |
| [buttons]="_buttons" | |
| > | |
| <!-- Custom controls --> | |
| <ng-content></ng-content> |
| addEventListener("fetch", e => { | |
| if (e.request.destination !== "image" || // Only do this when requesting an image | |
| request.mode === "no-cors") // We don't know the status of no-cors images | |
| return; | |
| e.respondWith((async () => { | |
| try { | |
| const response = await fetch(e.request); | |
| if (response.ok) | |
| return response; |
| const TMDB_IMAGE_BASE_URL = 'https://image.tmdb.org/t/p/'; | |
| addEventListener("fetch", e => { | |
| const url = new URL(e.request.url); | |
| if (url.pathname === "/image") { | |
| e.respondWith((async () => { | |
| const width = url.searchParams.get("width"); | |
| const path = url.searchParams.get("path"); | |
| try { | |
| return await fetch(`${TMDB_IMAGE_BASE_URL}/w${width}${path}`, {mode: "no-cors"}); |