Skip to content

Instantly share code, notes, and snippets.

View eduardojunio's full-sized avatar
🏠
Working from home

Eduardo Macêdo eduardojunio

🏠
Working from home
View GitHub Profile
@eduardojunio
eduardojunio / statistics.rb
Last active July 23, 2021 21:01
Proof of concept on how we could implement the new metrics on the Flow::Statistics class
class Flow::Statistics
def patients_messaged
CacheCounter.get_fast_count_for(Flow::FlowPatient, flow.provider_id, :patients) -
pre_filtered_flow_patients.where.not(state: %w(duplicated incomplete)).count
end
def need_review
pre_filtered_flow_patients.last_response_flagged("invalid").count
end
{-
Cria uma nova lista aplicando a função procura a cada elemento
de x
-}
criaNota :: ListaCod -> ListaNota
criaNota x = [procura db y | y <- x]
@eduardojunio
eduardojunio / 85.c
Created September 4, 2016 23:41
85 - Adivinhe The Huxley
#include <stdio.h>
void lerSenha(int tamanho, int senha[]);
void tentarChutes(int tamanho, int senha[]);
int main() {
int k, n, i;
scanf("%d", &k);
for (i = 0; i < k; i++) {
scanf("%d", &n);
@eduardojunio
eduardojunio / 73.c
Created September 4, 2016 13:16
73 - Características Físicas The Huxley
#include <stdio.h>
#define MAX_PESSOAS 100
typedef struct {
int idade;
char sexo;
char corDosOlhos;
char cabelos;
} pessoa;
@eduardojunio
eduardojunio / 263.c
Last active September 4, 2016 13:21
263 - Interseção entre listas The Huxley
#include <stdio.h>
#define TAMANHO 20
void lerArray(int tamanho, int array[]);
void ordernarCrescente(int tamanho, int array[]);
void removerRepetidos(int tamanho, int array[]);
int existeNasArrays(int numero, int tamanho, int array1[], int array2[]);
void interArrays(int tamanho, int array1[], int array2[]);