前言 日志模块主要是logger.h和logger.cpp两个文件。 一、日志功能的使用 日志级别 在logger.cpp/logger.cpp定义了以下五个日志级别: typedefenum{ LTrace=0,LDebug,LInfo,LWarn,LError }LogLevel; 日志的调用方式 在logger.cpp/logger.h中提供了五个日志级别的宏定义 //用法:DebugL<<1<<"+"<<2<<'='<<3; defineWriteL(level)::toolkit::LogContextCaptur...

这篇文章主要介绍了Lua中执行系统命令方法介绍,Lua中有两种方法可以执行操作系统内置命令,需要的朋友可以参考下   Lua中,os.execute可以执行dos命令,但是返回的是系统状态码,默认输出。io.popen()也可以执行dos命令,但是返回一个文件。eg: 复制代码代码如下: localt=io.popen('svnhelp')locala=t:read("all")--a返回一个字符串,内容是svnhelp的内容   如果想执行某命令或程序可选os.execute(),如果还想捕捉该执行结果可用io.popen()eg:复制文件 复制代码代码如下: os...

  rQd1rxKnMSFm   2023年11月12日   88   0   0 lua

一.require的作用 加载指定的模块,相当与include作用类似,加载了该模块,那么就可已使用模块中的全局函数和全局数据(如表等等) 注:实际上require“xxx”后,会将xxx中的全局函数和数据放到表_G中,所以也就能访问了。 2.例子 (1)main.lua require"test" require"showSome" (2)test.lua functionCallFunc() //这里能调用show(),证明了_G中有show这个元素 show() end (3)showSome.lua functionshow() print("itis...

  rQd1rxKnMSFm   2023年11月12日   17   0   0 luanginx_lua

在编译lua包时,出现如下error: 错误原因就是缺少依赖包libreadline-dev 解决方法:缺少libreadline-dev依赖包centos:yuminstallreadline-devel debian:apt-getinstalllibreadline-dev. 问题解决 <!-本文包含:- <!--

  rQd1rxKnMSFm   2023年11月12日   29   0   0 lua

第一章&nbsp;&nbsp;&nbsp;Lua教程 1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 轻量级:它用标准C语言编写并以源代码形式开放,编译后仅仅一百余K,可以很方便的嵌入别的程序里。 Lua应用场景 游戏开发 扩展和数据库插件如:MySQLProxy和MySQLWorkBench Linux系统上安装&nbsp;1.&nbsp;&nbsp;Lua交互式编程模式可以通过命令lua-i或lua来启用:2.&nbsp;我们也可以将代码修改为如下形式来执行脚本(在开头添加:!/usr/local/bin/lua):&nbsp;&nbsp;注释-标示符Lua不...

  rQd1rxKnMSFm   2023年11月12日   18   0   0 lua

跟写视频文件相关的三个配套接口是 &nbsp; avformat_write_header()用于写视频文件头 av_write_frame()用于写视频数据 av_interleaved_write_frame()用于交错写视频数据 av_write_trailer()用于写视频文件尾 avformat_write_header 接口声明位于ffmpeg/libavformat/avformat.h中&nbsp; /Allocatethestreamprivatedataandwritethestreamheadertoanoutputmediafile.@paramsMedi...

  rQd1rxKnMSFm   2023年11月02日   60   0   0 数据初始化音视频sed

avformat_alloc_output_context2接口位于ffmpeg/libavformat/avformat.h中,avformat_alloc_output_context2()函数可以初始化一个用于输出的AVFormatContext结构体 /AllocateanAVFormatContextforanoutputformat.avformat_free_context()canbeusedtofreethecontextandeverythingallocatedbytheframeworkwithinit.@paramctxissettothecreatedfo...

  rQd1rxKnMSFm   2023年11月02日   57   0   0 输出格式文件名sedffmpeg

avformat_new_stream接口声明位于ffmpeg/libavformat/avformat.h中,主要功能为在AVFormatContext中创建Stream通道 /Addanewstreamtoamediafile.Whendemuxing,itiscalledbythedemuxerinread_header().IftheflagAVFMTCTX_NOHEADERissetins.ctx_flags,thenitmayalsobecalledinread_packet().Whenmuxing,shouldbecalledbytheuserbeforeavform...

  rQd1rxKnMSFm   2023年11月02日   39   0   0 #endif音视频ide#if

这篇文章主要介绍了nginx代理多次302的解决方法(nginxFollow302),详细的介绍了解决方法,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧 用proxy_intercept_errors和recursive_error_pages代理多次302 302是HTTP协议中的一个经常被使用状态码,是多种重定向方式的一种,其语义经常被解释为“MovedTemporarily”。这里顺带提一下,现实中用到的302多为误用(与303,307混用),在HTTP/1.1中,它的语义为“Found”. 302有时候很明显,有时候又比较隐蔽。最简单的情况,是当我们在浏...

关注 更多

空空如也 ~ ~

粉丝 更多

空空如也 ~ ~