37 Matching Annotations
  1. Oct 2024
  2. Aug 2024
  3. Jun 2024
  4. Dec 2023
  5. Mar 2023
    1. We can track price changed using GDP as well and we call this measure as GDP Deflator.

      Awkward sentence. :We may also track the impact of price changes using GDP. This form of measurement is referred to as the GDP Deflator."

  6. Apr 2022
  7. Jan 2021
    1. https://github.com/sveltejs/svelte/issues/1037#issuecomment-737872461

      Explanation (from https://github.com/sveltejs/svelte/issues/1037#issuecomment-739458005):

      @AlexGalays register is an action created and passed in from the parent node (Wrapper) which allows the child to register with it. Not builtin to svelte.

      That's very clever @PatrickG. Nice one. I was a bit confused when first looking at it to understand what was going on, but I think that will be a handy tool in the toolbox.

      But why do we need this? If we remove all use:register, it still toggles just fine. Seems the only benefit is that this allows cleanup.

  8. Dec 2020
    1. This creates an options object with a getter function for the passive property; the getter sets a flag, passiveSupported, to true if it gets called. That means that if the browser checks the value of the passive property on the options object, passiveSupported will be set to true; otherwise, it will remain false. We then call addEventListener() to set up a fake event handler, specifying those options, so that the options will be checked if the browser recognizes an object as the third parameter.
  9. Oct 2020
  10. Sep 2020
    1. Some Svelte component's allow you to bind to internal data which doesn't make too much sense outside of Svelte yet they often form an important part of the API. Instead I have added the option to use a watch* prop (similar to the on* prop). This also takes a callback function and recieves the value you wish to watch as its only argument. watchNumber={ n => setCount(n) } would watch the internal value number, when number changes the callback you passed to it would be executed receiving the new number value as its only argument. This may seem strange but many Svelte components are written to make use of this bind syntax, without it there is often a hole in the API leaving you unable to respond to internal state changes. You will probably want to control your state with React, this watch* prop is an escape hatch that allows you to pull out those internal values to use however you wish.
  11. Aug 2020
    1. Safari sends following order application/xml (q is 1) application/xhtml+xml (q is 1) image/png (q is 1) text/html (q is 0.9) text/plain (q is 0.8) \*/\* (q is 0.5) So you visit www.myappp.com in safari and if the app supports .xml then Rails should render .xml file. This is not what user wants to see. User wants to see .html page not .xml page.
  12. Jul 2020
    1. JSON parsing is always pain in ass. If the input is not as expected it throws an error and crashes what you are doing. You can use the following tiny function to safely parse your input. It always turns an object even if the input is not valid or is already an object which is better for most cases.

      It would be nicer if the parse method provided an option to do it safely and always fall back to returning an object instead of raising exception if it couldn't parse the input.

  13. May 2020
  14. Apr 2020
    1. chrome.declarativeContent.onPageChanged.removeRules(undefined, function() {

      I wonder if they could/should have made the API simpler -- or at least provide a simpler alias that both removes and adds removes, like replaceRules.

  15. Mar 2020
  16. Feb 2020
  17. Jan 2020
  18. Dec 2019
  19. Nov 2019
  20. developer.mozilla.org developer.mozilla.org
  21. Feb 2019
  22. Nov 2018
  23. Dec 2017
  24. Nov 2013
    1. Another issue to that should be addressed in order to raise wages and the standard of living is examining the status of the Canadian dollar.

      Awkward. Perhaps: "Another issue of raising wages and living standards is the status of the Canadian dollar."