$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine
.babelrc:
{
"presets": ["es2015"]
/* | |
* Updated w/ insertAdjacentElement | |
* @author Dan Levy @justsml | |
* 2016-06-23 | |
* | |
* Credit: @lyleunderwood - afterend patch/fix | |
* | |
* ```js | |
* import { insertAdjacentElement } from './libs/insertAdjacentHTML.js'; | |
* Use either: |
$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine
.babelrc:
{
"presets": ["es2015"]
<?php | |
// original source: http://kuwamoto.org/2007/12/17/improved-pluralizing-in-php-actionscript-and-ror/ | |
/* | |
The MIT License (MIT) | |
Copyright (c) 2015 | |
Permission is hereby granted, free of charge, to any person obtaining a copy |
<script src="http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.1/processing-api.min.js"></script><html> | |
<!-- | |
Created using jsbin.com | |
Source can be edited via http://jsbin.com/pdfjs-helloworld-v2/8598/edit | |
--> | |
<body> | |
<canvas id="the-canvas" style="border:1px solid black"></canvas> | |
<input id='pdf' type='file'/> | |
<!-- Use latest PDF.js build from Github --> |
// Derived from http://stackoverflow.com/a/8545403/106786 | |
function decodeFloat(bytes, signBits, exponentBits, fractionBits, eMin, eMax, littleEndian) { | |
var totalBits = (signBits + exponentBits + fractionBits); | |
var binary = ""; | |
for (var i = 0, l = bytes.length; i < l; i++) { | |
var bits = bytes[i].toString(2); | |
while (bits.length < 8) | |
bits = "0" + bits; |