Results for “code”
Small, practical examples. Search by task or narrow things down below.
Read a data attribute from the current target
Read a data attribute from the current target with a small React component and explicit browser behavior.
React✓ Tested
Read a decimal number from serial input
Arduino / C: parseFloat parses a signed decimal value from the input stream.
Arduino / C✓ Tested
Read a DOM element through a viewChild signal
Read a DOM element through a viewChild signal with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Read a field from container metadata
Use an inspect template for stable machine-readable output.
inspect✓ Tested
Read a file from a commit
Inspect committed content without changing your working copy.
show✓ Tested
Read a file from the latest commit
Git: Read a file from the latest commit inside the disposable repository created by the input setup.
Git✓ Tested
Read a file from the parent commit
Git: HEAD~1 names the first parent one generation before HEAD.
Git✓ Tested
Read a file lazily through the .NET line iterator
PowerShell: ReadLines avoids creating one string containing the entire file.
PowerShell✓ Tested
Read a file length in bytes
Java: Files.size inspects metadata without loading the file into a Java string.
Java✓ Tested
Read a file line by line
Read C++ text lines without loading the whole file at once.
C++✓ Tested
Read a file size in bytes
Python: Use stat().st_size to read the logical byte length without loading the file.
Python✓ Tested
Read a file size in bytes
PowerShell: The Length property of a file item reports its logical byte size.
PowerShell✓ Tested