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
import colors from 'colors'; //npm install --save colors | |
import { spawn } from 'cross-spawn'; //cross-platform spawn | |
import path from 'path'; | |
interface CommandOptions { | |
command: [string, string]; | |
errorMessage: string; | |
cwd: string; | |
} |
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
var obj = { | |
list1: [1, 2], | |
name: 'Paul', | |
single: false, | |
children: { | |
mary: 'female' | |
} | |
}; | |
console.log(obj.list1.constructor.name); |
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
import { Component } from '@angular/core'; | |
import { Produto } from './produto'; | |
@Component({ | |
selector: 'app-produto', | |
templateUrl: './produto.component.html' | |
}) | |
export class ProdutoComponent { | |
produto: Produto; | |
mostra: Boolean; |
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
Nome do produto: {{produto.nome}} | |
<p> | |
Nome do Produto: | |
<!-- <input type="text" [value]="produto.nome"> Apenas altera o valor do elemento html --> | |
<!-- <input type="text" [value]="produto.nome" (input)="produto.nome=$event.target.value"> --> | |
<input type="text" [(ngModel)]="produto.nome" name="nome"> | |
</p> | |
<p> |
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 VinhoBC extends DelegateCrud<Vinho, Long, VinhoDAO>{ | |
private static final long serialVersionUID = 1L; | |
public List<VinhoDTO> obtemVinhos() { | |
List<Vinho> vinhos = findAll(); | |
List<VinhoDTO> vinhosDTO = new ArrayList<>(); | |
for (Vinho vinho : vinhos) { |
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
package br.gov.serpro.vinhos.dto; | |
import java.math.BigDecimal; | |
import br.gov.serpro.vinhos.entity.Vinho; | |
public class VinhoDTO { | |
private Long id; | |
private BigDecimal valorPago; | |
private String nome; |
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
""" | |
We need argparse, math & requests libs to run this program. We must install requests lib via pip: | |
pip install requests | |
""" | |
import argparse | |
import requests | |
from math import * | |
#put your google api key here |