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 string = "abcd"; | |
| var array = string.split(""); | |
| for(i=0; i<array.length;i++){ | |
| str = array[i].repeat(i+1); | |
| if(str.length == 1) { | |
| console.log(str.toUpperCase()); | |
| } else { | |
| primeira_posicao = str.substring(0,1); |
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
| people = ['Dr. Christopher Brooks', 'Dr. Kevyn Collins-Thompson', 'Dr. VG Vinod Vydiswaran', 'Dr. Daniel Romero'] | |
| def split_title_and_name(person): | |
| title = person.split()[0] | |
| lastname = person.split()[-1] | |
| return '{} {}'.format(title, lastname) | |
| list(map(split_title_and_name, people)) | |
| #['Dr. Brooks', 'Dr. Collins-Thompson', 'Dr. Vydiswaran', 'Dr. Romero'] |
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 numpy as np | |
| mylist = [1, 2, 3, 4] | |
| x = np.array(mylist) | |
| print(x) | |
| # array([1, 2, 3, 4]) | |
| y = np.array([1, 2, 3], [4, 6, 12]) | |
| print(y) | |
| # array([[1, 2, 3],[4, 6, 12]]) |
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 pandas as pd | |
| purchase_1 = pd.Series({'Name': 'Chris', | |
| 'Item Purchased': 'Dog Food', | |
| 'Cost': 22.50}) | |
| purchase_2 = pd.Series({'Name': 'Kevyn', | |
| 'Item Purchased': 'Kitty Litter', | |
| 'Cost': 2.50}) | |
| purchase_3 = pd.Series({'Name': 'Vinod', | |
| 'Item Purchased': 'Bird Seed', |
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 pandas as pd | |
| purchase_1 = pd.Series({'Name': 'Chris', | |
| 'Item Purchased': 'Dog Food', | |
| 'Cost': 22.50}) | |
| purchase_2 = pd.Series({'Name': 'Kevyn', | |
| 'Item Purchased': 'Kitty Litter', | |
| 'Cost': 2.50}) | |
| purchase_3 = pd.Series({'Name': 'Vinod', | |
| 'Item Purchased': 'Bird Seed', |
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
| exports.get = async(req, res, next) => { | |
| try { | |
| const data = await repository.get(); | |
| res.status(200).send({data: data}); | |
| } catch (e) { | |
| res.status(500).send({ | |
| message: 'Falha ao processar sua requisição' | |
| }); | |
| } | |
| } |
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
| exports.get = async() => { | |
| return await User.find({}, 'name email'); | |
| } | |
| exports.getById = async(id) => { | |
| return await User.findById(id, 'name email'); | |
| } | |
| exports.create = async(data) => { | |
| const user = new User(data); |
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
| --Customers (CustomerID, CompanyName, ContactName, Address, City, Region, Country, Phone, Fax) | |
| --Employees (EmployeeID, LastName, FirstName, BirthDate, HireDate, Address, City, Region, Country) | |
| --Orders (OrderID, CustomerID, EmployeeID, OrderDate, ShippedDate) | |
| --Order Details (OrderID, ProductID, UnitPrice, Quantity, Discount) | |
| --Products (ProductID, ProductName, SupplierID, CategoryID, UnitPrice, UnitsInStock, ReorderLevel, | |
| --Discontinued) | |
| --Suppliers (SupplierID, CompanyName, ContactName, Address, City, Region, Country, Phone, Fax, | |
| --HomePage) | |
| --Categories (CategoryID, CategoryName, Description, Picture) |
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
| --Os seguintes esquemas serão utilizados como base para a resolução desta prova. Chaves primárias estão | |
| --sublinhadas e chaves estrangeiras estão em itálico. | |
| --Customers (CustomerID, CompanyName, ContactName, Address, City, Region, Country, Phone, Fax) | |
| --Employees (EmployeeID, LastName, FirstName, BirthDate, HireDate, Address, City, Region, Country) | |
| --Orders (OrderID, CustomerID, EmployeeID, OrderDate, ShippedDate) | |
| --Order Details (OrderID, ProductID, UnitPrice, Quantity, Discount) | |
| --Products (ProductID, ProductName, SupplierID, CategoryID, UnitPrice, UnitsInStock, ReorderLevel, | |
| --Discontinued) | |
| --Suppliers (SupplierID, CompanyName, ContactName, Address, City, Region, Country, Phone, Fax, | |
| --HomePage) |
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 React, { useState } from "react"; | |
| import { StyleSheet, TouchableOpacity, Text, ImageBackground } from "react-native"; | |
| import { RNCamera } from "react-native-camera"; | |
| export default Camera = () => { | |
| const [imageUri, setImageUri] = useState(null); | |
| takePicture = async () => { | |
| try { | |
| if (this.camera) { | |
| const options = { |
OlderNewer