In the examples, knowledge of is proper, and knowledge on is not. However, neither form is good for use in a CV: "some knowledge" is an indeterminate skill level that could range from "have heard of" to "super good programmer in". It probably is better to be more specific, and indicate items like the following: how many programs you've written in each; how large the programs were; how many weeks or decades you studied the language; whether your knowledge is based on a formal course, self study, contest-site competitions; whether you can knowledgeably read and comment on others' programs in the language.