Skip to content

Instantly share code, notes, and snippets.

View caloni's full-sized avatar

Wanderley Caloni caloni

View GitHub Profile
f<int>
template<typename T>
void f(const T& value)
{
00252510 push ebp
00252511 mov ebp,esp
00252513 sub esp,0C0h
00252519 push ebx
0025251A push esi
@caloni
caloni / range-based-for-loops
Created July 31, 2017 22:29
VS 2017 15.3 Preview 5.0 test
// 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:
#! /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.
#
#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)
#include <stdio.h>
int main(int argc, char* argv[])
{
int ret = 0;
printf("Exemplo de Menu\n"
"===============\n");
char opt;
#include "picoro/picoro.h"
#include <stdio.h>
#include <gmodule.h>
void* print_number(void* arg)
{
int* number = (int*)arg;
int counter = *number;
while (counter--)
{
def problema_1001():
A = int( input() )
B = int( input() )
print("X =", A + B)
problema_1001()
#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;
#include <string>
class T {
public:
inline operator std::string() const {
return "";
}
explicit inline operator uint64_t() const
{
#include <string>
class T {
public:
inline operator std::string() const {
return "";
}
explicit inline operator uint64_t() const
{