FIND YOUR NEXT FEW LINES

Results for “code”

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

3000 snippets foundClear filters
JavaPrecise numeric calculations

Divide negative integers with floor rounding

Java: floorDiv and floorMod provide consistent floor-based quotient and remainder.

Java✓ Tested
PythonGetting Started

Divide using a fractional number

Python: Use a floating-point operand to preserve the fractional part of a division.

Python✓ Tested
C#Getting Started

Divide using a fractional number

C#: Use a floating-point operand to preserve the fractional part of a division.

C#✓ Tested
JavaGetting Started

Divide using a fractional number

Java: Use a floating-point operand to preserve the fractional part of a division.

Java✓ Tested
JavaScriptGetting Started

Divide using a fractional number

JavaScript: Use a floating-point operand to preserve the fractional part of a division.

JavaScript✓ Tested
TypeScriptGetting Started

Divide using a fractional number

TypeScript: Use a floating-point operand to preserve the fractional part of a division.

TypeScript✓ Tested
C++Getting Started

Divide using a fractional number

C++: Use a floating-point operand to preserve the fractional part of a division.

C++✓ Tested
CGetting Started

Divide using a fractional number

C: Use a floating-point operand to preserve the fractional part of a division.

C✓ Tested
HTMLImages & embedded documents

Draw a basic rectangle on a labeled canvas

HTML: Canvas requires script to draw pixels; provide alternative content and an accessible label.

HTML✓ Tested
CSSGetting Started

Draw a visible element border

CSS: Learn how to draw a visible element border in a complete browser example.

CSS✓ Tested
Arduino / CDigital signals & interrupts

Drive the built-in LED low after turning it on

Arduino / C: digitalWrite changes the actual output level of a configured pin.

Arduino / C✓ Tested
Docker / ComposeLimits & process security

Drop all optional Linux capabilities

Docker / Compose: The effective capability mask becomes zero after cap-drop ALL.

Docker / Compose✓ Tested