AUnifyingFrameworkforOnlineOptimizationwith Long-TermConstraints