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
//gerenciar informações sobre alunos de um curso de ateísmo | |
#include <stdio.h> | |
#include <stdlib.h> | |
struct Exam { | |
char topic[50]; | |
float grade; | |
}; |
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
/* app/assets/application.scss */ | |
/* real time form validation */ | |
.form-group-valid input { | |
border-color: #28a745 !important; | |
padding-right: calc(1.5em + .75rem) !important; | |
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") !important; | |
background-repeat: no-repeat !important; | |
background-position: right calc(.375em + .1875rem) center !important; |
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
//b | |
void exibir_intercalado(ptr lista1, ptr lista2){ | |
while (lista1 != NULL || lista2 != NULL) { | |
if(lista1 == NULL){ | |
printf("%c", lista2->data); | |
lista2 = lista2->link; | |
continue; | |
} else{ | |
printf("%c", lista1->data); | |
lista1 = lista1->link; |
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
// Considerando o programa que cria listas encadeadas e tem funções para incluir elemento no início da lista, retirar elemento inicial da lista, e exibir a lista, desenvolva e teste no próprio programa as seguinte funções (a lista sempre deve ser passada como parâmetro): | |
// a) Construa uma função que retorne a quantidade de elementos de uma lista encadeada simples que será passada como parâmetro; | |
// b) Construa uma função que transforme uma lista encadeada simples em uma lista encadeada circular; | |
// c) Construa uma função que altere a função do item (a) para transorme uma lista encadeada circularque receba como parâmetro uma lista encadeada circular e retorne sua quantidade de elementos; | |
// d) Construa uma função que altere a função do item (b) para que esta transforme uma lista encadeada circular em uma lista encadeada simples; |
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 <stdio.h> | |
#include <stdlib.h> | |
typedef struct nodo { | |
char data; | |
struct nodo *link; | |
} *ptr; | |
typedef struct pilha { | |
int tam; |
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 <stdio.h> | |
int main(void) { | |
typedef struct { | |
char vet[3]; | |
int front,rear; | |
} tfila; | |
void create(tfila *f){ | |
f->front = 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
#include <stdio.h> | |
#define TAM 10 | |
int main(void) { | |
typedef struct pilha{ | |
char vet[TAM]; | |
int topo; | |
} tpilha; | |
void create(tpilha *p){ |
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
module ApplicationHelper | |
def markdown(content) | |
return '' if content.blank? | |
markdown = Redcarpet::Markdown.new(Redcarpet::Render::XHTML, | |
autolink: true, | |
space_after_headers: true, | |
tables: true) | |
markdown.render(content) | |
sanitize(markdown.render(content)).html_safe |
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
def markdown(content) | |
return '' if content.blank? | |
markdown = Redcarpet::Markdown.new(Redcarpet::Render::XHTML, | |
autolink: true, | |
space_after_headers: true, | |
tables: true) | |
markdown.render(content) | |
sanitize(markdown.render(content)).html_safe | |
end |
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
from random import sample | |
import multiprocessing | |
from copy import copy, deepcopy | |
from time import clock, time, sleep | |
from pylab import plot, title, legend, xlabel, ylabel, grid, show, ticklabel_format, hist, scatter, axis | |
import sys | |
def tempo(f,*a): | |
'''Devolve o tempo de execução (aproximado) de uma função f com argumentos *a''' | |
i = time() |
NewerOlder