How to turn calamity into blessing

If others could tell you the shortest, surest way to all happiness and perfection, they must tell you to make a rule to yourself to thank and praise God for every that happens to you. For it is certain that whatever calamity happens to you, if you thank and praise God for it, you turn it into a blessing . . .