Skip to navigation Skip to content
Simon Technology Blog
  • Architecture
  • Cloud
  • Database
  • Develop
  • Hardware
  • Industry
  • Language
  • Mobile
  • Opensource
  • OS
  • Web
Main Navigation

Tag: function

Sorting – Lua: Custom comparison function in table sort

I have a table that stores file names, for example:

1.jpg
5.jpg< br />4.jpg
10.jpg
2.jpg Now I want to sort it. I used the following code:
table.sort(myTable )

The result is

1.jp

October 5, 2021By Simo Lua comparison, Custom, function, lua, SORT, tableLeave a Comment

Lua Sandbox has special features of leakage

I am trying to use How can I create a secure Lua sandbox? to build my own vulnerability sandbox.

I am trying to create a Lua sandbox Box, some of the Lua functions can access some other Lua f

October 5, 2021By Simo Lua function, Has, leak, lua, Sandbox, specialLeave a Comment

How to delete a specific function from the OS library without editing Lua header files or scripts

I completed my homework and researched other replies on this topic, but did not solve my specific problem.

I want to delete io completely The library and os are only part (let’s say I want to

October 5, 2021By Simo Lua delete, file, function, Head, How to Edit, in the case, Library, lua, Medium, OS, Script, specificLeave a Comment

Function – Strange Construction in Lua

I am learning Lua and encountered the following constructs:

button.action = function() buttonPressed() end< /pre> Is it the same?

button.action = buttonPressed() end ?

I know that

October 5, 2021By Simo Lua constructor, function, lua, Medium, StrangeLeave a Comment

How to calculate upvalues ​​in nested Lua functions?

Use lua code blocks like this:

local a, b
function fA ()
print(a)
function fB ()
print(b)
end
end How many upvalues ​​does fA have, 1 or 2?

You may want to use luac -l -l to read th

October 5, 2021By Simo Lua Calculation, function, How to, lua, middle, nested, UpValuesLeave a Comment

Does the Lua_State pointer passing to Lua_CFunctions guarantee the same state as the call function?

Context: I am working on a set of bindings, and many of my functions refer to the “global” Lua state. (It is not actually global in the code I am developing, but Local to a specific runtime instanc

October 5, 2021By Simo Lua call, CFunctions, function, Guaranteed, lua, pass, point, pointer, Same, state, whetherLeave a Comment

Lua – ‘End’ expect (close the ‘function’), don’t miss the ‘end’

I received an error saying that the “end” is missing, but I looked at the entire code without seeing it.

local Grid = {}
Grid.__index = Grid
function Grid.new(w, h) do
t = {}
setmetatable(t

October 5, 2021By Simo Lua close, don't, end, expected, function, lua, miss, nearbyLeave a Comment

How to pass the lua function to the C function and perform Lua functions multiple times?

What I want to do is create a function that will iterate some objects and call a function for each function. I am using BlitzMax, not C, but other than that , Because it has a complete Lua C functi

October 5, 2021By Simo Lua execution, function, How to, lua, multiple, transferLeave a Comment

Rawset function in Lua

The rawset function in Lua is generally to pass the table, index and value, but I encountered this code:

rawset(tbl,name,()) and

rawset(tbl,name, function() end) Rawset The function ret

October 5, 2021By Simo Lua function, lua, Rawset, ZhongLeave a Comment

How to call a function in C DLL from Lua?

I have a DLL written in C. It is legacy code and the source code cannot be modified. I want to be able to call some functions inside the DLL from Lua.

— My Lua File
include(myCppDll.dll)
fun

October 5, 2021By Simo Lua call, DLL, function, How, lua, middleLeave a Comment

Posts navigation

Page 1 … Page 4 Page 5 Page 6 … Page 9
Recent Posts
  • Sencha-Touch-2 – Sencha Touch 2, Nested XML Analysis NodeValue
  • Add a separation line and format XML content
  • Is there a norm of simplified XML subsets?
  • Look at it when you write React
  • ReactJS – Present React Redux React-Router App to add the server to the Firebase hosted by the Firebase
Categories
  • Android
  • Apache
  • Apache Kafka
  • Asp
  • Auto-Test
  • Automated Build
  • Aws
  • Bitcoin
  • Browser
  • C & C++
  • C#
  • Centos
  • Cgi
  • Character
  • Cloud Service
  • Cocos2dx
  • Cordova
  • CSS
  • Data Structure
  • Delphi
  • Design Pattern
  • Dojo
  • Dubbo
  • ELK
  • Flex
  • football
  • Game
  • Hadoop
  • Hibernate
  • HTML
  • Hybrid
  • Intel
  • IOS
  • Ipad
  • iPhone
  • Java
  • Javascript
  • Jetty
  • JQuery
  • Jsp
  • Linux
  • Load Balance
  • Lua
  • Macbook
  • Macos
  • Mathematics
  • Micro Services
  • Monitoring
  • Motherboard
  • Mysql
  • Network Hardware
  • Network Marketing
  • Nginx
  • NodeJs
  • Nosql
  • Oracle
  • Os Theory
  • Performance
  • PHP
  • Postgresql
  • Power Designer
  • React
  • Redis
  • Regexp
  • Rom
  • Rss
  • Ruby
  • Search Engines
  • Shell Script
  • Silicon Valley
  • Silverlight
  • Software Design
  • Spring
  • Sql
  • Sqlite
  • Sqlserver
  • Storage
  • Storm
  • Surface
  • SVN
  • Swift
  • System Architecture
  • Tablet
  • Uncategorized
  • Unix
  • Visual Basic
  • Visual Studio
  • Web Crawler
  • WebService
  • Windows
  • Wireless
  • XML
  • ZooKeeper
Archives
  • October 2021
  • September 2021
  • August 2021
  • May 2021
  • April 2021
  • September 2020
  • September 2019
  • August 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
© Simon Technology Blog 2025 • ThemeCountry Powered by WordPress