FIND YOUR NEXT FEW LINES

Results for “cr”

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

1833 snippets foundClear filters
GitStashing selected work

Stash only the staged changes

Git: The staged option saves index changes while keeping unrelated unstaged edits.

Git✓ Tested
GitStashing selected work

Stash unstaged work while leaving staged edits available

Git: Keep-index preserves the staged state for testing or committing while stashing the rest.

Git✓ Tested
ReactAccessibility & events

Stop an event from reaching a parent handler

Stop an event from reaching a parent handler with a small React component and explicit browser behavior.

React✓ Tested
RustErrors & optional values

Stop collecting when parsing fails

Stop collecting when parsing fails in a complete Rust program using the standard library.

Rust✓ Tested
GitRestoring & revising local work

Stop tracking a generated file while keeping it locally

Git: Removing a path from the index leaves its working copy intact when cached is specified.

Git✓ Tested
PythonGetting Started

Store a value in a named variable

Python: Give a value a descriptive name and print it.

Python✓ Tested
C#Getting Started

Store a value in a named variable

C#: Give a value a descriptive name and print it.

C#✓ Tested
JavaGetting Started

Store a value in a named variable

Java: Give a value a descriptive name and print it.

Java✓ Tested
C++Getting Started

Store a value in a named variable

C++: Give a value a descriptive name and print it.

C++✓ Tested
CGetting Started

Store a value in a named variable

C: Give a value a descriptive name and print it.

C✓ Tested
jQueryForm serialization & state

Store an object associated with an element

jQuery: data retains JavaScript values without serializing them into HTML attributes.

jQuery✓ Tested
ReactRefs & DOM interaction

Store and cancel a timer handle

Store and cancel a timer handle with a small React component and explicit browser behavior.

React✓ Tested