lua

以下是为您整理出来关于【lua】合集内容,如果觉得还不错,请帮忙转发推荐。

【lua】技术教程文章

Lua 笔记

lua命令:#enter shelllua#excute script filelua xxx.lualua脚本:#!/usr/local/bin/lua核心概念:As a extension language, Lua has no notion of a ‘Main’ program: it only works embedded in a host client, called the embedding program or simply the host. The host program can invoke functions to execute a piece of Lua code, can write and read Lua variables, and can register C functions to be called by L...

ORA-07217: sltln: environment variable cannot be evaluated及RMAN-06059

备份脚本:RMAN> run { allocate channel c1 device type disk format ‘$BACKUP_HOME/level0/level0_%d_%s_%p_%T.bkp‘ connect sys/oracle@app1;3> allocate channel c2 device type disk format ‘$BACKUP_HOME/level0/level0_%d_%s_%p_%T.bkp‘ connect sys/oracle@app2;4> change archivelog all crosscheck;5> backup archivelog all;6> }执行结果:input archive log thread=1 sequence=8325 recid=47541 stamp=854902271 i...

Lua表达式【代码】

Lua中的表达式包括数字常量、字符串常量、变量、一元和二元运算符、函数调用。还可以是非传统的函数定义和表构造。  1、算术运算符1 二元运算符:+ - * / ^ (加减乘除幂) 2 一元运算符:- (负值) 3--这些运算符的操作数都是实数  2、关系运算符1 < > <= >= == ~=  这些操作符返回结果为false或者true。注意:为了避免不一致的结果,混合比较数字和字符串,Lua会报错。比如:2<"15"。 ...

scikit-learn:3.5. Validation curves: plotting scores to evaluate models【图】

參考:http://scikit-learn.org/stable/modules/learning_curve.htmlestimator‘s generalization error can be decomposed in terms ofbias, variance and noise. The bias ofan estimator is its average error for different training sets. The variance ofan estimator indicates how sensitive it is to varying training sets. Noise is a property of the data.首先介绍背景,进而引入本节要讲的内容。背景就是:针对函数C...

Cocos2d-x3.0 lua绑定C++类【图】

这里记录下我实现Lua绑定的全过程。原文地址:http://blog.csdn.net/qqmcy/article/details/26099859准备工作:1、创一个一个Lua的2dx工程。(这个网上已经有好多了)2、创一个C++类。TestScene.h 这个只是一个简单的场景// // TestScene.h // uitestLua // // Created by 杜甲 on 14-5-17. // //#ifndef __uitestLua__TestScene__ #define __uitestLua__TestScene__#include "cocos2d.h" USING_NS_CC;class TestScene :public...

用lua实现ByteArray和ByteArrayVarint

2014-01-10更新: ByteArray 和 ByteArrayVarint 已经进入 quick-cocos2d-x 的 framework.许多 Actionscript 程序员已经从 Flash 转到 Cocos2d-x 了。那么以前的那些超级好用的类库都不见了,只好重新来过。我利用 Lua 和 lpack 库实现了一套 lua版本的 ByteArray 。这套库用于 quick-cocos2d-x(后称quick) 中。因此依赖一些 quick 中已经包含的c库和lua库 。主要依赖如下:lpack (已经包含在quick中)BitOp (已经包含在quick中)qu...

lua的几个时间相关处理函数【代码】

随手写的,项目中没用,不一定对,只作参考。--游戏时间相关函数local gt = {}local math = math local ONE_MINUTE = 60local ONE_HOUR = ONE_MINUTE * ONE_MINUTE local ONE_DAY = ONE_HOUR * 24local ONE_WEEK = ONE_DAY*7--本地时间2000-01-01 00:00对应UTClocal sec_2000 = os.time{year=2000,month=1,day=1,hour=0,min=0,sec=0} local refresh_2000 = sec_2000 + ONE_HOUR*4local monday_2000 = os.time{year=2000,month=1,da...

idea 报Your idea evaluation has expired. Your session will be limited to 30 minutes【图】

网上找的一个办法,为了方式链接失效。进行本地备份 参考地址:https://www.cnblogs.com/-csdn/p/12332502.html ----两种方法----- 1)把提示框的x点掉,会自动打开idea 按最开始安装idea时的步骤 1.----"Help" -> “Register”,选择License server方式,地址填入:http://jetbrains-license-server (应该会自动填上) 2.点击激活,在红色框框的地方会出现Please use the new server addresshttp://fls.jetbrains-agent.com3.把h...

lua学习之类型与值篇【代码】

类型与值lua 是动态类型的语言在语言中没有类型定义的语法每个值都携带有它的类型信息8种基础类型用 type 可以返回这个值的类型的名称将一个变量用于不同类型,通常会导致混乱的代码但合理使用,如异常情况下返回 nil ,以区别正常情况下的其他类型的返回值变量没有预定义的类型,任何变量都可以包含任何类型的值print(type("Hello")) --string print(type(666)) --number a = print print(type(a)) --function a = 111 print(type...

redis分布式锁-lua脚本【代码】

package com.tuling.jedis;import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; import redis.clients.jedis.JedisPoolConfig;import java.io.IOException; import java.util.Arrays;/*** 访问redis单机** @author*/publicclass JedisSingleTest {publicstaticvoid main(String[] args) throws IOException {JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();jedisPoolConfig.setMaxTotal(20);jedi...

LUA - 相关标签