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
/** 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: "); |
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 <string> | |
class T { | |
public: | |
inline operator std::string() const { | |
return ""; | |
} | |
explicit inline operator uint64_t() const | |
{ |
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 <string> | |
class T { | |
public: | |
inline operator std::string() const { | |
return ""; | |
} | |
explicit inline operator uint64_t() const | |
{ |
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 <windows.h> | |
#include <stdio.h> | |
#define INITIAL_BUFFER (MAX_PATH * 5) | |
char *listAllDirectories(char *path) { | |
WIN32_FIND_DATA data; | |
size_t bufferSize = INITIAL_BUFFER; | |
char *directories = (char*)calloc(1, bufferSize); | |
char *buffer = directories; |
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 problema_1001(): | |
A = int( input() ) | |
B = int( input() ) | |
print("X =", A + B) | |
problema_1001() |
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 "picoro/picoro.h" | |
#include <stdio.h> | |
#include <gmodule.h> | |
void* print_number(void* arg) | |
{ | |
int* number = (int*)arg; | |
int counter = *number; | |
while (counter--) | |
{ |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <assert.h> | |
static const size_t MAX_BLOCKS = 1000; | |
static size_t next_free_block = 0; | |
void* blocks[MAX_BLOCKS] = {}; | |
void* block_alloc(size_t bytes) |
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
#! /bin/sh | |
# From configure.ac Revision: 1.583 . | |
# Guess values for system-dependent variables and create Makefiles. | |
# Generated by GNU Autoconf 2.69 for OpenSSH Portable. | |
# | |
# Report bugs to <openssh-unix-dev@mindrot.org>. | |
# | |
# | |
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. | |
# |
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
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4128.html#an-iterables-end-may-have-a-different-type-than-its-begin | |
// sentinels | |
#include <algorithm> | |
#include <vector> | |
#include <iostream> | |
#include <iterator> | |
using namespace std; | |
// For determining whether an iterator refers to a null value: |