xlua摘要
JVM学习笔记11:synchronized的实现
编程语言
lua学习笔记:迭代和闭包
JVM学习笔记11:synchronized的实现
编程语言
lua学习笔记:函数深入
JVM学习笔记11:synchronized的实现
编程语言
matrix transform for luastg
Another time copy from css (first attempt is ease function)
Theory
From css3 animation, we have matrix, matrix3d method to describe transform of a image affinely.
For 2d image:
0. translate, skew and scale according to (0, 0)
%
rotation according to (0, 0)
%
Matrix is kinda linear transformation, so rotation matrix ($R$) + sketching matrix ($S$) = $T(=RS)$
If we have matrix $A$ (invertiable), we can use eigenvalue decomposition to tween, $A=VDV^{-1}$, if separated into 10 steps, $T = VD^{1 ...
luaframework puremvc
JVM学习笔记11:synchronized的实现
编程语言
mac 上安装lua
我使用的版本是5.3.3,在命令端按照以下输入:
Step1:打开命令终端
Step2:curl -R -O http://www.lua.org/ftp/lua-5.3.0.tar.gz
Step3:tar zxf lua-5.3.0.tar.gz
Step4:cd lua-5.3.0
Step5:make macosx test
Step6:sudo make install
执行完Step6后会要求你输入密码,你的电脑登录密码,
安装完成后输入 lua -v回车显示:
Lua 5.3.3 Copyright (C) 1994-2016 Lua.org, PUC-Rio
此时表示已经安装成功。
备注:如果Step6直接使用 make install,可能会提示权限问题
cd src && mkdir -p /usr/local/bin /usr/local/include /usr/local/lib /usr/local/man/man1 /usr/local/share/lua/5.3 /usr/local/lib/lua/5.3
mkdir: /us ...
lua
lua语法相对简洁它最大的特点就是用同步的代码逻辑实现非阻塞的调用,其次它有单进程内的 LRU cache 和进程间的 share DICT cache,而且它是揉合 nginx 和 LuaJIT 而产生的
参考资料openresty最佳实践
<hr/>
lua
Lua语句有以下几种循环处理方式: 1 ) while循环 2 )for 循环 3 )repeat…until 4 ) 循环的嵌套
Lua 支持的循环控制语句: break语句
Lua 提供的控制结构语句: 1)if语句 2)if…else 语句 3)if嵌套语句
Nginx 安装 Lua 支持
Nginx 支持 Lua 需要安装 lua-nginx-module 模块,一般常用有 2 种方法:
编译 Nginx 的时候带上 lua-nginx-module 模块一起编译
使用 OpenResty: Nginx + 一些模块,默认启用了 Lua 支持(推荐使用此方式)
OpenResty is just an enhanced version of Nginx by means of addon modules anyway. You can take advantage of all the exisitng goodies in the Nginx world.
OpenResty® 是一个基于 Nginx 与 Lua 的高性能 Web 平台,其内部集成了大量精良的 Lua 库、第三方模块以及大多数的依赖项。用于方便地搭建能够处理超高并发、扩展性极高的动态 Web 应用、Web 服务和动态网关。
OpenResty® 通过汇聚各种设计精良的 Nginx 模块(主要由 OpenResty 团队自主开发),从而将 Nginx 有效地变成一个强大的通用 Web 应用平 ...
evaluation_nlp
Automatic Evaluation:Word Error Rate(WER)It is the Levenshtein distance between output and reference divided by the length of the reference. Dynamic programming is employed to compute the Levenshtein distance so as to determine the best alignment between the output and the reference.
Deletion is a reference word aligned to nothing and insertion is a output word align to nothing. Substitution is word that dose not match the reference word.
WER is actually edit distance normalized by length.
$${d ...


