FIND YOUR NEXT FEW LINES

Results for “time”

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

236 snippets foundClear filters
PythonFile operations & archives

Copy a file and preserve its metadata

Python: Use copy2 for a file copy that also attempts to preserve timestamps and permission bits.

Python✓ Tested
Linux CommandsFiles & folders

Copy a file to a folder

Create a backup folder if needed, then copy a file into it while preserving its modification time and permission bits.

file✓ Tested
SQL ServerDates & text

Count day boundaries between dates

Compare date values with DATEDIFF.

DATEDIFF✓ Tested
Arduino / CGetting Started

Count five LED flashes with a for loop

Arduino / C: Repeat an LED action a known number of times and print the current count.

Arduino / C✓ Tested
AngularServices & dependency injection

Create a dependency with a provider factory

Create a dependency with a provider factory with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularPipes & formatting

Create a small pure formatting pipe

Create a small pure formatting pipe with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Linux CommandsFiles & permissions

Create an empty file

Linux Commands: Use touch to create a file when absent; an existing file keeps its contents but gets updated timestamps.

Linux Commands✓ Tested
AngularSignals & state

Derive a filtered list with computed

Derive a filtered list with computed with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularComponents & communication

Derive a value from an input signal

Derive a value from an input signal with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularGetting Started

Derive a value with computed

Derive a value with computed with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularServices & dependency injection

Derive totals inside a shared service

Derive totals inside a shared service with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
TypeScriptTypes & functions

Describe an object with an interface

Require named fields on a reusable object shape.

interface✓ Tested