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 valorDoProduto = 1000000; | |
| //quantidade de parcelas | |
| const quantidadeDoParcelamento = 10; | |
| //valor pago | |
| const valorPago = 7500; | |
| function humanizarValorDoProduto() { | |
| return valorDoProduto / 100 |
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 valorDoProduto = 100000; | |
| //quantidade de parcelas | |
| const quantidadeDoParcelamento = 10; | |
| //valor pago | |
| const valorPago = 50; | |
| let valorPagoEmCentavos = valorPago * 100 | |
| let valorParcela = valorDoProduto / quantidadeDoParcelamento |
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
| [info] Loading global plugins from /home/dev/.sbt/1.0/plugins | |
| [info] Loading settings for project apatheia-network-build-build from metals.sbt ... | |
| [info] Loading project definition from /home/dev/env/labs/apatheia/apatheia-network/project/project | |
| [info] Loading settings for project apatheia-network-build from metals.sbt ... | |
| [info] Loading project definition from /home/dev/env/labs/apatheia/apatheia-network/project | |
| [success] Generated .bloop/apatheia-network-build.json | |
| [success] Total time: 1 s, completed Jun 6, 2023, 12:07:17 AM | |
| [info] Loading settings for project root from build.sbt ... | |
| [info] Set current project to apatheia-network (in build file:/home/dev/env/labs/apatheia/apatheia-network/) | |
| 00:07:20,309 |-INFO in ch.qos.logback.classic.LoggerContext[default] - This is logback-classic version 1.4.5 |
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 charMap = { | |
| 'á' : "'a", | |
| 'Á' : 'A', | |
| 'ã' : 'a] ', | |
| 'Ã' : 'A]', | |
| 'â' : '^a', | |
| 'Â' : '^A', | |
| 'à' : '`a', | |
| 'À' : "`A", | |
| 'é' : "'e", |
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
| <div ng-if="checkRecurrency(availableFrequencies.WEEKLY)" | |
| class="weekly-recurrence-container"> | |
| <label> | |
| <span class="xl-text bolder primary-font"> | |
| {{translation.CALENDAR_RECUR_EVERY_LABEL}} | |
| </span> | |
| <input type="text" class="small default-field" | |
| ng-model='event.recurrencyInterval' | |
| ng-value='event.recurrencyInterval'/> | |
| <span class="xl-text bolder primary-font"> |
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
| List<Person> persons = new ArrayList<Person>(); | |
| //Add persons to list | |
| ... | |
| // Lista que contem as pessoas com mais de 80 Quilos | |
| List<Person> heavyWeightPersons = collection(persons).filter(propertyMatches("weight", greaterThan(80)); |
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
| List<Person> persons = new ArrayList<Person>(); | |
| //Add persons to list | |
| ... | |
| // Lista que contem as pessoas com mais de 80 Quilos | |
| List<Person> heavyWeightPersons = new ArrayList<Person>(); | |
| for(Person person:persons){ | |
| if(person.getWeight() > 80) | |
| heavyWeightPersons.add(person); |
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
| public class Person{ | |
| private Integer id; | |
| private String name; | |
| private Integer weight; | |
| // getters and setters | |
| } |
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
| Rails.application.routes.draw do | |
| [...] | |
| # *path é uma rota direcionada para todas as URL's da aplicação | |
| match "*path" => proc { |env| [ | |
| 200, | |
| { | |
| "Content-Type" => 'text/plain', # tipo da resposta do método OPTIONS | |
| "Access-Control-Allow-Origin" => '*', # IPs que podem acessar o recurso, o valor * libera pra todos os Hosts | |
| "Access-Control-Allow-Methods" => %w{GET POST PUT DELETE}.join(","), # Métodos permitidos para o recurso |
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
| class Api::V1::ComentariosController < Api::V1::BaseController | |
| def create | |
| comentario = Comentario.create(params[:comentario]) | |
| if comentario.valid? | |
| respond_with(comentario, :location => api_v1_comentario_path(comentario)) | |
| else | |
| respond_with(comentario) | |
| end | |
| end |
NewerOlder