+0
Hi, please help me.
I heard "Hardly anyone does not know that the president is going to resign." and "No one does not like him." were ungrammatical. But My English textbook says these sentences are grammatical: "This place is not famous for nothing." and "Nobody has nothing to offer to society." To me, all these sentences are similar double negative sentences. Could you teach me why the former ones are ungrammatical and the latter grammatical?
+2
tashiro "This place is not famous for nothing."
This is a kind of protest idiom. Context is important.

Consider another one. You drive for two hours to get to a concert, only to learn that it has been canceled. You say angrily, "You mean I came all this way for nothing?" Emotion: angry
Your friend says, "Hey! Let's party! [<:o)] I didn't come all this way for nothing!" (I'm going to do something about it.)

You now have a reason for "coming all this way."

And another: Hey, that dancer is something else! (reply) Yeah, they don't call her Salome for nothing! . The idiom simply means that there's a reason for it.

In your original example, let's say that you know the place is famous, but you never knew why.
Then you find out the reason for it. You're really impressed, and say, "Wow! this place is not famous for nothing!" (That is, they deserve to be famous.)
tashiro"Nobody has nothing to offer to society."
Your friend is feeling sad, and says, "Sometimes I feel like I have nothing to offer to society." Emotion: crying
You reply, "Hey, don't be rediculous! Nobody has nothing to offer to society!"

Edit. By the way, I agree with MrM that all four are acceptable.

Funny thing, when I first read the post, I said, "What? No! It's the other way around!" Then I talked myself into it. Emotion: rofl
+1
They all seem possible to me. It's just that they are much clearer stated affirmatively: 'Almost everyone knows the president is going to resign'; 'Everyone likes him'.
Students: We have free audio pronunciation exercises.
Comments  
I understand. Thank you both.
Teachers: We supply a list of EFL job vacancies
"Hardly anyone does not know that the president is going to resign." and "No one does not like him."

These meanAlmost everyone knows that the president is going to resign and ''Everyone likes him.''? Really?

Double negative sometimes mean positive?
Double negative – if it acceptable at all – always means affirmative (positive), I think.