FIND YOUR NEXT FEW LINES

Results for “pre”

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

429 snippets foundClear filters
C#Dates & precise numbers

Find the length of a calendar month

C#: DaysInMonth applies the Gregorian leap-year rules.

C#✓ Tested
ReactComponents & props

Forward input props to a reusable field

Forward input props to a reusable field with a small React component and explicit browser behavior.

React✓ Tested
jQueryGetting Started

Insert a list item at the beginning

jQuery: Learn how to insert a list item at the beginning in a complete browser example.

jQuery✓ Tested
jQueryInsertion & wrapping

Insert an item at the beginning

jQuery: prepend inserts before the existing children.

jQuery✓ Tested
JavaScriptRegular expressions & URL encoding

Inspect the parsed pieces of a URL

JavaScript: Use URL properties rather than splitting a URL at punctuation.

JavaScript✓ Tested
TypeScriptRegular expressions & URL encoding

Inspect the parsed pieces of a URL

TypeScript: Use URL properties rather than splitting a URL at punctuation.

TypeScript✓ Tested
GitMerging & replaying changes

List paths changed on a feature branch since its merge base

Git: A three-dot diff compares the branch tip with the common ancestor.

Git✓ Tested
Docker / ComposeCompose service options

Override an env-file value explicitly

Docker / Compose: The environment section takes precedence over env_file.

Docker / Compose✓ Tested
C#Dates & precise numbers

Parse a date without a time component

C#: DateOnly avoids attaching an irrelevant time or timezone to a calendar date.

C#✓ Tested
JavaPrecise numeric calculations

Parse an integer in another base

Java: Supply an explicit radix to Integer.parseInt.

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