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/sh | |
eval "$(sed 's/^/mv /g' rules.txt )" |
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 factorial = number => { | |
let f = 1 | |
for (let i = 1; i <= number; i++) { | |
console.time('elapsed time') | |
f *= i; | |
console.log(`${i}! = ${f}`) | |
console.timeEnd('elapsed time') | |
if (f === Infinity) | |
break; | |
} |
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 header %> | |
<h2>Contas Mensais</h2> | |
<table> | |
<thead> | |
<tr> | |
<th>Descrição</th> | |
<th>Valor Estimado</th> | |
<th>Dia do Vencimento</th> | |
</tr> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Meu Dinheiro</title> | |
<link href="https://fonts.googleapis.com/css?family=Raleway:400,700" rel="stylesheet"> | |
<link rel="stylesheet" href="css/styles.css"> | |
</head> | |
<body style="margin: 0"> | |
<section class="header"> | |
<img src="/images/meu-dinheiro.png"> |
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 header %> | |
<h2>Operações</h2> | |
<table> | |
<thead> | |
<tr> | |
<th>Descrição</th> | |
<th>Valor</th> | |
<th>Sub-total</th> | |
</tr> |
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 header %> | |
<h2>Calculadora</h2> | |
<form method="GET"> | |
Valor inicial: <input type="text" name="valorInicial"><br> | |
Taxa a.m.: <input type="text" name="taxa"><br> | |
Quantos meses: <input type="text" name="tempo"><br> | |
<button type="submit">Calcular</button> | |
</form> | |
<% if (resultado.calculado) { %> |
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
/* | |
* [Exercício 6] | |
* Utilizando o ExpressJS, crie uma rota que some 2 números enviados como | |
* parâmetros na URL. Exemplo, ao executar no navegador: | |
* http://localhost:3000/somar?num1=10&num2=30 | |
* deverá ser retornado na tela A soma é: 40. | |
*/ | |
const express = require('express') |
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
/* | |
* [Exercício 5 - extra] | |
* | |
* Dado a lista de arquivos/diretórios retornada no exercício anterior, | |
* mostre quais são arquivos. | |
* (utilize fs.stat(caminho, (err, stat) => stat.isFile()) para isso.) | |
*/ | |
const fs = require('fs') |
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
/* | |
* [Exercício 4] | |
* | |
* Construa uma função async que utiliza a função readdirPromise com await e | |
* escreva no console a lista de arquivos/diretórios retornados. | |
*/ | |
const fs = require('fs') | |
const readdirPromise = (path) => new Promise((resolve, reject) => |