Skip to content

Instantly share code, notes, and snippets.

@giantchen
giantchen / Thread.h
Created November 22, 2011 01:53
Thread detach
#pragma once
#include <boost/function.hpp>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <pthread.h>
class Thread : boost::noncopyable
{
@giantchen
giantchen / nbody.c
Created August 14, 2011 04:25
Data Abstraction in C++
/*
* The Computer Language Benchmarks Game
* http://shootout.alioth.debian.org/
*
* contributed by Christoph Bauer
* modified by bearophile
*/
#include <math.h>