The raw idea, a use case, or something we’ve seen that motivates us to work on this
How much time we want to spend and how that constrains the solution
| const worker = null; | |
| const start = (callback, delay) => { | |
| const args = { foo: "abc" }; | |
| worker = new Worker('/timeoutWorker.js'); | |
| worker.onmessage = (event) => { | |
| if (event.isTrusted && event.data === "timeout") { | |
| callback(); | |
| } |
| const now = () => new Date().getTime() / 1000; | |
| let values = {}; | |
| let ttls = {} | |
| const client = { | |
| del: async (key) => { | |
| delete values[key]; | |
| }, | |
| expire: async (key, ttl) => { |
| // Problem: when remembered, Chrome auto-fills the password input, but in fact it doesn't | |
| // set the value and doesn't fire onChange event until there's any kind of interaction. | |
| // If password value is empty, then submit button is still disabled yet password looks filled, | |
| // which looks bad. See: https://bugs.chromium.org/p/chromium/issues/detail?id=813175 | |
| const [isAutofilled, setIsAutofilled] = useState(false); | |
| const passwordElRef = useRef<HTMLInputElement | null>(null); | |
| useEffect(() => { | |
| const element = passwordElRef.current; |
| #include "SevenSegmentTM1637.h" | |
| #include "SevenSegmentExtended.h" | |
| #include "RTClib.h" | |
| // Sortie horloge Rouge | |
| const byte PIN_CLK_Red = A0; // define CLK pin | |
| // Sortie horloge Verte | |
| const byte PIN_CLK_Green = A1; // define CLK pin | |
| // Sortie horloge Orange | |
| const byte PIN_CLK_Orange = A2; // define CLK pin |
| import mapDuplicates from "./mapDuplicates"; | |
| describe("mapDuplicates", () => { | |
| it("addresses duplicate surnames", () => { | |
| const surnames = ["González", "González", "Martínez", "González"]; | |
| expect( | |
| mapDuplicates(surnames, (name, index) => `${name} ${index}`) | |
| ).toEqual(["González 0", "González 1", "Martínez", "González 3"]); | |
| }); |
| // https://github.com/oblador/react-native-animatable/issues/132#issuecomment-786870602 | |
| const MyComponent = (props) => { | |
| const ref = React.useRef(); | |
| React.useEffect(() => { | |
| ref?.current?.fadeIn(); | |
| return () => ref?.current?.fadeOut(); // as you know, this is the same as unmount ;) | |
| }, [props.id]); // track some prop that changes |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 |
| #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
| ; #Warn ; Enable warnings to assist with detecting common errors. | |
| SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
| SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
| SetScrollLockState, AlwaysOff | |
| ;following section remaps alt-arrow and command-arrow | |
| ;keys to mimic OSX behaviour | |
| #Up::SendInput {Lctrl down}{Home}{Lctrl up} |