Results for “shape”
Small, practical examples. Search by task or narrow things down below.
Fit an entire image inside a differently shaped box
CSS: Contain preserves the image aspect ratio while keeping all of it visible inside the specified content box.
CSS✓ Tested
Validate the shape of an absolute URL
HTML: A URL input checks syntax, not whether a resource exists or is safe.
HTML✓ Tested
Describe an object with an interface
Require named fields on a reusable object shape.
interface✓ Tested
Deserialize a JSON object into a dictionary
C#: Specify the value type expected from a known JSON shape.
C#✓ Tested
Extract named regex fields
Python: Use named capture groups to parse a known date-shaped identifier.
Python✓ Tested
Round a box’s corners
CSS: Border-radius changes the corner shape without changing its rectangular layout dimensions.
CSS✓ Tested
Select specific columns
Read only the fields a result needs.
SELECT✓ Tested
Write a generic first-or-fallback helper
C#: Constrain a generic helper through its input shape and return an explicit caller-supplied fallback.
C#✓ Tested