Results for “od”
Small, practical examples. Search by task or narrow things down below.
Remove a prefix only when it matches
Remove a prefix only when it matches in a complete Rust program using the standard library.
Rust✓ Tested
Reorder captured text in a replacement
JavaScript: Use numbered replacement groups to rearrange a known two-part name.
JavaScript✓ Tested
Reorder captured text in a replacement
TypeScript: Use numbered replacement groups to rearrange a known two-part name.
TypeScript✓ Tested
Repeat a string a fixed number of times
JavaScript: String.repeat requires a nonnegative finite repetition count.
JavaScript✓ Tested
Repeat a string a fixed number of times
TypeScript: String.repeat requires a nonnegative finite repetition count.
TypeScript✓ Tested
Replace a literal substring
Replace a literal substring in a complete Rust program using the standard library.
Rust✓ Tested
Resolve a relative URL against a base
JavaScript: A trailing slash makes the final base path component a directory.
JavaScript✓ Tested
Resolve a relative URL against a base
TypeScript: A trailing slash makes the final base path component a directory.
TypeScript✓ Tested
Respect dark color preference
Apply different CSS colors when the browser requests a dark theme.
CSS✓ Tested
Serialize nested objects with an explicit depth
PowerShell: Select a sufficient depth so nested data is retained instead of converted into a descriptive string.
PowerShell✓ Tested
Set owner-only file permissions
Linux Commands: Use chmod 600 to allow only the owner to read and write a file.
Linux Commands✓ Tested
Split a key-value pair once
Split a key-value pair once in a complete Rust program using the standard library.
Rust✓ Tested