// default exports
export default 42;
export default {};
export default [];
export default (1 + 2);
export default foo;
export default function () {}
export default class {}
export default function foo () {}
This file contains 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
/*------------------------ | |
Libraries | |
------------------------*/ | |
const axios = require("axios"); | |
const fs = require("fs"); | |
const FormData = require("form-data"); | |
/*------------------------ | |
Download the file. | |
Good article on how to download a file and send with form data - https://maximorlov.com/send-a-file-with-axios-in-nodejs/ |
This file contains 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
// 22: class - creation | |
// To do: make all tests pass, leave the assert lines unchanged! | |
describe('class creation', () => { | |
it('is as simple as `class XXX {}`', function() { | |
class TestClass {} | |
const instance = new TestClass(); | |
assert.equal(typeof instance, 'object'); |
This file contains 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
/*! CSS.supports() Polyfill | |
* https://gist.github.com/codler/03a0995195aa2859465f | |
* Copyright (c) 2014 Han Lin Yap http://yap.nu; MIT license */ | |
if (!('CSS' in window)) { | |
window.CSS = {}; | |
} | |
if (!('supports' in window.CSS)) { | |
window.CSS._cacheSupports = {}; | |
window.CSS.supports = function(propertyName, value) { |
- Install Git for Windows
- Install Node
- Install Python 2.7.3
- Install Microsoft Visual Studio 2015 Community
- Open the command prompt as Administrator, run the following commands, then close the command prompt (a new prompt is required before the new environment variables will be available)
- npm install -g npm
- (Upgrades to npm v3, which no longer nests dependencies indefinitely. No more "maximum path length exceeded" errors due to the 260 character path limit in Windows, or needing to delete node_modules with rimraf.)
- setx PYTHON C:\Python27\python.exe /m
- (May need to change path to your custom install directory.)
- npm install -g npm
- Open a new command prompt and run the following commands. If these install without errors, you have bypasse
This file contains 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
<html> | |
<head><title>Canvas Delaunay Triangulation</title></head> | |
<body></body> | |
<script type="text/javascript"> | |
var img = new Image(); | |
img.onload = init; | |
img.src = './bg_10.jpg'; | |
var display, source; | |
var points = [], drew = []; |