  We study weighted inequalities of Hardy and Hardy-Poincar\'e type and find
necessary and sufficient conditions on the weights so that the considered
inequalities hold. Examples with the optimal constants are shown. Such
inequalities are then used to quantify the convergence rate of solutions to
doubly nonlinear fast diffusion equation towards the Barenblatt profile.
