245 Matching Annotations
  1. Jan 2024
    1. One way to potentially get around this is to have an object that simple holds a class and overrides the === operator to make case work properly:
  2. Dec 2023
  3. Nov 2023
    1. In development, I was able to reset the exponential cool down by removing the g_state cookie. One method for this might be to add a development-only "Clear Google One Tap Cookie" link that run an server-side action to remove the g_state cookie and then redirect back to the previous page.
  4. Sep 2023
    1. Note that the mere presence of this header causes premailer to be skipped, i.e., even setting skip_premailer: false will cause premailer to be skipped. The reason for that is that the skip_premailer is a simple header and the value is transformed into a string, causing 'false' to become truthy.

      They should fix this!

      lib/premailer/rails/hook.rb def skip_premailer_header_present? message.header[:skip_premailer] end

    1. # Note that it could be in `args.first`, or in `kwargs[:id]` now, so it is either this: def initialize(*args, **kwargs) if !args.empty? args[0] = args[0].to_i elsif kwargs.key?(:id) kwargs[:id] = kwargs[:id].to_i end super(*args, **kwargs) end
    1. For me, I don't have an issue, but there was one syntax situation I found awkward: I need to sometimes know whether it is a class or a module that I am modifying. So I may have code: module Foo module Bar class Baz versus: class Foo::Bar::Baz It's not a huge issue, but ruby would yield an error if I specify a class or module incorrectly (which can happen if you spread code out into different .rb files, so I understand why there is an error message shown, to avoid accidents). But I then also wondered why I have to care whether it is a module or class, if my primary goal is to modify something, such as by adding a method. If I want to add a method: def foobar; end then I really should never be required to have to know whether I am modifying a class or a module.
  5. Aug 2023
    1. While this works, it’s not a great developer experience. In development, we don’t always know ahead of time all the packages that need to be linked. Or keep track of the previously linked packages.This confusing behavior compounds to the poor usability and predictability of npm link.
    1. I find the use of the term “session” within integration tests a bit unfortunate (open_session, etc), since there are also these session objects, which are however different. Maybe replace by “user_session” ?
  6. May 2023
  7. Mar 2023
    1. Is there anyway around the 1 yr limit ? I have been a google user for 10+ years and recently was going to move from Australia to America and as such updated my location. The move however didnt work out and now back in Australia I am unable to access many of the local apps due to my location being locked to the US.
  8. Jan 2023
  9. Dec 2022
    1. I understand that multiple -f options fits almost the bill, but it doesn't always work. For example, I rather often change the name of the abstract service into something that is more meaningful in the context of the project at hand. This is something that the overriding that occurs with multiple -f options does not support.
  10. Nov 2022
  11. Oct 2022
    1. First and foremost, we need to acknowledge that even though the funding goal has been met–it does not meet the realistic costs of the project. Bluntly speaking, we did not have the confidence to showcase the real goal of ~1.5 million euros (which would be around 10k backers) in a crowdfunding world where “Funded in XY minutes!” is a regular highlight.

      new tag: pressure to understate the real cost/estimate

    1. what fixed my issue was: remove the node-sass from package.json npm install install it again in latest version via npm install --save-dev node-sass if you find this helpful, I assume you just need to upgrade your node-sass for the latest version because it uses node-gyp as a lower version.
  12. Sep 2022
    1. I ended up using a really poor hack, in my package.json, scripts: { ... "prebundle": "openapi bundle -o src/openapi.preprocessed.json spec/openapi.yaml --force --config .redocly.pre-processor.yaml 2>/dev/null && echo 'warning: errors from pre-processing step have been supressed'", "bundle": "openapi bundle -o src/openapi.json src/openapi.preprocessed.json ... }
    1. This specification reserves the use of one URI as a problem type: The "about:blank" URI [RFC6694], when used as a problem type, indicates that the problem has no additional semantics beyond that of the HTTP status code. When "about:blank" is used, the title SHOULD be the same as the recommended HTTP status phrase for that code (e.g., "Not Found" for 404, and so on), although it MAY be localized to suit client preferences (expressed with the Accept-Language request header). Please note that according to how the "type" member is defined (Section 3.1), the "about:blank" URI is the default value for that member. Consequently, any problem details object not carrying an explicit "type" member implicitly uses this URI.

      annoying limitation

      have to come up with unique (and unchanging?) URIs up front

      otherwise (if type is omitted), this restrictive "about:blank" URI is assumed by default

  13. Aug 2022
    1. The custom title bar has been a success on Windows, but the customer response on Linux suggests otherwise. Based on feedback, we have decided to make this setting opt-in on Linux and leave the native title bar as the default. The custom title bar provides many benefits including great theming support and better accessibility through keyboard navigation and screen readers. Unfortunately, these benefits do not translate as well to the Linux platform. Linux has a variety of desktop environments and window managers that can make the VS Code theming look foreign to users.
  14. Jun 2022
    1. This actually is possible with JavaScript, though browser support would be spotty. You can use XHR2 to download the file from the server to the browser as a Blob, create a URL to the Blob, create an anchor with its href property and set it to that URL, set the download property to whatever filename you want it to be, and then click the link. This works in Google Chrome, but I haven't verified support in other browsers. window.URL = window.URL || window.webkitURL; var xhr = new XMLHttpRequest(), a = document.createElement('a'), file; xhr.open('GET', 'someFile', true); xhr.responseType = 'blob'; xhr.onload = function () { file = new Blob([xhr.response], { type : 'application/octet-stream' }); a.href = window.URL.createObjectURL(file); a.download = 'someName.gif'; // Set to whatever file name you want // Now just click the link you created // Note that you may have to append the a element to the body somewhere // for this to work in Firefox a.click(); }; xhr.send();
    1. Needing to use ruby2_keywords explicitly for delegation is unfortunate, I wish there would be a more natural way to express delegation in Ruby 2.7. Unfortunately there is not.
  15. Apr 2022
    1. This inflector is like the basic one, except it expects lib/my_gem/version.rb to define MyGem::VERSION.

      really? just for that? that's an unfortunate exception

    1. In Rails, this is known as nested layouts, and it is a bit awkward to use. The standard Rails practice for nested layouts is complicated and involves these considerations:
  16. Mar 2022
    1. I realize this isn't an ideal solution - but seems to be the truth to the issue. The only relevant solution I could muster is actually a hack, create a script that executes an infinite while loop that just replaces the Primary Selection with a null value.
    1. In 1994, The Unix-Haters Handbook was published containing a long list of missives about the software—everything from overly-cryptic command names that were optimized for Teletype machines, to irreversible file deletion, to unintuitive programs with far too many options. Over twenty years later, an overwhelming majority of these complaints are still valid even across the dozens of modern derivatives. Unix had become so widely used that changing its behavior would have challenging implications. For better
  17. Feb 2022
    1. In addition, a component that uses Svelte's built in event forwarding system cannot allow event listeners on the "capture" phase of the event lifecycle. It also cannot allow events to be cancelable with the browser's built in preventDefault function.
  18. Jan 2022
  19. Dec 2021
  20. Nov 2021
    1. the snap-based chromium cannot access files on my separately-mounted /opt filesystem. The non-snap chromium has no such limitation. Until or unless the snap version ever is able to access all the filesystems on my device, I am willing to live with the risk of a PPA-based version.
    1. As soon as I installed a Chrome deb everything worked.sudo dpkg -i \~/Downloads/google-chrome-stable\_current\_amd64.deb It's unfortunate that that's the only way I could get it to work.
    1. Zen Magnets founder Shihan Qu prepares high-powered magnet balls for destruction at the Metal Treating & Research Co. in Denver on April 26. A federal judge ordered Qu to eliminate the magnets as part of a long-running battle over the magnets' safety.
  21. Sep 2021
    1. I honestly believe that if more people aren't aware of these issues, Firefox for Android might soon end up dying a slow, painful death as its users give up in frustration and leave for better web browsers.
  22. Aug 2021
    1. I know, I know—needing to use JavaScript when writing CSS does feel like defeat, but unless there’s a vwWithoutTheScrollbarPlease unit in CSS, you’re going to need use JavaScript.
    2. Maybe someday, we’ll get a viewport unit that doesn’t factor in the scrollbars, but until then, we can only work around the current one.
    1. You can add event modifiers with the on:click$preventDefault$capture={handler} syntax. If you use Svelte's native on:click|preventDefault={handler} syntax, it will not compile. You have to use "$" instead of "|". (The extra S inside the | stands for SMUI.)

      How does it do that? I didn't think components could introspect to see which event handlers were added by the calling component?!

      Does it actually somehow generate an event named something like click$preventDefault$capture? I still don't get how that would work.

    1. If your code doesn’t have to run on Ruby 2.6 or older, you may try the new style in Ruby 2.7. In almost all cases, it works. Note that, however, there are unfortunate corner cases as follows:
  23. Jul 2021
    1. direnv is not loading the .envrc into the current shell. It’s creating a new bash sub-process to load the stdlib, direnvrc and .envrc, and only exports the environment diff back to the original shell. This allows direnv to record the environment changes accurately and also work with all sorts of shells. It also means that aliases and functions are not exportable right now.
    1. This cache has a small trade-off! If we request a list of data, and the API returns an empty list, then the cache won't be able to see the __typename of said list and invalidate it.

      That's one big caveat!

  24. Jun 2021
    1. In mutations, when errors happen, the other fields may return nil. So, if those other fields have null: false, but they return nil, the GraphQL will panic and remove the whole mutation from the response, including the errors!
    2. In order to have the rich error data, even when other fields are nil, those fields must have null: true so that the type system can be obeyed when errors happen.
    1. Use this to build a ClassAdder component. ClassAdder components are useful for reducing the size of your bundle. If you have tons of simple components that just need to add classes/props or set a context, using ClassAdder components means there's only one "big" Svelte component in your bundle for all of these many tiny components.
    2. This is useful when you need to add classes to a component, since Svelte's "class:" directives don't work on components.
    1. That’s not the only way of writing end-to-end tests in Rails. For example, you can use Cypress JS framework and IDE. The only reason stopping me from trying this approach is the lack of multiple sessions support, which is required for testing real-time applications (i.e., those with AnyCable 😉).
  25. May 2021
    1. Unfortunately one can only buy the standard or the soundtrack version, without any chance to upgrade, to buy the DLC extra. In this case I can only say if you get the game on a good sale (75 percent or more) and collect music, or if you want to support the developer, you might want the soundtrack edition.
    1. However, the place where pip places that package might not be in your $PATH (thus requiring you to manually update your $PATH afterwards), and on windows the pip install might not take care of python-specific issues for you (see "Notes for Windows Users", above). As such, installation via package managers is recommended instead.
    2. If your python3 executable is named "python" instead of "python3" (this particularly appears to affect a number of Windows users), then you'll also need to modify the first line of git-filter-repo to replace "python3" with "python".
    1. The simple problem that I see with fragment identifiers is that their existence and functionality relies completely on the developer rather than the browser. Yes, the browser needs to read and interpret the identifier and identify the matching fragment. But if the developer doesn’t include any id attributes in the HTML of the page, then there will be no identifiable fragments. Do you see why this is a problem? Whether the developer has coded identifiers into the HTML has nothing to do with whether or not the page actually has fragments. Virtually every web page has fragments. In fact, sectioning content as defined in the HTML5 spec implies as much. Every element on the page that can contain content can theoretically be categorized as a “fragment”.

      at the mercy of author

    1. You may have noticed your emails looking a little cramped in Hotmail and Outlook.com recently. The culprit? Discontinuation of support for the margin property in these email clients. Rather than honoring your carefully spaced paragraphs and images, Hotmail and Outlook.com are now completely stripping margin from paragraph tags, leaving default values (0 for the top, right and left; 1.35em for the bottom, to be exact) in their place.
  26. Apr 2021
    1. Been seeing this comment copy/pasted everywhere it's pathetic what people will do for thumbs up/awards on reviews, be original and make your own review. If you guys need proof go and look at NVL reviews, I saw it on another game a few weeks ago too.

      annoying

    1. I don't know why but they just removed some featuresAt first, you can't play this with your friend online except waiting for random matchingYou can't invite your friends to your closed room and play togheter
    1. (Ideally the run-time library would treat a pipe in the same way as a console, but it seems that most don't.)

      Often/usually treating a pipe/redirect differently is in fact what you want.

      Like if you output to a file, you don't necessarily want colors or real-time progress/status outputted along with it: you want just the bare data to be saved, which can then be filtered in useful ways with other standard tools like grep and sed.

    1. It's really kind of sad that I want to play the game and form a better opinion of it and I can't because I have to wait for lives to regenerate.
    1. As of Jan 1, 2021 many countries now require KS creators to show Shipping AND VAT/Fees/Taxes on Kickstarter Rewards - not just 1 price for "shipping". So we will do that in our Pledge Manager, after the campaign. Yea, we know...this sucks and is against everything Kickstarter used to be about (the world now views KS as a store, not as a creative platform sending rewards to backers for helping bring the vision to life)
    1. The default fill_in method of Capybara is case sensitive. This is apparently due to their use of XPath. Anyhow, this seems to not be very well aligned with the entire idea of DSLs and letting non programmers write tests.

      not very well aligned

    1. I love puzzles.I love detective games.I love story rich adventures.I love point and click games.Somehow this title FAILED in all four departments.The gameplay is Painfully broken.
  27. Mar 2021
    1. To the consternation of some users, 3.x employed Unicode variable names such as λ, φ, τ and π for a concise representation of mathematical operations. A downside of this approach was that a SyntaxError would occur if you loaded the non-minified D3 using ISO-8859-1 instead of UTF-8. 3.x also used Unicode string literals, such as the SI-prefix µ for 1e-6. 4.0 uses only ASCII variable names and ASCII string literals (see rollup-plugin-ascii), avoiding encoding problems.
    1. I confirm that since version 4.0.0 of sprockets, a single line directive is breaking the source maps and the javascript debugging system by consequence.
    1. Notice that the HTML elements (BUTTON, DIV, etc.) are in CAPS. We know this is bending the standard Ruby style rules slightly, but we think it reads better this way.
    1. This is a huge disadvantage to all web developers. Why can't we at least have the ability to turn validation messages off? Why do we have to re-implement a validation system when you already have one in place, but all we want is the validation aspect and not the built in messaging? By taking away the ability to style elements that CHROME adds to the browser window, it is hurting developers professional appearance. We just want to use Chrome's WONDERFUL validation system with our own error messages. Either let us style them, or let us hide them, but don't make us re-invent the wheel just because you don't want our code to be "browser specific". Writing a new validation system just for Chrome is going to be much more "browser (chrome) specific" code than setting "::-webkit-validation-bubble, ::-webkit-validation-bubble * { display: none; }. This isn't just an annoyance, it's a huge disadvantage to any developer who wants to easily utilize Chrome's built in validation. I usually brag about how wonderful Chrome is, but I'm starting to think it's heading in another direction...

    1. The input is required and initially empty, so on page load the input is :invalid and border is red. :( :(The input is :invalid until you type a legit email address, so it is red when typing. :( :(Ok, so the :invalid pseudo selector is kind of useless. Ideally we would not show an error up front or the whole time they are typing, just when they submit something unacceptable.
    1. I used this in the console to find the file and the line of the error (took it from this answer): JS_PATH = "app/assets/javascripts/**/*.js"; Dir[JS_PATH].each do |file_name| puts "\n#{file_name}" puts Uglifier.compile(File.read(file_name)) end

      Didn't work for me because it was actually a .coffee file.

      So I tried something similar with this:

      main > Dir["*/assets/javascripts/**/*.coffee"].each { |file_name| puts "\n#{file_name}"; Sprockets::CoffeeScriptProcessor.(filename: file_name, data: File.read(file_name), cache: {}); }
      
      app/assets/javascripts/bootstrapped.js.coffee
      NoMethodError: undefined method `config' for nil:NilClass
      from /home/tyler/.gem/ruby/2.7.1/gems/sprockets-4.0.2/lib/sprockets/source_map_utils.rb:40:in `format_source_map'
      

      but it wasn't as trivial to provide the necessary environment that Sprockets wants.

      But that's okay, when better_errors paused on the exception, I just jumped to the

      block in Sprockets::CoffeeScriptProcessor.call
      sprockets (4.0.2) lib/sprockets/coffee_script_processor.rb, line 24
      

      frame and evaluated

      input[:filename]
      

      to figure out which file had failed.

      Obviously this information should be part of the error message itself though!!

    1. This game runs on Flash. Effective Jan. 12, 2021, Adobe (the company that made Flash) began blocking its use everywhere. This is unfortunate, but outside of Kongregate's control.
  28. Feb 2021
    1. Because the Berne Convention in most countries by default grants copyright holders monopolistic control over their creations, copyright content must be explicitly declared free, usually by the referencing or inclusion of licensing statements from within the work.
    1. I have a Post object that has_one :schedule with accepts_nested_attributes_for :schedule as well. The latter method sets autosave: true, which unfortunately has the effect of hoisting up errors into the parent object so that the errors object on Post looks like this: (byebug) post.errors.details {:"schedule.publish_at"=>[{:error=>:blank}]}
    2. The Rails side doesn't support any handling of these nested attribute names in the error yet it generates them from somewhere.
    1. Set your models free from the accepts_nested_attributes_for helper. Action Form provides an object-oriented approach to represent your forms by building a form object, rather than relying on Active Record internals for doing this.

      It seems that the primary/only goal/purpose was to provide a better alternative to ActiveRecord's accepts_nested_attributes_for.

      Unfortunately, this appears to be abandoned.

    1. With the introduction of CPUs which ran faster than the original 4.77 MHz Intel 8088 used in the IBM Personal Computer, programs which relied on the CPU's frequency for timing were executing faster than intended. Games in particular were often rendered unplayable. To provide some compatibility, the "turbo" button was added. Engaging turbo mode slows the system down to a state compatible with original 8086/8088 chips.
    1. it's just a shame that there's no online or split-screen multiplayer, which seems like a major oversight to us; local play between Switch system is possible, but could prove to be a logical nightmare.
    1. My only concern with this approach is that if someone calls #valid? on the form object afterwards, it would under the hood currently delete the existing errors on the form object and revalidate. The could have unexpected side effects where the errors added by the models passed in or the service called will be lost.
    2. My concern with this approach is still that it's somewhat brittle with the current implementation of valid? because whilst valid? appears to be a predicate and should have no side effects, this is not the case and could remove the errors applied by one of the steps above.
    1. More and more, Im seeing this "retro graphics" (aka - lazy cash in.) money grab titles that are completely broken or absolutely terrible.. and they're RAPIDLY flooding the Switch like flies to horse dung. With no real reliable independent reviews of Indie titles available (Even MetaCritic is blank for at LEAST 70% of these indie garbage games..) players are left with no recourse but to flush hard earned cash on what is essentially a non-refundable gamble.
    1. Dask is an amazing tool, and this book is fine for a introduction of dask data structures but little else. This book follows a rather unfortunate trend -- try to both cover the basic elements of 'data science' as well as serve as a tutorial to a software platform.
    1. But the circle on its own doesn’t seem to be available as a nonspacing diacritic in Unicode. Bugger.
    1. That won't work if the external content is on another site due to same origin policy. In some obscure cases, the remote site might support JSONP; but probably not.
    1. That fact that I am giving this little indie gem it's first review more than two full weeks after it launched shows the sad state on Steam of how the over saturation of asset flips and low effort garbage buries little treasures like this game.
    1. Similarly to a cell phone setup, you prepay your email quota. Although they famously used to offer credits that ‘never expired’, new changes mean that credits now expire after 12 months (or, if purchased before May 15th 2019, they’ll expire on May 15th 2020).
  29. Jan 2021
    1. Just as the user above said, Gmail is removing all css styles throughout the body, and removing all css styles in the head tag. Their own documentation says this should work but it's not working at all. I've wasted 6 hours trying to make this work.
    1. Bordering an element with a single repeating image is something that seems like it should be easy with a property called border-image, but the process for actually doing that is somewhat counter-intuitive. Let’s say, for example, that you want to border an element with a repeating heart icon. You can’t do that with a image of a single heart. Instead, you have to make an image of a “frame” of hearts arranged as you’d like them to appear in the border, then slice that image. <img sizes="(min-width: 735px) 864px, 96vw" src='https://i2.wp.com/css-tricks.com/wp-content/uploads/2013/01/enlarged-border-image-slice.png' alt='' data-recalc-dims="1" />Eight hearts in a “frame” image, enlarged to show detail. The red lines indicate slices. If you think that sounds preposterous, you’re in good company. There was a lengthy discussion of the subject on Eric Myer’s blog a few years ago where many frontend development greats weighed in.
    1. It won't work if $HOME is not under /home. Really. Not even if you softlink. You need a bind mount
    2. The past few years seems to have be a race between Microsoft and various players in the Linux world to see who can produce the worst abomination of a UI. It's as if there's been a ritualistic burning of the UI design rule book that led to many years of largely stable and consistent user experience across all platforms
    1. Note that that browser support for these values is nuanced. For example, space-between never got support from some versions of Edge, and start/end/left/right aren’t in Chrome yet
    1. // read-only, but visible to consumers via bind:start export let start = 0;

      Can't do

      export const start = 0
      

      (because it needs to be mutable/assignable within this local component), so we have to do

      export let start = 0
      

      with a comment saying that it's read-only (by the consumer).

    1. just writing in that the example code doesn't work on the REPL... perhaps because it tries to load CSS? I am not sure, but it says “Unexpected token (Note that you need plugins to import files that are not JavaScript)”.
    1. In my opinion, it can sometimes look odd. Very interestingly, this is by design and is part of the Material design specification. This article isn’t to argue whether it should be this way or not, though; it’s just to change yours such that your MenuItem(s) show below the menu selection, like so:
    1. (Note that it is not possible to grant access to multiple specific sites, nor use a partial wildcard match. It is also not possible to specify more than one Access-Control-Allow-Origin header.)
    1. But the draconican policies surrounding custom levels absolutely kill it.Any sort of creativity and innovation is crushed instantaneously because it's "not a verified song".
    1. the origin: because some ~paranoic~ people a[download] is ignored when the target is in other origin. Example: open this old project of mine in Firefox and click the download link (“can be downloaded”). Even if the downloaded file is a HTML file (which Firefox can render natively) it triggers the download. Note that Chrome is going to follow the same behavior as Firefox.
  30. Dec 2020
    1. Yarn only runs the postinstall hook after yarn and yarn add, but not after yarn remove. The postinstall-postinstall package is used to make sure your postinstall hook gets executed even after a yarn remove.
  31. Nov 2020
    1. If I use import { createEventDispatcher } from 'svelte/internal'; instead of import { createEventDispatcher } from 'svelte'; then it seems to work because it's loading from the same module.
    1. It is sad that GNU/Linux have no such a device as /dev/clipboard, and forces to install either xclip either gpm which is missing by default
  32. Oct 2020
    1. Yet we receive a surprisingly large number of requests for such resources: up to 130 million requests per day, with periods of sustained bandwidth usage of 350Mbps, for resources that haven’t changed in years.
    1. The other module on npm that I found to do this

      Too bad https://www.npmjs.org/package/is-plain-object was taken and this library had to resort to is-pojo yuck acronym. is-plain-object is a much better name.

    1. However, objects are generally easier to work with than maps, because not all JavaScript functions, frameworks, and libraries support maps. For example, the JSON.stringify() function doesn't serialize maps by default.
    1. Don’t indent code blocks.

      Sure, we don't need to add any additional indent. But what if your code block contains indentation (function body)? It would look silly to remove all leading indentation.

    1. Sometimes unfortunately you have to point out what about other libraries visions does not fit with your goals to ultimately lay the question to rest.
    2. There was a Q & A at the end of one of his talks where someone asks about Inferno, an incredibly performant VDOM library, and he sort of just side steps it. It's unfortunate.
    1. However, it only serves as a hint, and doesn’t guarantee the computation won’t re-run. But sometimes you need to be sure an object is only created once.

      This lack of guarantee has led to: https://github.com/Andarist/use-constant (and the useConstant defined in react-final-form-arrays/src/useConstant.js)

  33. Sep 2020
    1. Currently, I can only do this with some ugly JS, by wrapping the <slot> in a div and then selecting all direct children of that div (div>*). But this fix/solution also makes me face a problem: The <div> partially destroys the layout/design compared to when not using that div wrapper.
    1. props does not update in real time. You can try console.log(values.firstName) inside the validate function to confirm this. To get around this my way is quite a hack, just add key = {values.firstName} to Field component like this
    1. Svelte offers an immutable way — but it’s just a mask to hide “assignment”, because assignment triggers an update, but not immutability. So it’s enough to write todos=todos, after that Svelte triggers an update.
    1. I edited the post twice to remove the broken link /react-js-the-king-of-universal-apps/ (with the edit-comments clearly mentioning that it is a broken link), but the peers have rejected the edit both the times. Can someone guide me what's wrong in editing an answer and removing a broken link?
    2. And, yes, Mounting is also an unfortunate/confusing name, if you ask me. IMHO componentDidRender and componentWillRender would be much better names.
    3. I took the liberty of editing this answer because it's already accepted
    1. In mapbox.js you'll see this line: const key = {};We can use anything as a key — we could do setContext('mapbox', ...) for example. The downside of using a string is that different component libraries might accidentally use the same one; using an object literal means the keys are guaranteed not to conflict in any circumstance (since an object only has referential equality to itself, i.e. {} !== {} whereas "x" === "x"), even when you have multiple different contexts operating across many component layers.
    1. Force everything to the git root per NPM lameness
    2. For a non-monorepo package you can simply point directly to the Github repo. This case is similar, but you want to scope it just to a single package within the repo. For those that make monorepos they don't necessarily need this feature. It's for those that use projects that use monorepos. Telling them to not organize their projects into monorepos doesn't help people who make use of these projects.
    3. npm's inability to handle monorepos then i'd have designed my repos accordingly
  34. Aug 2020
    1. I could add .json on the end, but that would mean hacking away at angularjs, which is doing the right thing. I would rather find a good solution and hack away at rails, which is doing the wrong thing :)
    2. In that case I would suggest to use .xml or .json format to eliminate accept header parsing issue.

      Avoid using a perfectly good feature (accept header negotiation) just because browsers screwed things up?

    3. 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.
  35. Jul 2020
    1. Oracle didn’t seem very interested in OpenOffice.org, and the community of volunteers developing it formed The Document Foundation back in 2010. They called on Oracle to participate and donate the OpenOffice.org name and brand to the community. Oracle never did, and the resulting forked office suite has been named LibreOffice since then.
    2. Yes, there are two big open-source office suites. Blame Oracle. Sun controlled the OpenOffice.org project, and Oracle acquired control of it when it purchased Sun back in 2010.
    3. Developers have almost all moved to LibreOffice, the spiritual successor to OpenOffice. But OpenOffice continues to be operated as its own project, seeing little development and only drawing potential LibreOffice users to a defunct piece of software.
    4. In 2011, Oracle laid off OpenOffice’s paid developers and donated the OpenOffice software to the Apache Foundation, rather than The Document Foundation. It’s remained there since, a project in slow but steady decline.
    1. This works as expected (using r for making it an exact Rational): p Time.utc(2007, 11, 1, 15, 25, 0, 123456.789r) # => 2007-11-01 15:25:00.123456789 UTC
    2. These seem to be better reasons to support sub-nanosecond resolution. I think either storing picoseconds or storing sec fraction as 64-bit integer are better approaches than storing a rational. However, either change would be very invasive, and it seems unlikely to be worth the effort.
    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.

    1. In the Set class we already called this - and difference, which it is ok but not really accurate because of the previous explanation, but probably not worthwhile to change it.

      Is this saying that the name difference is inaccurate?

      Why is it inaccurate? You even called it the "theoretic difference" above.

      Is that because "relative complement" would be better? Or because the full phrase "theoretic difference" [https://en.wiktionary.org/wiki/set-theoretic_difference] is required in order for it to be accurate rather than just "difference"?

    1. VII, after the map block, consider arr.each_with_object([]) do |(converted_val, orig_val),uniques|...end.
    2. Creating and calling a default proc is a waste of time, and Cramming everything into one line using tortured constructs doesn't make the code more efficient--it just makes the code harder to understand.

      The nature of this "answer" is a comment in response to another answer. But because of the limitations SO puts on comments (very short length, no multi-line code snippets), comment feature could not actually be used, so this user resorted to "abusing" answer feature to post their comment instead.

      See

  36. Jun 2020