On the page
http://www.oreilly.com/catalog/activedckbk/index.html the 'Examples' link points the the first URL of the OP. While the book is not free may of O'Reilly's books have examples that are free. They have a rather generous policy on use of code samples you can read at
http://www.oreilly.com/pub/a/oreilly/ask_tim/2001/codepolicy.html.