FIND YOUR NEXT FEW LINES

Results for “uri”

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

59 snippets foundClear filters
TypeScriptRegular expressions & URL encoding

Decode a percent-encoded URL component

TypeScript: decodeURIComponent reverses percent encoding and throws for malformed sequences.

TypeScript✓ Tested
JavaEncoding & structured values

Measure UTF-8 bytes separately from characters

Java: Encode a Java string before measuring its serialized byte length.

Java✓ Tested
JavaScriptRegular expressions & URL encoding

Percent-encode one URL component

JavaScript: encodeURIComponent escapes a parameter value rather than a complete URL.

JavaScript✓ Tested
TypeScriptRegular expressions & URL encoding

Percent-encode one URL component

TypeScript: encodeURIComponent escapes a parameter value rather than a complete URL.

TypeScript✓ Tested
C++Numbers & algorithms

Search a sorted vector

Use binary_search after ensuring C++ values are sorted.

C++✓ Tested
JavaScriptArray traversal & selection

Separate a first item from the remaining items

JavaScript: Array destructuring and a rest element produce named pieces of a sequence.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Separate a first item from the remaining items

TypeScript: Array destructuring and a rest element produce named pieces of a sequence.

TypeScript✓ Tested
Docker / ComposeCompose service options

Set no-new-privileges in Compose

Docker / Compose: security_opt configures the process privilege restriction.

Docker / Compose✓ Tested
CSSInteraction selectors

Show a pressed pointer state

CSS: Active applies during the pointer press rather than after the click has finished.

CSS✓ Tested
TypeScriptTypes & functions

Type a function’s inputs and output

Catch mismatched arguments during compilation.

function✓ Tested
C++Tasks & synchronization

Wait for shared state with a condition variable

C++: Use a predicate so spurious wakeups cannot allow the worker to continue before the state is ready.

C++✓ Tested