FIND YOUR NEXT FEW LINES

Results for “if”

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

946 snippets foundClear filters
AngularLifecycle & observable data

Initialize component data with ngOnInit

Initialize component data with ngOnInit with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Docker / ComposeExecution & file transfer

Inspect changes to a container’s writable layer

Docker / Compose: diff marks added, changed, and deleted filesystem paths.

Docker / Compose✓ Tested
Docker / ComposeContainer lifecycle

Inspect the exit code of a completed process

Docker / Compose: Container state retains the exit code until the container is removed.

Docker / Compose✓ Tested
GitInspecting the working tree

List newly added staged files only

Git: Filter the cached diff by added status while leaving modified files out.

Git✓ Tested
Docker / ComposeContainer lifecycle

List only containers belonging to a label

Docker / Compose: A label filter selects explicitly tagged resources.

Docker / Compose✓ Tested
GitInspecting the working tree

List only staged filenames

Git: The cached diff compares the index with HEAD rather than comparing working files with the index.

Git✓ Tested
GoDates & times

Measure a duration between instants

Measure a duration between instants using a complete Go program with explicit sample inputs.

Go✓ Tested
AngularLifecycle & observable data

Measure a node after the first render

Measure a node after the first render with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
CFile positioning & lifecycle

Measure a small seekable binary file

C: Seek to the end and inspect ftell, checking both operations for errors.

C✓ Tested
ReactEffects & lifecycle

Measure an element after layout

Measure an element after layout with a small React component and explicit browser behavior.

React✓ Tested
HTMLImages & embedded documents

Name a self-contained embedded document

HTML: Give an iframe a descriptive title and provide its small document with srcdoc.

HTML✓ Tested
AngularLifecycle & observable data

Publish updated state through a BehaviorSubject

Publish updated state through a BehaviorSubject with a standalone Angular component and explicit browser behavior.

Angular✓ Tested