FIND YOUR NEXT FEW LINES

Results for “relative”

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

29 snippets foundClear filters
TypeScriptRegular expressions & URL encoding

Resolve a relative URL against a base

TypeScript: A trailing slash makes the final base path component a directory.

TypeScript✓ Tested
HTMLMetadata & document links

Resolve relative links against an explicit base

HTML: A base href changes how relative document URLs are resolved.

HTML✓ 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
Linux CommandsFiles & folders

Create a symbolic link

Create a relative symbolic link to a file and inspect its target with readlink.

symlink✓ Tested
PythonFile operations & archives

Create a ZIP archive from a file

Python: Give a ZIP entry a relative archive name instead of exposing its source directory.

Python✓ Tested
Linux CommandsArchive integrity & packaging

Create an archive from an explicit file list

Linux Commands: Use tar -T for a controlled list of relative archive members.

Linux Commands✓ Tested
C#File operations & paths

Enumerate matching files recursively

C#: Sort relative filenames when reproducible traversal output is required.

C#✓ Tested
PythonFile operations & archives

Find matching files recursively

Python: Use rglob and sorted relative paths for a reproducible recursive file listing.

Python✓ Tested
C++Ordering & set operations

Group matching values while preserving their order

C++: stable_partition keeps the relative order within both predicate groups.

C++✓ Tested
C++Filesystem operations

List regular files recursively in sorted order

C++: Collect relative paths before sorting because directory iteration order is unspecified.

C++✓ Tested
Linux CommandsFinding & selecting files

Normalize a path without requiring it to exist

Linux Commands: Use GNU realpath -m and relative-to to normalize dot segments.

Linux Commands✓ Tested