• Linux system installation nginx Lua environment


    Also refer to the official installation guide:lua-nginx-module Installation This is my summary of installation for reference: The latest version is requiredNginx,LuaJIT,ngx_ devel_ Kit, Lua nginx module and other installation files: NginxLuajit Lua or luajit are OK, but for performance reasons, it is recommended to install luajit ngx_devel_kit lua-nginx-module Reference command Download: ? 1 2 3 […]

  • The nginx + Lua implementation calls the. So file


    Recently, we are working with the intelligent hardware department to provide an indoor positioning service. The service calculates the specific shopping mall according to the beacon device list transmitted from the mobile phone, takes the shopping mall ID and beacon device list as parameters, calls the calculation method in the. So file, obtains the location […]

  • How to set table as read-only property in Lua


    Some read-only tables in the project are easy to be rewritten by mistake, so it is decided to attach these tables in a non online environmentRead only attribute, it is convenient to throw Lua errors in case of misrewriting. The final version code is as follows: –[[——————————————————————————  -**   Set table read-only   Lua will […]

  • Example of method for converting Lua table to c# dictionary


    Table property Table is an “associative array”. The index of the array can be a number or a string. All index values need to be enclosed by “[” and “]”; If it is a string, you can also remove quotation marks and brackets; That is, if it is not enclosed by [], it is considered […]

  • Lua language novice simple tutorial


    1、 Foreword Lua is a lightweight and compact scripting language, which is written in standard C language and open in the form of source code. Its design purpose is to be embedded in the application, so as to provide flexible expansion and customization functions for the application. Lua can be applied in game development, independent […]

  • Detailed explanation of how to customize redis command with Lua


    preface As a very successful database, redis provides a wealth of data types and commands. Using these, we can easily and efficiently complete many cache operations, but there are always some special problems or needs to be solved. At this time, we may need to customize our own redis data structure and commands. Redis command […]

  • Detailed explanation of two methods of regular pattern matching in openresty


    preface This article introducesOpenRestyTwo kinds ofregularpattern matching。 First of all, the openresty suite contains two kinds of syntax: one is the openresty syntax mainly based on the FFI API, and the other is the syntax similar to the native Lua scripting language. In the content introduced in this article, the regular pattern matching corresponding to […]

  • Let’s talk more about the magical table in Lua


    preface Recently, I was trying to configure awesome WM, so I learned Lua roughly. In the process of learning, I was completely overwhelmed by the application of table in Lua. Table is really ubiquitous in Lua: first, it can be used as a dictionary and array; In addition, it can also be used to set […]

  • Lua read redis data null judgment example code


    preface WhyluaScript operationredisdatabase 1. Reduce overhead – reduce the number of requests to the redis server 2. Atomic operation – redis executes Lua script as an atom 3. Reusable – other clients can use Lua scripts that have been executed 4. Increase redis flexibility – Lua script can help redis do more things Lua script […]

  • Detailed explanation of time zone in Lua game development tutorial


    preface What is Lua? Lua is a small script language, which was developed by a research team at the Catholic University of Rio de Janeiro in Brazil in 1993. Its design purpose is to embed in the application, so as to provide flexible expansion and customization functions for the application. Lua is written in standard […]

  • Summary of the differences between pairs and ipairs in Lua


    preface Recently in usenginx_lua_module The module writes a traffic forwarding thing and forwards it to another place according to the traffic proportion according to the header, body and cookie. After reading the code written by predecessors, some of them are used when loopingpairs, some useipairs, I don’t understand. FortunatelyLuaThere is an electronic version on the […]

  • Phpredis executes Lua script sample code


    preface This paper mainly introduces phpredisimplementLua scriptFor your reference and study, let’s take a look at the detailed introduction Sample code ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 […]