This algorithm returns the points that form an orthogonal path between two rectangles.
// Define shapes
const shapeA = {left: 50, top: 50, width: 100, height: 100};
const shapeB = {left: 200, top: 200, width: 50, height: 100};| const http = require("http"); | |
| const esbuild = require("esbuild"); | |
| const serve = async (servedir, listen) => { | |
| // Start esbuild's local web server. Random port will be chosen by esbuild. | |
| const { host, port } = await esbuild.serve({ servedir }, {}); | |
| // Create a second (proxy) server that will forward requests to esbuild. | |
| const proxy = http.createServer((req, res) => { | |
| // forwardRequest forwards an http request through to esbuid. |
This algorithm returns the points that form an orthogonal path between two rectangles.
// Define shapes
const shapeA = {left: 50, top: 50, width: 100, height: 100};
const shapeB = {left: 200, top: 200, width: 50, height: 100};| // These hashes are for algorithmic use cases, such as bucketing in hashtables, where security isn't | |
| // needed and 32 or 64 bits is enough (that is, rare collisions are acceptable). These are way simpler | |
| // than sha1 (and all its deps) or similar, and with a short, clean (base 36 alphanumeric) result. | |
| // A simple, *insecure* 32-bit hash that's short, fast, and has no dependencies. | |
| // Output is always 7 characters. | |
| // Loosely based on the Java version; see | |
| // https://stackoverflow.com/questions/6122571/simple-non-secure-hash-function-for-javascript | |
| const simpleHash = str => { | |
| let hash = 0; |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
Note: This is the guide for v 2.x.
For the v3, please follow this url: https://blog.csdn.net/sam_shan/article/details/80585240 Thanks @liy-cn for contributing.
For the v6, please follow the comment below: https://gist.github.com/trandaison/40b1d83618ae8e3d2da59df8c395093a?permalink_comment_id=5079514#gistcomment-5079514
Download: StarUML.io
| postgres: | |
| image: postgres:9.4 | |
| volumes: | |
| - ./init.sql:/docker-entrypoint-initdb.d/init.sql |
| # | |
| # CORS header support | |
| # | |
| # One way to use this is by placing it into a file called "cors_support" | |
| # under your Nginx configuration directory and placing the following | |
| # statement inside your **location** block(s): | |
| # | |
| # include cors_support; | |
| # | |
| # As of Nginx 1.7.5, add_header supports an "always" parameter which |