Demo: https://codepen.io/depperm/pen/RNWwMZY
Future ideas:
- piet
- voronoi
- fractal
- spirograph/parabolic curves
- flag
- periodic element/molecule?
- L system/tree
Demo: https://codepen.io/depperm/pen/RNWwMZY
Future ideas:
A Pen by David 'Epper' Marshall on CodePen.
<html> | |
<style> | |
table { | |
line-height: 120%; | |
font-family: Consolas, monaco, monospace; | |
/*72pt:1in*/ | |
font-size: 9pt; | |
} | |
.good { | |
background: greenyellow; |
/* | |
* tictactoe.c | |
* | |
* Copyright 2024 Reslashd https://github.com/Reslashd/tictactoe/blob/main/tictactoe.c | |
* | |
* Review: https://codereview.stackexchange.com/posts/289272 | |
* | |
*/ | |
#include <stdbool.h> |
# nim compile --run day#/advent.nim demo 1 | |
# nim compile --run day#/advent.nim demo 2 | |
# nim compile --run day#/advent.nim one | |
# nim compile --run day#/advent.nim two | |
import os | |
import strutils | |
import sequtils | |
import sets | |
proc challenge(file: string, challenge: int): void = |
// https://www.iso.org/iso-3166-country-codes.html > click Online Browsing Platform > 300 results per page | |
// copy-paste below in console | |
var table = document.evaluate("/html/body/div[1]/div/div[2]/div/div/div[2]/div/div/div[2]/div/div/div/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[2]/div[2]/div[3]/table", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
var countries=[]; | |
for (var i = 1; i<table.rows.length; i++) { | |
var row = table.rows[i]; | |
var country={}; | |
for (var j = 0; j<row.cells.length; j++) { | |
var col=row.cells[j]; |