FIND YOUR NEXT FEW LINES

Results for “own”

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

205 snippets foundClear filters
JavaScriptObject behavior & collections

Distinguish an own property from an inherited one

JavaScript: Object.hasOwn avoids depending on an object’s possibly shadowed hasOwnProperty method.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Distinguish an own property from an inherited one

TypeScript: Object.hasOwn avoids depending on an object’s possibly shadowed hasOwnProperty method.

TypeScript✓ Tested
PowerShellStrings & literal text

Extract a known substring

PowerShell: Substring uses a zero-based starting index and a character count.

PowerShell✓ Tested
JavaText validation & formatting

Extract text between known positions

Java: Java substring uses a start-inclusive, end-exclusive range of UTF-16 indices.

Java✓ Tested
CBinary formats & structured parsing

Format a known timestamp in UTC

C: gmtime converts to UTC calendar fields and strftime formats them.

C✓ Tested
Linux CommandsDates & process utilities

Format a known UTC timestamp

Linux Commands: Use GNU date -u and an explicit input offset to avoid local timezone dependence.

Linux Commands✓ Tested
C++Numeric parsing & calculations

Format an integer into a caller-owned buffer

C++: to_chars avoids allocation and reports whether the buffer was large enough.

C++✓ Tested
Bash ScriptsFunction scope & composition

Give a function its own positional parameters

Bash Scripts: A function receives its call arguments without replacing the caller’s positional parameters.

Bash Scripts✓ Tested
JavaScriptObject behavior & collections

List an object’s own enumerable keys

JavaScript: Object.keys omits inherited and non-enumerable properties.

JavaScript✓ Tested
TypeScriptObject behavior & collections

List an object’s own enumerable keys

TypeScript: Object.keys omits inherited and non-enumerable properties.

TypeScript✓ Tested
Linux CommandsFiles & permissions

Make a script executable by its owner

Linux Commands: Add the owner execute bit without replacing all permission bits.

Linux Commands✓ Tested
SQLText cleanup & matching

Match a known text prefix

SQL: A percent wildcard matches zero or more characters following the prefix.

SQL✓ Tested