当前位置:网站首页>【转发】查看lua中userdata的方法
【转发】查看lua中userdata的方法
2020-11-06 21:09:00 【蟑螂恶霸L】
local function printMetaTableFun(t)
local rs_tb={}
local function tmp(t)
if t then
for _val, _val_type in pairs(t) do
if type(_val_type)~="userdata" then
if not string.find(_val,"_") then
table.insert(rs_tb,_val)
end
end
end
local ft=getmetatable(t)
if ft then
tmp(ft)
end
end
end
tmp(getmetatable(t))
table.sort(rs_tb)
local rs_str=""
for i=1,#rs_tb do
rs_str=rs_str .. rs_tb[i] .. "\n"
end
print(rs_str)
end
printMetaTableFun(touch)
版权声明
本文为[蟑螂恶霸L]所创,转载请带上原文链接,感谢
https://my.oschina.net/u/3983177/blog/4479871
边栏推荐
- (1) ASP.NET Introduction to core3.1 Ocelot
- 5.5 controlleradvice notes - SSM in depth analysis and project practice
- Vue.js Mobile end left slide delete component
- DRF JWT authentication module and self customization
- NLP model Bert: from introduction to mastery (2)
- 前端基础牢记的一些操作-Github仓库管理
- Python Jieba segmentation (stuttering segmentation), extracting words, loading words, modifying word frequency, defining thesaurus
- It's easy to operate. ThreadLocal can also be used as a cache
- With the advent of tensorflow 2.0, can pytoch still shake the status of big brother?
- How to use parameters in ES6
猜你喜欢

Python Jieba segmentation (stuttering segmentation), extracting words, loading words, modifying word frequency, defining thesaurus

JVM memory area and garbage collection
![Network security engineer Demo: the original * * is to get your computer administrator rights! [maintain]](/img/14/ede1ffa7811dbc2a5b15b9a7b17a5e.jpg)
Network security engineer Demo: the original * * is to get your computer administrator rights! [maintain]

Did you blog today?

Discussion on the technical scheme of text de duplication (1)

Flink的DataSource三部曲之一:直接API

01. SSH Remote terminal and websocket of go language

用一个例子理解JS函数的底层处理机制

【自学unity2d传奇游戏开发】地图编辑器

前端未來趨勢之原生API:Web Components
随机推荐
[actual combat of flutter] pubspec.yaml Configuration file details
一篇文章教会你使用Python网络爬虫下载酷狗音乐
5.4 static resource mapping
Linked blocking Queue Analysis of blocking queue
百万年薪,国内工作6年的前辈想和你分享这四点
Python saves the list data
01. SSH Remote terminal and websocket of go language
The difference between gbdt and XGB, and the mathematical derivation of gradient descent method and Newton method
What to do if you are squeezed by old programmers? I don't want to quit
Did you blog today?
Python3 e-learning case 4: writing web proxy
Mac installation hanlp, and win installation and use
I think it is necessary to write a general idempotent component
一篇文章带你了解HTML表格及其主要属性介绍
使用 Iceberg on Kubernetes 打造新一代雲原生資料湖
Thoughts on interview of Ali CCO project team
Brief introduction and advantages and disadvantages of deepwalk model
Introduction to X Window System
Discussion on the technical scheme of text de duplication (1)
A course on word embedding