Coding rules such as : linting, formatting, versionning and code development.
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
import { useIonViewWillEnter, IonText } from '@ionic/react'; | |
import { FC, useRef, useEffect } from 'react'; | |
export interface ComponentProps { | |
data: any; | |
} | |
const Component: FC<ComponentProps> = ({ data }: ComponentProps) => { | |
const compoRef = useRef<HTMLDivElement>(null); | |
const isFirstRender = useRef(true); |
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
const totalAdresse = docs.reduce((prevValue, contrat) => { | |
console.log(prevValue, contrat); | |
if (prevValue.includes(contrat.adresse)) { | |
return prevValue; | |
} else { | |
return [...prevValue, contrat.adresse]; | |
} | |
}, []); | |
const totalAchatAndVente = docs.reduce( |
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
// Working in all environments | |
// https://stackoverflow.com/a/39077686 | |
/** | |
* Converting RGB to hex | |
* @param r red | |
* @param g green | |
* @param b blue | |
* @returns Hexacode color | |
* @example rgbToHex(0, 51, 255); // '#0033ff' |
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
let obj1, obj2, obj3; | |
/** | |
* spread_synthax | |
*/ | |
//with non redondant values, everyone stay | |
obj1 = { food: 'pizza', car: 'ford' }; | |
obj2 = { animal: 'dog' }; | |
obj3 = { ...obj1, ...obj2 }; | |
console.log(obj3); // => { food: "pizza", car: "ford", animal: "dog" } |
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
#!/bin/bash | |
# To lock session if needed | |
# loginctl lock-session | |
echo && date | |
echo 'Starting alarm.sh' | |
SOUND_PERCENT=150 | |
SOUND_FREQUENCY=1000 |
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
#!/bin/bash | |
# This script executes the four Python files sequentially to perform a series of tasks. | |
# Make sure you have Python installed and the necessary dependencies for each Python script. | |
# pip install -r requirements.txt | |
# Step 1: Convert maps to JSON | |
python 01_maps_to_json.py --address_suffix ", Krakow" | |
# Step 2: Convert JSON to GeoJSON |
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
#include <stdio.h> | |
void swapByCopy(int a, int b) { | |
int temp = a; | |
a = b; | |
b = temp; | |
} | |
// Le passage par pointeur pour obtenir un comportement similaire au passage par référence en C++. | |
// Cela implique de passer l'adresse des variables à une fonction et d'utiliser les pointeurs pour accéder et modifier les valeurs des variables d'origine. |
| Criteria | Comments | WebdriverIO | TheIntern | Nightwatch | TestCafé | Playwright | | -------------------------------------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------