Results for “z”
Small, practical examples. Search by task or narrow things down below.
Add inner spacing to a content-sized box
CSS: In content-box sizing, padding adds to the declared content width.
CSS✓ Tested
Allocate a zeroed array
Check calloc, use the allocation, and release it in C.
C✓ Tested
Allocate and initialize a structure
C: Use a compound literal assignment to initialize all ordinary structure fields.
C✓ Tested
Capitalize words with TitleCasePipe
Capitalize words with TitleCasePipe with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Center a fixed-size absolute child with auto margins
CSS: An all-zero inset plus auto margins distributes the available space around the child.
CSS✓ Tested
Centralize a reusable validation rule
Centralize a reusable validation rule with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Centralize state changes in a reducer
Centralize state changes in a reducer with a small React component and explicit browser behavior.
React✓ Tested
Check an array allocation size before multiplying
C: Compare the requested element count against SIZE_MAX divided by element size.
C✓ Tested
Check the integrity of a gzip stream
Linux Commands: Use gzip -t to verify a compressed file without extracting it.
Linux Commands✓ Tested
Check the size of a folder
Show a single total for the disk space used by a folder and its contents.
disk usage✓ Tested
Choose the smaller of a fixed and viewport-relative size
CSS: Min selects whichever supplied length is smaller at the current viewport.
CSS✓ Tested
Compare binary buffers including zero bytes
C: memcmp checks an explicit byte length rather than stopping at a string terminator.
C✓ Tested