Raptors end five-game losing skid with 104-101 win over Warriors