This file contains hidden or 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
| // ———————————————————————————————————————————————————————————————————————— | |
| // TableSorter | |
| // Purpose: Make any <table class="sortable"> clickable by column header | |
| // to sort numerically, by date (YYYY-MM-DD), or lexically. | |
| // ———————————————————————————————————————————————————————————————————————— | |
| const TableSorter = { | |
| sort(table, colIndex, dir = 'asc') { | |
| const tbody = table.tBodies[0]; | |
| const rows = Array.from(tbody.rows); | |
| const header = rows[0]?.querySelectorAll('th').length ? rows.shift() : null; |
This file contains hidden or 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
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "os" | |
| "strconv" | |
| "strings" | |
| ) |
This file contains hidden or 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 <Arduino.h> | |
| #include <EEPROM.h> | |
| #include <M5StickC.h> | |
| const int PIN_SENSOR = 33; | |
| const int PIN_PUMP = 32; | |
| const int PIN_BTNA = 37; | |
| const int PIN_BTNB = 39; | |
| struct controller { |