Archive

Archive for August, 2009

Restore Last Viewed Page in Adobe Reader and Foxit Reader

August 29th, 2009 Flo 3 comments

Have you ever had the problem that you can’t remember at which page you stopped reading a PDF?

There’s a nice option in Acrobat Reader:

Edit -> Preferences -> check Restore last view settings when reopening documents

Some other settings like zoom are also restored.

This feature can be activated in Foxit Reader too:

Edit -> Preferences -> General -> History Group -> check Restore last view settings when reopening

Categories: howto Tags: , , , ,

Disabling MySQL Foreign Key Constraints Checks

August 27th, 2009 Flo No comments

Today I had to update lots of rows in a table with a lot of foreign key constraints. The first try was to delete all records and insert the updated data resulting in:

Cannot delete or update a parent row: a foreign key constraint fails (`foo/bar`, CONSTRAINT `FKED8DCCEF810F075A` FOREIGN KEY (`widget_id`) REFERENCES `widget` (`id`))

Instead of dropping all constraints, inserting the data and adding them again afterwards, there’s another more convenient method:

You can disable the foreign key checks with:

SET FOREIGN_KEY_CHECKS = 0

Enabling them again afterwards:

SET FOREIGN_KEY_CHECKS = 1

Categories: howto Tags: ,