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 java.time.ZoneId; | |
import java.time.ZonedDateTime; | |
import java.time.temporal.ChronoUnit; | |
/* | |
output: | |
Earliest midpoint in LA: 1984-01-26T17:13-08:00[America/Los_Angeles] | |
Latest midpoint in LA: 1984-01-27T05:13-08:00[America/Los_Angeles] |
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
/* | |
[The "BSD licence"] | |
Copyright (c) 2013 Terence Parr | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions | |
are met: | |
1. Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. |
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
update : Msg -> Model -> Model | |
update msg model = | |
case msg of | |
CanvasResized canvasSize -> | |
model | |
|> :canvas | |
|> updateCanvasSize canvasSize | |
|> updateVisibleTiles |
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
type alias Answer = | |
{ name : String, | |
imgUrl : String | |
} | |
decodeAnswers : Json.Decoder (List Answer) | |
decodeAnswers = | |
let | |
imageUrlDecoder = ("url" := Json.string) |
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 Html exposing (div, button, text) | |
import Html.Events exposing (onClick) | |
import StartApp.Simple as StartApp | |
import Random exposing (Seed) | |
type alias Model = { seed : Seed, values : List Int } | |
initialModel : Model | |
initialModel = | |
{ seed = (Random.initialSeed 0), |
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 Html exposing (..) | |
import Html.Events exposing (onClick) | |
import Http | |
import Json.Decode as Json exposing((:=)) | |
import StartApp.Simple as StartApp | |
type alias Model = | |
{ name : String | |
, amount : Int |
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 Array | |
import Debug | |
import Random | |
import Matrix | |
planetNames : Array.Array String | |
planetNames = Array.fromList [ | |
"Terra", | |
"Vulcan", | |
"Omicron Persei 8", |
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
module InitialValues where | |
import Graphics.Element exposing (..) | |
port timestamp : Int | |
main = | |
show ("Hello" ++ (toString (timestamp + 2))) |
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
#Add an alias for your build commands for example: | |
alias make='notify make' | |
alias mvn='notify mvn' |
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
#Add an alias for your build commands for example: | |
alias make='notify make' | |
alias mvn='notify mvn' |
NewerOlder