This section of Exodus is a combination of moral, ceremonial, and civil laws, which point us to Christ and/or guide our lives today.
In a second vision, Daniel saw into the future when the Jews would need to remain faithful under terrible persecution.
In preparation for coming calamity, the prophet made plans to rejoice in the Lord.