Skip to content

Instantly share code, notes, and snippets.

View mailmindlin's full-sized avatar

Liam Feehery mailmindlin

  • The intertubes!
View GitHub Profile
This file has been truncated, but you can view the full file.
<?xml version="1.0"?>
<rdf:RDF xmlns="https://tw.rpi.edu/ontology-engineering/oe2020/patient-guideline-recommender-inferred/"
xml:base="https://tw.rpi.edu/ontology-engineering/oe2020/patient-guideline-recommender-inferred/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:Roles="https://spec.edmcouncil.org/fibo/ontology/FND/Parties/Roles/"
@mailmindlin
mailmindlin / keycode.js
Last active November 7, 2015 03:54
JS keycode info
function getKeyCodeInfo(code, ctrl, alt, shift) {
function gro(_info) {
var info = _info || {};
return {
name: info.name || 'UNKNOWN',
code: info.code || -1,
ctrl: info.ctrl || ctrl,
shift: info.shift || shift,
alt: info.alt || alt,
meta: info.meta || false,
@mailmindlin
mailmindlin / ellipse.c
Last active September 28, 2015 16:14
Draw ellipse in c
#include <math.h>
void drawLine(double x0, double y0, double x1, double y1);
#define sin2(x) pow(sin(x),2)
#define cos2(x) pow(cos(x),2)
void drawEllipse(double centerX, double centerY, double radiusX, double radiusY, double rotation, int nseg) {
double ab = radiusX * radiusY;
double asq = radiusX * radiusX;
double bsq = radiusY * radiusY;
double r = ab/sqrt(asq * cos2(-rotation) + bsq * sin2(-rotation));
@mailmindlin
mailmindlin / proxy-polyfill.js
Last active August 25, 2017 16:45
Proxy Polyfill for major webbrowsers
/**
* Partial polyfill for Proxy. For details, see https://gist.github.com/mailmindlin/640e9d707ae3bd666d70
*/
function Proxy (target, handler, revocable) {
var self = this;//because life
//override Object.prototype properties
Object.defineProperty(this, '__lookupGetter__', {value: target.__lookupSetter__.bind(target)});
Object.defineProperty(this, '__lookupSetter__', {value: target.__lookupSetter__.bind(target)});
Object.defineProperty(this, '__defineGetter__', {value: target.__defineGetter__.bind(target)});
Object.defineProperty(this, '__defineSetter__', {value: target.__defineSetter__.bind(target)});
//in part from http://ejohn.org/blog/simple-javascript-inheritance/
(function(){
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
this.Class=function() {}
Class.extendMultiple=function() {
var _super = this.prototype;
var result=arguments[0];
var _scls=[result.prototype._props];
for(var i=1;i<arguments.length-1;++i) {
result=result.extend(arguments[i].prototype._props);