This file contains 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
// | |
// ContentView.swift | |
// BreatheUI WatchKit Extension | |
// | |
// Created by Joel Bernstein on 6/24/19. | |
// Copyright © 2019 Joel Bernstein. All rights reserved. | |
// | |
import SwiftUI |
This file contains 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 2020 Aubrey Taylor | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTH |
This file contains 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
{-# LANGUAGE TypeSynonymInstances #-} | |
import Data.Monoid | |
import Data.Maybe | |
-- How much water does a "histogram" hold? | |
-- | |
-- Inspired by Guy Steele's talk "Four Solutions to a Trivial Problem" | |
-- https://www.youtube.com/watch?v=ftcIcn8AmSY |
This file contains 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
//============================================================================ | |
// | |
// Image.swift | |
// | |
//============================================================================ | |
import Cocoa | |
struct Rgba { | |
let (r, g, b, a) = (UInt8(0), UInt8(0), UInt8(0), UInt8(255)) |
This file contains 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
//============================================================================ | |
// | |
// mandelbrot.swift | |
// | |
// Default settings are: | |
// cx: -0.74552972800463340 | |
// cy: 0.08245763776447299 | |
// numRows: 135 | |
// numColumns: 256 (same aspect ratio as 4096 x 2160) | |
// zoom: 10_000_000_000 |
This file contains 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 UIKit | |
/// Wrapper for the NSNotification userInfo values associated with a keyboard notification. | |
/// | |
/// It provides properties that retrieve userInfo dictionary values with these keys: | |
/// | |
/// - UIKeyboardFrameBeginUserInfoKey | |
/// - UIKeyboardFrameEndUserInfoKey | |
/// - UIKeyboardAnimationDurationUserInfoKey | |
/// - UIKeyboardAnimationCurveUserInfoKey |