Blog (just the articles)

Gas Price Per Gallon

tags: gallon, price, gas
price per gallon chart After a sharp decline, it looks like the price of gas is once again steadily rising.

A 19th-Century Mathematician Finally Proves Himself

Charles Babbage

NPR has a good story on Charles Babbage and the mathematical engines he never saw built. A 19th-Century Mathematician Finally Proves Himself

Snow on the way!

tags: weather, snow
snow for 2009 Dec 18 The hourly weather chart from weather.gov says it all.

bookmark

tags: bookmark
javascript:void%20window.open(%20'http://derocher.org/~brian/?Page=form_bookmark&Title='%20+%20encodeURIComponent(%20document.title%20)%20+%20'&Url='%20+%20encodeURIComponent(%20window.location.href%20)%20);

NWS and My Radar Rotoscope

NWS radar before and after rotoscope-like process

I found this new National Weather Service website which is their next generation radar display. It's using OpenLayers. They don't have a nice interpolated image like Weather Underground. So i wrote a 90 line PHP script which is in my opinion rotoscope-like.

A variation on PHP array_map()

tags: scalar, array_map, PHP
Here's a variation on array_map() that: (1) passes the array key to the callback (2) passes a single scalar argument to the callback
  1. /**
  2. An array_map which takes scalar arguments.
  3. @param $cb is a callback.  It can be a simple function or an object method.
  4. @param $ara is an array to operate on.
  5. @param $args is a single argument to pass to the call back.  It can be an array.
  6. */
  7. function array_map_scalar( $cb, $ara, $args )
  8.     {
  9.     $range = array();
  10.     foreach ($ara as $k => $v)
  11.         {
  12.         $range[$k] = call_user_func( $cb, $k, $v, $args );
  13.         }
  14.     return $range;
  15.     }