to your HTML Add class="sortable" to any table you'd like to make sortable Click on the headers to sort Thanks to many, many people for contributions and suggestions. Licenced as X11: http://www.kryogenix.org/code/browser/licence.html This basically means: do what you want with it. */ var stIsIE = /*@cc_on!@*/false; sorttable = { init: function() { // quit if this function has already been called if (arguments.callee.done) return; // flag this function so we don't do the same thing twice arguments.callee.done = true; // kill the timer if (_timer) clearInterval(_timer); if (!document.createElement || !document.getElementsByTagName) return; sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; forEach(document.getElementsByTagName('table'), function(table) { if (table.className.search(/\bsortable\b/) != -1) { sorttable.makeSortable(table); } }); }, makeSortable: function(table) { if (table.getElementsByTagName('thead').length == 0) { // table doesn't have a tHead. Since it should have, create one and // put the first table row in it. the = document.createElement('thead'); the.appendChild(table.rows[0]); table.insertBefore(the,table.firstChild); } // Safari doesn't support table.tHead, sigh if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; if (table.tHead.rows.length != 1) return; // can't cope with two header rows // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as // "total" rows, for example). This is B&R, since what you're supposed // to do is put them in a tfoot. So, if there are sortbottom rows, // for backwards compatibility, move them to tfoot (creating it if needed). sortbottomrows = []; for (var i=0; i
It's Friday and, if we're being honest, it has been a really long week. So much so that probably the last thing you want to have to even think about right now is making dinner. Wouldn't it be a lot easier if you just ordered in some pizza instead?
Well, that's one problem solved, but now you have another. How much pizza should you order?
If you're like a lot of people, you also don't want to spend a lot of money on dinner, so you'll decide how much pizza to get by choosing from the options you have available among the latest coupons from your preferred pizza provider. Kind of like the following example from Pizza Hut (warning: this particular coupon has expired!)
After considering all these potential options, let's say for the sake of argument that you've narrowed in on the options at the top of the middle two columns, which you reckon will satisfy your pizza consumption plans: 2 medium one-topping pizzas for $21.49 or 1 large one-topping pizza for $13.99. Being the kind of person who wants to maximize the value you get for pizza dollar, which coupon should you use when placing your order?
That answer hinges on how much pizza there is in a medium versus a large pizza. Keeping with Pizza Hut's menu options, a medium pizza is 12-inches in diameter, while a large is 14-inches in diameter.
After becoming mentally exhausted after such a long week of work, you might conclude that with 2 medium pizzas, you will effectively have 24-inches of pizza diameter, which is 10 more than the 14-inch diameter large pizza, For just $7.50 more, the 2 medium pizza coupon might seem like its a better deal.
That would be true, if and only if that really gave you the equivalent of a 24-inch diameter pizza. In reality, you have two 12-inch diameter pizzas, which are much, much smaller than that. If you want to get the most pizza you can for the least dollars, you're going to need to do some math in choosing between these coupons.
We know it's Friday, and that math is the last thing you want to do right now, so we built a tool to do that bit of personal finance math for you! Just enter the coupon options and pizza size information in the following tool, and we'll take care of the rest. If you're accessing this article on a site that republishes our RSS news feed, please click through to our site to access a working version of the tool.
Using the default values, Coupon Option #2, the single large, one-topping pizza, will give you the best value for your pizza dollar. Meanwhile, if you play with the numbers and plug in the prices that apply for 3-topping pizzas, you'll find the outcome changes.
And because we don't want to think about it any more, we'll leave you with the following video, featuring consumers impressed by a large, 14-inch diameter pizza:
It's funny what you find at the intersection of hunger, geometry, and pizza coupons! Speaking of which, there has been a rather noisy debate about the math involved in settling a different aspect of this question elsewhere on the Interwebs, which directly inspired us to create this tool to tackle the problem from a personal finance angle!
Labels: food, math, personal finance, tool
Welcome to the blogosphere's toolchest! Here, unlike other blogs dedicated to analyzing current events, we create easy-to-use, simple tools to do the math related to them so you can get in on the action too! If you would like to learn more about these tools, or if you would like to contribute ideas to develop for this blog, please e-mail us at:
ironman at politicalcalculations
Thanks in advance!
Closing values for previous trading day.
This site is primarily powered by:
The tools on this site are built using JavaScript. If you would like to learn more, one of the best free resources on the web is available at W3Schools.com.