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
// Calculates a curve that goes through a number of points. | |
// There are lots of mathematical approaches to do so | |
// (see: https://en.wikipedia.org/wiki/Cubic_Hermite_spline). | |
// The most commonly used seems to be the Catmull–Rom spline. | |
// My approch here is not intended to be a new general | |
// solution to this problem, but it should fit some geometrical | |
// and graphical needs. See | |
// https://hartmut-bohnacker.de/projects/points-to-curve | |
// for more explanation. |
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
<? | |
//personal auth token from your github.com account. doing this will eliminate having to use oauth everytime | |
$token = "zzzzzzzzYourPersonalGithubAccessTokenzzzzzzzz"; | |
//post url, https://developer.github.com/v3/issues/ | |
$url = "https://api.github.com/repos/octocat/some_repo/issues?access_token=" . $token; | |
//request details, removing slashes and sanitize content | |
$title = htmlspecialchars(stripslashes("Test Title''\s"), ENT_QUOTES); | |
$body = htmlspecialchars(stripslashes("Test Body'\'$%'s"), ENT_QUOTES); |
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
/* eslint no-unused-vars: 0, no-multi-spaces: 0 */ | |
"use strict"; | |
// [JPEG encode process] | |
// 1. RGB to YUV | |
// 2. Padding & chunk to 8x8-blocks | |
// 3. DCT | |
// 4. Quantization | |
// 5. zigzag scan | |
// 6. Huffman coding |