FIND YOUR NEXT FEW LINES

Results for “as”

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

2533 snippets foundClear filters
HTMLGetting Started

Show progress with a native element

HTML: Learn how to show progress with a native element in a complete browser example.

HTML✓ Tested
Linux CommandsFiles & folders

Show the current directory

Print the absolute path of your current working directory before running commands that depend on relative paths.

directory✓ Tested
HTMLNative disclosure & dialogs

Show the current value of a range input

HTML: Mirror range input events into a labeled output for a native slider.

HTML✓ Tested
Linux CommandsText processing

Show the first lines of a file

Read only the first three lines of a text file, useful for checking a header or previewing a large log.

head✓ Tested
Linux CommandsSystem information

Show the Linux distribution version

Read the distribution-provided operating system name and version from os-release.

os✓ Tested
CSSBox dimensions & overflow

Size a child relative to its containing block

CSS: A percentage width is based on the containing block’s available width.

CSS✓ Tested
CSSBox dimensions & overflow

Size a panel relative to viewport height

CSS: Viewport height units track the browser viewport rather than the parent element.

CSS✓ Tested
PythonDates & time zones

Skip weekends when advancing dates

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

Python✓ Tested
Arduino / CSensor calculations

Smooth a sequence with an exponential filter

Arduino / C: Blend each sample with the previous filtered value.

Arduino / C✓ Tested
JavaCollections

Sort a list

Sort a mutable Java list in natural ascending order.

Java✓ Tested
PowerShellGetting Started

Sort a sequence of numbers

PowerShell: Sort a sequence of numbers using PowerShell 7.

PowerShell✓ Tested
Arduino / CArrays & embedded state

Sort a small array in place

Arduino / C: Insertion sort needs no additional array and is suitable for small datasets.

Arduino / C✓ Tested