- Oct 2022
-
-
Note: For keyword parameters, use @param, not @option.
I sure was looking for @option (knowing already about @param) and assuming/expecting that (if it exists) it would totally be the right thing to use for documenting keyword parameters. So I was quite surprised to see this much-needed warning (for me and others like me who came here expecting/assuming the same thing).
-
- Jan 2022
-
stackoverflow.com stackoverflow.com
-
test2 being marked async does wrap your return value in a new promise:
-
- Sep 2021
-
stackoverflow.com stackoverflow.com
-
I still don't understand the difference between a script and a module
-
- May 2021
-
stackoverflow.com stackoverflow.com
-
You may want to try putting the one-liner (everything in the single quotes) in an actual script, with a bash shebang line. I think filter-branch is probably trying to run this in sh, not bash.
-
- Apr 2021
-
unix.stackexchange.com unix.stackexchange.com
-
I just wanted to point out that the syntax is not supported by the POSIX standard and thus won't universally work in /bin/sh scripts (many people erroneously use bash syntax in /bin/sh scripts)
-
- Jan 2021
-
github.com github.com
-
I've reproduced, in a very simple way, what I would like it to do: https://svelte.dev/repl/2b0b7837e3ba44b5aba8d7e774094bb4?version=3.19.1
This is the same URL as the original example given in issue description.
I'm guessing what happened is they started with that one, made some changes, and then I think they must have forgot to save their modified REPL (which would have generated a new, unique URL).
-
- Dec 2020
-
stackoverflow.com stackoverflow.com
-
I changed if (value) { to if (typeof value !== "undefined") { as it was skipping some keys
-
- Oct 2020
-
medium.com medium.com
-
In a large code base, this will result in moving imports randomly around until stuff just happens to work. Which is often only temporary, as a small refactoring or change in import statements in the future can subtly adjust the module loading order, reintroducing the problem.
-
-
stackoverflow.com stackoverflow.com
-
Looks like the problem is that debounce defaults to waiting for 0 ms ... which is completely useless!
It would be (and is) way to easy to omit the 2nd parameter to https://lodash.com/docs/4.17.15#debounce.
Why is that an optional param with a default value?? It should be required!
There must be some application where a delay of 0 is useless. https://www.geeksforgeeks.org/lodash-_-debounce-method/ alludes to / implies there may be a use:
When the wait time is 0 and the leading option is false, then the func call is deferred until to the next tick.
But I don't know what that use case is. For the use case / application of debouncing user input (where each character of input is delayed by at least 10 ms -- probably > 100 ms -- a delay of 0 seems utterly useless.
-
It looks like you accidentally passed resolve() (immediately invoking the function) directly to setTimeout rather than passing a function to invoke it. So it was being resolved immediately instead of after a 1000 ms delay as intended.
I guess this is the "immediately invoked function" problem.
Not to be confused with: immediately invoked function expression. (Since it is a regular named function and not a function expression.)
-
You should not create a new debounce function on every render with: return new Promise(resolve => { debounce(() => resolve(this.getIsNameUnique(name)), 2000); }); Instead you should just wrap your whole function isNameUnique with the debounce (see my sandbox). By creating a new debounce function on every hit, it cannot 'remember' that is was called or that is will be called again. This will prevent the debouncing.
-
-
stackoverflow.com stackoverflow.com
-
_.debounce creates a function that debounces the function that's passed into it. What your s.search function is doing is calling _.debounce all over again every time s.search is called. This creates a whole new function every time, so there's nothing to debounce.
-
I run s.search() by typing into an input box, and if I type gibberish very quickly, the console prints out "making search request" on every key press, so many times per second -- indicating that it hasn't been debounced at all.
-
they're not invoking the function that _.debounce returns
-
-
dylanvann.com dylanvann.com
-
When using React hooks there is no concept of onMount because the idea of only running some code on mount leads to writing non-resilient components, components that do one thing when they mount, and then don’t take prop changes into account.
-
- Sep 2020
-
-
Just throwing in <div class="{$$props.class || ''} otherChildClass"></div> seems the easiest, and it'll avoid undefined classes. I feel like many aren't noticing the undefined values getting inserted in their classes.
-
- May 2020
-
developers.google.com developers.google.com
-
Although it can minimize the overhead of third-party tags, it also makes it trivial for anyone with credentials to add costly tags.
-
- Apr 2020
-
github.com github.com
-
Remember to call super in any subclasses that override teardown.
And yet the Rails core chose not to use RSpec, citing how it would be too easy to write
subject == expected
on accident?
-
-
en.wikipedia.org en.wikipedia.org
-
the ordinal indicators should be distinguishable from superscript characters
-
frequent mistake is to confuse the degree sign U+00B0 (°) with the masculine ordinal indicator
-
- Jan 2020
-
www.red-gate.com www.red-gate.com
-
Please do not make the mistake of trying to reduce the HAVING clause with a little false relational algebra to: 1 HAVING COUNT(PS1.plane_name) = COUNT(H1.plane_name) because it does not work; it will tell you that the hangar has (n) planes in it and the pilot_name is certified for (n) planes, but not that those two sets of planes are equal to each other.
-