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
--- | |
BasedOnStyle: Google | |
AlignAfterOpenBracket: AlwaysBreak | |
AlignConsecutiveAssignments: 'true' | |
AlignConsecutiveDeclarations: 'true' | |
AlignTrailingComments: 'true' | |
AllowAllParametersOfDeclarationOnNextLine: 'false' | |
AllowShortBlocksOnASingleLine: 'true' | |
AllowShortCaseLabelsOnASingleLine: 'true' | |
AllowShortIfStatementsOnASingleLine: 'true' |
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
printf: # a0: address of format string | |
# a1, a2, a3: arguments 1, 2 and 3 | |
# example: printf("this is a format string with %d %s",int,string address) | |
# example: printf("this is another format string with %c %f\n",char,double address) | |
# %<indicator> will be replaced by the value of the argument. | |
addi $sp, $sp, -28 | |
sw $t0, ($sp) | |
sw $t1, 4($sp) | |
sw $t2, 8($sp) | |
sw $a0, 12($sp) |
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
# I use the .cxx extension for source files that define main. | |
CXX := g++## What compiler we are using | |
CXXFLAGS := -std=c++17 -Wall -Wextra -Wpedantic -Werror## Compiler flags for all operations | |
# Directories | |
SRCDIR := src## Where the source files are located | |
OBJDIR := build## Where the object files will be placed | |
BINDIR := bin## Where the finished executable will be placed | |
INCDIR := include## Additional include directories | |
# File GLOBs |
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> // std::ostream, std::cout, std::cin | |
#include "simpleCSVParse.hpp" // parseCSVLine, option | |
#include "repr.hpp" // Repr | |
// need to make representation for a optional value | |
template<class T> | |
struct Repr<option<T>> { | |
const option<T>& value; | |
explicit Repr(const option<T>& v) : value{v} {} |
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
// Created by Kace Cottam, 4/20/2021 | |
#include <array> | |
#include <list> | |
#include <utility> // std::pair | |
// std::unordered_map<Key, Value, Hash=std::hash<Key>> | |
template<class Key, class Value, int NumberOfBuckets = 117, class Hash = std::hash<Key>> | |
class ChainingHashTable { | |
private: |
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
// Created by Kace Cottam, 5/3/2021 | |
use std::hash::{Hash, Hasher}; | |
use std::collections::hash_map::DefaultHasher; | |
use std::cmp::PartialEq; | |
pub trait Hashable { | |
// good looking way to hash an item | |
fn hash(&self) -> u64; | |
} |
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
#!/bin/bash | |
# A git command for adding files to the gitignore | |
for i in $*; do echo $i >> .gitignore; done | |
git add .gitignore |
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
a.so: a.c | |
gcc -fPIC -shared -o a.so a.c | |
.PHONY: run | |
run: a.so Program.cs | |
LD_LIBRARY_PATH="./;$$LD_LIBRARY_PATH" dotnet run |