How to remove XML comments in Javascript?
How regex can solve the issue but why they can be slow. There is a category for this weakness: CWE-1333 "Inefficient Regular Expression Complexity".
Other workarounds are also proposed, such as using efficient engines with backtracking.
A fast hashmap algorithm if the one of the standard library is not enough.
IDK if the collision rate is higher than the std library though. Hashbrown uses AHash as algorithm for hashing. --> it does not provide cryptographic secure hashes though.
Another use case is when std
is not available (because the randomness is not available in the environment / OS).
Non empty data structures :D
How to ramp up quickly?
The first step is to find someone on the team and ask for 30 minutes with them. In that meeting you have a simple agenda:
- For the first 25 minutes: ask them to tell you everything they think you should know. Take copious notes. Only stop them to ask about things you don’t understand. Always stop them to ask about things you don’t understand.
- For the next 3 minutes: ask about the biggest challenges the team has right now.
- In the final 2 minutes: ask who else you should talk to. Write down every name they give you.
Repeat the above process for every name you're given. Don’t stop until there are no new names.
The seventh version supports timestamps in them. What a cool thing, because they are now sortable, and searchable. Time slices will be easy :)
A great guide on the modulo operator :)
Une application de la classification de texte en 15 lignes de python. C'est impressionnant, et l'algorithme peut concurrencer les IA sur ce domaine. Cela n'est cependant par révolutionnaire.
A sort algorithm found by an AI is integrated to the LLVM standard C++
A blog post vulgarising the thing https://www.deepmind.com/blog/alphadev-discovers-faster-sorting-algorithms.
We can read here that less instructions are needed at assembly level.
Published!
A curated list of algorithms sorted in two categories: Beginner and Advanced
JavaScript Repository of TheAlgorithms, which implements various algorithms and data structures in JavaScript.
For education only
In general, the larger the primes you use, the better the illusion of randomness. With smaller primes, you will get more variation, but less appearance of randomness.
The first way is to set each trait on :nth-child(pn + b)
where p is a prime which increases with each value and b is constant for each trait.
The second way (which is more on par with the original Cicada principle) is to set each trait on :nth-child(pn + b) where p is constant per trait, and b increases with each value. This creates a better overall impression of randomness (especially if you order the values in a pseudo-random way too) without “holes”, but is more tedious, as you need as many values as the prime you’re using.
A collection of algorithms. They are available in many languages.
Here a list about datastructures: https://the-algorithms.com/fr/category/datastructures
A et B sont deux tranches horaires avec les indices: 1 le début de la tranche horaire et 2 la fin de la tranche horaire.
Alors il suffit de résoudre l'expression suivante:
(B2 < A1 or B1 > A2)
Et voilà !
Ranger les mots par index permet de décharger entre la demande de l'utilisateur et sa réponse.
Tout est dans l'image, plus efficace qu'une recherche humaine dans un dicitonnaire par ordre alphabétique (approximativement une recherche dichotomique): https://www.camilab.co/content/images/2021/12/dictionnaire.png
Cela se fait au détriment:
- du temps de construction de l'index au départ → à faire qu'une seule fois
- de l'espace de stockage pour cet index → OSEF car le stockage est peu coûteux
- l'accès au disque sera toujours moins rapide que conserver les données en mémoire -→comment compresser l'index ?
A case study
Do not compress the data directly but creates a program that can reproduce the data 💥
As an example: Aaprogram able to calculate the Fibonacci sequence is a "compressed" representation of the Fibonacci sequence. We replace the data by code, code capable of reconstructing the data.
They already manage to gain 20% on APKs (Android applications) with Superpack compared to the usual zip compression of APKs.
about tree data structures and their diversity