show dbs
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
version: '3.8' | |
services: | |
# Database - Mongo DB | |
mongo: | |
image: mongo | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: helpdev | |
MONGO_INITDB_ROOT_PASSWORD: 123456 |
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
@Configuration | |
public class BeanValidationConfig { | |
/** | |
* The idea here is to configure Hibernate to use the same ValidatorFactory used by Spring, | |
* so that Hibernate will be able to handle custom validations that need to use dependency injection (DI) | |
*/ | |
@Bean | |
public HibernatePropertiesCustomizer hibernatePropertiesCustomizer(final Validator validator) { | |
return new HibernatePropertiesCustomizer() { |
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
/* | |
we create 2 separate arrays of letters and count | |
the number of characters resulting from the | |
original precedence array. | |
we look up the index of each letter from first letter | |
array and follow the index of the next letter. | |
*/ | |
function findWord(a){ | |
console.log(a); |