*contrast (if your statement contradicts or is intended to prove wrong a previous one, made up by another person or yourself). Examples:
-Did you say T buses?
-No, I said the buses.
*avoiding assimilation with a following vowel: that is, when 'the' is followed by a vowel sound (for example: 'in the end')
"The" is always pronounced, but always (except for the mentioned cases) in its weak form.
-Linking rules: There is a phonetic realisation of these sounds called 'delayed release':
sounds like /p/, /t/, and /k/ are called 'plosives' because of the 'plosion' (the current of air that comes from your lungs is suddenly let out of your mouth) that can be heard at the end of their articulation (that is, when they are 'produced'). When these sounds are found one immediately after the other, and specially in connected/rapid/informal speech, only one plosion may be realised (heard), the plosion corresponding to the second plosive sound.
By this I don't mean that both plosions cannot be realised, and in fact, examples in which two plosive sounds (one immediately after the other) are specially found correspond to careful/formal/previously-planned speech.
For instance: you may practise pronouncing 'top class', 'tiptoe' by only letting the plosion be realised after the second plosive (/k/in class and the seond /t/ in tiptoe)