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
#ifndef _CERTUGOL_H_ | |
#define _CERTUGOL_H_ | |
#define se if | |
#define paratodo for | |
#define enquanto ; | |
#define principal main | |
#define vazio void | |
#define retorne return | |
#define inteiro int |
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
// Mutual Exclusion Example | |
#include <pthread.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#define NUM_THREADS 500 | |
#define N_SUM 100000 | |
void* sum(void *t) | |
{ |
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> | |
typedef struct _{ | |
_& operator()(void){ | |
static int n = 0; | |
std::cout << n << std::endl; | |
n++; | |
return *this; | |
} | |
}_; |
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(){ | |
unsigned long long int n[38]; | |
n[0] = 0xa330a320a310a30; | |
n[1] = 0xa370a360a350a34; | |
n[2] = 0x310a30310a390a38; | |
n[3] = 0xa33310a32310a31; |
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 <fstream> | |
#include <sstream> | |
#include <rapidxml/rapidxml.hpp> | |
#include <rapidxml/rapidxml_utils.hpp> | |
void bufferize(char* file_name, char*& buffer, size_t& size){ | |
//tamanho | |
FILE* file = fopen(file_name, "r"); | |
fseek(file, 0L, SEEK_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
#include <iostream> | |
#include <opencv2/core/core.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
using namespace std; | |
using namespace cv; | |
#define WINDOW_TITLE "Modular Fractal" | |
#define IMG_WSIZE 750 | |
#define IMG_HSIZE 750 |
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 BUFFER_SIZE 4098 | |
#define ERROR_MSG "Não pôde abrir o arquivo %s.\n" | |
#define USAGE_MSG "USAGE: %s <file> [file ...]\n" | |
unsigned char naive_hash(char* filename){ | |
FILE* file = fopen(filename, "r"); | |
if(!file){ |
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> | |
#define USAGE "USAGE: %s <cifra|decifra> [arquivo_entrada.txt]\n" | |
#define BUFFER_SIZE 2048 | |
#define CMD_CIFRA "cifra" | |
#define CMD_DECIFRA "decifra" | |
#define N_ALF 26 |
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 <math.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#define N 100000 | |
#define N_ITER 10 | |
#define long_int unsigned long long int | |
long_int randf(long_int a){ |
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
*.aux | |
*.glo | |
*.idx | |
*.log | |
*.toc | |
*.ist | |
*.acn | |
*.acr | |
*.alg | |
*.bbl |