The Chrome Canary release with the Ambient Light Sensor is now out.
Here's how to experiment:
-
Get Chrome Canary at:
-
Enable the API by navigating to:
/* Fuzzy Search in JavaScript in 66 bytes by SpeedyNinja | |
Creates a Regex of the Form x.*y.*z.* for query xyz and tests it against the list of terms | |
*/ | |
f=t=>s=>t.filter(x=>eval("/"+s.replace(/./,"$&.*")+"/gi").test(x)) | |
/* | |
Usage: | |
var search = f(["list", "of", "search", "terms"]) | |
search("er") -> ["search", "terms"] | |
^ ^ ^^ |
// A: is this pure function? | |
function sum(a, b) { return a + b } | |
// B: is this a pure function? | |
const k = 2 | |
function addK(a) { return a + k } | |
// C: is this a pure function? | |
function sub(a, b) { return sum(a, -b) } | |
// D: is this a pure function? | |
function sub(a, b, summer) { return summer(a, b) } | |
// E: is this a pure function? |
The Chrome Canary release with the Ambient Light Sensor is now out.
Here's how to experiment:
Get Chrome Canary at:
Enable the API by navigating to:
So first, a little background… my preliminary research revealed the following:
There is a CSS rule that can hide scrollbars in Webkit-based browsers (Chrome and Safari). That rule is:
.element::-webkit-scrollbar { width: 0 !important }
There is a CSS rule that can hide scrollbars in IE 10+. That rule is:
.element { -ms-overflow-style: none; }
module.exports = { | |
"env": { | |
"browser": true, | |
"es6": true, | |
"node": true | |
}, | |
"extends": "standard", | |
"plugins": [ | |
"standard", | |
"promise" |
$screensize-phones: 480px | |
$screensize-desktops: 1280px | |
$font-size-min: 16px | |
$font-size-max: 32px | |
@function strip-unit($number) | |
@if type-of($number) == 'number' and not unitless($number) | |
@return $number / ($number * 0 + 1) | |
@return $number |
/* Code snippet about registering mouse & key events in Processing | |
* by Amnon Owed / @AmnonOwed | |
* Tested in Processing 3.2.3 | |
*/ | |
Test test; | |
void setup() { | |
size(400, 400); |
//Autofade: Add to opacity | |
transition = 20; // transition time in frames | |
if (marker.numKeys<2){ | |
tSecs = transition / ( 1 / thisComp.frameDuration); // convert to seconds | |
linear(time, inPoint, inPoint + tSecs, 0, 100) - linear(time, outPoint - tSecs, outPoint, 0, 100) | |
}else{ | |
linear(time, inPoint, marker.key(1).time, 0, 100) - linear(time, marker.key(2).time, outPoint, 0, 100) | |
} |
ArrayList<Rect> rects; | |
float mx, my, mm, time; | |
void setup() { | |
size(720, 720, P2D); | |
generate(); | |
} | |
void draw() { |
;;; slow-keys.el --- Slow keys mode to avoid RSI | |
;; Copyright (c) 2018 Chris Done. All rights reserved. | |
;; This file is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation; either version 3, or (at your option) | |
;; any later version. | |
;; This file is distributed in the hope that it will be useful, |