FIND YOUR NEXT FEW LINES

Results for “z”

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

416 snippets foundClear filters
CSSBox dimensions & overflow

Add inner spacing to a content-sized box

CSS: In content-box sizing, padding adds to the declared content width.

CSS✓ Tested
CNumbers & memory

Allocate a zeroed array

Check calloc, use the allocation, and release it in C.

C✓ Tested
CDynamic memory & ownership

Allocate and initialize a structure

C: Use a compound literal assignment to initialize all ordinary structure fields.

C✓ Tested
AngularPipes & formatting

Capitalize words with TitleCasePipe

Capitalize words with TitleCasePipe with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
CSSPositioning & stacking

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
AngularServices & dependency injection

Centralize a reusable validation rule

Centralize a reusable validation rule with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactState & reducers

Centralize state changes in a reducer

Centralize state changes in a reducer with a small React component and explicit browser behavior.

React✓ Tested
CDynamic memory & ownership

Check an array allocation size before multiplying

C: Compare the requested element count against SIZE_MAX divided by element size.

C✓ Tested
Linux CommandsArchive integrity & packaging

Check the integrity of a gzip stream

Linux Commands: Use gzip -t to verify a compressed file without extracting it.

Linux Commands✓ Tested
Linux CommandsSystem information

Check the size of a folder

Show a single total for the disk space used by a folder and its contents.

disk usage✓ Tested
CSSResponsive conditions & sizing

Choose the smaller of a fixed and viewport-relative size

CSS: Min selects whichever supplied length is smaller at the current viewport.

CSS✓ Tested
CStrings & byte buffers

Compare binary buffers including zero bytes

C: memcmp checks an explicit byte length rather than stopping at a string terminator.

C✓ Tested