when I was in college denny's always worked for me.\n1 soda and all night of refills(same for coffee).
Is there a  public place in bay area where one can stay late till 1 am and do  home work or read.  ?