Direct access to metal or metal oxide nanocrystals integrated with one-dimensional nanoporous carbons for electrochemical energy storage.