ADDING UP ROUNDED PERCENTAGES TO EQUAL 100%

When working with rounded percentages, it's actually not that easy to make sure the percentages add up to 100%. Take the following example:

  • 40.5%
  • 20.6%
  • 38.9%

If you use basic rounding, you'll get 41%, 21%, and 39%... which adds up to 101%!

So, what can we do?

[continue reading]

Adding Up Rounded Percentages to Equal 100%
8.17.2017 ~ 03:06 PM
posted in professional
tagged in c#
comments [0]

 

CREATING A 404 PAGE WITH PAGER.JS

Pager.js is a single-page application framework for KnockoutJS, and it has a lot of neat things out-of-the-box. But if you're using it, you may wonder how to create a 404 page, since there's no explicit method for this purpose.

[continue reading]

Creating a 404 page with pager.js
9.08.2015 ~ 08:51 PM
posted in professional
tagged in javascript : jquery : knockout : pagerjs
comments [0]

 

INCLUDE "$" (DOLLAR SIGN) IN A MENU ITEM DESCRIPTION IN SQUARESPACE

I'm using Squarespace to create a fairly straightforward site for a restaurant. Squarespace uses their flavour of markdown syntax when creating menu items, and for the most part it's pretty fool-proof. I did hit a small hiccup, however, when I needed to add a dollar sign ($) to a description for a menu item.

The problem is that when Squarespace sees the dollar sign, it assumes that text is for the price, and moves it to the bottom (which messes up everything else), so you get something like looks like this:

Here's the matching markdown:

Loch Duart Scottish Salmon Salad
Grilled sustainable salmon served a top of mixed spring greens, tomatoes and cucumber, with your choice of dressing (substitute with sesame crusted seared tuna steak for an additional $3)
$14

[continue reading]

Include "$" (dollar sign) in a menu item description in Squarespace
2.15.2015 ~ 03:58 AM
posted in professional
tagged in square-space : html
comments [0]

 

PROFESSIONAL GOALS OF 2015 [UPDATED!]

For the first time ever, I'm making a list of career goals for the year. I'm shooting for some low-hanging fruit here, but hey, I have to start somewhere! [If you judge me on any of these, maybe YOUR resolution should be to BACK OFF... Ok, phew, sorry. That was uncalled-for... I'll calm down.]

[continue reading]

Professional Goals of 2015 [Updated!]
1.05.2015 ~ 09:36 PM
posted in professional
tagged in new-year-resolutions : bring-it
comments [0]

 

INTRODUCING "JQUERY.UI.TIMESELECT" A JQUERY UI LIBRARY FOR SELECTING TIME

There is no shortage of timepickers for JavaScript, but the majority of them are overwrought, with timepickers being one of the few categories of plugins that tends to be way more visual than they need to be.

[continue reading]

Introducing "jquery.ui.timeselect" A jQuery UI Library for Selecting Time
11.10.2014 ~ 04:15 AM
posted in professional
tagged in jquery : jquery-ui : plugin
comments [0]