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
| -- Populando tabela de usuarios | |
| INSERT INTO | |
| usuarios(id, nome, email) | |
| VALUES | |
| (1, 'Jeromy Bradtke', 'lilian_stokes@huel.net'), | |
| (2, 'Chance Koepp', 'brett_schmidt@oreilly.io'), | |
| (3, 'Daron Wisoky', 'katharyn@emmerich.co'), | |
| (4, 'Wynell Olson', 'kristal@frami.co'), | |
| (5, 'Rodger Weissnat', 'johnie@carroll.net'), |
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
| # Essa lista representa o nosso conjunto de cartas. | |
| # Nós abstraímos as cartas como um número inteiro positivo de 1 a 13. | |
| cartas = [9, 3, 3, 10, 4, 5, 1, 7, 11, 10] | |
| # Aqui seria uma lista de 10 cartas aleatórias | |
| # Caso queira gerar uma lista aleatória, basta descomentar a linha abaixo. | |
| # cartas = Array.new(10) { rand(1...13) } | |
| puts "Essas são as cartas que estão no baralho: #{cartas}" |
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
| <template> | |
| <q-page padding> | |
| <q-input outlined v-model="novaTarefa" label="Descrição da tarefa" /> | |
| <q-btn | |
| class="full-width q-mt-sm" | |
| color="purple" | |
| label="Adicionar nova tarefa" | |
| @click="adicionarNovaTarefa()" /> |
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
| { | |
| "trim_trailing_white_space_on_save": true, | |
| "ensure_newline_at_eof_on_save": true, | |
| "translate_tabs_to_spaces": true, | |
| "index_files": true, | |
| "tab_size": 2 | |
| } |
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
| <template> | |
| <q-page padding> | |
| <q-input | |
| v-model="novaTarefa" | |
| label="O que você precisa fazer hoje?" /> | |
| <q-btn outline | |
| class="full-width" | |
| color="primary" |
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
| <template> | |
| <q-page class="flex flex-center"> | |
| <img alt="Quasar logo" | |
| src="~assets/quasar-logo-full.svg" | |
| @click="informarQueAImagemFoiClicada()"> | |
| </q-page> | |
| </template> |
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
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>As 3 bases da Web</title> | |
| </head> | |
| <body> | |
| <h1 class="meu-texto-centralizado">As 3 bases da Web</h1> | |
| <p class="meu-texto-azul meu-texto-centralizado"> | |
| O CSS altera a apresentação de um componente HTML |
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
| # Consider this example to illustrate the Interface Segregation Principle (ISP): | |
| # | |
| # Let's say that we need a interface for databases adapters called DatabaseAdapterInterface. | |
| # | |
| #### A bad approach that does not comply with ISP: | |
| # |
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
| # Consider the same example used in the Open-Closed Principle | |
| # example (https://gist.github.com/italopaiva/c286351b2420ca763df3a588fc5cc3c1) | |
| # to illustrate the Dependency Inversion Principle (DIP): | |
| # | |
| # Remembering the example used in the OCP principle of having a client SomeClient that uses | |
| # a class DatabaseConnection to connect to the database and do something. | |
| # | |
| # In the OCP example we could achieve those results: |
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
| # Consider this Rails example to illustrate the Liskov's Substitution Principle (LSP): | |
| # | |
| # Domain information: | |
| # | |
| # - A document has a number, date, content and have a unique control number | |
| # that is generated before saving it to the database. | |
| # - There are several types of document, such as the ComplicatedDocument and the SimpleDocument. | |
| # - The SimpleDocument have all attributes of a document. | |
| # - The ComplicatedDocument is a document that only have a control number if its date is | |
| # after 2005 (business rules), but also have a number, content, date, and it is a document. |
NewerOlder