Skip to content

Instantly share code, notes, and snippets.

@pluskid
pluskid / gist:2489859
Created April 25, 2012 13:51
experimental shogun labels design
template <typename LabelType, LabelStoreType>
class CLabels: public CSGObject
{
public:
virtual int32_t get_num_classes() const = 0;
virtual const LabelType& get_label(int32_t index) const
{
check_out_of_range(index);
return cast_label(m_labels[index]);
}
@pluskid
pluskid / auto_ptr.h
Created April 7, 2012 04:01
Automatic ref-counting
#ifndef AUTO_PTR_H__
#define AUTO_PTR_H__
template <typename T>
class auto_ptr
{
public:
auto_ptr():m_rawptr(NULL)
{
}
@pluskid
pluskid / gist:2204698
Created March 26, 2012 12:11
java modular compile error
Buildfile: /tmp/yaourt-tmp-pluskid/aur-shogun-git/src/shogun-build/src/interfaces/java_modular/build.xml
compile:
[mkdir] Created dir: /tmp/yaourt-tmp-pluskid/aur-shogun-git/src/shogun-build/src/interfaces/java_modular/classes
[javac] /tmp/yaourt-tmp-pluskid/aur-shogun-git/src/shogun-build/src/interfaces/java_modular/build.xml:18: warning: '
includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 620 source files to /tmp/yaourt-tmp-pluskid/aur-shogun-git/src/shogun-build/src/interfaces/java_mo
dular/classes
[javac] /tmp/yaourt-tmp-pluskid/aur-shogun-git/src/shogun-build/src/interfaces/java_modular/org/shogun/modshogunJNI.
java:6537: error: cannot find symbol
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
///////////////////////////////////////////////////////////////////////////////
//
// A Roman Numerals Parser (demonstrating the symbol table). This is
// discussed in the "Symbols" chapter in the Spirit User's Guide.
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
let mapleader=","
filetype on
syntax on
if has('gui_running')
color ir_black
else