FIND YOUR NEXT FEW LINES

Results for “Type & reading flow”

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

707 snippets foundClear filters
TypeScriptGetting Started

Count the items in a collection

TypeScript: Read the collection’s length instead of hard-coding the loop limit.

TypeScript✓ Tested
CBinary formats & structured parsing

Decode a 16-bit big-endian integer

C: Promote bytes to an unsigned integer type before combining shifted values.

C✓ Tested
TypeScriptGetting Started

Measure a short text value

TypeScript: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.

TypeScript✓ Tested
TypeScriptCollections & records

Remove duplicate values with a Set

Keep the first occurrence order while deduplicating.

Set✓ Tested
GoFunctions & types

Accept a small behavior interface

Accept a small behavior interface using a complete Go program with explicit sample inputs.

Go✓ Tested
GoFunctions & types

Accept a variable number of arguments

Accept a variable number of arguments using a complete Go program with explicit sample inputs.

Go✓ Tested
TypeScriptUTC date operations

Add calendar days in UTC

TypeScript: Use UTC date setters to cross month boundaries without local daylight-saving effects.

TypeScript✓ Tested
CSSBox dimensions & overflow

Add inner spacing to a content-sized box

CSS: In content-box sizing, padding adds to the declared content width.

CSS✓ Tested
CSSGetting Started

Allow long content to scroll

CSS: Learn how to allow long content to scroll in a complete browser example.

CSS✓ Tested
GoFunctions & types

Attach behavior to a struct

Attach behavior to a struct using a complete Go program with explicit sample inputs.

Go✓ Tested
AngularLists & control flow

Bind a narrowed value using an @if alias

Bind a narrowed value using an @if alias with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
TypeScriptRegular expressions & URL encoding

Build a URL query string from values

TypeScript: URLSearchParams handles query escaping and repeated parameter appends.

TypeScript✓ Tested