liveBook · Manning

Sliding window

A sliding window is a bounded region over an ordered sequence or time range that advances, updating which elements fall within it.

How 5 Manning books explain it

Build a Large Language Model (From Scratch)

A data-sampling method that moves a fixed-size window across text to create overlapping training examples.

How it is used
Generates training examples that connect tokenized text to an LLM’s next-token prediction task.
How deep it goes
Explains token slicing, target shifting, stride behavior, batching, and PyTorch implementation without covering embedding internals.
Examples
Uses The Verdict, token-ID slices, decoded contexts, tensor batches, and stride comparisons.
What you can do after
Builds batched input–target tensors with a tokenizer, PyTorch Dataset, and DataLoader.

Read how Build a Large Language Model (From Scratch) explains sliding window →

Kafka for Architects

A sliding window is a stream-processing time interval defined by the timestamp difference between records being considered for a join or computation.

How it is used
Constrains stream-to-stream joins when related events arrive asynchronously.
How deep it goes
Defines timestamp-based matching, state-store waiting, expiry, and partitioning constraints without detailing implementation code.
Examples
Uses a one-day Orders-and-Payments join in which unmatched events expire.
What you can do after
Apply it via Kafka Streams to join records whose event timestamps fall within a configured interval.

Read how Kafka for Architects explains sliding window →

Deep Learning with Python, Third Edition

A technique that moves a fixed-size window across text or other data to create overlapping local segments.

How it is used
Creates local training examples for CBOW word-embedding pretraining and fixed-length inputs for Transformer pretraining.
How deep it goes
Explains fixed-size extraction through worked token examples and TensorFlow preprocessing, stopping short of general windowing theory.
Examples
Uses nine-token CBOW windows with an eight-token context and one label, plus 256-token shifted Transformer sequences.
What you can do after
Build it from scratch with TensorFlow, TextVectorization, tf.data, and Keras models.

Read how Deep Learning with Python, Third Edition explains sliding window →

Kafka Streams in Action, Second Edition

A sliding window is a fixed-duration stream-processing window whose boundaries are determined by record timestamps and whose contents change as records enter or leave.

How it is used
Analyzes continuously changing event behavior, such as page navigation within a recent time interval.
How deep it goes
Explains timestamp boundaries, inclusivity, look-back inclusion, evaluation triggers, and Kafka Streams implementation.
Examples
Demonstrates page-view aggregation using a 30-second SlidingWindows configuration and a downstream aggregate topic.
What you can do after
Apply it via Kafka Streams using SlidingWindows.ofTimeDifferenceWithNoGrace and a windowed aggregation topology.

Read how Kafka Streams in Action, Second Edition explains sliding window →

API Design Patterns

A sliding window is a bounded set of currently active versions that advances as newer versions replace older ones.

How it is used
Minimizes API maintenance while delivering new functionality through frequent version turnover.
How deep it goes
Defines four lifecycle states and illustrates their progression, but does not detail implementation mechanics.
Examples
Uses a five-version monthly timeline and a state table covering Preview, Current, Deprecated, and Deleted.
What you can do after
Operate/configure an API version lifecycle with explicit stability, change, deprecation, and deletion expectations.

Read how API Design Patterns explains sliding window →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.