- counter.
- get a porcentage based of some value.
- todo app with the CRUD principle; only use a lib to manage states if you already finish it this project.
- some thing using github api; the goal is list the elements consume an api.
- food app using spooncular api; has to be able to list, search, add, edit and delete the recipe.
- pokedex using pokemon api to consume the api, make routes and pratice the interaction with the user.
- finance application.
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 shuffle = (list) => list.sort((a, b) => Math.floor(0.5 - Math.random())) | |
| Array.prototype.shuffle = function(){ | |
| const copy = Array.from(this); | |
| let currentIndex = this.length; | |
| let temporaryValue; | |
| let randomIndex = 0; | |
| while(0 !== currentIndex){ |
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 isOrdinate = (integer) => { | |
| const fixInteger = integer.toString().split('').map(Number) | |
| const sortInteger = [...fixInteger].sort() | |
| const compare = fixInteger.every((item, index, array) => item === sortInteger[index]) | |
| if(integer <= 0 || typeof integer === "string") | |
| throw new Error("Isn't a positive integer!") | |
| return compare ? "In order" : "Not in order" | |
| }; |
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 humanizeList = (list, type) => { | |
| const last = list.length - 2 | |
| const initial = list.slice(0, last) | |
| const penultimate = list.slice(last, list.length) | |
| if(type === null || type === undefined) | |
| throw "Type is not defined or is a null value." | |
| if(type !== "conjunction" && type !== "disjunction") | |
| throw "The type passed is not a valid one." |
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
| # @gabrielmodog | |
| # 07/09/2019 | |
| import random | |
| def end(cards): | |
| print("Your card is: ", cards[10]) | |
| def choice(count, pile_1, pile_2, pile_3): | |
| while True: |
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 isObjectCopyEqual = (a, b) => { | |
| const [indexedA, indexedB] = [Object.keys(a),Object.keys(b)] | |
| if(indexedA.length !== indexedB.length) | |
| return false | |
| return indexedA.every(item => a[item] === b[item]); | |
| } |
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 monthDays(month){ | |
| const currentYear = new Date().getFullYear(); | |
| if(+month === 2){ | |
| const isFebDays = +currentYear % 400 === 0 | |
| || (+currentYear % 4 === 0 | |
| && +currentYear % 100 !== 0); | |
| return isFebDays ? 29 : 28; | |
| } |
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 Person(name, lastname, age){ | |
| const private = {}; | |
| const person = { | |
| set: () => { | |
| if(!name || !lastname) { | |
| throw new Error('This element must have a name or lastname'); | |
| } | |
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 defaultCompare = (a, b) => a > b ? 1 : (a < b ? -1 : 0); | |
| const binarySearch = (array, element, compare = defaultCompare, left = 0, right = array.length) => { | |
| if(left > right) return -1; | |
| const middle = Math.floor((right + left) / 2); | |
| const comparison = compare(element, array[middle]); | |
| return ( | |
| comparison === -1 ? | |
| binarySearch(array, element, compare, left, middle - 1) |
- Sistema de estacionamento.
- Lista de anotações.
- Validação de formulários, porém criando uma própria biblioteca de validação.
- Carrinhos de compras.
- Visualizador de .csv
- Chat p2p (peer-to-peer).
- Calendario com a possilidade de fazer anatoções na data selecionada.
- Algum app usando a API do Twitter.