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
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>, |
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
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 ) |
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
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 ) |
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 "gmock/gmock.h" | |
#include "poc.h" | |
#include <string> | |
namespace { | |
using namespace std; | |
using poc::Poc; | |
using ::testing::Test; | |
using ::testing::Return; |
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
#pragma once | |
namespace poc { | |
template <typename T> | |
struct IPoc | |
{ | |
virtual ~IPoc() {} | |
virtual const bool operator() () = 0; | |
virtual void abstract_method() const = 0; |
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
# 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"; | |
} |
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
# 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) |
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
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": } |
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
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(); |
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
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" ); |