FIND YOUR NEXT FEW LINES

Results for “per”

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

447 snippets foundClear filters
C#File operations & paths

Inspect a file length without reading it

C#: Use FileInfo.Length to retrieve a logical size in bytes.

C#✓ Tested
Bash ScriptsArray operations

Join array items with a one-character separator

Bash Scripts: A local IFS controls the separator used by the quoted star expansion.

Bash Scripts✓ Tested
ReactPerformance & rendering

Keep a callback stable between renders

Keep a callback stable between renders with a small React component and explicit browser behavior.

React✓ Tested
GoTesting & reusable helpers

Limit the bytes read from a stream

Limit the bytes read from a stream using a complete Go program with explicit sample inputs.

Go✓ 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
JavaQueues & collection operations

Locate a value in a sorted array

Java: Use Arrays.binarySearch only after establishing ascending order.

Java✓ 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
ReactPerformance & rendering

Mark a nonurgent state update as a transition

Mark a nonurgent state update as a transition with a small React component and explicit browser behavior.

React✓ Tested
ReactPerformance & rendering

Memoize a component with stable props

Memoize a component with stable props with a small React component and explicit browser behavior.

React✓ Tested
ReactPerformance & rendering

Memoize a derived collection

Memoize a derived collection with a small React component and explicit browser behavior.

React✓ Tested
ReactPerformance & rendering

Memoize a sorted copy of state

Memoize a sorted copy of state with a small React component and explicit browser behavior.

React✓ Tested
ReactPerformance & rendering

Memoize an object passed to a provider

Memoize an object passed to a provider with a small React component and explicit browser behavior.

React✓ Tested