FIND YOUR NEXT FEW LINES

Results for “code”

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

3000 snippets foundClear filters
JavaScriptGetting Started

Explain a calculation with a comment

JavaScript: Keep the code executable while documenting why a fixed input is used.

JavaScript✓ Tested
TypeScriptGetting Started

Explain a calculation with a comment

TypeScript: Keep the code executable while documenting why a fixed input is used.

TypeScript✓ Tested
C++Getting Started

Explain a calculation with a comment

C++: Keep the code executable while documenting why a fixed input is used.

C++✓ Tested
CGetting Started

Explain a calculation with a comment

C: Keep the code executable while documenting why a fixed input is used.

C✓ Tested
Arduino / CGetting Started

Explain a sketch with comments

Arduino / C: Use single-line and block comments to document what a sketch does.

Arduino / C✓ Tested
GitInspecting the working tree

Explain which ignore rule matches a file

Git: check-ignore -v reports the source file, line, pattern, and matched path.

Git✓ Tested
Docker / ComposeImage management

Export a container filesystem into a new image

Docker / Compose: export contains filesystem data; import creates a new image from it.

Docker / Compose✓ Tested
Bash ScriptsProcesses & environment

Export a value to child processes

Bash Scripts: Only exported shell variables are inherited through the environment.

Bash Scripts✓ Tested
GitTags & repository configuration

Export committed files without the Git metadata directory

Git: Git archive creates a snapshot of tracked committed files only.

Git✓ Tested
HTMLAccessible structure

Expose a disclosure button’s expanded state

HTML: Keep aria-expanded synchronized with the controlled panel’s hidden state.

HTML✓ Tested
ReactAccessibility & events

Expose a disclosure’s expanded state

Expose a disclosure’s expanded state with a small React component and explicit browser behavior.

React✓ Tested
AngularAccessibility & reusable patterns

Expose a disclosure’s expanded state

Expose a disclosure’s expanded state with a standalone Angular component and explicit browser behavior.

Angular✓ Tested