Skip to content

Instantly share code, notes, and snippets.

View daqi's full-sized avatar
💭
I may be slow to respond.

大齐 daqi

💭
I may be slow to respond.
  • yonyou
  • Beijing
View GitHub Profile

Array<T>

Legend:

  • ✏️ method changes this.
  • 🔒 method does not change this.

Array<T>.prototype.*:

  • concat(...items: Array): T[] 🔒 ES3
function navigation(curr, total, min) {
var left = 1;
var right = total;
var leftmin = Math.floor((min - 1) / 2);
var rightmin = (min - 1) % 2 === 0 ? leftmin : leftmin + 1;
var indexs = []
if (total >= min + 1) {
if (curr > leftmin && curr < total - rightmin) {
left = curr - leftmin
git config --global http.proxy socks5://127.0.0.1:1080
git config --global https.proxy socks5://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
#只对github.com
git config --global http.https://git.521000.best.proxy socks5://127.0.0.1:1080
git config --global --unset http.https://git.521000.best.proxy

Directional React Animations

This is a demo of dynamic directional transitions using React's CSSTransitionGroup.

A Pen by tgecho on CodePen.

License.

var trys = 0;
function pageInit(){
var imgW = 695,
imgH = 1033,
wW = window.innerWidth,
wH = window.innerHeight,
_imgW, _imgH,
picbg = document.getElementById('picbg'),
px2rem = function(px){
return px/(imgW/10);