Results for “as”
Small, practical examples. Search by task or narrow things down below.
Show progress with a native element
HTML: Learn how to show progress with a native element in a complete browser example.
HTML✓ Tested
Show the current directory
Print the absolute path of your current working directory before running commands that depend on relative paths.
directory✓ Tested
Show the current value of a range input
HTML: Mirror range input events into a labeled output for a native slider.
HTML✓ Tested
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
Show the Linux distribution version
Read the distribution-provided operating system name and version from os-release.
os✓ Tested
Size a child relative to its containing block
CSS: A percentage width is based on the containing block’s available width.
CSS✓ Tested
Size a panel relative to viewport height
CSS: Viewport height units track the browser viewport rather than the parent element.
CSS✓ Tested
Skip weekends when advancing dates
Python: Walk calendar dates and count only Monday through Friday.
Python✓ Tested
Smooth a sequence with an exponential filter
Arduino / C: Blend each sample with the previous filtered value.
Arduino / C✓ Tested
Sort a list
Sort a mutable Java list in natural ascending order.
Java✓ Tested
Sort a sequence of numbers
PowerShell: Sort a sequence of numbers using PowerShell 7.
PowerShell✓ Tested
Sort a small array in place
Arduino / C: Insertion sort needs no additional array and is suitable for small datasets.
Arduino / C✓ Tested