This file contains 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
//A exécuter sous JShell : /open perfectNumber.jsh | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; | |
int sumOfDividers(int value){ | |
return IntStream.rangeClosed(1, value).filter(i -> value % i == 0).sum(); | |
} | |
var maxItems = 100; |
This file contains 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
//DEPS net.datafaker:datafaker:1.9.0 | |
/** | |
* Pour executer avec JBang : jbang DataFakerRegexifyUsage.jsh | |
* <p> | |
* Les lignes commençant par //DEPS xxx au début du script sont pour le lancement avec JBang. | |
* Elle est ignorée si on lance directement avec JShell | |
* <p> | |
* Pour exécuter sous JShell : | |
* <p> |
This file contains 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
//DEPS net.datafaker:datafaker:1.9.0 | |
/** | |
* Pour executer avec JBang : jbang DataFakerExamplifyUsage.jsh | |
* <p> | |
* Pour exécuter sous JShell : | |
* jshell --class-path .;.\lib\datafaker-1.9.0.jar | |
* /open DataFakerExamplifyUsage.jsh | |
*/ | |
import net.datafaker.Faker; |
This file contains 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
//DEPS net.datafaker:datafaker:1.9.0 | |
/** | |
* Pour executer avec JBang : jbang DataFakerTemplateUsage_2.jsh | |
* <p> | |
* Pour exécuter sous JShell : | |
* jshell --class-path .;.\lib\datafaker-1.9.0.jar | |
* /open DataFakerTemplateUsage_2.jsh | |
*/ | |
import net.datafaker.Faker; |
This file contains 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
//DEPS net.datafaker:datafaker:1.9.0 | |
/** | |
* Pour executer avec JBang : jbang DataFakerTemplateUsage_1.jsh | |
* Pour exécuter sous JShell : | |
* jshell --class-path .;.\lib\datafaker-1.9.0.jar | |
* /open DataFakerTemplateUsage_1.jsh | |
*/ | |
import net.datafaker.Faker; | |
import java.util.stream.IntStream; |
This file contains 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
//DEPS net.datafaker:datafaker:1.9.0 | |
/** | |
* Pour executer avec JBang : jbang LetterifyNumerifyAndBothifySpecialChar.jsh | |
* Pour exécuter sous JShell : | |
* jshell --class-path .;.\lib\datafaker-1.9.0.jar | |
* /open LetterifyNumerifyAndBothifySpecialChar.jsh | |
*/ | |
import net.datafaker.Faker; | |
This file contains 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
//DEPS net.datafaker:datafaker:1.9.0 | |
/** | |
* Pour executer avec JBang : jbang DataFakerBothifyUsage.jsh | |
* <p> | |
* Pour exécuter sous JShell : | |
* jshell --class-path .;.\lib\datafaker-1.9.0.jar | |
* /open DataFakerBothifyUsage.jsh | |
*/ | |
import net.datafaker.Faker; |
This file contains 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
//DEPS net.datafaker:datafaker:1.9.0 | |
/** | |
* Pour executer avec JBang : jbang DataFakerNumerifyUsage.jsh | |
* <p> | |
* Pour exécuter sous JShell : | |
* jshell --class-path .;.\lib\datafaker-1.9.0.jar | |
* /open DataFakerNumerifyUsage.jsh | |
*/ | |
import net.datafaker.Faker; |
This file contains 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
//DEPS net.datafaker:datafaker:1.9.0 | |
/** | |
* Pour exécuter avec JBang : jbang DataFakerOptionsProviderWithDate.jsh | |
* Pour exécuter sous JShell : | |
* jshell --class-path .;.\lib\datafaker-1.9.0.jar | |
* /open DataFakerOptionsProviderWithDate.jsh | |
*/ | |
import net.datafaker.Faker; | |
import net.datafaker.providers.base.Options; |
This file contains 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
//DEPS net.datafaker:datafaker:1.9.0 | |
/** | |
* Pour exécuter avec JBang : jbang DataFakerOptionsProviderSubset.jsh | |
* Pour exécuter sous JShell : | |
* jshell --class-path .;.\lib\datafaker-1.9.0.jar | |
* /open DataFakerOptionsProviderSubset.jsh | |
*/ | |
import net.datafaker.Faker; | |
import net.datafaker.providers.base.Options; |