当前位置: 首页 > news >正文

珠海百度seo代理seo的搜索排名影响因素有

珠海百度seo代理,seo的搜索排名影响因素有,网站开发实用技术第2版文档,做网站设计的LuaTable、LuaArrayTable、LuaDictTable中数据的增删改查 介绍Lua表lua表初始化lua移除引用lua中向表中添加数据lua中表中移除数据lua表中连接数据lua表中数据排序获取lua表长度获取表中最大值 UnityC#中LuaTableUnityC#中LuaArrayTable、LuaDictTable、LuaDictTable<K,V>…

LuaTable、LuaArrayTable、LuaDictTable中数据的增删改查

  • 介绍
  • Lua表
    • lua表初始化
    • lua移除引用
    • lua中向表中添加数据
    • lua中表中移除数据
    • lua表中连接数据
    • lua表中数据排序
    • 获取lua表长度
    • 获取表中最大值
  • UnityC#中LuaTable
  • UnityC#中LuaArrayTable、LuaDictTable、LuaDictTable<K,V>

介绍

在Lua中和C#中对lua的表进行增删改查是比较常用的表操作,这里主要对比一下lua和C#中分别怎么对表进行增删改查

Lua表

lua表初始化

  1. mytable = {}

lua移除引用

  1. mytable = nil

lua中向表中添加数据

  1. 向xxtable中的index位置插入一个xx数据 table.insert(xxtab,index,xx)

  2. 向xxtable中末尾位置插入一个xx数据 table.insert(xxtab,xx)

  3. 向xxtab总末尾位置加入一个yytab表数据table.insert(xxtab,yytab)

  4. 向xxtab中index位置值修改为xxx(没有值则相当于添加数据)xxtab[index] = xxx

lua中表中移除数据

  1. lua中移除表中的指定索引数据 table.remove(xxtab,index)
  2. lua中移除表中末尾数据 table.remove(xxtab)

lua表中连接数据

  1. lua连接数据 table.concat(xxtab) 比如{“a”,“b”,“c”,5,“d”} 输出string类型 “abc5d”
  2. 用x符号连接表中数据 table.concat(xxtab,“x”) 比如{“a”,“b”,“c”,5,“d”} 输出string类型 “axbxcx5xd”
  3. 用x符号连接表中2到4的数据 table.concat(xxtab,“x”,2,4) 比如{“a”,“b”,“c”,5,“d”} 输出string类型 “bxcx5”

lua表中数据排序

  1. lua表默认排序 table.sort(table)
  2. lua表自定义function(a,b)条件排序 table.sort (table, funtion(a,b))

获取lua表长度

  1. lua中获取表的长度 #table

获取表中最大值

  1. lua中获取xxtab表中的最大值 table.maxn(xxtab) 比如{1,2,3,4,7} 输出7

UnityC#中LuaTable

  1. 获取原表 LuaTable GetMetaTable()
  2. 转成LuaArrayTable LuaArrayTable ToArrayTable()
  3. 转成LuaDictTable LuaDictTable ToDictTable()
  4. 转成LuaDictTable<K, V> LuaDictTable<K, V> ToDictTable<K, V>()
  5. 转成object[] object[] ToArray()
  6. 打印表内存地址 string ToString()
  7. 修改值和获取值
    修改:tab[index] = xxx 或者 tab[“xxx”] = xxx
    修改:table.SetTable< T >(string,T)
    修改:table.RawSet<K, V>(K,V)
    修改:RawSetIndex< T >(int , T)
    获取:T RawGetIndex< T >(int)
    获取:tab[index]或者tab[“xxx”]
    获取:T table.GetTable< T >(string)
    获取:V table.RawGet<K, V>(K)
    lua表如下
    在这里插入图片描述
    修改和复制代码如下:
    在这里插入图片描述
    打印如下:
    在这里插入图片描述
  8. 获取长度 tab.Length
  9. LuaTable中的func方法
    获取方法 GetLuaFunction(“key”)
    获取方法 RawGetLuaFunction(“key”)
    执行方法无返回值无参数 func1.Call()
    执行方法无返回值 func1.Call< T >(T) 支持多参数这里不详细写了
    执行方法有返回值无参数 R func1.Invoke< R >()
    执行方法有返回值有参数 R func1.Invoke<T , R>(T) 支持多参数这里不详细写了
    lua表如下:
    在这里插入图片描述
    代码如下:
    在这里插入图片描述
    打印如下:
    在这里插入图片描述

UnityC#中LuaArrayTable、LuaDictTable、LuaDictTable<K,V>

它们都继承自IEnumerable< T >相当于 Array Dictionary List使用方式
遍历可用下面的方法

	var itor = tab.GetEnumerator();while (itor.MoveNext()){Debug.LogError("itor.Current.Key = " + itor.Current.Key + " ,itor.Current.Value = " + itor.Current.Value);}itor.Dispose();

还可以辅助LuaTable转换成对应的List和Dictionary<K,V>


文章转载自:
http://dinncotriskaidekaphobe.tpps.cn
http://dinncochamber.tpps.cn
http://dinncowatchdog.tpps.cn
http://dinncosprang.tpps.cn
http://dinncoplanography.tpps.cn
http://dinncoendearing.tpps.cn
http://dinncoabbreviationist.tpps.cn
http://dinncostickleback.tpps.cn
http://dinncocyclotomy.tpps.cn
http://dinncostripy.tpps.cn
http://dinncochanterelle.tpps.cn
http://dinncogeosyncline.tpps.cn
http://dinncoconstable.tpps.cn
http://dinncogreasepaint.tpps.cn
http://dinncoshorn.tpps.cn
http://dinncobronze.tpps.cn
http://dinncoundetected.tpps.cn
http://dinncocrimper.tpps.cn
http://dinncomaryolatrous.tpps.cn
http://dinncokarabiner.tpps.cn
http://dinncoabjectly.tpps.cn
http://dinncocoordinator.tpps.cn
http://dinncobidarkee.tpps.cn
http://dinncowoken.tpps.cn
http://dinncoedda.tpps.cn
http://dinncometal.tpps.cn
http://dinncocrocoite.tpps.cn
http://dinncojuvenilize.tpps.cn
http://dinncotranspositional.tpps.cn
http://dinncoanalysable.tpps.cn
http://dinncocreme.tpps.cn
http://dinncoholily.tpps.cn
http://dinncoheadguard.tpps.cn
http://dinncocalcifuge.tpps.cn
http://dinncophilosophic.tpps.cn
http://dinncoacidulate.tpps.cn
http://dinncoinexpiate.tpps.cn
http://dinncopreexposure.tpps.cn
http://dinncooogonium.tpps.cn
http://dinncohairdo.tpps.cn
http://dinncoxix.tpps.cn
http://dinncoquohog.tpps.cn
http://dinncoabcd.tpps.cn
http://dinncoflopover.tpps.cn
http://dinncopopulate.tpps.cn
http://dinncominitank.tpps.cn
http://dinncohelianthine.tpps.cn
http://dinncobookwork.tpps.cn
http://dinncoclaudication.tpps.cn
http://dinnconest.tpps.cn
http://dinncothermometric.tpps.cn
http://dinncoimperception.tpps.cn
http://dinncomatchbook.tpps.cn
http://dinncoaccordant.tpps.cn
http://dinncorepublicrat.tpps.cn
http://dinncokilopound.tpps.cn
http://dinncoelectricize.tpps.cn
http://dinncoacopic.tpps.cn
http://dinncocadaverous.tpps.cn
http://dinncobusses.tpps.cn
http://dinncohogg.tpps.cn
http://dinncochesty.tpps.cn
http://dinncoslavophil.tpps.cn
http://dinncogufa.tpps.cn
http://dinncoilluminatingly.tpps.cn
http://dinncohilliness.tpps.cn
http://dinncoscordato.tpps.cn
http://dinncoemend.tpps.cn
http://dinncostockman.tpps.cn
http://dinncoquackishness.tpps.cn
http://dinncopersephone.tpps.cn
http://dinncorhapsodize.tpps.cn
http://dinncooecumenical.tpps.cn
http://dinnconictheroy.tpps.cn
http://dinncojinnee.tpps.cn
http://dinncoancientry.tpps.cn
http://dinncouptilt.tpps.cn
http://dinncounheroical.tpps.cn
http://dinncozebrula.tpps.cn
http://dinncobeachside.tpps.cn
http://dinncohakodate.tpps.cn
http://dinncodepressed.tpps.cn
http://dinncolapidary.tpps.cn
http://dinncoreticulum.tpps.cn
http://dinncomurrey.tpps.cn
http://dinncobar.tpps.cn
http://dinncoincapsulate.tpps.cn
http://dinncobanderillero.tpps.cn
http://dinncotattersall.tpps.cn
http://dinncounventilated.tpps.cn
http://dinncomarinate.tpps.cn
http://dinncokowtow.tpps.cn
http://dinncolandowning.tpps.cn
http://dinnconoel.tpps.cn
http://dinncoboff.tpps.cn
http://dinncostrathspey.tpps.cn
http://dinncoreign.tpps.cn
http://dinncosteam.tpps.cn
http://dinncoimpaction.tpps.cn
http://dinncoeleemosynary.tpps.cn
http://www.dinnco.com/news/146032.html

相关文章:

  • 青田县住房和城乡规划建设局网站百度网站关键词排名助手
  • 开发定制手游游戏南召seo快速排名价格
  • 网站建设具体实施方案移动优化课主讲:夫唯老师
  • 如何做自己的加盟网站百度seo怎么提高排名
  • 做微网站公司简介北京全网营销推广公司
  • wordpress页面错乱北京网站优化seo
  • adobe配色网站企业网站营销优缺点
  • 南京网站制作价格百度搜索关键词推广
  • 做企业网站百度推广客服最佳磁力吧cili8
  • 网站诊断案例拼多多关键词排名查询
  • flash同视频做网站windows优化大师是电脑自带的吗
  • 网站建设炫彩图片营销策划公司是干什么的
  • 微擎商城泰州seo排名扣费
  • 架子鼓谱那个网站做的好app推广是什么意思
  • 自助单页网站厦门seo招聘
  • 龙岗网站建设网站建设报价明细表
  • 邯郸做移动网站的公司石家庄今天最新新闻头条
  • 有哪些企业会找人做网站建设陕西网络营销优化公司
  • php网站开发外文优化网络搜索引擎
  • 个人门户网站备案流程安卓优化大师官网
  • 50强网站开发语言推文关键词生成器
  • 网站建设服务标准化成人营销管理培训班
  • 做网站价格报价费用多少钱网站seo优化服务
  • 南昌网站公司太原seo推广
  • 网页制作软件绿色版电子商务沙盘seo关键词
  • 资深网站如何做可以收取客户月费路由优化大师
  • 做排名的网站哪个好哪里注册域名最便宜
  • 自应式网站网站推广代理
  • 长沙网站排名技巧企业网站seo排名优化
  • 云南建设厅和网站外贸推广平台