Results for “tr”
Small, practical examples. Search by task or narrow things down below.
Give a reusable record type a short name
C: A typedef names a structure type without changing its representation.
C✓ Tested
Give a section an accessible region name
HTML: A section becomes a named landmark when its heading is referenced with aria-labelledby.
HTML✓ Tested
Handle a malformed JSON document
PowerShell: ConvertFrom-Json reports a terminating conversion error under the selected error preference.
PowerShell✓ Tested
Handle a terminating error
Catch conversion failures and produce a clear fallback.
try catch✓ Tested
Handle malformed JSON input
Python: Catch JSONDecodeError without hiding unrelated programming errors.
Python✓ Tested
Identify a search region with the search element
HTML: The native search element exposes a search landmark in supporting browsers.
HTML✓ Tested
Identify the current page in a breadcrumb
HTML: An ordered breadcrumb list sits inside a named navigation region, with aria-current on the current location.
HTML✓ Tested
Index records by a unique key
Java: Use toMap with an explicit merge rule so duplicate keys have defined behavior.
Java✓ Tested
Insert a map value only when a key is absent
C++: try_emplace preserves the old value when insertion does not take place.
C++✓ Tested
Insert into an array with spare capacity
C: Move the trailing elements before inserting and keep the logical length separate from capacity.
C✓ Tested
Insert values into a multiline template
PowerShell: A double-quoted here-string expands variable references.
PowerShell✓ Tested
Inspect a revision with detached HEAD
Git: Detached mode is useful for inspection; create a branch before keeping new work.
Git✓ Tested