FIND YOUR NEXT FEW LINES

Results for “Dates & precise numbers”

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

184 snippets foundClear filters
JavaDates & time zones

Generate a half-open range of dates

Java: datesUntil includes the starting date and excludes the end date.

Java✓ Tested
SQLiteQueries & text

Generate numbers with a recursive CTE

Build a bounded sequence using SQL recursion.

recursive CTE✓ Tested
Linux CommandsSearching text

Show line numbers beside matches

Linux Commands: Use grep -n so a result identifies its position in the source file.

Linux Commands✓ Tested
PythonDates & time zones

Skip weekends when advancing dates

Python: Walk calendar dates and count only Monday through Friday.

Python✓ Tested
PowerShellGetting Started

Sort a sequence of numbers

PowerShell: Sort a sequence of numbers using PowerShell 7.

PowerShell✓ Tested
JavaScriptArrays

Sort numbers numerically

Supply a numeric comparator instead of JavaScript string sorting.

JavaScript✓ Tested
Linux CommandsDates & process utilities

Add calendar days with GNU date

Linux Commands: Anchor date arithmetic at a fixed UTC date to avoid local daylight-saving ambiguity.

Linux Commands✓ Tested
GoDates & times

Advance a calendar date

Advance a calendar date using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonDates & time zones

Advance a date by a number of days

Python: Use timedelta so month and year boundaries are handled automatically.

Python✓ Tested
Linux CommandsDates & process utilities

Bound a command execution time

Linux Commands: Use timeout and handle status 124 as an expected time limit.

Linux Commands✓ Tested
JavaScriptNumbers & numeric validation

Calculate a page count with ceiling division

JavaScript: Use Math.ceil for a nonnegative item count and a positive page size.

JavaScript✓ Tested
TypeScriptNumbers & numeric validation

Calculate a page count with ceiling division

TypeScript: Use Math.ceil for a nonnegative item count and a positive page size.

TypeScript✓ Tested