113 Matching Annotations
  1. Last 7 days
  2. Jun 2021
    1. Prettier intentionally doesn’t support any kind of global configuration. This is to make sure that when a project is copied to another computer, Prettier’s behavior stays the same. Otherwise, Prettier wouldn’t be able to guarantee that everybody in a team gets the same consistent results.
  3. May 2021
  4. Apr 2021
  5. Mar 2021
    1. I'd suggest there ought to be config to disable source maps specifically, and specifically for either CSS or JS (not alwasy both), without turning off debug mode. As you note, debug mode does all sorts of different things that you might want with or without source maps.
    1. # This behavior can be disabled with: # # environment.unregister_postprocessor 'application/javascript', Sprockets::SafetyColons

      but it appears to no longer be possible in latest version...

    1. The HTML5 form validation techniques in this post only work on the front end. Someone could turn off JavaScript and still submit jank data to a form with the tightest JS form validation.To be clear, you should still do validation on the server.
    1. Therefore client side validation should always be treated as a progressive enhancement to the user experience; all forms should be usable even if client side validation is not present.
    2. It's important to remember that even with these new APIs client side validation does not remove the need for server side validation. Malicious users can easily workaround any client side constraints, and, HTTP requests don't have to originate from a browser.
    3. Since you have to have server side validation anyways, if you simply have your server side code return reasonable error messages and display them to the end user you have a built in fallback for browsers that don't support any form of client side validation.
  6. Feb 2021
    1. We can ask timeout to try to stop the program using SIGTERM, and to only send in SIGKILL if SIGTERM didn’t work. To do this, we use the -k (kill after) option. The -k option requires a time value as a parameter.
    1. For this one we'll define a helper method to handle raising the correct errors. We have to do this because calling .run! would raise an ActiveInteraction::InvalidInteractionError instead of an ActiveRecord::RecordNotFound. That means Rails would render a 500 instead of a 404.

      True, but why couldn't it handle this for us?

    1. Flexbox's strength is in its content-driven model. It doesn't need to know the content up-front. You can distribute items based on their content, allow boxes to wrap which is really handy for responsive design, you can even control the distribution of negative space separately to positive space.
    1. There is one situation where iframes are (almost) required: when the contents of the iframe is in a different domain, and you have to perform authentication or check cookies that are bound to that domain. It actually prevents security problems instead of creating them. For example, if you're writing a kind of plugin that can be used on any website, but the plugin has to authenticate on another domain, you could create a seamless iframe that runs and authenticates on the external domain.
    1. I normally try to figure out if that's a good solution for the problem before resorting to iframes. Sometimes, however, an iframe just does the job better. It maintains its own browser history, helps you segregate CSS styles if that's an issue with the content you're loading in.
  7. Jan 2021
    1. Ubuntu also supports ‘snap’ packages which are more suited for third-party applications and tools which evolve at their own speed, independently of Ubuntu. If you want to install a high-profile app like Skype or a toolchain like the latest version of Golang, you probably want the snap because it will give you fresher versions and more control of the specific major versions you want to track.
    1. This is open-source. You can always fork and maintain that fork yourself if you feel that's warranted. That's how this project started in the first place, so I know the feeling.
    1. If components gain the slot attribute, then it would be possible to implement the proposed behavior of <svelte:fragment /> by creating a component that has a default slot with out any wrappers. However, I think it's still a good idea to add <svelte:fragment /> so everyone who encounters this common use case doesn't have to come up with their own slightly different solutions.
    1. I’m not a dev either, so no Ubuntu fork, but I will perhaps be forced to look at Debian testing, without some advantages of Ubuntu - but now that Unity is gone (and I deeply regret it), gap would not be so huge anymore…
    2. If folks want to get together and create a snap-free remix, you are welcome to do so. Ubuntu thrives on such contribution and leadership by community members. Do be aware that you will be retreading territory that Ubuntu developers trod in 2010-14, and that you will encounter some of the same issues that led them to embrace snap-based solutions. Perhaps your solutions will be different. .debs are not perfect, snaps are not perfect. Each have advantages and disadvantages. Ubuntu tries to use the strengths of both.
  8. Nov 2020
    1. I wouldn't use Flutter for web, mobile is good though.
    2. It's super promising for web apps, just maybe not for web pages. I went from React to Svelte to Flutter for my current app project, and every step felt like a major upgrade.Flutter provides the best developer experience bar none, and I think it also has the potential to provide the best user experience. But probably only for PWAs, which users are likely to install anyway. Or other self-contained experiences, like Facebook games. It does have some Flash vibes, but is far more suitable for proper app development than Flash ever was while still feeling more like a normal website to the average user. It won't be the right choice for everything, but I believe it will be for a lot of things.
    1. I hope @hperrin you're still alive to discuss about this and eventually for a pull request.
    2. @monkeythedev I am curious how do you "organize" your work - You forked https://github.com/hperrin/svelte-material-ui and https://github.com/hperrin/svelte-material-ui is not very active. Do you plan an independent project ? I hope the original author would return at some times, if not, i'll see
    3. Maybe @hperrin would be able to make an appearance and select a few additional maintainers to help out.
    1. If this PR merges and it has unforseen bugs / issues, I'm not sure anyone would have the time to jump in and fix it. So, that's why I'm being cautious about approving/merging it.
  9. Oct 2020
    1. You might think something like “don’t request the same resource thousands of times a day, especially when it explicitly tells you it should be considered fresh for 90 days” would be obvious, but unfortunately it seems not.
  10. Sep 2020
  11. Aug 2020
    1. Fix it, please, if it's incorrect.
    2. FWIW, I would have raised it earlier if I thought it would have made a difference.

      This is different from apathy; it's more like powerlessness.

    3. Can't upvote this enough. It is highly irritating to see language destroyed (and we wonder why kids bastardize the language..).
    1. my point is that using "into" in such a case is just as incorrect as using "inas" would be. The fact that people make mistakes doesn't change this.

      "Log in" is the only correct way to spell the verb, and the only way to be consistent with 1000s of other phrasal verbs that are spelled with a space in them.

      We don't need nor want an exception to the general rule just for "login" just because so many people have made that mistake.

  12. Jul 2020
    1. Matz, alas, I cannot offer one. You see, Ruby--coding generally--is just a hobby for me. I spend a fair bit of time answering Ruby questions on SO and would have reached for this method on many occasions had it been available. Perhaps readers with development experience (everybody but me?) could reflect on whether this method would have been useful in projects they've worked on.
  13. Jun 2020
  14. May 2020
  15. Apr 2020
    1. When you simply accept that "hacker" means "malicious security cracker", you give up the ability to use the term to refer to anything else without potential confusion.
  16. Dec 2019
    1. People cannot see exhaustive documentation and code examples on their own file system. They would have to visit the repository (which also requires an internet connection).
  17. Nov 2019
  18. Oct 2019
    1. “To measure the head, the height, etc., does not indeed mean that we are establishing a system of pedagogy, but it indicates the road which we may follow to arrive at such a system, since if we are to educate an individual, we must have a definite and direct knowledge of him.”

      This is obviously done incorrectly in schools nowadays, referring to the large class sizes and common core putting restrictions on mostly everything. This raises the question, though, does homeschooling produce a better pedagogy? Or is it dependent on the specific educator?

    2. But in spite of all these tendencies, Scientific Pedagogy has never yet been definitely constructed nor defined. It is something vague of which we speak, but which does not,[Pg 2] in reality, exist. We might say that it has been, up to the present time, the mere intuition or suggestion of a science which, by the aid of the positive and experimental sciences that have renewed the thought of the nineteenth century, must emerge from the mist and clouds that have surrounded it.

      It is interesting to think about the hugely varying ideas that restrict the existence of a Scientific Pedagogy. Not even those that oppose each other through a research standpoint, but also those that are constrained by religious beliefs.

  19. Sep 2019
    1. What if MobX did make assumptions on how your data is structured? What if it is opinionated? That is the curious case of Mobx state tree.
  20. Aug 2019
  21. Jul 2019
  22. Sep 2018
  23. Jun 2017
    1. 在过期时间前,资源缓存是有效的,反之则缓存失效。通过不停抛弃过期的缓存资源以保证资源的实时性。注意,旧的缓存不会被抛弃或者忽略;当发起一个针对旧缓存资源的请求时,会在请求头里带上If-None-Match用来判断缓存是否还有效。如果有效,服务端返回304(Not Modified)和空的body以节省一部分带宽。

      为何要有时效性:

      1. 空间有限
      2. 服务器可能有更新文件

      在缓存有效期过期前,不会去询问服务器资源是否有效..如果缓存过期,就会在请求头上带上If-None-Match来判断缓存是否依旧有效

  24. Jan 2017
  25. Dec 2016