FIND YOUR NEXT FEW LINES

Results for “code”

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

3000 snippets foundClear filters
CStructures & function interfaces

Pass a function as a callback

C: A typed function pointer permits behavior to be supplied to another function.

C✓ Tested
Docker / ComposeGetting Started

Pass a named configuration value

Docker / Compose: Pass a named configuration value using a locally available Ubuntu image.

Docker / Compose✓ Tested
AngularGetting Started

Pass a value to a signal input

Pass a value to a signal input with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Linux CommandsDates & process utilities

Pass a variable to one command

Linux Commands: Use env to supply a child process value without setting it permanently in the parent shell.

Linux Commands✓ Tested
Bash ScriptsInput streams & redirection

Pass a variable to standard input

Bash Scripts: A here-string supplies the expanded value followed by a newline.

Bash Scripts✓ Tested
C++Tasks & synchronization

Pass an argument into a worker thread

C++: Thread arguments are copied by default; std::ref explicitly passes a reference.

C++✓ Tested
PowerShellCommands & execution context

Pass an environment value to a child process

PowerShell: The process environment is inherited by a launched child PowerShell process.

PowerShell✓ Tested
Docker / ComposeContainer commands

Pass an environment variable

Supply configuration without changing an image.

environment✓ Tested
ReactComponents & props

Pass an input ref as a React 19 prop

Pass an input ref as a React 19 prop with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Pass an object to the style prop

Pass an object to the style prop with a small React component and explicit browser behavior.

React✓ Tested
C#Types & reliable control flow

Pass behavior as a function delegate

C#: Func describes a callable with typed parameters and a return value.

C#✓ Tested
ReactGetting Started

Pass data through props

Pass data through props with a small React component and explicit browser behavior.

React✓ Tested