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": { | |
"_postman_id": "69fd76f6-9327-4ba9-9359-2d8e0f5ba477", | |
"name": "SchemaRegistry", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "POST", | |
"event": [ |
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 main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
"github.com/google/uuid" | |
) |
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
<?php | |
function limparRegistrosDestaque($db){ | |
$stmt = $db->prepare("UPDATE produtos SET todays_deal=?"); | |
return $stmt->execute([0]); | |
} | |
function buscarRegistrosAleatorios($db, $quantidade){ | |
$stmt = $db->prepare("SELECT * FROM produtos ORDER BY rand() limit $quantidade"); |
type Logger interface {
Debug(v ...interface{})
Debugf(format string, v ...interface{})
Error(v ...interface{})
Errorf(format string, v ...interface{})
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
from flask import Flask | |
app = Flask(__name__) | |
def hello(): | |
return "Hello world" | |
app.route("/", methods=['get'])(hello) |
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
from flask import Flask, render_template, request, redirect, url_for | |
from flask_wtf import FlaskForm | |
from wtforms import StringField, FormField, FieldList, IntegerField, Form | |
from wtforms.validators import Optional | |
from collections import namedtuple | |
app = Flask(__name__) | |
app.config['SECRET_KEY'] = 'keepthissecret' | |
class ProductForm(Form): |
O flask é um micro framework que utiliza tecnologia wsgi para servir aplicações web utilizando Python. Os dois componentes basicos do flask são o Jinja que é um motor de templates e o Werkzeug que é um toolkit para trabalhar com WSGI.
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
''' | |
Escreva um programa que leia dois números e pergunte qual operação você deseja realizar. | |
Você deve poder realizar a soma (+), subtração (-), a multiplicação (*) e a divisão (/). | |
Exiba o resultado da operação solicitada. | |
''' | |
# Lendo o primeiro número | |
n1 = float(input('Digite um numero: ')) | |
# Lendo o segundo número | |
n2 = float(input('Digite um numero: ')) |