This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Properties with getter/setter function calls | |
// | |
// Copyright 2011 Michał Papierski <[email protected]> | |
// | |
// This program is free software; you can redistribute it and/or modify | |
// it under the terms of the GNU General Public License as published by | |
// the Free Software Foundation; either version 2 of the License, or | |
// (at your option) any later version. | |
// | |
// This program is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Write GUI applications in an compile-time abstract language | |
// | |
// Copyright 2011 Michał Papierski <[email protected]> | |
// | |
// This program is free software; you can redistribute it and/or modify | |
// it under the terms of the GNU General Public License as published by | |
// the Free Software Foundation; either version 2 of the License, or | |
// (at your option) any later version. | |
// | |
// This program is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import re | |
from StringIO import StringIO | |
import BaseHTTPServer | |
def home_page(): | |
''' Home page ''' | |
import random | |
print 'Hello world' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <cstdio> | |
template <int N> | |
struct bottles; | |
template <> | |
struct bottles<100> | |
{ | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <iostream> | |
#include <queue> | |
#include <stdexcept> | |
struct policy | |
{ | |
}; | |
struct allocator: policy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <libxml/parser.h> | |
#include <libxml/tree.h> | |
#include <libxml/HTMLtree.h> | |
struct xml_attribute | |
{ | |
xmlNodePtr node_; | |
std::string key_; | |
xml_attribute(xmlNodePtr node, std::string const & key) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdexcept> | |
#include <boost/type_traits.hpp> | |
#include <boost/utility/enable_if.hpp> | |
class binstream | |
{ | |
public: | |
struct str | |
{ | |
inline str(char * & output, std::size_t length) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <boost/tuple/tuple.hpp> | |
#include <boost/utility.hpp> | |
#include <vector> | |
#include <boost/typeof/typeof.hpp> | |
#include <boost/foreach.hpp> | |
struct person | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# cgicc 3.2.10 cmakified | |
# by Michal Papierski <[email protected]> | |
# | |
cmake_minimum_required (VERSION 2.8.7) | |
project (cgicc) | |
set (VERSION "3.2.10") | |
execute_process (COMMAND "(hostname || uname -n) 2>/dev/null | sed 1q" | |
RESULT_VARIABLE HOST) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// how to use boost.asio + sendfile(2) | |
// Michał Papierski <[email protected]> | |
#include <iostream> | |
#include <string> | |
#include <boost/asio.hpp> | |
#include <boost/make_shared.hpp> | |
#include <boost/shared_ptr.hpp> | |
#include <boost/ref.hpp> | |
#include <boost/bind.hpp> | |
#include <boost/enable_shared_from_this.hpp> |
OlderNewer