https://nixos.org/download.html
https://apple.stackexchange.com/questions/168291/how-to-release-mouse-capture-in-virtualbox
login as root
import Data.List | |
import qualified Data.Map as M | |
-- Data.List.minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a -- | |
-- M.adjust :: Ord k => (a -> a) -> k -> Map k a -> Map k a -- | |
clusterAssignmentPhase :: (Vector v, Vectorizable e v) => [v] -> [e] -> M.Map v [e] | |
clusterAssignmentPhase centroids points = | |
let initialMap = M.fromList $ zip centroids (repeat []) | |
in foldr (\p m -> let chosenCentroid = minimumBy (\x y -> compare (distance x $ toVector p) | |
(distance y $ toVector p)) |
name: learn-html-conduit | |
version: 0.1.0.0 | |
-- synopsis: | |
-- description: | |
homepage: https://github.com/githubuser/learn-html-conduit#readme | |
license: BSD3 | |
license-file: LICENSE | |
author: Author name here | |
maintainer: [email protected] | |
copyright: 2017 Author name here |
{-# LANGUAGE OverloadedStrings #-} | |
import CodeWorld | |
botCircle c = colored c (translated 0 (-1.5) (solidCircle 1)) | |
middleCircle c = colored c (translated 0 1.5 (solidCircle 1)) | |
topCircle c = colored c (translated 0 4.5 (solidCircle 1)) | |
frame = rectangle 2.5 12.0 | |
trafficLight 0 = botCircle green & middleCircle black & topCircle black & frame |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE ViewPatterns #-} | |
-- | | |
-- Module : Example.S3 | |
-- Copyright : (c) 2013-2015 Brendan Hay | |
-- License : Mozilla Public License, v. 2.0. | |
-- Maintainer : Brendan Hay <[email protected]> | |
-- Stability : provisional | |
-- Portability : non-portable (GHC extensions) |
import Data.Maybe | |
import Control.Monad | |
import Control.Monad (guard) | |
import Control.Monad.Trans (lift) | |
import Control.Monad.Trans.Maybe | |
import Data.Char | |
getValidPassphrase :: MaybeT IO String | |
getValidPassphrase = do s <- lift getLine |
var optionalString: String? = "Hello" | |
optionalString = nil | |
var optionalName: String? = nil | |
var gretting = "Hello!" | |
if let name = optionalName { | |
gretting = "Hello, \(name)" | |
} else { | |
gretting = "Hello anonymous" | |
} |
let apples = 3 | |
let oranges = 5 | |
let appleSummary = "I have \(apples) apples." | |
let fruitSummary = "I have \(apples + oranges) pieces of fruit ." | |
let name = "Tommy" | |
let helloworld = "Nice to see you \(name) at \(3.0 + 4.5) years later." |
let label = "The width is " | |
let width = 94 | |
let widthLabel = label + width (Error: Could not findgi) |
let firstFloat: Float = 4 | |
let secondFloat = 4.0 |