Yes. But if you use a different cable it will likely charge differently given the S4 cable is designed to allow faster charging than previous Samsung phones, and even the different charger with the Samsung cable might mean it doesn't charge the same way either (haven't tried myself); this thread has good info.
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?