Recommendations of unit types per media type:
| Media | Recommended | Occasional use | Infrequent use | Not recommended |
|---|---|---|---|---|
| Screen | em, rem, % | px | ch, ex, vw, vh, vmin, vmax | cm, mm, in, pt, pc |
| em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |
| module BinaryTree where | |
| data BTree | |
| = Leaf | |
| | Node { value :: Int | |
| , leftBTree :: BTree | |
| , rightBTree :: BTree } | |
| instance Show BTree where | |
| show Leaf = "" |
| import Data.List (nub) | |
| data Move | |
| = Maxi Int | |
| | Mini Int | |
| instance Show Move where | |
| show (Mini n) = "Mini " ++ (show n) | |
| show (Maxi n) = "Maxi " ++ (show n) |
| % module must match file name - no dashes `-`. | |
| -module(pipelines). | |
| -compile(export_all). | |
| %% @doc Emmits signals of value V or F() every M miliseconds N times. | |
| %% | |
| %% @param V value to emit | |
| %% @param M milisecond delay | |
| %% @param N number of cycles | |
| %% @param P process |
Recommendations of unit types per media type:
| Media | Recommended | Occasional use | Infrequent use | Not recommended |
|---|---|---|---|---|
| Screen | em, rem, % | px | ch, ex, vw, vh, vmin, vmax | cm, mm, in, pt, pc |
| em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |
| # Advanced Bash :: Array slicing and compaction in bash | |
| # TL;DR | |
| X=(something 'whatever' "i have more S P A C E S than i can give away. arent you jealous?") | |
| # ${X[@]} the usual whole array | |
| # ${X[@]:index:length} slice from index to index+length-1 inclusive | |
| # ${X[@]::length} slice from 0 to length-1 inclusive | |
| # ${X[@]:index} slice from index to end of array inclusive |
| #!/usr/bin/env python | |
| # | |
| # import modules used here -- sys is a very standard one | |
| import sys, argparse, logging | |
| # Gather our code in a main() function | |
| def main(args, loglevel): | |
| logging.basicConfig(format="%(levelname)s: %(message)s", level=loglevel) | |