Skip to content

Instantly share code, notes, and snippets.

@biot023
biot023 / compiler errors
Created March 16, 2013 23:37
Concept / copy-constructor issues
lib/nnet/include/nnet/wrapped_stack.h:22:17: error: no member named 'size' in 'nnet::WrappedStack<int>'
__stack.size(); // TODO -- DELETE THIS LINE, FOR TESTING ONLY.
~~~~~~~ ^
lib/nnet/include/nnet/wrapped_stack.h:37:49: note: in instantiation of member function 'nnet::wrapped_stack_t<nnet::WrappedStack<int>, int>::push' requested here
WrappedStack( S &stack ) : __stack( new wrapped_stack_t<S, T>( stack ) ) {}
^
/opt/local/libexec/llvm-3.2/bin/../lib/c++/v1/memory:1681:31: note: in instantiation of function template specialization 'nnet::WrappedStack<int>::WrappedStack<nnet::WrappedStack<int> >' requested here
::new((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
^
/opt/local/libexec/llvm-3.2/bin/../lib/c++/v1/memory:1608:18: note: in instantiation of function template specialization 'std::__1::allocator<nnet::WrappedStack<int> >::construct<nnet::WrappedStack<int>,
class Broadcaster < Struct.new( :listeners )
def broadcast( message, *args )
listeners.each { |listener| listener.send( message, *args ) }
end
end
module Services
class ItemCreate < Broadcaster
def initialize( params, *listeners )
super( listeners )
namespace persistence {
using ::testing::Invoke;
template <typename T>
struct MockCreator : public Creator<T>
{
typedef map<string, Variant> values_map_t;
MockCreator( shared_ptr<const T> object, shared_ptr<IConnection> connection )
: Creator<T>( object, connection )
#include "gmock/gmock.h"
#include "poc.h"
#include <string>
namespace {
using namespace std;
using poc::Poc;
using ::testing::Test;
using ::testing::Return;
#pragma once
namespace poc {
template <typename T>
struct IPoc
{
virtual ~IPoc() {}
virtual const bool operator() () = 0;
virtual void abstract_method() const = 0;
# This is a basic VCL configuration file for varnish. See the vcl(7)
# man page for details on VCL syntax and semantics.
#
# Default backend definition. Set this to point to your content
# server.
#
backend default {
.host = "our-lovely-image-server.com";
.port = "80";
}
# Configuration file for varnish
#
# /etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and $MEMLOCK
# to be set from this shell script fragment.
#
# Should we start varnishd at boot? Set to "no" to disable.
START=yes
# Maximum number of open files (for ulimit -n)
class imageserver {
class { "users": }
class { "bashrc": }
class { "packages": }
class { "gems": }
class { "apache2": }
}
node "ip-xx-xx-xx-xx.eu-west-1.compute.internal" {
class { "imageserver": }
ImageBox.prototype.setFailed = function() {
var self = this;
this.element.removeClass( "uploading" );
this.element.addClass( "failed" );
this.state = "failed";
this.element.delay( 2000 ).fadeOut( 300, function() {
self.element.remove();
self.widget.imageBoxes.splice( self.widget.imageBoxes.indexOf( self ), 1 );
self.widget.populateImageBoxes();
self.widget.setSelectionBox();
describe( "setFailed()", function() {
var imageBox = new ImageBox( widget, boxesList );
var element = new MockElement();
var subject = function() { imageBox.setFailed(); return imageBox; }
beforeEach( function() {
widget.imageBoxes = [ {}, imageBox, {} ];
imageBox.element = element;
spyOn( element, "removeClass" );