Nitrogen-Doped Porous Carbons As Electrode Materials for High-Performance Supercapacitor and Dye-Sensitized Solar Cell.