Urgent.News

What's breaking now, across thousands of outlets.

Tech

Solving Carpenter 1/16" Tape Rounding and IES Lighting Grids in Vanilla JS

Floating-point math in JavaScript is straightforward until your output has to survive a real jobsite tape measure or a ceiling full of floor joists and garage door tracks. While building two browser-based layout calculators for residential framing and ceiling lighting, I ran into three geometry problems where naive total / count math quietly fails in the real world. Here is how the underlying…

This article explains three geometry problems that can occur when trying to use basic floating-point math in JavaScript for real-world layout calculations in residential framing and ceiling lighting. It covers floating-point rounding errors, stair rake projection inaccuracies, and the IES Zonal Cavity lighting method.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

SQL Server Multiple Cascade Paths (Error 1785): Which Foreign Key Loses ON DELETE CASCADE, and What Replaces It

Disclosure: I build Schemity , a desktop ERD tool - this post is from our blog and uses it for the examples. TL;DR: SQL Server refuses a foreign key when its CASCADE , SET NULL or SET DEFAULT would…

  • SQL Server Error 1785 prevents foreign key cascade due to multiple paths
  • Set one foreign key to NO ACTION to stop cascade deletion
  • Replace the other foreign key with stored procedure or trigger

No database on purpose: flat files are enough for a downloader

When I rebuilt my video downloader in plain PHP for shared hosting, the first thing I decided was what not to build. There would be no database.

  • Downloader built with plain PHP for shared hosting
  • Flat files used instead of databases for simplicity
  • Single server, one person, modest traffic volume

More from Thursday 12 November →