Daniel 4 is a testimony of King Nebuchadnezzar of a dream he had that God fulfilled. After that the king praised God because His works are true.
Daniel 5 tells of a vision King Belshazzar, Nebuchadnezzar’s son had after he used the vessels from the temple in Jerusalem as utensils at a banquet. A hand began to write on the wall. No one could interpret the writing. Daniel was called in. He told the king that it was because he had not acknowledged God’s power that he was receiving this message. It said that he had been found wanting by God, he would be killed and the Medes and Persians would gain his kingdom. Belshazzar tried to pay Daniel off but that night he was killed and Darius the Mede became king.
Nebuchadnezzar showed pride but eventually came to trust the Lord. Belshazzar was also prideful but trusted in other gods and was taken down.
When we recognize that our pride is leading us astray we need to confess that sin and turn to God. He is the one deserving our praise.
1 John 5 continues to encourage us to love others and obey the commandments of God. John also tells us that it is through Jesus that we have eternal life and through him alone. If we ask anything according to his will he hears us and answers our prayers. We need to be careful not to trust in the things of this world but rather to trust in Jesus.