国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
Ubuntu 16.04+、Debian 8+、CentOS 7+
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
Ubuntu 16.04+、Debian 8+、CentOS 7+
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
Last Updated: Patch 6.58
The program which most people use for parsing in FFXIV and several other MMOs. For an open source alternative consider using IINACT though configuring it won't be covered here.
import numpy as np | |
from tqdm import trange | |
def get_neighbour_matrix(x, L, R): | |
dx = np.subtract.outer(x[:, 0], x[:, 0]) | |
dy = np.subtract.outer(x[:, 1], x[:, 1]) | |
dx[dx > (L / 2) ** 2] -= (L / 2) ** 2 | |
dy[dy > (L / 2) ** 2] -= (L / 2) ** 2 | |
pair_dist = dx ** 2 + dy ** 2 |
Consider the following user interface (inspired by Strava) for looking at time-series charts of network data:
Notes on this interface and my Rx implementation of it:
This is a proposal for a lightning talk at the Reactive 2015 conference.
NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut!
React just got stateless components, meaning that they are in essence pure functions for rendering. Pure functions make it dead simple - even fun - to refactor your views
/*eslint-env es6 */ | |
// Inspired by the paper "A tutorial on the universality and | |
// expressiveness of fold" by Graham Hutton (available at | |
// http://www.cs.nott.ac.uk/~gmh/fold.pdf), implementing some generic | |
// list handling functions in JavaScript in terms of `fold`. | |
// Personally I had an enlightnening moment when I realised the | |
// beautiful interplay of cons lists and foldr during the FP101x | |
// Haskell course. JavaScript's syntax doesn't make this very apparent |
function runInScope(main, sources, context, ...args) { | |
if(!main) { | |
throw new Error('A "main" function must be supplied, which will be called in scope and from which a (sinks) object will be returned'); | |
} | |
if(!sources) { | |
throw new Error('A source drivers object must be supplied, to which scoping can be applied'); | |
} | |
if(!context) { | |
throw new Error('A scope context object must be supplied, either as a string, or as an object of key/value pairs'); | |
} |
#!/usr/bin/env bash | |
# ---------------------------------------------------------------------------------------------------- | |
# AUTHOR : KARTHICK S | |
# PURPOSE : THIS SCRIPT WILL EXPORT/IMPORT THE CONFIG AND VM DISK. | |
# | |
# usage: | |
# export function will take care of exporting the necessary for all VM. Run as "<scriptname.sh> export" | |
# import function will take care of importing the necessary for all VM. Run as "<scriptname.sh> import" | |
# |
function ValidateEmail(mail) { | |
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail)) { | |
return (true) | |
} | |
//alert("You have entered an invalid email address!") | |
return (false) | |
} |