Web | Native | |
---|---|---|
nativeEvent.pageX/pageY | coordinates from page size | coordinates from screen size |
nativeEvent.locationX/locationY | always undefined |
(apparently) coordinates from inside the innermost component touched |
ref.measure() x/y | coordinates from parent | always 0 |
ref.measure() pageX/pageY | coordinates from screen size | coordinates from screen size |
ref.measure() width/height | expected width/height | expecte |
This file contains hidden or 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
// Intercepting calls to open() and setRequestHeader(). | |
(function (open, setRequestHeader) { | |
XMLHttpRequest.prototype.open = function (method, url) { | |
console.log('open', method, url); | |
this.addEventListener('readystatechange', function () { | |
console.log('state', this.readyState); | |
}, false); | |
open.apply(this, arguments); | |
}; |
This file contains hidden or 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
sudo su - | |
mkdir -p /opt/bin | |
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose | |
chmod +x /opt/bin/docker-compose |
This file contains hidden or 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
docker run -ti --rm -v /opt/bin:/out ubuntu:17.10 /bin/bash -c "apt-get update && apt-get -y install build-essential && cp /usr/bin/make /out/make" |
This file contains hidden or 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
DELIMITER // | |
CREATE FUNCTION BIN_TO_UUID(b BINARY(16)) | |
RETURNS CHAR(36) | |
BEGIN | |
DECLARE hexStr CHAR(32); | |
SET hexStr = HEX(b); | |
RETURN LOWER(CONCAT( | |
SUBSTR(hexStr, 1, 8), '-', | |
SUBSTR(hexStr, 9, 4), '-', |
This file contains hidden or 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
const nodeHandle = findNodeHandle(wrapperRef.current) | |
if (nodeHandle === null) { | |
return | |
} | |
const onSuccess = (x: number, y: number, width: number, height: number) => { | |
console.log('measureLayout', x, y, width, height) | |
} |