- Python est codé en C
- Node.js est codé en C++
- Python est mono coeur car créée avant l'apparition des multi coeur
- Node.js est mono thread
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// parcourir un fichier csv via un champ d'upload | |
const formData = await request.formData() | |
const [diagnostiqueur] = formData.values() as FormDataIterator<File> | |
if (diagnostiqueur === undefined) { | |
return new Response("Bulk insert failed", { status: 200 }) | |
} | |
const data = (await diagnostiqueur.text()) | |
.split(/\r\n|\r|\n/) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable @typescript-eslint/no-require-imports */ | |
/* eslint-disable @typescript-eslint/no-unsafe-call */ | |
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ | |
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ | |
/* eslint-disable sonarjs/no-nested-template-literals */ | |
/* eslint-disable testing-library/no-node-access */ | |
/* eslint-disable no-plusplus */ | |
it.only('génération programatique d’un test d’affichage HTML', () => { | |
const { container } = render() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Vérifier la bonne configuration d'un projet JavaScript | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-06-09 | |
// @description Vérifier la bonne configuration d'un projet JavaScript | |
// @match https://github.com/inclusion-numerique/* | |
// @match https://github.com/anct-cnum/* | |
// @grant GM_xmlhttpRequest | |
// @connect raw.githubusercontent.com | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// TS v5.2 | |
// Quelques bases https://github.com/tsconfig/bases#centralized-recommendations-for-tsconfig-bases | |
// tsconfig.json | |
{ | |
"compilerOptions": { | |
// Interop Constraints | |
// ??? | |
"esModuleInterop": true, | |
// ??? |
- Installation
- Documentation
- Projet open source
- what-is-rust-and-why-is-it-so-popular
cargo
équivaut àyarn
cargo new [DIRECTORY] --bin
Cargo.toml
équivaut àpackage.json
- pour compiler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prettier est inutile sur un projet où il y a eslint | |
{ | |
"printWidth": 120, // max-len | |
"tabWidth": 2, // indent | |
"useTabs": false, // no-tabs | |
"semi": false, // semi | |
"singleQuote": true, // quotes | |
"quoteProps": "as-needed", // quote-props | |
"jsxSingleQuote": false, // jsx-quotes | |
"trailingComma": "es5", // comma-dangle |
- code splitting par défaut par page
- s'il y a un Link dans une page, en production uniquement, il prefetche la page du lien en question quand on passe la souris dessus
- static generation : généré au build time (sauf en dev) et ne change jamais
- peut être cachée par un CDN car c'est une page HTML (code source en HTML)
- par défaut, une page est statique
- SQL est Turing complete
null
veut dire "on ne sait pas" en postgres- Data Types
- CTE : Common Table Expression avec un
WITH
pour séparer les responsabilités (comme une fonction) - on stocke une donnée qui ne change jamais : une date de naissance oui ! mais pas l'age...
- le mot
ALWAYS
permet de dire qu'on ne peut pas écrire manuellement dans le champ
- from/join (uniquement ici où on prend la data, tout le reste n’est que filtre)
NewerOlder