Skip to content

Instantly share code, notes, and snippets.

@kogemrka
kogemrka / makefile
Created April 25, 2012 18:29
makefile для компиляции примера к sqlite
CC=gcc
CFLAGS=-c -Wall -Wextra -Werror -ggdb
LDFLAGS=-lsqlite3 -lpthread -ldl
all: test
test: test.o
$(CC) $^ $(LDFLAGS) -o $@
test.o: test.c
@kogemrka
kogemrka / gist:1492888
Created December 18, 2011 09:50
Дерево отрезков
#include <iostream>
#include <vector>
#include <stdexcept>
#include <iomanip>
#include <sstream>
template <class T>
class SumPolicy
{
public:
#include <iostream>
#include <vector>
#include <memory>
#include <fstream>
#include <exception>
#include <algorithm>
#include <stdexcept>
/* TODO (вот она, десяточка моей мечты)
- Причесать функторы
@kogemrka
kogemrka / gist:1400133
Created November 28, 2011 11:53
serialization
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
// Only for POD types
template <class T>
void serialize(T& obj, std::ostream& out)
{
//size_t s = sizeof(obj);
#include <iostream>
#include <vector>
#include <list>
#include <set>
class Point
{
public:
Point()
{