10,000 Matching Annotations
  1. Sep 2021
    1. Webpacker used to configure Webpack indirectly, which lead to a complicated secondary configuration process. This was done in order to provide default configurations for the most popular frameworks, but ended up creating more complexity than it cured. So now Webpacker delegates all configuration directly to Webpack's default configuration setup.

      more trouble than it's worth

      • creating more complexity than it cured
    1. Cut a dado groove with a 3/4” diameter router bit and you’ll almost certainly have a too-loose joint when you try to plug some 3/4” plywood in place. Under the guise of metrification, sheet material thicknesses have all shrank enough to cause problems with joinery if you rely on the old, Imperial thickness designations. And besides, material thickness varies enough from sheet to sheet that it can make a difference when it comes to prominent joinery. This is even true in the USA that still uses Imperial more or less exclusively. Sheet goods remain thinner than their name specifies.
    1. I first learned to love the functionality of Dave Thomas' annotate_models plugin (you can find a repo for it here). Later, when it became un-maintained and broke, I switched over to ctran/annoate. Then, when work on it waned and broke as well, I decided to write my own as an exercise.
    1. Quora+ is a subscription to the best of Quora.Access great writing, straight-from-the-source knowledge, and stories you can’t find anywhere else while supporting creators who matter to you.

      Another example of a service that tries to entice users with a free service (and writers with a financial incentive) and then once they achieve enough popularity, they make some of "their" content "premium".

      (YouTube Premium, ...)

      This is why we should distrust and avoid using "free" services.

    1. I find it much simpler to use a partition label with LABEL=.... It is shorter, easier to remember, and also has the advantage that should the partition go bad and need to be replaced you can create a new partition, give it the same label provided the old partition is either removed or at least changed to be unlabelled and fstab will never know the difference.
    1. But it is always important to remember that those are not language concepts. Those are community concepts that only exist in our heads and in the names of some library methods.

      I'm not sure about this. I get what he's saying and agree that singleton methods are nothing but a naming convention for the more fundamental/atomic construct called instance methods (which indeed are the only kind of method that exist in Ruby, depending how you look at it), but I think I would actually say that singleton methods are language concepts because those methods like Object#define_singleton_method, ... are always available in Ruby (without needing to require a standard library first, for example). In other words, I would argue that something belonging in the Ruby core "library" (?) by definition makes it part of the language -- even if it in turn builds on even lower-level Ruby language features/constructs.

    2. The question is similar but its in a Rails context. The solutions would answer my question, but I'm almost certain that he could probably leverage Arel to solve his problem. The question I posted was designed purely as a Ruby question so that it was easier to search for. You might want to suggest an edit of the title of his question because it didn't show up when I searched for a solution to my problem.
    3. Yes, unfortunately the other question has a misleading and completely irrelevant Rails context and might be harder to find for some people. IMHO, it's still a perfect content duplicate, although not a topic one. Answers are also equal. Anyways, still a good question of yours.
    1. I don't recommend the game, but since it is very inexpensive, you can try it for yourself and not be out a lot of money, so this review might not be necessary, but I'm writing it anyway because I have lots of thoughts that I don't see reflected in the first reviews I see on this first Store Page of Squidlit, although I haven't read every review, which would require a lot of time.

      :-)

    1. Remote Access is something that we are really excited about because it will allow our support team to give you a seamless and high level of support that is truly unmatched. When you need extra help, you can enable the Remote Access toggle with a single click. This will send a secure token to the Elegant Themes support staff that they can use to log in to your WordPress Dashboard. No passwords are shared and there is no need to send the token to our team yourself. It all works seamlessly in the background. While remote access is enabled, our team will be able to log in to your website and help explore whatever problems you are experiencing. You can even enable it preemptively before chatting with our support team so that we can jump right in if necessary. By default, our support staff will have limited access to your website using a custom WordPress support role. You can also enable full admin access if requested. Remote access is automatically disabled after 4 days, or when you disable Divi. You can also turn it off manually after an issue has been resolved, and of course, Remote Access can only be enabled by you, the website owner, and not by Elegant Themes or anyone else. The Remote Access system is wonderful because it saves tons of time during support chat, and it saves you the hassle of having to debug certain complicated issues yourself. It allows us to take a hands on approach to solving problems quickly, instead of wasting hours or days chatting back and forth.
    1. As criticisms go, “it was too addictive and I finished it in a few hours” isn’t exactly the worst thing you can say about a game. In fact, as someone who prefers quality over quantity,

      .

    1. Three days before Labor Day, on Friday, September 2, 1921, the U.S. Army intervened on the side of coal companies against striking coal miners, marking the end of the Battle of Blair Mountain in southern West Virginia. The battle was the climax of two decades of low-intensity warfare across the coalfields of Appalachia, as the West Virginia miners sought to unionize and mining companies used violent tactics to undermine their efforts. The struggle turned deadly.
    1. first sighting: A Forward link at bottom of an e-mail, which takes you here, which has a link to a preview (which is basically a web version of the e-mail that was sent).

      In some ways, this seems preferable over forwarding the original e-mail that you received using your e-mail client's forward feature. In particular:

      • It doesn't inadvertently include your personalized unsubscribe link, allowing the forwarded-to person to maliciously unsubscribe you without your consent.
    1. a class of attacks that were enabled by Privacy Badger’s learning. Essentially, since Privacy Badger adapts its behavior based on the way that sites you visit behave, a dedicated attacker could manipulate the way Privacy Badger acts: what it blocks and what it allows. In theory, this can be used to identify users (a form of fingerprinting) or to extract some kinds of information from the pages they visit
    1. If you are riding a bicycle, you can get through the roundabout two ways: Get off your bike and go through a crosswalk like a pedestrian, or ride around it like a vehicle.

      .

    1. But I realized after a lot of research that the problem was that I did not copy the right URL address from the iTunes API documentation. It should have been https://itunes.apple.com/search?term=jack+johnson. not https://itunes.apple.com/search?term=jack+johnson Notice the dot at the end There is a huge explanation about why the dot is important quoting issues about DNS and character encoding but the truth is you probably do not care. Try adding the dot it might work for you too. When I added the "." everything worked like a charm.
    1. When you are using postman they are not restricted by this policy. Quoted from Cross-Origin XMLHttpRequest: Regular web pages can use the XMLHttpRequest object to send and receive data from remote servers, but they're limited by the same origin policy. Extensions aren't so limited. An extension can talk to remote servers outside of its origin, as long as it first requests cross-origin permissions.
    1. The 2 stars this show received on average is really an inaccurate and lazy way to characterize the hard work of the cast and crew. The filmography is amazing and scenery beautiful, the characters are rich and complete, the people are beautiful. Few shows engage me, this one did.

      unfairly bad rating

    1. My pc and where i site when i watch netflix are not the same place, not at all.And thats beside the point, why in gods name does netflix feel the need to pause?It has a auto play function and a auto pause function that both can't be turned on or off, what the?
    1. According to Netflix, the Netflix app asks this question to prevent users from wasting bandwidth by keeping a show playing that they’re not watching. This is especially true if you’re watching Netflix on your phone through mobile data. Every megabyte is valuable, considering that network providers impose strict data limits and may charge exorbitant rates for data used on top of your phone plan. Advertisement tmntag.cmd.push(function(){tmntag.adTag('purch_Y_C_0_1', false);}); Of course, this saves Netflix bandwidth, too—if you fall asleep or just leave the room while watching Netflix, it will automatically stop playing rather than streaming until you stop it. Netflix also says this helps ensure you don’t lose your position in a series when you resume it. If you fall asleep in the middle of your binging session, you might wake up to find that several hours of episodes have played since you stopped watching. It will be difficult for you to remember when you left off.
    2. If you watch Netflix via the desktop website, one way to disable the prompt is by using a browser extension called “Never Ending Netflix” for Google Chrome.

      unofficial/fan-made extension

    1. my problem is that it doesn't ask you at the end of the previous episode, or even at the beginning of the current one. It waits to interrupt what you're watching

      bad UX

    2. I called Netflix and they told me that there was no option to change this. So I asked why? He told me that nobody was requesting this as a feature. So I said I'm requesting this feature the ability to select continuous play without the pause or a play all without any pauses. He says he would put in my request but so far nothing has been done. Then I asked if Netflix had a Feedback or Feature Request page he said their Facebook, Twitter, or to call Netflix and request it.

      how to submit feature request

  2. Aug 2021
    1. Without any active cooperation from those 3rd-party providers (like postMessage communication), I think inserting those iframes via JS is your only realistic option. Or to at least “trigger” them to load their actually content only after you had a chance to add your load handler - so you could keep <iframe src="about:blank" data-real-src="http://3rd.party/..."> in your HTML, and have a script coming after that switch out src for data-real-src after adding the load handler.

      .

    1. You cannot break security if you do not understand a system better than the people who made the system, and you cannot defend your organization if you do not understand how those systems work to the same degree.
    2. "Highly complex memorized secrets introduce a new potential vulnerability: They are less likely to be memorable, and it is more likely that they will be written down or stored electronically in an unsafe manner. While these practices are not necessarily vulnerable, statistically some methods of recording such secrets will be. This is an additional motivation not to require excessively long or complex memorized secrets."
    3. Forcing employees to use a complex password with special characters in it means everyone is just going to add an exclamation point at the end of their existing password. This is why your accounts payable clerk has a yellow sticky note on their cubicle wall with their password on it. They just want to get their job done, and you're making it harder for them with no discernible improvement to security.
    1. All answers here which mention scrollHeight/scrollWidth should be adjusted a bit to take body margins into account. Browsers apply default nonzero margins for documents' body element (and it's also applicable to content loaded into frames). The working solution I found is to add this: parseInt(window.getComputedStyle(this.contentDocument.body).margin.
    1. The most likely cause of this problem is having set the height of an element to be 100% of the page somewhere in your CSS. This is normally on the html or body elements, but it could be on any element in the page. This can sometimes be got around by using the taggedElement height calculation method and added a data-iframe-height attribute to the element that you want to define the bottom position of the page. You may find it useful to use position: relative on this element to define a bottom margin or allow space for a floating footer.
    1. With JavaScript, you can actually calculate the width of the scrollbar and whether it’s visible by comparing two properties—window.innerWidth and document.body.clientWidth. If these are equal, the scrollbar isn’t visible. If these are different, we can subtract the body width from the window width to get the width of the scrollbar:const scrollbarWidth = window.innerWidth - document.body.clientWidthWe’ll want to perform this both on page load and on resize, in case someone resizes the window vertically and changes the overflow. Then, once we have the scrollbar width, we can assign it as a CSS variable:document.body.setProperty("--scrollbarWidth", `${scrollbarWidth}px`)

      missing feature: vw/vh can't be used "directly" because doesn't account for scrollbars

    2. If width: 100% is your friend, then width: 100vw is the kid who only pretends to be your friend, so that he can swim in your pool. (I’ve never had a pool, but I know this kid exists from friends of mine who grew up with pools. Also, I am this kid)
    1. Also note thet width: 100% is relative to it's first parent with a layout. So if you have an element with width:100% inside another element that has a specific width, the child element will only take up the total width of that parent.
    1. An intrinsic ratio means an element will maintain its aspect ratio when resized. Think of an img with max-width: 100%. Change the width of its parent and it’ll change the size while keeping the same shape (aka. its aspect ratio).
    1. We would also like it if breaking changes were not made in a minor version update. If this breaking change is absolutely necessary, it should be made with TypeScript version 4.x, not in a minor version update. It's very notable that according to Dependabot, this version update saw an over 10% failure rate, despite being a minor update, when most other builds have less than 3%. Heck, even the 2.9.2 → 3.0.1 breaking change had a lower rate of failure than this one! Surely Microsoft can not consider that acceptable.
    1. I really hope they keep breaking it. Being the lead on a library for several years, most of the forced refactors were pretty straight forward and in almost every case made our code either more sound or easier to be consumed. Now I work on a runtime that embeds TypeScript and 3.5.1 has broken some code, thought it took me all of about 15 minutes to make the changes to adopt it, and in every case, it broke because we were being a bit loose with the types. While it didn't find any bugs, it made the code more "safe".

      I really hope they keep breaking it.

    2. The TypeScript team has made it clear. They do not follow semver. "minor" (X.X) releases can contain breaking changes. . The fact that someone has made a bad policy clear, does not mean that the policy is therefore good. Major releases (X) have very little meaning. This negates the usefulness of using such versioning in the first place.
    3. We'll sometimes need to make changes that can end up creating new type errors in existing programs - this is ultimately unavoidable, because for any change in the type system, including bug fixes, it's possible to construct a program that will have a type error introduced into it as a result.
    1. which seems to resolve the issue for me and makes no casts, ensuring that Typescript can keep doing its good job of widening as much as necessary and narrowing as much as possible without me having to claim I know better than the compiler. I'm posting it here since it doesn't seem to have been mentioned anywhere.

      makes no casts, ensuring that Typescript can keep doing its good job of widening as much as necessary and narrowing as much as possible without me having to claim I know better than the compiler.

    2. The above works great. However, the problem comes when I want to use literal types for my legal values. In my code, I want to do that so I can make sure I define a "handler" for every legal value: const legalValues = <const>["a", "b", "c"]; // later on... // Because legalValues entries are literal types, // I get a compiler error if I forget to define any behaviors const behaviors: { [K in typeof legalValues[number]]: any } = { a: something, b: somethingElse, c: anotherThing };
    1. Now consider we want to handle numbers in our known value set: const KNOWN_VALUES = Object.freeze(['a', 'b', 'c', 1, 2, 3]) function isKnownValue(input?: string | number) { return typeof(input) === 'string' && KNOWN_VALUES.includes(input) } Uh oh! This TypeScript compiles without errors, but it's not correct. Where as our original "naive" approach would have worked just fine. Why is that? Where is the breakdown here? It's because TypeScript's type system got in the way of the developer's initial intent. It caused us to change our code from what we intended to what it allowed. It was never the developer's intention to check that input was a string and a known value; the developer simply wanted to check whether input was a known value - but wasn't permitted to do so.
    1. I believe he wants to use the as const feature while still type checking that the structure matches an interface. A workaround I'd use for something like that would be interface ITest { a: number; b: string; } let foo = { a: 5, b: "Hello" } as const;
    1. function strictIsDog<T extends Dog extends T ? unknown : never>( // like <T super Dog> candidate: Dog | T // if Dog extends T then Dog | T is T ): candidate is Dog { // compiler recognizes that Dog | T can narrow to T return "bark" in candidate; } if (strictIsDog(animal)) {} // okay if (strictIsDog(dog)) {} // okay if (strictIsDog(mixed)) {} // okay if (strictIsDog(cat)) {} // error! // ~~~ <-- Cat is not assignable to Dog