- Escreva um programa para ler 2 valores (considere que não serão informados valores iguais) e escrever o maior deles.
- Escreva um programa para ler o ano de nascimento de uma pessoa e escrever uma mensagem que diga se ela poderá ou não votar este ano (não é necessário considerar o mês em que ela nasceu).
- Escreva um programa que verifique a validade de uma senha fornecida pelo usuário. A senha válida é o número 1234. Devem ser impressas as seguintes mensagens: ACESSO PERMITIDO caso a senha seja válida.
This file contains 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
// npm init | |
// npm install axios --save | |
const axios = require("axios"); | |
const id = 1; | |
const getUrl = "https://jsonplaceholder.typicode.com/posts/"; | |
const log = (res) => console.log(res.data); |
This file contains 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
wget https://nodejs.org/dist/v14.17.4/node-v14.17.4-linux-x64.tar.xz \ | |
tar -xvf node-v14.17.4-linux-x64.tar.xz \ | |
cd node-v14.17.4-linux-x64/ \ | |
# edite seu .bashrc ou .zshrc com esse if abaixo | |
#if [ -d "$HOME/Downloads/node-v14.17.4-linux-x64" ] ; then | |
# PATH="$PATH:$HOME/Downloads/node-v14.17.4-linux-x64/bin" | |
#fi | |
#https://nodejs.org/en/https://nodejs.org/en/ |
This file contains 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
// comandos | |
// npm init | |
// npm install rxjs | |
// npm install @sendgrid/mail | |
const fs = require("fs"); | |
const { from } = require("rxjs"); | |
const { filter, map } = require("rxjs/operators"); | |
const sgMail = require("@sendgrid/mail"); |
This file contains 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
//server | |
const express = require("express"); | |
const formidable = require("formidable"); | |
const app = express(); | |
app.post("/", (req, res, next) => { | |
const form = formidable({ | |
multiples: true, | |
keepExtensions: true, |
This file contains 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 functools | |
""" | |
Escreva uma função: | |
def solucao(A: int, B: int, K: int) -> int: | |
que, dados três inteiros A, B e K, retorna o número de inteiros dentro do intervalo [A..B] que são divisíveis por K, ou seja: | |
{i: A ≤ i ≤ B, i mod K = 0} |
This file contains 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
#!/usr/bin/env python3 | |
"""Easily put time restrictions on things | |
Note: Requires Python 3.x | |
Usage as a context manager: | |
``` | |
with timeout(10): | |
something_that_should_not_exceed_ten_seconds() | |
``` |
This file contains 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
#property copyright "Itacir Ferreira Pompeu" | |
#property version "0.01" | |
//fix extencioa | |
#include <Trade/Trade.mqh> | |
input double lote = 1.0; | |
input int ema_lower = 5; | |
double ema_lower_buffer[]; | |
double ifr_buffer[]; |
Verifique a versão na pagina oficial da gem a versão de suport do ruby e rails. Caso não haja essa informção verifique o ano em que versão ruby e com isso certifique-se de adicionar a gem com essa versão no Gemfile e faça o teste local.
This file contains 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
# The command finds the most recent tag that is reachable from a commit. | |
# If the tag points to the commit, then only the tag is shown. | |
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object | |
# and the abbreviated object name of the most recent commit. | |
git describe | |
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix: | |
git describe --abbrev=0 | |
# other examples |
NewerOlder