Gravar-mail: Relating Lagrangian and Hamiltonian formalisms of LC circuits