FIND YOUR NEXT FEW LINES

Results for “k”

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

1871 snippets foundClear filters
RustTesting & reusable patterns

Assert approximate floating-point equality

Assert approximate floating-point equality in a complete Rust program using the standard library.

Rust✓ Tested
ReactGetting Started

Assign a CSS class in JSX

Assign a CSS class in JSX with a small React component and explicit browser behavior.

React✓ Tested
Bash ScriptsParameter expansion

Assign a default to an empty or unset variable

Bash Scripts: The colon-equals expansion both supplies and assigns a fallback value.

Bash Scripts✓ Tested
HTMLForm behavior

Associate a control outside the form element

HTML: The form attribute links an external named control to the form’s ID.

HTML✓ Tested
AngularAccessibility & reusable patterns

Associate a validation message with a field

Associate a validation message with a field with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
jQueryHTTP requests

Attach an application-specific request header

jQuery: The headers option adds a header to this request only.

jQuery✓ Tested
GoFunctions & types

Attach behavior to a struct

Attach behavior to a struct using a complete Go program with explicit sample inputs.

Go✓ Tested
jQueryEvent control

Attach configuration when registering a handler

jQuery: event.data carries the registration-time data object.

jQuery✓ Tested
AngularReactive forms

Attach validators to a FormControl

Attach validators to a FormControl with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Arduino / CData & storage

Average a fixed set of readings

Accumulate sample values without overflowing a 16-bit total.

array✓ Tested
AngularTemplates & bindings

Bind a custom data attribute

Bind a custom data attribute with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularTemplates & bindings

Bind a list of CSS classes

Bind a list of CSS classes with a standalone Angular component and explicit browser behavior.

Angular✓ Tested