29 Matching Annotations
  1. Oct 2020
  2. 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.
  3. 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.
  4. 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.

  5. May 2020
  6. Apr 2020
    1. The issue I see is that the browser agent might be smart enough to learn the autocomplete attribute and apply it next time it sees the form. If it does do this, the only way I can see to still get around the problem would be to dynamically change the autocomplete attribute value when the page is generated.
    2. Simply make your input readonly, and on focus, remove it. This is a very simple approach and browsers will not populate readonly inputs. Therefore, this method is accepted and will never be overwritten by future browser updates.
    1. We neglected to implement any form of partial export as well, which means that power users sometimes need to resort to silly things such as breaking up their export files by hand in order to have better success when importing
    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.

  7. Mar 2020
    1. More than two years later, one of those fixes is erasing gorillas, and some other primates, from the service’s lexicon. The awkward workaround illustrates the difficulties Google and other tech companies face in advancing image-recognition technology
  8. Feb 2020
  9. Jan 2020
  10. Dec 2019
    1. For those (like me) wondering why is the space needed, man bash has this to say about it: > Note that a negative offset must be separated from the colon by at least one space to avoid being confused with the :- expansion.
    1. This problem can also come up when you use npm link or an equivalent. In that case, your bundler might “see” two Reacts — one in application folder and one in your library folder. Assuming myapp and mylib are sibling folders, one possible fix is to run npm link ../myapp/node_modules/react from mylib. This should make the library use the application’s React copy.
    1. Sadly, generating .d.ts files isn't supported by the webpack integration (not sure if this is planned), and due to microsoft/TypeScript#29490 it requires a separate tsconfig.json file to make it all work:
  11. Nov 2019
  12. developer.mozilla.org developer.mozilla.org
    1. Using with is not recommended, and is forbidden in ECMAScript 5 strict mode. The recommended alternative is to assign the object whose properties you want to access to a temporary variable.
  13. Feb 2019
  14. Nov 2018
  15. Dec 2017
    1. Among the potential benefits are receiving a helpful treatment

      Not sure how to fix it, but it doesn't seem right.

  16. 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."