FIND YOUR NEXT FEW LINES

Results for “one”

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

590 snippets foundClear filters
AngularComponents & communication

Project content into named slots

Project content into named slots with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
C#File operations & paths

Read a filename stem and extension

C#: Use Path helpers instead of splitting a path on dots or directory separators.

C#✓ Tested
PythonDates & time zones

Read an ISO week number

Python: Use isocalendar because ISO week years can differ from calendar years near January.

Python✓ Tested
JavaDates & time zones

Read an ISO week year and week number

Java: Use ISO week fields together because a week can belong to the previous calendar year.

Java✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Reject a missing required configuration value

Bash Scripts: Check a required value explicitly and emit a controlled diagnostic before exiting.

Bash Scripts✓ Tested
CSSBox dimensions & overflow

Remove a hidden element’s layout space

CSS: Display none removes a box from layout as well as hiding its contents.

CSS✓ Tested
GitRestoring & revising local work

Remove only a named untracked scratch file

Git: Use a narrow pathspec after reviewing the dry run; clean cannot recover untracked content.

Git✓ Tested
AngularComponents & communication

Render signal changes with OnPush

Render signal changes with OnPush with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularComponents & communication

Require an input value

Require an input value with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactComponents & props

Reset child state by changing its key

Reset child state by changing its key with a small React component and explicit browser behavior.

React✓ Tested
AngularComponents & communication

Share two-way state through a model input

Share two-way state through a model input with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PythonDates & time zones

Skip weekends when advancing dates

Python: Walk calendar dates and count only Monday through Friday.

Python✓ Tested