lua的table复制copy

源代码实现,来至于RESTY-HTTP

代码如下:

-- Returns a new table, recursively copied from the one given.
--
-- @param   table   table to be copied
-- @return  table
local function tbl_copy(orig)
    local orig_type = type(orig)
    local copy
    if orig_type == "table" then
        copy = {}
        for orig_key, orig_value in next, orig, nil do
            copy[tbl_copy(orig_key)] = tbl_copy(orig_value)
        end
    else -- number, string, boolean, etc
        copy = orig
    end
    return copy
end

糖果

糖果
LUA教程

浅析深度学习神经网络的卷积层

浅析深度学习神经网络的卷积层 Continue reading

NC的文件复制功能

Published on October 10, 2019

Django时区与数据库被锁

Published on October 08, 2019