Skip to content

Instantly share code, notes, and snippets.

@JamesBremner
JamesBremner / main.cpp
Last active November 27, 2023 18:15
Display Calendars
#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <vector>
#include <time.h>
/// Display a base calendar
class cCalendar
{
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <vector>
#include <math.h>
#include <algorithm>
// graph theory library https://github.com/JamesBremner/PathFinder
#include "../PathFinder/src/GraphTheory.h"
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <vector>
#include <algorithm>
#include "../PathFinder/src/GraphTheory.h"
class cPirateIslands
{
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <vector>
#include <algorithm>
#include <wex.h>
#include "plot2d.h"
#include "cStarterGUI.h"
@JamesBremner
JamesBremner / cOSMOverpass.h
Created September 16, 2023 16:03
Header only C++ wrapper for Open Street Map Overpass API
/// @brief Header only C++ wrapper for Open Street Map Overpass API
//
// https://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide
//
// Dependency: cpp-httplib https://github.com/yhirose/cpp-httplib
// (c) 2023 James Bremner
//
#define WIN32_LEAN_AND_MEAN
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include "GraphTheory.h"
#include <boost/config.hpp>
#include <iostream>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <boost/property_map/property_map.hpp>
using namespace boost;
#include <iostream>
#include <vector>
#include <cmath>
#include <limits>
#include <queue>
#include <map>
#include <cfloat>
#include <set>
@JamesBremner
JamesBremner / main.cpp
Last active March 14, 2023 18:26
Draw graph with vertices located on a 2D grid https://stackoverflow.com/q/75725261/16582
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <vector>
#include <algorithm>
#include <wex.h>
#include "cStarterGUI.h"
class cGrid2D
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <vector>
/// @brief A graph edge
class edge
{
public: