Pure JavaScript Zoom and Pan, taken from http://phrogz.net/tmp/canvas_zoom_to_cursor.html
A Pen by TechSlides on CodePen.
Pure JavaScript Zoom and Pan, taken from http://phrogz.net/tmp/canvas_zoom_to_cursor.html
A Pen by TechSlides on CodePen.
var LightenColor = function(color, percent) { | |
var num = parseInt(color,16), | |
amt = Math.round(2.55 * percent), | |
R = (num >> 16) + amt, | |
B = (num >> 8 & 0x00FF) + amt, | |
G = (num & 0x0000FF) + amt; | |
return (0x1000000 + (R<255?R<1?0:R:255)*0x10000 + (B<255?B<1?0:B:255)*0x100 + (G<255?G<1?0:G:255)).toString(16).slice(1); | |
}; |
/* | |
# Convert binary encoded object SID to a string | |
# (eg. S-1-5-21-1004336348-1177238915-682003330-512) | |
# | |
# SID format: https://technet.microsoft.com/en-us/library/cc962011.aspx | |
# | |
# ldapjs `searchEntry` has attribute `raw` that holds the raw | |
# values, including the `objectSid` buffer when one exists. Pass that | |
# buffer to get the string representation that can then be easily | |
# used in LDAP search filters, for example. |
/** | |
* ECMA2015 | |
*/ | |
function convertHex(hexCode,opacity){ | |
var hex = hexCode.replace('#',''); | |
if (hex.length === 3) { | |
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; | |
} |
right_of(X, Y) :- X is Y+1. | |
left_of(X, Y) :- right_of(Y, X). | |
next_to(X, Y) :- right_of(X, Y). | |
next_to(X, Y) :- left_of(X, Y). | |
solution(Street, FishOwner) :- | |
Street = [ | |
house(1, Nationality1, Color1, Pet1, Drinks1, Smokes1), | |
house(2, Nationality2, Color2, Pet2, Drinks2, Smokes2), |