Skip to content

Instantly share code, notes, and snippets.

/*
// for this particular class, we don't want to do that:
struct A {
//... ctors etc
// (long) series of useful methods accessing private members
int method1();
int method2();
int method3();
a^2 = ?
let a = 50 - b
just for fun cuz we can. see below
then
b = 50 - a
then
a^2 = (50 - b)^2
#include <boost/iterator/transform_iterator.hpp>
#include <boost/filesystem.hpp>
struct iterator
: public std::unary_function<char const*, boost::filesystem3::directory_entry const&>
{
char const* operator()(boost::filesystem3::directory_entry const& p) const
{
return p.path().c_str();
}
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.