摘要: 一、VX 时间有限不提供免费服务! 二、订阅号 阅读全文
posted @ 2019-05-16 13:41 朱小勇 阅读(4068) 评论(1) 推荐(0) 编辑
摘要: https://mp.weixin.qq.com/s/cbTaF33NDMCPiP_wrE5SLg?poc_token=HK0IlWaj3GZi9yqBuO9YPKJrzWtR7FHNPFwhgTyZ 阅读全文
posted @ 2024-07-15 19:32 朱小勇 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 介绍 llama:LLaMA(Large Language Model Meta AI)是由 Meta(原Facebook公司)发布的一系列大型语言模型。这些模型旨在处理和生成自然语言文本,能够执行多种任务,如文本摘要、翻译、问答、文本生成等。LLaMA 模型因其高效的性能和较小的模型尺寸而受到关注 阅读全文
posted @ 2024-07-06 00:02 朱小勇 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 代码: local str = "This is a test string with AA and another AA." -- 使用全词匹配查找并替换 -- 注意:Lua的标准正则表达式不支持单词边界`\\b`,所以我们需要使用其他方法 local new_str = str:gsub(" A 阅读全文
posted @ 2024-06-20 16:26 朱小勇 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 1.代码 local str = "This is 'some' text with 'single quotes'." local pattern = "'(.-)'" local matches = {} for match in string.gmatch(str, pattern) do t 阅读全文
posted @ 2024-06-19 17:20 朱小勇 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 在Lua中,_G 是一个特殊的全局变量,它是一个表(table),包含了所有的全局变量。换句话说,_G 是一个全局变量索引表,它包含了程序中定义的所有全局变量作为其键(key),这些全局变量的值(value)作为对应的值。 以下是关于 _G 表的一些说明: 全局变量的索引:_G 表中的每个键都是一个 阅读全文
posted @ 2024-06-06 14:35 朱小勇 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 背景 在软件开发过程中,参数配置是一个不可或缺的环节。它不仅关系到程序的灵活性和可维护性,还直接影响到最终用户的体验。随着技术的发展,Lua语言因其轻量级、灵活和易于嵌入的特性,逐渐成为实现参数可配置化方案的首选语言。本文将探讨基于Lua的地表最强参数可配置化方案,帮助开发者构建更加灵活、高效的系统 阅读全文
posted @ 2024-06-03 21:03 朱小勇 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 1.代码 local code = "return 10 + 20" local execute = load(code) if execute then local result = execute() print(result) -- 这将打印 30 else print("Compilatio 阅读全文
posted @ 2024-06-03 11:10 朱小勇 阅读(2) 评论(0) 推荐(0) 编辑
摘要: lua 中只有 false 和 nil 表示假,其他都是表示真。 数字0和空字符串也表示真。 代码: local cymometerSwitch = 0 if cymometerSwitch then print(111111) else print(222222) end 打印111111 阅读全文
posted @ 2024-05-31 16:18 朱小勇 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 1.代码 local publicParasKey = {"a", "b"} local publicParas = {} local function initPublicParas() for _, name in ipairs(publicParasKey) do print("name", 阅读全文
posted @ 2024-05-31 14:59 朱小勇 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 1111 阅读全文
posted @ 2024-05-31 14:05 朱小勇 阅读(4) 评论(0) 推荐(0) 编辑