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 <iostream> | |
#include <vector> | |
#include <stdlib.h> | |
#include <time.h> | |
/* | |
g++ -o onemax genetico_onemax.cpp -Wall | |
*/ | |
#define TAM_GENES 10 // Quantidade de genes que terá cada individuo. | |
#define TAM_POP 50 // Quantos individuos terão. | |
#define TORNEIO 20 // Quantidade de cruzamentos. |
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> | |
/* | |
* Por Bruno La Porta | |
* Em 01/09/15 | |
* | |
* Apenas um simples exemplo de como trocar os valores de uma variavel com outra sem a utilização de uma variavel auxiliar. | |
* */ | |
int main() |
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 "lista.h" | |
// Verifica se há algum elemento para ser ligado. | |
void verifica(node *lista){ | |
if(!lista){ | |
printf("Sem memoria suficiente.\n"); | |
exit(1); | |
} | |
} |
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
#!/usr/bin/env python | |
# -*- coding:latin-1 -*- | |
''' | |
Created on 29/04/2015 | |
Author: Bruno | |
This code is a only exemple who to do a basic CRUD in Python 2.7 with MongoDB 2.6. | |
''' |