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
/* | |
Locadora GeeksBR | |
Esse é um programa que implementa uma locadora de filmes. | |
Possui algumas funções, as atualizações de arquivos são feitas no momento | |
que são alterados os dados. | |
Os ID's dos filmes e dos clientes são gerados automaticamente. | |
O código está todo comentado. |
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 <string.h> | |
int main() | |
{ | |
char nome[] = "linguagem c"; | |
printf("%s\n" , nome); | |
printf("%d\n" , strlen(nome)); |
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
/* | |
Implementação do QuickSort em C | |
Autor: Marcos Castro - www.GeeksBR.com | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> // srand, rand | |
#include <time.h> // time | |
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
/* www.GeeksBR.com */ | |
/* Implementação de árvore binária */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
/* Cada nó armazena três informações: | |
nesse caso um número (num), | |
ponteiro para subárvore à direita (sad) |
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
// Implementação do algoritmo de Dijkstra | |
// Teste: http://br.spoj.com/problems/ENGARRAF/ | |
#include <iostream> | |
#include <list> | |
#include <queue> | |
#define INFINITO 10000000 | |
using namespace std; |
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
<html> | |
<head> | |
<title>Formato CPF</title> | |
<script src="script.js"></script> | |
</head> | |
<body> | |
<h3>Digite seu CPF:</h3> | |
<form name="cadastro"> | |
<input type="text" name="cpf" \ | |
pattern="\d{3}\.\d{3}\.\d{3}-\d{2}" \ |
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
/* | |
Visite: www.GeeksBR.com | |
Programação em C - Lista encadeada (linked list) | |
Funcionalidades: | |
1) - Criar lista | |
2) - Adicionar na lista | |
3) - Listar os elementos da lista | |
4) - Verificar se a lista está vazia | |
5) - Buscar elemento na lista | |
6) - Remover elemento da lista |
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
/* Gera todas as permutações */ | |
#include <stdio.h> | |
void troca(int vetor[], int i, int j) | |
{ | |
int aux = vetor[i]; | |
vetor[i] = vetor[j]; | |
vetor[j] = aux; | |
} |
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
''' | |
Get Bitcoin Value | |
http://api.coindesk.com/v1/bpi/currentprice.json | |
''' | |
import urllib.request, json, time | |
def obter_valor(): | |
try: | |
url = "http://api.coindesk.com/v1/bpi/currentprice.json" |
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
/* | |
Implementação do algoritmo de Kosaraju | |
Detecta componentes fortemente conectadas | |
*/ | |
#include <iostream> | |
#include <stack> | |
#include <list> | |
using namespace std; |
NewerOlder