1 Kings 8:39

39 then Thou dost hear in the heavens, the settled place of Thy dwelling, and hast forgiven, and hast done, and hast given to each according to all his ways, whose heart Thou knowest, (for Thou hast known -- Thyself alone -- the heart of all the sons of man),

1 Kings 8:39 Meaning and Commentary

1 Kings 8:39

Then hear thou in heaven thy dwellingplace
Which was more properly so than this Solomon had built, and the Lord had taken possession of:

and forgive;
remove the calamity and distress, be it what it may:

and do, and give to every man according to his ways, whose heart
thou knowest:
that his prayer is cordial and sincere, his confession and repentance genuine, and that he is truly sensible of his sin, and sorry for it, and is pure in his intentions and resolutions, through divine grace, to depart from it for the future:

(for thou, [even] thou only knowest the hearts of all the children of
men;)
he knows all men, the hearts of them all, what is in them, what comes out of them, and is according to them; omniscience belongs only to God; it is his prerogative to know the heart and search the reins, see ( Jeremiah 17:9 Jeremiah 17:10 ) .

1 Kings 8:39 In-Context

37 `Famine -- when it is in the land; pestilence -- when it is; blasting, mildew, locust; caterpillar -- when it is; when its enemy hath distressed it in the land [in] its gates, any plague, any sickness, --
38 any prayer, any supplication that [is] of any man of all Thy people Israel, who know each the plague of his own heart, and hath spread his hands towards this house,
39 then Thou dost hear in the heavens, the settled place of Thy dwelling, and hast forgiven, and hast done, and hast given to each according to all his ways, whose heart Thou knowest, (for Thou hast known -- Thyself alone -- the heart of all the sons of man),
40 so that they fear Thee all the days that they are living on the face of the ground that Thou hast given to our fathers.
41 `And also, unto the stranger who is not of Thy people Israel, and hath come from a land afar off for Thy name's sake --
Young's Literal Translation is in the public domain.