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
noble_gaz = [ | |
{"name": "HELIUM", "symbol": "He", "atomic number": 2}, | |
{"name": "NEON", "symbol": "Ne", "atomic number": 10}, | |
{"name": "ARGON", "symbol": "Ar", "atomic number": 18}, | |
{"name": "KRYPTON", "symbol": "Kr", "atomic number": 36}, | |
{"name": "XENON", "symbol": "Xe", "atomic number": 54}, | |
{"name": "RADON", "symbol": "Rn", "atomic number": 86}, | |
] | |
symbol = input("Entrer le symbole d'un gaz noble: ") |
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
noble_gaz = [ | |
{"name": "HELIUM", "symbol": "He", "atomic number": 2}, | |
{"name": "NEON", "symbol": "Ne", "atomic number": 10}, | |
{"name": "ARGON", "symbol": "Ar", "atomic number": 18}, | |
{"name": "KRYPTON", "symbol": "Kr", "atomic number": 36}, | |
{"name": "XENON", "symbol": "Xe", "atomic number": 54}, | |
{"name": "RADON", "symbol": "Rn", "atomic number": 86}, | |
] | |
symbol = input("Entrer le symbole d'un gaz noble: ") |
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
noble_gaz = [ | |
{"name": "HELIUM", "symbol": "He", "atomic number": 2}, | |
{"name": "NEON", "symbol": "Ne", "atomic number": 10}, | |
{"name": "ARGON", "symbol": "Ar", "atomic number": 18}, | |
{"name": "KRYPTON", "symbol": "Kr", "atomic number": 36}, | |
{"name": "XENON", "symbol": "Xe", "atomic number": 54}, | |
{"name": "RADON", "symbol": "Rn", "atomic number": 86}, | |
] | |
symbol = input("Entrer le symbole d'un gaz noble: ") |
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 pokemon = { | |
name: "Bulbasaur", | |
type: [ | |
"Grass", | |
"Poison" | |
], | |
base: { | |
hp: 45, | |
attack: 49, | |
defense: 49, |
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 i_am_null = null; | |
const i_am_undefined = undefined; | |
const i_am_non_null = 'I have value !' | |
const i_am_false = false; | |
const zero = 0; | |
const empty_string = ''; | |
console.log(`Comparing the evaluation of (i_am_null ?? 'default value') and (i_am_null || 'default value'): | |
${i_am_null ?? 'default value'} <-> ${i_am_null || 'default value'}`); | |
console.log(`Comparing the evaluation of (i_am_undefined ?? 'default value') and (i_am_undefined || 'default value'): |
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 i_am_null = null; | |
const i_am_undefined = undefined; | |
const i_am_non_null = 'I have value !' | |
const value_1 = i_am_null ?? 'default value'; | |
console.log(value_1); // Expected output: "default value" | |
const value_2 = i_am_undefined ?? 'another default value'; | |
console.log(value_2); // Expected output: "another default value" | |
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
/// usr/bin/env jbang "$0" "$@" ; exit $? | |
// A exécuter avec JBang : jbang heroes-frequencies-map-multi.java | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.time.Duration; | |
import java.util.Map; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.List; |
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
/// usr/bin/env jbang "$0" "$@" ; exit $? | |
// A exécuter avec JBang : jbang frequencies-map-in-concurrent-context.java | |
import java.time.Duration; | |
import java.util.concurrent.atomic.LongAdder; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.Map; | |
import java.util.List; | |
class FrequenciesMapUpdater implements Runnable { |
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
/// usr/bin/env jbang "$0" "$@" ; exit $? | |
// A exécuter avec JBang : jbang long-adder-counter.java | |
import java.time.Duration; | |
import java.util.concurrent.atomic.LongAdder; | |
interface LongCounter { | |
String name(); | |
void increment(); | |
long value(); |
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
/// usr/bin/env jbang "$0" "$@" ; exit $? | |
// A exécuter avec JBang : jbang atomic-long-counter.java | |
import java.time.Duration; | |
import java.util.concurrent.atomic.AtomicLong; | |
interface LongCounter { | |
String name(); | |
void increment(); | |
long value(); |
NewerOlder