Tag: read from URL

Example 9.18: Constructing the fastest relay team via enumeration

In competitive swimming, the medley relay is a team event in which four different swimmers each swim one of the four strokes: freestyle, breaststroke, backstroke, and butterfly. In general, every swimmer might be able swim any given stroke. How can w…

Example 8.35: Grab true (not pseudo) random numbers; passing API URLs to functions or macros

Usually, we’re content to use a pseudo-random number generator. But sometimes we may want numbers that are actually random– an example might be for randomizing treatment status in a randomized controlled trial.The site Random.org provides truly rando…

Example 8.12: Bike ride plot, part 1

The iPhone app Cyclemeter uses the phone’s GPS capability to record location and other data, and infer speed, while you ride. I took a ride near my house recently, and downloaded the data. I’d like to examine my route and my speed. A simple plot of …