Skip to content

Instantly share code, notes, and snippets.

View caloni's full-sized avatar

Wanderley Caloni caloni

View GitHub Profile
@caloni
caloni / joao_pedro_brites.cpp
Last active February 10, 2023 10:21
João Pedro Brites no Império C++
//******TESTAR EM LINUX******
//*******CONFERIR SE A IDENTAÇÃO ESTÁ HOMOGENEA OU ESPACOS OU TAB********
//*****CRIAR CABEÇALHO******
//TODO colocar exemplo de CSV, já que ele começa lendo um.
#include <iostream>
#include <fstream>
#include <iomanip>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <string.h>
#define MAX_BEBIDAS_NA_ESTEIRA 3
#define MAX_ESTEIRAS 2
typedef struct esteira_s
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int cmpstr(void const *a, void const *b)
{
const char const *aa = *(const char const **)a;
const char const *bb = *(const char const **)b;
return strcmp(aa, bb);
#include <string>
#include <iostream>
enum string_code
{
sc_1,
sc_2,
sc_3,
sc_none
};
#include <string>
#include <iostream>
#define switch(a) auto switch_cmp = a;
#define case(a) if( switch_cmp == a )
int main()
{
std::string test = "3";
#include <stdio.h>
#include <string.h>
int M[100][100];
int J[100];
int main() {
int T, N, n, t, i, j, k, ic, ii, jj, kk;
scanf("%d", &T);
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
from itertools import islice
TilePositions = [
[32, 216], [153, 216], [274, 216], [395, 216],
[32, 339], [153, 339], [274, 339], [395, 339],
[32, 461], [153, 461], [274, 461], [395, 461],
[32, 584], [153, 584], [274, 584], [395, 584]
/** Imprime uma tabela alinhando a primeira coluna à esquerda e a segunda
coluna à direita, respeitando o tamanho do maior campo da primeira coluna.
*/
void printf_string_align_variable_size()
{
struct GitBranches branches[2];
char* cr;
size_t len1, len2, maxlen;
printf("master branch: ");
import chess.pgn
import io
import sys
import urllib.request
def getpgn(path):
if path.find("http") == 0:
response = urllib.request.urlopen(path)
data = response.read()
text = data.decode('utf-8')
/** Interpreta argumentos da linha de comando (versão raiz).
@author Wanderley Caloni <wanderley.caloni@bitforge.com.br>
@date 2018-08
--- ---
argv: | * |--> | * | "testbin"
--- ---
---
| * | "foo"