Set up project:
mkdir project
cd project
npm init -y
django-admin startproject => Criou o projeto | |
django-admin startapp => Cria uma aplicação dentro do projeto | |
MVC -> MTV | |
Model -> Views -> Templates | |
no Django as Views sao os controles | |
" " os Templates são as páginas | |
# Start server | |
python manage.py runserver |
.git | |
.ipynb_checkpoints/* | |
/notebooks/* | |
/unused/* | |
Dockerfile | |
.DS_Store | |
.gitignore | |
README.md | |
env.* | |
/devops/* |
Diferença "var" e "let"
== e === - === vem tipo tbm
Null e undefined (Ambos empty)
let single_or_array = ['a'] | |
Array.isArray(single_or_array) ? single_or_array.map(d => console.log(d)) : console.log(single_or_array) |
const containsCommonItem = (arr1, arr2) => arr1.some(item => arr2.includes(item)) | |
var foo = [1, 2, 4] | |
var bar = [4, 4, 5] | |
console.log(containsCommonItem(foo, bar)) |
test('ReverseInt function exists', () => { | |
expect(reverseInt).toBeDefined(); //funcao existe | |
expect(typeof steps).toEqual('function'); // é funcao | |
expect(typeof Queue.prototype.constructor).toEqual('function'); // Class | |
expect(reverseInt(0)).toEqual(0); | |
expect(palindrome('aba')).toBeTruthy(); | |
expect(palindrome(' aba')).toBeFalsy(); | |
}); | |
test('can remove elements from a queue', () => { |