Skip to content

Instantly share code, notes, and snippets.

Avatar
🌌
Writing templated lambda factories

decltype(auto) AeroStun

🌌
Writing templated lambda factories
  • work@aerostun.dev
View GitHub Profile
@AeroStun
AeroStun / FindBoost.cmake
Created Jan 16, 2021 — forked from thiagowfx/FindBoost.cmake
FindBoost.cmake (DONT'T DELETE THIS! It's linked in a Stack Overflow answer)
View FindBoost.cmake
# - Find Boost
#
# Copyright (c) 2016 Thiago Barroso Perrotta
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
View http_date.hpp
/* Note: HTTP time is defined by RFC2616 at section 3.3.1
*/
/** The datatype which represents an HTTP date-time
*/
using date_time = boost::local_time::local_date_time;
/** Turns an HTTP date string into a date_time
View API.hpp
enum class stream_wrapper {
none,
zlib, // RFC1950
gzip, // RFC1952
dynamic // all three types are allowed and can be chosen at compile-time
};
template <stream_wrapper wrap = stream_wrapper::none>
class basic_deflate_stream;
using raw_deflate_stream = basic_deflate_stream<>;
using zlib_stream = basic_deflate_stream<stream_wrapper::zlib>
View ScreenTask.React.cs
// ScreenTask.React
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
public class React
{
public static object[] De(byte[] array, int first)
{
View .clang-tidy
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,*,-android-*,-bugprone-bool-pointer-implicit-conversion,-cert-env33-c,-cert-dcl16-c,-cert-dcl50-cpp,-cert-dcl59-cpp,-cppcoreguidelines-non-private-member-variables-in-classes,cppcoreguidelines-no-malloc,cppcoreguidelines-owning-memory,cppcoreguidelines-pro-bounds-array-to-pointer-decay,cppcoreguidelines-pro-bounds-constant-array-index,cppcoreguidelines-pro-bounds-pointer-arithmetic,cppcoreguidelines-pro-type-const-cast,cppcoreguidelines-pro-type-cstyle-cast,cppcoreguidelines-pro-type-reinterpret-cast,cppcoreguidelines-pro-type-union-access,cppcoreguidelines-pro-type-vararg,cppcoreguidelines-special-member-functions,-fuchsia-*,-google-*,google-default-arguments,google-explicit-constructor,google-runtime-member-string-references,google-runtime-operator,-hicpp-braces-around-statements,-hicpp-named-parameter,-hicpp-no-array-decay,-hicpp-no-assembler,-hicpp-no-malloc,-hicpp-function-size,-hicpp-special-member-functions,-hicpp-vararg,-hicpp-uppercase-literal
View props.yaml
##########################################################################################
# Challenges
# Rewards and required items have to be described using Bukkit Materials
# and be exactly correct
# Do not use Type Id's - they will not work
# Challenges can be one of three types - inventory, island or level.
# inventory - means the player must have the items on them
# island - means the items have to be on the island and within 10 blocks of the player
# entities are also supported, e.g., COW.
# level - means the island level has to be equal or over this amount.
View Hugo-to_hex-opti1.cxx
#include <iostream>
#include <string>
#include <cmath>
int find_exp(int dec){
#ifndef __GNUG__
int n = 0;
for(int be = 0; dec >= be; ++n){
be = 1 << (4 * (n + 1));
}