This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.classA.classB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<gist id='yourgistid' /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE SEQUENCE customers_seq | |
START WITH 1000 | |
INCREMENT BY 1 | |
NOCACHE | |
NOCYCLE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://developers.google.com/analytics/devguides/collection/analyticsjs/events | |
var downloadLink = document.getElementById('#code4hk-badge-link'); | |
addListener(downloadLink, 'click', function() { | |
ga('send', 'event', 'link', 'click', 'code4hk-badge-link'); | |
}); | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var proj4 = require('proj4'); | |
//https://github.com/proj4js/proj4js | |
//More on the systems | |
//http://www.geodetic.gov.hk/data/pdf/explanatorynotes.pdf | |
proj4.defs('WGS84', "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"); | |
//HK co-ordinate system http://spatialreference.org/ref/epsg/hong-kong-1980-grid-system/ | |
proj4.defs('EPSG2326','+proj=tmerc +lat_0=22.31213333333334 +lon_0=114.1785555555556 +k=1 +x_0=836694.05 +y_0=819069.8 +ellps=intl +towgs84=-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425 +units=m +no_defs'); | |
//convert co-ordinates from HK 1980 to WGS84 | |
var coordinatesWGS84 = proj4('EPSG2326','WGS84',[832699,836055]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//devise a simple algorithm for scoring similarity between phrases pairs | |
//sample input | |
//can assume all are short phrasese (<20 characters) | |
var input = [ | |
["一二三四","五六七八"], | |
["分享帳號","帳號管理"] | |
] |
OlderNewer