Phoenix 1.5 requires Elixir >= 1.7. Be sure your existing version is up to date by running elixir -v on the command line.
$ mix archive.uninstall phx_new
$ mix archive.install hex phx_new 1.5.0| sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator $(which alacritty) 50 | |
| sudo update-alternatives --config x-terminal-emulator |
| #!/usr/bin/env elixir | |
| defmodule Canvas do | |
| @behaviour :wx_object | |
| @title "Canvas Example" | |
| @size {600, 600} | |
| def start_link() do | |
| :wx_object.start_link(__MODULE__, [], []) |
| git config --global http.proxy 'socks5://127.0.0.1:1080' | |
| git config --global https.proxy 'socks5://127.0.0.1:1080' |
| git ls-files --others --exclude-standard -z | cpio -pmd0 path/to/directory | |
| git clean -d -f | |
| # git ls-files: print a | |
| # * null-delimited (-z) list of | |
| # * untracked (--others) | |
| # * non-ignored (--exclude-standard) files. | |
| # cpio: | |
| # * copy (-p) | |
| # * files in a null-delimited list (-0) |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| # http://zh.wikipedia.org/wiki/中文数字 | |
| # http://china.younosuke.com/03_013.html | |
| module ChineseNum | |
| extend self | |
| UPPER_ZERO = '零' | |
| LOWER_ZERO = '〇' | |
| UPPER_DIGITS = %w[壹 贰 叁 肆 伍 陆 柒 捌 玖].unshift nil | |
| LOWER_DIGITS = %w[一 二 三 四 五 六 七 八 九].unshift nil |
| 根据Unicode5.0整理如下: | |
| 1)标准CJK文字 | |
| http://www.unicode.org/Public/UNIDATA/Unihan.html | |
| 2)全角ASCII、全角中英文标点、半宽片假名、半宽平假名、半宽韩文字母:FF00-FFEF | |
| http://www.unicode.org/charts/PDF/UFF00.pdf | |
| 3)CJK部首补充:2E80-2EFF | |
| http://www.unicode.org/charts/PDF/U2E80.pdf |
| # http://erlang.org/doc/man/erl.html | |
| # --erl erlang VM attributes/flags | |
| # +A 32 async-threads | |
| # +K true kernel-poll if supported | |
| # +P 524288 max number of simultaneous processes | |
| iex --erl '+A 32 +K true +P 524288' |