Results for “request”
Small, practical examples. Search by task or narrow things down below.
Remove matching elements
Remove selected list items from the DOM with jQuery.
jQuery✓ Tested
Respect dark color preference
Apply different CSS colors when the browser requests a dark theme.
CSS✓ Tested
Retrieve the result of an asynchronous task
C++: The explicit async launch policy requests asynchronous execution rather than deferred evaluation.
C++✓ Tested
Return typed data from an async function
Await a Promise and handle failures explicitly.
async✓ Tested
Run an event handler once
Use jQuery one for a handler that removes itself after the first event.
jQuery✓ Tested
Select elements by an index range
PowerShell: An index range selects the requested array positions in order.
PowerShell✓ Tested
Set a form field value
Populate a labeled input with jQuery val.
jQuery✓ Tested
Set an element attribute
Update an HTML link using jQuery attr.
jQuery✓ Tested
Set owner-only read and write permissions
C++: Replace ordinary permission bits with the requested owner permissions.
C++✓ Tested
Set text safely
Use jQuery text to insert literal content instead of interpreting HTML.
jQuery✓ Tested
Take a limited number of iterator values
Python: Use islice to consume only the requested prefix of a potentially unbounded iterator.
Python✓ Tested
Toggle a state class
Toggle a CSS class in a jQuery click handler.
jQuery✓ Tested