Results for “save file”
Small, practical examples. Search by task or narrow things down below.
Refresh a cached data attribute deliberately
jQuery: After the first read, data caches a parsed value; removeData forces a new attribute read.
jQuery✓ Tested
Reject a deferred result
jQuery: fail receives the reason supplied to reject.
jQuery✓ Tested
Reject a missing required configuration value
Bash Scripts: Check a required value explicitly and emit a controlled diagnostic before exiting.
Bash Scripts✓ Tested
Reject infinite and NaN numeric values
C++: std::isfinite excludes special floating-point values.
C++✓ Tested
Reject NaN and infinite numeric inputs
Python: Use isfinite before computations that require an ordinary finite float.
Python✓ Tested
Reject NaN and infinite values
C: isfinite detects whether a floating-point value is an ordinary finite number.
C✓ Tested
Reject nonfinite floating-point values
Java: Double.isFinite excludes both infinity and NaN.
Java✓ Tested
Remove a CSS class
jQuery: Learn how to remove a CSS class in a complete browser example.
jQuery✓ Tested
Remove a hidden element’s layout space
CSS: Display none removes a box from layout as well as hiding its contents.
CSS✓ Tested
Remove a known prefix safely
Python: Use removeprefix instead of lstrip when removing a literal prefix rather than a set of characters.
Python✓ Tested
Remove a known prefix with a shell pattern
Bash Scripts: The hash expansion removes the shortest matching prefix without changing the original variable.
Bash Scripts✓ Tested
Remove a known suffix safely
Python: Use removesuffix to remove only a matching ending.
Python✓ Tested