The diaries of an aide to former Chinese leader Mao Zedong can remain at Stanford University, a federal judge ruled.