Elementary, Dear Data (Star Trek: The Next Generation, Season 2, Episode 3)
TNG starred Patrick Stewart leading the crew of the Enterprise as Captain Jean-Luc Picard. Instead of half-human Spock, fully functional android and Chief Operations Officer Data plays the part of the outsider puzzled by emotions. In this episode, Data and Geordi La Forge challenge the ship's holodeck to create a unique Sherlock Holmes mystery that Data can't solve.
Naturally, the holodeck simulation of Professor Moriarty instantly gains sentience and tries to take over the Enterprise. (In a later episode, "Ship in a Bottle," Moriarty makes himself a simulated girlfriend and demands to be released from the holodeck.) This episode continues the grand tradition of putting the Enterprise crew in period garb; in this case, they go full Victorian London.
Watch Star Trek: The Next Generation on CBS All-Access.