Resource Allocation for Wireless Networks: Basics, Techniques, and Applications