FIND YOUR NEXT FEW LINES

Results for “k”

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

1871 snippets foundClear filters
SQLiteText cleanup & matching

Match a known text prefix

SQLite: A percent wildcard matches zero or more characters following the prefix.

SQLite✓ Tested
CFile positioning & lifecycle

Measure a small seekable binary file

C: Seek to the end and inspect ftell, checking both operations for errors.

C✓ Tested
RustThreads & shared ownership

Move owned data into a worker

Move owned data into a worker in a complete Rust program using the standard library.

Rust✓ Tested
ReactComponents & props

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
C++Tasks & synchronization

Observe an exception from an asynchronous task

C++: Calling get rethrows an exception captured by the future.

C++✓ Tested
C#Asynchronous work & URI handling

Observe cancellation through a token

C#: A cancellation token is cooperative; operations must check it or accept it as an argument.

C#✓ Tested
jQueryDeferred work & queues

Observe completion of queued work

jQuery: The queue promise resolves when the selected elements’ queue is empty.

jQuery✓ Tested
HTMLText semantics

Offer an optional break inside a long label

HTML: Wbr supplies a potential line-break opportunity without inserting a visible hyphen.

HTML✓ Tested
HTMLLinks & accessibility

Open a link in a separate tab

Declare a separate browsing context with an explicit noopener relationship.

HTML✓ Tested
Docker / ComposeExecution & file transfer

Override the process working directory

Docker / Compose: The workdir option sets the directory for the container command.

Docker / Compose✓ Tested
PythonStructured data & serialization

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
Arduino / CBinary values & packets

Pack two small values into one byte

Arduino / C: Mask each four-bit value before combining it.

Arduino / C✓ Tested