Ask and receive. Daniel sought the Lord and God revealed the mystery and gave him wisdom.
God gave them learning and skill in all literature and wisdom, and Daniel had understanding in all visions and dreams...And the king spoke with them, and among all of them none was found like Daniel, Hananiah, Mishael, and Azariah. Therefore they stood before the king. And in every matter of wisdom and understanding about which the king inquired of them, he found them ten times better than all the magicians and enchanters that were in all his kingdom. Daniel 1:17-20
“Blessed be the name of God forever and ever,
To whom belong wisdom and might.
He changes times and seasons;
He removes kings and sets up kings;
He gives wisdom to the wise
and knowledge to those who have understanding;
He reveals deep and hidden things;
He knows what is in the darkness,
and the light dwells with him.
To you, O God of my fathers,
I give thanks and praise,
for you have given me wisdom and might,
and have now made known to me what we asked of you,
for you have made known to us the king's matter.”
Daniel 2:21-23