luaFramework
BeginStaticLibs 参考CustomSettings.cs
public static List<Type> staticClassTypes = new List<Type>
{
typeof(UnityEngine.Application),
typeof(UnityEngine.Time),
typeof(UnityEngine.Screen),
typeof(UnityEngine.SleepTimeout),
typeof(UnityEngine.Input),
typeof(UnityEngine.Resources),
typeof(UnityEngine.Physics),
typeof(UnityEngine.RenderSettings),
typeof(UnityEngine.QualitySettings),
typeof(UnityEngine.GL),
typeof(UnityEngine.Graphics),
};
LuaHelper
LuaFramework_LuaHelperWrap.cs
public static void Register(LuaState L)
{
L.BeginStaticLibs("LuaHelper");
L.RegFunction("GetType", GetType);
L.RegFunction("GetPanelManager", GetPanelManager);
L.RegFunction("GetResManager", GetResManager);
L.RegFunction("GetNetManager", GetNetManager);
L.RegFunction("GetSoundManager", GetSoundManager);
L.RegFunction("OnCallLuaFunc", OnCallLuaFunc);
L.RegFunction("OnJsonCallFunc", OnJsonCallFunc);
L.EndStaticLibs();
}
Debugger
LuaInterface_DebuggerWrap.cs
public static void Register(LuaState L)
{
L.BeginStaticLibs("Debugger");
L.RegFunction("Log", Log);
L.RegFunction("LogWarning", LogWarning);
L.RegFunction("LogError", LogError);
L.RegFunction("LogException", LogException);
L.RegVar("useLog", get_useLog, set_useLog);
L.RegVar("threadStack", get_threadStack, set_threadStack);
L.RegVar("logger", get_logger, set_logger);
L.EndStaticLibs();
}
Application . lua中使用-> UnityEngine.Application
UnityEngine_ApplicationWrap.cs
public static void Register(LuaState L)
{
L.BeginStaticLibs("Application");
L.RegFunction("Quit", Quit);
L.RegFunction("CancelQuit", CancelQuit);
L.RegFunction("Unload", Unload);
L.RegFunction("GetStreamProgressForLevel", GetStreamProgressForLevel);
L.RegFunction("CanStreamedLevelBeLoaded", CanStreamedLevelBeLoaded);
L.RegFunction("GetBuildTags", GetBuildTags);
L.RegFunction("SetBuildTags", SetBuildTags);
L.RegFunction("HasProLicense", HasProLicense);
L.RegFunction("ExternalCall", ExternalCall);
L.RegFunction("RequestAdvertisingIdentifierAsync", RequestAdvertisingIdentifierAsync);
L.RegFunction("OpenURL", OpenURL);
L.RegFunction("GetStackTraceLogType", GetStackTraceLogType);
L.RegFunction("SetStackTraceLogType", SetStackTraceLogType);
L.RegFunction("RequestUserAuthorization", RequestUserAuthorization);
L.RegFunction("HasUserAuthorization", HasUserAuthorization);
L.RegVar("streamedBytes", get_streamedBytes, null);
L.RegVar("isPlaying", get_isPlaying, null);
L.RegVar("isFocused", get_isFocused, null);
L.RegVar("isEditor", get_isEditor, null);
L.RegVar("isWebPlayer", get_isWebPlayer, null);
L.RegVar("platform", get_platform, null);
L.RegVar("buildGUID", get_buildGUID, null);
L.RegVar("isMobilePlatform", get_isMobilePlatform, null);
L.RegVar("isConsolePlatform", get_isConsolePlatform, null);
L.RegVar("runInBackground", get_runInBackground, set_runInBackground);
L.RegVar("dataPath", get_dataPath, null);
L.RegVar("streamingAssetsPath", get_streamingAssetsPath, null);
L.RegVar("persistentDataPath", get_persistentDataPath, null);
L.RegVar("temporaryCachePath", get_temporaryCachePath, null);
L.RegVar("srcValue", get_srcValue, null);
L.RegVar("absoluteURL", get_absoluteURL, null);
L.RegVar("unityVersion", get_unityVersion, null);
L.RegVar("version", get_version, null);
L.RegVar("installerName", get_installerName, null);
L.RegVar("identifier", get_identifier, null);
L.RegVar("installMode", get_installMode, null);
L.RegVar("sandboxType", get_sandboxType, null);
L.RegVar("productName", get_productName, null);
L.RegVar("companyName", get_companyName, null);
L.RegVar("cloudProjectId", get_cloudProjectId, null);
L.RegVar("targetFrameRate", get_targetFrameRate, set_targetFrameRate);
L.RegVar("systemLanguage", get_systemLanguage, null);
L.RegVar("backgroundLoadingPriority", get_backgroundLoadingPriority, set_backgroundLoadingPriority);
L.RegVar("internetReachability", get_internetReachability, null);
L.RegVar("genuine", get_genuine, null);
L.RegVar("genuineCheckAvailable", get_genuineCheckAvailable, null);
L.RegVar("lowMemory", get_lowMemory, set_lowMemory);
L.RegVar("logMessageReceived", get_logMessageReceived, set_logMessageReceived);
L.RegVar("logMessageReceivedThreaded", get_logMessageReceivedThreaded, set_logMessageReceivedThreaded);
L.RegVar("onBeforeRender", get_onBeforeRender, set_onBeforeRender);
L.RegFunction("AdvertisingIdentifierCallback", UnityEngine_Application_AdvertisingIdentifierCallback);
L.RegFunction("LogCallback", UnityEngine_Application_LogCallback);
L.RegFunction("LowMemoryCallback", UnityEngine_Application_LowMemoryCallback);
L.EndStaticLibs();
}
TestProtol(在CustomSetting.cs 中注册即可使用)
TestProtolWrap.cs
public static void Register(LuaState L)
{
L.BeginStaticLibs("TestProtol");
L.RegVar("data", get_data, set_data);
L.EndStaticLibs();
}
TestStack
TestLuaStack.cs
Instance = this;
new LuaResLoader();
testGo = gameObject;
state = new LuaState();
state.Start();
LuaBinder.Bind(state); state.BeginModule(null);
state.RegFunction("TestArgError", TestArgError);
state.RegFunction("TestTableInCo", TestTableInCo);
state.RegFunction("TestCycle", TestCycle);
state.RegFunction("TestNull", TestNull);
state.RegFunction("TestAddComponent", TestAddComponent);
state.RegFunction("TestOutOfBound", TestOutOfBound);
state.RegFunction("TestMulStack", TestMulStack);
state.BeginStaticLibs("TestStack");
state.RegFunction("Test1", Test1);
state.RegFunction("PushLuaError", PushLuaError);
state.RegFunction("Test3", Test3);
state.RegFunction("Test4", Test4);
state.RegFunction("Test5", Test5);
state.RegFunction("Test6", Test6);
state.EndStaticLibs();
state.EndModule();
Input
UnityEngine_InputWrap.cs
public static void Register(LuaState L)
{
L.BeginStaticLibs("Input");
L.RegFunction("GetAxis", GetAxis);
L.RegFunction("GetAxisRaw", GetAxisRaw);
L.RegFunction("GetButton", GetButton);
L.RegFunction("GetButtonDown", GetButtonDown);
L.RegFunction("GetButtonUp", GetButtonUp);
L.RegFunction("GetKey", GetKey);
L.RegFunction("GetKeyDown", GetKeyDown);
L.RegFunction("GetKeyUp", GetKeyUp);
L.RegFunction("GetJoystickNames", GetJoystickNames);
L.RegFunction("GetMouseButton", GetMouseButton);
L.RegFunction("GetMouseButtonDown", GetMouseButtonDown);
L.RegFunction("GetMouseButtonUp", GetMouseButtonUp);
L.RegFunction("ResetInputAxes", ResetInputAxes);
L.RegFunction("GetAccelerationEvent", GetAccelerationEvent);
L.RegFunction("GetTouch", GetTouch);
L.RegVar("compensateSensors", get_compensateSensors, set_compensateSensors);
L.RegVar("gyro", get_gyro, null);
L.RegVar("mousePosition", get_mousePosition, null);
L.RegVar("mouseScrollDelta", get_mouseScrollDelta, null);
L.RegVar("mousePresent", get_mousePresent, null);
L.RegVar("simulateMouseWithTouches", get_simulateMouseWithTouches, set_simulateMouseWithTouches);
L.RegVar("anyKey", get_anyKey, null);
L.RegVar("anyKeyDown", get_anyKeyDown, null);
L.RegVar("inputString", get_inputString, null);
L.RegVar("acceleration", get_acceleration, null);
L.RegVar("accelerationEvents", get_accelerationEvents, null);
L.RegVar("accelerationEventCount", get_accelerationEventCount, null);
L.RegVar("touches", get_touches, null);
L.RegVar("touchCount", get_touchCount, null);
L.RegVar("touchPressureSupported", get_touchPressureSupported, null);
L.RegVar("stylusTouchSupported", get_stylusTouchSupported, null);
L.RegVar("touchSupported", get_touchSupported, null);
L.RegVar("multiTouchEnabled", get_multiTouchEnabled, set_multiTouchEnabled);
L.RegVar("location", get_location, null);
L.RegVar("compass", get_compass, null);
L.RegVar("deviceOrientation", get_deviceOrientation, null);
L.RegVar("imeCompositionMode", get_imeCompositionMode, set_imeCompositionMode);
L.RegVar("compositionString", get_compositionString, null);
L.RegVar("imeIsSelected", get_imeIsSelected, null);
L.RegVar("compositionCursorPos", get_compositionCursorPos, set_compositionCursorPos);
L.RegVar("backButtonLeavesApp", get_backButtonLeavesApp, set_backButtonLeavesApp);
L.EndStaticLibs();
}
RenderSettings
UnityEngine_RenderSettingsWrap.cs
public static void Register(LuaState L)
{
L.BeginStaticLibs("RenderSettings");
L.RegFunction("__eq", op_Equality);
L.RegVar("fog", get_fog, set_fog);
L.RegVar("fogMode", get_fogMode, set_fogMode);
L.RegVar("fogColor", get_fogColor, set_fogColor);
L.RegVar("fogDensity", get_fogDensity, set_fogDensity);
L.RegVar("fogStartDistance", get_fogStartDistance, set_fogStartDistance);
L.RegVar("fogEndDistance", get_fogEndDistance, set_fogEndDistance);
L.RegVar("ambientMode", get_ambientMode, set_ambientMode);
L.RegVar("ambientSkyColor", get_ambientSkyColor, set_ambientSkyColor);
L.RegVar("ambientEquatorColor", get_ambientEquatorColor, set_ambientEquatorColor);
L.RegVar("ambientGroundColor", get_ambientGroundColor, set_ambientGroundColor);
L.RegVar("ambientLight", get_ambientLight, set_ambientLight);
L.RegVar("ambientIntensity", get_ambientIntensity, set_ambientIntensity);
L.RegVar("ambientProbe", get_ambientProbe, set_ambientProbe);
L.RegVar("subtractiveShadowColor", get_subtractiveShadowColor, set_subtractiveShadowColor);
L.RegVar("reflectionIntensity", get_reflectionIntensity, set_reflectionIntensity);
L.RegVar("reflectionBounces", get_reflectionBounces, set_reflectionBounces);
L.RegVar("haloStrength", get_haloStrength, set_haloStrength);
L.RegVar("flareStrength", get_flareStrength, set_flareStrength);
L.RegVar("flareFadeSpeed", get_flareFadeSpeed, set_flareFadeSpeed);
L.RegVar("skybox", get_skybox, set_skybox);
L.RegVar("sun", get_sun, set_sun);
L.RegVar("defaultReflectionMode", get_defaultReflectionMode, set_defaultReflectionMode);
L.RegVar("defaultReflectionResolution", get_defaultReflectionResolution, set_defaultReflectionResolution);
L.RegVar("customReflection", get_customReflection, set_customReflection);
L.EndStaticLibs();
}
Resources
UnityEngine_ResourcesWrap.cs
public static void Register(LuaState L)
{
L.BeginStaticLibs("Resources");
L.RegFunction("FindObjectsOfTypeAll", FindObjectsOfTypeAll);
L.RegFunction("Load", Load);
L.RegFunction("LoadAsync", LoadAsync);
L.RegFunction("LoadAll", LoadAll);
L.RegFunction("GetBuiltinResource", GetBuiltinResource);
L.RegFunction("UnloadAsset", UnloadAsset);
L.RegFunction("UnloadUnusedAssets", UnloadUnusedAssets);
L.EndStaticLibs();
}
Screen
UnityEngine_ScreenWrap.cs
public static void Register(LuaState L)
{
L.BeginStaticLibs("Screen");
L.RegFunction("SetResolution", SetResolution);
L.RegVar("resolutions", get_resolutions, null);
L.RegVar("currentResolution", get_currentResolution, null);
L.RegVar("width", get_width, null);
L.RegVar("height", get_height, null);
L.RegVar("dpi", get_dpi, null);
L.RegVar("fullScreen", get_fullScreen, set_fullScreen);
L.RegVar("autorotateToPortrait", get_autorotateToPortrait, set_autorotateToPortrait);
L.RegVar("autorotateToPortraitUpsideDown", get_autorotateToPortraitUpsideDown, set_autorotateToPortraitUpsideDown);
L.RegVar("autorotateToLandscapeLeft", get_autorotateToLandscapeLeft, set_autorotateToLandscapeLeft);
L.RegVar("autorotateToLandscapeRight", get_autorotateToLandscapeRight, set_autorotateToLandscapeRight);
L.RegVar("orientation", get_orientation, set_orientation);
L.RegVar("sleepTimeout", get_sleepTimeout, set_sleepTimeout);
L.EndStaticLibs();
}
SleepTimeout
UnityEngine_SleepTimeoutWrap.cs
public static void Register(LuaState L)
{
L.BeginStaticLibs("SleepTimeout");
L.RegConstant("NeverSleep", -);
L.RegConstant("SystemSetting", -);
L.EndStaticLibs();
}
Time
UnityEngine_TimeWrap.cs
public static void Register(LuaState L)
{
L.BeginStaticLibs("Time");
L.RegVar("time", get_time, null);
L.RegVar("timeSinceLevelLoad", get_timeSinceLevelLoad, null);
L.RegVar("deltaTime", get_deltaTime, null);
L.RegVar("fixedTime", get_fixedTime, null);
L.RegVar("unscaledTime", get_unscaledTime, null);
L.RegVar("fixedUnscaledTime", get_fixedUnscaledTime, null);
L.RegVar("unscaledDeltaTime", get_unscaledDeltaTime, null);
L.RegVar("fixedUnscaledDeltaTime", get_fixedUnscaledDeltaTime, null);
L.RegVar("fixedDeltaTime", get_fixedDeltaTime, set_fixedDeltaTime);
L.RegVar("maximumDeltaTime", get_maximumDeltaTime, set_maximumDeltaTime);
L.RegVar("smoothDeltaTime", get_smoothDeltaTime, null);
L.RegVar("maximumParticleDeltaTime", get_maximumParticleDeltaTime, set_maximumParticleDeltaTime);
L.RegVar("timeScale", get_timeScale, set_timeScale);
L.RegVar("frameCount", get_frameCount, null);
L.RegVar("renderedFrameCount", get_renderedFrameCount, null);
L.RegVar("realtimeSinceStartup", get_realtimeSinceStartup, null);
L.RegVar("captureFramerate", get_captureFramerate, set_captureFramerate);
L.RegVar("inFixedTimeStep", get_inFixedTimeStep, null);
L.EndStaticLibs();
}
Physics
UnityEngine_PhysicsWrap.cs
public static void Register(LuaState L)
{
L.BeginStaticLibs("Physics");
L.RegFunction("Raycast", Raycast);
L.RegFunction("RaycastAll", RaycastAll);
L.RegFunction("RaycastNonAlloc", RaycastNonAlloc);
L.RegFunction("Linecast", Linecast);
L.RegFunction("OverlapSphere", OverlapSphere);
L.RegFunction("OverlapSphereNonAlloc", OverlapSphereNonAlloc);
L.RegFunction("OverlapCapsule", OverlapCapsule);
L.RegFunction("OverlapCapsuleNonAlloc", OverlapCapsuleNonAlloc);
L.RegFunction("CapsuleCast", CapsuleCast);
L.RegFunction("SphereCast", SphereCast);
L.RegFunction("CapsuleCastAll", CapsuleCastAll);
L.RegFunction("CapsuleCastNonAlloc", CapsuleCastNonAlloc);
L.RegFunction("SphereCastAll", SphereCastAll);
L.RegFunction("SphereCastNonAlloc", SphereCastNonAlloc);
L.RegFunction("CheckSphere", CheckSphere);
L.RegFunction("CheckCapsule", CheckCapsule);
L.RegFunction("CheckBox", CheckBox);
L.RegFunction("OverlapBox", OverlapBox);
L.RegFunction("OverlapBoxNonAlloc", OverlapBoxNonAlloc);
L.RegFunction("BoxCastAll", BoxCastAll);
L.RegFunction("BoxCastNonAlloc", BoxCastNonAlloc);
L.RegFunction("BoxCast", BoxCast);
L.RegFunction("IgnoreCollision", IgnoreCollision);
L.RegFunction("IgnoreLayerCollision", IgnoreLayerCollision);
L.RegFunction("GetIgnoreLayerCollision", GetIgnoreLayerCollision);
L.RegFunction("ComputePenetration", ComputePenetration);
L.RegFunction("ClosestPoint", ClosestPoint);
L.RegFunction("Simulate", Simulate);
L.RegConstant("IgnoreRaycastLayer", );
L.RegConstant("DefaultRaycastLayers", -);
L.RegConstant("AllLayers", -);
L.RegVar("gravity", get_gravity, set_gravity);
L.RegVar("defaultContactOffset", get_defaultContactOffset, set_defaultContactOffset);
L.RegVar("bounceThreshold", get_bounceThreshold, set_bounceThreshold);
L.RegVar("defaultSolverIterations", get_defaultSolverIterations, set_defaultSolverIterations);
L.RegVar("defaultSolverVelocityIterations", get_defaultSolverVelocityIterations, set_defaultSolverVelocityIterations);
L.RegVar("sleepThreshold", get_sleepThreshold, set_sleepThreshold);
L.RegVar("queriesHitTriggers", get_queriesHitTriggers, set_queriesHitTriggers);
L.RegVar("queriesHitBackfaces", get_queriesHitBackfaces, set_queriesHitBackfaces);
L.RegVar("autoSimulation", get_autoSimulation, set_autoSimulation);
L.EndStaticLibs();
}
QualitySettings
UnityEngine_QualitySettingsWrap.cs
public static void Register(LuaState L)
{
L.BeginStaticLibs("QualitySettings");
L.RegFunction("GetQualityLevel", GetQualityLevel);
L.RegFunction("SetQualityLevel", SetQualityLevel);
L.RegFunction("IncreaseLevel", IncreaseLevel);
L.RegFunction("DecreaseLevel", DecreaseLevel);
L.RegFunction("__eq", op_Equality);
L.RegVar("names", get_names, null);
L.RegVar("pixelLightCount", get_pixelLightCount, set_pixelLightCount);
L.RegVar("shadows", get_shadows, set_shadows);
L.RegVar("shadowProjection", get_shadowProjection, set_shadowProjection);
L.RegVar("shadowCascades", get_shadowCascades, set_shadowCascades);
L.RegVar("shadowDistance", get_shadowDistance, set_shadowDistance);
L.RegVar("shadowResolution", get_shadowResolution, set_shadowResolution);
L.RegVar("shadowNearPlaneOffset", get_shadowNearPlaneOffset, set_shadowNearPlaneOffset);
L.RegVar("shadowCascade2Split", get_shadowCascade2Split, set_shadowCascade2Split);
L.RegVar("shadowCascade4Split", get_shadowCascade4Split, set_shadowCascade4Split);
L.RegVar("shadowmaskMode", get_shadowmaskMode, set_shadowmaskMode);
L.RegVar("masterTextureLimit", get_masterTextureLimit, set_masterTextureLimit);
L.RegVar("anisotropicFiltering", get_anisotropicFiltering, set_anisotropicFiltering);
L.RegVar("lodBias", get_lodBias, set_lodBias);
L.RegVar("maximumLODLevel", get_maximumLODLevel, set_maximumLODLevel);
L.RegVar("particleRaycastBudget", get_particleRaycastBudget, set_particleRaycastBudget);
L.RegVar("softParticles", get_softParticles, set_softParticles);
L.RegVar("softVegetation", get_softVegetation, set_softVegetation);
L.RegVar("realtimeReflectionProbes", get_realtimeReflectionProbes, set_realtimeReflectionProbes);
L.RegVar("billboardsFaceCameraPosition", get_billboardsFaceCameraPosition, set_billboardsFaceCameraPosition);
L.RegVar("maxQueuedFrames", get_maxQueuedFrames, set_maxQueuedFrames);
L.RegVar("vSyncCount", get_vSyncCount, set_vSyncCount);
L.RegVar("antiAliasing", get_antiAliasing, set_antiAliasing);
L.RegVar("desiredColorSpace", get_desiredColorSpace, null);
L.RegVar("activeColorSpace", get_activeColorSpace, null);
L.RegVar("blendWeights", get_blendWeights, set_blendWeights);
L.RegVar("asyncUploadTimeSlice", get_asyncUploadTimeSlice, set_asyncUploadTimeSlice);
L.RegVar("asyncUploadBufferSize", get_asyncUploadBufferSize, set_asyncUploadBufferSize);
L.RegVar("resolutionScalingFixedDPIFactor", get_resolutionScalingFixedDPIFactor, set_resolutionScalingFixedDPIFactor);
L.EndStaticLibs();
}
luaFramework的更多相关文章
- LuaFramework热更新过程(及可更新的loading界面实现)
1.名词解释: 资源包:点击 LuaFramework | Build XXX(平台名) Resource,框架会自动将自定义指定的资源打包到StreamingAssets文件夹,这个 ...
- Unity3D热更新之LuaFramework篇[03]--prefab加载和Button事件
在上一篇文章 Unity3D热更新之LuaFramework篇[02]--用Lua创建自己的面板 中,我介绍了LuaFramework加载面板的方法,但这个方法并不适用于其它Prefab资源,在这套框 ...
- Unity3D热更新之LuaFramework篇[02]--用Lua创建自己的面板
在上篇文章 Unity3D热更新之LuaFramework篇[01]--从零开始 中,我们了解了怎么获得一个可用的LuaFramework框架. 本篇将我会先介绍一下如何配置Lua开发环境,然后分析在 ...
- Unity3D热更新之LuaFramework篇[01]--从零开始
前言 因工作关系,需要对手头的项目进行热更新支持.了解后发现,Lua的几个变种:XLua.ToLua(原uLua)和Slua都可以做Unity热更,而ToLua更是提供了一个简易的热更框架--LuaF ...
- unity luaFramework
1 AppConst: DebugMode: 调试模式,true:lua脚本直接读取自 AssetDir,false:开始会将AssetDir内的lua脚本复制到 Util.DataPath内(根据平 ...
- Unity LuaFramework LuaBundleMode
设置 AppConst.cs 中的 LuaBundleMode 为 true,开启 Lua 代码 AssetBundle 模式. 启动程序报错,Moudle XXX not found. 我在 Ass ...
- [Unity热更新]tolua# & LuaFramework(一):基础
一.tolua# c#调用lua:LuaState[变量名/函数名] 1.LuaState a.执行lua代码段 DoString(string) DoFile(.lua文件名) Require(.l ...
- Unity3D热更新之LuaFramework篇[06]--Lua中是怎么实现脚本生命周期的
前言 用c#开发的时候,新建的脚本都默认继承自Monobehaviour, 因此脚本才有了自己的生命周期函数,如Awake,Start, Update, OnDestroy等. 在相应的方法中实现游戏 ...
- Unity3D热更新之LuaFramework篇[07]--怎么让unity对象绑定Lua脚本
前言 在上一篇文章 Unity3D热更新之LuaFramework篇[06]--Lua中是怎么实现脚本生命周期的 中,我分析了由LuaBehaviour来实现lua脚本生命周期的方法. 但在实际使用中 ...
- Unity3D热更新之LuaFramework篇[08]--热更新原理及热更服务器搭建
前言 前面铺垫了这么久,终于要开始写热更新了. Unity游戏热更新包含两个方面,一个是资源的更新,一个是脚本的更新. 资源更新是Unity本来就支持的,在各大平台也都能用.而脚本的热更新在iOS平台 ...
随机推荐
- javascript学习笔记(三):运算符、循环语句
javascript的运算符.条件语句.循环语句的使用方法大部分和c语言类似,但是值得注意的是,运算符中"=="和"==="的使用方法和c语言有区别:在java ...
- 织梦 列表页 list标签 按照自已设置的方式排序
一.可以按照权重排序 降序排序 desc 1.添加的文章默认权重是自动加1,所以只要把想置顶的文章权重设置很高,如10000 2.{dede:list pagesize='12′ orderby='w ...
- c++ STL模板(一)
一.sort函数 1.头文件:#include < algorithm>: 2.它使用的排序方法是类似于快排的方法,时间复杂度为n*log2(n): 3.Sort函数有三个参数:(第三个参 ...
- vim常用命令之多行注释和多行删除
vim中多行注释和多行删除命令,这些命令也是经常用到的一些小技巧,可以大大提高工作效率. 1.多行注释: 1. 首先按esc进入命令行模式下,按下Ctrl + v,进入列(也叫区块)模式; ...
- Django 之多对多关系
1. 多对多关系 作者 <--> 书籍 1. 表结构设计 1. SQL版 -- 创建作者表 create table author( id int primary key auto_inc ...
- Python+Selenium学习--前进和后退
场景 这两个功能一般不太常用.所能想到的场景大概也就是在几个页面间来回跳转,省去每次都get url. 代码 #!/usr/bin/env python # -*- coding:utf-8 -*- ...
- @RequestBody使用须知
-----------------------siwuxie095 @RequestBody 使用须知 使用 @Requ ...
- task 定时设置
每天凌晨2点 0 0 2 * * ?和每天隔一小时 0 * */1 * * ? 例1:每隔5秒执行一次:*/5 * * * * ? 例2:每隔5分执行一次:0 */5 * * * ? 在26分.29 ...
- linux下svn版本控制的常用命令大全
1.将文件checkout到本地目录 svn checkout path(path是服务器上的目录) 例如:svn checkout svn://192.168.1.1/pro/domain 简写:s ...
- JSP使用sessionScope获取session值
场景:有些实体对象可以放到HttpSession对象中,保正在一个会话期间可以随时获取这个对象的属性,例如可以将登录用户的信息写入session,以保证页面随时可以获取并显示这个用户的状态信息.下面以 ...