After enduring a scarcity of scoring during a five-game losing streak, the San Francisco Giants ended both slumps Friday night by rapping 14 hits and receiving a balanced effort from right-hander Jeff Samardzija in an 8-1 triumph over the Miami Marlins.