One morning, suddenly, all humans and any human-crafted things (roads, buildings, technologies ...) vanish, with the only exception of one single city and its inhabitants. How long can the metropolis keep functioning without the rest of human civilization?

This takes place on an Earth-like planet (but not Earth!), with our current technology level. The city is about the size of New York and is placed in a similar environment, but instead of being on the coast, it sits next to a river. The river is approximately the size of the Mississippi River.

By function I mean continues to contain at least 50 percent of it inhabitants.