FIND YOUR NEXT FEW LINES

Results for “Object behavior & collections”

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

631 snippets foundClear filters
jQueryDeferred work & queues

Expose observation without exposing resolution

jQuery: promise returns an interface without resolve or reject methods.

jQuery✓ Tested
AngularServices & dependency injection

Expose service state through a read-only signal

Expose service state through a read-only signal with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularLists & control flow

Expose the current index in @for

Expose the current index in @for with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
C#Text validation & encoding

Extract all integer tokens from text

C#: Enumerate Match objects returned by Regex.Matches with an explicit timeout.

C#✓ Tested
jQueryAnimation completion

Fade a hidden element into view

jQuery: fadeIn shows a hidden element and calls its completion handler.

jQuery✓ Tested
jQueryAnimation completion

Fade an element out and hide it

jQuery: fadeOut sets display none after the opacity animation finishes.

jQuery✓ Tested
jQueryHTTP requests

Fetch a plain-text resource

jQuery: An explicit text data type keeps the response as a string.

jQuery✓ Tested
jQueryHTTP requests

Fetch and display JSON

jQuery: getJSON parses a successful JSON response.

jQuery✓ Tested
ReactLists & filtering

Filter a list by a search term

Filter a list by a search term with a small React component and explicit browser behavior.

React✓ Tested
PythonCollections

Filter a list with a condition

Build a new list containing only the values that satisfy a condition using a list comprehension.

list✓ Tested
AngularLists & control flow

Filter a signal-backed list

Filter a signal-backed list with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
C#Collections

Filter even numbers

Use LINQ Where to keep even C# values.

C#✓ Tested