Table of Contents generated with DocToc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for f in * | |
do qpdf --password=THE_PASSWORD --decrypt --replace-input $f; | |
done | |
# brew install qpdf | |
# for executable file run: chmod u+x decrypt-pdf.sh | |
# merge files into one PDF: `qpdf --empty --pages *.pdf -- out.pdf` |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
Please create an app for managing timed tasks.
- The user can input a text and click Add
- A new task is added with the title, and 00:00 time, and a play button.
- Clicking Play will play this task: the timer will start running, and the icon will change to a pause icon. Also - any other running task will be paused.
- Clicking Pause will pause the task.
- The total time is always updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { | |
memo, | |
useMemo, | |
useRef, | |
useState, | |
useEffect, | |
useCallback | |
} from "react"; | |
import { Link } from "react-router-dom"; |