{"id":3267,"date":"2013-12-01T22:08:31","date_gmt":"2013-12-02T06:08:31","guid":{"rendered":"http:\/\/bendwavy.org\/wp\/?p=3267"},"modified":"2013-12-01T22:08:31","modified_gmt":"2013-12-02T06:08:31","slug":"off-by-one","status":"publish","type":"post","link":"https:\/\/bendwavy.org\/wp\/?p=3267","title":{"rendered":"off by one"},"content":{"rendered":"<p>A look at 404s in my HTTP log revealed a bug in my <a href=\"\/doodle\/\">math pix page<\/a>, which in two places chooses randomly from families of images.  I didn&#8217;t know that the PHP function <tt>rand(nmin,nmax)<\/tt> is inclusive at both ends.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>A look at 404s in my HTTP log revealed a bug in my math pix page, which in two places chooses randomly from families of images. I didn&#8217;t know that the PHP function rand(nmin,nmax) is inclusive at both ends.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,4],"tags":[],"class_list":["post-3267","post","type-post","status-publish","format-standard","hentry","category-mememe","category-neep-neep"],"_links":{"self":[{"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3267"}],"version-history":[{"count":2,"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3267\/revisions"}],"predecessor-version":[{"id":3269,"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3267\/revisions\/3269"}],"wp:attachment":[{"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}