390 private links
Macron disant que c'est hypocrite de décaler l'âge de la retrait. C'était il y a peu années.
computedEager utility has optimizations over computed in some cases.
when you have a simple operation, with a rarely changing return value – often a boolean.
Stick to computed
when you have a complex calculation going on, which can actually profit from caching and lazy evaluation and should only be (re-)calculated if really necessary.
display: contents is underrated: it removes the box layout of the element!
grid-row or grid-column only works on explicit layout: workaround at 18:55
TL;DR;
apply every hover effect on devices that can not support the hover effect (smartphones, ...).
Use the @media (hover: hover) media query to target devices that have the :hover effect available, or @media (hover: none).
CSS variables that provoke invalid CSS declarations (for example --foo: ;) are set to unset.
Space toggle for numerical value: calc(1.5 var(--toggle-value, - .4))
with toggle value:
:root {
--ON: initial
--OFF: ;
}
Use variables for pure data, not CSS values as CSS values are often bound with a unit.
Relative values inherit as syntax tokens unless the property is registered. Registering a property as
Optimizes .mp4, .web and .gif
100% client-side
- Think about the
:emptyselector, especially for message errors :) :targetto select the node targeted by an achor.:only-childand:only-of-typeselectors
Using web browsers might seem inefficient, but they solve so many problems.
FasterThanLime describes how hard it is to build a text-messaging app from scratch if we want to develop it properly.
Creational
Singleton
Type of object that can be instantiated once
In Typescript, just use a global object, so you don't have the boilerplate.
Prototype
Object.getPrototypeOf
Builder
Build object step by step through different methods instead of using many parameters
Factory
Determine which object to instantiate
Structural
Facade
Simplified to hide low-level details of a system
Proxy
Reactivity system of Vue :D
Replace an original object and do some side effects
Advantage: allow user to work with the proxy just like the original object but it can trigger side effects behind the scene.
Proxy are also used when there is a large object that would be expensive to duplicate in memory.
Behavioral
Iterator
Traverse through a collection of objects.
A pull based system.
An object with a next() method in javascript that returns a { done: boolean; value: T }.
Observer
Allow many objects to subscribe to events that are broadcast by another object.
A Subject where other objects subscribe to it and triggers their method when the subject notify
Mediator
In case of many to many relationships, one object is a coordinator between them.
Middlewares are an example of mediator.
State
What is the difference between state and strategy pattern?
Le réflexe photo-sternutatoire est partagé par 1/4 à 1/3 de la population mondiale.
Explication: le nerf optique envoie un signal si fort qu'il court-circuite le nerf trijumeau, qui se déclenche aussi.
Les vidéos sont disponibles sur Twitter
Python support also unicode caracters, so you can write a 𝝨(...args) function :D
They absorb the most energy when they have the least in them. And as they get closer and closer to full, they can't absorb quite as efficiently and then there is some excess lost.
and
batteries degrades over time
Causes of degradation:
- Heat ruins the battery (high impact)
- Charging cycles
- Time (slow impact)
How to charge the phone without generating extra heat ?
- Power breaks generating heat are now near the electrical socket
- the battery is divided by two
- adding more cooling hardware
→ heat problem is covered in normal situations
So what counts ?
- around 80% battery health after 800 charges (but we don't have long-term data about these new fast charges)
Announcement for 2022 from a tech company: 80% battery health after 1600 charges.
A stairwell is well suited for amplification :D
I find Vite to be a good compromise between having the benefits of TS and the slow build step. Use es-build to transpile and does not do type checking since it passes that responsibility onto the IDE.
Totally agree with this comment !
It is still possible to run the type checker all in once if needed.
Il faut avouer que c'est bien drôle et bien pensé ! :D
Et aussi:
https://twitter.com/Pr_Logos/status/1486726882951254031?s=20&t=Widr7k0pHvvPFeS5wQPORQ
https://twitter.com/Pr_Logos/status/1486727856088485894?s=20&t=Widr7k0pHvvPFeS5wQPORQ
On google or DuckDuckGo syntax:
- "Exact match" → for an exact string
- SITE:url → search in a specified site
- AFTER:1999 or BEFORE:2020 → before or after a specified date
- 2020..2020 → search in a range
- (A | B) → search results A or B
-
- → search for all results
- FILETYPE:PDF → search for a specified filetype
- RELATED:url → search related result of this URL
9: CACHE:url → see the website that the search engine has in cache