惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
IT之家
IT之家
博客园_首页
量子位
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
博客园 - 聂微东
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
爱范儿
爱范儿
大猫的无限游戏
大猫的无限游戏
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
Microsoft Azure Blog
Microsoft Azure Blog
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
Engineering at Meta
Engineering at Meta
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

博客园 - 咸着的鱼25

环境才是 Agent 的核心基础设施 OpenCode + OpenSpec + Oh-My-OpenCode 联合 SDD/ATDD 开发指南 AI 驱动开发工作流:OpenCode + Oh-My-OpenCode + SDD + ATDD 在线服务数据压缩算法比较 延迟深度链接 搭建wiki系统后端存储-来自大模型 广告投放名词 java spring IoC原理 面试题1 c++ 代码技巧 c++ 性能分析 粗排治理之性能优化 MMR 算法优化 core 基本操作 聊天室开发心得 Docker 学习笔记 Airflow 使用简介 修改系统参数 https学习笔记 openresty: nginx worker不同请求之间共享数据
lua转换etcd应答
咸着的鱼25 · 2017-07-17 · via 博客园 - 咸着的鱼25
local function decodeNodes(nodes)
    local table = {}
    for _, value in ipairs(nodes) do
        if value.nodes then
            table[value.key] = decodeNodes(value.nodes)
        elseif value.value then
            table[value.key] = value.value
        end
    end
    return table
end

local function decodeEtcdJson(rootValue, node)
    if node.nodes then
        rootValue[node.key] = decodeNodes(node.nodes)
    elseif node.value then
        rootValue[node.key] = node.value
    end
end

local function transferString2Boolean(s)
    if not s then
        return false
    elseif s == "true" then
        return true
    elseif s == "false" then
        return false
    end
    return true
end