FIND YOUR NEXT FEW LINES

Results for “k”

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

1871 snippets foundClear filters
JavaScriptText handling & Unicode

Check whether text starts with a prefix

JavaScript: Use startsWith for a literal case-sensitive prefix comparison.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Check whether text starts with a prefix

TypeScript: Use startsWith for a literal case-sensitive prefix comparison.

TypeScript✓ Tested
Linux CommandsGetting Started

Check whether two practice files match

Linux Commands: Check whether two practice files match using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
CSSGetting Started

Choose a list-marker style

CSS: Learn how to choose a list-marker style in a complete browser example.

CSS✓ Tested
JavaScriptPromises & iteration protocols

Clean up a generator after an early break

JavaScript: Breaking a for-of loop closes a generator and runs its finally block.

JavaScript✓ Tested
TypeScriptPromises & iteration protocols

Clean up a generator after an early break

TypeScript: Breaking a for-of loop closes a generator and runs its finally block.

TypeScript✓ Tested
jQueryInsertion & wrapping

Clone markup without sharing its identity

jQuery: clone creates a separate node; change duplicated IDs before inserting.

jQuery✓ Tested
HTMLForm behavior

Collect several checked values under one name

HTML: Only checked named checkboxes become successful form controls.

HTML✓ Tested
Bash ScriptsProcesses & environment

Collect two independent background results

Bash Scripts: Write each job’s output separately and wait for both before combining results.

Bash Scripts✓ Tested
CSSGrid placement

Combine a fixed sidebar with a flexible content track

CSS: Minmax zero avoids an intrinsic minimum forcing the flexible track wider than its container.

CSS✓ Tested
Linux CommandsArchives & checksums

Compress a file and keep the original

Create a gzip-compressed copy of a file while leaving the uncompressed original in place.

gzip✓ Tested
CSmall algorithms & bit operations

Compute a simple XOR checksum

C: XOR all payload bytes into one byte to demonstrate a basic error-detection field.

C✓ Tested