Strong earnings from big companies pushed the Dow to a rare triple-digit gain Friday, but the S&P 500 still posted its first weekly loss of the year. Hewlett-Packard had the biggest gain in the Dow and the S&P. It posted first-quarter earnings Thursday that beat forecasts. Spooked investors sent stocks plunging Wednesday after minutes from the Fed’s latest policy meeting revealed disagreement over how long to keep buying bonds in an effort to boost the economy. The slide continued Thursday. The Dow lost 155 points over those two days. The Dow is now just 164 points below its record close of 14,164 reached in October 2007.