A pharmaceutical composition comprising a pharmaceutically acceptable carrier or diluent and a compound represented by the following structural formula: or a pharmaceutically acceptable salt thereof, wherein: Ring A is optionally substituted phenyl or an optionally substituted 5-6 membered heteroaryl; Ring B is aryl, 5-6 membered heteroaryl or 5-6 membered heterocyclyl, each optionally substituted with one or more substituents represented by R 3; "-----" is absent or a bond; E is N or CH when "----" is absent or E is C when "-----" is a bond; is optionally substituted with (C 1 -C 5)alkyl or hydroxy (C 1 -C 5)alkyl; each R 3 is independently selected from the group consisting of -halogen, -CN, -NO 2, -OR d, -NR e R f, -S i R e, -C(=NR e)NR e R f, -NR e S i R f, -S i NR e R f, -C(=O)OR e, -OC(=O)OR e, -C(=S)OR e, -O(C=S)R e, -C(=O)NR e R f, -NR e C(=O)R f, -C(=S)NR e R f, -NR e C(=S)R f, -NR e (C=O)OR f, -O(C=O)NR e R f, -NR e (C=S)OR f, -O(C=S)NR e R f, -NR e (C=O)NR e R f, -NR e (C=S)NR e R f, -C(=S)R e, -C(=O)R e, halo(C 1 -Cs)alkyl, and (C 1 -C 5)alkyl, wherein the (C 1 -C 5)alkyl represented by R 3 is optionally substituted with -CN, -NO 2, -OR e, -NR e R f, -S i R e, -NR e S i R f, -S i NR e R f, -C(=O)OR e, -OC(=O)OR e, -C(=S)OR e, -O(C=S)R e, -C(=O)NR e R f, -NR e C(=O)R f, -C(=S)NR e R f, -NR e C(=S)R f, -NR e (C=O)OR f, -O(C=O)NR e R f, -NR e (C=S)OR f, -O(C=S)NR e R f, -NR e (C=O)NR e R f, -NR e (C=S)NR e R f, -C(=S)R e, or -C(=O)R e; R d is -H, halo(C 1 -C 5)alkyl or (C 1 -C 5)alkyl, wherein the (C 1 -C 5)alkyl is optionally substituted with hydroxyl or (C 1 -C 3)alkoxy; each R e is independently selected from the group consisting of -H and (C 1 -Cs)alkyl optionally substituted with hydroxyl or (C 1 -C 3)alkoxy; each R f is independently selected from the group consisting of-H, (C 1 -C 5)alkyl optionally substituted with hydroxyl or (C 1 -C 3)alkoxy, (C 3 -C 6)cycloalkyl optionally substituted with (C 1 -C 2) alkyl, and 4-6 membered oxygen-containing heterocyclyl optionally substituted with (C 1 -C 2) alkyl; or -NR e R f taken together is a 4-6 membered heterocyclyl optionally substituted with (C 1 -C 2) alkyl; or -C(=NR e)NR e R f taken together is a 4-6 membered heterocyclyl optionally substituted with R e; R 5 is-H or (C 1 -C 5)alkyl; and i is 0, 1, or 2. Ring A is optionally substituted phenyl or an optionally substituted 5-6 membered heteroaryl; Ring B is aryl, 5-6 membered heteroaryl or 5-6 membered heterocyclyl, each optionally substituted with one or more substituents represented by R 3; "-----" is absent or a bond; E is N or CH when "----" is absent or E is C when "-----" is a bond; is optionally substituted with (C 1 -C 5)alkyl or hydroxy (C 1 -C 5)alkyl; each R 3 is independently selected from the group consisting of -halogen, -CN, -NO 2, -OR d, -NR e R f, -S i R e, -C(=NR e)NR e R f, -NR e S i R f, -S i NR e R f, -C(=O)OR e, -OC(=O)OR e, -C(=S)OR e, -O(C=S)R e, -C(=O)NR e R f, -NR e C(=O)R f, -C(=S)NR e R f, -NR e C(=S)R f, -NR e (C=O)OR f, -O(C=O)NR e R f, -NR e (C=S)OR f, -O(C=S)NR e R f, -NR e (C=O)NR e R f, -NR e (C=S)NR e R f, -C(=S)R e, -C(=O)R e, halo(C 1 -Cs)alkyl, and (C 1 -C 5)alkyl, wherein the (C 1 -C 5)alkyl represented by R 3 is optionally substituted with -CN, -NO 2, -OR e, -NR e R f, -S i R e, -NR e S i R f, -S i NR e R f, -C(=O)OR e, -OC(=O)OR e, -C(=S)OR e, -O(C=S)R e, -C(=O)NR e R f, -NR e C(=O)R f, -C(=S)NR e R f, -NR e C(=S)R f, -NR e (C=O)OR f, -O(C=O)NR e R f, -NR e (C=S)OR f, -O(C=S)NR e R f, -NR e (C=O)NR e R f, -NR e (C=S)NR e R f, -C(=S)R e, or -C(=O)R e; R d is -H, halo(C 1 -C 5)alkyl or (C 1 -C 5)alkyl, wherein the (C 1 -C 5)alkyl is optionally substituted with hydroxyl or (C 1 -C 3)alkoxy; each R e is independently selected from the group consisting of -H and (C 1 -Cs)alkyl optionally substituted with hydroxyl or (C 1 -C 3)alkoxy; each R f is independently selected from the group consisting of-H, (C 1 -C 5)alkyl optionally substituted with hydroxyl or (C 1 -C 3)alkoxy, (C 3 -C 6)cycloalkyl optionally substituted with (C 1 -C 2) alkyl, and 4-6 membered oxygen-containing heterocyclyl optionally substituted with (C 1 -C 2) alkyl; or -NR e R f taken together is a 4-6 membered heterocyclyl optionally substituted with (C 1 -C 2) alkyl; or -C(=NR e)NR e R f taken together is a 4-6 membered heterocyclyl optionally substituted with R e; R 5 is-H or (C 1 -C 5)alkyl; and i is 0, 1, or 2.