94 Matching Annotations
  1. Sep 2021
    1. hen patients are asked how their sleep problems started, they’ll typically mention some “stressful event or a big change in their life as a thing that sort of got them off track,” Martin said. “Short-term insomnia is how long-term insomnia starts.”

      to the fact that everything was closing everyone's world got turned around.

    2. The pandemic made matters worse. In one study conducted across 49 countries in March and April 2020, 40 percent of people said their sleep was worse than before the pandemic. Participants’ use of sleeping pills increased by 20 percent.

      in my option they should turn off the new.

  2. Aug 2021
    1. some 60% of all single-stock options trading recently has been in those with less than two weeks until expiration, compared with 45% at the start of 2020

      One way to identify retail investors

  3. Jul 2021
  4. Jun 2021
    1. We should think about the number of simultaneous connections (peak and average) and the message rate/payload size. I think, the threshold to start thinking about AnyCable (instead of just Action Cable) is somewhere between 500 and 1000 connections on average or 5k-10k during peak hours.
      • number of simultaneous connections (peak and average)

      • the message rate/payload size.

    1. while (( "$#" )); do case "$1" in -a|--my-boolean-flag) MY_FLAG=0 shift ;; -b|--my-flag-with-argument) if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then MY_FLAG_ARG=$2 shift 2 else echo "Error: Argument for $1 is missing" >&2 exit 1 fi ;; -*|--*=) # unsupported flags echo "Error: Unsupported flag $1" >&2 exit 1 ;; *) # preserve positional arguments PARAMS="$PARAMS $1" shift ;; esacdone# set positional arguments in their proper placeeval set -- "$PARAMS"
  5. May 2021
    1. Also, it is definitely NOT okay to recommend --force on forums, Q&A sites, or in emails to other users without first carefully explaining that --force means putting your repositories’ data at risk. I am especially bothered by people who suggest the flag when it clearly is NOT needed; they are needlessly putting other peoples' data at risk.
  6. Apr 2021
    1. There's nothing to stop you from doing initializer code in a file that lives in app/models. for example class MyClass def self.run_me_when_the_class_is_loaded end end MyClass.run_me_when_the_class_is_loaded MyClass.run_me... will run when the class is loaded .... which is what we want, right? Not sure if its the Rails way.... but its extremely straightforward, and does not depend on the shifting winds of Rails.

      does not depend on the shifting winds of Rails.

  7. Mar 2021
    1. I don't use remote editing much so vim-dirvish is powerful enough to manage my workflow (It's actually faster than netrw ~ the author claims 2x, I feel it's faster than that - it's really instantaneous ⚡) very useful on large codebase/repositories
    2. I was searching for a solution to this problem too since I actually removed netrw from being loaded in vim completely and replace it with vim-dirvish. This plugin has around 500~ LOC, compared to netrw's (11,000+ LOC).
    1. The elimination of what is arguably the biggest monoculture in the history of software development would mean that we, the community, could finally take charge of both languages and run-times, and start to iterate and grow these independently of browser/server platforms, vendors, and organizations, all pulling in different directions, struggling for control of standards, and (perhaps most importantly) freeing the entire community of developers from the group pressure of One Language To Rule Them All.
    2. JavaScript needs to fly from its comfy nest, and learn to survive on its own, on equal terms with other languages and run-times. It’s time to grow up, kid.
    3. If JavaScript were detached from the client and server platforms, the pressure of being a monoculture would be lifted — the next iteration of the JavaScript language or run-time would no longer have to please every developer in the world, but instead could focus on pleasing a much smaller audience of developers who love JavaScript and thrive with it, while enabling others to move to alternative languages or run-times.
    1. Maybe it would be simple to always add that line, and always shift the source maps by 1.
    2. This semi-colon is added to prevent changing the code behaviour (the famous line ending with parentheses, etc) Most people will use a JS minifier If they don't, a single extra character is unlikely to change much If I'm right about all the above: Why don't we simply always add a semi-colon regardless of what the file ends with?
    1. I’d say if the form is short and an obvious pattern (like sign up or log in), you could use the placeholder visual pattern, but use real labels instead.
  8. Feb 2021
    1. but if you were previously using regexp or proc values, they won't work at all with Sprockets 4, and if you try you'll get an exception raised that looks like NoMethodError: undefined method 'start_with?'
    1. @adisos if reform-rails will not match, I suggest to use: https://github.com/orgsync/active_interaction I've switched to it after reform-rails as it was not fully detached from the activerecord, code is a bit hacky and complex to modify, and in overall reform not so flexible as active_interaction. It has multiple params as well: https://github.com/orgsync/active_interaction/blob/master/spec/active_interaction/modules/input_processor_spec.rb#L41

      I'm not sure what he meant by:

      fully detached from the activerecord I didn't think it was tied to ActiveRecord.

      But I definitely agree with:

      code is a bit hacky and complex to modify

    1. I find reform's implementation a bit too complicated too (lots of layers of abstraction, including going through the representable gem for a lot of things)
    2. If you compare the code of Reform and the code of ActiveForm-Rails, I think the last is more simple and clear for a behavior similar (or better).
    3. Finally, I really do something simple and I find the reform's implementation is a little bit too complicated for what I want. I think my code (and yours) is simple.
  9. Jan 2021
  10. atomiks.github.io atomiks.github.io
    1. Can I use the title attribute?Yes. The content prop can be a function that receives the reference element as an argument and returns a string or element.tippy('button', { content(reference) { const title = reference.getAttribute('title'); reference.removeAttribute('title'); return title; }, });The title attribute should be removed once you have its content so the browser's default tooltip isn't displayed along with the tippy.
    1. Headless: With React's DOM rendering for improved usage with CSS-in-JS and spring libraries. If you want greater control over your poppers to integrate fully with design systems, this is for you.
    1. We can make content a function that receives the reference element (button in this case) and returns template content:
    2. You can pass the element itself, which is useful for keeping event listeners attached (or when a framework is controlling elements inside):
    3. Allows you to separate the tippy's positioning from its trigger source.
  11. Dec 2020
    1. Less developer maintenance burden: The existing (Kuma) platform is complex and hard to maintain. Adding new features is very difficult. The update will vastly simplify the platform code — we estimate that we can remove a significant chunk of the existing codebase, meaning easier maintenance and contributions.
  12. Nov 2020
    1. My focus is on make the API as simpler as possible to allows easy integration without even reading the docs but keeping and expand current features.
    2. There are actually 3 other libraries that implements material in svelte, i hope this to become the community favorite because using MDC underneath it implements correctly Material guidelines.
    3. This sort of library probably should be communitized so there's really just a single library.
    1. However, this coalescing was very complicated, both in the specification and implementations, due to the dynamism of computed property names for accessors. Coalescing was a big source of overhead (e.g., in terms of code size) in polyfill implementations of "Stage 2" decorators.
  13. Oct 2020
  14. Sep 2020
    1. For the past couple of years in particular however, I’ve stopped using Webpack to develop them, opting instead to use Rollup as my primary bundler for apps.
    1. Svelte will not offer a generic way to support style customizing via contextual class overrides (as we'd do it in plain HTML). Instead we'll invent something new that is entirely different. If a child component is provided and does not anticipate some contextual usage scenario (style wise) you'd need to copy it or hack around that via :global hacks.
  15. Aug 2020
    1. Changing Major or Option Students seeking to change majors/options must be able to complete the new major/option within 140 units. Student requests to change a major/option must be approved by the department chair of the new major/option. If the student has 90 or more earned units, the request also must be approved by the associate dean of the new major/option. Requests to change majors/options must be accompanied by a plan demonstrating that the new major/option can be completed within 140 units.

      CSUN students must read the content of this page before contacting their academic advisor.

    1. 5.1.7. NixOS / nixpkgs option handling

      What is an option?

      From the link below to the source, it's just an attribute set with all the function parameters (see below) plus a _type attribute name to allow for type level operations (because Nix is untyped).

        mkOption =
          {
          # Default value used when no definition is given in the configuration.
          default ? null,
          # Textual representation of the default, for the manual.
          defaultText ? null,
          # Example value used in the manual.
          example ? null,
          # String describing the option.
          description ? null,
          # Related packages used in the manual (see `genRelatedPackages` in ../nixos/lib/make-options-doc/default.nix).
          relatedPackages ? null,
          # Option type, providing type-checking and value merging.
          type ? null,
          # Function that converts the option value to something else.
          apply ? null,
          # Whether the option is for NixOS developers only.
          internal ? null,
          # Whether the option shows up in the manual.
          visible ? null,
          # Whether the option can be set only once
          readOnly ? null,
          # Deprecated, used by types.optionSet.
          options ? null
          } @ attrs:
          attrs // { _type = "option"; };
      

      How does it fit in a big scheme of things?

      ?

  16. Jul 2020
  17. Jun 2020
  18. May 2020
    1. This is it. I'm done with Page Translator, but you don't have to be. Fork the repo. Distribute the code yourself. This is now a cat-and-mouse game with Mozilla. Users will have to jump from one extension to another until language translation is a standard feature or the extension policy changes.
    2. Mozilla will never publicly ask users to circumvent their own blocklist. But it's their actions that are forcing people to do so.
    3. So to me, it seems like they want to keep their users safer by... making them use Google Chrome or... exposing themselves to even greater danger by disabling the whole blocklist.
    4. You might try this extension: https://github.com/andreicristianpetcu/google_translate_this It does the same thing in the same way as Page Translator and likely will be blocked by Mozilla, but this is a cat and mouse game worth playing if you rely on full-page in-line language translation.
  19. Apr 2020
    1. minitest doesn't reinvent anything that ruby already provides, like: classes, modules, inheritance, methods. This means you only have to learn ruby to use minitest and all of your regular OO practices like extract-method refactorings still apply.
    1. Don't use it! Writing simple assertions (and Minitest way of transforming them to expectations) is almost always a better idea anyway. Work with your favourite library authors to start with assertions and add matchers for convenience and not the other way around. Keep it simple.
  20. Mar 2020
    1. GNU gettext is designed to minimize the impact of internationalization on program sources, keeping this impact as small and hardly noticeable as possible. Internationalization has better chances of succeeding if it is very light weighted, or at least, appear to be so, when looking at program sources.
  21. Dec 2019
    1. So many power users try dozens of complicated todo list software applications, only to go right back to their trusty todo.txt file.

      How true. I've found that to be true as well.

    1. I've always thought that the Gentoo way of installing a new system (from backup or otherwise) was the best due to its simplicity.
    1. There are many options for performing backups. Most Linux distributions are provided with one or more open source programs specially designed to perform backups. There are many commercial options available as well. But none of those directly met my needs so I decided to use basic Linux tools to do the job.
  22. Nov 2019
    1. Some time ago I asked on Reddit: “What’s the consensus among the React community for testing React components?” Shawn Wang replied: “testing is an enormously complicated and nuanced topic on which there isn’t a consensus anywhere in JS, much less in React.” I was not trying to find the best library for testing React. Mainly because there isn’t one.
  23. Oct 2019
  24. Nov 2017