1. The Torah tells us that the end of Parshas Balak that those leaders who had been involved in the znus at Shitim were killed and hung, "V'hoka osam l'Hashem neged hashemesh." (25:4) The Targum Yonasan explains the words "neged hashemesh," opposite the sun, mean that the bodies were left up only until the end of the day and then buried. The Torah alludes here to the prohibition of halanas ha'meis, delaying burial, given in detail later in Sefer Devarim (Devaim 21:23): "Lo talin nivlaso al ha'eitz ki kavor tikbirenu ba'yom ha'hu," those who are hung after death by skilah must be taken down at nightfall and buried.
I think the plainer sense of "neged ha'shemesh" is that the hanging should be done in public -- it is a spectacle. The Seforno sees a moral lesson here.
שֶׁיִּרְאוּ הָעָם אֶת הֲרִיגַת עובְדֵי עֲבודָה זָרָה וְלא יִמְחוּ, וּבָזֶה יְכֻפַּר לָהֶם עַל שֶׁלּא מִיחוּ בַּפּושְׁעִים.
Bnei Yisrael were guilty of failing to protest the public desecration of G-d's name by their leaders, who took Midyanaite women in full view of everyone. By Bnei Yisrael stifling any public outcry against the hanging of those same leaders, done in full view of everyone, they corrected their prior misdeed.
The Seforno is interesting because we usually think of the tikun of a cheit as coming about through the *opposite* behavior as the original wrong. For example, a thief who takes that which is not his can correct the cheit by returning the object to its rightful owner. I would have thought that the tikun of the cheit of failing to speak out when circumstances demanded it could come about only by *speaking out* when similar circumstances arose. We see from the Seforno a different type of tikun: The same midah of silence that had contributed to the crime now was being used in a positive way, as the people suffered silently as punishment was meted out.
2. When Zimri ben Salu, the leader of the tribe of Shimon, took Kozbi, the princess of Midyan, in public, right in front of Moshe, the people, including Moshe, were paralyzed. "Heima bochim pesach Ohel Moed," (25:6); the Torah tells us that the people stood weeping at the entrance to the Ohel Moed. The focus of the story then shifts, as we read of Pinchas' dramatic act of vigilante justice. It seems that Moshe and Bnei Yisrael were written out of the story, and if not for Pinchas, all was lost.
That's not what happened at all, says the Beis Yisrael of Ger. Chazal tell us that even when all the gates of prayer are closed, the sha'arei dema'os, the gate of tears, remains open. "Heima bochim," the tears of Bnei Yisrael, is the prelude and in fact the catalyst for what happens next. It was those tears that caused Pinchas to remember the halacha that everyone else forgot and to take action. "Vayakam m'toch ha'eidah," Pinchas sprang into action not *from* the eidah, but *because* of the eidah -- because of their tears of tefilah.