Carmelo Anthony scored 45 points as his New York Knicks got the come from behind win against new cross-town rival, the Brooklyn Nets, in a 100-97 thriller.