222 private links
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
Transitional apps or the apps between SPA and MPA.
These apps can deliver dynamic rendered pages, static pages or js-free pages depending of the needs.
« Des études ont montré que les enfants se tournent vers des aliments variés. »
Download video from the web on mobile phone. It uses yt-dlp (formerly youtube-dl) 👍
Ce sont bien des images d'un jeu.
Les robots de Boston Dynamics sont de plus en plus impressionant.
They use lines and count crossed lines 🤔 Smart.