Yield each date in a [start, end] interval as a DateTimeImmutable, with a configurable step. Builds on DatePeriod under the hood — but exposes a generator so you can break out early.
Kotlin Ktor Server — JSON API with kotlinx.serialization
Install `ContentNegotiation` + `Json` plugin and you get typed (de)serialization for every route. Decode request bodies into data classes; respond with data classes.
HTML Registration Form (new-password + email-verify)
`autocomplete="new-password"` tells password managers to OFFER a generated password instead of filling an existing one. `autocomplete="email"` and `inputmode="email"` give phones the right keyboard.
Java Collectors.partitioningBy — Split by Predicate
Special case of groupingBy when the key is boolean — returns a `Map<Boolean, List<T>>` for the "true" and "false" buckets. Slightly more efficient than groupingBy.
Stdlib templating with `{{.Field}}` placeholders, range loops, if/else, and function pipelines. Safe alternative for non-HTML text (e.g. emails, config files).
Authenticated symmetric encryption using AES-256-GCM from the `cryptography` package. Stores nonce + ciphertext + tag together as base64 so storage is a single column.
A solid logging setup: rich format, rotating file handler so logs don't fill the disk, plus a console handler at a higher level so noisy DEBUG only goes to the file.
Python textwrap dedent + fill (Multi-line Strings)
`textwrap.dedent` strips common leading whitespace from a triple-quoted string — finally, you can indent multiline strings inside functions without breaking the formatting. `fill` wraps to a max width.
`Promise.all` rejects on the first failure; `allSettled` waits for every promise and gives you per-promise status. Pair with a type guard to split fulfilled from rejected.
A dirt-simple rate limiter that throttles per-key using a token bucket persisted to a JSON file. Good for single-server protection of expensive endpoints; reach for Redis when you scale out.
`DELETE` is logged per-row and respects triggers; `TRUNCATE` deallocates whole pages and resets the table to empty. `TRUNCATE` is much faster on large tables but has caveats (no WHERE, can't be rolled back in some DBs).
`Files.walk` returns a lazy Stream over every entry under a path. Filter with stream operations; remember to close the stream (or use try-with-resources).
Replace giant config structs with a variadic list of `Option` functions. Lets you add optional parameters later without breaking existing callers. The standard Go API design for constructors.