Skip to content

Instantly share code, notes, and snippets.

//
// main.c
// Playground
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_TEXT 100
@geekskick
geekskick / composite.cpp
Last active February 11, 2018 15:22
Composite Pattern - Runnable
#include <iostream>
#include <deque>
void x(void){
std::cout << "Doing x" << std::endl;
}
void y(void){
std::cout << "Doing y" << std::endl;
}
#include <iostream>
#include <vector>
#include <string>
#include <unordered_map>
class LineBuffer;
class Output{
public:
void refresh(void){
std::cout << "Output::refresh\n";
#include <iostream>
class word{
public:
virtual const std::string get() const = 0;
};
class word_decorator: public word{
public:
word_decorator(const word& inner) : m_i{inner}{}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace PhillyC1
{
struct Split
{
public int startIdx;
extern crate clap;
extern crate diesel;
extern crate diesel_demo;
extern crate log;
extern crate simple_logger;
use self::diesel::prelude::*;
use self::diesel_demo::*;
use self::models::*;
use clap::{App, Arg};