Skip to content

Instantly share code, notes, and snippets.

View RaneWallin's full-sized avatar
💭
Sprinting

Rane Wallin RaneWallin

💭
Sprinting
View GitHub Profile
@RaneWallin
RaneWallin / emcc.l
Last active November 1, 2020 01:15
Example of a lex file
%option noyywrap
A [a-zA-Z]
DIGIT [0-9]
/* 1. include other pattern definitions here, if needed. Digits maybe? */
%{
#include "tokens.h" /* Leave this section untouched */
@RaneWallin
RaneWallin / bnf_example
Created November 1, 2020 00:28
Backus Normal/Nauer Form example
<program> ::= <statement_list>
<statement_list> ::= <variable_def>
| <assignment_statement>
| <conditional_statement>
| <loop_statement>
| <block_statement>
| <variable_def> <statement_list>
| <assignment_statement> <statement_list>
| <conditional_statement> <statement_list>
| <loop_statement> <statement_list>
@RaneWallin
RaneWallin / main.dart
Created October 30, 2020 18:45
Deck of cards in Dart
void main() {
Deck deck = new Deck();
print(deck.length());
deck.removeCard("Jack", "Hearts");
print(deck.length());
print(deck);
}
class Deck {
@RaneWallin
RaneWallin / query_traits.aql
Last active September 4, 2020 03:40
AQL to get all traits of a game
FOR doc in any 'games/VnZGCbECR0I' edges
OPTIONS { bfs: true, uniqueVertices: 'global' }
return doc.name
// edge cases: no islands, all zeros
// constraints: none
// start with first row
// walk through each index in the row
// if it sees a 1
// check each potential island in array
// check each coordinate
// determine if the stored coordinate is adjacent to the current coordinate
"Eius Aliquid Nesciunt Debitis Veritatis"
["MMO", "Simulation", "FPS"]
{
"product_id":1,
"title":"Eius Aliquid Nesciunt Debitis Veritatis",
"description":"Expedita blanditiis magnam non distinctio rerum aperiam non. Ut ut vel itaque dolor consequatur quo. Esse quam asperiores non. Saepe repellendus soluta repellendus et non. Sint veritatis dolore dolorem aut distinctio modi ipsum. Sit voluptatum dolorem autem quia provident.\n \rOmnis nostrum in distinctio ad temporibus. Ut atque mollitia. Assumenda animi aut amet illo porro. Omnis sit rem error et ipsum reprehenderit deserunt ea.\n \rAut veritatis praesentium perspiciatis officia. Enim veritatis excepturi assumenda error quas rerum architecto. Hic modi qui dolores quo odio accusamus voluptas. Nobis quis nam molestiae sint laborum minus ea."
}
[
{
"product_id":1,
"title":"Eius Aliquid Nesciunt Debitis Veritatis",
"description":"Expedita blanditiis magnam non distinctio rerum aperiam non. Ut ut vel itaque dolor consequatur quo. Esse quam asperiores non. Saepe repellendus soluta repellendus et non. Sint veritatis dolore dolorem aut distinctio modi ipsum. Sit voluptatum dolorem autem quia provident.\n \rOmnis nostrum in distinctio ad temporibus. Ut atque mollitia. Assumenda animi aut amet illo porro. Omnis sit rem error et ipsum reprehenderit deserunt ea.\n \rAut veritatis praesentium perspiciatis officia. Enim veritatis excepturi assumenda error quas rerum architecto. Hic modi qui dolores quo odio accusamus voluptas. Nobis quis nam molestiae sint laborum minus ea."
},
{
"product_id":2,
"title":"Deleniti Illo Quam Consequatur Sit",
"description":"Dignissimos a ut qui fugiat voluptatem est qui blanditiis. Nobis sit autem illo vitae quas eum commodi cumque dolores. Quia quaerat quae nihil occaecati voluptas p