Random Link ¯\_(ツ)_/¯ | ||
Nov 14, 2020 | » | Software Dependencies
6 min; updated Sep 5, 2022
Dependency Management Golang introduced a new library referencing mode to overcome limitations of the old one. While the two library modes are supported by Golang, they are incompatible, e.g. dependency management (DM) issues, reference inconsistencies, build failures, etc. did an empirical study that resulted in HERO, an automated technique to detect DM issues and suggest fixes. Applied to 19k Golang projects, HERO detected 98.5% on a DM issue benchmark, and found 2,422 new DM issues in 2,356 Golang projects.... |
Aug 18, 2022 | » | Binary Search
2 min; updated Sep 5, 2022
Binary Search on a Non-Decreasing \(f: \mathbb{R} \to \mathbb{R}\) Given a number \(L\) and a non-decreasing function \(f: \mathbb{R} \to \mathbb{R}\), find the greatest \(x\) such that \(f(x) \le L\). To start, there are two numbers \(lo\) and \(hi\), such that \(f(lo) \le L < f(hi)\). Algorithm double binary_search(double lo, double hi, double lim) { while (hi - lo > precision) { const double mid = (hi + lo) / 2; if (lim < f(mid)) hi = mid; // Search in left half else lo = mid; // Search in right half } return lo; }... |