Need help with 7-Segment Display

thats what I have.
Can I connect it like this:

anode F to 13
anode G to 12
anode E to 11
anode D to 10
anode C to 9
anode RHDP to 8
anode B to 7
anode A to 6

then connect the two cathode to ground.

Also where would I need the resistor at if it safe to connect it like that, and how would I figure out what size to use.