Biological And Artificial Neural Network Mechanisms For Memory And Online Learning