Creating another optical illusion with CSS.
As your eyes move around the page, the dots should change between white and black.
Simply made with a combination of background size and use of gradients.
Enjoy!
| """ | |
| Tested on Linux with python 3.7 | |
| Must have portaudio installed (e.g. dnf install portaudio-devel) | |
| pip install pyqtgraph pyaudio PyQt5 | |
| """ | |
| import numpy as np | |
| import pyqtgraph as pg | |
| import pyaudio | |
| from PyQt5 import QtCore, QtGui |
| /** Links: | |
| * - http://stackoverflow.com/questions/36368919/scrollable-image-with-pinch-to-zoom | |
| * - http://blog.lum.pe/gesture-detection-in-react-native-fixing-unexpected-panning/ | |
| * | |
| */ | |
| import React, {Component, PropTypes} from 'react'; | |
| import { Text, View, PanResponder, Image } from 'react-native'; | |
| function calcDistance(x1, y1, x2, y2) { |
| function api(method, uri, body) { | |
| url = 'http://localhost:3000/' + uri; | |
| return fetch(url, { | |
| method: method, | |
| headers: { | |
| 'Accept': 'application/json', | |
| 'Content-Type': 'application/json' | |
| }, | |
| body: JSON.stringify(body) | |
| }) |
| * For details: https://www.opennet.ru/base/sec/gpg_crypt.txt.html | |
| * Also: http://f3arnil.blogspot.ru/2011/06/linux-apt-key.html | |
| #!/bin/sh | |
| KEY_SERVER=p80.pool.sks-keyservers.net | |
| if [ -z $1 ] | |
| then | |
| KEYS='sudo apt-get -qq update 2>&1 | awk '/NO_PUBKEY/ {print($NF)}' | uniq | tr '\n' '\ '' |
| var DEBUG = false; | |
| var debug = function(msg) { | |
| if (DEBUG) { | |
| console.log(msg); | |
| } | |
| } | |
| Function.prototype.curry = function() { | |
| this.argList || (this.argList = []); |
| /* Copy a regular file from SRC_NAME to DST_NAME. | |
| If the source file contains holes, copies holes and blocks of zeros | |
| in the source file as holes in the destination file. | |
| (Holes are read as zeroes by the `read' system call.) | |
| When creating the destination, use DST_MODE & ~OMITTED_PERMISSIONS | |
| as the third argument in the call to open, adding | |
| OMITTED_PERMISSIONS after copying as needed. | |
| X provides many option settings. | |
| Return true if successful. | |
| *NEW_DST is as in copy_internal. |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParentelem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeightelem.getClientRects(), elem.getBoundingClientRect()| var next = function(p, $scope) { | |
| var create = function($scope, time) { | |
| var time = time || 1000; | |
| return new Promise(function(resolve, reject) { | |
| setTimeout(function() { | |
| console.log("Promise: " + $scope.val); | |
| $scope.val++; | |
| resolve($scope); | |
| }, time); | |
| }); |