Skip to content

Instantly share code, notes, and snippets.

View wyhinton's full-sized avatar
💭
🦀 Emerging Rustacean 🦀

Webb Hinton wyhinton

💭
🦀 Emerging Rustacean 🦀
View GitHub Profile
@wyhinton
wyhinton / strange.js
Created December 17, 2022 09:38
Strange Attractors JS
/*
Equeations from:
https://www.dynamicmath.xyz/strange-attractors/
*/
Param var(28);
Param scale(1);
Param offX;
Param offY;
use fltk::*;
fn main() {
let app = app::App::default();
let mut win = window::Window::new(100, 100, 400, 300, "");
let mut scroll = group::Group::default().size_of(&win);
let mut pack = group::Pack::default()
.with_size(200, 100)
.center_of(&scroll);
let mut frame = frame::Frame::default().with_size(0, 160);
@wyhinton
wyhinton / groupCoords.rs
Created December 15, 2020 14:53
Can't get coordinates of widget within group in fltk-rs
use fltk::*;
fn main() {
let app = app::App::default();
let mut win = window::Window::default().with_size(400, 300);
let mut hpack = group::Pack::default().with_size(400, 100);
hpack.set_spacing(10);
hpack.set_type(group::PackType::Horizontal);
@wyhinton
wyhinton / validateGoogleSheetData.js
Last active August 17, 2020 04:44
A script for validating data values in a Google Spreadsheet. When retrieving a sheet as JSON, its best that the sheet contains no empty values. Thus this script highlights empty cells, and provides an error message with those cells locations.
function checkForEmptyCells() {
var ss=SpreadsheetApp.getActiveSpreadsheet();
var sheet=ss.getSheets()[1];
var selection=sheet.getDataRange();
var columns=selection.getNumColumns();
var rows=selection.getNumRows();
var emptyCells = [];
var headerCells = sheet.getRange(2, 1,1, columns)
var debugRange= sheet.getRange(1,1);
var dataCells = sheet.getRange(3, 2, rows-2, columns-1)