来源:https://raw.githubusercontent.com/benjamintanweihao/elixir-cheatsheets/master/GenServer_CheatSheet.pdf
Client
def start_link(opts \\ []) do
GenServer.start_link(__MODULE__, :ok, opts)
end
Returns
<VirtualHost *:88> | |
ServerAdmin [email protected] | |
#php_admin_value open_basedir "/data/www/SmartSell:/data/www/SmartSell/public:/tmp/:/var/tmp/:/proc/" | |
DocumentRoot "/data/www/SmartSell/public" | |
ServerName backendstool.eccang.com | |
ErrorLog "/home/wwwlogs/backendstool.eccang.com-error_log" | |
CustomLog "/home/wwwlogs/backendstool.eccang.com-access_log" combined | |
# Always set these headers. | |
Header always set Access-Control-Allow-Origin "*" | |
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" |
来源:https://raw.githubusercontent.com/benjamintanweihao/elixir-cheatsheets/master/GenServer_CheatSheet.pdf
Client
def start_link(opts \\ []) do
GenServer.start_link(__MODULE__, :ok, opts)
end
Returns
defmodule KVServer.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
# List all child processes to be supervised
Rust 13 hrs 16 mins ████████████████░░░░░ 76.3% | |
Bash 2 hrs 14 mins ██▋░░░░░░░░░░░░░░░░░░ 12.9% | |
Java 49 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.7% | |
Agda 26 mins ▌░░░░░░░░░░░░░░░░░░░░ 2.6% | |
Vala 13 mins ▎░░░░░░░░░░░░░░░░░░░░ 1.3% |
// A simple Lexer meant to demonstrate a few theoretical concepts. It can | |
// support several parser concepts and is very fast (though speed is not its | |
// design goal). | |
// | |
// J. Arrieta, Nabla Zero Labs | |
// | |
// This code is released under the MIT License. | |
// | |
// Copyright 2018 Nabla Zero Labs | |
// |
type term = | |
| Lam of (term -> term) | |
| Pi of term * (term -> term) | |
| Appl of term * term | |
| Ann of term * term | |
| FreeVar of int | |
| Star | |
| Box | |
let unfurl lvl f = f (FreeVar lvl) |