Question: "mean" used in the same way in the following two sentences?

I mean no harm.

I meant to take the car in for a smog check, but it slipped my mind.
Answer: the same meaning
Question: "carry" used in the same way in the following two sentences?

He had drunk more than he could carry.

The troops carried the town after a brief fight.
Answer: different meanings
Question: "dozen" used in the same way in the following two sentences?

There shouldn't be more than two dozen Christmas cards left to write.

Can I have a dozen eggs, please?
Answer: the same meaning
Question: "attack" used in the same way in the following two sentences?

His plan of attack was misguided.

An attack on inflation.
Answer:
the same meaning