Skip to content

Instantly share code, notes, and snippets.

View mriveralee's full-sized avatar

Michael Rivera mriveralee

View GitHub Profile
@mriveralee
mriveralee / point_in_polygon_using_winding_number.js
Created October 13, 2018 01:47 — forked from vlasky/point_in_polygon_using_winding_number.js
JavaScript implementation of winding number algorithm to determine whether a point is inside a polygon
//JavaScript implementation of winding number algorithm to determine whether a point is inside a polygon
//Based on C++ implementation of wn_PnPoly() published on http://geomalgorithms.com/a03-_inclusion.html
function pointInPolygon(point, vs) {
var x = parseFloat(point[0]), y = parseFloat(point[1]);
var wn = 0;
for (var i = 0, j = vs.length - 1; i < vs.length; j = i++) {
var xi = parseFloat(vs[i][0]), yi = parseFloat(vs[i][1]);
@mriveralee
mriveralee / hw.tex
Created September 25, 2016 02:06 — forked from klange/hw.tex
Homework template
\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{fancyhdr}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{listings}
\usepackage{graphicx}
\usepackage{enumerate}
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
info: Starting app xxxxxxxx
error: Error running command deploy
error: socket hang up
help: For help with this error contact Nodejitsu Support:
help: webchat: <http://webchat.nodejitsu.com/>
help: irc: <irc://chat.freenode.net/#nodejitsu>
help: email: <support@nodejitsu.com>
help:
help: Copy and paste this output to a gist (http://gist.github.com/)
info: Nodejitsu not ok