66 Matching Annotations
  1. Last 7 days
  2. Feb 2021
  3. Jan 2021
    1. Situation: you have a single line of text in a flex child element. You don’t want that text to wrap, you want it truncated with ellipsis (or fall back to just hiding the overflow). But the worst happens. The unthinkable! The layout breaks and forces the entire flex parent element too wide. Flexbox is supposed to be helping make layout easier!
    1. Great, I can use vw to scale text so it doesn't look puny on a desktop! Perfect... Oh. Huh, now the text is too small to read when viewed on a phone. Okay, well I can just use "max(x,y)" to make sure it doesn't get shrunk beyond a minimum size. Perfect... Oh. Hmm. Looks like "max" isn't supported properly by Chrome. Okay, well guess I'll just use "px" again.
    1. auto As a maximum, identical to max-content. As a minimum it represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track.

      And I'm guessing that when you use auto as a value (not inside of a minmax), that it is equivalent to minmax(min-content, max-content)? Wish I could see that confirmed somewhere...

    1. fixed: With this value, the table’s layout ignores the content and instead uses the table’s width, any specified width of columns, and border and cell spacing values. The column values used are based on widths defined on columns or cells for the first row of the table
    1. It is also very likely that the contents of the table might change the structure or dimensions of the table. For example, long words residing in the table cells can cause the cell width to increases. If you fix that problem, it might happen that the long words cross the cell boundaries.
    1. The only difference is that in this case “auto” will not work, but instead “height: 100%” is required.
    2. When you give an element a width of 100% in CSS, you’re basically saying “Make this element’s content area exactly equal to the explicit width of its parent — but only if its parent has an explicit width.” So, if you have a parent container that’s 400px wide, a child element given a width of 100% will also be 400px wide, and will still be subject to margins, paddings, and borders — on top of the 100% width setting.
    3. Blocks Don’t Need 100% Width When we understand the difference between block-level elements and inline elements, we’ll know that a block element (such as a <div>, <p>, or <ul>, to name a few) will, by default expand to fit the width of its containing, or parent, element (minus any margins it has or padding its parent has).
    4. It seems like this should be one of the easiest things to understand in CSS. If you want a block-level element to fill any remaining space inside of its parent, then it’s simple — just add width: 100% in your CSS declaration for that element, and your problem is solved. Not so fast. It’s not quite that easy. I’m sure CSS developers of all skill levels have attempted something similar to what I’ve just described, with bizarre results ultimately leading to head scratching and shruggingly resorting to experimenting with absolute widths until we find just the right fit. This is just one of those things in CSS that seems easy to understand (and really, it should be), but it’s sometimes not — because of the way that percentages work in CSS.
    1. min-width: 0;

      Wouldn't expect the solution to "width grows too wide" to be to assign a (seemingly meaningless, since how could it be less than 0) a minimum width of 0.

      I would have expected to solve this by applying a max-width to the problem element or one of its ancestors.

    2. The explanation here is that the minimum size of an fr unit is auto. Grid then looks at the min-content size of the item. If the item has a size (you’ve given it a width) or has something in it with a size such as an image, the min-content size might be much bigger than the share of available space you think 1fr will give you. It’s easy to think of 1fr as being “one part of the space in the grid container” when it is really one part of the space left over. If there is space to grow then the tracks grow from that min-content size assigning space. Using minmax, as you have pointed out, is the best thing to do if you want to forcibly have equal width tracks, as that says “I want this track to have a min-content size of 0”, you could potentially in that situation end up with overflows as you lose the squishiness.
    3. And since auto is entirely based on content, we can say it is “indefinitely” sized, its dimensions flex. If we were to put an explicit width on the column, like 50% or 400px, then we would say it is “definitely” sized.
    1. Zappos created models to predict customer apparel sizes, which are cached and exposed at runtime via microservices for use in recommendations.

      There is another company named Virtusize who is doing the same thing like size predicting or recommendation

    1. Alternatively, you can build a custom icon system from existing icon libraries. To save on load times and improve performance, I would recommend always creating icon systems that include only the icons that you will use. If you’re only using 10 of them throughout your site, there is no good reason to link to the entire Fontawesome library of icons.
  4. Dec 2020
  5. Nov 2020
    1. Microbundle also outputs a modern bundle specially designed to work in all modern browsers. This bundle preserves most modern JS features when compiling your code, but ensures the result runs in 90% of web browsers without needing to be transpiled. Specifically, it uses preset-modules to target the set of browsers that support <script type="module"> - that allows syntax like async/await, tagged templates, arrow functions, destructured and rest parameters, etc. The result is generally smaller and faster to execute than the esm bundle
    1. This is a page note. I can write overall comments about the pre-print here.

      Tags can also be added below.

  6. Oct 2020
    1. He took three paces—with the fourth he reached his goal,       

      Interesting depiction of the actual size of gods here. If Poseidon was this large, how large would other gods appear such as Zeus? Or even Cronus, as literature suggests he too has a physical form. Would gods be able to show their true form to humans? Or is this why Zeus often appears as other beings when interacting with mortals.

    1. Perhaps we should detect URLSearchParams objects differently (using duck typing detection instead of instanceof window.URLSearchParams, for example) but the solution isn't adding a specific polyfill to Axios (as it'd increase the bundle size and still won't work with other polyfills).
  7. Sep 2020
    1. Many people recently are complaining about bundler performance. But I don’t think any tool is going to solve performance problems. Bundlers can try innovative ideas such as multi-threading and improved caching, but you’re always going to hit a limit. If you’re having performance problems, it’s more likely because you’re not keeping tabs of what you’re importing, and haven’t considered splitting your project into multiple projects.
    1. This is a demonstration of building a custom D3 4.0 bundle using ES2015 modules and Rollup. Custom bundles can be optimized to contain only the code you need. This example exposes just three fields on the d3 object: d3.event, d3.select and d3.selectAll. The minified and gzipped bundle is only 3,691 bytes, a savings of 93% over the default build!
    1. If we compile our empty component and bundle it with Svelte internals, it ends up being 2,080 bytes uncompressed, and 1,043 bytes gzipped. So the overhead for using Svelte ends up being only a kilobyte. Compare that to other frameworks that require 10x or 100x that many bytes just to mount an empty component!
  8. Aug 2020
  9. Jul 2020
  10. Jun 2020
  11. Apr 2020
  12. Mar 2020
    1. The amount of moneyparticipants transferred to the agent (from $0.00 to $0.30) was usedas an indicator of trustworthiness, as was how much money theybelieved they would receive back from the agent (0% to 100%)

      Note that this is a very small stake. (And was it even perhaps hypothetical?)

    1. Factors that affect power

      Factors that affect power.

    2. Cohen’s recommendations:  Jacob Cohen has many well-known publications regarding issues of power and power analyses, including some recommendations about effect sizes that you can use when doing your power analysis.  Many researchers (including Cohen) consider the use of such recommendations as a last resort, when a thorough literature review has failed to reveal any useful numbers and a pilot study is either not possible or not feasible.  From Cohen (1988, pages 24-27):

      Recommendations from Cohen about choosing the effect size when doing a power analysis.

  13. Sep 2019
    1. Plasmids (IncP/N/W)with 373short and rigid pili only transfer efficiently on solid surfaces, unlike those with longand flexible 374pili (IncF/H/T/J),capable of transferring equally well in liquidand on solid surfaces[35,36]

      Plasmid group vs pili length

  14. Feb 2019
    1. Interplay Between Optimization and Generalization of Stochastic Gradient Descent with Covariance Noise

      一个有趣的事实:batch-size 对训练收敛和模型泛化表现是有影响的,batch-size 越大,收敛越好,泛化变差。。。

  15. Nov 2018
    1. Revisiting Small Batch Training for Deep Neural Networks

      这篇文章简而言之就是mini-batch sizes取得尽可能小一些可能比较好。自己瞅了一眼正在写的 paper,这不禁让我小肝微微一颤,心想:还是下次再把 batch-size 取得小一点吧。。。[挖鼻] ​​​​

    2. Don't Use Large Mini-Batches, Use Local SGD

      最近(2018/8)在听数学与系统科学的非凸最优化进展时候,李博士就讲过:现在其实不太欣赏变 learning rate 了,反而逐步从 SGD 到 MGD 再到 GD 的方式,提高 batch-size 会有更好的优化效果!

  16. Oct 2018
    1. Approximate Fisher Information Matrix to Characterise the Training of Deep Neural Networks

      深度神经网络训练(收敛/泛化性能)的近似Fisher信息矩阵表征,可自动优化mini-batch size/learning rate


      挺有趣的 paper,提出了从 Fisher 矩阵抽象出新的量用来衡量训练过程中的模型表现,来优化mini-batch sizes and learning rates | 另外 paper 中的figure画的很好看 | 作者认为逐步增加batch sizes的传统理解只是partially true,存在逐步递减该 size 来提高 model 收敛和泛化能力的可能。

  17. Jan 2017
    1. If the rule is relaxed to embrace pattern alone, as explicitly advocated by Rensch and Mayr, exceptions can still be found both intra- and interspecifically. Within species, Rensch (1938) reported that 10–30% of the warm-blooded species examined by him were exceptions to Bergmann's rule. Ray (1960) reviewed the literature on body size variation in relation to climate for poikilotherms, and concluded that the rule was supported by 75% of species studied. Nevertheless, these percentages (see also James, 1970; Yom-Tov & Nix, 1986) support Mayr's (1956) contention that the rule would be proved if upheld by the majority of species, although his subsequent definition of a majority as more than 50%(Mayr, 1963) is rather generous in respect of a ‘rule’. Some studies, however, do find that the percentage of species in agreement with the intraspecific rule fails even this criterion (McNab, 1971).

      Historical evaluations of the validity of the intra-specific Bergman's Rule as a pattern.

    2. It is the definition of Bergmann's rule, and specifically the taxonomic level at which the rule is considered to act, that has done most to cloud the degree of generality of the effect it describes. Bergmann himself (quoted in James, 1970) stated that ‘(i)f we could find two species of [homeothermic] animals which would only differ from each other with respect to size, . . . (t)he geographical distribution of the two species would have to be determined by their size . . . if there are genera in which the species differ only in size, the smaller species would demand a warmer climate, to the exact extent of the size difference.’ Also: ‘(a)lthough it is not as clear as we would like, it is obvious that on the whole the larger species live farther north and the smaller ones farther south.’Bergmann's formulation was later altered by Rensch (1938), whose revised definition was that ‘within a Rassenkreis [complex of races] of warm-blooded animals the races living in colder climates are generally larger than the races living in warmer regions.’ Rensch considered that the new definition better fitted the rule as then understood, but was quite clear that the revision was his own (‘I myself reduced it to the geographical races of a species’; Rensch, 1938). It was this revision that subsequently became the accepted formulation of Bergmann's rule; later definitions included ‘Races of warm blooded vertebrates from cooler climates tend to be larger than races of the same species from warmer climates’(Mayr, 1956), and ‘The smaller-sized geographic races of a species are found in the warmer parts of the range, the larger-sized races in the cooler districts’(Ray, 1960; see also definitions in Gittleman, 1985; Goudie & Ankney, 1986; Paterson, 1990; McDowall, 1994; Steudel, Porter & Sher, 1994; Smith, Betancourt & Brown, 1995; Atkinson & Sibly, 1997).The notion that the application of Bergmann's rule at the intraspecific level is a derived state was emphasized by James (1970), who noted that it was a considerable modification of Bergmann's original message, although one that fitted well with knowledge of intraspecific body size variation. Quotations from Bergmann (1847; given in translation by James, 1970) imply that he considered the effect to be interspecific, but between closely related species. Whether he intended the example he gave of ‘species within a genus’ to be literal is unclear. Whichever, it is clear that his formulation was not intraspecific, as he thought it ‘paradoxical that the effects of the same rule in races of animals are not very apparent’(Bergmann, 1847, quoted in James, 1970). In this context, it is interesting that Mayr (1956; see also Rensch, 1938) noted that many of the species considered by Bergmann were, when Mayr was writing, afforded only sub-specific status! Nevertheless, since James's paper, Bergmann's rule has been examined at a variety of taxonomic levels, for example within species (Barnett, 1977; Ralls & Harvey, 1985; Yom-Tov & Nix, 1986; Geist, 1987; Graves, 1991; Smith et al., 1995, 1998; Van Voorhies, 1996, 1997; Mousseau, 1997; Partridge & Coyne, 1997), between species within genera (Gittleman, 1985; Taylor & Gotelli, 1994), between functionally related species (Geist, 1987; Cotgreave & Stockley, 1994), and between species within a range of higher taxa (Zeveloff & Boyce, 1988; Cushman et al., 1993; Barlow, 1994; McDowall, 1994; Hawkins, 1995; Hawkins & Lawton, 1995; Poulin, 1995; Poulin & Hamilton, 1995; Blackburn & Gaston, 1996a).

      Excellent history of the use of different taxonomic levels for Bergman's Rule.

  18. Sep 2016
  19. Dec 2015
    1. The problem with early stage investing is that markets can never be sized in Excel. If they could be reduced to a formula, we’d all be working at hedge funds. No, the essence of early stage investing is more instinctual.

      you can never size a market in excel