I hereby claim:
- I am tennisonchan on github.
- I am tennisonchan (https://keybase.io/tennisonchan) on keybase.
- I have a public key whose fingerprint is 2451 8B43 67F4 F4D6 2ED7 33DB 7C4E 1A7D 7B9F D219
To claim this, I am signing this object:
| #!/bin/sh | |
| INTERVAL=2 | |
| if [ -n $2 ] | |
| then | |
| INTERVAL=$2 | |
| fi | |
| while :; | |
| do |
| { | |
| "gists": [ | |
| { | |
| "id": "69901fd5fa48cb0d03f5f3bcf48c9f63", | |
| "include": "*://localhost:8000/*", | |
| "files": [ | |
| { | |
| "name": "hexo-demo", | |
| "ext": "css", | |
| "url": "https://cdn.rawgit.com/tennisonchan/69901fd5fa48cb0d03f5f3bcf48c9f63/raw/b71ce90920ded75b477513de11baafd0ed6aed6a/hexo-demo.css" |
| SET SERVEROUTPUT ON | |
| DECLARE | |
| v_ts TIMESTAMP; | |
| v_repeat CONSTANT NUMBER := 100000; | |
| BEGIN | |
| v_ts := SYSTIMESTAMP; | |
| FOR i IN 1..v_repeat LOOP | |
| FOR rec IN ( | |
| -- Worst query: Memory overhead AND table access |
| /* | |
| Prompt: Implement mySetInterval() and myClearInterval() as functions that behave exactly like setInterval() and clearInterval(). Obviously, you’re not allowed to use setInterval() in your implementation, but everything else is fair game. | |
| Time: This shouldn’t take too long - please don’t spend more than an hour working on it. | |
| Rules: You may consult MDN for documentation, but you may not use any other resources. | |
| Goals: We’re looking for clean code and quick implementation, so please send in your solution as soon as you finish. | |
| */ | |
| // ### MDN setInterval documentation |
| #!/usr/bin/env bash | |
| # 'Wi-Fi' or 'Ethernet' or 'Display Ethernet' | |
| INTERFACE=Wi-Fi | |
| # Ask for the administrator password upfront | |
| sudo -v | |
| # Keep-alive: update existing `sudo` time stamp until finished | |
| while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & |
| // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER | |
| // Following IEEE754 [Double-precision floating-point format](https://en.wikipedia.org/wiki/Double-precision_floating-point_format) | |
| // Not Support in IE | |
| Number.MAX_SAFE_INTEGER // 9007199254740991 | |
| Number.MIN_SAFE_INTEGER // -9007199254740991 | |
| // Fun fact | |
| Number.MAX_SAFE_INTEGER + 1 == Number.MAX_SAFE_INTEGER + 2 // => true |
I hereby claim:
To claim this, I am signing this object:
| let randomArray = (len=10, max=100) => [...new Array(len)].map(() => Math.floor(Math.random() * max)) | |
| let randomArrayOld = function(len, max) { | |
| return Array.apply(null, Array(len)).map(function() { | |
| return Math.floor(Math.random() * max); | |
| }); | |
| } | |
| let normalArray = (len=10) => [...new Array(len)].map((a,i) => i); |
| // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators | |
| (-3 >>> 0).toString(2) | |
| // 11111111111111111111111111111101 => -3 | |
| (-9 >>> 2).toString(2) | |
| // 00111111111111111111111111111101 => 1073741821 | |
| (-9 >> 2).toString(2) | |
| // 11111111111111111111111111111101 => -3 |