Skip to content

Instantly share code, notes, and snippets.

View heatblazer's full-sized avatar
😉
working... probably

ilian zapryanov heatblazer

😉
working... probably
  • this->company
  • there
View GitHub Profile
#include <iostream>
#if 0
#define BINDABLE \
template<typename Type1, typename Type2> \
friend void* bind(const Type1& t1, const Type2& t2); \
\
template<typename Type1, typename Type2> \
friend void* bind(Type1* t1, Type2* t2); \
\
template<typename Type1, typename Type2> \
<({ # open tag
(data: [1,2,3,4]);
{key : "value"};
{key: <({ #nesting
})>}
>)} #close tag
#include <iostream>
#include <algorithm>
#include <vector>
#include <functional>
#include <optional>
int foo(int i)
{
return i + 10;
@heatblazer
heatblazer / clrhost.cpp
Last active May 8, 2019 09:08
calling C# from C++
// IVZ
#include "CLRHostNet2.h"
#pragma region Includes and Imports
#include <windows.h>
#include <metahost.h>
#pragma comment(lib, "mscoree.lib")
#include <iostream>
using namespace std;
class Tree
{
struct Node
{
int data;
#include <iostream>
#include <atomic>
#include <thread>
const int COUNT = 300;
using namespace std;
int main()
@heatblazer
heatblazer / split.cpp
Last active March 5, 2019 21:22
test split
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
static int split(const char* str, char delim, std::vector<std::string>& out)
{
const char* begin = str;
const char* it = strchr(str, delim);
if (it != NULL)
#include <iostream>
template <class T, class U> void binder(const T& ref, const U& other);
class A
{
int a, b;
public:
@heatblazer
heatblazer / rle.c
Created December 8, 2018 13:42
RLE algorithm
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static int codes[0xFF]= {0};
static void addcode(unsigned char c)
{
codes[(int)c]++;
}
#include <iostream>
template <int N> struct SolveQ
{
unsigned char mat[N][N];
SolveQ()
{
for(int i=0; i < N; ++i)
{