Results for “read”
Small, practical examples. Search by task or narrow things down below.
Return an inserted row
Read generated data directly from INSERT.
RETURNING✓ Tested
Rotate a sequence around a selected position
C++: rotate places the element at the middle iterator first while preserving the two segment orders.
C++✓ Tested
Round halfway floating-point values away from zero
C++: std::round has an explicit halfway rule different from truncation.
C++✓ Tested
Run cleanup through a scoped destructor
C++: A stack object’s destructor runs when its scope exits, including normal exception unwinding.
C++✓ Tested
Run your first program
C++: Start with a complete program that prints one line. Follow the run instructions below.
C++✓ Tested
Select specific columns
Read only the fields a result needs.
SELECT✓ Tested
Set owner-only file permissions
Linux Commands: Use chmod 600 to allow only the owner to read and write a file.
Linux Commands✓ Tested
Share ownership with a counted smart pointer
C++: Copies of shared_ptr keep the owned value alive until the last owner is released.
C++✓ 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
Sort only the smallest requested prefix
C++: partial_sort orders the selected prefix without guaranteeing the order of the remainder.
C++✓ Tested
Sort records by two fields
C++: Tuple comparison implements lexicographic ordering across several keys.
C++✓ Tested