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
function hitTheLottery(amountToWithdraw) { | |
// denominaciones de billetes | |
const denominations = [1, 5, 10, 20, 100] | |
// declaracion de variables dinero entregado y billetes en 0 | |
let delivered = 0; | |
let bills = 0; | |
// se ordenan las denominaciones en orden descendente |
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
function diagonalDifference(matrix) { | |
// declara los arreglos vacios a sumar | |
const leftDiagonal = []; | |
const rightDiagonal = []; | |
// regresa un arreglo con la diagonal de izquierda a derecha de la matriz | |
matrix.forEach((element, position) => { | |
// obtiene la posicion invertida de la matriz | |
const positionRight = (matrix.length - (position + 1)); |
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
$ sudo pacman -S rabbitmq | |
$ sudo systemctl enable --now rabbitmq | |
$ sudo rabbitmq-plugins enable rabbitmq_mqtt | |
$ sudo rabbitmq-plugins enable rabbitmq_management | |
$ sudo rabbitmqctl add_user admin1 admin1 | |
$ sudo rabbitmqctl set_permissions -p / admin1 ".*" ".*" ".*" | |
$ sudo rabbitmqctl set_user_tags admin1 management administrator |
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
// 1. Write a function that evaluates if that word is compund or not (it should recieve an string as input). | |
// 2. Compound words examples: hotdog, goodbye, newspaper. | |
// 3. Not compound words: catdog, hello, news | |
const wordDictionary = [ | |
'good', | |
'bye', | |
'news', | |
'paper', | |
'hot', |
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
# How to Install homebrew on Manjaro | |
> Steps required to install homebrew on Manjaro Linux | |
## Steps | |
1. Install base-devel | |
pacman -Syu # CAUTION: this updates the whole system | |
pacman -S base-devel |
OlderNewer