FIND YOUR NEXT FEW LINES

Results for “k”

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

1871 snippets foundClear filters
AngularGetting Started

Toggle a CSS class from component state

Toggle a CSS class from component state with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
HTMLNative disclosure & dialogs

Toggle a native popover from a button

HTML: The popovertarget relationship handles show and hide behavior without a click handler.

HTML✓ Tested
jQueryDOM & classes

Toggle a state class

Toggle a CSS class in a jQuery click handler.

jQuery✓ Tested
Arduino / CDigital signals & interrupts

Toggle an output using an explicit software state

Arduino / C: Keep the intended output state in a Boolean variable.

Arduino / C✓ Tested
ReactState & reducers

Toggle Boolean state

Toggle Boolean state with a small React component and explicit browser behavior.

React✓ Tested
jQueryCollections & styling

Transform a collection into a plain array

jQuery: map followed by get returns ordinary JavaScript values.

jQuery✓ Tested
RustGetting Started

Transform a value by shadowing

Transform a value by shadowing in a complete Rust program using the standard library.

Rust✓ Tested
AngularLifecycle & observable data

Transform an observable value

Transform an observable value with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
RustErrors & optional values

Transform an optional value

Transform an optional value in a complete Rust program using the standard library.

Rust✓ Tested
RustIterators & transformations

Transform each value with map

Transform each value with map in a complete Rust program using the standard library.

Rust✓ Tested
RustErrors & optional values

Transpose an optional parsing result

Transpose an optional parsing result in a complete Rust program using the standard library.

Rust✓ Tested
C++Text validation & parsing

Trim surrounding ASCII whitespace

C++: Find the first and last non-whitespace bytes before taking a substring.

C++✓ Tested