Results for “k”
Small, practical examples. Search by task or narrow things down below.
Match a known text prefix
SQLite: A percent wildcard matches zero or more characters following the prefix.
SQLite✓ Tested
Measure a small seekable binary file
C: Seek to the end and inspect ftell, checking both operations for errors.
C✓ Tested
Move owned data into a worker
Move owned data into a worker in a complete Rust program using the standard library.
Rust✓ Tested
Notify a parent with a callback prop
Notify a parent with a callback prop with a small React component and explicit browser behavior.
React✓ Tested
Observe an exception from an asynchronous task
C++: Calling get rethrows an exception captured by the future.
C++✓ Tested
Observe cancellation through a token
C#: A cancellation token is cooperative; operations must check it or accept it as an argument.
C#✓ Tested
Observe completion of queued work
jQuery: The queue promise resolves when the selected elements’ queue is empty.
jQuery✓ Tested
Offer an optional break inside a long label
HTML: Wbr supplies a potential line-break opportunity without inserting a visible hyphen.
HTML✓ Tested
Open a link in a separate tab
Declare a separate browsing context with an explicit noopener relationship.
HTML✓ Tested
Override the process working directory
Docker / Compose: The workdir option sets the directory for the container command.
Docker / Compose✓ Tested
Pack and unpack a network-order integer
Python: Use an explicit byte order so the binary format is independent of the host architecture.
Python✓ Tested
Pack two small values into one byte
Arduino / C: Mask each four-bit value before combining it.
Arduino / C✓ Tested