Skip to content

Instantly share code, notes, and snippets.

@gpad
gpad / FixedRandom
Created June 23, 2014 20:51
FixedRandom, come fare in modo che fixed random ritorni i 3 numeri passati?
#include <iostream>
using namespace std;
template<class Random>
class MyObject
{
Random _rand;
int _sum;
public:
@gpad
gpad / http_actor
Created June 6, 2014 13:20
Example of http server
#include <cppa/cppa.hpp>
#include <cppa/optional.hpp>
using namespace std;
using namespace cppa;
using namespace cppa::io;
optional<uint16_t> as_u16(const std::string& str)
{
return static_cast<uint16_t>(stoul(str));