a cubic-bezier solver.
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
using System; | |
using UVtools.Core; | |
using UVtools.Core.Extensions; | |
using UVtools.Core.Scripting; | |
namespace UVtools.ScriptSample; | |
public class LayerDuper : ScriptGlobals | |
{ | |
readonly ScriptNumericalInput<ushort> NumClonesInput = new() |
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
#include <SegaController.h> | |
#include <Joystick.h> | |
#define USE_DEBUG 1 | |
// Controller DB9 pins (looking face-on to the end of the plug): | |
// | |
// 5 4 3 2 1 | |
// 9 8 7 6 |
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
// https://bitbucket.org/kamicane/psxpad/src/master/ | |
#include <PSXPad.h> | |
// https://github.com/dmadison/ArduinoXInput | |
#include <XInput.h> | |
const int ATT_PIN = 9; | |
PSXPad* pad; | |
void setup() { |
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
'use strict' | |
const CAMEL_REGEXP = /[-_]+([A-z])/g | |
module.exports = function camelize (string) { | |
return string.replace(CAMEL_REGEXP, (full, match) => match.toUpperCase()) | |
} |
a generator runner. yield promises. be async.
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
"use strict"; | |
var fragmentText = function(ctx, lines, index, maxWidth) { | |
var line = lines[index]; | |
var nextLine; | |
var tooLong = true; | |
while (tooLong) { | |
var width = ctx.measureText(line.join(" ")).width; |
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
// Array shuffle for MooTools | |
Array.implement({ | |
shuffle: function(){ | |
var i = this.length; | |
if (i == 0) return; | |
while (--i){ | |
var j = Math.floor(Math.random() * ( i + 1 )); | |
var tempi = this[i]; |
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
import { Component } from 'react' | |
import { observe } from '@nx-js/observer-util' | |
export default class ObserverComponent extends Component { | |
componentWillMount () { | |
const render = this.render | |
const initialRender = (...args) => { | |
let result |
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
/** | |
* Converts an RGB color value to HSL. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
* Assumes r, g, and b are contained in the set [0, 255] and | |
* returns h, s, and l in the set [0, 1]. | |
* | |
* @param Number r The red color value | |
* @param Number g The green color value | |
* @param Number b The blue color value | |
* @return Array The HSL representation |
NewerOlder