Skip to content

Instantly share code, notes, and snippets.

Without intelligence

finalchild finalchild

Without intelligence
View GitHub Profile
finalchild / convex-hull.cpp
Last active January 29, 2021 07:11
View convex-hull.cpp
#include <algorithm>
#include <concepts>
#include <iostream>
#include <ranges>
#include <type_traits>
#include <vector>
#define self (*this)
#define repeat(i, n) for (remove_cv_t<remove_reference_t<decltype(n)>> i = 0; i < (n); ++i)
using namespace std;

Keybase proof

I hereby claim:

  • I am finalchild on github.
  • I am finalchild ( on keybase.
  • I have a public key ASAsPgwRbyEI0Ksk75SLwrjhh_fiHFv7ZbzivIrpgWILBQo

To claim this, I am signing this object:

finalchild / lexical-structure.txt
Created July 5, 2019 12:36
pseudo lexical structure
View lexical-structure.txt
## tokens
### keyword
View segment_tree.cpp
template<typename T, const T& Combine(const T&, const T&)>
class segment_tree {
darray<T> v;
T default_value;
T combine_considering_default(const T& left_value, const T& right_value) const {
if (left_value == default_value) {
return right_value;
} else if (right_value == default_value) {
return left_value;
} else {
finalchild / processor2.js
Last active December 16, 2018 04:14
Hangaram Timetable Reader gist
View processor2.js
const timetableElement = document.getElementById('timetable');
const roomDataElement = document.getElementById('room-data');
const timetableGrid = makeGrid(timetableElement);
const roomDataGrid = makeGrid(roomDataElement);
const timetable = processGrid(timetableGrid);
//download(timetable[0], 'timetable1.json');
//download(timetable[1], 'timetable2.json');
//download(timetable[2], 'timetable3.json');
finalchild / processor.js
Last active July 28, 2018 10:19
Hangaram High School timetable processor
View processor.js
function downloadTimetable(timetableElement) {
const timetable = makeTimetable(timetableElement);
download(timetable[0], 'timetable1.json');
download(timetable[1], 'timetable2.json');
download(timetable[2], 'timetable3.json');
function download(o, fileName) {
const blob = new Blob([JSON.stringify(o)], {type: 'application/json'});
const url = URL.createObjectURL(blob);