FIND YOUR NEXT FEW LINES

Results for “cr”

Small, practical examples. Search by task or narrow things down below.

1833 snippets foundClear filters
GoErrors & validation

Reject non-finite numeric input

Reject non-finite numeric input using a complete Go program with explicit sample inputs.

Go✓ Tested
GoJSON & encoding

Reject unknown JSON object fields

Reject unknown JSON object fields using a complete Go program with explicit sample inputs.

Go✓ Tested
ReactRefs & DOM interaction

Remember the previously committed value

Remember the previously committed value with a small React component and explicit browser behavior.

React✓ Tested
Bash ScriptsVariables & text

Remove a filename extension

Keep the path while removing its final extension.

filename✓ Tested
CSSBox dimensions & overflow

Remove a hidden element’s layout space

CSS: Display none removes a box from layout as well as hiding its contents.

CSS✓ Tested
Linux CommandsArchive integrity & packaging

Remove a leading directory while extracting

Linux Commands: Use strip-components only after inspecting a trusted archive layout.

Linux Commands✓ Tested
RustStrings & Unicode

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
GoSlices & collections

Remove a slice range

Remove a slice range using a complete Go program with explicit sample inputs.

Go✓ Tested
Linux CommandsGetting Started

Remove adjacent duplicate lines

Linux Commands: Remove adjacent duplicate lines using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
Linux CommandsFiles & permissions

Remove an empty directory only

Linux Commands: Use rmdir so a directory containing files cannot be removed accidentally.

Linux Commands✓ Tested
RustMaps & sets

Remove an entry and inspect its value

Remove an entry and inspect its value in a complete Rust program using the standard library.

Rust✓ Tested
HTMLAccessible structure

Remove an inactive section from keyboard navigation

HTML: Inert prevents interaction and accessibility exposure for an inactive subtree.

HTML✓ Tested