Înapoi la articole →

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 10
  1. So you run migrate in your dev environment, but it fails: some unknown migration add-foobar has already been applied from some other experimental branch, and the migration tool doesn’t know how to down-migrate it.

  2. A job queue in two lines of JS

    If you need a job queue in JS, you can do it in two lines: type Job = () => Promise<unknown>; let chain = Promise.resolve(); const enqueue = (job: Job) => chain = chain.then(job, job); For example, if your app makes API requests, you may need requests to…

  3. The “snapping” feature in most drawing apps has a problem: you can’t place the object near snap lines, so for precise positioning, you have to disable snapping.

  4. `window.ai` hello world

    If you’re running Chrome with the window.ai API, here’s a UI to prompt an LLM running locally in your browser: Prompt Top K: Temperature: Run prompt Status: Output I wrote these TypeScript type definitions for the API: declare global { interface WindowO…

  5. Below is an interactive Turing pattern.

  6. WebGPU hello world in 2024

    Below is a Game of Life simulation.

  7. To add JavaScript to a web page, we use a <script> tag like this: <script>console.log("Hello!")

  8. What is Monte Carlo integration?

    What’s the average distance that someone can jump?

  9. On that flickering blur in Chrome

    backdrop-filter: blur is a popular design for navbars.

  10. What is the Metropolis algorithm?

    We could estimate Bob’s lunch tomorrow by counting the previous lunches you’ve seen him eating in the cafeteria: Lunch Count Apple 2 Banana 3 Now we want to simulate Bob’s future lunches.