This file contains hidden or 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
FROM ubuntu:xenial | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update | |
RUN apt-get install -y --no-install-recommends software-properties-common locate | |
RUN add-apt-repository ppa:beineri/opt-qt58-xenial -y | |
RUN apt-get update | |
RUN apt-get dist-upgrade -y | |
RUN apt-get install -y --no-install-recommends build-essential git cmake gettext snapcraft wget apt-utils |
This file contains hidden or 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 "ros/ros.h" | |
#include "sensor_msgs/JointState.h" | |
#include "topic_tools/shape_shifter.h" | |
#include "ros/message_traits.h" | |
#include <sstream> | |
template <typename T> | |
void SerializeToByteArray(const T& msg, std::vector<uint8_t>& destination_buffer) | |
{ | |
const uint32_t length = ros::serialization::serializationLength(msg); |
This file contains hidden or 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 FooA | |
{ | |
public: | |
FooA(){} | |
double calculateAnswer(double val) | |
{ | |
static double prev_val_ = 0; | |
if( val == 0.0 ) return 0.0; | |
This file contains hidden or 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 <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <assert.h> | |
#include <benchmark/benchmark.h> | |
static std::vector<int> CreateShuffledVector(unsigned n) | |
{ | |
std::vector<int> vect(n); | |
for (unsigned i=0; i<n; i++) vect[i] = i; |
This file contains hidden or 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
// implement std::vector | |
template <typename T> | |
class Vector | |
{ | |
public: | |
// to keep it simpler, iterators are just T* | |
typedef T* iterator; | |
typedef T* reverse_iterator; |
This file contains hidden or 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 | |
template <typename T> | |
class Vector | |
{ | |
public: | |
Vector(size_t order); // constructor for squared-matrix | |
Vector(const Vector& other); // copy constructor | |
~Vector(); //destructor |
This file contains hidden or 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 <stdio.h> | |
#include <memory> | |
#include <functional> | |
#include <list> | |
/** | |
* Super simple Signal/Slop implementation, AKA "Observable pattern". | |
* The subscriber is active until it goes out of scope or Subscriber::reset() is called. | |
*/ | |
template <typename... CallableArgs> |
This file contains hidden or 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 <iostream> | |
#include <cstring> | |
#include <unordered_map> | |
// https://github.com/martinmoene/string-view-lite | |
#include "string_view.hpp" | |
template <typename Value> | |
class StringMap: public std::unordered_map<std::string, Value> | |
{ | |
public: |
This file contains hidden or 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 <iostream> | |
#include <thread> | |
#include <mutex> | |
#include <condition_variable> | |
#include <atomic> | |
// The purpose of the this apparently fine application is to make you appreciate thread santizers | |
// https://clang.llvm.org/docs/ThreadSanitizer.html | |
class Foo{ |
This file contains hidden or 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
/* | |
Copyright 2013 Adobe | |
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) | |
*/ | |
/**************************************************************************************************/ | |
#ifndef STLAB_COPY_ON_WRITE_HPP | |
#define STLAB_COPY_ON_WRITE_HPP |