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
| # *************************************************************************** # | |
| # Copyright 2025 Roy Stewart. All rights reserved. # | |
| # Released under the GPL3 license. # | |
| # License URL: https://www.gnu.org/licenses/gpl-3.0.en.html#license-text # | |
| # *************************************************************************** # | |
| import os | |
| from pathlib import Path | |
| import shutil | |
| from urllib.request import urlretrieve |
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
| class PhoneNumberInput extends HTMLInputElement { | |
| constructor() { | |
| super(); | |
| this.setAttribute('type', 'tel'); | |
| this.addEventListener('input', () => this.formatInput()); | |
| } | |
| formatInput() { | |
| const phoneNumberSections = []; | |
| if (this.areaCode) { |
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
| import System.Environment | |
| import Data.List | |
| isFactorOf :: Integer -> Integer -> Bool | |
| isFactorOf y x = y `mod` x == 0 | |
| possibleFactorsOf :: Integer -> [Integer] | |
| possibleFactorsOf n = [2..n] | |
| smallestFactorOf :: Integer -> Integer |
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
| tree-group, tree-view { | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| tree-group { | |
| --indentation-size: 1em; | |
| position: relative; | |
| left: var(--indentation-size); | |
| } |
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
| // The decorator that simplifies registration | |
| function RegisterCustomElement(elementName, options) { | |
| return classToRegister => { | |
| window.customElements.define(elementName, classToRegister, options); | |
| }; | |
| } | |
| // An example component registered using the decorator | |
| @RegisterCustomElement('my-element') | |
| class MyElement extends HTMLElement { |