In 1010 King Ly Thai To picked Thang Long ( " Ascending Dragon " ) , situated within present-day Hanoi , as the capital for a country that had defeated the Tang Dynasty less than a century before , ending a millennium of Chinese rule .