FIND YOUR NEXT FEW LINES

Results for “C”

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

3000 snippets foundClear filters
CGetting Started

Name a value that stays fixed

C: Use a constant declaration or the language’s constant naming convention for a fixed limit.

C✓ Tested
Linux CommandsFinding & selecting files

Normalize a path without requiring it to exist

Linux Commands: Use GNU realpath -m and relative-to to normalize dot segments.

Linux Commands✓ Tested
AngularComponents & communication

Normalize an input with a transform

Normalize an input with a transform with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PythonIteration & sequences

Number items while iterating

Python: Use enumerate to attach a one-based position without maintaining a separate counter.

Python✓ Tested
C++Ownership & optional values

Observe shared ownership without extending its lifetime

C++: A weak_ptr can be locked while an owner exists and becomes expired after the last owner is released.

C++✓ Tested
HTMLMetadata & document links

Offer a downloadable text file

HTML: The download attribute supplies a filename for this same-document data URL.

HTML✓ Tested
ReactAsync work & status

Offer a retry after a failed attempt

Offer a retry after a failed attempt with a small React component and explicit browser behavior.

React✓ 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
Docker / ComposeExecution & file transfer

Override an image’s entrypoint at runtime

Docker / Compose: An explicit entrypoint replaces the image entrypoint for this invocation.

Docker / Compose✓ Tested
SQL ServerSelect & page

Page an ordered result

Skip rows and fetch a bounded page.

OFFSET✓ Tested
CSSVisual treatment & accessibility

Paint a gradient without an image file

CSS: Linear-gradient generates a CSS background image from color stops.

CSS✓ Tested
PythonJSON & CSV

Parse a JSON string

Convert a JSON string into a Python dictionary and read values by key.

json✓ Tested