推荐 综合 人气 评论 点赞
lua 实现tableToString
function tableToString(studentNum) local str ="{ " str = str.."\n" for k, v in pairs(studentNum) doif type(v) ~= "table" thenstr = str.."[\""..k.."\"]"str = str..":"str = str..vstr = st

0评论2023-02-09824

【小程序】添加tabBar后navigateTo失效
某页面.js//事件处理函数bindViewTap() {wx.navigateTo({url: '../logs/logs',})}, app.json"tabBar": {"backgroundColor": "black","color":"white","list": [{"pagePath": "pages/index/inde

0评论2023-02-09474

微信小程序 如何设置底部tabBar 以及父子组件如何传值
1、底部tabBar设置 当然可以设置在顶部在全局app.json中配置 "tabBar":{  position:"bottom"  // 在这里设置tabBar的位置 可以选择顶部和底部  "list":[      {   "text":"首页" ,//在这里可以写底部tabBar中内容 什么页面    pagePath:"page

0评论2023-02-09965

微信小程序wx.switchTab
【转】关于微信小程序wx.switchTab的问题昨天做了个功能要从首页跳到tabBar页,并且要带上参数.首先我是这样做的:在index.js中:toCategory:function(event){    var cate_id = event.currentTarget.dataset.cate_id;    wx.switchTab({      url: '../c

0评论2023-02-09890

微信小程序 tabBar 无效原因
pages加载顺序第一个需要list第一个相同,理由不明."pages": ["pages/index/index","pages/logs/logs","pages/login/login"],"tabBar": {"list": [{"pagePath": "pages/index/index", //如果是其他的就没法显示,,,"t

0评论2023-02-09766

[Rust] 变量的属性: 不可变(immutable), 可变(mutable), 重定义(shadowing), 常量(const), 静态(static)
变量的可变性在 Rust 中, 变量可以具有下面的属性。immutable: 不可变变量mutable: 可变变量shadowing: 重定义(遮蔽)一个变量const: 常量static: 静态变量不可变变量(immutable) vs 可变变量(mut)Rust 的安全哲学要求变量默认是不可变的。fn main() {// 定义

0评论2023-02-09882

perl开发环境配置(Database,SOCKET,CISCO)j(ReShip)
perl开发环境配置(Database,SOCKET,CISCO)1. Oracle Client Enviroment2. Perl Modules Installation1. Oracle Client Enviroment1.1. 从Oracle Server上打包$ORACLE_BASEcd /oracle, tar -cf admin.tar admin, 同目录还有jre,oui,product; gzip product.tar

0评论2023-02-09944

Lua中的weak表——weak table
  弱表(weak table)是一个很有意思的东西,像C++/Java等语言是没有的。弱表的定义是:A weak table is a table whose elements are weak references,元素为弱引用的表就叫弱表。有弱引用那么也就有强引用,有引用那么也就有非引用。我们先要厘这些基本概念

0评论2023-02-09468

Gink掉过的坑(一):将CCTableView导入到lua中
环境:系统:win7 64位cocos2dx:cocos2d-2.1rc0-x-2.1.3  Visual Studio: 2012由于项目是用lua写的,需要将cocos2dx中的方法导入到lua中, 但是cocos2dx官方并没有导出全部的接口,有些需要开发者自己导出。这里我们需要用CCTableView,这个类并不完善,还

0评论2023-02-09705

Lua中的table函数库 table lua
table.concat(table, sep,  start, end)concat是concatenate(连锁, 连接)的缩写. table.concat()函数列出参数中指定table的数组部分从start位置到end位置的所有元素, 元素间以指定的分隔符(sep)隔开。除了table外, 其他的参数都不是必须的, 分隔符的默认值是

0评论2023-02-09864

lua的table表处理 及注意事项
lua,一款很轻量级很nice很强大的脚本语言,做为lua中使用最为频繁的table表,在使用之时还是有颇多的好处与坑的;下面是大牛 云风的一片关于lua table的blog,可使得对lua table内在机制 窥测一二;lua 的整体效率是很高的,其中,它的 table 实现的很巧妙为

0评论2023-02-09361

Unity热更新03-C#调用XLua-09-Lua表映射到 XLua的LuaTable中(不建议)
using System.Collections;using System.Collections.Generic;using UnityEngine;using XLua;public class Lesson9_CallLuaTable : MonoBehaviour{void Start(){LuaMgr.GetInstance().Init();LuaMgr.GetInstance().DoLuaFile("Main");//不建议使用LuaTable和L

0评论2023-02-09610

Lua 获取table的长度
#!/usr/bin/lua-- Lua获取tbale长度算法--[[Lua很少使用求长度的算法,假设table的类型是数组,可以使用tbale.getn(table)或者#但是也有风险,如果数组中有元素的值是nil,那么计算长度就会出错假设tbale是键值对,那么tbale.getn(table)或者#都无法使用,只

0评论2023-02-09991

« 上一页 1/14 下一页 »