亢龙

亢龙 查看完整档案

填写现居城市  |  填写毕业院校  |  填写所在公司/组织填写个人主网站
编辑
_ | |__ _ _ __ _ | '_ \| | | |/ _` | | |_) | |_| | (_| | |_.__/ \__,_|\__, | |___/ 该用户太懒什么也没留下

个人动态

亢龙 回答了问题 · 11月15日

C++ 语法的奇怪地方

什么时候都行

c++ 语法告诉我们,当访问值对象的属性时用 “.” 即 Object.val,当用指针访问地址里存储值对象的属性时用 ->,即 pointer->val。

同时语法告诉我们在指针前面加 * 代表解引用,此时就代表我们用的是值对象访问属性,即 (*pointer).val

这是语法告诉了我们可以这么写,编译器都认识。

就像: 你吃了吗? 和 吃了吗你?
中国人都能明白什么意思,但是有些地方就喜欢用倒装句,有些地方就喜欢主谓宾正常的格式来说,都行。

至于实际开发项目中,看组织安排,同一风格就好。一般都用的是 -> 方式

关注 3 回答 2

亢龙 回答了问题 · 11月15日

解决mysql有些字段是非必填的,传空要查所有数据该怎么处理?

如果你在设计表结构的时候,没给有给 char 类型字段设置默认值(如 ''),那么在mysql 他存储的就是null

所以,如果你是要查指定cityId 并且 regionId 为空的sql 就这么写:

SELECT 
    *
FROM 
    content
WHERE 
    cityId='C-e834160464892529719476' and
    regionId is null

如果你要查的条件为 cityId,regionId 传空的时候,不做为限制条件就改为

SELECT 
    *
FROM 
    content
WHERE 
    cityId='C-e834160464892529719476'

如果你是问,这两个sql能不能合并成一个sql,答案是可以
已java的mybatis为例:

<select id="query" parmeter="parmType" result="Type">
    SELECT 
    *
FROM 
    content
WHERE 
    1=1
    <if test="cityId!=null and cityId!=''">
        and cityId=#{cityId}
    </if>
    <if test="regionId!=null and regionId!=''">
        and regionId=#{regionId}
    </test>
</select>

同理可知,在其他的语言当中你也需要动态的拼接sql,来达到查询不同条件的效果。

最后,在设计表结构的时候,尽量不要有 null 的存在,如果是字符串,就给个 '' 默认值,如果是数字,就给个 0 或者-1 之类的值,以此类推。

关注 5 回答 5

亢龙 提出了问题 · 10月5日

vscode ue4 检测到 #include 错误

### 问题描述
想要试用vscode做ue4 的集成开发编译器。
按照网上教程已安装插件:
image

已在ue4 中选择 vscode 作为编译软件

新键项目,自动启动vscode后,会报错:
image

已检查过项目下的 c_cpp_properties.json 文件:

{
    "configurations": [
        {
            "name": "UnrealEngine",
            "includePath": [
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source",
                "E:\\gameEngine\\ue\\studyUE\\MyProject\\Source",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\TraceLog\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Core\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\CoreUObject",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\CoreUObject\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\Engine",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Engine\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Engine\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\NetCore",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Net",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Net\\Core\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Net\\Core\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\ApplicationCore\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\RHI\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Json\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\SlateCore",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\SlateCore\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\InputCore",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\InputCore\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\InputCore\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\Slate",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Slate\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\ImageWrapper",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\ImageWrapper\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Messaging\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\MessagingCommon\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\RenderCore\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Analytics",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Analytics\\AnalyticsET\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Analytics\\Analytics\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Sockets\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\AssetRegistry",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\AssetRegistry\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\EngineMessages",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\EngineMessages\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\EngineSettings",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\EngineSettings\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\EngineSettings\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\SynthBenchmark\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\Renderer",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Renderer\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\GameplayTags",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\GameplayTags\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\GameplayTags\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\PacketHandler",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\PacketHandlers",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\PacketHandlers\\PacketHandler\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\PacketHandlers\\PacketHandler\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\PacketHandlers\\ReliabilityHandlerComponent\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\AudioPlatformConfiguration",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\AudioPlatformConfiguration\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\MeshDescription",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\MeshDescription\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\StaticMeshDescription",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\StaticMeshDescription\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\PakFile\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\RSA\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\NetworkReplayStreaming",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\NetworkReplayStreaming\\NetworkReplayStreaming\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\PhysicsCore",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\PhysicsCore\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Experimental",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Experimental\\Chaos\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Experimental\\ChaosCore\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Experimental\\Voronoi\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\FieldSystemCore",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Experimental\\FieldSystem\\Source",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Experimental\\FieldSystem\\Source\\FieldSystemCore\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\SignalProcessing\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\AudioExtensions",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\AudioExtensions\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\AudioMixerCore\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\UnrealEd",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Programs\\UnrealLightmass\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\Android\\AndroidDeviceDetection\\Public\\Interfaces",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\UnrealEd\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\UnrealEd\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\DirectoryWatcher\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\Documentation\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Projects\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\SandboxFile\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\EditorStyle",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\EditorStyle\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\SourceControl",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\SourceControl\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\UnrealEdMessages",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\UnrealEdMessages\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\UnrealEdMessages\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\GameplayDebugger",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\GameplayDebugger\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\BlueprintGraph",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\BlueprintGraph\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\BlueprintGraph\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\EditorSubsystem",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\EditorSubsystem\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Online",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Online\\HTTP\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\UnrealAudio\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\FunctionalTesting",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\FunctionalTesting\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\FunctionalTesting\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\AutomationController",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\AutomationController\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\Localization",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\Localization\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\AudioEditor",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\AudioEditor\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\AudioEditor\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\AudioMixer",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\AudioMixer\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\AudioMixer\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\TargetPlatform\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\LevelEditor",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\LevelEditor\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\Settings\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\IntroTutorials",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\IntroTutorials\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\HeadMountedDisplay",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\HeadMountedDisplay\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\VREditor",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\VREditor",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\VREditor\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\CommonMenuExtensions\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\Landscape",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Landscape\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Landscape\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\PropertyEditor",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\PropertyEditor\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\ActorPickerMode\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\SceneDepthPickerMode\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\DetailCustomizations",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\DetailCustomizations\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\ClassViewer",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\ClassViewer\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\GraphEditor",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\GraphEditor\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\StructViewer",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\StructViewer\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\ContentBrowser",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\ContentBrowser\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\libSampleRate\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\NetworkFileSystem\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\UMG",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\UMG\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\MovieScene",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\MovieScene\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\TimeManagement",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\TimeManagement\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\MovieSceneTracks",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\MovieSceneTracks\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\AnimationCore",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\AnimationCore\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\PropertyPath",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\PropertyPath\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\NavigationSystem",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\NavigationSystem\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\MeshBuilder\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\MaterialShaderQualitySettings",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\MaterialShaderQualitySettings\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\InteractiveToolsFramework",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Experimental\\InteractiveToolsFramework\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\ToolMenusEditor",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\ToolMenusEditor\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Windows",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Windows\\XAudio2\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\AssetTagsEditor\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\CollectionManager\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\AddContentDialog",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\AddContentDialog\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\IntelEmbree\\Embree2140\\Win64\\include",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\MeshUtilities\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\MeshMergeUtilities\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\HierarchicalLODUtilities\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\MeshReductionInterface\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\AssetTools",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Developer\\AssetTools\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\KismetCompiler\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\GameplayTasks",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\GameplayTasks\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\GameplayTasks\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\AIModule",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\AIModule\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\AIModule\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\Kismet",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\Kismet\\Classes",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Editor\\Kismet\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\PhysicsSQ\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\ChaosSolvers",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Experimental\\ChaosSolvers\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\GeometryCollectionCore",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Experimental\\GeometryCollectionCore\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\GeometryCollectionSimulationCore",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\Experimental\\GeometryCollectionSimulationCore\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Intermediate\\Build\\Win64\\UE4Editor\\Inc\\ClothingSystemRuntimeInterface",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\Runtime\\ClothingSystemRuntimeInterface\\Public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\PxShared\\include",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\PxShared\\include\\cudamanager",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\PxShared\\include\\filebuf",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\PxShared\\include\\foundation",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\PxShared\\include\\pvd",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\PxShared\\include\\task",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\PhysX_3.4\\Include",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\PhysX_3.4\\Include\\cooking",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\PhysX_3.4\\Include\\common",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\PhysX_3.4\\Include\\extensions",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\PhysX_3.4\\Include\\geometry",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\APEX_1.4\\include",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\APEX_1.4\\include\\clothing",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\APEX_1.4\\include\\nvparameterized",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\APEX_1.4\\include\\legacy",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\APEX_1.4\\include\\PhysX3",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\APEX_1.4\\common\\include",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\APEX_1.4\\common\\include\\autogen",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\APEX_1.4\\framework\\include",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\APEX_1.4\\framework\\include\\autogen",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\APEX_1.4\\shared\\general\\RenderDebug\\public",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\APEX_1.4\\shared\\general\\PairFilter\\include",
                "D:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Source\\ThirdParty\\PhysX3\\APEX_1.4\\shared\\internal\\include",
                "d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.27.29110\\INCLUDE",
                "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\include\\um",
                "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\ucrt",
                "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\shared",
                "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\um",
                "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\winrt"
            ],
            "intelliSenseMode": "msvc-x64",
            "defines": [],
            "compilerPath": "d:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe",
            "cStandard": "c11",
            "cppStandard": "c++17"
        }
    ],
    "version": 4
}

在对应目录下是可以找到 c++ 文件。 求大佬指教,还应该配置什么地方才能正常使用

关注 1 回答 0

亢龙 回答了问题 · 9月17日

解决ue4 用c++创建的类无法试用

新建项目时,应选择创建 c++ 项目。默认选择的是 蓝图项目

目前还不知道,蓝图 和 c++ 的方式能否共存。

关注 1 回答 1

亢龙 提出了问题 · 9月17日

解决ue4 用c++创建的类无法试用

问题描述

没有ue4的标签,就选择u3d了
ue版本:4.25.3
vs版本:2019 16.7.3

用c++ 类创建的Actor,无法在 ue4 中使用

代码来源为ue4 官网, 编程快速入门(链接地址

以下为我自己的代码
FloatingActor.h

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "FloatingActor.generated.h"

UCLASS()
class TEST_API AFloatingActor : public AActor
{
    GENERATED_BODY()
    
public:    
    // Sets default values for this actor's properties
    AFloatingActor();
    UPROPERTY(VisibleAnywhere)
    UStaticMeshComponent* VisualMesh;

protected:
    // Called when the game starts or when spawned
    virtual void BeginPlay() override;

public:    
    // Called every frame
    virtual void Tick(float DeltaTime) override;

};

FloatingActor.cpp

#include "FloatingActor.h"

// Sets default values
AFloatingActor::AFloatingActor()
{
     // Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
    PrimaryActorTick.bCanEverTick = true;

    VisualMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
    VisualMesh->SetupAttachment(RootComponent);

    static ConstructorHelpers::FObjectFinder<UStaticMesh> CubeVisualAsset(TEXT("/Game/StarterContent/Shapes/Shape_Cube.Shape_Cube"));

    if (CubeVisualAsset.Succeeded())
    {
        VisualMesh->SetStaticMesh(CubeVisualAsset.Object);
        VisualMesh->SetRelativeLocation(FVector(0.0f, 0.0f, 0.0f));
    }

}

// Called when the game starts or when spawned
void AFloatingActor::BeginPlay()
{
    Super::BeginPlay();
    
}

// Called every frame
void AFloatingActor::Tick(float DeltaTime)
{
    Super::Tick(DeltaTime);

    FVector NewLocation = GetActorLocation();
    FRotator NewRotation = GetActorRotation();
    float RunningTime = GetGameTimeSinceCreation();
    float DeltaHeight = (FMath::Sin(RunningTime + DeltaTime) - FMath::Sin(RunningTime));
    NewLocation.Z += DeltaHeight * 20.0f;       //Scale our height by a factor of 20
    float DeltaRotation = DeltaTime * 20.0f;    //Rotate by 20 degrees per second
    NewRotation.Yaw += DeltaRotation;
    SetActorLocationAndRotation(NewLocation, NewRotation);

}

编译后,将FloatingActor 拖拽入 透视视口,如图所示
image

在透视视口中什么都没有,但是在世界大纲视图中已经存在了。

请教我哪里做的不对吗?

关注 1 回答 1

亢龙 回答了问题 · 8月20日

mysql 刷脏页未提交的数据能写入磁盘吗?

题主是指,一个表单页提交一次后,再次刷新后又被提交了一次吗?

如果是这样,你可以设置一个 token ,相同的token 不能使用两次

或者关键字段设置成唯一性,则数据库会报错(此方法并不推荐)

关注 2 回答 1

亢龙 回答了问题 · 8月19日

解决MySQL多层级数据查询返回多维度结果集的问题?

SQL 的查询结果集,一条数据是一行,
已查询 赵 为例:

-- sql 是随手写的,字段值需要自己调整
select a.*,b.*.c.* from a,b,c where a.name='赵' and a.aid=b.aid and b.bid=c.bid
aida_nameagebidb_nameheightcidnameweight
1601赵一1701赵一1120
1601赵一1702赵一2115
1602赵二1753赵二1120

其结果集大概如上
如果你想要转换成 有层级关系,
1.自己手动做数据处理
2.如果用的java,可以尝试 mybaits的 1对多映射 ,百度有很多

关注 2 回答 1

亢龙 回答了问题 · 8月19日

解决我该如何优化这个句SQL??

选择建立索引字段的条件之一是: 尽量找字段值变化多的, 你 status 字段总共就 3 个值,其建立不建立索引意义不是特别大,而且才5w数据量。

你执行慢,应该看看一下执行计划,给个表结构出来看看

你 status 字段的类型是不是 char ? 你查询的时候用的是数字 0 ,这样的话会有内部的转化,会比较慢

关注 5 回答 5

亢龙 回答了问题 · 8月13日

java 泛型获取

题主你理解错了泛型的用法,泛型是 参数化类型

你的 Parent<T> 中的 T 是个声明了一个参数类型 T ,T 是一个 “参数”, 其传入的值为 java 类。

怎么传值?

class Child implements Parent<Map>

在你实现 Parent 接口的时候就是传 参数类型的时候,也就是说 Child 中所有的 T 参数传入的就是 Map

你上面写的代码

class Child<T> implements Parent<T>

Parent<T> 会报错,因为你没有一个叫 T 的java类
Child<T> 的意思是 Cild 这个类也申明了一个 参数类型 T

也就是你在写一个子类继承 Child 的时候需要写上这个 T 具体是什么类型的

class Test extends Child<String>

当然如果你不写具体的类型,那么你申明的泛型就是 Object 类型的。
你也可以在具体使用的时候写上此时的参数类型是什么

Child<Map> c =  new Child()

另外,你的 Parent<T> 接口写的是有问题的
你申明了一个 参数类型 T 但是你接口方法却没有使用他,也就是这个 T 参数完全没有用到

你的方法可以改造下

public T clazz() 

或者

public void clazz(T t) 

那么你在实现 Parent 的时候,其参数类型就是确定的

关注 3 回答 2

亢龙 回答了问题 · 8月13日

RedisDesktopManager连接不上远程redis

服务器redis 配置

bind 0.0.0.0

另外,服务器内开启了防火墙请放行端口 6379(redis默认的端口)
一般服务器提供商会也会提供云平台的访问策略,请在控制台放行端口 6379(redis默认端口)

关注 3 回答 2

认证与成就

  • 获得 0 次点赞
  • 获得 5 枚徽章 获得 0 枚金徽章, 获得 0 枚银徽章, 获得 5 枚铜徽章

擅长技能
编辑

(゚∀゚ )
暂时没有

开源项目 & 著作
编辑

(゚∀゚ )
暂时没有

注册于 2018-03-26
个人主页被 284 人浏览