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
GNU GENERAL PUBLIC LICENSE | |
Version 2, June 1991 | |
Copyright (C) 1989, 1991 Free Software Foundation, Inc., | |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
Everyone is permitted to copy and distribute verbatim copies | |
of this license document, but changing it is not allowed. | |
Preamble |
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
/* | |
* list.c | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include "list.h" | |
struct Node *addFront(struct List *list, void *data) |
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
/* | |
* stringview.cpp | |
* | |
* Created on: Jan 6, 2021 | |
* Author: andrewrubinstein | |
*/ | |
#include "string_view.hpp" | |
#include "SubStr.hpp" |
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
function logToServer(data, path) { | |
fetch(path, { | |
method: "POST", | |
headers: { | |
"Content-Type": "application/json" | |
}, | |
body: JSON.stringify(data) | |
}).then(res => { console.log("Request complete! response:", data); }); | |
} | |
async function readFromServer(path) { |
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 GuiTextBox implements GuiElement { | |
text:string; | |
asNumber:Optional<number>; | |
rows:TextRow[]; | |
canvas:HTMLCanvasElement; | |
ctx:CanvasRenderingContext2D; | |
cursor:number; | |
scaledCursorPos:number[]; | |
cursorPos:number[]; |
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 <iostream> | |
template <typename T> | |
class vector { | |
private: | |
int size; | |
int internal_size; | |
T *data; | |
void printRecursive(std::ostream &o, int index) const | |
{ |
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 | |
/* | |
* HashMap.hpp | |
* | |
* Created on: Mar 31, 2022 | |
* Author: andrewrubinstein | |
*/ | |
#include <memory> | |
template <typename t, typename u> | |
class FlatMap { |
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 <cmath> | |
#include <iostream> | |
#include <string> | |
#include <cinttypes> | |
#include <stdexcept> | |
bool isdigit(uint8_t c) | |
{ | |
return c - 48 < 10; | |
} |
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
/* | |
* Map.h | |
* | |
* Created on: Mar 31 2022 | |
* Author: andrew | |
*/ | |
#ifndef Map_H_ | |
#define Map_H_ | |
#include <stack> |
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
/* | |
* StackSegment.h | |
* | |
* Created on: Mar 1, 2021 | |
* Author: andrewrubinstein | |
*/ | |
#ifndef STACKSEGMENT_HPP_ | |
#define STACKSEGMENT_HPP_ | |
#include "stack.hpp" |