acloudtree

Tag errata

Errata: Professional Android 2 Application Development Reto Meier

Page 108 has an issue where a Resources object is called though has not been instantiated yet.  Just move the Resources instantiation further up the chain in the initCompassView() method.

 
protecteded void initCompassView() {
  setFocusable(true);
  Resources r = this.getResources();
 
 // Removed for brevity
 
}

Oh yeah, the Wrox errata form totally sucks. It wants me to create a user and fill out a large form. Otherwise I would have let them know.

Beginning Cakephp – Errata : Pg 106

The findByYear() function is messed up in the book. Thought I would post the correction to remind myself.

Correct!

function findByYear($year=null) {
	$date = $year.'-01-01 00:00:00';
	$end_date = $year.'-12-31 23:59:59';
	return $this->find('all',
		array(
			'conditions' =>
			array(
				'DATE(Post.date) >' => $date,
				'DATE(Post.date) <' => $end_date
			)
		 )
	);
}


Incorrect!

function findByYear($year=null) {
	$date = $year.'-01-01 00:00:00';
	$end_date = $year.'-12-31 23:59:59';
	return $this->find('all',
		array(
			'conditions' =>
			array(
				'DATE(Post.date)' => '>'.$date,
				'DATE(Post.date)' => '<'.$end_date
			)
		)
	);
}

Copyright © Jared Folkins
Programming, Computers, Writing, Economics, and Life

Powered by WordPress