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
body { | |
height: 100vh; | |
background-image: linear-gradient(white, #ececec); | |
} | |
.navbar { | |
display: flex; | |
flex-direction: row; | |
} | |
.navbar-item { |
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
const admin = require("firebase-admin"); | |
let serviceAccount = require("./joaoestudantepk.json"); | |
function countPoints(input) { | |
var ccPoints = 0; | |
var dePoints = 0; | |
var bestCC = { userName: null, points: 0 }; | |
var bestDE = { userName: null, points: 0 }; | |
for (objeto in input) { | |
if (input[objeto].course == "design") { |
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
const admin = require("firebase-admin"); | |
let serviceAccount = require("./joaoestudantepk.json"); | |
function countPoints(input) { | |
var ccPoints = 0; | |
var dePoints = 0; | |
var bestCC = { userName: null, points: 0 }; | |
var bestDE = { userName: null, points: 0 }; | |
for (objeto in input) { | |
if (input[objeto].course == "design") { |
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 sys | |
Alunos = ["Maria Do Carmo", "Pedro Henrique", "Otacilio Maia"] | |
""" | |
Este algoritmo trata-se de uma otimização do Quicksort e é chamado de QuickSelect | |
Em vez de procurar ordernar todos os elementos inferiores do pivot | |
Este algoritmo apenas garante que existam k-1 elementos menores que o pivot | |
Mesmo que este subarray de k-1 menores que o pivot não estejam em ordem, | |
sendo este um critério de parada, no pior caso a complexidade é igual a do quicksort, |
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
#include "millis.h" | |
#include "mbed.h" | |
DigitalOut ledVerde(LED1); | |
DigitalOut ledExterno(PA_9,0); | |
DigitalIn botao(USER_BUTTON, PullUp); | |
Serial pc(SERIAL_TX, SERIAL_RX); | |
volatile char c = '\0'; | |
void onCharReceived() |
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
#include "mbed.h" | |
DigitalOut led(LED1); | |
InterruptIn button(USER_BUTTON, PullUp); | |
int delay = 500; | |
void pressed() | |
{ | |
led = !led; |
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
/* USER CODE BEGIN Header */ | |
/** | |
****************************************************************************** | |
* @file : main.c | |
* @brief : Main program body | |
****************************************************************************** | |
* @attention | |
* | |
* <h2><center>© Copyright (c) 2020 STMicroelectronics. | |
* All rights reserved.</center></h2> |
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
# Veja a descrição do problema em https://www.thehuxley.com/problem/790 | |
def mochila(capacidade, lista_pesos, lista_valores, tamanho_lista): | |
matriz_solucao = [[0 for x in range(capacidade + 1)] | |
for x in range(tamanho_lista + 1)] | |
for item in range(tamanho_lista + 1): | |
for peso in range(capacidade + 1): | |
if item == 0 or peso == 0: | |
matriz_solucao[item][peso] = 0 | |
elif lista_pesos[item-1] <= peso: |
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
/* USER CODE BEGIN Header */ | |
/** | |
****************************************************************************** | |
* @file : main.c | |
* @brief : Main program body | |
****************************************************************************** | |
* @attention | |
* | |
* <h2><center>© Copyright (c) 2020 STMicroelectronics. | |
* All rights reserved.</center></h2> |
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
/* USER CODE BEGIN Header */ | |
/** | |
****************************************************************************** | |
* @file : main.c | |
* @brief : Main program body | |
****************************************************************************** | |
* @attention | |
* | |
* <h2><center>© Copyright (c) 2020 STMicroelectronics. | |
* All rights reserved.</center></h2> |